Procházet zdrojové kódy

1006844 修复图片不能查看bug

zhangdan před 4 roky
rodič
revize
5fda739ba4

+ 3 - 3
src/views/equipmentManage/equipment/equipment.vue

@@ -165,11 +165,11 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '网点名称', dataIndex: 'stationName', width: 200, align: 'center' },
+        { title: '网点名称', dataIndex: 'stationName', width: 200, align: 'center',customRender: text => { return text || '--' } },
         { title: '网点标签', dataIndex: 'labelName', width: 200, align: 'center', customRender: text => { return text || '--' } },
-        { title: '地址', dataIndex: 'stationAddress', width: 200, align: 'center' },
+        { title: '地址', dataIndex: 'stationAddress', width: 200, align: 'center',customRender: text => { return text || '--' } },
         { title: '设备编号', dataIndex: 'srcDeviceCode', width: 200, align: 'center' },
-        { title: '箱体类型', dataIndex: 'deviceTypeName', width: 200, align: 'center' },
+        { title: '箱体类型', dataIndex: 'deviceTypeName', width: 200, align: 'center',customRender: text => { return text || '--' } },
         { title: '内置箱体数', dataIndex: 'boxNum', width: 200, align: 'center' },
         { title: '版本', dataIndex: 'boxVersion', width: 200, align: 'center' },
         { title: '设备状态', scopedSlots: { customRender: 'onlineFlag' }, width: 150, align: 'center' },

+ 3 - 10
src/views/reportForm/unRecyclableRubbishDetails.vue

@@ -59,7 +59,6 @@
     <s-table ref="table" :rowKey="record => record.id" :columns="columns" :data="loadData" bordered>
       <!-- 图片 -->
       <template slot="img" slot-scope="text,record">
-        <img :src="record.imageUrlList ? record.imageUrlList[0] :''" class="image1" @click="isShow">
         <viewer :images="record.imageUrlList? record.imageUrlList:[]" class="viewer" ref="viewer" @inited="inited" rebuild>
           <img v-for="src in record.imageUrlList" :src="src" :key="src" class="image">
         </viewer>
@@ -132,7 +131,6 @@ export default {
             for (let i = 0; i < res.data.list.length; i++) {
               const _item = res.data.list[i]
               _item.no = no + i + 1
-              // this.images = _item.imageUrlList ? _item.imageUrlList : []
             }
             this.orderTotal = res.data.count || 0
             this.getTotal()
@@ -208,16 +206,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     inited (viewer) {
-      console.log('-------------44444', this.$viewer)
       this.$viewer = viewer
-      console.log()
     },
     isShow () {
-      console.log('-dianji', this.$viewer)
-      // const vuer = this.$el.querySelector('.viewer').$vuer
-      // vuer.isShow()
       this.$viewer.update()
-      // this.$viewer.view()
     }
   }
 }
@@ -231,13 +223,14 @@ export default {
 				margin-bottom: 15px;
 			}
 		}
-    .image1 {
+    .image {
+    width:25px;
     height: 25px;
     cursor: pointer;
     margin: 5px;
     display: inline-block;
   }
-  .image{
+  .image:not(:first-child){
     display: none;
   }
 	}