From e6f2e152a23f5883215ab8dcb75718533c581ac7 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期二, 14 十月 2025 09:15:37 +0800
Subject: [PATCH] 修改

---
 src/views/work/qualityManage/continuousImprovement/components/editDialog.vue |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/src/views/work/qualityManage/continuousImprovement/components/editDialog.vue b/src/views/work/qualityManage/continuousImprovement/components/editDialog.vue
index 44c7e53..14361d3 100644
--- a/src/views/work/qualityManage/continuousImprovement/components/editDialog.vue
+++ b/src/views/work/qualityManage/continuousImprovement/components/editDialog.vue
@@ -191,7 +191,8 @@
 import {addTable, editTable, getTargetById} from "@/api/qualityObjectives/table";
 import {addNeedDiscren, editNeedDiscren} from "@/api/need/need";
 import {addCustomerNeed, editCustomerNeed} from "@/api/customerNeed";
-import {addInside, editInside} from "@/api/continuousImprovement";
+import {addInside, editInside, getInsideById} from "@/api/continuousImprovement";
+import {getQualityTemplateById} from "@/api/standardSys/standardSys";
 
 const dialogVisible = ref(false);
 const title = ref("");
@@ -204,7 +205,7 @@
   form: {
     id: '',
     companyId: null,
-    year: "", //年份
+    year: "2025", //年份
     fictionId: null, //编制
     checkId: null, //审核
     ratifyId: null, //批准
@@ -266,12 +267,25 @@
     state.companyList = companyList
   }
   title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑' : '查看' ;
+  state.form.year = new Date().getFullYear().toString()
   if(type === 'edit' || type === 'review') {
-    state.form = JSON.parse(JSON.stringify(value));
-    if(state.isAdmin){
-      state.form.companyId = value.companyId
-      state.form.companyName = value.companyName
+    const res = await getInsideById({improveId: value.id})
+    if(res.code === 200){
+      state.form = res.data
+
+    }else{
+      ElMessage.warning(res.message)
     }
+    if(state.isAdmin){
+      state.form.companyId = res.data.companyId
+      state.form.companyName = res.data.companyName
+    }
+
+    // state.form = JSON.parse(JSON.stringify(value));
+    // if(state.isAdmin){
+    //   state.form.companyId = value.companyId
+    //   state.form.companyName = value.companyName
+    // }
 
     console.log('xx',state.form)
 
@@ -360,7 +374,7 @@
   state.form = {
     id: '',
     companyId: null,
-    year: "", //年份
+    year: "2025", //年份
     fictionId: null, //编制
     checkId: null, //审核
     ratifyId: null, //批准

--
Gitblit v1.9.2