dedsudiyu 4 月之前
父节点
当前提交
10b641ec0a

+ 21 - 1
src/components/fullScreenView/fullScreenView.vue

@@ -35,7 +35,7 @@
       <!--复位按钮-->
       <!--复位按钮-->
       <p class="position-refresh-p el-icon-refresh" @click="clickLookImg(lookIndex)"></p>
       <p class="position-refresh-p el-icon-refresh" @click="clickLookImg(lookIndex)"></p>
       <!--下载按钮-->
       <!--下载按钮-->
-      <p class="position-download-p el-icon-download" @click="downloadImage" v-if="!imgNullType"></p>
+      <p class="position-download-p el-icon-download" @click="downloadImageUrl" v-if="!imgNullType"></p>
       <!--关闭按钮-->
       <!--关闭按钮-->
       <p class="position-off-p el-icon-circle-close" @click="outButton"></p>
       <p class="position-off-p el-icon-circle-close" @click="outButton"></p>
       <div class="max-img-box" ref="viewBox">
       <div class="max-img-box" ref="viewBox">
@@ -97,6 +97,8 @@
         //预览图片组坐标
         //预览图片组坐标
         listClientX:null,
         listClientX:null,
         listClientY:null,
         listClientY:null,
+        //文件服务地址
+        fileBrowseEnvironment:localStorage.getItem('fileBrowseEnvironment'),
       }
       }
     },
     },
     created(){
     created(){
@@ -346,6 +348,24 @@
         }
         }
       },
       },
       /*************滚动条拖拽事件*************/
       /*************滚动条拖拽事件*************/
+      downloadImageUrl(){
+        if(!this.lookImg){
+          this.msgError('加载失败,无法下载.')
+        }else{
+          let fileName = this.lookImg.split('/');
+          const x = new window.XMLHttpRequest();
+          x.open('GET', this.fileBrowseEnvironment+this.lookImg, true);
+          x.responseType = 'blob';
+          x.onload = () => {
+            const url = window.URL.createObjectURL(x.response);
+            const a = document.createElement('a');
+            a.href = url;
+            a.download = fileName[fileName.length-1];
+            a.click();
+          };
+          x.send();
+        }
+      },
       async downloadImage() {
       async downloadImage() {
         let currentDate = this.getCurrentTime()
         let currentDate = this.getCurrentTime()
         // 获取图片对象和画布对象
         // 获取图片对象和画布对象

+ 1 - 1
src/views/safetyCheck/safetyHazard/snapshotHazard/index.vue

@@ -124,7 +124,7 @@
           <el-table-column label="隐患描述" prop="hazardDescribe" width="350" show-overflow-tooltip/>
           <el-table-column label="隐患描述" prop="hazardDescribe" width="350" show-overflow-tooltip/>
           <el-table-column label="整改状态" prop="rectifyStatus" width="130" show-overflow-tooltip>
           <el-table-column label="整改状态" prop="rectifyStatus" width="130" show-overflow-tooltip>
             <template slot-scope="scope">
             <template slot-scope="scope">
-              <span>{{scope.row.rectifyStatus == 1?'已完成':(scope.row.rectifyStatus == 2?'暂无法整改':'待整改')}}</span>
+              <span>{{scope.row.rectifyStatus == 1?'已整改':(scope.row.rectifyStatus == 2?'暂无法整改':'待整改')}}</span>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column label="整改人" prop="rectifyUserName" width="100" show-overflow-tooltip/>
           <el-table-column label="整改人" prop="rectifyUserName" width="100" show-overflow-tooltip/>

+ 1 - 1
src/views/safetyCheck/snapshot/index.vue

@@ -75,7 +75,7 @@
           </el-table-column>
           </el-table-column>
           <el-table-column label="整改状态" prop="rectifyStatus" width="100" show-overflow-tooltip>
           <el-table-column label="整改状态" prop="rectifyStatus" width="100" show-overflow-tooltip>
             <template slot-scope="scope">
             <template slot-scope="scope">
-              {{scope.row.rectifyStatus == 0?'待整改':(scope.row.rectifyStatus == 1?'已完成':(scope.row.rectifyStatus == 2?'暂无法整改':''))}}
+              {{scope.row.rectifyStatus == 0?'待整改':(scope.row.rectifyStatus == 1?'已整改':(scope.row.rectifyStatus == 2?'暂无法整改':''))}}
             </template>
             </template>
           </el-table-column>
           </el-table-column>
           <el-table-column label="操作" width="130" show-overflow-tooltip >
           <el-table-column label="操作" width="130" show-overflow-tooltip >