From 5645356fa9234079ae78a80dee7146e7abadef0b Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期三, 11 八月 2021 17:05:02 +0800
Subject: [PATCH] fix 生产minio回显问题
---
ruoyi-ui/src/views/demo/demo/index.vue | 42 +++++++++++++++++++++++++++---------------
1 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/ruoyi-ui/src/views/demo/demo/index.vue b/ruoyi-ui/src/views/demo/demo/index.vue
index 279c469..a0d9edc 100644
--- a/ruoyi-ui/src/views/demo/demo/index.vue
+++ b/ruoyi-ui/src/views/demo/demo/index.vue
@@ -33,6 +33,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handlePage">鎼滅储(鑷畾涔夊垎椤垫帴鍙�)</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
@@ -168,7 +169,8 @@
</template>
<script>
-import { listDemo, getDemo, delDemo, addDemo, updateDemo, exportDemo } from "@/api/demo/demo";
+import { listDemo, pageDemo, getDemo, delDemo, addDemo, updateDemo } from "@/api/demo/demo";
+import { downLoadExcel } from "@/utils/download";
export default {
name: "Demo",
@@ -239,6 +241,20 @@
this.loading = false;
});
},
+ /** 鑷畾涔夊垎椤垫煡璇� */
+ getPage() {
+ this.loading = true;
+ this.queryParams.params = {};
+ if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
+ this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
+ this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
+ }
+ pageDemo(this.queryParams).then(response => {
+ this.demoList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
// 鍙栨秷鎸夐挳
cancel() {
this.open = false;
@@ -266,6 +282,11 @@
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handlePage() {
+ this.queryParams.pageNum = 1;
+ this.getPage();
},
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
@@ -304,17 +325,19 @@
this.buttonLoading = true;
if (this.form.id != null) {
updateDemo(this.form).then(response => {
- this.buttonLoading = false;
this.msgSuccess("淇敼鎴愬姛");
this.open = false;
this.getList();
+ }).finally(() => {
+ this.buttonLoading = false;
});
} else {
addDemo(this.form).then(response => {
- this.buttonLoading = false;
this.msgSuccess("鏂板鎴愬姛");
this.open = false;
this.getList();
+ }).finally(() => {
+ this.buttonLoading = false;
});
}
}
@@ -338,18 +361,7 @@
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
- const queryParams = this.queryParams;
- this.$confirm('鏄惁纭瀵煎嚭鎵�鏈夋祴璇曞崟琛ㄦ暟鎹」?', "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(() => {
- this.exportLoading = true;
- return exportDemo(queryParams);
- }).then(response => {
- this.download(response.msg);
- this.exportLoading = false;
- })
+ downLoadExcel('/demo/demo/export', this.queryParams);
}
}
};
--
Gitblit v1.9.3