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

---
 ruoyi-ui/src/views/system/dict/index.vue |   42 ++++++++++++++++++------------------------
 1 files changed, 18 insertions(+), 24 deletions(-)

diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue
index c7697e3..0bce088 100644
--- a/ruoyi-ui/src/views/system/dict/index.vue
+++ b/ruoyi-ui/src/views/system/dict/index.vue
@@ -94,6 +94,7 @@
           plain
           icon="el-icon-download"
           size="mini"
+          :loading="exportLoading"
           @click="handleExport"
           v-hasPermi="['system:dict:export']"
         >瀵煎嚭</el-button>
@@ -104,9 +105,9 @@
           plain
           icon="el-icon-refresh"
           size="mini"
-          @click="handleClearCache"
+          @click="handleRefreshCache"
           v-hasPermi="['system:dict:remove']"
-        >娓呯悊缂撳瓨</el-button>
+        >鍒锋柊缂撳瓨</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -117,12 +118,16 @@
       <el-table-column label="瀛楀吀鍚嶇О" align="center" prop="dictName" :show-overflow-tooltip="true" />
       <el-table-column label="瀛楀吀绫诲瀷" align="center" :show-overflow-tooltip="true">
         <template slot-scope="scope">
-          <router-link :to="'/dict/type/data/' + scope.row.dictId" class="link-type">
+          <router-link :to="'/system/dict-data/index/' + scope.row.dictId" class="link-type">
             <span>{{ scope.row.dictType }}</span>
           </router-link>
         </template>
       </el-table-column>
-      <el-table-column label="鐘舵��" align="center" prop="status" :formatter="statusFormat" />
+      <el-table-column label="鐘舵��" align="center" prop="status">
+        <template slot-scope="scope">
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
       <el-table-column label="澶囨敞" align="center" prop="remark" :show-overflow-tooltip="true" />
       <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180">
         <template slot-scope="scope">
@@ -188,7 +193,7 @@
 </template>
 
 <script>
-import { listType, getType, delType, addType, updateType, exportType, clearCache } from "@/api/system/dict/type";
+import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
 
 export default {
   name: "Dict",
@@ -196,6 +201,8 @@
     return {
       // 閬僵灞�
       loading: true,
+      // 瀵煎嚭閬僵灞�
+      exportLoading: false,
       // 閫変腑鏁扮粍
       ids: [],
       // 闈炲崟涓鐢�
@@ -253,10 +260,6 @@
           this.loading = false;
         }
       );
-    },
-    // 瀛楀吀鐘舵�佸瓧鍏哥炕璇�
-    statusFormat(row, column) {
-      return this.selectDictLabel(this.statusOptions, row.status);
     },
     // 鍙栨秷鎸夐挳
     cancel() {
@@ -339,25 +342,16 @@
         }).then(() => {
           this.getList();
           this.msgSuccess("鍒犻櫎鎴愬姛");
-        })
+        }).catch(() => {});
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('鏄惁纭瀵煎嚭鎵�鏈夌被鍨嬫暟鎹」?', "璀﹀憡", {
-          confirmButtonText: "纭畾",
-          cancelButtonText: "鍙栨秷",
-          type: "warning"
-        }).then(function() {
-          return exportType(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-        })
+      this.downLoadExcel('/system/dict/type/export', this.queryParams);
     },
-    /** 娓呯悊缂撳瓨鎸夐挳鎿嶄綔 */
-    handleClearCache() {
-      clearCache().then(response => {
-        this.msgSuccess("娓呯悊鎴愬姛");
+    /** 鍒锋柊缂撳瓨鎸夐挳鎿嶄綔 */
+    handleRefreshCache() {
+      refreshCache().then(() => {
+        this.msgSuccess("鍒锋柊鎴愬姛");
       });
     }
   }

--
Gitblit v1.9.3