From 14c20db6e07d7770fccb0b43e2cadd247c0e37a6 Mon Sep 17 00:00:00 2001
From: shikeying <pxzsky@163.com>
Date: 星期二, 21 三月 2023 18:48:12 +0800
Subject: [PATCH] 添加activiti7若依界面 2

---
 src/views/system/user/index.vue |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index f5f512f..abf2e86 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -418,14 +418,14 @@
         // 璁剧疆涓婁紶鐨勮姹傚ご閮�
         headers: { Authorization: "Bearer " + getToken() },
         // 涓婁紶鐨勫湴鍧�
-        // url: process.env.VUE_APP_BASE_API + "/system/user/import"
         // url: process.env.VUE_SERVER_URL + "/system/user/importData"
-        url: "http://localhost:8082/admin" + "/system/user/import"
+        // url: "http://localhost:8082/admin" + "/system/user/import"
+        url: globalConf.baseUrl + "/system/user/import"
       },
       // 鏌ヨ鍙傛暟
       queryParams: {
         pageNum: 1,
-        pageSize: 10,
+        pageSize: 15,
         userName: undefined,
         phonenumber: undefined,
         status: undefined,
@@ -498,10 +498,18 @@
       );
     },
     /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */
-    getTreeselect() {
-      treeselect(this.queryParams.deptId).then(response => {
+    getTreeselect(deptId) {
+      // treeselect(this.queryParams.deptId).then(response => {
+      //   this.deptOptions = response.data;
+      // });
+      if(deptId == undefined || deptId == ""){
+        this.$modal.alert("璇烽�夋嫨涓�涓儴闂�");
+        return false;
+      }
+      treeselect(deptId).then(response => {
         this.deptOptions = response.data;
       });
+      return true;
     },
 
     // 2022-12-08锛屽姞杞介《绾ф満鏋勬爲鍒楄〃
@@ -594,7 +602,9 @@
       //   this.$modal.msgSuccess("璇峰厛閫夋嫨涓�涓《绾ф満鏋�");
       //   return;
       // }
-      this.getTreeselect();
+      if(!this.getTreeselect(this.queryParams.deptId)){
+        return;
+      }
       // getUser().then(response => {
       getNewUserRoles(this.queryParams.deptId).then(response => {
         // this.postOptions = response.posts;
@@ -603,11 +613,12 @@
         this.title = "娣诲姞鐢ㄦ埛";
         this.form.password = this.initPassword;
       });
+
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
       this.reset();
-      this.getTreeselect();
+      // this.getTreeselect();
       // const userId = row.id || this.ids;
       const userId = row.id;
       getUser(userId).then(response => {
@@ -619,6 +630,7 @@
         this.open = true;
         this.title = "淇敼鐢ㄦ埛";
         this.form.password = "";
+        this.getTreeselect(this.form.dept_id);
       });
     },
     /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */

--
Gitblit v1.9.1