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/config/index.vue |   40 ++++++++++++----------------------------
 1 files changed, 12 insertions(+), 28 deletions(-)

diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue
index f8b940c..e2cfb1a 100644
--- a/ruoyi-ui/src/views/system/config/index.vue
+++ b/ruoyi-ui/src/views/system/config/index.vue
@@ -24,10 +24,10 @@
       <el-form-item label="绯荤粺鍐呯疆" prop="configType">
         <el-select v-model="queryParams.configType" placeholder="绯荤粺鍐呯疆" clearable size="small">
           <el-option
-            v-for="dict in typeOptions"
-            :key="dict.dictValue"
-            :label="dict.dictLabel"
-            :value="dict.dictValue"
+            v-for="dict in dict.type.sys_yes_no"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
           />
         </el-select>
       </el-form-item>
@@ -114,7 +114,7 @@
       <el-table-column label="鍙傛暟閿��" align="center" prop="configValue" />
       <el-table-column label="绯荤粺鍐呯疆" align="center" prop="configType">
         <template slot-scope="scope">
-          <dict-tag :options="typeOptions" :value="scope.row.configType"/>
+          <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.configType"/>
         </template>
       </el-table-column>
       <el-table-column label="澶囨敞" align="center" prop="remark" :show-overflow-tooltip="true" />
@@ -166,10 +166,10 @@
         <el-form-item label="绯荤粺鍐呯疆" prop="configType">
           <el-radio-group v-model="form.configType">
             <el-radio
-              v-for="dict in typeOptions"
-              :key="dict.dictValue"
-              :label="dict.dictValue"
-            >{{dict.dictLabel}}</el-radio>
+              v-for="dict in dict.type.sys_yes_no"
+              :key="dict.value"
+              :label="dict.value"
+            >{{dict.label}}</el-radio>
           </el-radio-group>
         </el-form-item>
         <el-form-item label="澶囨敞" prop="remark">
@@ -185,10 +185,11 @@
 </template>
 
 <script>
-import { listConfig, getConfig, delConfig, addConfig, updateConfig, exportConfig, refreshCache } from "@/api/system/config";
+import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config";
 
 export default {
   name: "Config",
+  dicts: ['sys_yes_no'],
   data() {
     return {
       // 閬僵灞�
@@ -211,15 +212,12 @@
       title: "",
       // 鏄惁鏄剧ず寮瑰嚭灞�
       open: false,
-      // 绫诲瀷鏁版嵁瀛楀吀
-      typeOptions: [],
       // 鏃ユ湡鑼冨洿
       dateRange: [],
       // 鏌ヨ鍙傛暟
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        reasonable: true,
         configName: undefined,
         configKey: undefined,
         configType: undefined
@@ -242,9 +240,6 @@
   },
   created() {
     this.getList();
-    this.getDicts("sys_yes_no").then(response => {
-      this.typeOptions = response.data;
-    });
   },
   methods: {
     /** 鏌ヨ鍙傛暟鍒楄〃 */
@@ -343,18 +338,7 @@
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('鏄惁纭瀵煎嚭鎵�鏈夊弬鏁版暟鎹」?', "璀﹀憡", {
-          confirmButtonText: "纭畾",
-          cancelButtonText: "鍙栨秷",
-          type: "warning"
-        }).then(() => {
-          this.exportLoading = true;
-          return exportConfig(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-          this.exportLoading = false;
-        }).catch(() => {});
+      this.downLoadExcel('/system/config/export', this.queryParams);
     },
     /** 鍒锋柊缂撳瓨鎸夐挳鎿嶄綔 */
     handleRefreshCache() {

--
Gitblit v1.9.3