This commit is contained in:
sjl
2025-02-17 16:28:59 +08:00
parent 942bae3045
commit 6e6cfa5be0
6 changed files with 76 additions and 65 deletions

View File

@@ -27,64 +27,64 @@ export const staticRouter: RouteRecordRaw[] = [
name: "plan", name: "plan",
redirect: "/plan/planList", redirect: "/plan/planList",
children: [ children: [
{ // {
path: "/plan/planList", // path: "/plan/planList",
name: "planList", // name: "planList",
component: () => import("@/views/plan/planList/index.vue"), // component: () => import("@/views/plan/planList/index.vue"),
meta: { // meta: {
title: "检测计划列表", // title: "检测计划列表",
icon: "List", // icon: "List",
isLink: "", // isLink: "",
isHide: false, // isHide: false,
isFull: false, // isFull: false,
isAffix: false, // isAffix: false,
isKeepAlive: true,//缓存改成true // isKeepAlive: true,//缓存改成true
}, // },
}, // },
{ // {
path: "/plan/singlePlanList", // path: "/plan/singlePlanList",
name: "singlePlanList", // name: "singlePlanList",
component: () => import("@/views/plan/singlePlanList/index.vue"), // component: () => import("@/views/plan/singlePlanList/index.vue"),
meta: { // meta: {
title: "单个计划列表", // title: "单个计划列表",
icon: "List", // icon: "List",
isLink: "", // isLink: "",
isHide: false, // isHide: false,
isFull: false, // isFull: false,
isAffix: false, // isAffix: false,
isKeepAlive: true, // isKeepAlive: true,
}, // },
}, // },
{ // {
path: "/plan/preTest", // path: "/plan/preTest",
name: "preTest", // name: "preTest",
component: () => import("@/views/plan/preTest/index.vue"), // component: () => import("@/views/plan/preTest/index.vue"),
meta: { // meta: {
title: "预检测", // title: "预检测",
icon: "List", // icon: "List",
isLink: "", // isLink: "",
isHide: false, // isHide: false,
isFull: false, // isFull: false,
isAffix: false, // isAffix: false,
isKeepAlive: false, // isKeepAlive: false,
}, // },
}, // },
{ // {
path: "/plan/autoTest", // path: "/plan/autoTest",
name: "autoTest", // name: "autoTest",
component: () => import("@/views/plan/autoTest/index.vue"), // component: () => import("@/views/plan/autoTest/index.vue"),
meta: { // meta: {
title: "自动检测", // title: "自动检测",
icon: "List", // icon: "List",
isLink: "", // isLink: "",
hideTab:true, // hideTab:true,
parentPath:'/system/proTable', // parentPath:'/system/proTable',
isHide: false, // isHide: false,
isFull: false, // isFull: false,
isAffix: false, // isAffix: false,
isKeepAlive: true, // isKeepAlive: true,
}, // },
}, // },
{ {
path: "/machine/testScriptAdd", path: "/machine/testScriptAdd",
name: "testScriptAdd", name: "testScriptAdd",

View File

@@ -97,7 +97,6 @@ const save = () => {}
// 打开弹窗,可能是新增,也可能是编辑 // 打开弹窗,可能是新增,也可能是编辑
const open = async (sign: string, row: any, currentMode: string, id: string) => { const open = async (sign: string, row: any, currentMode: string, id: string) => {
const result = await getDictTreeByCode({ code: 'Script_Indicator_Items' }) const result = await getDictTreeByCode({ code: 'Script_Indicator_Items' })
const allOptions = convertToOptions(result.data as Dict.ResDictTree[]) const allOptions = convertToOptions(result.data as Dict.ResDictTree[])

View File

@@ -152,6 +152,7 @@ const openDialog = (titleType: string, row: Partial<TestScript.ResTestScript> =
state: { title: '新增检测脚本', row: row, mode: modeStore.currentMode } state: { title: '新增检测脚本', row: row, mode: modeStore.currentMode }
}) })
} else { } else {
testScriptPopup.value?.open(titleType, row, modeStore.currentMode, '') testScriptPopup.value?.open(titleType, row, modeStore.currentMode, '')
} }
} }

View File

@@ -69,6 +69,8 @@ const filterMethod = (query: string, item: { label?: string }) => {
dialogVisible.value = true dialogVisible.value = true
planData.value = data planData.value = data
console.log('123')
const pqDevList_Result1 = await getUnboundPqDevList(data); const pqDevList_Result1 = await getUnboundPqDevList(data);
unboundPqDevList.value = pqDevList_Result1.data as Device.ReqPqDevParams[]; unboundPqDevList.value = pqDevList_Result1.data as Device.ReqPqDevParams[];
@@ -76,9 +78,11 @@ const filterMethod = (query: string, item: { label?: string }) => {
boundPqDevList.value = pqDevList_Result2.data as Device.ReqPqDevParams[]; boundPqDevList.value = pqDevList_Result2.data as Device.ReqPqDevParams[];
value.value = boundPqDevList.value.map((i: { id: { toString: () => any } }) => i.id.toString()); value.value = boundPqDevList.value.map((i: { id: { toString: () => any } }) => i.id.toString());
console.log('123',value.value)
} }
const close = () => { const close = () => {
dialogVisible.value = false dialogVisible.value = false
} }
const save = async () => { const save = async () => {

View File

@@ -214,6 +214,7 @@ const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
// 关闭弹窗 // 关闭弹窗
const close = () => { const close = () => {
value.value = []
dialogVisible.value = false dialogVisible.value = false
// 清空dialogForm中的值 // 清空dialogForm中的值
resetFormContent() resetFormContent()
@@ -279,6 +280,7 @@ const open = async (sign: string,
data: Plan.ReqPlan, data: Plan.ReqPlan,
currentMode: string,) => { currentMode: string,) => {
value.value = []
//处理异步调用 //处理异步调用
const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== currentMode)?.id ?? '' const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== currentMode)?.id ?? ''
data.pattern = patternId data.pattern = patternId

View File

@@ -16,6 +16,7 @@
<el-button type='danger' v-auth.plan="'delete'" :icon='Delete' plain :disabled='!scope.isSelected' @click='batchDelete(scope.selectedListIds)'> <el-button type='danger' v-auth.plan="'delete'" :icon='Delete' plain :disabled='!scope.isSelected' @click='batchDelete(scope.selectedListIds)'>
删除 删除
</el-button> </el-button>
<el-button type='primary' v-auth.plan="'analysis'" link :icon='List' @click='statisticalAnalysisMore(scope.selectedListIds)'>统计分析</el-button>
</template> </template>
<!-- 表格操作 --> <!-- 表格操作 -->
<template #operation='scope'> <template #operation='scope'>
@@ -394,6 +395,10 @@ const showDeviceOpen = (row: Partial<Plan.ReqPlan> = {}) => {
const myDict = new Map<string, any[]>(); const myDict = new Map<string, any[]>();
const statisticalAnalysisMore = async (id: string[]) =>{
}
const statisticalAnalysis = async (row: Partial<Plan.ReqPlan> = {}) => { const statisticalAnalysis = async (row: Partial<Plan.ReqPlan> = {}) => {
useDownload(staticsAnalyse,row.name+'分析结果', {planId:row.id}, false,'.xlsx') useDownload(staticsAnalyse,row.name+'分析结果', {planId:row.id}, false,'.xlsx')