From 1a7baa06399afa0cd042653736f50d404ef940b7 Mon Sep 17 00:00:00 2001
From: 若依 <yzz_ivy@163.com>
Date: 星期三, 05 八月 2020 11:38:44 +0800
Subject: [PATCH] !58 cell的cellType由Numeric修正为String Merge pull request !58 from 4ook/master
---
ruoyi-ui/src/views/system/dict/index.vue | 40 ++++++++++++++++++++++++++++++++--------
1 files changed, 32 insertions(+), 8 deletions(-)
diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue
index 2dd211f..6da26ab 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,23 @@
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>
+ <div class="top-right-btn">
+ <el-tooltip class="item" effect="dark" content="鍒锋柊" placement="top">
+ <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
+ </el-tooltip>
+ <el-tooltip class="item" effect="dark" :content="showSearch ? '闅愯棌鎼滅储' : '鏄剧ず鎼滅储'" placement="top">
+ <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
+ </el-tooltip>
+ </div>
</el-row>
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
@@ -143,7 +160,7 @@
/>
<!-- 娣诲姞鎴栦慨鏀瑰弬鏁伴厤缃璇濇 -->
- <el-dialog :title="title" :visible.sync="open" width="500px">
+ <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="瀛楀吀鍚嶇О" prop="dictName">
<el-input v-model="form.dictName" placeholder="璇疯緭鍏ュ瓧鍏稿悕绉�" />
@@ -173,9 +190,10 @@
</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",
data() {
return {
// 閬僵灞�
@@ -186,6 +204,8 @@
single: true,
// 闈炲涓鐢�
multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
// 鎬绘潯鏁�
total: 0,
// 瀛楀吀琛ㄦ牸鏁版嵁
@@ -299,8 +319,6 @@
this.msgSuccess("淇敼鎴愬姛");
this.open = false;
this.getList();
- } else {
- this.msgError(response.msg);
}
});
} else {
@@ -309,8 +327,6 @@
this.msgSuccess("鏂板鎴愬姛");
this.open = false;
this.getList();
- } else {
- this.msgError(response.msg);
}
});
}
@@ -343,6 +359,14 @@
}).then(response => {
this.download(response.msg);
}).catch(function() {});
+ },
+ /** 娓呯悊缂撳瓨鎸夐挳鎿嶄綔 */
+ handleClearCache() {
+ clearCache().then(response => {
+ if (response.code === 200) {
+ this.msgSuccess("娓呯悊鎴愬姛");
+ }
+ });
}
}
};
--
Gitblit v1.9.3