From 253d5c40069c42a271d72e0f0294a00889562046 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sun, 21 Mar 2021 23:24:12 +0800
Subject: [PATCH] 健康码,体温检测详情本日,本周本月按钮新增
---
src/views/healthcode/healthcode.vue | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 52 insertions(+), 5 deletions(-)
diff --git a/src/views/healthcode/healthcode.vue b/src/views/healthcode/healthcode.vue
index 07dda7f..238d55a 100644
--- a/src/views/healthcode/healthcode.vue
+++ b/src/views/healthcode/healthcode.vue
@@ -18,6 +18,26 @@
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
+ <template slot="menuLeft">
+ <el-button
+ v-bind:class="activeClass == 0 ? 'btn-color' : ''"
+ size="medium "
+ @click="getHealthcodeData(0)"
+ >本日
+ </el-button>
+ <el-button
+ v-bind:class="activeClass == 1 ? 'btn-color' : ''"
+ size="medium "
+ @click="getHealthcodeData(1)"
+ >本周
+ </el-button>
+ <el-button
+ v-bind:class="activeClass == 2 ? 'btn-color' : ''"
+ size="medium "
+ @click="getHealthcodeData(2)"
+ >本月
+ </el-button>
+ </template>
</avue-crud>
</basic-container>
@@ -46,6 +66,7 @@
tip: false,
searchShow: true,
searchMenuSpan: 6,
+ activeClass: 3,
border: true,
index: true,
viewBtn: true,
@@ -210,14 +231,40 @@
refreshChange() {
this.onLoad(this.page, this.query);
},
+ getHealthcodeData(e) {
+ this.activeClass = e;
+ //status 0:本日 1:本月 2:本年 type: 1:绿色 2:黄色 3:红色
+ var params = {
+ status: e
+ };
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ },
onLoad(page, params = {}) {
this.loading = true;
- console.log("status="+this.$route.query.status);
- params ={
- status:this.$route.query.status,
- type:this.$route.query.type
+ if (this.$route.query.status && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) {
+ if (this.$route.query.type != undefined && this.$route.query.type != null && this.$route.query.type == "" ) {
+ this.activeClass = this.$route.query.status;
+ this.page.currentPage = 1;
+ params = {
+ status:this.$route.query.status,
+ type:this.$route.query.type
+ }
+ } else {
+ this.activeClass = 0;
+ this.page.currentPage = 1;
+ params = {
+ type:this.$route.query.status
+ };
+ }
+ }else{
+ params = {
+ status:this.$route.query.status,
+ type:this.$route.query.type
+ }
}
- console.log("params="+params);
+
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
--
Gitblit v1.9.3