Explorar el Código

Merge branch 'VERSIONS-AnQuanJianCha' into VERSIONS-FenJiGuanKong

dedsudiyu hace 4 meses
padre
commit
422f126768

+ 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-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>
       <div class="max-img-box" ref="viewBox">
@@ -97,6 +97,8 @@
         //预览图片组坐标
         listClientX:null,
         listClientY:null,
+        //文件服务地址
+        fileBrowseEnvironment:localStorage.getItem('fileBrowseEnvironment'),
       }
     },
     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() {
         let currentDate = this.getCurrentTime()
         // 获取图片对象和画布对象

+ 1 - 1
src/views/safetyCheck/components/initiateInspect/initiateInspect.vue

@@ -204,7 +204,7 @@
           </p>
           <div v-if="addForm.checkFlag == 0 && initiateData.orderType == 1 && projectData.checkSetProgress < 100 && itemShowType_3" style="margin-top:20px;">
             <el-form-item label="隐患描述" prop="hazardDescribe">
-              <el-input placeholder="请输入隐患描述" maxLength='200' type="textarea" style="width:704px;"
+              <el-input placeholder="请输入隐患描述" maxlength='200' type="textarea" style="width:704px;"
                         resize="none" v-model="addForm.hazardDescribe" show-word-limit :rows="3"></el-input>
             </el-form-item>
             <el-form-item label="现场照片" prop="uploadDtoList">

+ 1 - 1
src/views/safetyCheck/components/initiateInspect/recheckComponent.vue

@@ -25,7 +25,7 @@
           </div>
         </el-form-item>
         <el-form-item label="验证情况" prop="examineOpinion">
-          <el-input placeholder="请输入验证情况" maxLength='200' type="textarea" style="width:704px;"
+          <el-input placeholder="请输入验证情况" maxlength='200' type="textarea" style="width:704px;"
                     resize="none" v-model="addForm.examineOpinion" show-word-limit :rows="3"></el-input>
         </el-form-item>
         <el-form-item label="现场照片" prop="examineUploadList">

+ 2 - 2
src/views/safetyCheck/components/snapshotInfo.vue

@@ -115,7 +115,7 @@
         </p>
         <div v-if="itemShowType_3" class="show-box">
           <el-form-item label="隐患描述" prop="hazardDescribe">
-            <el-input placeholder="请输入隐患描述" maxLength='200' type="textarea" style="width:704px;"
+            <el-input placeholder="请输入隐患描述" maxlength='200' type="textarea" style="width:704px;"
                       :disabled="lookInfoType||propsData.rectify"
                       resize="none" v-model="addForm.hazardDescribe" show-word-limit :rows="3"></el-input>
           </el-form-item>
@@ -148,7 +148,7 @@
               <p :style="'line-height:40px;'+(addForm.rectifyStatus==1?'color:#009519;':'color:#FF8C00;')">{{addForm.rectifyStatus==1?'已整改':(addForm.rectifyStatus==2?'暂无法整改':'')}}</p>
             </el-form-item>
             <el-form-item label="整改措施">
-              <el-input placeholder="" maxLength='200' type="textarea" style="width:704px;"
+              <el-input placeholder="" maxlength='200' type="textarea" style="width:704px;"
                         :disabled="lookInfoType||propsData.rectify"
                         resize="none" v-model="addForm.rectifyDescribe" show-word-limit :rows="3"></el-input>
             </el-form-item>

+ 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="rectifyStatus" width="130" show-overflow-tooltip>
             <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>
           </el-table-column>
           <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 label="整改状态" prop="rectifyStatus" width="100" show-overflow-tooltip>
             <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>
           </el-table-column>
           <el-table-column label="操作" width="130" show-overflow-tooltip >