Browse Source

8月10日杨青

杨青 1 year ago
parent
commit
f5d6d660d4
2 changed files with 48 additions and 20 deletions
  1. 14 14
      src/xt_pages/user/inspection.vue
  2. 34 6
      src/xt_pages/user/inspectionCheck.vue

+ 14 - 14
src/xt_pages/user/inspection.vue View File

@@ -131,7 +131,7 @@
131 131
                 min-width="180"
132 132
               >
133 133
                 <template slot-scope="scope">
134
-                 <span v-if="scope.row.item_name!=''"> {{ scope.row.item_name }} {{ scope.row.item_name_addition }}</span> 
134
+                 <span v-if="scope.row.item_name!=''"> {{ scope.row.item_name }} {{ scope.row.item_name_addition }}</span>
135 135
                 </template>
136 136
               </el-table-column>
137 137
 
@@ -192,7 +192,7 @@
192 192
                 <el-col :span="7" :key="index">
193 193
                   <div style=" margin: 5px;">
194 194
                     <el-row :gutter="20">
195
-                      <el-col :span="8" style="width: 100%;height: 150px;">
195
+                      <el-col :span="8" style="width: 100%;">
196 196
                         <div style="width: 100%;height: 150px;" >
197 197
                           <div @click="imgClicks(item.value)">
198 198
                             <el-tooltip
@@ -448,7 +448,7 @@
448 448
       <div slot="footer" class="dialog-footer">
449 449
         <el-upload
450 450
           :data="uploadData"
451
-          :multiple="false"
451
+          :multiple="true"
452 452
           action="https://upload.qiniup.com"
453 453
           :show-file-list="false"
454 454
           :on-error="handleAvatarError"
