From a4e06ccd3cd976fbe4eef99e188d42ec9f3ad054 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 08 Apr 2021 09:32:05 +0800
Subject: [PATCH] 样式修改

---
 src/views/healthcode/healthcode.vue |   43 +++++++++++++++++++++++++++++++++++++------
 1 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/src/views/healthcode/healthcode.vue b/src/views/healthcode/healthcode.vue
index ca6170e..343e725 100644
--- a/src/views/healthcode/healthcode.vue
+++ b/src/views/healthcode/healthcode.vue
@@ -8,6 +8,8 @@
                :before-open="beforeOpen"
                v-model="form"
                ref="crud"
+               :row-style="rowStyle"
+               :search.sync="search"
                @row-update="rowUpdate"
                @row-save="rowSave"
                @row-del="rowDel"
@@ -38,7 +40,7 @@
             >本月
           </el-button>
         </template>
-      
+
     </avue-crud>
   </basic-container>
 </template>
@@ -52,6 +54,7 @@
       return {
         form: {},
         query: {},
+        search:{},
         loading: true,
         page: {
           pageSize: 10,
@@ -63,11 +66,12 @@
           menu:false,
           height:'auto',
           calcHeight: 30,
+          border: false,
+          stripe:true,
           tip: false,
           searchShow: true,
           searchMenuSpan: 6,
-          activeClass: 3,
-          border: true,
+          activeClass: 0,
           index: true,
           viewBtn: true,
           selection: true,
@@ -159,9 +163,10 @@
             {
               label: "健康码颜色",
               search: true,
-              searchLabelWidth:100,
+              searchLabelWidth:120,
               prop: "type",
-              searchSpan: 3,
+              searchSpan: 4,
+              searchValue: this.getHealthcodeType(),
               width:210,
               type: "select",
               dicData: [
@@ -185,6 +190,9 @@
         isActive: false,
         recorder: null,
       };
+    },
+    mounted:{
+
     },
     computed: {
       ...mapGetters(["permission"]),
@@ -233,8 +241,23 @@
       refreshChange() {
         this.onLoad(this.page, this.query);
       },
+      rowStyle({row, column, rowIndex}){
+         if(row.type=="3"){
+           return {
+             color:"#fe1515"
+           }
+         }
+      },
+      getHealthcodeType(){
+          if (this.$route.query.type != undefined) {
+              var type = this.$route.query.type+"";
+              this.$route.query = {};
+              return type;
+          }
+      },
       getHealthcodeData(e) {
-        this.activeClass = e;
+        var that = this;
+        that.activeClass = e;
         //status 0:本日  1:本月  2:本年   type: 1:绿色   2:黄色  3:红色
         var params = {
           status: e
@@ -275,6 +298,7 @@
                 status:this.$route.query.status,
                 type:this.$route.query.type
             }
+
         }
 
         if (dateTime) {
@@ -304,3 +328,10 @@
     }
   };
 </script>
+<style scoped>
+  .el-button.btn-color {
+    color: rgb(255, 255, 255);
+    background-color: rgb(64, 158, 255);
+    border-color: rgb(64, 158, 255);
+  }
+</style>

--
Gitblit v1.9.3