From be54188ba6c0ff9a0d3d286f102041cd98f7eabc Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期三, 26 八月 2020 15:39:46 +0800
Subject: [PATCH] 导出Excel调整targetAttr获取值方法,防止get方法不规范
---
ruoyi-ui/src/views/system/dict/index.vue | 30 +++++++++++++++++++++++-------
1 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue
index 9c3f647..7b831da 100644
--- a/ruoyi-ui/src/views/system/dict/index.vue
+++ b/ruoyi-ui/src/views/system/dict/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="瀛楀吀鍚嶇О" prop="dictName">
<el-input
v-model="queryParams.dictName"
@@ -50,7 +50,7 @@
></el-date-picker>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+ <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
@@ -94,6 +94,16 @@
v-hasPermi="['system:dict:export']"
>瀵煎嚭</el-button>
</el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="danger"
+ icon="el-icon-refresh"
+ size="mini"
+ @click="handleClearCache"
+ v-hasPermi="['system:dict:remove']"
+ >娓呯悊缂撳瓨</el-button>
+ </el-col>
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
@@ -173,7 +183,7 @@
</template>
<script>
-import { listType, getType, delType, addType, updateType, exportType } from "@/api/system/dict/type";
+import { listType, getType, delType, addType, updateType, exportType, clearCache } from "@/api/system/dict/type";
export default {
name: "Dict",
@@ -187,6 +197,8 @@
single: true,
// 闈炲涓鐢�
multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
// 鎬绘潯鏁�
total: 0,
// 瀛楀吀琛ㄦ牸鏁版嵁
@@ -300,8 +312,6 @@
this.msgSuccess("淇敼鎴愬姛");
this.open = false;
this.getList();
- } else {
- this.msgError(response.msg);
}
});
} else {
@@ -310,8 +320,6 @@
this.msgSuccess("鏂板鎴愬姛");
this.open = false;
this.getList();
- } else {
- this.msgError(response.msg);
}
});
}
@@ -344,6 +352,14 @@
}).then(response => {
this.download(response.msg);
}).catch(function() {});
+ },
+ /** 娓呯悊缂撳瓨鎸夐挳鎿嶄綔 */
+ handleClearCache() {
+ clearCache().then(response => {
+ if (response.code === 200) {
+ this.msgSuccess("娓呯悊鎴愬姛");
+ }
+ });
}
}
};
--
Gitblit v1.9.3