diff --git a/frontend/src/views/machine/testScript/components/testScriptPopup.vue b/frontend/src/views/machine/testScript/components/testScriptPopup.vue index 0480299..6827808 100644 --- a/frontend/src/views/machine/testScript/components/testScriptPopup.vue +++ b/frontend/src/views/machine/testScript/components/testScriptPopup.vue @@ -13,17 +13,23 @@ - + + + + - + + + + + + + + + + + @@ -100,6 +106,8 @@ const modeId = ref() const show = ref(false) const height = ref('125px') const router = useRouter() +const standardNameList = reactive<{id:string,label: string, value: string}[]>([]) +const standardTimeList = reactive>([]) const secondLevelOptions: any[] = [] // 定义弹出组件元信息 @@ -166,6 +174,15 @@ const close = () => { // 关闭信息弹框 const closeInformation = () => {} +const setStandardTimeList = ()=>{ + let checkStandard = standardNameList.find(item => item.label === formContent.value.standardName) + if (checkStandard) { + standardTimeList.push(...checkStandard.value.split(',')) + } else { + standardTimeList.push('2016', '2017', '2018', '2019', '2020', '2021', '2022', '2023', '2024', '2025') + } +} + // 保存数据 const save = () => { // dialogFormRef @@ -197,6 +214,10 @@ const save = () => { // 打开弹窗,可能是新增,也可能是编辑 const open = async (title: string, row: any) => { + dictStore.getDictData("Script_Standard_Name").forEach(item => { + standardNameList.push({id: item.id, label: item.name, value: item.value}) + }) + titleType.value = title if (title == '新增检测脚本') { show.value = false