From d3a5fbcc6516c77b32f54518a65e3238c3029d6d Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 14 三月 2025 19:31:35 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/center-lims-before-ruoyi into dev

---
 src/views/CNAS/personnel/personnelInfo/Department/components/Records/control/index.vue |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/views/CNAS/personnel/personnelInfo/Department/components/Records/control/index.vue b/src/views/CNAS/personnel/personnelInfo/Department/components/Records/control/index.vue
index 325cf70..de58664 100644
--- a/src/views/CNAS/personnel/personnelInfo/Department/components/Records/control/index.vue
+++ b/src/views/CNAS/personnel/personnelInfo/Department/components/Records/control/index.vue
@@ -110,7 +110,7 @@
         }
     },
     mounted() {
-        this.isPermission = isPermission("isSubmit")
+        // this.isPermission = isPermission("isSubmit")
         console.log('鏉冮檺', this.isPermission);
     },
     methods: {
@@ -160,7 +160,7 @@
          */
         async getControlData(id) {
             const { code, data } = await personSupervisionControlSheetPage({ id })
-            if (code == 202) {
+            if (!data) {
                 this.controlType = '鏂板'
                 this.supervisionRecordId = id
                 this.active = 0
@@ -168,7 +168,7 @@
                 this.controlId = undefined
                 this.initForm()
             }
-            if (code == 200) {
+            if (data && code == 200) {
                 this.currentResponsible = data.currentResponsible
                 this.controlType = '缂栬緫'
                 this.controlId = data.id
@@ -207,6 +207,7 @@
             } else if (type == 'save') {
                 currentState = undefined
             }
+
             if (this.active == 0) {
                 let { discoveryApproach, ...condiFormRest } = this.mainForm.condiForm
                 let approcahStr = discoveryApproach.join(',')
@@ -266,10 +267,10 @@
          * @desc 鎻愪氦琛ㄥ崟
          */
         async submitForm(form) {
-            let user = JSON.parse(localStorage.getItem('user'));
+
             form.responsibleDepartmentId = Number(form.responsibleDepartmentId)
             const { code } = await addOrUpdatePersonSupervisionControl({
-                currentResponsible: user.name,
+                currentResponsible: this.$store.state.user.name,
                 ...form
             })
             if (this.controlType == '鏂板') {

--
Gitblit v1.9.3