浏览代码

增加报修图片和处理图片的展示

seimin 1 年之前
父节点
当前提交
e2e211eb84

+ 106 - 0
src/custom/ShowPicture.vue

@@ -0,0 +1,106 @@
1
+<template>
2
+  <div class="ShowPicture">
3
+    <div class="label">报修图片</div>
4
+    <div class="imgs-container" v-if="repairImgs.length">
5
+      <img :src="img.previewUrl" v-for="(img, index) in repairImgs" :key="index" class="imgs" @click="showImgs(repairImgs)" />
6
+    </div>
7
+    <div class="label">处理图片</div>
8
+    <div class="imgs-container" v-if="handlerImgs.length">
9
+      <img :src="img.previewUrl" v-for="(img, index) in handlerImgs" :key="index" class="imgs" @click="showImgs(handlerImgs)" />
10
+    </div>
11
+  </div>
12
+</template>
13
+
14
+<script>
15
+export default {
16
+  name: 'ShowPicture',
17
+  data(){
18
+    return {
19
+      repairImgs: [], //报修图片
20
+      handlerImgs: [], //处理图片
21
+    }
22
+  },
23
+  props:['processInstanceId'],
24
+  methods:{
25
+    // 获取报修图片
26
+    getRepairImgs() {
27
+      var that = this;
28
+      that.$http
29
+        .get(
30
+          "service/common/common/listAttachment/wechatRequesterIncident/" +
31
+            that.processInstanceId,
32
+          {}
33
+        )
34
+        .then(function (res) {
35
+          console.log(res.data);
36
+          res.data.data = res.data.data || [];
37
+          res.data.data.forEach(v => {
38
+            v.previewUrl = location.origin + "/file" + v.relativeFilePath;
39
+          })
40
+          that.repairImgs = res.data.data;
41
+        });
42
+    },
43
+    // 获取处理图片
44
+    getHandlerImgs() {
45
+      var that = this;
46
+      that.$http
47
+        .get(
48
+          "service/common/common/listAttachment/incident/" +
49
+            that.processInstanceId,
50
+          {}
51
+        )
52
+        .then(function (res) {
53
+          console.log(res.data);
54
+          res.data.data = res.data.data || [];
55
+          res.data.data.forEach(v => {
56
+            v.previewUrl = location.origin + "/file" + v.relativeFilePath;
57
+          })
58
+          that.handlerImgs = res.data.data;
59
+        });
60
+    },
61
+    //展示图片
62
+    showImgs(imgs){
63
+      this.$createImagePreview({
64
+        imgs:imgs.map(v=>v.previewUrl)
65
+      }).show()
66
+    },
67
+  },
68
+  created(){
69
+    this.getRepairImgs();
70
+    this.getHandlerImgs();
71
+  }
72
+}
73
+</script>
74
+
75
+<style lang="less" scoped>
76
+.ShowPicture{
77
+  .label {
78
+    background-color: #eeeeee;
79
+    height: 0.6rem;
80
+    line-height: 0.58rem;
81
+    padding-left: 0.2rem;
82
+    font-size: 0.24rem;
83
+    color: #666666;
84
+    span {
85
+      font-size: 0.2rem;
86
+      display: inline-block;
87
+      margin-left: 0.08rem;
88
+      color: #999999;
89
+    }
90
+    &.formLabel {
91
+      background-color: #fff;
92
+    }
93
+  }
94
+
95
+  .imgs-container {
96
+    display: flex;
97
+    flex-wrap: wrap;
98
+    img {
99
+      width: 1.5rem;
100
+      height: 1.5rem;
101
+      margin: 1%;
102
+      border: 1px dotted #ccc;
103
+    }
104
+  }
105
+}
106
+</style>

+ 3 - 59
src/views/againAssign.vue

@@ -41,26 +41,7 @@
41
               >隐藏详情<<</span
41
               >隐藏详情<<</span
42
             >
42
             >
43
           </p>
43
           </p>
44
-          <div class="imgs-container" v-if="imgs.length">
45
-            <div class="imgs-cont" @click="showImgs(imgs)">
46
-              <img
47
-                v-if="
48
-                  img.suffix == 'jpeg' ||
49
-                  img.suffix == 'jpg' ||
50
-                  img.suffix == 'gif' ||
51
-                  img.suffix == 'png' ||
52
-                  img.suffix == 'svg' ||
53
-                  img.suffix == 'pdf'
54
-                "
55
-                :src="img.previewUrl"
56
-                v-for="(img, index) in imgs"
57
-                class="imgs"
58
-              />
59
-              <p v-else>
60
-                <a :href="[img.previewUrl]">{{ img.name }}</a>
61
-              </p>
62
-            </div>
63
-          </div>
44
+          <ShowPicture :processInstanceId="processInstanceId"></ShowPicture>
64
           <div class="label" id="assignee">重新指派</div>
