Procházet zdrojové kódy

核心报表功能调整

fujunwen před 4 roky
rodič
revize
32ce307dde
1 změnil soubory, kde provedl 32 přidání a 36 odebrání
  1. 32 36
      src/views/analysis/CoreDeviceReport.vue

+ 32 - 36
src/views/analysis/CoreDeviceReport.vue

@@ -215,6 +215,7 @@ export default {
         // {id: 3, url: require('../../assets/images/login_back.png'), name: '图层名称3.jpg'},
       ], // 图片列表
       curImg: {}, // 当前图片
+      isClickPicture: false, // 是否点击的是照片
 
       showAccessory: false, // 附件窗口显示状态
       isClickAccessory: false, // 是否点击的是附件
@@ -380,18 +381,20 @@ export default {
      * 显示设备实例的维保、专维等状态
      */
     showEquipmentStatus(row, column, e) {
+      let ins = this;
       setTimeout(() => {
-        this.hisCurPage = 1;
-        if (this.showDetail || this.showAccessory) {
-          // if (this.showAccessory) {
-          //   this.showAccessory = false;
-          // }
+        ins.hisCurPage = 1;
+        if (ins.showDetail || ins.showAccessory) {
           return;
         }
-        this.equipTitle = row.sbjc;
-        this.dialogTableVisible = true;
-        this.assetnum = row.assetnum;
-        this.initTimePicker();
+        if (ins.isClickPicture) {
+          ins.isClickPicture = false;
+          return
+        }
+        ins.equipTitle = row.sbjc;
+        ins.dialogTableVisible = true;
+        ins.assetnum = row.assetnum;
+        ins.initTimePicker();
       }, 36);
     },
     /**
@@ -423,7 +426,7 @@ export default {
                   name = "专维";
                   break;
                 case 1:
-                  name = "维保专业";
+                  name = "维保";
                   break;
                 case 2:
                   name = "第三方视图";
@@ -477,65 +480,58 @@ export default {
     showPicturesDetail(val, type) {
       console.log("val", val);
       if (type === "equip") {
+        if (!val.photos_num) {
+          this.isClickPicture = true;
+          return
+        }
         if (!val.file_type || !val.file_type_id) {
           return;
         }
       } else {
         if (!val.photosNum) {
+          this.isClickPicture = true;
           return;
         }
       }
       this.showDetail = true;
       this.detailTitle = "图片预览";
-      this.getDetailData(val);
+      this.getDetailData(val, type);
     },
     /**
      * 显示附件详情
      */
     showReportDetail(val, type, e) {
-      console.log("val", val);
+      console.log("val111", val);
       if (type === "equip") {
+        if (!val.attachments_num) {
+          this.isClickPicture = true;
+          return
+        }
         if (!val.file_type || !val.file_type_id) {
-          // return;
+          return;
         }
       } else {
-        if (!val.attachments_num) {
-          // return;
+        if (!val.attachmentsNum) {
+          this.isClickPicture = true;
+          return
         }
       }
-      console.log('e', e)
       this.accessoryPos = {
         top: e.clientY + 5,
         left: e.clientX - 360 -5
       }
-      this.isClickAccessory = true;
       this.showAccessory = true;
+      this.isClickAccessory = true;
       this.detailTitle = "附件预览";
-      this.getDetailData(val);
-    },
-    /**
-     * 显示附件详情
-     */
-    showReportDetail(val) {
-      console.log('val', val)
-      if (type === 'equip') {
-        if (!val.file_type || !val.file_type_id) {
-          return
-        }
-      } else {
-        if (!val.attachments_num) {
-          return
-        }
-      }
-      this.showDetail = true;
-      this.detailTitle = '附件预览';
-      this.getDetailData(val);
+      this.getDetailData(val, type);
     },
     /**
      * 获取图片/报告详情
      */
     getDetailData(val, type) {
       let param = {
+        assetnum: this.assetnum,
+        plazaId: this.plazaId,
         file_type: type === 'equip'?val.file_type : val.type,
         // file_type: 0,
         file_type_id: type === 'equip'?val.file_type_id : val.id,