微调
This commit is contained in:
@@ -27,64 +27,64 @@ export const staticRouter: RouteRecordRaw[] = [
|
||||
name: "plan",
|
||||
redirect: "/plan/planList",
|
||||
children: [
|
||||
{
|
||||
path: "/plan/planList",
|
||||
name: "planList",
|
||||
component: () => import("@/views/plan/planList/index.vue"),
|
||||
meta: {
|
||||
title: "检测计划列表",
|
||||
icon: "List",
|
||||
isLink: "",
|
||||
isHide: false,
|
||||
isFull: false,
|
||||
isAffix: false,
|
||||
isKeepAlive: true,//缓存改成true
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/plan/singlePlanList",
|
||||
name: "singlePlanList",
|
||||
component: () => import("@/views/plan/singlePlanList/index.vue"),
|
||||
meta: {
|
||||
title: "单个计划列表",
|
||||
icon: "List",
|
||||
isLink: "",
|
||||
isHide: false,
|
||||
isFull: false,
|
||||
isAffix: false,
|
||||
isKeepAlive: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/plan/preTest",
|
||||
name: "preTest",
|
||||
component: () => import("@/views/plan/preTest/index.vue"),
|
||||
meta: {
|
||||
title: "预检测",
|
||||
icon: "List",
|
||||
isLink: "",
|
||||
isHide: false,
|
||||
isFull: false,
|
||||
isAffix: false,
|
||||
isKeepAlive: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/plan/autoTest",
|
||||
name: "autoTest",
|
||||
component: () => import("@/views/plan/autoTest/index.vue"),
|
||||
meta: {
|
||||
title: "自动检测",
|
||||
icon: "List",
|
||||
isLink: "",
|
||||
hideTab:true,
|
||||
parentPath:'/system/proTable',
|
||||
isHide: false,
|
||||
isFull: false,
|
||||
isAffix: false,
|
||||
isKeepAlive: true,
|
||||
},
|
||||
},
|
||||
// {
|
||||
// path: "/plan/planList",
|
||||
// name: "planList",
|
||||
// component: () => import("@/views/plan/planList/index.vue"),
|
||||
// meta: {
|
||||
// title: "检测计划列表",
|
||||
// icon: "List",
|
||||
// isLink: "",
|
||||
// isHide: false,
|
||||
// isFull: false,
|
||||
// isAffix: false,
|
||||
// isKeepAlive: true,//缓存改成true
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "/plan/singlePlanList",
|
||||
// name: "singlePlanList",
|
||||
// component: () => import("@/views/plan/singlePlanList/index.vue"),
|
||||
// meta: {
|
||||
// title: "单个计划列表",
|
||||
// icon: "List",
|
||||
// isLink: "",
|
||||
// isHide: false,
|
||||
// isFull: false,
|
||||
// isAffix: false,
|
||||
// isKeepAlive: true,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "/plan/preTest",
|
||||
// name: "preTest",
|
||||
// component: () => import("@/views/plan/preTest/index.vue"),
|
||||
// meta: {
|
||||
// title: "预检测",
|
||||
// icon: "List",
|
||||
// isLink: "",
|
||||
// isHide: false,
|
||||
// isFull: false,
|
||||
// isAffix: false,
|
||||
// isKeepAlive: false,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// path: "/plan/autoTest",
|
||||
// name: "autoTest",
|
||||
// component: () => import("@/views/plan/autoTest/index.vue"),
|
||||
// meta: {
|
||||
// title: "自动检测",
|
||||
// icon: "List",
|
||||
// isLink: "",
|
||||
// hideTab:true,
|
||||
// parentPath:'/system/proTable',
|
||||
// isHide: false,
|
||||
// isFull: false,
|
||||
// isAffix: false,
|
||||
// isKeepAlive: true,
|
||||
// },
|
||||
// },
|
||||
{
|
||||
path: "/machine/testScriptAdd",
|
||||
name: "testScriptAdd",
|
||||
|
||||
@@ -97,7 +97,6 @@ const save = () => {}
|
||||
|
||||
// 打开弹窗,可能是新增,也可能是编辑
|
||||
const open = async (sign: string, row: any, currentMode: string, id: string) => {
|
||||
|
||||
const result = await getDictTreeByCode({ code: 'Script_Indicator_Items' })
|
||||
|
||||
const allOptions = convertToOptions(result.data as Dict.ResDictTree[])
|
||||
|
||||
@@ -152,6 +152,7 @@ const openDialog = (titleType: string, row: Partial<TestScript.ResTestScript> =
|
||||
state: { title: '新增检测脚本', row: row, mode: modeStore.currentMode }
|
||||
})
|
||||
} else {
|
||||
|
||||
testScriptPopup.value?.open(titleType, row, modeStore.currentMode, '')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
<div>
|
||||
<el-transfer v-model="value"
|
||||
filterable
|
||||
:filter-method="filterMethod"
|
||||
filter-placeholder="请输入内容搜索"
|
||||
:data="allData"
|
||||
:titles="['未绑定设备', '已绑定设备']">
|
||||
:filter-method="filterMethod"
|
||||
filter-placeholder="请输入内容搜索"
|
||||
:data="allData"
|
||||
:titles="['未绑定设备', '已绑定设备']">
|
||||
<template #default="{ option }">
|
||||
<el-tooltip :content="option.tips" placement="top" :show-after=1000>
|
||||
<span>{{ option.label }}</span>
|
||||
@@ -69,6 +69,8 @@ const filterMethod = (query: string, item: { label?: string }) => {
|
||||
dialogVisible.value = true
|
||||
planData.value = data
|
||||
|
||||
console.log('123')
|
||||
|
||||
const pqDevList_Result1 = await getUnboundPqDevList(data);
|
||||
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[];
|
||||
|
||||
value.value = boundPqDevList.value.map((i: { id: { toString: () => any } }) => i.id.toString());
|
||||
console.log('123',value.value)
|
||||
}
|
||||
const close = () => {
|
||||
dialogVisible.value = false
|
||||
|
||||
}
|
||||
|
||||
const save = async () => {
|
||||
|
||||
@@ -214,12 +214,13 @@ const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
||||
|
||||
// 关闭弹窗
|
||||
const close = () => {
|
||||
value.value = []
|
||||
dialogVisible.value = false
|
||||
// 清空dialogForm中的值
|
||||
resetFormContent()
|
||||
// 重置表单
|
||||
dialogFormRef.value?.resetFields()
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -278,7 +279,8 @@ const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
||||
const open = async (sign: string,
|
||||
data: Plan.ReqPlan,
|
||||
currentMode: string,) => {
|
||||
|
||||
|
||||
value.value = []
|
||||
//处理异步调用
|
||||
const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== currentMode)?.id ?? ''
|
||||
data.pattern = patternId
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<el-button type='danger' v-auth.plan="'delete'" :icon='Delete' plain :disabled='!scope.isSelected' @click='batchDelete(scope.selectedListIds)'>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button type='primary' v-auth.plan="'analysis'" link :icon='List' @click='statisticalAnalysisMore(scope.selectedListIds)'>统计分析</el-button>
|
||||
</template>
|
||||
<!-- 表格操作 -->
|
||||
<template #operation='scope'>
|
||||
@@ -394,6 +395,10 @@ const showDeviceOpen = (row: Partial<Plan.ReqPlan> = {}) => {
|
||||
|
||||
const myDict = new Map<string, any[]>();
|
||||
|
||||
const statisticalAnalysisMore = async (id: string[]) =>{
|
||||
|
||||
}
|
||||
|
||||
const statisticalAnalysis = async (row: Partial<Plan.ReqPlan> = {}) => {
|
||||
useDownload(staticsAnalyse,row.name+'分析结果', {planId:row.id}, false,'.xlsx')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user