20250711会议要求修改
This commit is contained in:
parent
3c7fe4c13f
commit
d3c8bde081
@ -212,7 +212,7 @@ export function testDataScanById(params:any){
|
|||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//获取异步信息
|
//获取异步信息(扫描)
|
||||||
export function obtaintestData(params:any){
|
export function obtaintestData(params:any){
|
||||||
return request ({
|
return request ({
|
||||||
url:'/experimentalData/ts-nodes/obtaintestData',
|
url:'/experimentalData/ts-nodes/obtaintestData',
|
||||||
@ -221,6 +221,15 @@ export function obtaintestData(params:any){
|
|||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//获取异步信息(解压)
|
||||||
|
export function decompressionFolderData(params:any){
|
||||||
|
return request ({
|
||||||
|
url:'/experimentalData/ts-files/decompressionFolderData',
|
||||||
|
method:'post',
|
||||||
|
params:params,
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
//判断节点
|
//判断节点
|
||||||
export function selectTsNodesByTskeId(params:any){
|
export function selectTsNodesByTskeId(params:any){
|
||||||
return request ({
|
return request ({
|
||||||
|
1
web/src/components/trajectory/china_provinces.json
Normal file
1
web/src/components/trajectory/china_provinces.json
Normal file
File diff suppressed because one or more lines are too long
@ -27,7 +27,7 @@ const initChart = () => {
|
|||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'value',
|
type: 'value',
|
||||||
name: '时间 (s)',
|
name: '时间 (h)',
|
||||||
nameLocation: 'middle',
|
nameLocation: 'middle',
|
||||||
nameGap: 30
|
nameGap: 30
|
||||||
},
|
},
|
||||||
@ -60,7 +60,7 @@ const updateChart = () => {
|
|||||||
console.log('Updating chart...'); // 调试信息
|
console.log('Updating chart...'); // 调试信息
|
||||||
|
|
||||||
// 转换数据结构:{x,y} -> [x,y]
|
// 转换数据结构:{x,y} -> [x,y]
|
||||||
const seriesData = props.chartData.map(item => [item.x, item.y]);
|
const seriesData = props.chartData.map(item => [item.x / 3600, item.y]); // 将秒转换为小时
|
||||||
console.log('seriesData:', seriesData); // 调试信息
|
console.log('seriesData:', seriesData); // 调试信息
|
||||||
|
|
||||||
// 更新图表数据
|
// 更新图表数据
|
||||||
|
@ -9,7 +9,11 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, watch, defineEmits, onBeforeUnmount } from 'vue'
|
import { ref, onMounted, watch, defineEmits, onBeforeUnmount } from 'vue'
|
||||||
import * as d3 from 'd3'
|
import * as d3 from 'd3'
|
||||||
import chinaData from './newJson.json'
|
|
||||||
|
// 导入中国省份边界数据
|
||||||
|
import chinaProvinces from './china_provinces.json'
|
||||||
|
// 导入世界地图数据(包含中国的轮廓)
|
||||||
|
import worldMap from './newJson.json'
|
||||||
|
|
||||||
// ==================== 常量与类型定义 ====================
|
// ==================== 常量与类型定义 ====================
|
||||||
const DEFAULT_MAP_SIZE = { width: 800, height: 600 }
|
const DEFAULT_MAP_SIZE = { width: 800, height: 600 }
|
||||||
@ -24,7 +28,7 @@ const props = defineProps({
|
|||||||
[116.405285, 39.904989], // 北京
|
[116.405285, 39.904989], // 北京
|
||||||
[121.472644, 31.231706] // 上海
|
[121.472644, 31.231706] // 上海
|
||||||
],
|
],
|
||||||
validator: value => value.every(coord =>
|
validator: value => value.every(coord =>
|
||||||
Array.isArray(coord) && coord.length === 2 &&
|
Array.isArray(coord) && coord.length === 2 &&
|
||||||
typeof coord[0] === 'number' && typeof coord[1] === 'number'
|
typeof coord[0] === 'number' && typeof coord[1] === 'number'
|
||||||
)
|
)
|
||||||
@ -40,12 +44,12 @@ const emit = defineEmits(['qvehuan1'])
|
|||||||
// ==================== 响应式状态 ====================
|
// ==================== 响应式状态 ====================
|
||||||
const mapContainer = ref(null)
|
const mapContainer = ref(null)
|
||||||
const isFullscreen = ref(false)
|
const isFullscreen = ref(false)
|
||||||
const isRouteInitialized = ref(false) // 原initqie,重命名以明确含义
|
|
||||||
|
|
||||||
// ==================== D3相关变量 ====================
|
// ==================== D3相关变量 ====================
|
||||||
let svgInstance = null
|
let svgInstance = null
|
||||||
let mapGroup = null
|
let mapGroup = null
|
||||||
let markersGroup = null
|
let markersGroup = null
|
||||||
|
let routeGroup = null
|
||||||
let zoomBehavior = null
|
let zoomBehavior = null
|
||||||
|
|
||||||
// ==================== 地图核心逻辑 ====================
|
// ==================== 地图核心逻辑 ====================
|
||||||
@ -65,7 +69,6 @@ const createProjection = () => {
|
|||||||
* 初始化地图基础结构
|
* 初始化地图基础结构
|
||||||
*/
|
*/
|
||||||
const initializeMap = () => {
|
const initializeMap = () => {
|
||||||
// 清理旧实例
|
|
||||||
if (svgInstance) svgInstance.remove()
|
if (svgInstance) svgInstance.remove()
|
||||||
|
|
||||||
const { width, height } = getContainerSize()
|
const { width, height } = getContainerSize()
|
||||||
@ -80,49 +83,90 @@ const initializeMap = () => {
|
|||||||
|
|
||||||
// 创建分层结构
|
// 创建分层结构
|
||||||
const mainGroup = svgInstance.append('g')
|
const mainGroup = svgInstance.append('g')
|
||||||
mapGroup = mainGroup.append('g').attr('class', 'map-layer')
|
|
||||||
markersGroup = mainGroup.append('g').attr('class', 'markers-layer')
|
|
||||||
|
|
||||||
// 绘制中国地图
|
mapGroup = mainGroup.append('g').attr('class', 'map-layer') // 底图层(国家/省份)
|
||||||
renderChinaMap(pathGenerator)
|
markersGroup = mainGroup.append('g').attr('class', 'markers-layer') // 标记层
|
||||||
|
routeGroup = mainGroup.append('g').attr('class', 'route-layer') // 轨迹层(置于最上层)
|
||||||
|
|
||||||
|
// 渲染世界地图(所有国家)
|
||||||
|
renderWorldCountries(pathGenerator)
|
||||||
|
|
||||||
|
// 渲染中国省份边界
|
||||||
|
renderChinaProvinces(projection)
|
||||||
|
|
||||||
// 初始化缩放行为
|
// 初始化缩放行为
|
||||||
initializeZoomBehavior(mainGroup)
|
initializeZoomBehavior(mainGroup)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 渲染中国地图路径和文字
|
* 渲染世界地图中的所有国家
|
||||||
* @param {d3.GeoPath} path - 路径生成器
|
|
||||||
*/
|
*/
|
||||||
const renderChinaMap = (path) => {
|
const renderWorldCountries = (path) => {
|
||||||
// 绘制省份路径
|
mapGroup.selectAll('.country-path')
|
||||||
mapGroup.append('g')
|
.data(worldMap.features)
|
||||||
.selectAll('path')
|
|
||||||
.data(chinaData.features)
|
|
||||||
.enter()
|
.enter()
|
||||||
.append('path')
|
.append('path')
|
||||||
|
.attr('class', 'country-path')
|
||||||
.attr('d', path)
|
.attr('d', path)
|
||||||
.attr('fill', '#e7e7e7')
|
.attr('fill', '#e7e7e7')
|
||||||
.attr('stroke', '#fff')
|
.attr('stroke', '#000')
|
||||||
|
.attr('stroke-width', 0.2)
|
||||||
|
|
||||||
// 添加省份名称
|
// 添加国家名称
|
||||||
mapGroup.append('g')
|
mapGroup.selectAll('.country-label')
|
||||||
.selectAll('text')
|
.data(worldMap.features)
|
||||||
.data(chinaData.features)
|
|
||||||
.enter()
|
.enter()
|
||||||
.append('text')
|
.append('text')
|
||||||
.attr('transform', d => `translate(${path.centroid(d)})`)
|
.attr('class', 'country-label')
|
||||||
|
.attr('transform', d => {
|
||||||
|
const centroid = path.centroid(d)
|
||||||
|
return `translate(${centroid[0]},${centroid[1]})`
|
||||||
|
})
|
||||||
.text(d => d.properties.name || '')
|
.text(d => d.properties.name || '')
|
||||||
.attr('text-anchor', 'middle')
|
.attr('text-anchor', 'middle')
|
||||||
.attr('dominant-baseline', 'central')
|
.attr('dominant-baseline', 'central')
|
||||||
.style('font', '12px Arial')
|
.style('font-size', '10px')
|
||||||
.attr('fill', '#333')
|
.attr('fill', '#333')
|
||||||
.style('pointer-events', 'none')
|
.style('pointer-events', 'none')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渲染中国省份边界
|
||||||
|
*/
|
||||||
|
const renderChinaProvinces = (projection) => {
|
||||||
|
const pathGenerator = d3.geoPath().projection(projection)
|
||||||
|
|
||||||
|
// 渲染省份边界
|
||||||
|
mapGroup.selectAll('.province-path')
|
||||||
|
.data(chinaProvinces.features)
|
||||||
|
.enter()
|
||||||
|
.append('path')
|
||||||
|
.attr('class', 'province-path')
|
||||||
|
.attr('d', pathGenerator)
|
||||||
|
.attr('fill', 'none')
|
||||||
|
.attr('stroke', '#000')
|
||||||
|
.attr('stroke-width', 0.2)
|
||||||
|
|
||||||
|
// 渲染省份名称
|
||||||
|
mapGroup.selectAll('.province-label')
|
||||||
|
.data(chinaProvinces.features)
|
||||||
|
.enter()
|
||||||
|
.append('text')
|
||||||
|
.attr('class', 'province-label')
|
||||||
|
.attr('transform', d => {
|
||||||
|
const centroid = pathGenerator.centroid(d)
|
||||||
|
return `translate(${centroid[0]},${centroid[1]})`
|
||||||
|
})
|
||||||
|
.text(d => d.properties.name || '')
|
||||||
|
.attr('text-anchor', 'middle')
|
||||||
|
.attr('dominant-baseline', 'central')
|
||||||
|
.style('font-size', '2px')
|
||||||
|
.attr('fill', '#000')
|
||||||
|
.style('pointer-events', 'none')
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化缩放行为
|
* 初始化缩放行为
|
||||||
* @param {d3.Selection} group - 需要应用缩放的分组
|
|
||||||
*/
|
*/
|
||||||
const initializeZoomBehavior = (group) => {
|
const initializeZoomBehavior = (group) => {
|
||||||
zoomBehavior = d3.zoom()
|
zoomBehavior = d3.zoom()
|
||||||
@ -134,49 +178,40 @@ const initializeZoomBehavior = (group) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ==================== 路线相关逻辑 ====================
|
// ==================== 路线相关逻辑 ====================
|
||||||
/**
|
|
||||||
* 更新路线和标记点
|
|
||||||
*/
|
|
||||||
const updateRoute = () => {
|
const updateRoute = () => {
|
||||||
if (!props.coordinates?.length) return
|
if (!props.coordinates?.length || !mapGroup) return
|
||||||
if (!mapGroup) initializeMap()
|
|
||||||
const projection = createProjection()
|
const projection = createProjection()
|
||||||
const pathGenerator = d3.geoPath().projection(projection)
|
const pathGenerator = d3.geoPath().projection(projection)
|
||||||
|
|
||||||
// 清理旧数据
|
// 清理旧路线
|
||||||
if (isRouteInitialized.value) {
|
routeGroup.selectAll('.route-path').remove()
|
||||||
mapGroup.selectAll('.route-path').remove()
|
markersGroup.selectAll('*').remove()
|
||||||
markersGroup.selectAll('*').remove()
|
|
||||||
isRouteInitialized.value = false
|
|
||||||
emit('qvehuan1', isRouteInitialized.value)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 绘制新路线
|
// 绘制新路线
|
||||||
renderRoutePath(pathGenerator)
|
renderRoutePath(pathGenerator)
|
||||||
renderMarkers(projection)
|
renderMarkers(projection)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 绘制路径动画
|
|
||||||
* @param {d3.GeoPath} path - 路径生成器
|
|
||||||
*/
|
|
||||||
const renderRoutePath = (path) => {
|
const renderRoutePath = (path) => {
|
||||||
const routeData = {
|
const routeData = {
|
||||||
type: "LineString",
|
type: "LineString",
|
||||||
coordinates: props.coordinates
|
coordinates: props.coordinates
|
||||||
}
|
}
|
||||||
|
|
||||||
mapGroup.append('path')
|
routeGroup.selectAll('.route-path').remove()
|
||||||
|
|
||||||
|
routeGroup.append('path')
|
||||||
.datum(routeData)
|
.datum(routeData)
|
||||||
.attr('class', 'route-path')
|
.attr('class', 'route-path')
|
||||||
.attr('d', path)
|
.attr('d', path)
|
||||||
.attr('fill', 'none')
|
.attr('fill', 'none')
|
||||||
.attr('stroke', '#f00')
|
.attr('stroke', '#f00')
|
||||||
.attr('stroke-width', 0.1)
|
.attr('stroke-width', 0.1)
|
||||||
.attr('stroke-dasharray', function() {
|
.attr('stroke-dasharray', function () {
|
||||||
return this.getTotalLength()
|
return this.getTotalLength()
|
||||||
})
|
})
|
||||||
.attr('stroke-dashoffset', function() {
|
.attr('stroke-dashoffset', function () {
|
||||||
return this.getTotalLength()
|
return this.getTotalLength()
|
||||||
})
|
})
|
||||||
.transition()
|
.transition()
|
||||||
@ -184,10 +219,6 @@ const renderRoutePath = (path) => {
|
|||||||
.attr('stroke-dashoffset', 0)
|
.attr('stroke-dashoffset', 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 绘制位置标记点
|
|
||||||
* @param {d3.GeoProjection} projection - 地理投影实例
|
|
||||||
*/
|
|
||||||
const renderMarkers = (projection) => {
|
const renderMarkers = (projection) => {
|
||||||
props.coordinates.forEach(coord => {
|
props.coordinates.forEach(coord => {
|
||||||
if (!isValidCoordinate(coord)) return
|
if (!isValidCoordinate(coord)) return
|
||||||
@ -209,7 +240,7 @@ const getContainerSize = () => ({
|
|||||||
height: mapContainer.value?.clientHeight || DEFAULT_MAP_SIZE.height
|
height: mapContainer.value?.clientHeight || DEFAULT_MAP_SIZE.height
|
||||||
})
|
})
|
||||||
|
|
||||||
const isValidCoordinate = (coord) =>
|
const isValidCoordinate = (coord) =>
|
||||||
Array.isArray(coord) && coord.length === 2 &&
|
Array.isArray(coord) && coord.length === 2 &&
|
||||||
!isNaN(coord[0]) && !isNaN(coord[1])
|
!isNaN(coord[0]) && !isNaN(coord[1])
|
||||||
|
|
||||||
@ -225,18 +256,16 @@ const toggleFullscreen = () => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
initializeMap()
|
initializeMap()
|
||||||
updateRoute()
|
updateRoute()
|
||||||
}, 100) // 等待DOM更新
|
}, 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==================== 生命周期钩子 ====================
|
// ==================== 生命周期钩子 ====================
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
window.addEventListener('resize', handleWindowResize)
|
window.addEventListener('resize', handleWindowResize)
|
||||||
// 强制初始化地图基础结构
|
initializeMap()
|
||||||
initializeMap() // [!code ++]
|
if (props.coordinates?.length) {
|
||||||
// 仅在coordinates存在时更新路线
|
updateRoute()
|
||||||
if (props.coordinates?.length) { // [!code ++]
|
}
|
||||||
updateRoute() // [!code ++]
|
|
||||||
} // [!code ++]
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
@ -245,8 +274,7 @@ onBeforeUnmount(() => {
|
|||||||
|
|
||||||
// ==================== 响应式监听 ====================
|
// ==================== 响应式监听 ====================
|
||||||
watch(() => props.qvehuan, (newVal) => {
|
watch(() => props.qvehuan, (newVal) => {
|
||||||
isRouteInitialized.value = newVal
|
if (!newVal) updateRoute()
|
||||||
updateRoute()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(() => props.coordinates, () => {
|
watch(() => props.coordinates, () => {
|
||||||
@ -254,7 +282,7 @@ watch(() => props.coordinates, () => {
|
|||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped>
|
||||||
.map-container {
|
.map-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: #f0f8ff;
|
background-color: #f0f8ff;
|
||||||
|
File diff suppressed because one or more lines are too long
@ -868,6 +868,21 @@ function readyto(ready: any, type: any) {
|
|||||||
}, 5000)
|
}, 5000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 格式化文件大小(传入单位是 KB)
|
||||||
|
* @param size 千字节数 (KB)
|
||||||
|
* @returns 格式化后的文件大小字符串
|
||||||
|
*/
|
||||||
|
const formatFileSize = (size: number): string => {
|
||||||
|
if(!size) return '--'
|
||||||
|
if (size < 1024) return `${size.toFixed(1)} KB`;
|
||||||
|
|
||||||
|
const mb = size / 1024;
|
||||||
|
if (mb < 1024) return `${mb.toFixed(1)} MB`;
|
||||||
|
|
||||||
|
const gb = mb / 1024;
|
||||||
|
return `${gb.toFixed(1)} GB`;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -945,7 +960,9 @@ function readyto(ready: any, type: any) {
|
|||||||
<el-table-column type="selection" width="40" />
|
<el-table-column type="selection" width="40" />
|
||||||
<!-- <el-table-column type="index" label="序号" width="70" align="center"></el-table-column> -->
|
<!-- <el-table-column type="index" label="序号" width="70" align="center"></el-table-column> -->
|
||||||
<el-table-column prop="fileName" label="文件名称">
|
<el-table-column prop="fileName" label="文件名称">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="fileSize" label="文件大小" width="90" align="center">
|
||||||
|
<template #default="{ row }">{{formatFileSize(Number(row.fileSize))}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="keywords" label="关键字"></el-table-column>
|
<el-table-column prop="keywords" label="关键字"></el-table-column>
|
||||||
<el-table-column prop="description" label="文件描述"></el-table-column>
|
<el-table-column prop="description" label="文件描述"></el-table-column>
|
||||||
|
@ -53,7 +53,7 @@ function addproject() {
|
|||||||
title.value = "新增储存源"
|
title.value = "新增储存源"
|
||||||
projectForme.value = {
|
projectForme.value = {
|
||||||
name: "",//存储源名称
|
name: "",//存储源名称
|
||||||
key: "",//存储源别名
|
key: "",//存储源id
|
||||||
remark: "",//备注
|
remark: "",//备注
|
||||||
type: "",//存储源策略
|
type: "",//存储源策略
|
||||||
filePath: "",//文件路径
|
filePath: "",//文件路径
|
||||||
@ -157,7 +157,7 @@ function handleClose(formEl: any) {
|
|||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const projectForme: any = ref({
|
const projectForme: any = ref({
|
||||||
name: "",//存储源名称
|
name: "",//存储源名称
|
||||||
key: "",//存储源别名
|
key: "",//存储源id
|
||||||
remark: "",//备注
|
remark: "",//备注
|
||||||
type: "",//存储源策略
|
type: "",//存储源策略
|
||||||
filePath: "",//文件路径
|
filePath: "",//文件路径
|
||||||
@ -173,7 +173,7 @@ async function submitForm(formEl: any) {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
let params: any = {
|
let params: any = {
|
||||||
name: projectForme.value.name,//存储源名称
|
name: projectForme.value.name,//存储源名称
|
||||||
key: projectForme.value.key,//存储源别名
|
key: projectForme.value.key,//存储源id
|
||||||
remark: projectForme.value.remark,//备注
|
remark: projectForme.value.remark,//备注
|
||||||
type: projectForme.value.type,//存储源策略
|
type: projectForme.value.type,//存储源策略
|
||||||
storageSourceAllParam: {
|
storageSourceAllParam: {
|
||||||
@ -200,7 +200,20 @@ async function submitForm(formEl: any) {
|
|||||||
//用户弹窗规则定义
|
//用户弹窗规则定义
|
||||||
const moderules = ref({
|
const moderules = ref({
|
||||||
name: [{ required: true, message: "请输入存储源名称", trigger: "blur" }],
|
name: [{ required: true, message: "请输入存储源名称", trigger: "blur" }],
|
||||||
key: [{ required: true, message: "请输入存储源别名", trigger: "blur" }],
|
key: [
|
||||||
|
{ required: true, message: "请输入存储源id", trigger: "blur" },
|
||||||
|
{
|
||||||
|
validator: (rule: any, value: string, callback: any) => {
|
||||||
|
const chinesePattern = /[\u4e00-\u9fa5]/;
|
||||||
|
if (chinesePattern.test(value)) {
|
||||||
|
callback(new Error('存储源id必须为英文名称'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
remark: [{ required: true, message: "请输入存储源备注", trigger: "blur" }],
|
remark: [{ required: true, message: "请输入存储源备注", trigger: "blur" }],
|
||||||
type: [{ required: true, message: "请输入存储源策略", trigger: "change" }],
|
type: [{ required: true, message: "请输入存储源策略", trigger: "change" }],
|
||||||
filePath: [{ required: true, message: "请输入文件路径", trigger: "blur" }],
|
filePath: [{ required: true, message: "请输入文件路径", trigger: "blur" }],
|
||||||
@ -240,15 +253,15 @@ function comparePercentage(percentStr: any) {
|
|||||||
return percentStr.spaceOccupancyRatio;
|
return percentStr.spaceOccupancyRatio;
|
||||||
}
|
}
|
||||||
const arr = percentStr.spaceOccupancyRatio.split(";").map(item => parseFloat(item.replace("%", "")));
|
const arr = percentStr.spaceOccupancyRatio.split(";").map(item => parseFloat(item.replace("%", "")));
|
||||||
if(arr.length > 0){
|
if (arr.length > 0) {
|
||||||
arr.forEach(item => {
|
arr.forEach(item => {
|
||||||
if ((item < 20 && item > 10)|| item == 20) {
|
if ((item < 20 && item > 10) || item == 20) {
|
||||||
percentStr.resar = '#c5c528'
|
percentStr.resar = '#c5c528'
|
||||||
}
|
}
|
||||||
if (item < 10|| item == 10) {
|
if (item < 10 || item == 10) {
|
||||||
percentStr.resar = 'red'
|
percentStr.resar = 'red'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// const percent = parseFloat(percentStr.spaceOccupancyRatio.replace('%', ''));
|
// const percent = parseFloat(percentStr.spaceOccupancyRatio.replace('%', ''));
|
||||||
|
|
||||||
@ -287,32 +300,32 @@ function comparePercentage(percentStr: any) {
|
|||||||
<!-- <el-table-column type="index" label="序号" width="70" align="center"></el-table-column> -->
|
<!-- <el-table-column type="index" label="序号" width="70" align="center"></el-table-column> -->
|
||||||
<el-table-column prop="name" label="存储空间名称" width="200">
|
<el-table-column prop="name" label="存储空间名称" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span :style="{ color: scope.row.resar, 'font-size': scope.row.resar !='' ? '16px' : '' }">{{
|
<span :style="{ color: scope.row.resar, 'font-size': scope.row.resar != '' ? '16px' : '' }">{{
|
||||||
scope.row.name }}</span>
|
scope.row.name }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="key" label="存储源别名" width="100">
|
<el-table-column prop="key" label="存储源id" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span :style="{ color: scope.row.resar, 'font-size': scope.row.resar !='' ? '16px' : '' }">{{
|
<span :style="{ color: scope.row.resar, 'font-size': scope.row.resar != '' ? '16px' : '' }">{{
|
||||||
scope.row.key }}</span>
|
scope.row.key }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="type" label="存储策略" width="100">
|
<el-table-column prop="type" label="存储策略" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span :style="{ color: scope.row.resar, 'font-size': scope.row.resar !='' ? '16px' : '' }">{{
|
<span :style="{ color: scope.row.resar, 'font-size': scope.row.resar != '' ? '16px' : '' }">{{
|
||||||
typeName(dictType, scope.row.type) }}</span>
|
typeName(dictType, scope.row.type) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="valueData" label="存储路径" width="200">
|
<el-table-column prop="valueData" label="存储路径" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span :style="{ color: scope.row.resar, 'font-size': scope.row.resar !='' ? '16px' : '' }">{{
|
<span :style="{ color: scope.row.resar, 'font-size': scope.row.resar != '' ? '16px' : '' }">{{
|
||||||
scope.row.valueData }}</span>
|
scope.row.valueData }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="storeContent" label="存放项目/任务">
|
<el-table-column prop="storeContent" label="存放项目/任务">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div class="ellipsis">
|
<div class="ellipsis">
|
||||||
<span :style="{ color: scope.row.resar, 'font-size': scope.row.resar !='' ? '16px' : '' }"
|
<span :style="{ color: scope.row.resar, 'font-size': scope.row.resar != '' ? '16px' : '' }"
|
||||||
class="single-line-ellipsis">{{ scope.row.storeContent }}</span>
|
class="single-line-ellipsis">{{ scope.row.storeContent }}</span>
|
||||||
<img src="@/assets/MenuIcon/xqing.png" alt="" title="详情" @click="Loglist(scope.row)"
|
<img src="@/assets/MenuIcon/xqing.png" alt="" title="详情" @click="Loglist(scope.row)"
|
||||||
style="cursor: pointer;">
|
style="cursor: pointer;">
|
||||||
@ -321,10 +334,15 @@ function comparePercentage(percentStr: any) {
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="spaceOccupancyRatio" label="剩余空间占比" width="140">
|
<el-table-column prop="spaceOccupancyRatio" label="剩余空间占比" width="140">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span :style="{ color: scope.row.resar, 'font-size': scope.row.resar !='' ? '16px' : '' }">{{
|
<span :style="{ color: scope.row.resar, 'font-size': scope.row.resar != '' ? '16px' : '' }">{{
|
||||||
comparePercentage(scope.row) }}</span>
|
comparePercentage(scope.row) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="spaceOccupancyRatio" label="剩余空间大小" width="110">
|
||||||
|
<template #default="scope">
|
||||||
|
<span :style="{ color: scope.row.resar, 'font-size': scope.row.resar != '' ? '16px' : '' }">{{ scope.row.remainingSpaceSize }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column fixed="right" label="操作" width="80" align="center">
|
<el-table-column fixed="right" label="操作" width="80" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span
|
<span
|
||||||
@ -345,12 +363,12 @@ function comparePercentage(percentStr: any) {
|
|||||||
:close-on-click-modal="false" destroy-on-close>
|
:close-on-click-modal="false" destroy-on-close>
|
||||||
<el-form ref="ruleFormRef" :model="projectForme" :rules="moderules" label-width="auto" class="demo-ruleForm"
|
<el-form ref="ruleFormRef" :model="projectForme" :rules="moderules" label-width="auto" class="demo-ruleForm"
|
||||||
status-icon>
|
status-icon>
|
||||||
|
<el-form-item label=" 存储源id" prop="key">
|
||||||
|
<el-input v-model="projectForme.key" :disabled="storeContent != ''" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label=" 存储源名称" prop="name">
|
<el-form-item label=" 存储源名称" prop="name">
|
||||||
<el-input v-model="projectForme.name" :disabled="storeContent != ''" />
|
<el-input v-model="projectForme.name" :disabled="storeContent != ''" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label=" 存储源别名" prop="key">
|
|
||||||
<el-input v-model="projectForme.key" :disabled="storeContent != ''" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label=" 存储源备注">
|
<el-form-item label=" 存储源备注">
|
||||||
<el-input v-model="projectForme.remark" :disabled="storeContent != ''" />
|
<el-input v-model="projectForme.remark" :disabled="storeContent != ''" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -360,7 +378,8 @@ function comparePercentage(percentStr: any) {
|
|||||||
:value="item.itemcode" />
|
:value="item.itemcode" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="projectForme.type" :label="projectForme.type == 'minio'?'宿主机挂载绝对路径':'存储空间绝对路径'" prop="filePath">
|
<el-form-item v-if="projectForme.type" :label="projectForme.type == 'minio' ? '宿主机挂载绝对路径' : '存储空间绝对路径'"
|
||||||
|
prop="filePath">
|
||||||
<el-input v-model="projectForme.filePath" :disabled="storeContent != ''" />
|
<el-input v-model="projectForme.filePath" :disabled="storeContent != ''" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label=" AccessKey" prop="accessKey" v-if="projectForme.type == 'minio'">
|
<el-form-item label=" AccessKey" prop="accessKey" v-if="projectForme.type == 'minio'">
|
||||||
|
91
web/src/views/testdata/datamanagement/index.vue
vendored
91
web/src/views/testdata/datamanagement/index.vue
vendored
@ -13,7 +13,7 @@ import { ElMessageBox, ElMessage, ElMain } from "element-plus";
|
|||||||
import Page from '@/components/Pagination/page.vue';
|
import Page from '@/components/Pagination/page.vue';
|
||||||
import AudioPlayer from '@/components/file/preview/AudioPlayer.vue';
|
import AudioPlayer from '@/components/file/preview/AudioPlayer.vue';
|
||||||
import { batchDeleteReq } from "@/api/file-operator";
|
import { batchDeleteReq } from "@/api/file-operator";
|
||||||
import { tstaskList, obtaintestData, getTsNodesTree, confirmDeleteNodes, addTsNodes, selectTsNodesByTskeId, updateTsNodes, deleteTsNodesById, tsFilesPage, addTsFiles, testDataScanById, updateTsFiles, deleteTsFilesById, listTsFiles, deleteTsFilesByIds, compress, Decompression, compare, downloadToLocal, uploadToBackup, addTsFile, list, moveFileFolder, copyFileFolder, startSimpleNavi, stopSimpleNavi } from "@/api/datamanagement";
|
import { tstaskList, obtaintestData, decompressionFolderData, getTsNodesTree, confirmDeleteNodes, addTsNodes, selectTsNodesByTskeId, updateTsNodes, deleteTsNodesById, tsFilesPage, addTsFiles, testDataScanById, updateTsFiles, deleteTsFilesById, listTsFiles, deleteTsFilesByIds, compress, Decompression, compare, downloadToLocal, uploadToBackup, addTsFile, list, moveFileFolder, copyFileFolder, startSimpleNavi, stopSimpleNavi } from "@/api/datamanagement";
|
||||||
import ZUpload from '@/components/file/ZUpload.vue'
|
import ZUpload from '@/components/file/ZUpload.vue'
|
||||||
import useFileUpload from "@/components/file/file/useFileUpload";
|
import useFileUpload from "@/components/file/file/useFileUpload";
|
||||||
import useHeaderStorageList from "@/components/header/useHeaderStorageList";
|
import useHeaderStorageList from "@/components/header/useHeaderStorageList";
|
||||||
@ -57,6 +57,10 @@ onBeforeUnmount(() => {
|
|||||||
if (ws1 != null) {
|
if (ws1 != null) {
|
||||||
ws1.close()
|
ws1.close()
|
||||||
}
|
}
|
||||||
|
if (ws2 != null) {
|
||||||
|
ws2.close()
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
//拖动条
|
//拖动条
|
||||||
const vMove = {
|
const vMove = {
|
||||||
@ -93,13 +97,34 @@ function setupWebSocket() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
let ws2
|
||||||
|
function setupWebSocket2() {
|
||||||
|
ws2.onopen = () => {
|
||||||
|
console.log('websocket连接成功1111')
|
||||||
|
};
|
||||||
|
ws2.onerror = (error) => {
|
||||||
|
};
|
||||||
|
ws2.onmessage = (e) => {
|
||||||
|
console.log('websocket接收到消息', e)
|
||||||
|
// tonstatus(true)
|
||||||
|
readyto2(e.data)
|
||||||
|
}
|
||||||
|
ws2.onclose = () => {
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
watch(() => projectId.value, (newVal) => {
|
watch(() => projectId.value, (newVal) => {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
if (ws1 != null) {
|
if (ws1 != null) {
|
||||||
ws1.close()
|
ws1.close()
|
||||||
}
|
}
|
||||||
|
if (ws2 != null) {
|
||||||
|
ws2.close()
|
||||||
|
}
|
||||||
ws1 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + 'taskId_' + projectId.value)
|
ws1 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + 'taskId_' + projectId.value)
|
||||||
setupWebSocket()
|
setupWebSocket()
|
||||||
|
ws2 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + 'id_extract_' + projectId.value)
|
||||||
|
setupWebSocket2()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//左侧树的选择框
|
//左侧树的选择框
|
||||||
@ -115,6 +140,8 @@ function getProject() {
|
|||||||
// taskName.value = projectArr.value[0].taskName
|
// taskName.value = projectArr.value[0].taskName
|
||||||
ws1 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + 'taskId_' + projectId.value)
|
ws1 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + 'taskId_' + projectId.value)
|
||||||
setupWebSocket()
|
setupWebSocket()
|
||||||
|
ws2 = new WebSocket(userStore.WebSocketUrl + '/websocket/' + "id_extract_" + projectId.value)
|
||||||
|
setupWebSocket2()
|
||||||
gettreedata()
|
gettreedata()
|
||||||
tonstatus(false)
|
tonstatus(false)
|
||||||
})
|
})
|
||||||
@ -143,6 +170,12 @@ function tonstatus(ready: any) {
|
|||||||
gettreedata()
|
gettreedata()
|
||||||
|
|
||||||
})
|
})
|
||||||
|
//解压
|
||||||
|
decompressionFolderData({ taskId: projectId.value }).then((res: any) => {
|
||||||
|
if (res.data != '没有解压任务!') {
|
||||||
|
readyto2(res.data)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
function readyto(ready: any) {
|
function readyto(ready: any) {
|
||||||
if (ready) {
|
if (ready) {
|
||||||
@ -160,6 +193,29 @@ function readyto(ready: any) {
|
|||||||
}, 5000)
|
}, 5000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function readyto2(msg: any) {
|
||||||
|
let gai = ref(false)
|
||||||
|
ElMessageBox.confirm(
|
||||||
|
msg,
|
||||||
|
'提示',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
).then(() => {
|
||||||
|
gai.value = true
|
||||||
|
getdata()
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
ElMessageBox.close()
|
||||||
|
if(!gai.value){
|
||||||
|
getdata()
|
||||||
|
}
|
||||||
|
|
||||||
|
}, 5000)
|
||||||
|
}
|
||||||
|
|
||||||
//左侧树配置
|
//左侧树配置
|
||||||
const treedata = ref([])
|
const treedata = ref([])
|
||||||
const treeloading = ref(false)
|
const treeloading = ref(false)
|
||||||
@ -213,7 +269,7 @@ function handleNodeClick(data: any, node: any) {
|
|||||||
if (nodename.value == '根节点') {
|
if (nodename.value == '根节点') {
|
||||||
filepath.value = data.path
|
filepath.value = data.path
|
||||||
} else {
|
} else {
|
||||||
filepath.value =data.path + nodename.value + '/'
|
filepath.value = data.path + nodename.value + '/'
|
||||||
}
|
}
|
||||||
creatform.value.workPath = ''
|
creatform.value.workPath = ''
|
||||||
}
|
}
|
||||||
@ -1316,7 +1372,7 @@ async function submitzip(formEl: any) {
|
|||||||
if (!formEl) return
|
if (!formEl) return
|
||||||
await formEl.validate((valid: any, fields: any) => {
|
await formEl.validate((valid: any, fields: any) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
loading.value = true
|
// loading.value = true
|
||||||
zipfiles.value = false
|
zipfiles.value = false
|
||||||
if (zipzheng.value == true) {
|
if (zipzheng.value == true) {
|
||||||
let idsarr = []
|
let idsarr = []
|
||||||
@ -1344,8 +1400,8 @@ async function submitzip(formEl: any) {
|
|||||||
|
|
||||||
Decompression({ id: jiezip.value.id, parentId: zipParentid.value, decompressionPath: zipObj.value.compressedPath, path: filepath.value, taskId: projectId.value }).then((res: any) => {
|
Decompression({ id: jiezip.value.id, parentId: zipParentid.value, decompressionPath: zipObj.value.compressedPath, path: filepath.value, taskId: projectId.value }).then((res: any) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
ElMessage.success('解压成功')
|
// ElMessage.success('解压成功')
|
||||||
getdata()
|
|
||||||
zipfiles.value = false
|
zipfiles.value = false
|
||||||
tableIdarr.value.length = 0
|
tableIdarr.value.length = 0
|
||||||
filetableRef.value!.clearSelection()
|
filetableRef.value!.clearSelection()
|
||||||
@ -1658,6 +1714,21 @@ function texexceltClose() {
|
|||||||
function repstring(row: any) {
|
function repstring(row: any) {
|
||||||
return JSON.parse(JSON.stringify(row)).replace(filepath.value, "");
|
return JSON.parse(JSON.stringify(row)).replace(filepath.value, "");
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 格式化文件大小(传入单位是 KB)
|
||||||
|
* @param size 千字节数 (KB)
|
||||||
|
* @returns 格式化后的文件大小字符串
|
||||||
|
*/
|
||||||
|
const formatFileSize = (size: number): string => {
|
||||||
|
if(!size) return '--'
|
||||||
|
if (size < 1024) return `${size.toFixed(1)} KB`;
|
||||||
|
|
||||||
|
const mb = size / 1024;
|
||||||
|
if (mb < 1024) return `${mb.toFixed(1)} MB`;
|
||||||
|
|
||||||
|
const gb = mb / 1024;
|
||||||
|
return `${gb.toFixed(1)} GB`;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -1689,7 +1760,7 @@ function repstring(row: any) {
|
|||||||
<img src="@/assets/project/xiu.png" alt="" title="编辑" @click="editSubItem(data)">
|
<img src="@/assets/project/xiu.png" alt="" title="编辑" @click="editSubItem(data)">
|
||||||
<img src="@/assets/project/del.png" alt="" title="删除" @click="delSubItem(data)">
|
<img src="@/assets/project/del.png" alt="" title="删除" @click="delSubItem(data)">
|
||||||
<!-- <img src="@/assets/images/chayi.png" alt="" title="差异性对比" @click="opendifference(data)"> -->
|
<!-- <img src="@/assets/images/chayi.png" alt="" title="差异性对比" @click="opendifference(data)"> -->
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@ -1722,8 +1793,7 @@ function repstring(row: any) {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<!-- :disabled="pathid.value" -->
|
<!-- :disabled="pathid.value" -->
|
||||||
<el-button type="primary" :disabled="loading"
|
<el-button type="primary" :disabled="loading" @click="creatFile">创建文件/文件夹</el-button>
|
||||||
@click="creatFile">创建文件/文件夹</el-button>
|
|
||||||
<el-button type="primary" :disabled="loading" @click="openFile">上传</el-button>
|
<el-button type="primary" :disabled="loading" @click="openFile">上传</el-button>
|
||||||
<el-button type="primary" @click="delprojectArr()" :disabled="tableIdarr.length == 0">删除</el-button>
|
<el-button type="primary" @click="delprojectArr()" :disabled="tableIdarr.length == 0">删除</el-button>
|
||||||
<el-button type="primary" @click="xiafilemony()" :disabled="tableIdarr.length == 0">下载</el-button>
|
<el-button type="primary" @click="xiafilemony()" :disabled="tableIdarr.length == 0">下载</el-button>
|
||||||
@ -1747,6 +1817,9 @@ function repstring(row: any) {
|
|||||||
<div v-else-if="scope.row.isFile == 'FILE'">{{ scope.row.fileName }} </div>
|
<div v-else-if="scope.row.isFile == 'FILE'">{{ scope.row.fileName }} </div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="fileSize" label="文件大小" width="90" align="center">
|
||||||
|
<template #default="{ row }">{{ formatFileSize(Number(row.fileSize)) }}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="keywords" label="关键字"></el-table-column>
|
<el-table-column prop="keywords" label="关键字"></el-table-column>
|
||||||
<!-- <el-table-column prop="workPath" label="路径">
|
<!-- <el-table-column prop="workPath" label="路径">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -1916,7 +1989,7 @@ function repstring(row: any) {
|
|||||||
</el-input>
|
</el-input>
|
||||||
<el-input v-else v-model="zipObj.compressedName" disabled maxlength="40" show-word-limit></el-input>
|
<el-input v-else v-model="zipObj.compressedName" disabled maxlength="40" show-word-limit></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="压缩路径:" prop="compressedPath">
|
<el-form-item :label="title + '路径:'" prop="compressedPath">
|
||||||
<el-input v-model="zipObj.compressedPath" maxlength="600" show-word-limit>
|
<el-input v-model="zipObj.compressedPath" maxlength="600" show-word-limit>
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<el-popover :visible="visible" placement="right" :width="400" trigger="click">
|
<el-popover :visible="visible" placement="right" :width="400" trigger="click">
|
||||||
|
@ -245,7 +245,7 @@ function diffSure(row: any) {
|
|||||||
params.id = ids.join(',')
|
params.id = ids.join(',')
|
||||||
} else {
|
} else {
|
||||||
params.nodeId = pathid.value
|
params.nodeId = pathid.value
|
||||||
|
|
||||||
}
|
}
|
||||||
params.size = sureSize.value
|
params.size = sureSize.value
|
||||||
params.current = sureCurrent.value
|
params.current = sureCurrent.value
|
||||||
@ -273,7 +273,7 @@ function diffChange(row: any) {
|
|||||||
params.id = ids.join(',')
|
params.id = ids.join(',')
|
||||||
} else {
|
} else {
|
||||||
params.nodeId = pathid.value
|
params.nodeId = pathid.value
|
||||||
|
|
||||||
}
|
}
|
||||||
params.size = ChangeSize.value
|
params.size = ChangeSize.value
|
||||||
params.current = ChangeCurrent.value
|
params.current = ChangeCurrent.value
|
||||||
@ -302,7 +302,7 @@ function diffMiss(row: any) {
|
|||||||
params.id = ids.join(',')
|
params.id = ids.join(',')
|
||||||
} else {
|
} else {
|
||||||
params.nodeId = pathid.value
|
params.nodeId = pathid.value
|
||||||
|
|
||||||
}
|
}
|
||||||
params.size = MisseSize.value
|
params.size = MisseSize.value
|
||||||
params.current = MissCurrent.value
|
params.current = MissCurrent.value
|
||||||
@ -646,7 +646,7 @@ const handleMenuClick = (action: string, type: any) => {
|
|||||||
size: currentNode.value.fileSize,
|
size: currentNode.value.fileSize,
|
||||||
type: currentNode.value.isFile
|
type: currentNode.value.isFile
|
||||||
}]
|
}]
|
||||||
downloadToLocal({ parameterLists: params,taskId:projectId.value }).then((res: any) => {
|
downloadToLocal({ parameterLists: params, taskId: projectId.value }).then((res: any) => {
|
||||||
if (res.code == '0') {
|
if (res.code == '0') {
|
||||||
ElMessage.success("恢复成功")
|
ElMessage.success("恢复成功")
|
||||||
minioOnlyFiles.value = minioOnlyFiles.value.filter((item: any) => item.id !== currentNode.value.id)
|
minioOnlyFiles.value = minioOnlyFiles.value.filter((item: any) => item.id !== currentNode.value.id)
|
||||||
@ -675,7 +675,7 @@ const handleMenuClick = (action: string, type: any) => {
|
|||||||
size: currentNode.value.fileSize,
|
size: currentNode.value.fileSize,
|
||||||
type: currentNode.value.isFile
|
type: currentNode.value.isFile
|
||||||
}]
|
}]
|
||||||
uploadToBackup({ parameterLists: params,taskId:projectId.value }).then((res: any) => {
|
uploadToBackup({ parameterLists: params, taskId: projectId.value }).then((res: any) => {
|
||||||
if (res.code == '0') {
|
if (res.code == '0') {
|
||||||
ElMessage.success("上传成功")
|
ElMessage.success("上传成功")
|
||||||
localOnlyFiles.value = localOnlyFiles.value.filter((item: any) => item.id !== currentNode.value.id)
|
localOnlyFiles.value = localOnlyFiles.value.filter((item: any) => item.id !== currentNode.value.id)
|
||||||
@ -689,7 +689,7 @@ const handleMenuClick = (action: string, type: any) => {
|
|||||||
break
|
break
|
||||||
case 'delete':
|
case 'delete':
|
||||||
// 处理删除逻辑
|
// 处理删除逻辑
|
||||||
deleteTsFilesById({ id: currentNode.value.id, type: type,taskId:projectId.value }).then((res: any) => {
|
deleteTsFilesById({ id: currentNode.value.id, type: type, taskId: projectId.value }).then((res: any) => {
|
||||||
if (res.code == '0') {
|
if (res.code == '0') {
|
||||||
ElMessage.success("删除成功")
|
ElMessage.success("删除成功")
|
||||||
getlocaltree()
|
getlocaltree()
|
||||||
@ -729,7 +729,7 @@ function tableBeifen(row: any) {
|
|||||||
}]
|
}]
|
||||||
loading1.value = true
|
loading1.value = true
|
||||||
loading2.value = true
|
loading2.value = true
|
||||||
uploadToBackup({ parameterLists: params,taskId:projectId.value }).then((res: any) => {
|
uploadToBackup({ parameterLists: params, taskId: projectId.value }).then((res: any) => {
|
||||||
if (res.code == '0') {
|
if (res.code == '0') {
|
||||||
ElMessage.success("上传成功")
|
ElMessage.success("上传成功")
|
||||||
diffSure(false)
|
diffSure(false)
|
||||||
@ -761,7 +761,7 @@ function moretableBeifen() {
|
|||||||
})
|
})
|
||||||
loading1.value = true
|
loading1.value = true
|
||||||
loading2.value = true
|
loading2.value = true
|
||||||
uploadToBackup({ parameterLists: beifenArr3,taskId:projectId.value }).then((res: any) => {
|
uploadToBackup({ parameterLists: beifenArr3, taskId: projectId.value }).then((res: any) => {
|
||||||
if (res.code == '0') {
|
if (res.code == '0') {
|
||||||
diffSure(false)
|
diffSure(false)
|
||||||
diffChange(false)
|
diffChange(false)
|
||||||
@ -792,7 +792,7 @@ function tablerestore(row: any) {
|
|||||||
}]
|
}]
|
||||||
loading3.value = true
|
loading3.value = true
|
||||||
loading2.value = true
|
loading2.value = true
|
||||||
downloadToLocal({ parameterLists: params,taskId:projectId.value }).then((res: any) => {
|
downloadToLocal({ parameterLists: params, taskId: projectId.value }).then((res: any) => {
|
||||||
if (res.code == '0') {
|
if (res.code == '0') {
|
||||||
ElMessage.success("恢复成功")
|
ElMessage.success("恢复成功")
|
||||||
diffChange(false)
|
diffChange(false)
|
||||||
@ -824,7 +824,7 @@ function moretablerestore() {
|
|||||||
})
|
})
|
||||||
loading2.value = true
|
loading2.value = true
|
||||||
loading3.value = true
|
loading3.value = true
|
||||||
downloadToLocal({ parameterLists: restoreArr3,taskId:projectId.value }).then((res: any) => {
|
downloadToLocal({ parameterLists: restoreArr3, taskId: projectId.value }).then((res: any) => {
|
||||||
if (res.code == '0') {
|
if (res.code == '0') {
|
||||||
ElMessage.success("恢复成功")
|
ElMessage.success("恢复成功")
|
||||||
diffChange(false)
|
diffChange(false)
|
||||||
@ -850,7 +850,7 @@ function delhuifu() {
|
|||||||
ids.value.push(item.id)
|
ids.value.push(item.id)
|
||||||
})
|
})
|
||||||
loading3.value = true
|
loading3.value = true
|
||||||
deleteTsFilesByIds({ ids: ids.value.join(','), type: 'minio',taskId:projectId.value }).then((res: any) => {
|
deleteTsFilesByIds({ ids: ids.value.join(','), type: 'minio', taskId: projectId.value }).then((res: any) => {
|
||||||
if (res.code == '0') {
|
if (res.code == '0') {
|
||||||
ElMessage.success("删除成功")
|
ElMessage.success("删除成功")
|
||||||
diffMiss(false)
|
diffMiss(false)
|
||||||
@ -889,7 +889,7 @@ function bfclick(type: any) {
|
|||||||
beifenArr2.forEach((items: any) => {
|
beifenArr2.forEach((items: any) => {
|
||||||
beifenArr3.push({ path: items.workPath, name: items.fileName, size: items.fileSize, type: items.isFile })
|
beifenArr3.push({ path: items.workPath, name: items.fileName, size: items.fileSize, type: items.isFile })
|
||||||
})
|
})
|
||||||
uploadToBackup({ parameterLists: beifenArr3,taskId:projectId.value }).then((res: any) => {
|
uploadToBackup({ parameterLists: beifenArr3, taskId: projectId.value }).then((res: any) => {
|
||||||
if (res.code == '0') {
|
if (res.code == '0') {
|
||||||
ElMessage.success("上传成功")
|
ElMessage.success("上传成功")
|
||||||
diffChange(false)
|
diffChange(false)
|
||||||
@ -901,7 +901,7 @@ function bfclick(type: any) {
|
|||||||
restoreArr2.forEach((items: any) => {
|
restoreArr2.forEach((items: any) => {
|
||||||
restoreArr3.push({ path: items.backupPath, name: items.fileName, size: items.fileSize, type: items.isFile })
|
restoreArr3.push({ path: items.backupPath, name: items.fileName, size: items.fileSize, type: items.isFile })
|
||||||
})
|
})
|
||||||
downloadToLocal({ parameterLists: restoreArr3,taskId:projectId.value }).then((res: any) => {
|
downloadToLocal({ parameterLists: restoreArr3, taskId: projectId.value }).then((res: any) => {
|
||||||
if (res.code == '0') {
|
if (res.code == '0') {
|
||||||
ElMessage.success("恢复成功")
|
ElMessage.success("恢复成功")
|
||||||
diffChange(false)
|
diffChange(false)
|
||||||
@ -987,7 +987,7 @@ function openPreview(row: any, type: any) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function geturl(row: any, type1: any, pan: any) {
|
function geturl(row: any, type1: any, pan: any) {
|
||||||
obtainUrl({ id: row.id, type: type1,taskId:projectId.value }).then((res: any) => {
|
obtainUrl({ id: row.id, type: type1, taskId: projectId.value }).then((res: any) => {
|
||||||
if (pan) {
|
if (pan) {
|
||||||
ViewfileUrl.value = res.data.url
|
ViewfileUrl.value = res.data.url
|
||||||
isViewfile.value = true
|
isViewfile.value = true
|
||||||
@ -1075,6 +1075,22 @@ function CloseView() {
|
|||||||
}
|
}
|
||||||
//tabbas
|
//tabbas
|
||||||
const tabs = ref(1)
|
const tabs = ref(1)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 格式化文件大小(传入单位是 KB)
|
||||||
|
* @param size 千字节数 (KB)
|
||||||
|
* @returns 格式化后的文件大小字符串
|
||||||
|
*/
|
||||||
|
const formatFileSize = (size: number): string => {
|
||||||
|
if (!size) return '--'
|
||||||
|
if (size < 1024) return `${size.toFixed(1)} KB`;
|
||||||
|
|
||||||
|
const mb = size / 1024;
|
||||||
|
if (mb < 1024) return `${mb.toFixed(1)} MB`;
|
||||||
|
|
||||||
|
const gb = mb / 1024;
|
||||||
|
return `${gb.toFixed(1)} GB`;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -1107,20 +1123,20 @@ const tabs = ref(1)
|
|||||||
<div class="legend">
|
<div class="legend">
|
||||||
<div class="legend_box">
|
<div class="legend_box">
|
||||||
<div class="legend_color1"></div>
|
<div class="legend_color1"></div>
|
||||||
<div class="legend_text">工作空间新增文件</div>
|
<div class="legend_text">工作空间新增文件({{ localOnlyFiles.length }})</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="legend_box">
|
<div class="legend_box">
|
||||||
<div class="legend_color2"></div>
|
<div class="legend_color2"></div>
|
||||||
<div class="legend_text">工作空间已删除文件</div>
|
<div class="legend_text">工作空间已删除文件({{ minioOnlyFiles.length }})</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="legend_box">
|
<div class="legend_box">
|
||||||
<div class="legend_color3"></div>
|
<div class="legend_color3"></div>
|
||||||
<div class="legend_text">工作空间内容变动文件</div>
|
<div class="legend_text">工作空间内容变动文件({{ md5MismatchedFiles.length }})</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tree_button">
|
<div class="tree_button">
|
||||||
<el-button type="primary" :loading="tonloading" :disabled="!pathid"
|
<el-button type="primary" :loading="tonloading" :disabled="!pathid" @click="backups()">{{ buttonmsg
|
||||||
@click="backups()">{{ buttonmsg }}</el-button>
|
}}</el-button>
|
||||||
<el-button type="primary" :disabled="!pathid" @click="diffFile2()">差异检测</el-button>
|
<el-button type="primary" :disabled="!pathid" @click="diffFile2()">差异检测</el-button>
|
||||||
<el-button type="primary" :disabled="!pathid" @click="diffFile()">差异批量处理</el-button>
|
<el-button type="primary" :disabled="!pathid" @click="diffFile()">差异批量处理</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -1140,7 +1156,7 @@ const tabs = ref(1)
|
|||||||
:class="data.station == '0' ? 'custom-tree-node' : (data.station == '1' ? 'custom-tree-node1' : (data.station == '2' ? 'custom-tree-node2' : 'custom-tree-node3'))">
|
:class="data.station == '0' ? 'custom-tree-node' : (data.station == '1' ? 'custom-tree-node1' : (data.station == '2' ? 'custom-tree-node2' : 'custom-tree-node3'))">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{ data.fileName }}({{ data.isFile == 'FOLDER' ? data.children.length :
|
{{ data.fileName }}({{ data.isFile == 'FOLDER' ? data.children.length :
|
||||||
data.fileSize + 'KB' }})
|
formatFileSize(Number(data.fileSize)) }})
|
||||||
<!-- <span v-if="data.station != '0'">({{ data.station == '1' ? '新增' :
|
<!-- <span v-if="data.station != '0'">({{ data.station == '1' ? '新增' :
|
||||||
(data.station
|
(data.station
|
||||||
== '2' ? '已变更' : '已删除') }})</span> -->
|
== '2' ? '已变更' : '已删除') }})</span> -->
|
||||||
@ -1175,7 +1191,7 @@ const tabs = ref(1)
|
|||||||
<!-- data.children.length -->
|
<!-- data.children.length -->
|
||||||
<span class="text">{{ data.fileName }}({{ data.isFile == 'FOLDER' ?
|
<span class="text">{{ data.fileName }}({{ data.isFile == 'FOLDER' ?
|
||||||
data.children.length :
|
data.children.length :
|
||||||
data.fileSize + 'KB' }})</span>
|
formatFileSize(Number(data.fileSize)) }})</span>
|
||||||
<!-- <span v-if="data.station != '0'">({{ data.station == '1' ? '新增' :
|
<!-- <span v-if="data.station != '0'">({{ data.station == '1' ? '新增' :
|
||||||
(data.station
|
(data.station
|
||||||
== '2' ? '已变更' : '已删除') }})</span> -->
|
== '2' ? '已变更' : '已删除') }})</span> -->
|
||||||
@ -1211,7 +1227,7 @@ const tabs = ref(1)
|
|||||||
@click="moretableBeifen()">备份</el-button>
|
@click="moretableBeifen()">备份</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table v-loading="loading1" :data="localOnlyFiles" @selection-change="bifenChange"
|
<el-table v-loading="loading1" :data="localOnlyFiles" @selection-change="bifenChange"
|
||||||
:header-cell-style="{ background: 'rgb(250 250 250)', color: '#383838',height: '50px' }"
|
:header-cell-style="{ background: 'rgb(250 250 250)', color: '#383838', height: '50px' }"
|
||||||
style="width: 100%; height: calc(60vh);margin-bottom: 20px;" border>
|
style="width: 100%; height: calc(60vh);margin-bottom: 20px;" border>
|
||||||
<el-table-column type="selection" width="40" />
|
<el-table-column type="selection" width="40" />
|
||||||
|
|
||||||
@ -1629,7 +1645,7 @@ const tabs = ref(1)
|
|||||||
|
|
||||||
//
|
//
|
||||||
.legend {
|
.legend {
|
||||||
width: 40%;
|
width: 45%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
169
web/src/views/testdata/testtask/index.vue
vendored
169
web/src/views/testdata/testtask/index.vue
vendored
@ -8,9 +8,24 @@ export default {
|
|||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import Page from '@/components/Pagination/page.vue'
|
import Page from '@/components/Pagination/page.vue'
|
||||||
import { tstaskPage, addtsTask, updatetsTask, deleteTsTaskById, deleteTsTaskByIds, confirmDeleteTask,selectTsNodesById } from "@/api/testtask";
|
import { tstaskPage, addtsTask, updatetsTask, deleteTsTaskById, deleteTsTaskByIds, confirmDeleteTask, selectTsNodesById } from "@/api/testtask";
|
||||||
import { storagesBytype } from "@/api/storage";
|
import { storagesBytype } from "@/api/storage";
|
||||||
import { getDict } from '@/api/dict'
|
import { getDict } from '@/api/dict'
|
||||||
|
///////
|
||||||
|
let result2 = ref([])
|
||||||
|
let result1 = ref([
|
||||||
|
{ name: '任务编号', code: 'task_code' },
|
||||||
|
{ name: '任务名称', code: 'task_name' },
|
||||||
|
{ name: '任务地点', code: 'task_place' },
|
||||||
|
{ name: '任务人员', code: 'task_person' },
|
||||||
|
{ name: '载体名称', code: 'carrier_name' },
|
||||||
|
{ name: '设备编号', code: 'device_code' },
|
||||||
|
{ name: '任务类型', code: 'task_type' },
|
||||||
|
{ name: '试验描述', code: 'test_describe' },
|
||||||
|
{ name: '传感器描述', code: 'sensor_describe' },
|
||||||
|
{ name: '本地存储空间', code: 'local_storage_id' },
|
||||||
|
{ name: '备份存储空间', code: 'backup_storage_id' },
|
||||||
|
])
|
||||||
//定义表格数据
|
//定义表格数据
|
||||||
const tableData: any = ref([]);
|
const tableData: any = ref([]);
|
||||||
// 查询数据
|
// 查询数据
|
||||||
@ -18,11 +33,8 @@ const dataduan = ref([])
|
|||||||
const queryParams: any = ref({
|
const queryParams: any = ref({
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 20,
|
size: 20,
|
||||||
taskName: '',
|
keyword: '',
|
||||||
taskPlace: '',
|
fieldName: '',
|
||||||
taskPerson: '',
|
|
||||||
carrierType: '',
|
|
||||||
deviceCode: '',
|
|
||||||
startDate: '',
|
startDate: '',
|
||||||
endDate: ''
|
endDate: ''
|
||||||
});
|
});
|
||||||
@ -42,6 +54,7 @@ function zhuandata(dateString: any) {
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
//获取表格数据
|
//获取表格数据
|
||||||
function getdata() {
|
function getdata() {
|
||||||
|
|
||||||
loading.value = true
|
loading.value = true
|
||||||
if (dataduan.value && dataduan.value.length > 0) {
|
if (dataduan.value && dataduan.value.length > 0) {
|
||||||
const dataArr = []
|
const dataArr = []
|
||||||
@ -56,24 +69,27 @@ function getdata() {
|
|||||||
}
|
}
|
||||||
formitemarr.value.length = 0
|
formitemarr.value.length = 0
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
if (checkList1.value.length > 0) {
|
||||||
if (result2.value.length > 0) {
|
queryParams.value.fieldName = checkList1.value.join(',')
|
||||||
// 初始化attributeContent数组
|
} else if (checkList2.value.length == 0 && queryParams.value.keyword) {
|
||||||
queryParams.value.attributeContentJson = [];
|
let result1Name = []
|
||||||
console.log(result2.value)
|
result1.value.forEach((item: any) => {
|
||||||
result2.value.forEach((item: any) => {
|
result1Name.push(item.code)
|
||||||
// 修复动态属性名语法和属性访问方式
|
})
|
||||||
queryParams.value.attributeContentJson.push({
|
queryParams.value.fieldName = result1Name.join(',')
|
||||||
[item.code]: queryParams.value[item.code]?queryParams.value[item.code]:''
|
|
||||||
});
|
|
||||||
});
|
|
||||||
console.log( queryParams.value.attributeContentJson)
|
|
||||||
// debugger
|
|
||||||
if( queryParams.value.attributeContentJson.length > 0){
|
|
||||||
queryParams.value.attributeContentJson = encodeURIComponent(JSON.stringify(queryParams.value.attributeContentJson))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (checkList2.value.length > 0) {
|
||||||
|
queryParams.value.attributeContentJson = checkList2.value.join(',')
|
||||||
|
} else if (checkList2.value.length == 0 && queryParams.value.keyword) {
|
||||||
|
let result1Name = []
|
||||||
|
result2.value.forEach((item: any) => {
|
||||||
|
result1Name.push(item.code)
|
||||||
|
})
|
||||||
|
queryParams.value.attributeContentJson = result1Name.join(',')
|
||||||
|
}
|
||||||
|
|
||||||
tstaskPage(queryParams.value).then((res: any) => {
|
tstaskPage(queryParams.value).then((res: any) => {
|
||||||
|
visible.value = false
|
||||||
loading.value = false
|
loading.value = false
|
||||||
tableData.value = res.data.records
|
tableData.value = res.data.records
|
||||||
queryParams.value.current = res.data.current
|
queryParams.value.current = res.data.current
|
||||||
@ -89,6 +105,7 @@ function getdata() {
|
|||||||
}
|
}
|
||||||
item.taskProps = arr
|
item.taskProps = arr
|
||||||
result2.value = arr
|
result2.value = arr
|
||||||
|
// result.value = [...new Set([...result1.value, ...result2.value])];
|
||||||
// debugger
|
// debugger
|
||||||
if (item.taskProps.length > 0) {
|
if (item.taskProps.length > 0) {
|
||||||
item.taskProps.forEach((items: any) => {
|
item.taskProps.forEach((items: any) => {
|
||||||
@ -369,8 +386,9 @@ function generateUniqueId(length: any) {
|
|||||||
function dellable(index: any) {
|
function dellable(index: any) {
|
||||||
formitemarr.value.splice(index, 1)
|
formitemarr.value.splice(index, 1)
|
||||||
}
|
}
|
||||||
let result2 = ref([])
|
const checkList1 = ref([])
|
||||||
|
const checkList2 = ref([])
|
||||||
|
const visible:any = ref(false)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -378,34 +396,40 @@ let result2 = ref([])
|
|||||||
<div class="record-box">
|
<div class="record-box">
|
||||||
<div class="sou_title">
|
<div class="sou_title">
|
||||||
<div class="sou_title_left">
|
<div class="sou_title_left">
|
||||||
<el-input style="margin-right: 10px ;width:80px;margin-bottom: 10px;" v-model="queryParams.taskCode"
|
<el-input style="margin-right: 10px ;width:240px;" v-model="queryParams.keyword" clearable
|
||||||
clearable @change="getdata()" placeholder="任务编号"></el-input>
|
@change="getdata()" placeholder="全属性搜索"></el-input>
|
||||||
<el-input style="margin-right: 10px ;width:180px;margin-bottom: 10px;"
|
<el-button type="primary" @click="getdata()">搜索</el-button>
|
||||||
v-model="queryParams.taskName" clearable @change="getdata()" placeholder="任务名称"></el-input>
|
<el-popover placement="bottom" :width="400" trigger="click" :visible="visible">
|
||||||
<el-select style="margin-right: 10px ;width:180px;margin-bottom: 10px;"
|
<template #reference>
|
||||||
v-model="queryParams.taskType" clearable placeholder="任务类型" @change="getdata()">
|
<el-button @click="visible = true" type="primary">高级</el-button>
|
||||||
<el-option v-for="item in dictType" :key="item.itemcode" :label="item.dictname"
|
</template>
|
||||||
:value="item.itemcode" />
|
<div>
|
||||||
</el-select>
|
<el-input style="margin-right: 10px;width:240px;" v-model="queryParams.keyword" clearable
|
||||||
<el-input style="margin-right: 10px ;width:180px;margin-bottom: 10px;"
|
placeholder=""></el-input>
|
||||||
v-model="queryParams.taskPlace" clearable @change="getdata()" placeholder="任务地点"></el-input>
|
<el-button type="primary" @click="getdata()">搜索</el-button>
|
||||||
<el-input style="margin-right: 10px ;width:180px;margin-bottom: 10px;"
|
</div>
|
||||||
v-model="queryParams.taskPerson" clearable @change="getdata()" placeholder="任务人员"></el-input>
|
<div class="shuxingtitle" v-if="result1.length > 0">
|
||||||
<el-date-picker v-model="dataduan" type="daterange" range-separator="至" @change="getdata()"
|
<div class="kuai"></div>
|
||||||
style="margin-right: 10px ;margin-bottom: 10px;" start-placeholder="开始时间"
|
<div class="txt"> 固定属性</div>
|
||||||
end-placeholder="结束时间" />
|
</div>
|
||||||
<el-input style="margin-right: 10px ;width:200px;" v-model="queryParams.carrierName" clearable
|
<el-checkbox-group v-model="checkList1">
|
||||||
@change="getdata()" placeholder="载机名称"></el-input>
|
<el-checkbox v-for="item in result1" :key="item.code" :label="item.name"
|
||||||
<el-input style="margin-right: 10px ;width:200px;" v-model="queryParams.deviceCode" clearable
|
:value="item.code" />
|
||||||
@change="getdata()" placeholder="设备代号_编号"></el-input>
|
</el-checkbox-group>
|
||||||
<el-input style="margin-right: 10px ;width:380px;" v-model="queryParams.testDescribe" clearable
|
<div class="shuxingtitle" v-if="result2.length > 0">
|
||||||
@change="getdata()" placeholder="试验描述"></el-input>
|
<div class="kuai"></div>
|
||||||
<el-input style="margin-right: 10px ;width:380px;" v-model="queryParams.sensorDescribe" clearable
|
<div class="txt"> 自定义属性</div>
|
||||||
@change="getdata()" placeholder="传感器描述"></el-input>
|
</div>
|
||||||
<el-input v-for="item in result2" style="margin:10px 10px 0px 0px;width:180px;" v-model="queryParams[item.code]"
|
<el-checkbox-group v-model="checkList2">
|
||||||
clearable @change="getdata()" :placeholder="item.name"></el-input>
|
<el-checkbox v-for="item in result2" :key="item.code" :label="item.name"
|
||||||
<el-button v-if="result2.length == 0" type="primary" @click="getdata()">搜索</el-button>
|
:value="item.code" />
|
||||||
<el-button v-else type="primary" style="margin-top: 10px;" @click="getdata()">搜索</el-button>
|
</el-checkbox-group>
|
||||||
|
<el-date-picker v-model="dataduan" type="daterange" range-separator="至"
|
||||||
|
style="margin-right: 10px ;margin-bottom: 10px;" start-placeholder="开始时间"
|
||||||
|
end-placeholder="结束时间" />
|
||||||
|
</el-popover>
|
||||||
|
|
||||||
|
<!-- <el-button v-else type="primary" style="margin-top: 10px;" @click="getdata()">搜索</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="addproject()">新增</el-button>
|
<el-button type="primary" @click="addproject()">新增</el-button>
|
||||||
@ -414,7 +438,7 @@ let result2 = ref([])
|
|||||||
</div>
|
</div>
|
||||||
<el-table v-loading="loading" :data="tableData" @selection-change="handleSelectionChange"
|
<el-table v-loading="loading" :data="tableData" @selection-change="handleSelectionChange"
|
||||||
:header-cell-style="{ background: 'rgb(250 250 250)', color: '#383838', height: '50px' }"
|
:header-cell-style="{ background: 'rgb(250 250 250)', color: '#383838', height: '50px' }"
|
||||||
style="width: 100%; height: calc(64vh);margin-bottom: 20px;" border>
|
style="width: 100%; height: calc(71vh);margin-bottom: 20px;" border>
|
||||||
<el-table-column type="selection" width="40" />
|
<el-table-column type="selection" width="40" />
|
||||||
<el-table-column prop="taskCode" label="任务编号" width="90"></el-table-column>
|
<el-table-column prop="taskCode" label="任务编号" width="90"></el-table-column>
|
||||||
<el-table-column prop="taskName" label="任务名称" width="600"></el-table-column>
|
<el-table-column prop="taskName" label="任务名称" width="600"></el-table-column>
|
||||||
@ -494,26 +518,29 @@ let result2 = ref([])
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="任务时间" prop="taskDate" style="width: 50%;margin-left: 15px;">
|
<el-form-item label="任务时间" prop="taskDate" style="width: 50%;margin-left: 15px;">
|
||||||
<el-date-picker :disabled="projectForme.id" v-model="projectForme.taskDate" type="daterange" range-separator="-"
|
<el-date-picker :disabled="projectForme.id" v-model="projectForme.taskDate" type="daterange"
|
||||||
start-placeholder="开始时间" end-placeholder="结束时间" format="YYYY-MM-DD"
|
range-separator="-" start-placeholder="开始时间" end-placeholder="结束时间" format="YYYY-MM-DD"
|
||||||
value-format="YYYY-MM-DD" />
|
value-format="YYYY-MM-DD" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="width: 100%;display: flex;justify-content: space-between;align-items: center;">
|
<div style="width: 100%;display: flex;justify-content: space-between;align-items: center;">
|
||||||
<el-form-item label="任务地点" prop="taskPlace" style="width: 50%;">
|
<el-form-item label="任务地点" prop="taskPlace" style="width: 50%;">
|
||||||
<el-input :disabled="projectForme.id" v-model="projectForme.taskPlace" maxlength="500" show-word-limit />
|
<el-input :disabled="projectForme.id" v-model="projectForme.taskPlace" maxlength="500"
|
||||||
|
show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="任务人员" style="width: 50%;margin-left: 15px;">
|
<el-form-item label="任务人员" style="width: 50%;margin-left: 15px;">
|
||||||
<el-input v-model="projectForme.taskPerson" maxlength="500" show-word-limit />
|
<el-input v-model="projectForme.taskPerson" maxlength="500" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%;display: flex;justify-content: space-between;align-items: center;">
|
<div style="width: 100%;display: flex;justify-content: space-between;align-items: center;">
|
||||||
<el-form-item label="载机名称" style="width: 50%;">
|
<el-form-item label="载机名称" style="width: 50%;">
|
||||||
<el-input :disabled="projectForme.id" v-model="projectForme.carrierName" maxlength="40" show-word-limit />
|
<el-input :disabled="projectForme.id" v-model="projectForme.carrierName" maxlength="40"
|
||||||
|
show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备代号_编号" style="width: 50%;margin-left: 15px;">
|
<el-form-item label="设备代号_编号" style="width: 50%;margin-left: 15px;">
|
||||||
<el-input :disabled="projectForme.id" v-model="projectForme.deviceCode" maxlength="40" show-word-limit />
|
<el-input :disabled="projectForme.id" v-model="projectForme.deviceCode" maxlength="40"
|
||||||
|
show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-form-item label="载体类型">
|
<!-- <el-form-item label="载体类型">
|
||||||
@ -526,7 +553,7 @@ let result2 = ref([])
|
|||||||
<el-form-item label="传感器描述">
|
<el-form-item label="传感器描述">
|
||||||
<el-input v-model="projectForme.sensorDescribe" :rows="7" type="textarea" show-word-limit />
|
<el-input v-model="projectForme.sensorDescribe" :rows="7" type="textarea" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- <el-form-item label="设备名称">
|
<!-- <el-form-item label="设备名称">
|
||||||
<el-input v-model="projectForme.deviceName" maxlength="40" show-word-limit />
|
<el-input v-model="projectForme.deviceName" maxlength="40" show-word-limit />
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
@ -648,4 +675,24 @@ let result2 = ref([])
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.shuxingtitle {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #409eff;
|
||||||
|
margin-top: 5px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.kuai {
|
||||||
|
width: 3px;
|
||||||
|
height: 14px;
|
||||||
|
background: #409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.txt {
|
||||||
|
padding: 0px 0px 0px 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user