From abb8c3430e9acd2b86a57e7402d7f37dcaf04023 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 01 Apr 2021 15:17:25 +0800
Subject: [PATCH] 违禁品,包裹图片行点击事件修改

---
 src/views/parcel/parcelKind.vue     |   27 +++++--------
 src/views/animalHeat/animalHeat.vue |    7 +++
 src/views/healthcode/healthcode.vue |   23 +++++++++--
 src/views/parcel/parcel.vue         |   21 +++++-----
 4 files changed, 48 insertions(+), 30 deletions(-)

diff --git a/src/views/animalHeat/animalHeat.vue b/src/views/animalHeat/animalHeat.vue
index ea8d7eb..3bccd64 100644
--- a/src/views/animalHeat/animalHeat.vue
+++ b/src/views/animalHeat/animalHeat.vue
@@ -135,6 +135,7 @@
               label: "体温状态",
               search: true,
               searchLabelWidth: 120,
+              searchValue: this.getAnimalType(),
               prop: "status",
               searchSpan: 5,
               width:110,
@@ -221,6 +222,12 @@
         this.page.currentPage = 1;
         this.onLoad(this.page, params);
       },
+      //体温状态回填
+      getAnimalType(){
+          if (this.$route.query.status != undefined) {
+              return this.$route.query.status
+          }
+      },
       onLoad(page, params = {}) {
         const { dateTime } = this.query;
         let values = {
diff --git a/src/views/healthcode/healthcode.vue b/src/views/healthcode/healthcode.vue
index 6485a3b..0d0fcc7 100644
--- a/src/views/healthcode/healthcode.vue
+++ b/src/views/healthcode/healthcode.vue
@@ -9,6 +9,7 @@
                v-model="form"
                ref="crud"
                :row-style="rowStyle"
+               :search.sync="search"
                @row-update="rowUpdate"
                @row-save="rowSave"
                @row-del="rowDel"
@@ -53,6 +54,7 @@
       return {
         form: {},
         query: {},
+        search:{},
         loading: true,
         page: {
           pageSize: 10,
@@ -160,9 +162,10 @@
             {
               label: "健康码颜色",
               search: true,
-              searchLabelWidth:100,
+              searchLabelWidth:120,
               prop: "type",
-              searchSpan: 3,
+              searchSpan: 4,
+              searchValue: this.getHealthcodeType(),
               width:210,
               type: "select",
               dicData: [
@@ -186,6 +189,9 @@
         isActive: false,
         recorder: null,
       };
+    },
+    mounted:{
+
     },
     computed: {
       ...mapGetters(["permission"]),
@@ -241,8 +247,16 @@
            }
          }
       },
+      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
@@ -283,6 +297,7 @@
                 status:this.$route.query.status,
                 type:this.$route.query.type
             }
+            
         }
 
         if (dateTime) {
@@ -318,4 +333,4 @@
     background-color: rgb(64, 158, 255);
     border-color: rgb(64, 158, 255);
   }
-</style>
+</style>
\ No newline at end of file
diff --git a/src/views/parcel/parcel.vue b/src/views/parcel/parcel.vue
index 58e755a..6eb9cc3 100644
--- a/src/views/parcel/parcel.vue
+++ b/src/views/parcel/parcel.vue
@@ -12,6 +12,7 @@
                @row-update="rowUpdate"
                @row-save="rowSave"
                @row-del="rowDel"
+               @row-click="rowClick"
                @search-change="searchChange"
                @search-reset="searchReset"
                @selection-change="selectionChange"
@@ -20,7 +21,7 @@
                @refresh-change="refreshChange"
                @on-load="onLoad">
         
-      <template slot-scope="{ type, size, row }" slot="menu">
+      <!-- <template slot-scope="{ type, size, row }" slot="menu">
 
         <el-button
           v-if="row.imgUrl != null || row.imgUrl != ''"
@@ -30,7 +31,7 @@
           @click.stop="handleParcelPic(row)"
           >查看包裹图片
         </el-button>
-      </template>
+      </template> -->
       
     </avue-crud>
     <template>
@@ -68,6 +69,7 @@
         },
         selectionList: [],
         option: {
+          menu:false,
           height:'auto',
           calcHeight: 30,
           tip: false,
@@ -230,6 +232,13 @@
         this.onLoad(this.page, params);
         done();
       },
+      rowClick(row){
+        var that=this;
+        getParcelPic(row.imgUrl).then(res => {
+            that.imgUrl = res.data.data.imgBase64;
+            this.showViewer = true
+          });
+      },
       selectionChange(list) {
         this.selectionList = list;
       },
@@ -323,14 +332,6 @@
           this.loading = false;
           this.selectionClear();
         });
-      },
-      handleParcelPic(row) {
-        var that=this;
-        getParcelPic(row.imgUrl).then(res => {
-            that.imgUrl = res.data.data.imgBase64;
-            //that.$refs.preview.clickHandler();
-            this.showViewer = true
-          });
       },
       // 关闭查看器
       closeViewer() {
diff --git a/src/views/parcel/parcelKind.vue b/src/views/parcel/parcelKind.vue
index 3797f73..bddc094 100644
--- a/src/views/parcel/parcelKind.vue
+++ b/src/views/parcel/parcelKind.vue
@@ -11,6 +11,7 @@
                @row-update="rowUpdate"
                @row-save="rowSave"
                @row-del="rowDel"
+               @row-click="rowClick"
                @search-change="searchChange"
                @search-reset="searchReset"
                @selection-change="selectionChange"
@@ -18,7 +19,7 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
-      <template slot-scope="{ type, size, row }" slot="menu">
+      <!-- <template slot-scope="{ type, size, row }" slot="menu">
         <el-button
           v-if="row.imgUrl != null || row.imgUrl != ''"
           icon="el-icon-view"
@@ -27,16 +28,10 @@
           @click.stop="handleParcelPic(row)"
           >查看包裹图片
         </el-button>
-      </template>
+      </template> -->
     </avue-crud>
     <template>
       <div>
-        <!-- style="display:none" -->
-        <!-- <el-image 
-        ref="preview"
-        :src="'data:image/png;base64,'+imgUrl"
-        :preview-src-list="['data:image/png;base64,'+imgUrl]"
-        z-index=9999></el-image> -->
         <el-image-viewer 
                      class="img"
                      v-if="showViewer" 
@@ -76,6 +71,7 @@
         },
         selectionList: [],
         option: {
+          menu:false,
           height:'auto',
           calcHeight: 30,
           tip: false,
@@ -221,6 +217,13 @@
         this.selectionList = [];
         this.$refs.crud.toggleSelection();
       },
+      rowClick(row){
+        var that=this;
+        getParcelPic(row.imgUrl).then(res => {
+            that.imgUrl = res.data.data.imgBase64;
+            this.showViewer = true
+          });
+      },
       currentChange(currentPage){
         this.page.currentPage = currentPage;
       },
@@ -287,14 +290,6 @@
           this.loading = false;
           this.selectionClear();
         });
-      },
-      handleParcelPic(row) {
-        var that = this;
-        getParcelPic(row.imgUrl).then(res => {
-            that.imgUrl = res.data.data.imgBase64;
-            //that.$refs.preview.clickHandler();
-            this.showViewer = true
-          });
       },
       // 关闭查看器
       closeViewer() {

--
Gitblit v1.9.3