From 47d7d2c1e141d805b28c54ac8cf6d5b6f1a2610d Mon Sep 17 00:00:00 2001 From: shikeying <pxzsky@163.com> Date: 星期三, 22 三月 2023 14:27:55 +0800 Subject: [PATCH] 演示请假流程 --- src/views/system/user/index.vue | 30 +++++++++++++++++++++--------- 1 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index a3f4872..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); }); }, /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */ @@ -678,7 +690,7 @@ }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { - this.download('system/user/export', { + this.$download('system/user/export', { ...this.queryParams }, `user_${new Date().getTime()}.xlsx`) }, @@ -690,7 +702,7 @@ /** 涓嬭浇妯℃澘鎿嶄綔 */ importTemplate() { // this.download('system/user/select/downloadTemplate', {}, `user_template_${new Date().getTime()}.xlsx`); - this.download('system/user/select/downloadTemplate', {}, `user_template.xlsx`); + this.$download('system/user/select/downloadTemplate', {}, `user_template.xlsx`); }, // 鏂囦欢涓婁紶涓鐞� handleFileUploadProgress(event, file, fileList) { -- Gitblit v1.9.1