@@ -815,12 +815,12 @@ export default {
815 815
       this.dialogRemindFormVisible = true
816 816
       // this.temp_remind_cycle = this.
817 817
 
818
-    },openPic() {
818
+    },
819
+    openPic() {
819 820
       if (this.project == null) {
820 821
         this.$message.error('请先选择项目')
821 822
         return false
822 823
       }
823
-
824 824
       this.form.pic_method = 'add'
825 825
       this.formTitle = '新增' + this.project.project_name
826 826
       this.form.project_id = this.project.project_id
@@ -1297,22 +1297,22 @@ export default {
1297 1297
             var items = this.project.inspection_reference
1298 1298
             console.log("i5ems2323232wo",items)
1299 1299
             for (var index in items) {
1300
-             
1300
+
1301 1301
              console.log("obj",items[index])
1302 1302
               // console.log("inspectionsMap",inspectionsMap[items[index].item_id])
1303 1303
               var item = {}
1304
-            
1304
+
1305 1305
               for (var key in items[index]) {
1306 1306
                 //  console.log("key",key,items[index][key])
1307 1307
                 //  console.log("item[key]",item[key])
1308 1308
                 item[key] = items[index][key]
1309 1309
               }
1310
-             
1310
+
1311 1311
               if (item.item_id > 0) {
1312
-                 
1312
+
1313 1313
                 if (typeof(inspectionsMap[parseInt(items[index].item_id)])  == "undefined") {
1314
-                  
1315
-                 
1314
+
1315
+
1316 1316
 
1317 1317
                   if(this.org_id == 10121 || this.org_id == 0 ){
1318 1318
                     item.value = inspectionsMap[items[index].id].inspect_value
@@ -1323,13 +1323,13 @@ export default {
1323 1323
                   }
1324 1324
 
1325 1325
                 } else {
1326
-                 
1326
+
1327 1327
                   item.value = inspectionsMap[items[index].item_id].inspect_value
1328 1328
                   item.item_name = inspectionsMap[items[index].item_id].item_name
1329 1329
 
1330 1330
                 }
1331 1331
               } else {
1332
-               
1332
+
1333 1333
                 item.value = inspectionsMap[items[index].id].inspect_value
1334 1334
                 item.item_name = inspectionsMap[items[index].id].item_name
1335 1335
 
@@ -1351,7 +1351,7 @@ export default {
1351 1351
               if(item.item_name!=""){
1352 1352
                 this.items.push(item)
1353 1353
               }
1354
-            
1354
+
1355 1355
               console.log("items232232332wo",this.items)
1356 1356
 
1357 1357
               if(item.value.indexOf("http") >= 0){

+ 34 - 6
src/xt_pages/user/inspectionCheck.vue View File

@@ -117,9 +117,23 @@
117 117
             <el-row>
118 118
               <template v-for="(item, index) in items">
119 119
                 <el-col :span="7" :key="index">
120
-                  <div style="width: 400px">
120
+                  <div style="margin: 5px;">
121 121
                     <el-row>
122
-                      <img  :src="item.value" alt="">
122
+                      <el-col :span="8" style="width: 100%;">
123
+                        <div style="width: 100%;height: 150px;" >
124
+                          <div @click="imgClicks(item.value)">
125
+                            <el-tooltip
126
+                              class="item"
127
+                              effect="dark"
128
+                              :hide-after="2000"
129
+                              content="点击查看大图"
130
+                              placement="top-start"
131
+                              >
132
+                                <img style="width: 300px;height: 150px;" :src="item.value" alt="">
133
+                              </el-tooltip>
134
+                          </div>
135
+                        </div>
136
+                      </el-col>
123 137
                     </el-row>
124 138
                     <el-row>
125 139
                       <div style="word-break: break-all;word-wrap: break-word">{{item.item_name}}</div>
@@ -266,7 +280,7 @@
266 280
       <div slot="footer" class="dialog-footer">
267 281
         <el-upload
268 282
           :data="uploadData"
269
-          :multiple="false"
283
+          :multiple="true"
270 284
           action="https://upload.qiniup.com"
271 285
           :show-file-list="false"
272 286
           :on-error="handleAvatarError"
@@ -322,15 +336,19 @@
322 336
         >
323 337
       </div>
324 338
     </el-dialog>
325
-
339
+    <el-image-viewer
340
+        v-if="showViewer"
341
+        :on-close="closeViewer"
342
+        :url-list="imgs"
343
+      ></el-image-viewer>
326 344
   </div>
327 345
 
328 346
 </template>
329 347
 
330 348
 <script>
331 349
 import PatientSidebar from './components/PatientSidebar'
350
+import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
332 351
 import { getToken } from '@/api/qiniu'
333
-
334 352
 import {
335 353
   CreatePatientInspection,
336 354
   CreatePatientPICInspection,
@@ -345,7 +363,7 @@ import { getFileExtension, uParseTime } from '@/utils/tools'
345 363
 
346 364
 export default {
347 365
   name: 'Inspection',
348
-  components: { PatientSidebar },
366
+  components: { PatientSidebar,ElImageViewer },
349 367
   data() {
350 368
     return {
351 369
       temp_remind_cycle:"",
@@ -353,6 +371,7 @@ export default {
353 371
       check_content:"",
354 372
       qiniuDomain: 'https://images.shengws.com/',
355 373
       isPic:false,
374
+      showViewer:false,
356 375
       uploadData: { token: '', key: '' },
357 376
       pageLoading: true,
358 377
       itemLoading: false,
@@ -395,6 +414,15 @@ export default {
395 414
     }
396 415
   },
397 416
   methods: {
417
+    imgClicks(val){
418
+      console.log('asdasgg',val);
419
+      this.imgs = []
420
+      this.imgs.push(val)
421
+      this.showViewer = true
422
+    },
423
+    closeViewer(){
424
+      this.showViewer = false
425
+    },
398 426
     beforeAvatarUpload(file) {
399 427
       // const isJPG = file.type === "image/jpeg";
400 428
       var fileType = file.type