45
           <div class="label" id="assignee">重新指派</div>
65
           <div class="info">
46
           <div class="info">
66
             <p>
47
             <p>
@@ -155,6 +136,7 @@
155
 import LoadIng from "./../views/loading.vue";
136
 import LoadIng from "./../views/loading.vue";
156
 import PrompTing from "./../views/prompting.vue";
137
 import PrompTing from "./../views/prompting.vue";
157
 import EventInformation from './../components/EventInformation/index.vue'
138
 import EventInformation from './../components/EventInformation/index.vue'
139
+import ShowPicture from './../custom/ShowPicture.vue'
158
 export default {
140
 export default {
159
   data() {
141
   data() {
160
     return {
142
     return {
@@ -166,7 +148,6 @@ export default {
166
       actives: "info",
148
       actives: "info",
167
       processInstanceId: "",
149
       processInstanceId: "",
168
       progressInfo: [], //处理进度
150
       progressInfo: [], //处理进度
169
-      imgs: [], //图片
170
       model: {}, //提交数据
151
       model: {}, //提交数据
171
       handleUserOrGroup: false, //处理人/处理组
152
       handleUserOrGroup: false, //处理人/处理组
172
       handlerUserArr: [], //处理人
153
       handlerUserArr: [], //处理人
@@ -180,6 +161,7 @@ export default {
180
     LoadIng,
161
     LoadIng,
181
     PrompTing,
162
     PrompTing,
182
     EventInformation,
163
     EventInformation,
164
+    ShowPicture,
183
   },
165
   },
184
   methods: {
166
   methods: {
185
     //   获取事件数据
167
     //   获取事件数据
@@ -201,27 +183,6 @@ export default {
201
           that.getProgressInfo();
183
           that.getProgressInfo();
202
         });
184
         });
203
     },
185
     },
204
-    //展示图片
205
-    showImgs(imgs){
206
-      this.$createImagePreview({
207
-        imgs:imgs.map(v=>v.previewUrl)
208
-      }).show()
209
-    },
210
-    // 获取图片
211
-    getImgs() {
212
-      var that = this;
213
-      that.$http
214
-        .get(
215
-          "service/common/common/listAttachment/incident/" +
216
-            that.processInstanceId,
217
-          {}
218
-        )
219
-        .then(function (res) {
220
-          console.log(res.data);
221
-          that.imgs = res.data.data.splice(0, 3);
222
-          console.log(that.imgs);
223
-        });
224
-    },
225
     // 获取处理进度
186
     // 获取处理进度
226
     getProgressInfo() {
187
     getProgressInfo() {
227
       var that = this;
188
       var that = this;
@@ -394,7 +355,6 @@ export default {
394
     this.processInstanceId = this.$route.params.data.processInstanceId;
355
     this.processInstanceId = this.$route.params.data.processInstanceId;
395
     this.id = this.$route.params.data.id;
356
     this.id = this.$route.params.data.id;
396
     this.getParamsData();
357
     this.getParamsData();
397
-    this.getImgs();
398
     this.getHandlerUser();
358
     this.getHandlerUser();
399
     this.getCandidateGroups();
359
     this.getCandidateGroups();
400
   },
360
   },
@@ -530,22 +490,6 @@ i.iconfont.blue {
530
             color: #00559d;
490
             color: #00559d;
531
           }
491
           }
532
         }
492
         }
533
-        .imgs-container {
534
-          a {
535
-            color: #03c !important;
536
-            &:visited {
537
-              color: #551a8b !important;
538
-            }
539
-          }
540
-          img {
541
-            width: 1.5rem;
542
-            height: 1.5rem;
543
-            margin-right: 0.7rem;
544
-            &:nth-child(1) {
545
-              margin-left: 0.75rem;
546
-            }
547
-          }
548
-        }
549
         .progress {
493
         .progress {
550
           padding: 0.2rem 0.2rem;
494
           padding: 0.2rem 0.2rem;
551
           overflow: hidden;
495
           overflow: hidden;

+ 3 - 59
src/views/closed.vue

@@ -49,26 +49,7 @@
49
               >隐藏详情<<</span
49
               >隐藏详情<<</span
50
             >
50
             >
51
           </p>
51
           </p>
52
-          <div class="imgs-container" v-if="imgs.length">
53
-            <div class="imgs-cont" @click="showImgs(imgs)">
54
-              <img
55
-                v-if="
56
-                  img.suffix == 'jpeg' ||
57
-                  img.suffix == 'jpg' ||
58
-                  img.suffix == 'gif' ||
59
-                  img.suffix == 'png' ||
60
-                  img.suffix == 'svg' ||
61
-                  img.suffix == 'pdf'
62
-                "
63
-                :src="img.previewUrl"
64
-                v-for="(img, index) in imgs"
65
-                class="imgs"
66
-              />
67
-              <p v-else>
68
-                <a :href="[img.previewUrl]">{{ img.name }}</a>
69
-              </p>
70
-            </div>
71
-          </div>
52
+          <ShowPicture :processInstanceId="processInstanceId"></ShowPicture>
72
 
53
 
73
           <div class="label" id="handlerInfo">处理信息</div>
54
           <div class="label" id="handlerInfo">处理信息</div>
74
           <!-- <p>
55
           <!-- <p>
@@ -187,6 +168,7 @@
187
 <script>
168
 <script>
188
 import LoadIng from "./../views/loading.vue";
169
 import LoadIng from "./../views/loading.vue";
189
 import EventInformation from './../components/EventInformation/index.vue'
170
 import EventInformation from './../components/EventInformation/index.vue'
171
+import ShowPicture from './../custom/ShowPicture.vue'
190
 export default {
172
 export default {
191
   data() {
173
   data() {
192
     return {
174
     return {
@@ -209,7 +191,6 @@ export default {
209
       actives: "info",
191
       actives: "info",
210
       processInstanceId: "",
192
       processInstanceId: "",
211
       progressInfo: [], //处理进度
193
       progressInfo: [], //处理进度
212
-      imgs: [], //图片
213
       model: {}, //提交数据
194
       model: {}, //提交数据
214
       pro_hides: false, //展开/收起处理进度
195
       pro_hides: false, //展开/收起处理进度
215
     };
196
     };
@@ -217,6 +198,7 @@ export default {
217
   components: {
198
   components: {
218
     LoadIng,
199
     LoadIng,
219
     EventInformation,
200
     EventInformation,
201
+    ShowPicture,
220
   },
202
   },
221
   methods: {
203
   methods: {
222
     // 查看汇总单
204
     // 查看汇总单
@@ -254,27 +236,6 @@ export default {
254
           that.getProgressInfo();
236
           that.getProgressInfo();
255
         });
237
         });
256
     },
238
     },
257
-    //展示图片
258
-    showImgs(imgs){
259
-      this.$createImagePreview({
260
-        imgs:imgs.map(v=>v.previewUrl)
261
-      }).show()
262
-    },
263
-    // 获取图片
264
-    getImgs() {
265
-      var that = this;
266
-      that.$http
267
-        .get(
268
-          "service/common/common/listAttachment/incident/" +
269
-            that.processInstanceId,
270
-          {}
271
-        )
272
-        .then(function (res) {
273
-          console.log(res.data);
274
-          that.imgs = res.data.data.splice(0, 3);
275
-          console.log(that.imgs);
276
-        });
277
-    },
278
     // 获取处理进度
239
     // 获取处理进度
279
     getProgressInfo() {
240
     getProgressInfo() {
280
       var that = this;
241
       var that = this;
@@ -364,7 +325,6 @@ export default {
364
       ? this.$route.params.data.id
325
       ? this.$route.params.data.id
365
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
326
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
366
     this.getParamsData();
327
     this.getParamsData();
367
-    this.getImgs();
368
   },
328
   },
369
 };
329
 };
370
 </script>
330
 </script>
@@ -507,22 +467,6 @@ i.iconfont {
507
             color: #00559d;
467
             color: #00559d;
508
           }
468
           }
509
         }
469
         }
510
-        .imgs-container {
511
-          a {
512
-            color: #03c !important;
513
-            &:visited {
514
-              color: #551a8b !important;
515
-            }
516
-          }
517
-          img {
518
-            width: 1.5rem;
519
-            height: 1.5rem;
520
-            margin-right: 0.7rem;
521
-            &:nth-child(1) {
522
-              margin-left: 0.75rem;
523
-            }
524
-          }
525
-        }
526
         .progress {
470
         .progress {
527
           padding: 0.2rem 0.2rem;
471
           padding: 0.2rem 0.2rem;
528
           overflow: hidden;
472
           overflow: hidden;

+ 3 - 59
src/views/grabSheet.vue

@@ -34,26 +34,7 @@
34
                 >隐藏详情<<</span
34
                 >隐藏详情<<</span
35
               >
35
               >
36
             </p>
36
             </p>
37
-            <div class="imgs-container" v-if="imgs.length">
38
-              <div class="imgs-cont" @click="showImgs(imgs)">
39
-                <img
40
-                  v-if="
41
-                    img.suffix == 'jpeg' ||
42
-                    img.suffix == 'jpg' ||
43
-                    img.suffix == 'gif' ||
44
-                    img.suffix == 'png' ||
45
-                    img.suffix == 'svg' ||
46
-                    img.suffix == 'pdf'
47
-                  "
48
-                  :src="img.previewUrl"
49
-                  v-for="(img, index) in imgs"
50
-                  class="imgs"
51
-                />
52
-                <p v-else>
53
-                  <a :href="[img.previewUrl]">{{ img.name }}</a>
54
-                </p>
55
-              </div>
56
-            </div>
37
+            <ShowPicture :processInstanceId="processInstanceId"></ShowPicture>
57
 
38
 
58
             <div class="label" id="progress">处理进度</div>
39
             <div class="label" id="progress">处理进度</div>
59
             <div
40
             <div
@@ -103,6 +84,7 @@
103
 <script>
84
 <script>
104
 import LoadIng from "./../views/loading.vue";
85
 import LoadIng from "./../views/loading.vue";
105
 import EventInformation from './../components/EventInformation/index.vue'
86
 import EventInformation from './../components/EventInformation/index.vue'
87
+import ShowPicture from './../custom/ShowPicture.vue'
106
 export default {
88
 export default {
107
   data() {
89
   data() {
108
     return {
90
     return {
@@ -126,7 +108,6 @@ export default {
126
       actives: "info",
108
       actives: "info",
127
       processInstanceId: "",
109
       processInstanceId: "",
128
       progressInfo: [], //处理进度
110
       progressInfo: [], //处理进度
129
-      imgs: [], //图片
130
       model: {}, //提交数据
111
       model: {}, //提交数据
131
       jurisdiction: false, //是否有抢单权限
112
       jurisdiction: false, //是否有抢单权限
132
       pro_hides: false, //展开/收起处理进度
113
       pro_hides: false, //展开/收起处理进度
@@ -164,27 +145,6 @@ export default {
164
           that.getProgressInfo();
145
           that.getProgressInfo();
165
         });
146
         });
166
     },
147
     },
167
-    //展示图片
168
-    showImgs(imgs){
169
-      this.$createImagePreview({
170
-        imgs:imgs.map(v=>v.previewUrl)
171
-      }).show()
172
-    },
173
-    // 获取图片
174
-    getImgs() {
175
-      var that = this;
176
-      that.$http
177
-        .get(
178
-          "service/common/common/listAttachment/incident/" +
179
-            that.processInstanceId,
180
-          {}
181
-        )
182
-        .then(function (res) {
183
-          console.log(res.data);
184
-          that.imgs = res.data.data.splice(0, 3);
185
-          console.log(that.imgs);
186
-        });
187
-    },
188
     // 获取处理进度
148
     // 获取处理进度
189
     getProgressInfo() {
149
     getProgressInfo() {
190
       var that = this;
150
       var that = this;
@@ -316,6 +276,7 @@ export default {
316
   components: {
276
   components: {
317
     LoadIng,
277
     LoadIng,
318
     EventInformation,
278
     EventInformation,
279
+    ShowPicture,
319
   },
280
   },
320
   created() {
281
   created() {
321
     if(this.menu){
282
     if(this.menu){
@@ -330,7 +291,6 @@ export default {
330
       ? this.$route.params.data.id
291
       ? this.$route.params.data.id
331
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
292
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
332
     this.getParamsData();
293
     this.getParamsData();
333
-    this.getImgs();
334
   },
294
   },
335
 };
295
 };
336
 </script>
296
 </script>
@@ -469,22 +429,6 @@ export default {
469
             color: #00559d;
429
             color: #00559d;
470
           }
430
           }
471
         }
431
         }
472
-        .imgs-container {
473
-          a {
474
-            color: #03c !important;
475
-            &:visited {
476
-              color: #551a8b !important;
477
-            }
478
-          }
479
-          img {
480
-            width: 1.5rem;
481
-            height: 1.5rem;
482
-            margin-right: 0.7rem;
483
-            &:nth-child(1) {
484
-              margin-left: 0.75rem;
485
-            }
486
-          }
487
-        }
488
         .progress {
432
         .progress {
489
           padding: 0.2rem 0.2rem;
433
           padding: 0.2rem 0.2rem;
490
           overflow: hidden;
434
           overflow: hidden;

+ 1 - 1
src/views/newIncident.vue

@@ -275,7 +275,7 @@ export default {
275
       valid: undefined,
275
       valid: undefined,
276
       action: {
276
       action: {
277
         target:
277
         target:
278
-          this.$host + "/service/common/common/uploadAttachment/incident/",
278
+          this.$host + "/service/common/common/uploadAttachment/wechatRequesterIncident/",
279
         data: {}
279
         data: {}
280
       },
280
       },
281
       isUploading: false,
281
       isUploading: false,

+ 3 - 59
src/views/order.vue

@@ -58,26 +58,7 @@
58
                 >隐藏详情 <<</span
58
                 >隐藏详情 <<</span
59
               >
59
               >
60
             </p>
60
             </p>
61
-            <div class="imgs-container" v-if="imgs.length">
62
-              <div class="imgs-cont" @click="showImgs(imgs)">
63
-                <img
64
-                  v-if="
65
-                    img.suffix == 'jpeg' ||
66
-                    img.suffix == 'jpg' ||
67
-                    img.suffix == 'gif' ||
68
-                    img.suffix == 'png' ||
69
-                    img.suffix == 'svg' ||
70
-                    img.suffix == 'pdf'
71
-                  "
72
-                  :src="img.previewUrl"
73
-                  v-for="(img, index) in imgs"
74
-                  class="imgs"
75
-                />
76
-                <p v-else>
77
-                  <a :href="[img.previewUrl]">{{ img.name }}</a>
78
-                </p>
79
-              </div>
80
-            </div>
61
+            <ShowPicture :processInstanceId="processInstanceId"></ShowPicture>
81
             <!-- <HandlerLog :data="model.incident.handlerLogs" id="handlerLog"></HandlerLog> -->
62
             <!-- <HandlerLog :data="model.incident.handlerLogs" id="handlerLog"></HandlerLog> -->
82
             <div class="label" id="progress">处理进度</div>
63
             <div class="label" id="progress">处理进度</div>
83
             <div
64
             <div
@@ -153,6 +134,7 @@
153
 import LoadIng from "./../views/loading.vue";
134
 import LoadIng from "./../views/loading.vue";
154
 import PrompTing from "./../views/prompting.vue";
135
 import PrompTing from "./../views/prompting.vue";
155
 import EventInformation from './../components/EventInformation/index.vue'
136
 import EventInformation from './../components/EventInformation/index.vue'
137
+import ShowPicture from './../custom/ShowPicture.vue'
156
 export default {
138
 export default {
157
   data() {
139
   data() {
158
     return {
140
     return {
@@ -176,7 +158,6 @@ export default {
176
       actives: "info",
158
       actives: "info",
177
       processInstanceId: "",
159
       processInstanceId: "",
178
       progressInfo: [], //处理进度
160
       progressInfo: [], //处理进度
179
-      imgs: [], //图片
180
       model: {}, //提交数据
161
       model: {}, //提交数据
181
       pro_hides: false, //展开/收起处理进度
162
       pro_hides: false, //展开/收起处理进度
182
     };
163
     };
@@ -185,6 +166,7 @@ export default {
185
     LoadIng,
166
     LoadIng,
186
     PrompTing,
167
     PrompTing,
187
     EventInformation,
168
     EventInformation,
169
+    ShowPicture,
188
   },
170
   },
189
   methods: {
171
   methods: {
190
     //   获取事件数据
172
     //   获取事件数据
@@ -208,27 +190,6 @@ export default {
208
           that.getProgressInfo();
190
           that.getProgressInfo();
209
         });
191
         });
210
     },
192
     },
211
-    //展示图片
212
-    showImgs(imgs){
213
-      this.$createImagePreview({
214
-        imgs:imgs.map(v=>v.previewUrl)
215
-      }).show()
216
-    },
217
-    // 获取图片
218
-    getImgs() {
219
-      var that = this;
220
-      that.$http
221
-        .get(
222
-          "service/common/common/listAttachment/incident/" +
223
-            that.processInstanceId,
224
-          {}
225
-        )
226
-        .then(function (res) {
227
-          console.log(res.data);
228
-          that.imgs = res.data.data.splice(0, 3);
229
-          console.log(that.imgs);
230
-        });
231
-    },
232
     // 获取处理进度
193
     // 获取处理进度
233
     getProgressInfo() {
194
     getProgressInfo() {
234
       var that = this;
195
       var that = this;
@@ -371,7 +332,6 @@ export default {
371
       ? this.$route.params.data.id
332
       ? this.$route.params.data.id
372
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
333
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
373
     this.getParamsData();
334
     this.getParamsData();
374
-    this.getImgs();
375
   },
335
   },
376
 };
336
 };
377
 </script>
337
 </script>
@@ -509,22 +469,6 @@ i.iconfont.blue {
509
             color: #00559d;
469
             color: #00559d;
510
           }
470
           }
511
         }
471
         }
512
-        .imgs-container {
513
-          a {
514
-            color: #03c !important;
515
-            &:visited {
516
-              color: #551a8b !important;
517
-            }
518
-          }
519
-          img {
520
-            width: 1.5rem;
521
-            height: 1.5rem;
522
-            margin-right: 0.7rem;
523
-            &:nth-child(1) {
524
-              margin-left: 0.75rem;
525
-            }
526
-          }
527
-        }
528
         .progress {
472
         .progress {
529
           padding: 0.2rem 0.2rem;
473
           padding: 0.2rem 0.2rem;
530
           overflow: hidden;
474
           overflow: hidden;

+ 5 - 59
src/views/processing.vue

@@ -61,26 +61,7 @@
61
               >隐藏详情<<</span
61
               >隐藏详情<<</span
62
             >
62
             >
63
           </p>
63
           </p>
64
-          <div class="imgs-container" v-if="imgs.length">
65
-            <div class="imgs-cont" @click="showImgs(imgs)">
66
-              <img
67
-                v-if="
68
-                  img.suffix == 'jpeg' ||
69
-                    img.suffix == 'jpg' ||
70
-                    img.suffix == 'gif' ||
71
-                    img.suffix == 'png' ||
72
-                    img.suffix == 'svg' ||
73
-                    img.suffix == 'pdf'
74
-                "
75
-                :src="img.previewUrl"
76
-                v-for="(img, index) in imgs"
77
-                class="imgs"
78
-              />
79
-              <p v-else>
80
-                <a :href="[img.previewUrl]">{{ img.name }}</a>
81
-              </p>
82
-            </div>
83
-          </div>
64
+          <ShowPicture :processInstanceId="processInstanceId"></ShowPicture>
84
           <!-- <HandlerLog :data="modelData.incident.handlerLogs" id="handlerLog"></HandlerLog> -->
65
           <!-- <HandlerLog :data="modelData.incident.handlerLogs" id="handlerLog"></HandlerLog> -->
85
           <div class="label" id="progress">处理进度</div>
66
           <div class="label" id="progress">处理进度</div>
86
           <div
67
           <div
@@ -218,7 +199,7 @@
218
                   </cube-form-item>
199
                   </cube-form-item>
219
 
200
 
220
                   <div class="label formLabel" v-if="order == 1">
201
                   <div class="label formLabel" v-if="order == 1">
221
-                    报修图片
202
+                    处理图片
222
                     <span>(最多可上传3张JPG或PNG,每张不能超过10M)</span>
203
                     <span>(最多可上传3张JPG或PNG,每张不能超过10M)</span>
223
                   </div>
204
                   </div>
224
                   <div class="uplod" v-if="order == 1">
205
                   <div class="uplod" v-if="order == 1">
@@ -333,6 +314,7 @@ import CubeExtendPopup from "./../components/extend-popup.vue";
333
 import LoadIng from "./../views/loading.vue";
314
 import LoadIng from "./../views/loading.vue";
334
 import PrompTing from "./../views/prompting.vue";
315
 import PrompTing from "./../views/prompting.vue";
335
 import EventInformation from "./../components/EventInformation/index.vue";
316
 import EventInformation from "./../components/EventInformation/index.vue";
317
+import ShowPicture from './../custom/ShowPicture.vue'
336
 // import HandlerLog from "./../views/handlerLog.vue";
318
 // import HandlerLog from "./../views/handlerLog.vue";
337
 // import host from '../request/host'
319
 // import host from '../request/host'
338
 
320
 
@@ -453,7 +435,6 @@ export default {
453
       actives: "info",
435
       actives: "info",
454
       processInstanceId: "",
436
       processInstanceId: "",
455
       progressInfo: [], //处理进度
437
       progressInfo: [], //处理进度
456
-      imgs: [], //图片
457
       model: {}, //提交数据
438
       model: {}, //提交数据
458
       validity: {},
439
       validity: {},
459
       valid: undefined,
440
       valid: undefined,
@@ -989,25 +970,6 @@ export default {
989
           this.model.description = this.modelData.incident.description;
970
           this.model.description = this.modelData.incident.description;
990
         });
971
         });
991
     },
972
     },
992
-    //展示图片
993
-    showImgs(imgs) {
994
-      this.$createImagePreview({
995
-        imgs: imgs.map(v => v.previewUrl)
996
-      }).show();
997
-    },
998
-    // 获取图片
999
-    getImgs() {
1000
-      var that = this;
1001
-      that.$http
1002
-        .get(
1003
-          "service/common/common/listAttachment/incident/" +
1004
-            that.processInstanceId,
1005
-          {}
1006
-        )
1007
-        .then(function(res) {
1008
-          that.imgs = res.data.data.splice(0, 3);
1009
-        });
1010
-    },
1011
     // 故障现象回显
973
     // 故障现象回显
1012
     setCategory() {
974
     setCategory() {
1013
       let that = this;
975
       let that = this;
@@ -2020,7 +1982,6 @@ export default {
2020
     this.action.target += this.processInstanceId;
1982
     this.action.target += this.processInstanceId;
2021
     this.getParamsData();
1983
     this.getParamsData();
2022
     this.getHcs();
1984
     this.getHcs();
2023
-    this.getImgs();
2024
     // 处理方式
1985
     // 处理方式
2025
     this.getHandleCategory();
1986
     this.getHandleCategory();
2026
     // 关闭代码
1987
     // 关闭代码
@@ -2069,7 +2030,8 @@ export default {
2069
     CubeExtendPopup,
2030
     CubeExtendPopup,
2070
     LoadIng,
2031
     LoadIng,
2071
     PrompTing,
2032
     PrompTing,
2072
-    EventInformation
2033
+    EventInformation,
2034
+    ShowPicture,
2073
     // HandlerLog
2035
     // HandlerLog
2074
   }
2036
   }
2075
 };
2037
 };
@@ -2368,22 +2330,6 @@ i.iconfont.blue {
2368
             color: #00559d;
2330
             color: #00559d;
2369
           }
2331
           }
2370
         }
2332
         }
2371
-        .imgs-container {
2372
-          a {
2373
-            color: #03c !important;
2374
-            &:visited {
2375
-              color: #551a8b !important;
2376
-            }
2377
-          }
2378
-          img {
2379
-            width: 1.5rem;
2380
-            height: 1.5rem;
2381
-            margin-right: 0.7rem;
2382
-            &:nth-child(1) {
2383
-              margin-left: 0.75rem;
2384
-            }
2385
-          }
2386
-        }
2387
         .progress {
2333
         .progress {
2388
           padding: 0.2rem 0.2rem;
2334
           padding: 0.2rem 0.2rem;
2389
           overflow: hidden;
2335
           overflow: hidden;

+ 3 - 59
src/views/solved.vue

@@ -49,26 +49,7 @@
49
               >隐藏详情<<</span
49
               >隐藏详情<<</span
50
             >
50
             >
51
           </p>
51
           </p>
52
-          <div class="imgs-container" v-if="imgs.length">
53
-            <div class="imgs-cont" @click="showImgs(imgs)">
54
-              <img
55
-                v-if="
56
-                  img.suffix == 'jpeg' ||
57
-                  img.suffix == 'jpg' ||
58
-                  img.suffix == 'gif' ||
59
-                  img.suffix == 'png' ||
60
-                  img.suffix == 'svg' ||
61
-                  img.suffix == 'pdf'
62
-                "
63
-                :src="img.previewUrl"
64
-                v-for="(img, index) in imgs"
65
-                class="imgs"
66
-              />
67
-              <p v-else>
68
-                <a :href="[img.previewUrl]">{{ img.name }}</a>
69
-              </p>
70
-            </div>
71
-          </div>
52
+          <ShowPicture :processInstanceId="processInstanceId"></ShowPicture>
72
 
53
 
73
           <div class="label" id="handlerInfo">处理信息</div>
54
           <div class="label" id="handlerInfo">处理信息</div>
74
           <p>
55
           <p>
@@ -212,6 +193,7 @@
212
 <script>
193
 <script>
213
 import LoadIng from "./../views/loading.vue";
194
 import LoadIng from "./../views/loading.vue";
214
 import EventInformation from './../components/EventInformation/index.vue'
195
 import EventInformation from './../components/EventInformation/index.vue'
196
+import ShowPicture from './../custom/ShowPicture.vue'
215
 // import HandlerLog from "./../views/handlerLog.vue";
197
 // import HandlerLog from "./../views/handlerLog.vue";
216
 export default {
198
 export default {
217
   data() {
199
   data() {
@@ -241,13 +223,13 @@ export default {
241
       actives: "info",
223
       actives: "info",
242
       processInstanceId: "",
224
       processInstanceId: "",
243
       progressInfo: [], //处理进度
225
       progressInfo: [], //处理进度
244
-      imgs: [], //图片
245
       model: {}, //提交数据
226
       model: {}, //提交数据
246
     };
227
     };
247
   },
228
   },
248
   components: {
229
   components: {
249
     LoadIng,
230
     LoadIng,
250
     EventInformation,
231
     EventInformation,
232
+    ShowPicture,
251
     // HandlerLog
233
     // HandlerLog
252
   },
234
   },
253
   methods: {
235
   methods: {
@@ -287,27 +269,6 @@ export default {
287
           that.getProgressInfo();
269
           that.getProgressInfo();
288
         });
270
         });
289
     },
271
     },
290
-    //展示图片
291
-    showImgs(imgs){
292
-      this.$createImagePreview({
293
-        imgs:imgs.map(v=>v.previewUrl)
294
-      }).show()
295
-    },
296
-    // 获取图片
297
-    getImgs() {
298
-      var that = this;
299
-      that.$http
300
-        .get(
301
-          "service/common/common/listAttachment/incident/" +
302
-            that.processInstanceId,
303
-          {}
304
-        )
305
-        .then(function (res) {
306
-          console.log(res.data);
307
-          that.imgs = res.data.data.splice(0, 3);
308
-          console.log(that.imgs);
309
-        });
310
-    },
311
     // 获取处理进度
272
     // 获取处理进度
312
     getProgressInfo() {
273
     getProgressInfo() {
313
       var that = this;
274
       var that = this;
@@ -493,7 +454,6 @@ export default {
493
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
454
       : JSON.parse(localStorage.getItem("modelData")).incident.id;
494
     this.getParamsData();
455
     this.getParamsData();
495
 
456
 
496
-    this.getImgs();
497
     this.getHandlerRes();
457
     this.getHandlerRes();
498
     this.getDegree();
458
     this.getDegree();
499
   },
459
   },
@@ -656,22 +616,6 @@ i.iconfont {
656
             color: #00559d;
616
             color: #00559d;
657
           }
617
           }
658
         }
618
         }
