From f06ca03881851bcda96b821f48cffe1e24cd3124 Mon Sep 17 00:00:00 2001
From: sjl <1716605279@qq.com>
Date: Mon, 24 Mar 2025 14:59:45 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../plan/planList/components/planPopup.vue | 28 +++++--------------
.../template/components/reportPopup.vue | 3 ++
frontend/src/views/system/template/index.vue | 2 +-
3 files changed, 11 insertions(+), 22 deletions(-)
diff --git a/frontend/src/views/plan/planList/components/planPopup.vue b/frontend/src/views/plan/planList/components/planPopup.vue
index 7b422eb..9c0d391 100644
--- a/frontend/src/views/plan/planList/components/planPopup.vue
+++ b/frontend/src/views/plan/planList/components/planPopup.vue
@@ -61,7 +61,7 @@
-
+
-
-
-
-
-
+
@@ -131,7 +122,7 @@
const pqDevList=ref([])//获取指定模式下所有检测源
const pqReportName = ref<{ name: string }[]>([])
- const pqReportVersion = ref<{ version: string}[]>([])
+
const pqSourceArray = ref<{ label: string; value: string; }[]>()
const pqScriptArray = ref<{ label: string; value: string; }[]>()
@@ -252,7 +243,7 @@ const rules = computed(() => {
if (formContent.associateReport === 1){//只有关联报告模版时需要展示
dynamicRules.reportTemplateName= [{ required: true, message: '报告模版名称必选!', trigger: 'change' }];
- dynamicRules.reportTemplateVersion= [{ required: true, message: '报告模版版本号必选!', trigger: 'change' }];
+ //dynamicRules.reportTemplateVersion= [{ required: true, message: '报告模版版本号必选!', trigger: 'change' }];
}
return dynamicRules;
@@ -292,6 +283,7 @@ const rules = computed(() => {
if( mode.value === '比对式'){
await updatePlan(formContent)
}else{
+
await updatePlan({...formContent,'sourceIds':[formContent.sourceIds],'datasourceIds':[formContent.datasourceIds]});
}
ElMessage.success({ message: `${dialogTitle.value}成功!` })
@@ -349,7 +341,6 @@ const open = async (sign: string,
if(sign == 'add')
{
- console.log('add',data)
const [pqSource_Result, PqScript_Result, PqErrSys_Result,pqDevList_Result,pqReportName_Result] = await Promise.all([
getTestSourceList(data),
getPqScriptList(data),
@@ -375,6 +366,7 @@ const open = async (sign: string,
unboundPqDevList.value = pqDevList.value
boundPqDevList.value = [];
}else{//编辑时先给表单赋值(这会没接收被检设备),需要手动再给被检设备复制后整体表单赋值
+
const [pqSource_Result, PqScript_Result, PqErrSys_Result,boundPqDevList_Result, unboundPqDevList_Result,pqReportName_Result] = await Promise.all([
getTestSourceList(data),
getPqScriptList(data),
@@ -399,7 +391,7 @@ const open = async (sign: string,
pqDevList.value = [...boundData,...unboundData] as Device.ResPqDev[];
formContent.devIds = boundData.map(i => i.id );// 已绑定设备id集合
-
+
Object.assign(formContent,{ ...data })
//设备绑定显示
unboundPqDevList.value = unboundPqDevList_Result.data as Device.ResPqDev[];
@@ -464,12 +456,6 @@ const dataSourceType = computed(() => {
}
})
-const handleReportChange = async (value: string) => {
- formContent.reportTemplateVersion = ''
- const response = await getPqReportAllVersion({ name: value });
- pqReportVersion.value = response.data.map((item: { version: string }) => ({ version: item }));
-
-};
// 对外映射
defineExpose({ open })
diff --git a/frontend/src/views/system/template/components/reportPopup.vue b/frontend/src/views/system/template/components/reportPopup.vue
index 56c2320..54c5c93 100644
--- a/frontend/src/views/system/template/components/reportPopup.vue
+++ b/frontend/src/views/system/template/components/reportPopup.vue
@@ -16,6 +16,7 @@
:file-list="baseFileList"
:on-exceed="BaseHandleExceed"
:on-remove="BaseHandleRemove"
+ style="width: 300px !important;"
class="upload-container"
>
选择文件
@@ -277,4 +278,6 @@ const props = defineProps<{
align-items: center;
}
+
+
\ No newline at end of file
diff --git a/frontend/src/views/system/template/index.vue b/frontend/src/views/system/template/index.vue
index 7f5eb74..a6b9aa6 100644
--- a/frontend/src/views/system/template/index.vue
+++ b/frontend/src/views/system/template/index.vue
@@ -65,7 +65,7 @@
{
prop: 'version',
label: '版本号',
- minWidth: 100,
+ minWidth: 80,
},
{