From 2116ee1822dc18d82ce6c1c0112d68e26be6bb83 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期一, 04 一月 2021 17:49:52 +0800 Subject: [PATCH] Update copyright --- ruoyi-ui/src/views/system/post/index.vue | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ruoyi-ui/src/views/system/post/index.vue b/ruoyi-ui/src/views/system/post/index.vue index 5c4f28f..5fa17a7 100644 --- a/ruoyi-ui/src/views/system/post/index.vue +++ b/ruoyi-ui/src/views/system/post/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="postCode"> <el-input v-model="queryParams.postCode" @@ -39,6 +39,7 @@ <el-col :span="1.5"> <el-button type="primary" + plain icon="el-icon-plus" size="mini" @click="handleAdd" @@ -48,6 +49,7 @@ <el-col :span="1.5"> <el-button type="success" + plain icon="el-icon-edit" size="mini" :disabled="single" @@ -58,6 +60,7 @@ <el-col :span="1.5"> <el-button type="danger" + plain icon="el-icon-delete" size="mini" :disabled="multiple" @@ -68,12 +71,14 @@ <el-col :span="1.5"> <el-button type="warning" + plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:post:export']" >瀵煎嚭</el-button> </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange"> @@ -117,7 +122,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="postName"> <el-input v-model="form.postName" placeholder="璇疯緭鍏ュ矖浣嶅悕绉�" /> @@ -153,6 +158,7 @@ import { listPost, getPost, delPost, addPost, updatePost, exportPost } from "@/api/system/post"; export default { + name: "Post", data() { return { // 閬僵灞� @@ -163,6 +169,8 @@ single: true, // 闈炲涓鐢� multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, // 鎬绘潯鏁� total: 0, // 宀椾綅琛ㄦ牸鏁版嵁 @@ -272,23 +280,15 @@ if (valid) { if (this.form.postId != undefined) { updatePost(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 { addPost(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(); }); } } @@ -306,7 +306,7 @@ }).then(() => { this.getList(); this.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(function() {}); + }) }, /** 瀵煎嚭鎸夐挳鎿嶄綔 */ handleExport() { @@ -319,7 +319,7 @@ return exportPost(queryParams); }).then(response => { this.download(response.msg); - }).catch(function() {}); + }) } } }; -- Gitblit v1.9.3