From 48d9fc10ea8111424a0315c3420384c19fa04bf4 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期四, 10 六月 2021 16:21:44 +0800
Subject: [PATCH] update 增加分页对象注释
---
ruoyi-ui/src/views/system/post/index.vue | 46 +++++++++++++++++++++++++---------------------
1 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/ruoyi-ui/src/views/system/post/index.vue b/ruoyi-ui/src/views/system/post/index.vue
index 1bd01f3..9d15938 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,15 @@
<el-col :span="1.5">
<el-button
type="warning"
+ plain
icon="el-icon-download"
size="mini"
+ :loading="exportLoading"
@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">
@@ -107,7 +113,7 @@
</template>
</el-table-column>
</el-table>
-
+
<pagination
v-show="total>0"
:total="total"
@@ -117,7 +123,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="璇疯緭鍏ュ矖浣嶅悕绉�" />
@@ -158,12 +164,16 @@
return {
// 閬僵灞�
loading: true,
+ // 瀵煎嚭閬僵灞�
+ exportLoading: false,
// 閫変腑鏁扮粍
ids: [],
// 闈炲崟涓鐢�
single: true,
// 闈炲涓鐢�
multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
// 鎬绘潯鏁�
total: 0,
// 宀椾綅琛ㄦ牸鏁版嵁
@@ -273,23 +283,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();
});
}
}
@@ -307,7 +309,7 @@
}).then(() => {
this.getList();
this.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(function() {});
+ }).catch(() => {});
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
@@ -316,12 +318,14 @@
confirmButtonText: "纭畾",
cancelButtonText: "鍙栨秷",
type: "warning"
- }).then(function() {
+ }).then(() => {
+ this.exportLoading = true;
return exportPost(queryParams);
}).then(response => {
this.download(response.msg);
- }).catch(function() {});
+ this.exportLoading = false;
+ }).catch(() => {});
}
}
};
-</script>
\ No newline at end of file
+</script>
--
Gitblit v1.9.3