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 |   67 ++++++++++++++++++++++++---------
 1 files changed, 48 insertions(+), 19 deletions(-)

diff --git a/src/views/healthcode/healthcode.vue b/src/views/healthcode/healthcode.vue
index 500988a..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: [
@@ -181,8 +186,13 @@
             }
           ]
         },
-        data: []
+        data: [],
+        isActive: false,
+        recorder: null,
       };
+    },
+    mounted:{
+
     },
     computed: {
       ...mapGetters(["permission"]),
@@ -201,16 +211,6 @@
         });
         return ids.join(",");
       }
-    },
-    created() {
-      Recorder.getPermission().then(() => {});
-
-      this.recorder = new Recorder({
-        sampleBits: 16, // 采样位数,支持 8 或 16,默认是16
-        sampleRate: 8000, // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值,我的chrome是48000
-        numChannels: 1, // 声道,支持 1 或 2, 默认是1
-        // compiling: false,(0.x版本中生效,1.x增加中)  // 是否边录边转换,默认是false
-      });
     },
     methods: {
       beforeOpen(done, type) {
@@ -241,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
@@ -257,8 +272,8 @@
           ...params,
         };
 
-        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 == "" ) {
+        if (this.$route.query.status!=undefined && this.$route.query != undefined && this.$route.query != null && this.$route.query != "" ) {
+            if (this.$route.query.type != undefined) {
               this.activeClass = this.$route.query.status;
               this.page.currentPage = 1;
               params = {
@@ -272,11 +287,18 @@
                 type:this.$route.query.status
               };
             }
+        }else if(this.$route.query.type != undefined){
+          params = {
+            type: this.$route.query.type,
+            begTime: this.$route.query.startTime,
+            endTime: this.$route.query.endTime
+          }
         }else{
             params = {
                 status:this.$route.query.status,
                 type:this.$route.query.type
             }
+
         }
 
         if (dateTime) {
@@ -306,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