UPDATE: 1、子计划管理,筛选条件改成搜索、设备厂家、是否分配;

2、重复导入子计划时,增量被检设备并删除未检设备;
        3、优化删除子计划后,刷新主计划信息;
This commit is contained in:
贾同学
2025-09-25 08:49:15 +08:00
parent ab62e56bbb
commit 4fe239c86f
5 changed files with 275 additions and 260 deletions

View File

@@ -32,7 +32,6 @@
</el-button>
<el-button
type="primary"
v-auth.plan="'import_subplan'"
icon="Upload"
@click="importSubClick"
v-if="modeStore.currentMode === '比对式'"
@@ -140,6 +139,7 @@
<ChildrenPlan
:refresh-table="refreshTable"
:current-plan="selectedPlan"
ref="childrenPlanView"
:width="viewWidth"
:height="viewHeight"
@@ -158,7 +158,7 @@ import {
importPlan,
importSubPlan,
staticsAnalyse
} from '@/api/plan/plan.ts'
} from '@/api/plan/plan'
import { computed, onMounted, reactive, ref, watch } from 'vue'
import type { Plan } from '@/api/plan/interface'
import PlanPopup from '@/views/plan/planList/components/planPopup.vue' // 导入子组件
@@ -171,8 +171,8 @@ import TestSourcePopup from '@/views/machine/testSource/components/testSourcePop
import { type TestSource } from '@/api/device/interface/testSource'
import { useModeStore } from '@/stores/modules/mode' // 引入模式 store
import { useHandleData } from '@/hooks/useHandleData'
import { dictReportState, dictResult, dictTestState } from '@/api/plan/planData.ts'
import { getTestSourceById } from '@/api/device/testSource/index'
import { dictReportState, dictResult, dictTestState } from '@/api/plan/planData'
import { getTestSourceById } from '@/api/device/testSource'
import ImportExcel from '@/components/ImportExcel/index.vue'
import ImportZip from '@/components/ImportZip/index.vue'
import { useDownload } from '@/hooks/useDownload'
@@ -198,6 +198,7 @@ const currentPage = ref(1)
const pageSize = ref(10)
const currentPageData = ref<any[]>([]) //当前页的数据
const patternId = ref('')
const selectedPlan = ref()
onMounted(async () => {
refreshTable()
@@ -634,7 +635,8 @@ const handleDelete = async (params: Plan.ReqPlanParams) => {
}
const openChildrenPlan = (row: Partial<Plan.ReqPlan> = {}) => {
childrenPlanView.value.open('检测计划详情', row, patternId.value)
selectedPlan.value = row
childrenPlanView.value.open('子计划管理', row, patternId.value)
}
const statisticalAnalysisMore = async (ids: string[], rows: Plan.ReqPlan[]) => {
@@ -659,7 +661,7 @@ const importSubClick = () => {
title: '导入检测计划',
patternId: dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? '',
importApi: importSubPlan,
confirmMessage: '本次导入会覆盖已有数据信息,是否确认继续?'
confirmMessage: '本次导入会覆盖已有系统配置数据,是否确认继续?'
}
planImportZip.value?.acceptParams(params)
}