diff --git a/frontend/src/api/plan/interface/index.ts b/frontend/src/api/plan/interface/index.ts index a8bf0f1..d2df439 100644 --- a/frontend/src/api/plan/interface/index.ts +++ b/frontend/src/api/plan/interface/index.ts @@ -27,6 +27,7 @@ export namespace Plan { // 检测计划 + 检测源 export interface PlanAndSourceBO extends PlanBO { testSourceName: string;//计划所属检测源 + testSourceList?: string[];//临时测试 } // // 检测计划列表 // export interface PlanList { diff --git a/frontend/src/api/plan/planData.ts b/frontend/src/api/plan/planData.ts index 630be73..7d11bd8 100644 --- a/frontend/src/api/plan/planData.ts +++ b/frontend/src/api/plan/planData.ts @@ -178,6 +178,7 @@ const planData = ref([ 'test_State':'1', 'report_State':'1', 'result':'1', + }, { 'id': '2', @@ -191,6 +192,9 @@ const planData = ref([ 'test_State':'2', 'report_State':'2', 'result':'0', + "testSourceList":[ + '高精度设备-PQV520-1','高精度设备-PQV520-2', + ] }, { 'id': '3', diff --git a/frontend/src/views/home/components/changeErrSysPopup.vue b/frontend/src/views/home/components/changeErrSysPopup.vue new file mode 100644 index 0000000..0f1a3fd --- /dev/null +++ b/frontend/src/views/home/components/changeErrSysPopup.vue @@ -0,0 +1,136 @@ + + + \ No newline at end of file diff --git a/frontend/src/views/home/components/table.vue b/frontend/src/views/home/components/table.vue index ed35fa6..aec1327 100644 --- a/frontend/src/views/home/components/table.vue +++ b/frontend/src/views/home/components/table.vue @@ -81,29 +81,31 @@ - + > --> + @@ -116,7 +118,7 @@ import { ElMessage, ElMessageBox } from "element-plus"; import ProTable from "@/components/ProTable/index.vue"; import { type ProTableInstance, type ColumnProps } from '@/components/ProTable/interface' import { - Search, + Search,View,EditPen } from "@element-plus/icons-vue"; import { getPlanList } from "@/api/plan/planList"; import deviceDataList from '@/api/device/deviceData' @@ -129,7 +131,7 @@ const tableHeight = ref(0); console.log(window.innerHeight, "+++++++++"); tableHeight.value = window.innerHeight - 630; const deviceData = deviceDataList.plan_devicedata - +const operationShow = ref(false); //下拉框数据 //检测状态数据 let checkStatusList = reactive([ @@ -327,7 +329,7 @@ const columns = reactive[]>([ label: '归档状态', minWidth: 130, }, - // { prop: 'operation', label: '操作', fixed: 'right', minWidth: 200 }, + { prop: 'operation', label: '操作', fixed: 'right', minWidth: 150 ,isShow: operationShow}, ]) // 表格配置项 @@ -567,36 +569,41 @@ function tableHeaderInit(val: number) { form.value.checkResult = 0;//检测结果默认为未出结果 disableCheckStatus("检测中") disableCheckStatus("归档") + operationShow.value = false; break; case 2://设备复检 form.value.checkStatus = 2;//检测状态默认为检测完成 form.value.checkReportStatus = 0;//检测报告状态默认为未生成报告 form.value.checkResult = 1;//检测结果默认为不合格 - disableCheckStatus("未检") + disableCheckStatus("未检测") disableCheckStatus("检测中") disableCheckStatus("归档") disablecheckResultList("未出结果") + operationShow.value = false; break; case 3://报告生成 form.value.checkStatus = 2;//检测状态默认为检测完成 form.value.checkReportStatus = 0;//检测报告状态默认为未生成报告 form.value.checkResult = 2;//检测结果默认为合格 - disableCheckStatus("未检") + disableCheckStatus("未检测") disableCheckStatus("检测中") disableCheckStatus("归档") disablecheckResultList("未出结果") + operationShow.value = true; break; case 4://设备归档 form.value.checkStatus = 2;//检测状态默认为检测完成 form.value.checkReportStatus = 1;//检测报告状态默认为已生成报告 form.value.checkResult = 2;//检测结果默认为合格 - disableCheckStatus("未检") + disableCheckStatus("未检测") disableCheckStatus("检测中") disableCheckStatus("归档") disableCheckReportStatus("未生成报告") disablecheckResultList("未出结果") + operationShow.value = false; break; - case 5://报告浏览 + case 5://设备浏览 + operationShow.value = true; break; } } @@ -656,6 +663,16 @@ const handleTest = () => { } }; +// 打开 drawer(新增、查看、编辑) +const openDrawer = (title: string, row: any) => { + if (title === '报告查看') + console.log(title); + + else if (title === '误差体系编辑') + console.log(title); + +} + onMounted(() => { console.log(proTable.value?.tableData); }); diff --git a/frontend/src/views/home/components/tree.vue b/frontend/src/views/home/components/tree.vue index 72c3a77..14d2f2f 100644 --- a/frontend/src/views/home/components/tree.vue +++ b/frontend/src/views/home/components/tree.vue @@ -53,6 +53,9 @@ const getTreeData = (val: any) => { } const filterText = ref('') const treeRef = ref() +const {updateSelectedTreeNode} = defineProps<{ + updateSelectedTreeNode:Function; + }>(); watch( () => searchForm.value.planName, (val) => { @@ -64,6 +67,7 @@ watch( ) const handleNodeClick = (data) => { console.log(data) + updateSelectedTreeNode() } const filterNode = (value: string, data) => { if (!value) return true @@ -110,12 +114,12 @@ defineExpose({ getTreeData }) .tree_container { flex: 1; overflow-y: auto; - // width: 100%; - // overflow-x: auto; + width: 100%; + overflow-x: auto; .el-tree { height: 100%; - // width: 2000px; + width: 100%; } } } diff --git a/frontend/src/views/home/tabs/dashboard.vue b/frontend/src/views/home/tabs/dashboard.vue index 4e7111e..bea076f 100644 --- a/frontend/src/views/home/tabs/dashboard.vue +++ b/frontend/src/views/home/tabs/dashboard.vue @@ -2,7 +2,7 @@ + \ No newline at end of file diff --git a/frontend/src/views/plan/autoTest/index.vue b/frontend/src/views/plan/autoTest/index.vue index 1205dd4..9ae0ef8 100644 --- a/frontend/src/views/plan/autoTest/index.vue +++ b/frontend/src/views/plan/autoTest/index.vue @@ -1,7 +1,25 @@ - +
@@ -74,9 +92,18 @@ v-for="(item, index) in deviceTestList" :key="index" > -

+ + + {{ vv.label }} +

@@ -106,7 +133,10 @@

- + + + + + \ No newline at end of file diff --git a/frontend/src/views/plan/planList/components/temp.vue b/frontend/src/views/plan/planList/components/temp.vue new file mode 100644 index 0000000..9bbec88 --- /dev/null +++ b/frontend/src/views/plan/planList/components/temp.vue @@ -0,0 +1,31 @@ + + + + \ No newline at end of file diff --git a/frontend/src/views/plan/planList/index.vue b/frontend/src/views/plan/planList/index.vue index a518017..385de39 100644 --- a/frontend/src/views/plan/planList/index.vue +++ b/frontend/src/views/plan/planList/index.vue @@ -21,11 +21,12 @@ 导出 编辑 删除 - 所属设备 - 所属检测源 + 设备绑定 + 检测源绑定 + + + + -