报告模版新增pattern字段
This commit is contained in:
@@ -200,10 +200,10 @@
|
||||
placeholder="请选择报告模版"
|
||||
>
|
||||
<el-option
|
||||
v-for="(option, index) in pqReportName"
|
||||
:key="index"
|
||||
:label="option.name"
|
||||
:value="option.name"
|
||||
v-for="option in pqReportName"
|
||||
:key="option.id"
|
||||
:label="option.displayName"
|
||||
:value="option.displayName"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -454,7 +454,8 @@ import { type TestSource } from '@/api/device/interface/testSource'
|
||||
import { type TestScript } from '@/api/device/interface/testScript'
|
||||
import { type ErrorSystem } from '@/api/device/interface/error'
|
||||
import { type Device } from '@/api/device/interface/device'
|
||||
import { getPqReportAllName } from '@/api/device/report'
|
||||
import { type PqReport } from '@/api/device/interface/report'
|
||||
import { getPqReportOptions } from '@/api/device/report'
|
||||
import { useAppSceneStore, useModeStore } from '@/stores/modules/mode'
|
||||
import { canBindingList, getAllPqStandardDev } from '@/api/device/standardDevice'
|
||||
import { type StandardDevice } from '@/api/device/interface/standardDevice'
|
||||
@@ -482,7 +483,7 @@ const pqErrSysList = ref<ErrorSystem.ErrorSystemList[]>([]) //获取指定模式
|
||||
const pqDevList = ref<Device.ResPqDev[]>([]) //获取指定模式下所有被检设备
|
||||
const pqStandardDevList = ref<StandardDevice.ResPqStandardDevice[]>([]) //获取指定模式下所有标准设备
|
||||
|
||||
const pqReportName = ref<{ name: string }[]>([])
|
||||
const pqReportName = ref<PqReport.ResReportOption[]>([])
|
||||
|
||||
const pqSourceArray = ref<{ label: string; value: string }[]>()
|
||||
const pqScriptArray = ref<{ label: string; value: string,fluke?:number|boolean}[]>()
|
||||
@@ -864,7 +865,7 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
|
||||
] = await Promise.all([
|
||||
getPqErrSysList(),
|
||||
getUnboundPqDevList({ pattern: data.pattern }),
|
||||
getPqReportAllName(),
|
||||
getPqReportOptions({ pattern: data.pattern || patternId }),
|
||||
canBindingList(),
|
||||
getTestConfig(),
|
||||
getRegRes({ type: patternId }),
|
||||
@@ -904,15 +905,11 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
|
||||
getPqScriptList(data),
|
||||
getPqErrSysList(),
|
||||
getUnboundPqDevList({ pattern: data.pattern }),
|
||||
getPqReportAllName()
|
||||
getPqReportOptions({ pattern: data.pattern || patternId })
|
||||
])
|
||||
}
|
||||
|
||||
if (Array.isArray(pqReportName_Result.data)) {
|
||||
pqReportName.value = pqReportName_Result.data.map((item: any) => ({ name: item }))
|
||||
} else {
|
||||
pqReportName.value = []
|
||||
}
|
||||
pqReportName.value = Array.isArray(pqReportName_Result.data) ? pqReportName_Result.data : []
|
||||
pqSourceList.value = pqSource_Result.data as TestSource.ResTestSource[]
|
||||
pqScriptList.value = PqScript_Result.data as TestScript.ResTestScript[]
|
||||
pqErrSysList.value = PqErrSys_Result.data as unknown as ErrorSystem.ErrorSystemList[]
|
||||
@@ -978,7 +975,7 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
|
||||
getPqErrSysList(),
|
||||
getBoundPqDevList({ planIdList: [data.id] }),
|
||||
getUnboundPqDevList({ pattern: data.pattern }),
|
||||
getPqReportAllName(),
|
||||
getPqReportOptions({ pattern: data.pattern || patternId }),
|
||||
getAllPqStandardDev(),
|
||||
getAllUser()
|
||||
])
|
||||
@@ -1027,15 +1024,11 @@ const open = async (sign: string, data: Plan.ReqPlan, currentMode: string, plan:
|
||||
getPqErrSysList(),
|
||||
getBoundPqDevList({ planIdList: [data.id] }),
|
||||
getUnboundPqDevList({ pattern: data.pattern }),
|
||||
getPqReportAllName()
|
||||
getPqReportOptions({ pattern: data.pattern || patternId })
|
||||
])
|
||||
}
|
||||
|
||||
if (Array.isArray(pqReportName_Result.data)) {
|
||||
pqReportName.value = pqReportName_Result.data.map((item: any) => ({ name: item }))
|
||||
} else {
|
||||
pqReportName.value = []
|
||||
}
|
||||
pqReportName.value = Array.isArray(pqReportName_Result.data) ? pqReportName_Result.data : []
|
||||
|
||||
pqSourceList.value = pqSource_Result.data as TestSource.ResTestSource[]
|
||||
pqScriptList.value = PqScript_Result.data as TestScript.ResTestScript[]
|
||||
|
||||
Reference in New Issue
Block a user