2025-6-19会议内容更改
This commit is contained in:
parent
722526d468
commit
8363862c8d
@ -40,3 +40,11 @@ export function addSdproject(queryParams:any) {
|
|||||||
params: queryParams
|
params: queryParams
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//检查项目下有无节点
|
||||||
|
export function selectNodesById(queryParams:any) {
|
||||||
|
return request({
|
||||||
|
url: '/specialDocument/sd_nodes/selectNodesById',
|
||||||
|
method: 'post',
|
||||||
|
params: queryParams
|
||||||
|
});
|
||||||
|
}
|
@ -48,3 +48,11 @@ export function confirmDeleteTask(queryParams: any) {
|
|||||||
params: queryParams
|
params: queryParams
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//试验任务是否可修改
|
||||||
|
export function selectTsNodesById(queryParams: any) {
|
||||||
|
return request({
|
||||||
|
url: '/experimentalData/ts-nodes/selectTsNodesById',
|
||||||
|
method: 'post',
|
||||||
|
params: queryParams
|
||||||
|
});
|
||||||
|
}
|
@ -8,26 +8,42 @@ 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 { projectPage, addSdproject, updateSdproject, deleteSdprojectById, deleteSdprojectByIds } from "@/api/project";
|
import { projectPage, addSdproject, updateSdproject, deleteSdprojectById, deleteSdprojectByIds, selectNodesById } from "@/api/project";
|
||||||
import { storagesBytype } from "@/api/storage";
|
import { storagesBytype } from "@/api/storage";
|
||||||
import { getDict } from '@/api/dict'
|
import { getDict } from '@/api/dict'
|
||||||
import { id } from "element-plus/es/locale";
|
import { id } from "element-plus/es/locale";
|
||||||
|
import { debug } from "console";
|
||||||
//定义表格数据
|
//定义表格数据
|
||||||
const tableData: any = ref([{}, {}]);
|
const tableData: any = ref([]);
|
||||||
// 查询数据
|
// 查询数据
|
||||||
const queryParams: any = ref({
|
const queryParams: any = ref({
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 20,
|
size: 20,
|
||||||
projectType: '',
|
projectType: '',
|
||||||
projectName: '',
|
projectName: '',
|
||||||
description: ''
|
description: '',
|
||||||
|
attributeContentJson:'',
|
||||||
});
|
});
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
// 表格加载
|
// 表格加载
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
//获取表格数据
|
//获取表格数据
|
||||||
function getdata() {
|
function getdata() {
|
||||||
|
formitemarr.value.length = 0
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
if (result2.value.length > 0) {
|
||||||
|
// 初始化attributeContent数组
|
||||||
|
queryParams.value.attributeContentJson = [];
|
||||||
|
result2.value.forEach((item: any) => {
|
||||||
|
// 修复动态属性名语法和属性访问方式
|
||||||
|
queryParams.value.attributeContentJson.push({
|
||||||
|
[item.code]: queryParams.value[item.code]?queryParams.value[item.code]:''
|
||||||
|
});
|
||||||
|
});
|
||||||
|
if( queryParams.value.attributeContentJson.length > 0){
|
||||||
|
queryParams.value.attributeContentJson = encodeURIComponent(JSON.stringify(queryParams.value.attributeContentJson))
|
||||||
|
}
|
||||||
|
}
|
||||||
projectPage(queryParams.value).then((res: any) => {
|
projectPage(queryParams.value).then((res: any) => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
tableData.value = res.data.records
|
tableData.value = res.data.records
|
||||||
@ -35,6 +51,7 @@ function getdata() {
|
|||||||
queryParams.value.size = res.data.size
|
queryParams.value.size = res.data.size
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
let arr = []
|
let arr = []
|
||||||
|
// result2.value.length = 0
|
||||||
tableData.value.forEach((item: any) => {
|
tableData.value.forEach((item: any) => {
|
||||||
if (item.projectProps) {
|
if (item.projectProps) {
|
||||||
arr = JSON.parse(item.projectProps)
|
arr = JSON.parse(item.projectProps)
|
||||||
@ -42,10 +59,24 @@ function getdata() {
|
|||||||
arr = []
|
arr = []
|
||||||
}
|
}
|
||||||
item.projectProps = arr
|
item.projectProps = arr
|
||||||
});
|
result2.value = arr
|
||||||
console.log(tableData.value)
|
// debugger
|
||||||
|
if (item.projectProps.length > 0) {
|
||||||
|
item.projectProps.forEach((items: any) => {
|
||||||
|
item[items.code] = items.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
if (tableData.value[0].projectProps && tableData.value[0].projectProps.length > 0) {
|
||||||
|
tableData.value[0].projectProps.forEach((item: any) => {
|
||||||
|
formitemarr.value.push({ name: item.name, data: '', code: item.code })
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
//获取字典项目类型
|
//获取字典项目类型
|
||||||
const dictType = ref([])
|
const dictType = ref([])
|
||||||
const storagesarr = ref([])
|
const storagesarr = ref([])
|
||||||
@ -72,9 +103,11 @@ function addproject() {
|
|||||||
projectProps: "",//信息
|
projectProps: "",//信息
|
||||||
projectTime: "",//时间
|
projectTime: "",//时间
|
||||||
projectType: ""//类型
|
projectType: ""//类型
|
||||||
, localStorageId: ""
|
, localStorageId: "",
|
||||||
|
attributeContentJson:'',
|
||||||
}
|
}
|
||||||
formitemarr.value.length = 0
|
shidou.value = false
|
||||||
|
// formitemarr.value.length = 0
|
||||||
}
|
}
|
||||||
//修改项目弹框
|
//修改项目弹框
|
||||||
function editproject(row: any) {
|
function editproject(row: any) {
|
||||||
@ -82,6 +115,13 @@ function editproject(row: any) {
|
|||||||
frame.value = true
|
frame.value = true
|
||||||
projectForme.value = JSON.parse(JSON.stringify(row))
|
projectForme.value = JSON.parse(JSON.stringify(row))
|
||||||
formitemarr.value = projectForme.value.projectProps
|
formitemarr.value = projectForme.value.projectProps
|
||||||
|
selectNodes(row)
|
||||||
|
}
|
||||||
|
const shidou = ref(false)
|
||||||
|
function selectNodes(row: any) {
|
||||||
|
selectNodesById({ projectId: row.id }).then((res: any) => {
|
||||||
|
shidou.value = res.data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
//删除项目弹框
|
//删除项目弹框
|
||||||
function delproject(row: any) {
|
function delproject(row: any) {
|
||||||
@ -244,7 +284,7 @@ function labledsure() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
generateUniqueId
|
generateUniqueId
|
||||||
formitemarr.value.push({ name: dataname.value, data: '', id: generateUniqueId(8) })
|
formitemarr.value.push({ name: dataname.value, data: '', code: generateUniqueId(8) })
|
||||||
labledone.value = false
|
labledone.value = false
|
||||||
}
|
}
|
||||||
function generateUniqueId(length: any) {
|
function generateUniqueId(length: any) {
|
||||||
@ -265,23 +305,7 @@ function generateUniqueId(length: any) {
|
|||||||
function dellable(index: any) {
|
function dellable(index: any) {
|
||||||
formitemarr.value.splice(index, 1)
|
formitemarr.value.splice(index, 1)
|
||||||
}
|
}
|
||||||
let result1 =ref([])
|
|
||||||
let result2 = ref([])
|
let result2 = ref([])
|
||||||
const attloading = ref(false)
|
|
||||||
const attbute = ref(false)
|
|
||||||
function attribute(input: any) {
|
|
||||||
result2.value = input
|
|
||||||
result1.value.length = 0
|
|
||||||
let inoutarr = JSON.parse(JSON.stringify(input))
|
|
||||||
result1.value = [inoutarr.reduce((acc:any, item:any) => {
|
|
||||||
acc[item.id] = item.data;
|
|
||||||
return acc;
|
|
||||||
}, {})];
|
|
||||||
attbute.value = true
|
|
||||||
}
|
|
||||||
function attributeclose(){
|
|
||||||
attbute.value = false
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -289,16 +313,19 @@ function attributeclose(){
|
|||||||
<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 ;" v-model="queryParams.projectName" clearable
|
<el-input style="margin:5px 10px 5px 0px;width: 180px;" v-model="queryParams.projectName" clearable
|
||||||
@change="getdata()" placeholder="项目名称"></el-input>
|
@change="getdata()" placeholder="项目名称"></el-input>
|
||||||
<el-select v-model="queryParams.projectType" placeholder="项目类型" style="margin-right: 10px ;"
|
<el-select v-model="queryParams.projectType" placeholder="项目类型" style="margin:5px 10px 5px 0px;width: 180px;"
|
||||||
clearable @change="getdata()">
|
clearable @change="getdata()">
|
||||||
<el-option v-for="item in dictType" :key="item.itemcode" :label="item.dictname"
|
<el-option v-for="item in dictType" :key="item.itemcode" :label="item.dictname"
|
||||||
:value="item.itemcode" />
|
:value="item.itemcode" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input style="margin-right: 10px ;" v-model="queryParams.description" clearable
|
<el-input style="margin:5px 10px 5px 0px;width: 180px;" v-model="queryParams.description" clearable
|
||||||
@change="getdata()" placeholder="项目描述"></el-input>
|
@change="getdata()" placeholder="项目描述"></el-input>
|
||||||
<!-- <el-input style="margin-right: 10px ;" v-model="queryParams.projectType" clearable
|
<!-- <el-table-column v-for="item in result2" :prop="item.code" :label="item.name"></el-table-column> -->
|
||||||
|
<el-input v-for="item in result2" style="margin:5px 10px 5px 0px;width: 180px;" v-model="queryParams[item.code]"
|
||||||
|
clearable @change="getdata()" :placeholder="item.name"></el-input>
|
||||||
|
<!-- <el-input style="margin:5px 10px 5px 0px;" v-model="queryParams.projectType" clearable
|
||||||
@change="getdata()" placeholder="项目类型"></el-input> -->
|
@change="getdata()" placeholder="项目类型"></el-input> -->
|
||||||
|
|
||||||
<el-button type="primary" @click="getdata()">搜索</el-button>
|
<el-button type="primary" @click="getdata()">搜索</el-button>
|
||||||
@ -322,7 +349,7 @@ function attributeclose(){
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="projectTime" label="项目启动时间" width="165" align="center"></el-table-column>
|
<el-table-column prop="projectTime" label="项目启动时间" width="165" align="center"></el-table-column>
|
||||||
<el-table-column prop="description" label="项目描述">
|
<el-table-column prop="description" label="项目描述" min-width="400">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div class="ellipsis">
|
<div class="ellipsis">
|
||||||
<span class="single-line-ellipsis">{{ scope.row.description }}</span>
|
<span class="single-line-ellipsis">{{ scope.row.description }}</span>
|
||||||
@ -331,14 +358,8 @@ function attributeclose(){
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="description" label="自定义属性" width="100">
|
<el-table-column v-for="item in result2" :prop="item.code" :label="item.name"
|
||||||
<template #default="scope">
|
width="180"></el-table-column>
|
||||||
<div class="ellipsis1">
|
|
||||||
<img src="@/assets/MenuIcon/xqing.png" alt="" title="详情"
|
|
||||||
@click="attribute(scope.row.projectProps)" style="cursor: pointer;">
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<!-- <el-table-column prop="projectProps" label="项目信息"></el-table-column> -->
|
<!-- <el-table-column prop="projectProps" label="项目信息"></el-table-column> -->
|
||||||
<!-- <el-table-column v-for="item in tableData.projectProps" :prop="item.data" :label="item.name" width="165" align="center"></el-table-column> -->
|
<!-- <el-table-column v-for="item in tableData.projectProps" :prop="item.data" :label="item.name" width="165" align="center"></el-table-column> -->
|
||||||
<el-table-column fixed="right" label="操作" width="80" align="center">
|
<el-table-column fixed="right" label="操作" width="80" align="center">
|
||||||
@ -385,9 +406,8 @@ function attributeclose(){
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item label="存储空间绑定" prop="localStorageId">
|
<el-form-item label="存储空间绑定" prop="localStorageId">
|
||||||
<el-select v-model="projectForme.localStorageId" clearable placeholder=" " :disabled="projectForme.id">
|
<el-select v-model="projectForme.localStorageId" clearable placeholder=" " :disabled="shidou">
|
||||||
<el-option v-for="item in storagesarr" :key="item.id" :label="item.name"
|
<el-option v-for="item in storagesarr" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
:value="item.id" />
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label=" 项目描述">
|
<el-form-item label=" 项目描述">
|
||||||
@ -425,17 +445,7 @@ function attributeclose(){
|
|||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog :title="'自定义属性详情'" v-model="attbute" width="1200px" :before-close="attributeclose" top="30px" draggable
|
|
||||||
:close-on-click-modal="false" destroy-on-close>
|
|
||||||
<el-table v-if="result2.length > 0" v-loading="attloading" :data="result1"
|
|
||||||
:header-cell-style="{ background: 'rgb(250 250 250)', color: '#383838', height: '50px' }"
|
|
||||||
style="width: 100%; height: calc(30vh);margin-bottom: 20px;" border>
|
|
||||||
<el-table-column v-for="item in result2" :prop="item.id" :label="item.name" ></el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<div v-else style="width: 100%;height: 285px;display: flex;align-items: center;justify-content: center;border: 1px solid #ebeef5;">
|
|
||||||
<el-empty description="暂无数据" />
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -486,14 +496,15 @@ function attributeclose(){
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
// align-items: center;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
.sou_title_left {
|
.sou_title_left {
|
||||||
width: 50%;
|
width: 72%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
// justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ const title = ref("")
|
|||||||
const frame = ref(false)
|
const frame = ref(false)
|
||||||
//新增项目弹框
|
//新增项目弹框
|
||||||
function addproject() {
|
function addproject() {
|
||||||
|
storeContent.value = ''
|
||||||
frame.value = true
|
frame.value = true
|
||||||
title.value = "新增储存源"
|
title.value = "新增储存源"
|
||||||
projectForme.value = {
|
projectForme.value = {
|
||||||
@ -63,7 +64,17 @@ function addproject() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//修改项目弹框
|
//修改项目弹框
|
||||||
|
const storeContent = ref('')
|
||||||
function editproject(row: any) {
|
function editproject(row: any) {
|
||||||
|
if (row.storeContent) {
|
||||||
|
ElMessage.warning('已有项目绑定该存储空间,请先解除关联!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (row.storeContent) {
|
||||||
|
storeContent.value = row.storeContent
|
||||||
|
} else {
|
||||||
|
storeContent.value = ''
|
||||||
|
}
|
||||||
storage2({ id: row.id }).then((res: any) => {
|
storage2({ id: row.id }).then((res: any) => {
|
||||||
projectForme.value.name = res.data.name
|
projectForme.value.name = res.data.name
|
||||||
projectForme.value.key = res.data.key
|
projectForme.value.key = res.data.key
|
||||||
@ -222,7 +233,20 @@ function Loglist(row: any) {
|
|||||||
function handleClose1() {
|
function handleClose1() {
|
||||||
logqing.value = false
|
logqing.value = false
|
||||||
}
|
}
|
||||||
|
function comparePercentage(percentStr: any) {
|
||||||
|
// 去除百分号并转换为数字
|
||||||
|
if (!percentStr.spaceOccupancyRatio) {
|
||||||
|
percentStr.resar = false
|
||||||
|
return percentStr.spaceOccupancyRatio;
|
||||||
|
}
|
||||||
|
const percent = parseFloat(percentStr.spaceOccupancyRatio.replace('%', ''));
|
||||||
|
|
||||||
|
if (percent > 80 || percent == 80) {
|
||||||
|
percentStr.resar = true
|
||||||
|
}
|
||||||
|
|
||||||
|
return percentStr.spaceOccupancyRatio;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -250,23 +274,40 @@ function handleClose1() {
|
|||||||
style="width: 100%; height: calc(100vh - 275px);margin-bottom: 20px;" border>
|
style="width: 100%; height: calc(100vh - 275px);margin-bottom: 20px;" border>
|
||||||
<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="name" label="存储空间名称" width="200"></el-table-column>
|
<el-table-column prop="name" label="存储空间名称" width="200">
|
||||||
<el-table-column prop="type" label="存储策略" width="100">
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ typeName(dictType, scope.row.type) }}</span>
|
<span :style="{ color: scope.row.resar ? 'red' : '', 'font-size': scope.row.resar ? '16px' : '' }">{{
|
||||||
|
scope.row.name }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="type" label="存储策略" width="100">
|
||||||
|
<template #default="scope">
|
||||||
|
<span :style="{ color: scope.row.resar ? 'red' : '', 'font-size': scope.row.resar ? '16px' : '' }">{{
|
||||||
|
typeName(dictType, scope.row.type) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="valueData" label="存储路径" width="200">
|
||||||
|
<template #default="scope">
|
||||||
|
<span :style="{ color: scope.row.resar ? 'red' : '', 'font-size': scope.row.resar ? '16px' : '' }">{{
|
||||||
|
scope.row.valueData }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="valueData" label="存储路径" width="200"></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 class="single-line-ellipsis">{{ scope.row.storeContent }}</span>
|
<span :style="{ color: scope.row.resar ? 'red' : '', 'font-size': scope.row.resar ? '16px' : '' }"
|
||||||
|
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;">
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="spaceOccupancyRatio" label="存储空间占用比例" width="140"></el-table-column>
|
<el-table-column prop="spaceOccupancyRatio" label="存储空间占用比例" width="140">
|
||||||
|
<template #default="scope">
|
||||||
|
<span :style="{ color: scope.row.resar ? 'red' : '', 'font-size': scope.row.resar ? '16px' : '' }">{{
|
||||||
|
comparePercentage(scope.row) }}</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
|
||||||
@ -288,34 +329,34 @@ function handleClose1() {
|
|||||||
<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=" 存储源名称" prop="name">
|
<el-form-item label=" 存储源名称" prop="name">
|
||||||
<el-input v-model="projectForme.name" />
|
<el-input v-model="projectForme.name" :disabled="storeContent != ''" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label=" 存储源别名" prop="key">
|
<el-form-item label=" 存储源别名" prop="key">
|
||||||
<el-input v-model="projectForme.key" />
|
<el-input v-model="projectForme.key" :disabled="storeContent != ''" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label=" 存储源备注" prop="remark">
|
<el-form-item label=" 存储源备注">
|
||||||
<el-input v-model="projectForme.remark" />
|
<el-input v-model="projectForme.remark" :disabled="storeContent != ''" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label=" 存储策略" prop="type">
|
<el-form-item label=" 存储策略" prop="type">
|
||||||
<el-select v-model="projectForme.type" placeholder=" " clearable>
|
<el-select v-model="projectForme.type" placeholder=" " :disabled="storeContent != ''" clearable>
|
||||||
<el-option v-for="item in dictType" :key="item.itemcode" :label="item.dictname"
|
<el-option v-for="item in dictType" :key="item.itemcode" :label="item.dictname"
|
||||||
:value="item.itemcode" />
|
:value="item.itemcode" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label=" 文件路径" prop="filePath" >
|
<el-form-item v-if="projectForme.type" :label="projectForme.type == 'minio'?'宿主机挂载绝对路径':'存储空间绝对路径'" prop="filePath">
|
||||||
<el-input v-model="projectForme.filePath" />
|
<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'">
|
||||||
<el-input v-model="projectForme.accessKey" />
|
<el-input v-model="projectForme.accessKey" :disabled="storeContent != ''" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label=" SecretKey" prop="secretKey" v-if="projectForme.type == 'minio'">
|
<el-form-item label=" SecretKey" prop="secretKey" v-if="projectForme.type == 'minio'">
|
||||||
<el-input v-model="projectForme.secretKey" />
|
<el-input v-model="projectForme.secretKey" :disabled="storeContent != ''" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label=" 存储空间名称" prop="bucketName" v-if="projectForme.type == 'minio'">
|
<el-form-item label=" 存储空间名称" prop="bucketName" v-if="projectForme.type == 'minio'">
|
||||||
<el-input v-model="projectForme.bucketName" />
|
<el-input v-model="projectForme.bucketName" :disabled="storeContent != ''" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label=" 服务地址" prop="endPoint" v-if="projectForme.type == 'minio'">
|
<el-form-item label=" 服务地址" prop="endPoint" v-if="projectForme.type == 'minio'">
|
||||||
<el-input v-model="projectForme.endPoint" />
|
<el-input v-model="projectForme.endPoint" :disabled="storeContent != ''" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div style="width: 100%;display: flex;justify-content: end;margin-top: 20px;">
|
<div style="width: 100%;display: flex;justify-content: end;margin-top: 20px;">
|
||||||
|
48
web/src/views/testdata/datamanagement/index.vue
vendored
48
web/src/views/testdata/datamanagement/index.vue
vendored
@ -115,7 +115,7 @@ function getProject() {
|
|||||||
projectId.value = projectArr.value[0].id
|
projectId.value = projectArr.value[0].id
|
||||||
storageKey.value = projectArr.value[0].key
|
storageKey.value = projectArr.value[0].key
|
||||||
localStorageId.value = projectArr.value[0].localStorageId
|
localStorageId.value = projectArr.value[0].localStorageId
|
||||||
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()
|
||||||
gettreedata()
|
gettreedata()
|
||||||
@ -170,6 +170,7 @@ function gettreedata() {
|
|||||||
treeloading.value = false
|
treeloading.value = false
|
||||||
if (treedata.value[0]) {
|
if (treedata.value[0]) {
|
||||||
pathid.value = treedata.value[0].nodeId
|
pathid.value = treedata.value[0].nodeId
|
||||||
|
nodename.value = res.data[0].nodeName
|
||||||
filepath.value = res.data[0].path + res.data[0].nodeName + '/'
|
filepath.value = res.data[0].path + res.data[0].nodeName + '/'
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
treeRef.value?.setCurrentKey(pathid.value);
|
treeRef.value?.setCurrentKey(pathid.value);
|
||||||
@ -183,12 +184,15 @@ function gettreedata() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const pathid = ref()
|
const pathid = ref()
|
||||||
|
const nodename = ref('')
|
||||||
function handleNodeClick(data: any, node: any) {
|
function handleNodeClick(data: any, node: any) {
|
||||||
pathid.value = data.nodeId
|
pathid.value = data.nodeId
|
||||||
filepath.value = data.path + data.nodeName + '/'
|
filepath.value = data.path + data.nodeName + '/'
|
||||||
creatform.value.parentId = ''
|
creatform.value.parentId = ''
|
||||||
patharr.value.length = 0
|
patharr.value.length = 0
|
||||||
getdata()
|
getdata()
|
||||||
|
nodename.value = data.nodeName
|
||||||
|
creatform.value.workPath = ''
|
||||||
}
|
}
|
||||||
//子项目配置
|
//子项目配置
|
||||||
const frame = ref(false)
|
const frame = ref(false)
|
||||||
@ -218,7 +222,8 @@ function addSubItem(row: any) {
|
|||||||
projectForme.value.taskId = projectId.value
|
projectForme.value.taskId = projectId.value
|
||||||
projectForme.value.parentId = row.nodeId
|
projectForme.value.parentId = row.nodeId
|
||||||
if (row.nodeId == '00') {
|
if (row.nodeId == '00') {
|
||||||
projectForme.value.path = '/' + taskName.value + '/'
|
const item = projectArr.value.find(item => item.id === projectId.value);
|
||||||
|
projectForme.value.path = '/' + item.taskName + '/'
|
||||||
} else {
|
} else {
|
||||||
projectForme.value.path = filepath.value
|
projectForme.value.path = filepath.value
|
||||||
}
|
}
|
||||||
@ -877,12 +882,13 @@ function paste() {
|
|||||||
newFileName: [],
|
newFileName: [],
|
||||||
rename: '',
|
rename: '',
|
||||||
type: '',
|
type: '',
|
||||||
taskId:projectId.value
|
taskId:projectId.value,
|
||||||
|
nodeId: pathid.value
|
||||||
}
|
}
|
||||||
|
// debugger
|
||||||
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : filepath.value
|
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : filepath.value
|
||||||
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
||||||
repeatObj.type = '0'
|
repeatObj.type = '0'
|
||||||
|
|
||||||
copytable.value.length = 0
|
copytable.value.length = 0
|
||||||
if (tableData.value.length > 0) {
|
if (tableData.value.length > 0) {
|
||||||
tableData.value.forEach((item: any) => {
|
tableData.value.forEach((item: any) => {
|
||||||
@ -992,7 +998,8 @@ function copycover(row: any) {
|
|||||||
newFileName: [],
|
newFileName: [],
|
||||||
rename: '',
|
rename: '',
|
||||||
type: '',
|
type: '',
|
||||||
taskId:projectId.value
|
taskId:projectId.value,
|
||||||
|
nodeId: pathid.value
|
||||||
}
|
}
|
||||||
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : filepath.value
|
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : filepath.value
|
||||||
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
||||||
@ -1068,7 +1075,8 @@ function copysomefile() {
|
|||||||
newFileName: [],
|
newFileName: [],
|
||||||
rename: '',
|
rename: '',
|
||||||
type: '',
|
type: '',
|
||||||
taskId:projectId.value
|
taskId:projectId.value,
|
||||||
|
nodeId: pathid.value
|
||||||
}
|
}
|
||||||
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : filepath.value
|
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : filepath.value
|
||||||
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
||||||
@ -1133,7 +1141,8 @@ async function submitrename(formEl: any) {
|
|||||||
newFileName: [],
|
newFileName: [],
|
||||||
rename: '',
|
rename: '',
|
||||||
type: '',
|
type: '',
|
||||||
taskId:projectId.value
|
taskId:projectId.value,
|
||||||
|
nodeId: pathid.value
|
||||||
}
|
}
|
||||||
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : filepath.value
|
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : filepath.value
|
||||||
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
|
||||||
@ -1226,7 +1235,6 @@ async function submitcreat(formEl: any) {
|
|||||||
//路径导航条
|
//路径导航条
|
||||||
const patharr = ref([])
|
const patharr = ref([])
|
||||||
function pathclick(row: any, index: any) {
|
function pathclick(row: any, index: any) {
|
||||||
|
|
||||||
patharr.value.splice(index + 1)
|
patharr.value.splice(index + 1)
|
||||||
creatform.value.parentId = row.id
|
creatform.value.parentId = row.id
|
||||||
creatform.value.workPath = convertArrayToPath1(patharr.value)
|
creatform.value.workPath = convertArrayToPath1(patharr.value)
|
||||||
@ -1512,7 +1520,7 @@ function openMap(row: any) {
|
|||||||
// }));
|
// }));
|
||||||
// }, 2000);
|
// }, 2000);
|
||||||
mapTrajectory.value = true
|
mapTrajectory.value = true
|
||||||
maptime.value = 1
|
maptime.value = 300
|
||||||
}
|
}
|
||||||
function mapClose() {
|
function mapClose() {
|
||||||
mapTrajectory.value = false
|
mapTrajectory.value = false
|
||||||
@ -1532,7 +1540,7 @@ const options = ref([
|
|||||||
, id: 600
|
, id: 600
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
const maptime: any = ref(1)
|
const maptime: any = ref(300)
|
||||||
//频率
|
//频率
|
||||||
const qvehuan: any = ref(false)
|
const qvehuan: any = ref(false)
|
||||||
const qvehuan1: any = ref(false)
|
const qvehuan1: any = ref(false)
|
||||||
@ -1652,7 +1660,7 @@ function repstring(row: any) {
|
|||||||
<template #default="{ data }">
|
<template #default="{ data }">
|
||||||
<span class="custom-tree-node" >
|
<span class="custom-tree-node" >
|
||||||
<span class="text">{{ data.nodeName }}</span>
|
<span class="text">{{ data.nodeName }}</span>
|
||||||
<span class="img_tree">
|
<span class="img_tree" v-if="nodename != '根节点'">
|
||||||
<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)"> -->
|
||||||
@ -1689,23 +1697,23 @@ function repstring(row: any) {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<!-- :disabled="pathid.value" -->
|
<!-- :disabled="pathid.value" -->
|
||||||
<el-button type="primary" :disabled="loading" @click="creatFile">创建文件/文件夹</el-button>
|
<el-button type="primary" :disabled="loading || nodename == '根节点'" @click="creatFile " >创建文件/文件夹</el-button>
|
||||||
<el-button type="primary" :disabled="loading" @click="openFile">上传</el-button>
|
<el-button type="primary" :disabled="loading|| nodename == '根节点'" @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|| nodename == '根节点'">删除</el-button>
|
||||||
<el-button type="primary" @click="xiafilemony()" :disabled="tableIdarr.length == 0">下载</el-button>
|
<el-button type="primary" @click="xiafilemony()" :disabled="tableIdarr.length == 0|| nodename == '根节点'">下载</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-bottom: 10px;">
|
<div style="margin-bottom: 10px;">
|
||||||
<el-button type="primary" v-if="pasteing" @click="paste()">粘贴({{ copyarr.length }})</el-button>
|
<el-button type="primary" v-if="pasteing" @click="paste()">粘贴({{ copyarr.length }})</el-button>
|
||||||
<el-button type="primary" :disabled="tableIdarr.length == 0" @click="copyMove('copy')">复制</el-button>
|
<el-button type="primary" :disabled="tableIdarr.length == 0|| nodename == '根节点'" @click="copyMove('copy')">复制</el-button>
|
||||||
<el-button type="primary" :disabled="tableIdarr.length == 0" @click="copyMove('move')">移动</el-button>
|
<el-button type="primary" :disabled="tableIdarr.length == 0|| nodename == '根节点'" @click="copyMove('move')">移动</el-button>
|
||||||
<el-button type="primary" :disabled="tableIdarr.length == 0" @click="zipFile(true)">压缩</el-button>
|
<el-button type="primary" :disabled="tableIdarr.length == 0|| nodename == '根节点'" @click="zipFile(true)">压缩</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table ref="filetableRef" v-loading="loading" :data="tableData" @selection-change="handleSelectionChange"
|
<el-table ref="filetableRef" 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(66vh);margin-bottom: 20px;" border>
|
style="width: 100%; height: calc(66vh);margin-bottom: 20px;" border>
|
||||||
<el-table-column type="selection" width="40" />
|
<el-table-column type="selection" width="40" v-if=" nodename != '根节点'" />
|
||||||
<!-- <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="文件名称" width="200">
|
<el-table-column prop="fileName" label="文件名称" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@ -1733,7 +1741,7 @@ function repstring(row: any) {
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="uploader" width="80" label="上传人"></el-table-column>
|
<el-table-column prop="uploader" width="80" label="上传人"></el-table-column>
|
||||||
<el-table-column prop="updateTime" width="170" label="修改日期"></el-table-column>
|
<el-table-column prop="updateTime" width="170" label="修改日期"></el-table-column>
|
||||||
<el-table-column label="操作" width="140" align="center">
|
<el-table-column v-if=" nodename != '根节点'" label="操作" width="140" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span
|
<span
|
||||||
style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between; ">
|
style="display: flex;display: -webkit-flex;justify-content: space-between;-webkit-justify-content: space-between; ">
|
||||||
|
@ -175,6 +175,7 @@ function backups() {
|
|||||||
function getchayi() {
|
function getchayi() {
|
||||||
const ids = []
|
const ids = []
|
||||||
const params: any = {}
|
const params: any = {}
|
||||||
|
params.taskId = projectId.value
|
||||||
if (comparearr.value.length > 0) {
|
if (comparearr.value.length > 0) {
|
||||||
comparearr.value.forEach((item: any) => {
|
comparearr.value.forEach((item: any) => {
|
||||||
ids.push(item.id)
|
ids.push(item.id)
|
||||||
@ -182,7 +183,7 @@ function getchayi() {
|
|||||||
params.id = ids.join(',')
|
params.id = ids.join(',')
|
||||||
} else {
|
} else {
|
||||||
params.nodeId = pathid.value
|
params.nodeId = pathid.value
|
||||||
params.taskId = projectId.value
|
// params.taskId = projectId.value
|
||||||
}
|
}
|
||||||
compareLocalList(params).then((res: any) => {
|
compareLocalList(params).then((res: any) => {
|
||||||
localOnlyFiles.value = res.data
|
localOnlyFiles.value = res.data
|
||||||
@ -673,7 +674,6 @@ const handleMenuClick = (action: string, type: any) => {
|
|||||||
getlocaltree()
|
getlocaltree()
|
||||||
getminiotree()
|
getminiotree()
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 'preview':
|
case 'preview':
|
||||||
|
124
web/src/views/testdata/testtask/index.vue
vendored
124
web/src/views/testdata/testtask/index.vue
vendored
@ -8,7 +8,7 @@ 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 } 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'
|
||||||
//定义表格数据
|
//定义表格数据
|
||||||
@ -54,7 +54,25 @@ function getdata() {
|
|||||||
queryParams.value.startDate = ''
|
queryParams.value.startDate = ''
|
||||||
queryParams.value.endDate = ''
|
queryParams.value.endDate = ''
|
||||||
}
|
}
|
||||||
|
formitemarr.value.length = 0
|
||||||
|
loading.value = true
|
||||||
|
|
||||||
|
if (result2.value.length > 0) {
|
||||||
|
// 初始化attributeContent数组
|
||||||
|
queryParams.value.attributeContentJson = [];
|
||||||
|
console.log(result2.value)
|
||||||
|
result2.value.forEach((item: any) => {
|
||||||
|
// 修复动态属性名语法和属性访问方式
|
||||||
|
queryParams.value.attributeContentJson.push({
|
||||||
|
[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))
|
||||||
|
}
|
||||||
|
}
|
||||||
tstaskPage(queryParams.value).then((res: any) => {
|
tstaskPage(queryParams.value).then((res: any) => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
tableData.value = res.data.records
|
tableData.value = res.data.records
|
||||||
@ -62,6 +80,7 @@ function getdata() {
|
|||||||
queryParams.value.size = res.data.size
|
queryParams.value.size = res.data.size
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
let arr = []
|
let arr = []
|
||||||
|
// result2.value.length = 0
|
||||||
tableData.value.forEach((item: any) => {
|
tableData.value.forEach((item: any) => {
|
||||||
if (item.taskProps) {
|
if (item.taskProps) {
|
||||||
arr = JSON.parse(item.taskProps)
|
arr = JSON.parse(item.taskProps)
|
||||||
@ -69,7 +88,20 @@ function getdata() {
|
|||||||
arr = []
|
arr = []
|
||||||
}
|
}
|
||||||
item.taskProps = arr
|
item.taskProps = arr
|
||||||
|
result2.value = arr
|
||||||
|
// debugger
|
||||||
|
if (item.taskProps.length > 0) {
|
||||||
|
item.taskProps.forEach((items: any) => {
|
||||||
|
item[items.code] = items.data
|
||||||
|
})
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
if (tableData.value[0].taskProps && tableData.value[0].taskProps.length > 0) {
|
||||||
|
tableData.value[0].taskProps.forEach((item: any) => {
|
||||||
|
formitemarr.value.push({ name: item.name, data: '', code: item.code })
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//弹框命名
|
//弹框命名
|
||||||
@ -97,7 +129,8 @@ function addproject() {
|
|||||||
localStorageId: '',
|
localStorageId: '',
|
||||||
backupStorageId: ''
|
backupStorageId: ''
|
||||||
}
|
}
|
||||||
formitemarr.value.length = 0
|
// formitemarr.value.length = 0
|
||||||
|
shidou.value = false
|
||||||
}
|
}
|
||||||
//修改项目弹框
|
//修改项目弹框
|
||||||
function editproject(row: any) {
|
function editproject(row: any) {
|
||||||
@ -106,6 +139,14 @@ function editproject(row: any) {
|
|||||||
projectForme.value.taskDate = [projectForme.value.taskStartdate, projectForme.value.taskEnddate]
|
projectForme.value.taskDate = [projectForme.value.taskStartdate, projectForme.value.taskEnddate]
|
||||||
title.value = "修改试验任务"
|
title.value = "修改试验任务"
|
||||||
frame.value = true
|
frame.value = true
|
||||||
|
formitemarr.value = projectForme.value.taskProps
|
||||||
|
selectNodes(row)
|
||||||
|
}
|
||||||
|
const shidou = ref(false)
|
||||||
|
function selectNodes(row: any) {
|
||||||
|
selectTsNodesById({ taskId: row.id }).then((res: any) => {
|
||||||
|
shidou.value = res.data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
//删除项目弹框
|
//删除项目弹框
|
||||||
function delproject(row: any) {
|
function delproject(row: any) {
|
||||||
@ -307,7 +348,7 @@ function labledsure() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
generateUniqueId
|
generateUniqueId
|
||||||
formitemarr.value.push({ name: dataname.value, data: '', id: generateUniqueId(8) })
|
formitemarr.value.push({ name: dataname.value, data: '', code: generateUniqueId(8) })
|
||||||
labledone.value = false
|
labledone.value = false
|
||||||
}
|
}
|
||||||
function generateUniqueId(length: any) {
|
function generateUniqueId(length: any) {
|
||||||
@ -328,24 +369,8 @@ function generateUniqueId(length: any) {
|
|||||||
function dellable(index: any) {
|
function dellable(index: any) {
|
||||||
formitemarr.value.splice(index, 1)
|
formitemarr.value.splice(index, 1)
|
||||||
}
|
}
|
||||||
let result1 = ref([])
|
|
||||||
let result2 = ref([])
|
let result2 = ref([])
|
||||||
const attloading = ref(false)
|
|
||||||
const attbute = ref(false)
|
|
||||||
function attribute(input: any) {
|
|
||||||
result2.value = input
|
|
||||||
result1.value.length = 0
|
|
||||||
let inoutarr = JSON.parse(JSON.stringify(input))
|
|
||||||
result1.value = [inoutarr.reduce((acc: any, item: any) => {
|
|
||||||
acc[item.id] = item.data;
|
|
||||||
return acc;
|
|
||||||
}, {})];
|
|
||||||
attbute.value = true
|
|
||||||
console.log(result1.value)
|
|
||||||
}
|
|
||||||
function attributeclose() {
|
|
||||||
attbute.value = false
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -369,23 +394,24 @@ function attributeclose() {
|
|||||||
<el-date-picker v-model="dataduan" type="daterange" range-separator="至" @change="getdata()"
|
<el-date-picker v-model="dataduan" type="daterange" range-separator="至" @change="getdata()"
|
||||||
style="margin-right: 10px ;margin-bottom: 10px;" start-placeholder="开始时间"
|
style="margin-right: 10px ;margin-bottom: 10px;" start-placeholder="开始时间"
|
||||||
end-placeholder="结束时间" />
|
end-placeholder="结束时间" />
|
||||||
<el-input style="margin-right: 10px ;width:180px;" v-model="queryParams.carrierName" clearable
|
<el-input style="margin-right: 10px ;width:200px;" v-model="queryParams.carrierName" clearable
|
||||||
@change="getdata()" placeholder="载机名称"></el-input>
|
@change="getdata()" placeholder="载机名称"></el-input>
|
||||||
<el-input style="margin-right: 10px ;width:180px;" v-model="queryParams.deviceCode" clearable
|
<el-input style="margin-right: 10px ;width:200px;" v-model="queryParams.deviceCode" clearable
|
||||||
@change="getdata()" placeholder="设备代号_编号"></el-input>
|
@change="getdata()" placeholder="设备代号_编号"></el-input>
|
||||||
<el-input style="margin-right: 10px ;width:380px;" v-model="queryParams.testDescribe" clearable
|
<el-input style="margin-right: 10px ;width:380px;" v-model="queryParams.testDescribe" clearable
|
||||||
@change="getdata()" placeholder="试验描述"></el-input>
|
@change="getdata()" placeholder="试验描述"></el-input>
|
||||||
<el-input style="margin-right: 10px ;width:380px;" v-model="queryParams.sensorDescribe" clearable
|
<el-input style="margin-right: 10px ;width:380px;" v-model="queryParams.sensorDescribe" clearable
|
||||||
@change="getdata()" placeholder="传感器描述"></el-input>
|
@change="getdata()" placeholder="传感器描述"></el-input>
|
||||||
|
<el-input v-for="item in result2" style="margin:10px 10px 0px 0px;width:180px;" v-model="queryParams[item.code]"
|
||||||
|
clearable @change="getdata()" :placeholder="item.name"></el-input>
|
||||||
|
|
||||||
<el-button type="primary" @click="getdata()">搜索</el-button>
|
<el-button 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>
|
||||||
<el-button type="primary" @click="delprojectArr()" :disabled="tableIdarr.length == 0">删除</el-button>
|
<el-button type="primary" @click="delprojectArr()" :disabled="tableIdarr.length == 0">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
</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(64vh);margin-bottom: 20px;" border>
|
||||||
@ -403,18 +429,11 @@ function attributeclose() {
|
|||||||
scope.row.taskEnddate : '' }}</span>
|
scope.row.taskEnddate : '' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="description" label="自定义属性" width="100">
|
|
||||||
<template #default="scope">
|
|
||||||
<div class="ellipsis1">
|
|
||||||
<img src="@/assets/MenuIcon/xqing.png" alt="" title="详情"
|
|
||||||
@click="attribute(scope.row.taskProps)" style="cursor: pointer;">
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="taskPlace" label="任务地点" width="180"></el-table-column>
|
<el-table-column prop="taskPlace" label="任务地点" width="180"></el-table-column>
|
||||||
<el-table-column prop="taskPerson" label="任务人员" width="280"></el-table-column>
|
<el-table-column prop="taskPerson" label="任务人员" width="280"></el-table-column>
|
||||||
<el-table-column prop="carrierName" label="载机名称" width="180"></el-table-column>
|
<el-table-column prop="carrierName" label="载机名称" width="180"></el-table-column>
|
||||||
<el-table-column prop="deviceCode" label="设备代号_编号" width="180"></el-table-column>
|
<el-table-column prop="deviceCode" label="设备代号_编号" width="180"></el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="testDescribe" label="试验描述" width="320">
|
<el-table-column prop="testDescribe" label="试验描述" width="320">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- <span>{{ scope.row.testDescribe }}</span> -->
|
<!-- <span>{{ scope.row.testDescribe }}</span> -->
|
||||||
@ -446,6 +465,8 @@ function attributeclose() {
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column v-for="item in result2" :prop="item.code" :label="item.name"
|
||||||
|
width="180"></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<Page :total="total" v-model:size="queryParams.size" v-model:current="queryParams.current"
|
<Page :total="total" v-model:size="queryParams.size" v-model:current="queryParams.current"
|
||||||
@pagination="getdata()">
|
@pagination="getdata()">
|
||||||
@ -478,22 +499,7 @@ function attributeclose() {
|
|||||||
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;">
|
|
||||||
<el-form-item label="本地存储空间" prop="localStorageId" style="width: 50%;">
|
|
||||||
<el-select v-model="projectForme.localStorageId" clearable placeholder=" "
|
|
||||||
:disabled="projectForme.id">
|
|
||||||
<el-option v-for="item in localarr" :key="item.id" :label="item.name"
|
|
||||||
:value="item.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="minio存储空间" prop="backupStorageId" style="width: 50%;margin-left: 15px;">
|
|
||||||
<el-select v-model="projectForme.backupStorageId" clearable placeholder=" "
|
|
||||||
:disabled="projectForme.id">
|
|
||||||
<el-option v-for="item in minioarr" :key="item.id" :label="item.name"
|
|
||||||
:value="item.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</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 v-model="projectForme.taskPlace" maxlength="500" show-word-limit />
|
<el-input v-model="projectForme.taskPlace" maxlength="500" show-word-limit />
|
||||||
@ -520,6 +526,22 @@ function attributeclose() {
|
|||||||
<el-form-item label="传感器描述">
|
<el-form-item label="传感器描述">
|
||||||
<el-input v-model="projectForme.sensorDescribe" :rows="12" type="textarea" show-word-limit />
|
<el-input v-model="projectForme.sensorDescribe" :rows="12" type="textarea" show-word-limit />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<div style="width: 100%;display: flex;justify-content: space-between;align-items: center;">
|
||||||
|
<el-form-item label="本地存储空间" prop="localStorageId" style="width: 50%;">
|
||||||
|
<el-select v-model="projectForme.localStorageId" clearable placeholder=" "
|
||||||
|
:disabled="shidou">
|
||||||
|
<el-option v-for="item in localarr" :key="item.id" :label="item.name"
|
||||||
|
:value="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="minio存储空间" prop="backupStorageId" style="width: 50%;margin-left: 15px;">
|
||||||
|
<el-select v-model="projectForme.backupStorageId" clearable placeholder=" "
|
||||||
|
:disabled="shidou">
|
||||||
|
<el-option v-for="item in minioarr" :key="item.id" :label="item.name"
|
||||||
|
:value="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
<!-- <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> -->
|
||||||
@ -549,7 +571,7 @@ function attributeclose() {
|
|||||||
<el-button type="primary" @click="labledsure()">确定</el-button>
|
<el-button type="primary" @click="labledsure()">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog :title="'自定义属性详情'" v-model="attbute" width="1200px" :before-close="attributeclose" top="30px"
|
<!-- <el-dialog :title="'自定义属性详情'" v-model="attbute" width="1200px" :before-close="attributeclose" top="30px"
|
||||||
draggable :close-on-click-modal="false" destroy-on-close>
|
draggable :close-on-click-modal="false" destroy-on-close>
|
||||||
<el-table v-if="result2.length > 0" v-loading="attloading" :data="result1"
|
<el-table v-if="result2.length > 0" v-loading="attloading" :data="result1"
|
||||||
:header-cell-style="{ background: 'rgb(250 250 250)', color: '#383838', height: '50px' }"
|
:header-cell-style="{ background: 'rgb(250 250 250)', color: '#383838', height: '50px' }"
|
||||||
@ -560,7 +582,7 @@ function attributeclose() {
|
|||||||
style="width: 100%;height: 285px;display: flex;align-items: center;justify-content: center;border: 1px solid #ebeef5;">
|
style="width: 100%;height: 285px;display: flex;align-items: center;justify-content: center;border: 1px solid #ebeef5;">
|
||||||
<el-empty description="暂无数据" />
|
<el-empty description="暂无数据" />
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog> -->
|
||||||
<el-dialog :title="title" v-model="logqing" width="60%" :before-close="handleClose1" top="30px" draggable
|
<el-dialog :title="title" v-model="logqing" width="60%" :before-close="handleClose1" top="30px" draggable
|
||||||
:close-on-click-modal="false" destroy-on-close>
|
:close-on-click-modal="false" destroy-on-close>
|
||||||
<div class="texlog">
|
<div class="texlog">
|
||||||
@ -612,7 +634,7 @@ function attributeclose() {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
// align-items: center;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
|
||||||
.sou_title_left {
|
.sou_title_left {
|
||||||
|
Loading…
Reference in New Issue
Block a user