预检测

This commit is contained in:
sjl
2025-08-06 15:18:27 +08:00
parent 83998f88ac
commit d0724cb7f6
12 changed files with 739 additions and 164 deletions

View File

@@ -5,7 +5,7 @@
<el-col :lg='4' :xl='4' :md='4' :sm='4'>
<div class='left_tree'>
<!-- <tree ref='treeRef' :updateSelectedTreeNode='getPieData || (() => {})' /> -->
<tree ref='treeRef' :updateSelectedTreeNode='updateData|| (() => {})' :width="viewWidth" :height="viewHeight" :planArray = 'planList2?.data'/>
<tree ref='treeRef' :updateSelectedTreeNode='updateData|| (() => {})' :width="viewWidth" :height="viewHeight" :planTable ='planTable'/>
</div>
</el-col>
<el-col :lg='20' :xl='20' :md='20' :sm='20'>
@@ -95,7 +95,7 @@
<el-tab-pane :label='tabLabel1' :style='{ height: tabPaneHeight}'>
<!-- 列表数据 -->
<div class='container_table' :style='{ height: tableHeight }'>
<Table ref='tableRef1' :id='currentId' :plan ='select_Plan' :planArray = 'planList2?.data' @batchGenerateClicked="handleBatchGenerate"></Table>
<Table ref='tableRef1' :id='currentId' :plan ='select_Plan' :planArray = 'planList2?.data' :planTable ='planTable' @batchGenerateClicked="handleBatchGenerate"></Table>
</div>
</el-tab-pane>
</el-tabs>
@@ -110,7 +110,7 @@ import { useRouter } from 'vue-router'
import tree from '../components/tree.vue'
import Table from '../components/table.vue'
import deviceDataList from '@/api/device/device/deviceData'
import { getBoundPqDevList, getPlanListByPattern } from '@/api/plan/plan.ts'
import { getBoundPqDevList, getPlanListByPattern,getPlanList } from '@/api/plan/plan.ts'
import { onBeforeMount, onUnmounted, ref, watch } from 'vue'
import { useModeStore } from '@/stores/modules/mode' // 引入模式 store
import { useDictStore } from '@/stores/modules/dict'
@@ -119,7 +119,6 @@ import type { CollapseModelValue } from 'element-plus/es/components/collapse/src
import { type Device } from '@/api/device/interface/device'
import { ResultData } from '@/api/interface'
import { useViewSize } from '@/hooks/useViewSize'
import { map } from 'lodash'
const planName = ref('')
const dictStore = useDictStore()
@@ -151,6 +150,7 @@ const planList = ref<ResultData<Plan.ReqPlan[]>>()
const planList2 = ref<ResultData<Plan.ReqPlan[]>>()//备份含子计划的结构
const select_Plan = ref<Plan.ReqPlan>()
const isLabelLineShow = ref(true)
const planTable = ref<any[]>([])
const { popupBaseView,viewWidth, viewHeight } = useViewSize()
const handleCollapseChange = (val: CollapseModelValue) => {
@@ -521,12 +521,21 @@ onBeforeMount(async () => {
}
getTree(planList.value)
getPieData(currentId.value)
if(modeStore.currentMode != '比对式')
return;
const patternId2 = dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id;
if (patternId2 !== undefined) {
planTable.value = await getPlanList({ 'patternId': patternId2 });
}
})
onUnmounted(() => {
onUnmounted(async () => {
if (chartsInfoRef.value) {
resizeObserver.unobserve(chartsInfoRef.value)
}
})
const handleBatchGenerate = async () => {