From 2f18d0d7094b10e169b77a0ea741bd101dbbf1f8 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期六, 18 九月 2021 16:01:52 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev

---
 ruoyi-ui/src/views/system/user/index.vue |   42 ++++++++++++++++--------------------------
 1 files changed, 16 insertions(+), 26 deletions(-)

diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue
index 3214a72..eb63770 100644
--- a/ruoyi-ui/src/views/system/user/index.vue
+++ b/ruoyi-ui/src/views/system/user/index.vue
@@ -57,10 +57,10 @@
               style="width: 240px"
             >
               <el-option
-                v-for="dict in statusOptions"
-                :key="dict.dictValue"
-                :label="dict.dictLabel"
-                :value="dict.dictValue"
+                v-for="dict in dict.type.sys_normal_disable"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
               />
             </el-select>
           </el-form-item>
@@ -251,10 +251,10 @@
             <el-form-item label="鐢ㄦ埛鎬у埆">
               <el-select v-model="form.sex" placeholder="璇烽�夋嫨">
                 <el-option
-                  v-for="dict in sexOptions"
-                  :key="dict.dictValue"
-                  :label="dict.dictLabel"
-                  :value="dict.dictValue"
+                  v-for="dict in dict.type.sys_user_sex"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
                 ></el-option>
               </el-select>
             </el-form-item>
@@ -263,10 +263,10 @@
             <el-form-item label="鐘舵��">
               <el-radio-group v-model="form.status">
                 <el-radio
-                  v-for="dict in statusOptions"
-                  :key="dict.dictValue"
-                  :label="dict.dictValue"
-                >{{dict.dictLabel}}</el-radio>
+                  v-for="dict in dict.type.sys_normal_disable"
+                  :key="dict.value"
+                  :label="dict.value"
+                >{{dict.label}}</el-radio>
               </el-radio-group>
             </el-form-item>
           </el-col>
@@ -351,10 +351,10 @@
 import { treeselect } from "@/api/system/dept";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import { downLoadExcel } from "@/utils/download";
 
 export default {
   name: "User",
+  dicts: ['sys_normal_disable', 'sys_user_sex'],
   components: { Treeselect },
   data() {
     return {
@@ -386,10 +386,6 @@
       initPassword: undefined,
       // 鏃ユ湡鑼冨洿
       dateRange: [],
-      // 鐘舵�佹暟鎹瓧鍏�
-      statusOptions: [],
-      // 鎬у埆鐘舵�佸瓧鍏�
-      sexOptions: [],
       // 宀椾綅閫夐」
       postOptions: [],
       // 瑙掕壊閫夐」
@@ -473,12 +469,6 @@
   created() {
     this.getList();
     this.getTreeselect();
-    this.getDicts("sys_normal_disable").then(response => {
-      this.statusOptions = response.data;
-    });
-    this.getDicts("sys_user_sex").then(response => {
-      this.sexOptions = response.data;
-    });
     this.getConfigKey("sys.user.initPassword").then(response => {
       this.initPassword = response.msg;
     });
@@ -661,7 +651,7 @@
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
-      downLoadExcel('/system/user/export', this.queryParams);
+      this.downLoadExcel('/system/user/export', this.queryParams);
     },
     /** 瀵煎叆鎸夐挳鎿嶄綔 */
     handleImport() {
@@ -670,7 +660,7 @@
     },
     /** 涓嬭浇妯℃澘鎿嶄綔 */
     importTemplate() {
-      downLoadExcel('/system/user/importTemplate');
+      this.downLoadExcel('/system/user/importTemplate');
     },
     // 鏂囦欢涓婁紶涓鐞�
     handleFileUploadProgress(event, file, fileList) {
@@ -690,4 +680,4 @@
     }
   }
 };
-</script>
+</script>
\ No newline at end of file

--
Gitblit v1.9.3