659
-        .imgs-container {
660
-          a {
661
-            color: #03c !important;
662
-            &:visited {
663
-              color: #551a8b !important;
664
-            }
665
-          }
666
-          img {
667
-            width: 1.5rem;
668
-            height: 1.5rem;
669
-            margin-right: 0.7rem;
670
-            &:nth-child(1) {
671
-              margin-left: 0.75rem;
672
-            }
673
-          }
674
-        }
675
 
619
 
676
         .progress {
620
         .progress {
677
           padding: 0.2rem 0.2rem;
621
           padding: 0.2rem 0.2rem;

+ 5 - 59
src/views/waitConfirm.vue

@@ -157,26 +157,7 @@
157
               >隐藏详情<<</span
157
               >隐藏详情<<</span
158
             >
158
             >
159
           </p>
159
           </p>
160
-          <div class="imgs-container" v-if="imgs.length">
161
-            <div class="imgs-cont" @click="showImgs(imgs)">
162
-              <img
163
-                v-if="
164
-                  img.suffix == 'jpeg' ||
165
-                    img.suffix == 'jpg' ||
166
-                    img.suffix == 'gif' ||
167
-                    img.suffix == 'png' ||
168
-                    img.suffix == 'svg' ||
169
-                    img.suffix == 'pdf'
170
-                "
171
-                :src="img.previewUrl"
172
-                v-for="(img, index) in imgs"
173
-                class="imgs"
174
-              />
175
-              <p v-else>
176
-                <a :href="[img.previewUrl]">{{ img.name }}</a>
177
-              </p>
178
-            </div>
179
-          </div>
160
+          <ShowPicture :processInstanceId="processInstanceId"></ShowPicture>
180
 
161
 
181
           <div class="label" id="handlerInfo">处理信息</div>
162
           <div class="label" id="handlerInfo">处理信息</div>
182
           <p>
163
           <p>
@@ -247,6 +228,7 @@
247
   </div>
228
   </div>
248
 </template>
229
 </template>
249
 <script>
230
 <script>
231
+import ShowPicture from './../custom/ShowPicture.vue'
250
 export default {
232
 export default {
251
   data() {
233
   data() {
252
     return {
234
     return {
@@ -269,7 +251,6 @@ export default {
269
       actives: "info",
251
       actives: "info",
270
       processInstanceId: "",
252
       processInstanceId: "",
271
       progressInfo: [], //处理进度
253
       progressInfo: [], //处理进度
272
-      imgs: [], //图片
273
       model: {} //提交数据
254
       model: {} //提交数据
274
     };
255
     };
275
   },
256
   },
@@ -290,27 +271,6 @@ export default {
290
           that.model = res.data.model;
271
           that.model = res.data.model;
291
         });
272
         });
292
     },
273
     },
