Pārlūkot izejas kodu

Merge branch 'deploy_daping' of http://git.chelingzhu.com/chelingzhu-web/zxyj-admin-html into deploy_daping

1004749546@qq.com 4 gadi atpakaļ
vecāks
revīzija
583a5ed8b0

+ 4 - 4
src/views/equipmentManage/collector/addCollector.vue

@@ -62,7 +62,7 @@ export default {
       titleText: '新增',
       rules: {
         stationNo: [{ required: true, message: '请选择网点', trigger: 'change' }],
-        gatherPhone: [{ required: true, message: '请输入正确的手机号', trigger: 'blur', pattern: /^[1][0-9]{10}$/ }]
+        gatherPhone: [{ required: true, message: '请输入正确的手机号', trigger: 'blur', pattern: /^\d{11}$/ }]
       },
       loading: false,
       optionData: [] // 标签数据
@@ -91,9 +91,7 @@ export default {
         id: _this.collectorId
       }).then(res => {
         if (res.status == 200) {
-          console.log(res, '-------数据')
           _this.loading = false
-          // _this.formData = Object.assign({}, this.formData, res.data)
           _this.formData.gatherName = res.data.gatherName
           _this.formData.gatherPhone = res.data.gatherPhone
           _this.formData.stationNo = res.data.stationNo
@@ -132,6 +130,9 @@ export default {
       this.formData.gatherName = ''
     }
   },
+  mounted() {
+    this.getStationList()
+  },
   // 监听弹窗
   watch: {
     // 父页面传过来的弹窗状态
@@ -140,7 +141,6 @@ export default {
     },
     isShow (newValue, oldValue) {
       if (newValue) {
-        this.getStationList()
         if (this.collectorId) { // 编辑
           this.titleText = '编辑'
           this.getPageInfo()

+ 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;
   }
 	}