From b62c6c9ab29e933fd0333ac183ef837d00aba5d2 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 12 七月 2024 18:09:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/education/department/edit.vue |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/views/education/department/edit.vue b/src/views/education/department/edit.vue
index 2ef4c75..ab7efb8 100644
--- a/src/views/education/department/edit.vue
+++ b/src/views/education/department/edit.vue
@@ -65,6 +65,7 @@
     if (id && parseInt(id) !== 0) {
       _this.formLoading = true
       departmentApi.select(id).then(re => {
+        re.response.parentId = re.response.parentIds
         _this.form = re.response
         _this.formLoading = false
       })
@@ -99,7 +100,7 @@
       //   name: this.form.name
       // }
       if (_this.form.parentId) {
-        _this.form.parentId = _this.form.parentId[0];
+        _this.form.parentId = _this.form.parentId[_this.form.parentId.length - 1];
       }
       if (_this.fig === 1) {
         departmentApi.addData(this.form).then(res => {
@@ -147,6 +148,7 @@
         id: null,
         name: '',
         level: 1,
+        parentId: null,
         levelName: ''
       }
       this.form.id = lastId

--
Gitblit v1.8.0