293
-    //展示图片
294
-    showImgs(imgs){
295
-      this.$createImagePreview({
296
-        imgs:imgs.map(v=>v.previewUrl)
297
-      }).show()
298
-    },
299
-    // 获取图片
300
-    getImgs() {
301
-      var that = this;
302
-      that.$http
303
-        .get(
304
-          "service/common/common/listAttachment/incident/" +
305
-            that.processInstanceId,
306
-          {}
307
-        )
308
-        .then(function(res) {
309
-          console.log(res.data);
310
-          that.imgs = res.data.data.splice(0, 3);
311
-          console.log(that.imgs);
312
-        });
313
-    },
314
     // 获取处理进度
274
     // 获取处理进度
315
     getHandlerInfo() {
275
     getHandlerInfo() {
316
       var that = this;
276
       var that = this;
@@ -353,7 +313,9 @@ export default {
353
     this.processInstanceId = this.$route.params.data.processInstanceId;
313
     this.processInstanceId = this.$route.params.data.processInstanceId;
354
     this.getParamsData();
314
     this.getParamsData();
355
     this.getHandlerInfo();
315
     this.getHandlerInfo();
356
-    this.getImgs();
316
+  },
317
+  components:{
318
+    ShowPicture,
357
   }
319
   }
358
 };
320
 };
359
 </script>
321
 </script>
@@ -496,22 +458,6 @@ i.iconfont {
496
             color: #00559d;
458
             color: #00559d;
497
           }
459
           }
498
         }
460
         }
499
-        .imgs-container {
500
-          a {
501
-            color: #03c !important;
502
-            &:visited {
503
-              color: #551a8b !important;
504
-            }
505
-          }
506
-          img {
507
-            width: 1.5rem;
508
-            height: 1.5rem;
509
-            margin-right: 0.7rem;
510
-            &:nth-child(1) {
511
-              margin-left: 0.75rem;
512
-            }
513
-          }
514
-        }
515
         .progress {
461
         .progress {
516
           padding: 0.2rem 0.2rem;
462
           padding: 0.2rem 0.2rem;
517
           overflow: hidden;
463
           overflow: hidden;