From 4d0faee6a7f372e01ae494e8a4a6a28521e0199f Mon Sep 17 00:00:00 2001
From: GuLiMmo <2820890765@qq.com>
Date: Sat, 20 Jan 2024 16:53:03 +0800
Subject: [PATCH] update

---
 src/views/evaluate/components/editSectionTask.vue |   51 ++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 38 insertions(+), 13 deletions(-)

diff --git a/src/views/evaluate/components/editSectionTask.vue b/src/views/evaluate/components/editSectionTask.vue
index b1ed574..a8405a4 100644
--- a/src/views/evaluate/components/editSectionTask.vue
+++ b/src/views/evaluate/components/editSectionTask.vue
@@ -46,7 +46,7 @@
 
 <script>
 import { getDict } from '@/api/dict'
-import { update } from '@/api/evaluate/evaluateTask'
+import { update, getEmployeeLevelList } from '@/api/evaluate/evaluateTask'
 import _ from 'lodash';
 import selectionDialog from './selectionDialog.vue';
 
@@ -136,24 +136,49 @@
             selectionParams: {}
         }
     },
+    watch: {
+        'params.visible': {
+            handler(val) {
+                if (!val) return
+                const { id, taskName, evaluateAwards, identificationStandard, pollingPersons, votePersonObjInfo, evaluateCutoffTimeStart, evaluateCutoffTimeEnd } = this.params.data
+                this.form.id = id
+                this.form.taskName = taskName
+                this.form.evaluateAwards = evaluateAwards
+                this.form.identificationStandard = identificationStandard
+                this.form.pollingPersons = pollingPersons.split(',') || []
+                this.form.votePersonObjInfo = JSON.parse(votePersonObjInfo) || []
+                this.form.evaluateCutoffTimeStart = evaluateCutoffTimeStart
+                this.form.evaluateCutoffTimeEnd = evaluateCutoffTimeEnd
+                console.log('编辑回显');
+            },
+            deep: true
+        }
+    },
     methods: {
         dialogClose() {
             this.$refs.formRef.resetFields()
         },
         openDialog() {
             this.initDict()
-            const { id, taskName, evaluateAwards, identificationStandard, pollingPersons, votePersonObjInfo, evaluateCutoffTimeStart, evaluateCutoffTimeEnd } = this.params.data
-            this.form = {
-                id,
-                taskName,
-                evaluateAwards,
-                identificationStandard,
-                pollingPersons: pollingPersons.split(',') || [],
-                votePersonObjInfo: JSON.parse(votePersonObjInfo) || [],
-                evaluateCutoffTimeStart,
-                evaluateCutoffTimeEnd
-            }
-            console.log(this.form);
+            // const { id, taskName, evaluateAwards, identificationStandard, pollingPersons, votePersonObjInfo, evaluateCutoffTimeStart, evaluateCutoffTimeEnd } = this.params.data
+            // this.form.id = id
+            // this.form.taskName = taskName
+            // this.form.evaluateAwards = evaluateAwards
+            // this.form.identificationStandard = identificationStandard
+            // this.form.pollingPersons = pollingPersons.split(',') || []
+            // this.form.votePersonObjInfo = JSON.parse(votePersonObjInfo) || []
+            // this.form.evaluateCutoffTimeStart = evaluateCutoffTimeStart
+            // this.form.evaluateCutoffTimeEnd = evaluateCutoffTimeEnd
+            // this.form = {
+            //     id,
+            //     taskName,
+            //     evaluateAwards,
+            //     identificationStandard,
+            //     pollingPersons: pollingPersons.split(',') || [],
+            //     votePersonObjInfo: JSON.parse(votePersonObjInfo) || [],
+            //     evaluateCutoffTimeStart,
+            //     evaluateCutoffTimeEnd
+            // }
         },
         submit() {
             this.$refs.formRef.validate(vaild => {

--
Gitblit v1.9.3