From cf7f51a6337fb97525c7fcfb5d6b1afb7e10ac9f Mon Sep 17 00:00:00 2001 From: 葛瑞士 <gers@neoceansoft.com> Date: 星期三, 09 十二月 2020 16:05:09 +0800 Subject: [PATCH] 解决多文件上传Log报错 --- ruoyi-ui/src/views/system/dict/index.vue | 51 +++++++++++++++++++++++++++++++-------------------- 1 files changed, 31 insertions(+), 20 deletions(-) diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue index 2dd211f..c1de85a 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"> @@ -143,7 +153,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 +183,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 +197,8 @@ single: true, // 非多个禁用 multiple: true, + // 显示搜索条件 + showSearch: true, // 总条数 total: 0, // 字典表格数据 @@ -295,23 +308,15 @@ if (valid) { if (this.form.dictId != undefined) { updateType(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("修改成功"); - this.open = false; - this.getList(); - } else { - this.msgError(response.msg); - } + this.msgSuccess("修改成功"); + this.open = false; + this.getList(); }); } else { addType(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("新增成功"); - this.open = false; - this.getList(); - } else { - this.msgError(response.msg); - } + this.msgSuccess("新增成功"); + this.open = false; + this.getList(); }); } } @@ -329,7 +334,7 @@ }).then(() => { this.getList(); this.msgSuccess("删除成功"); - }).catch(function() {}); + }) }, /** 导出按钮操作 */ handleExport() { @@ -342,7 +347,13 @@ return exportType(queryParams); }).then(response => { this.download(response.msg); - }).catch(function() {}); + }) + }, + /** 清理缓存按钮操作 */ + handleClearCache() { + clearCache().then(response => { + this.msgSuccess("清理成功"); + }); } } }; -- Gitblit v1.9.2