From 6a5c78341980b82b15f2125944dcc72ab3156466 Mon Sep 17 00:00:00 2001 From: GYYM <704080176@qq.com> Date: Tue, 12 Nov 2024 20:35:12 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E3=80=81=E9=A2=84=E6=A3=80=E6=B5=8B=E3=80=81?= =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E6=A3=80=E6=B5=8B=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/plan/interface/index.ts | 1 + frontend/src/api/plan/planData.ts | 4 + .../home/components/changeErrSysPopup.vue | 136 +++++++++ frontend/src/views/home/components/table.vue | 51 ++-- frontend/src/views/home/components/tree.vue | 10 +- frontend/src/views/home/tabs/dashboard.vue | 211 +++++++++---- .../autoTest/components/ShowDataPopup.vue | 276 ++++++++++++++++++ frontend/src/views/plan/autoTest/index.vue | 225 ++++++++++++-- .../plan/planList/components/devTransfer.vue | 21 +- .../planList/components/sourceTransfer.vue | 119 ++++++++ .../views/plan/planList/components/temp.vue | 31 ++ frontend/src/views/plan/planList/index.vue | 90 +++++- frontend/src/views/plan/preTest/index.vue | 10 +- 13 files changed, 1070 insertions(+), 115 deletions(-) create mode 100644 frontend/src/views/home/components/changeErrSysPopup.vue create mode 100644 frontend/src/views/plan/autoTest/components/ShowDataPopup.vue create mode 100644 frontend/src/views/plan/planList/components/sourceTransfer.vue create mode 100644 frontend/src/views/plan/planList/components/temp.vue 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 @@ 导出 编辑 删除 - 所属设备 - 所属检测源 + 设备绑定 + 检测源绑定 + + + + - diff --git a/frontend/src/styles/element.scss b/frontend/src/styles/element.scss index b7d2e63..037f605 100644 --- a/frontend/src/styles/element.scss +++ b/frontend/src/styles/element.scss @@ -479,4 +479,16 @@ } } } +} + +.cn-render-buttons { + cursor: pointer; + display: inline-block; + margin-left: 13px; + line-height: 18px; + padding: 2px; + .icon { + font-size: 12px !important; + // color: var(--ba-bg-color-overlay) !important; + } } \ 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 385de39..4fa0fb7 100644 --- a/frontend/src/views/plan/planList/index.vue +++ b/frontend/src/views/plan/planList/index.vue @@ -1,88 +1,118 @@ + - - - + + - - + - - + - - + + - + }, + { + prop: 'resourcesId', + label: '报表数据来源', + width: 180, + enum: dictStore.getDictData('Data_Day'), + fieldNames: { label: 'name', value: 'code' } + }, + { + prop: 'operation', + label: '操作', + fixed: 'right', + minWidth: 200, + }, +]) + + +// 打开 drawer(新增、编辑) +const openDialog = (titleType: string, row: Partial = {}) => { + pqPopup.value?.open(titleType, row) + +} + +// 批量删除字典类型 +const batchDelete = async (id: string[]) => { + await useHandleData(deleteDictPq, id, '删除所选字典类型') + proTable.value?.clearSelection() + proTable.value?.getTableList() +} + +// 删除字典类型 +const handleDelete = async (params: Dict.ResDictPq) => { + await useHandleData(deleteDictPq, [params.id], `删除【${params.name}】指标字典类型`) + proTable.value?.getTableList() +} + + + \ No newline at end of file diff --git a/frontend/src/views/system/dictionary/dictType/components/typePopup.vue b/frontend/src/views/system/dictionary/dictType/components/typePopup.vue index 38b7daf..6911b5f 100644 --- a/frontend/src/views/system/dictionary/dictType/components/typePopup.vue +++ b/frontend/src/views/system/dictionary/dictType/components/typePopup.vue @@ -9,13 +9,13 @@ - + - + diff --git a/frontend/src/views/system/dictionary/dictType/index.vue b/frontend/src/views/system/dictionary/dictType/index.vue index 73594a0..720c428 100644 --- a/frontend/src/views/system/dictionary/dictType/index.vue +++ b/frontend/src/views/system/dictionary/dictType/index.vue @@ -30,13 +30,11 @@ import { CirclePlus, Delete, Download, EditPen, View } from '@element-plus/icons import { Dict } from '@/api/system/dictionary/interface' import { ColumnProps, ProTableInstance } from '@/components/ProTable/interface' import DictData from '@/views/system/dictionary/dictData/index.vue' -import { useDictStore } from '@/stores/modules/dict' import { useHandleData } from '@/hooks/useHandleData' import { useViewSize } from '@/hooks/useViewSize' import { useDownload } from '@/hooks/useDownload' import { deleteDictType, getDictTypeList, exportDictType } from '@/api/system/dictionary/dictType' -const dictStore = useDictStore() const { popupBaseView, viewWidth, viewHeight } = useViewSize() const proTable = ref() @@ -57,7 +55,7 @@ const columns = reactive[]>([ { prop: 'code', label: '类型编码', - minWidth: 200, + minWidth: 220, search: { el: 'input', }, @@ -65,7 +63,7 @@ const columns = reactive[]>([ { prop: 'remark', label: '描述', - minWidth: 300, + minWidth: 250, }, { prop: 'sort', @@ -81,7 +79,7 @@ const columns = reactive[]>([ prop: 'operation', label: '操作', fixed: 'right', - minWidth: 300, + minWidth: 250, }, ])