safecheck-client 4.0.1-92 → 4.0.1-94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1338 +1,1338 @@
1
- <style scoped>
2
- .img {
3
- border: 1px solid #9773ed;
4
- width: auto;
5
- height: auto;
6
- float: left;
7
- text-align: center;
8
- margin: 6px;
9
- }
10
-
11
- img {
12
- margin: 6px;
13
- }
14
-
15
-
16
- .container {
17
- margin: 10px auto;
18
- width: 80%;
19
- height: auto;
20
- }
21
-
22
- div::-webkit-scrollbar {
23
- width: 0 !important;
24
- height: 0 !important;
25
- }
26
-
27
- div {
28
- -ms-overflow-style: none;
29
- overflow: -moz-scrollbars-none;
30
- }
31
-
32
- .divmask {
33
- pointer-events: none;
34
- }
35
-
36
- .app-header {
37
- border-radius: 50%;
38
- background: rgba(73, 158, 223, 0.4);
39
- color: #FFF;
40
- padding: 20px;
41
- text-align: center;
42
- font-size: 1.2em;
43
- z-index: 10;
44
- opacity: 0.5;
45
- bottom: 50px;
46
- margin-top: -20px;
47
- position: absolute;
48
- top: 10%;
49
- right: 2%;
50
- height: 8%;
51
- }
52
- </style>
53
-
54
- <template>
55
- <div class="basic-main" style="height: 100%">
56
- <work-busy :is-busy="loading"></work-busy>
57
- <div class="container-fluid" style="overflow: scroll">
58
- <div class="row">
59
- <div class="col-md-5" style="margin-right: 2%;margin-left: 2%;height: 100%;overflow: scroll">
60
- <div style="width: 100%;margin: auto">
61
- <table class="table table-striped table-bordered" style="margin-bottom: 6px">
62
- <thead>
63
- <tr>
64
- <th colspan="6" style="text-align: center">用户基本信息</th>
65
- </tr>
66
- </thead>
67
- <tbody>
68
- <tr>
69
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">用户编号:</td>
70
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_userinfo_code }}</td>
71
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">用户名称:</td>
72
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_user_name }}</td>
73
- </tr>
74
- <tr>
75
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">证件号码:</td>
76
- <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;width: 83%">{{ paperdata.f_idnumber }}</td>
77
- </tr>
78
- <tr>
79
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">用户电话:</td>
80
- <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;width: 83%">{{ paperdata.f_user_phone }}</td>
81
- </tr>
82
- <tr>
83
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">用户类型:</td>
84
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_check_type }}</td>
85
- <td style="text-align: center;border: #E9E9E9 solid 1px">区 / 县:</td>
86
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_slice_area }}</td>
87
- </tr>
88
- <tr>
89
- <td style="text-align: center;border: #E9E9E9 solid 1px">街 道:</td>
90
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_street }}</td>
91
- <td style="text-align: center;border: #E9E9E9 solid 1px">楼 号:</td>
92
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_building }}</td>
93
- </tr>
94
- <tr>
95
- <td style="text-align: center;border: #E9E9E9 solid 1px">单 元:</td>
96
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_unit }}</td>
97
- <td style="text-align: center;border: #E9E9E9 solid 1px">楼 层:</td>
98
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_floor }}</td>
99
- </tr>
100
- <tr>
101
- <td style="text-align: center;border: #E9E9E9 solid 1px">门 牌 号 :</td>
102
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_room }}</td>
103
- <td style="text-align: center;border: #E9E9E9 solid 1px">用户性质:</td>
104
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_userproperties }}</td>
105
- </tr>
106
- <tr>
107
- <td style="text-align: center;border: #E9E9E9 solid 1px">备注信息:</td>
108
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_comments }}</td>
109
- <td style="text-align: center;border: #E9E9E9 solid 1px">小区名称:</td>
110
- <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_residential_area }}</td>
111
- </tr>
112
- <tr>
113
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px">详细住址:</td>
114
- <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_address }}</td>
115
- </tr>
116
- </tbody>
117
- </table>
118
- <table class="table table-striped table-bordered" v-show="paperdata.f_entry_status=='入户'">
119
- <thead>
120
- <tr>
121
- <th colspan="4" style="text-align: center">用户安检概况</th>
122
- </tr>
123
- </thead>
124
- <tbody>
125
- <tr>
126
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">到达时间:</td>
127
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_onsite_time }}</td>
128
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">离开时间:</td>
129
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_offsite_time }}</td>
130
- </tr>
131
- <tr>
132
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">入户状态:</td>
133
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_entry_status }}</td>
134
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">燃气使用:</td>
135
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_usegas }}</td>
136
- </tr>
137
- <tr>
138
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">用户满意度:</td>
139
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">{{
140
- paperdata.f_client_evaluation
141
- }}
142
- </td>
143
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">安检结果:</td>
144
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;" :style="{'color':ajresult=='有隐患'?'red':''}">{{ ajresult }}</td>
145
- </tr>
146
- <tr>
147
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">备注:</td>
148
- <td colspan="3"
149
- style="text-align: center;border: #E9E9E9 solid 1px;word-wrap:break-word;word-break:break-all;width:87%">
150
- {{ paperdata.f_repair_approved_note }}
151
- </td>
152
- </tr>
153
- <tr>
154
- <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">隐患详情:</td>
155
- <td colspan="3"
156
- style="text-align: center;border: #E9E9E9 solid 1px;word-wrap:break-word;word-break:break-all;width:87%">
157
- <span v-for="deviceCollect in deviceCollects">
158
- <span class="li-font">
159
- {{ deviceCollect.name }}:{{ deviceCollect.value }}&nbsp;&nbsp;&nbsp;
160
- </span>
161
- <br>
162
- <span v-if="deviceCollect.value == '有隐患'">
163
- <lable>
164
- 隐患:
165
- </lable>
166
- <span v-for="val in deviceCollect.devices">
167
- {{ val }}
168
- </span><br>
169
- </span>
170
-
171
- </span>
172
- </td>
173
- </tr>
174
-
175
- </tbody>
176
- </table>
177
- <table class="table table-striped table-bordered" v-show="paperdata.f_entry_status!='入户'">
178
- <thead>
179
- <tr>
180
- <th colspan="4" style="text-align: center">用户安检概况</th>
181
- </tr>
182
- </thead>
183
- <tbody>
184
- <tr>
185
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">到达时间:</td>
186
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_onsite_time }}</td>
187
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">离开时间:</td>
188
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_offsite_time }}</td>
189
- </tr>
190
- <tr>
191
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">入户状态:</td>
192
- <td colspan="2" style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">
193
- {{ paperdata.f_entry_status }}
194
- </td>
195
- <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">
196
- <button-link style="color: black" type="button" class="btn btn-link" @click="showpicture2()">
197
- {{ dev.lname }}
198
- 查看{{ data.f_entry_status }}照片
199
- </button-link>
200
- </td>
201
- </tr>
202
-
203
- </tbody>
204
- </table>
205
- <table class="table table-striped table-bordered" v-show="paperdata.f_entry_status=='入户'">
206
- <thead>
207
- <tr>
208
- <th style="text-align: center">总体安检照片</th>
209
- </tr>
210
- </thead>
211
- <tbody>
212
- <tr>
213
- <td style="margin: auto;text-align: center">
214
- <div class="container" style="max-width: 550px;background: #FFFFFF">
215
- <div class="img" v-for="img in paperdata.f_overall_imgs">
216
- <img-self :src="getimg(img.f_overall_path)" style="float: left" width="150"
217
- height="200"></img-self>
218
- </div>
219
- </div>
220
-
221
-
222
- </td>
223
-
224
- </tr>
225
- </tbody>
226
- </table>
227
- <table class="table table-striped table-bordered" v-show="paperdata.f_entry_status=='入户'">
228
- <thead>
229
- <tr>
230
- <th style="text-align: center">用户签名照片</th>
231
- </tr>
232
- </thead>
233
- <tbody>
234
- <tr>
235
- <td style="margin: auto;text-align: center">
236
- <div class="container" style="max-width: 500px;background: #FFFFFF">
237
- <div class="img" style="float: none">
238
- <img-self :src="getimg(paperdata.f_sign_path)" width="150" style="float: left"
239
- height="200"></img-self>
240
- </div>
241
- </div>
242
- </td>
243
- </tr>
244
- </tbody>
245
- </table>
246
- <table class="table table-striped table-bordered" v-show="paperdata.f_entry_status=='入户' && paperdata.f_defect_notified">
247
- <thead>
248
- <tr>
249
- <th style="text-align: center">安检通知书/隐患整改通知书</th>
250
- </tr>
251
- </thead>
252
- <tbody>
253
- <tr>
254
- <td style="margin: auto;text-align: center">
255
- <div class="container" style="max-width: 500px;background: #FFFFFF">
256
- <div class="img" style="float: none">
257
- <img-self :src="getimg(paperdata.f_notified_path)"width="150" style="float: left"
258
- height="200"></img-self>
259
- </div>
260
- </div>
261
- </td>
262
- </tr>
263
- </tbody>
264
- </table>
265
- </div>
266
- </div>
267
- <div class style="width: 1%;height: 100%;background-color: #F1F8FF;float: left;"></div>
268
- <div class="col-md-6" style="height: 100%;overflow: scroll">
269
- <div style="width: 95%;margin-left: 5%">
270
- <table class="table table-striped table-bordered" v-for="config in deviceconfig2">
271
- <thead v-show="!(config.checkname!='燃气表'&&paperdata.f_entry_status!='入户')">
272
- <tr>
273
- <th style="text-align: center">{{ config.checkname }}</th>
274
- </tr>
275
- </thead>
276
- <tbody v-show="!(config.checkname!='燃气表'&&paperdata.f_entry_status!='入户')">
277
- <tr v-for="dev in config.items">
278
- <td v-if="dev.type!='text' && dev.isshow != false" >
279
- <div class="row">
280
- <div class="col-md-8" style="text-align: center;">
281
- <label>
282
- <button-link type="button" class="btn btn-link" @click="showpicture(config.checkname,dev.lname)"
283
- :style="isred(config.checkname,dev.lname)?'color:red':'color:black'">
284
- {{ dev.lname }}
285
- </button-link>
286
- </label>
287
- </div>
288
- <div class="col-md-4" style="text-align: center">
289
- <label style="font-weight: normal"
290
- v-if="dev.type!='picture'">{{ getDeviceValue(config.checkname, dev.lname) ? getDeviceValue(config.checkname, dev.lname) : '无' }}</label>
291
- <label style="font-weight: normal" v-if="dev.type=='picture'">
292
- <div v-show="getDevicePath(config.checkname,dev.lname)">
293
- <button-link style="color: black" type="button" class="btn btn-link"
294
- @click="showpath(getDevicePath(config.checkname,dev.lname),dev.lname)">查看照片
295
- </button-link>
296
- </div>
297
- <div v-show="!getDevicePath(config.checkname,dev.lname)">无照片</div>
298
- </label>
299
- </div>
300
- </div>
301
- </td>
302
- <td v-if="dev.type==='text' && dev.isshow != false">
303
- <label style="width: 100%;text-align: center">{{ dev.lname }}</label>
304
- </td>
305
- </tr>
306
- </tbody>
307
- </table>
308
- </div>
309
- </div>
310
-
311
- </div>
312
- </div>
313
- </div>
314
- <modal :show.sync="imgshow" v-ref:modal backdrop="true">
315
- <header slot="modal-header" class="modal-header">
316
- {{ picturename }}
317
- </header>
318
- <article slot="modal-body" class="modal-body">
319
- <div class="from-group">
320
- <div class="row">
321
- <div class="col-md-6">
322
- <img-self v-if="showimg1" :src="getimg(showimg1)" width="240" height="300"></img-self>
323
- </div>
324
- <div class="col-md-6">
325
- <img-self v-if="showimg2" :src="getimg(showimg2)" width="240" height="300"></img-self>
326
- </div>
327
- <div class="col-md-6" v-for="item in otherDarginShowImgs">
328
- <img-self v-if="item.path" :src="getimg(item.path)" width="240" height="300"></img-self>
329
- </div>
330
- </div>
331
- </div>
332
- </article>
333
- <footer slot="modal-footer" class="modal-footer" v-show="false">
334
- <button type="button" class="btn btn-success" @click='imgclose'>关闭</button>
335
- </footer>
336
- </modal>
337
- <modal :show.sync="imgshow2" v-ref:modal backdrop="true">
338
- <header slot="modal-header" class="modal-header">
339
- {{ paperdata.f_entry_status }}照片
340
- </header>
341
- <article slot="modal-body" class="modal-body">
342
- <div class="from-group">
343
- <div class="row">
344
- <div class="col-md-6">
345
- <img-self v-if="this.paperdata.f_entry_status=='到访不遇'&& this.paperdata.f_noanswer_path" :src="showimg3" width="282"
346
- height="400"></img-self>
347
- </div>
348
- <div class="col-md-6">
349
- <img-self v-if="this.paperdata.f_entry_status=='到访不遇'&& this.paperdata.f_noanswer1_path" :src="showimg5" width="282"
350
- height="400"></img-self>
351
- </div>
352
- <div class="col-md-6">
353
- <img-self v-if="this.paperdata.f_entry_status=='到访不遇'&& this.paperdata.f_noanswer2_path" :src="showimg6" width="282"
354
- height="400"></img-self>
355
- </div>
356
- <div class="col-md-6">
357
- <img-self v-if="this.paperdata.f_entry_status=='拒检' && this.paperdata.f_rejectcheck_path" :src="showimg4" width="282"
358
- height="400"></img-self>
359
- </div>
360
- <div class="col-md-6">
361
- <img-self v-if="this.paperdata.f_entry_status=='拒检' && this.paperdata.f_rejectcheck1_path" :src="showimg7" width="282"
362
- height="400"></img-self>
363
- </div>
364
- <div class="col-md-6">
365
- <img-self v-if="this.paperdata.f_entry_status=='拒检' && this.paperdata.f_rejectcheck2_path" :src="showimg8" width="282"
366
- height="400"></img-self>
367
- </div>
368
- </div>
369
- </div>
370
- </article>
371
- <footer slot="modal-footer" class="modal-footer" v-show="false">
372
- <button type="button" class="btn btn-success" @click='imgclose'>关闭</button>
373
- </footer>
374
- </modal>
375
- </template>
376
-
377
- <script>
378
- import ObjConfig from '../../utils/GerJsonObjectConfig'
379
- import RadioGroup from 'vue-client/src/vue-strap/src/radioGroup'
380
- import Radio from 'vue-client/src/vue-strap/src/radioBtn'
381
- import Vue from 'vue'
382
- import * as Util from '../../components/Util'
383
- import {jsonSort} from '../../utils/LdapHelper'
384
- import {HttpResetClass} from "vue-client";
385
- import {isEmpty} from "../../components/Util";
386
- let asyncReady = async function (self) {
387
- try {
388
- let res = await new HttpResetClass().load('GET',`${self.$androidUtil.getProxyUrl()}/api/af-safecheck/vue`,null, {resolveMsg: null, rejectMsg: null})
389
- self.delConfigKey(res.data)
390
- Vue.config.safecheck=res.data
391
- Vue.config.safecheck.DevicesConfig =res.data.DevicesConfig
392
- Vue.config.safecheck.DevicesSetConfig = res.data.DevicesSetConfig
393
- console.log('获取配置结果===', res.data)
394
- } catch (error) {
395
- // 忽略704,文件找不到异常R
396
- if (error.status !== 704) {
397
- throw error
398
- }
399
- }
400
- }
401
- export default {
402
- title: '安检单',
403
- props: ['f_plan_id', 'item', 'role'],
404
- data() {
405
- return {
406
- data: {
407
- f_devices: [],
408
- f_defect_content: ''
409
- },
410
- paperdata: {},
411
- picturename: '隐患照片',
412
- defectDevice: {},
413
- hasDevice: false,
414
- deviceCollect: {},
415
- deviceCollects: [],
416
- isshow: false,
417
- ajresult: '',
418
- loading: true,
419
- imgshow: false,
420
- imgshow2: false,
421
- isUpload: false,
422
- livedispose: '',
423
- showimg1: '',
424
- showimg2: '',
425
- showimg3: '',
426
- showimg4: '',
427
- showimg5: '',
428
- showimg6: '',
429
- showimg7: '',
430
- showimg8: '',
431
- hiddenDangerImgNumber: 0, //配置项中隐患照片数
432
- otherDarginShowImgs: [],//其他隐患图片
433
- startClick: false, //开始安检按钮是否可点击
434
- isStrat: false, //是否开始安检
435
- checkResult: {},//查询结果
436
- newcheckResult: {},
437
- timer: null,
438
- showModal: false,
439
- pic_to_be_viewed: '',
440
- showBack: true,
441
- devices: [],
442
- devicesAll: [],
443
- configAJ: [],
444
- configRQ: [],
445
- deviceconfig: {},
446
- deviceconfig2: [],
447
- f_devices: [],
448
- config: {
449
- "燃气表": {
450
- "checkmust": true,
451
- "index": 1,
452
- "items": {
453
- "基表编号":{"index":1,"type":"string","readonly":true},
454
- "气表型号":{"index":2,"type":"string","readonly":true},
455
- "气表品牌":{"index":3,"type":"string","readonly":true},
456
- "进气方向":{"index":4,"type":"string","readonly":true},
457
- "初始表底":{"index":5,"type":"number","isshow":false,"readonly":true},
458
- "上期表读数":{"index":6,"type":"number","readonly":true,isshow:false},
459
- "累购气量":{"index":7,"type":"number","readonly":true},
460
- "已用气量":{"index":8,"type":"number","checkmust": false},//基表数
461
- "剩余气量":{"index":9,"type":"number","checkmust": false},//累购-已用
462
- //显示屏数 --实际剩余气量
463
- "气量异常差值":{"index":10,"type":"number","readonly": true},
464
- "表箱号":{"index":11,"type":"string","readonly": true},
465
- "燃气表照片":{"index":12,"type":"picture","checkmust": false},
466
- }
467
- // 注意,配置项的index必须与上面的固定配置保持'顺序'
468
- }
469
- },
470
- //金额
471
- config2: {
472
- "燃气表": {
473
- "checkmust": true,
474
- "index": 1,
475
- "items": {
476
- "基表编号":{"index":1,"type":"string","readonly":true},
477
- "气表型号":{"index":2,"type":"string","readonly":true},
478
- "气表品牌":{"index":3,"type":"string","readonly":true},
479
- "进气方向":{"index":4,"type":"string","readonly":true},
480
- "初始表底":{"index":5,"type":"number","isshow":false,"readonly":true},
481
- "上期表读数":{"index":6,"type":"number","readonly":true,isshow:false},
482
- "累购金额":{"index":7,"type":"number","readonly":true},
483
- "已用金额":{"index":8,"type":"number","checkmust": false},
484
- //显示屏数 --实际剩余气量
485
- "剩余金额":{"index":9,"type":"number","checkmust": false},
486
- "金额异常差值":{"index":10,"type":"number","readonly": true},
487
- "表箱号":{"index":11,"type":"string","readonly": true},
488
- "燃气表照片":{"index":12,"type":"picture","checkmust": false},
489
- }
490
- }
491
- },
492
- }
493
- },
494
- components: {
495
- RadioGroup,
496
- Radio,
497
- },
498
- computed: {
499
- isRecodrDownloadBtn(){
500
- // 投诉单下派还是处理
501
- let res = this.$appdata.getSingleValue('无限制录音');
502
- if (res == 'true'){
503
- return true;
504
- }else {
505
- return false;
506
- }
507
- },
508
- selector: {
509
- get() {
510
- return 'paper-state'
511
- },
512
- set(val) {
513
- if (this.isStrat) {
514
- this.$goto(val, {userinfo: this.data}, 'paper-router')
515
- } else {
516
- this.$showMessage('未开始安检!')
517
- }
518
- }
519
- },
520
- actionEnabled: {
521
- get() {
522
- return this.role == 'inspect'
523
- }
524
- }
525
- },
526
- methods: {
527
- delConfigKey(obj){
528
- // 从琉璃中获取的配置中会包含 $开头的一些额外描述新的key。为了兼容v3的代码逻辑在此函数中去掉
529
- Object.keys(obj).forEach(key =>{
530
- Object.keys(obj[key]).forEach(col => {
531
- // 检查键是否以$开头
532
- if (col.startsWith('$')) {
533
- // 使用delete操作符删除键
534
- delete obj[key][col];
535
- }
536
- })
537
- })
538
- },
539
- getimg(val){
540
- if(isEmpty(val)){
541
- return ''
542
- }
543
- console.log(`${this.$androidUtil.getProxyUrl()}/${val}`)
544
-
545
- return `${this.$androidUtil.getProxyUrl()}/${val}`
546
- },
547
- devicesCollect() {
548
- //tag
549
- //tag)
550
- //tag)
551
- //tag
552
- this.deviceCollects = []
553
- let checkResult = '正常'
554
- this.result = '正常'
555
- let codata = JSON.parse(JSON.stringify(this.data))
556
- //tag)
557
- for (let device in this.data) {
558
- let f_device_type
559
- if (device.startsWith("device")) {
560
- for (let item in this.data[device]) {
561
- if (this.data[device].length > 1) {
562
- let j = Number.parseInt(item) + 1
563
- f_device_type = `${this.data[device][item].f_device_type}${j}`
564
- } else {
565
- f_device_type = this.data[device][item].f_device_type
566
- }
567
- // //tag
568
- let deviceelse= []
569
- let deviceInfos = []
570
- for (let i in this.data[device][item].f_items) {
571
- let defects = ''
572
-
573
- let items = this.data[device][item].f_items[i]
574
-
575
-
576
- if ((items.type === 'selector' || items.type === 'radio' || items.type === 'checkbox') && items.f_item_value != null && items.f_item_value instanceof Array) {
577
- for (let i in items.f_item_value) {
578
- let f_item_value = items.f_item_value[i]
579
-
580
- //tag)
581
- //tag)
582
- //tag)
583
- //tag)
584
-
585
- if (!this.config[this.data[device][item].f_device_type].items[items.f_item_name] && (items.isdefect && (items.isdefect=='true' || items.isdefect==true))) {
586
- continue
587
- }
588
- /*if(items.f_is_defect != true && items.f_is_defect != 'true'){
589
- continue
590
- }*/
591
- if(items.f_is_defect == 'true' || items.f_is_defect == true){
592
- checkResult = '有隐患'
593
- this.result = '有隐患'
594
- defects = `${defects}:${items.f_item_value}/`
595
- }
596
- /*let options = this.config[this.data[device][item].f_device_type].items[items.f_item_name].options
597
- for (let option in options) {
598
- if (options[option].data == f_item_value) {
599
- if (options[option].isdefect == 'true' || options[option].isdefect == true) {
600
- checkResult = '有隐患'
601
- this.result = '有隐患'
602
- defects = `${defects}:${options[option].data}/`
603
- // let level = options[option].level
604
- }
605
- }
606
- }*/
607
- //tag)
608
- }
609
- if (defects != '') {
610
- console.log('有隐患items', items)
611
- deviceInfos.push(`${items.f_item_name}${defects.substring(0, defects.length - 1)}${items.f_else?items.f_else:''}`)
612
- }
613
- }
614
- else if ( (items.type === 'string' || items.type === 'number') && items.f_is_defect && items.f_item_value[0] ) {
615
- checkResult = '有隐患'
616
- this.result = '有隐患'
617
- deviceInfos.push(`${items.f_item_name}:${items.f_item_value[0]}`)
618
-
619
- }
620
- else if (items.f_item_name == '金额异常差值') {
621
- var deviation = this.$appdata.getSingleValue('金额异常差值允许误差')
622
- //tag
623
- if (parseFloat(items.f_item_value[0]).toString() != "NaN" && parseFloat(deviation).toString() != "NaN") {
624
- if (parseFloat(items.f_item_value[0]) > parseFloat(deviation) || parseFloat(items.f_item_value[0]) < parseFloat(deviation) * -1) {
625
- checkResult = '有隐患'
626
- this.result = '有隐患'
627
- deviceInfos.push(`${items.f_item_name}:${items.f_item_value[0]}`)
628
- }
629
- }
630
- }
631
- else if (items.f_item_name == '气量异常差值') {
632
- var deviation = this.$appdata.getSingleValue('气量异常差值允许误差')
633
- //tag
634
- if (parseFloat(items.f_item_value[0]).toString() != "NaN" && parseFloat(deviation).toString() != "NaN") {
635
- if (parseFloat(items.f_item_value[0]) > parseFloat(deviation) || parseFloat(items.f_item_value[0]) < parseFloat(deviation) * -1) {
636
- checkResult = '有隐患'
637
- this.result = '有隐患'
638
- deviceInfos.push(`${items.f_item_name}:${items.f_item_value[0]}`)
639
- }
640
- }
641
- }
642
- if(!this.config[this.data[device][item].f_device_type].items[items.f_item_name]){
643
- // console.log('this.config[this.data[device][item].f_device_type]', this.config[this.data[device][item].f_device_type])
644
- // console.log('this.deviceconfig2', this.deviceconfig2)
645
- for(let dev in this.deviceconfig2){
646
- if(this.deviceconfig2[dev].checkname==this.data[device][item].f_device_type){
647
- let no_inArr = true
648
- for (let deviceconfig2ElementKey in this.deviceconfig2[dev].items) {
649
- if(this.deviceconfig2[dev].items[deviceconfig2ElementKey].lname == items.f_item_name){
650
- no_inArr = false
651
- }
652
- }
653
- if (no_inArr){
654
- this.deviceconfig2[dev].items.push({
655
- lname: items.f_item_name
656
- })
657
- }
658
- }
659
- }
660
- }
661
- // if(!this.config[this.data[device][item].f_device_type].items[items.f_item_name]){
662
- // // console.log('this.config[this.data[device][item].f_device_type]', this.config[this.data[device][item].f_device_type])
663
- // // console.log('this.deviceconfig2', this.deviceconfig2)
664
- // for(let dev in this.deviceconfig2){
665
- // if(this.deviceconfig2[dev].checkname==this.data[device][item].f_device_type){
666
- // this.deviceconfig2[dev].items.push({
667
- // lname: items.f_item_name
668
- // })
669
- // }
670
- // }
671
- // }
672
- //tag)
673
- //tag
674
- //tag
675
- if (items.type === 'selector') {
676
- items.selected = []
677
- } else if (items.type === 'inputSelector') {
678
- items.selected = ''
679
- }
680
- }
681
-
682
-
683
- //tag
684
- this.$set('deviceCollect.name', f_device_type)
685
- this.$set('deviceCollect.value', checkResult)
686
- this.$set('deviceCollect.devices', deviceInfos)
687
- this.$set('deviceCollect.else', deviceelse)
688
- console.log('deviceCollect.devices',this.deviceCollect.devices)
689
- console.log('deviceCollect.else',this.deviceCollect.else)
690
- //tag)
691
- if (this.deviceCollect.name) {
692
- //tag
693
- this.deviceCollects.push(JSON.parse(JSON.stringify(this.deviceCollect)))
694
- }
695
-
696
- checkResult = '正常'
697
- this.deviceCollect = {}
698
- }
699
- }
700
- }
701
- if (this.deviceCollects.length > 0) {
702
- this.hasDevice = true
703
- }
704
- this.ajresult = JSON.parse(this.data.f_defect_content).result
705
- this.showimg3 = this.data.f_noanswer_path
706
- this.showimg5 = this.data.f_noanswer1_path
707
- this.showimg6 = this.data.f_noanswer2_path
708
- this.showimg4 = this.data.f_rejectcheck_path
709
- this.showimg7 = this.data.f_rejectcheck1_path
710
- this.showimg8 = this.data.f_rejectcheck2_path
711
- this.paperdata = this.data
712
- this.loading = false
713
- },
714
- imgclose() {
715
- this.imgshow = false
716
- },
717
- putDevices() {
718
- ////tag
719
- this.$set('data.approve', "true")
720
- this.$set('data.writeback', "false")
721
- if (Vue.config.safecheck.ApproveConfig != undefined) {
722
- if (Vue.config.safecheck.ApproveConfig.approve != undefined) {
723
- this.$set('data.approve', Vue.config.safecheck.ApproveConfig.approve)
724
- }
725
- if (Vue.config.safecheck.ApproveConfig.writeback != undefined) {
726
- this.$set('data.writeback', Vue.config.safecheck.ApproveConfig.writeback)
727
- }
728
- if (Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
729
- this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
730
- }
731
- if(Vue.config.safecheck.ApproveConfig.hiddendanger != undefined){
732
- if (parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger) >= 3) {
733
- this.hiddenDangerImgNumber = 3
734
- }else {
735
- this.hiddenDangerImgNumber = parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger)
736
- }
737
- }
738
- }
739
- //tag
740
-
741
- //tag)
742
- if (!this.item.f_safecheck_type && Vue.config.safecheck.SafecheckType && Vue.config.safecheck.SafecheckType['年度普检']) {
743
- this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType['年度普检'][this.item.f_check_type]])
744
- }else if (!this.item.f_safecheck_type && Vue.config.safecheck.SafecheckType && Vue.config.safecheck.SafecheckType['年度安检']){
745
- this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType['年度安检'][this.item.f_check_type]])
746
- }else if (Vue.config.safecheck.SafecheckType && Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type]]){
747
- this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_check_type]])
748
- }else {
749
- if(this.item.f_check_type == '民用'){
750
- this.config = this.extend(this.config, Vue.config.safecheck.DevicesConfig)
751
- }else {
752
- this.config = this.extend(this.config, Vue.config.safecheck.DevicesSetConfig)
753
- }
754
- }
755
- //遍历安检项配置
756
- for (let i in this.config) {
757
- //取得安检项索引值
758
- let n = this.config[i].index
759
- this.devices[n - 1] = {device: i, n: n, checkmust: this.config[i].checkmust}
760
- this.$set('data.' + 'device' + n, [])
761
- // let items = []
762
- // for (let it in this.config[i].items) {
763
- // //赋值下拉选项
764
- // if (this.config[i].items[it].type == 'selector') {
765
- // for (let op in this.config[i].items[it].options)
766
- // if (this.config[i].items[it].options[op].isdefault == true) {
767
- // items.push({
768
- // f_defect_level: this.config[i].items[it].options[op].level,
769
- // f_is_defect: this.config[i].items[it].options[op].isdefect,
770
- // f_item_name: it,
771
- // f_item_value: this.config[i].items[it].options[op].data,
772
- // f_path: "",
773
- // type: "selector"
774
- // })
775
- // }
776
- // }
777
- // }
778
- n = n + 1
779
- }
780
-
781
- },
782
- showpath(val1, val2) {
783
- //tag
784
- //tag
785
- if (val1) {
786
- this.showimg1 = val1
787
- this.picturename = val2
788
- this.imgshow = true
789
- }
790
- },
791
- showpicture(val1, val2) {
792
- //tag
793
- if (val2 == '气量异常差值' || val2 == '金额异常差值') {
794
- return
795
- }
796
- for (let i = 0; i < this.devicesAll.length; i++) {
797
- for (let j = 0; j < this.devicesAll[i].length; j++) {
798
- if (this.devicesAll[i][j].f_device_type == val1) {
799
- for (let k = 0; k < this.devicesAll[i][j].f_items.length; k++) {
800
- if (this.devicesAll[i][j].f_items[k].f_item_name == val2) {
801
- if (!this.devicesAll[i][j].f_items[k].f_is_defect) {
802
- return false
803
- } else {
804
- this.showimg1 = this.devicesAll[i][j].f_items[k].f_path
805
- this.showimg2 = this.devicesAll[i][j].f_items[k].f_second_path
806
- this.otherDarginShowImgs = []
807
- for (let l = 0; l < this.hiddenDangerImgNumber; l++) {
808
- let img = {path:''}
809
- if (this.devicesAll[i][j].f_items[k]['f_p' + (l+1)+'_path']) {
810
- img.path = this.devicesAll[i][j].f_items[k]['f_p' + (l+1)+'_path'] + '?' + Math.random()
811
- this.otherDarginShowImgs.push(img)
812
- }
813
- }
814
- this.picturename = '隐患照片'
815
- this.imgshow = true
816
- return true
817
- }
818
- }
819
- }
820
-
821
- }
822
- }
823
- }
824
- },
825
- isred(val1, val2) {
826
- //tag
827
- if (val2 == '气量异常差值' || val2 == '金额异常差值') {
828
- return
829
- }
830
- for (let i = 0; i < this.devicesAll.length; i++) {
831
- for (let j = 0; j < this.devicesAll[i].length; j++) {
832
- if (this.devicesAll[i][j].f_device_type == val1) {
833
- for (let k = 0; k < this.devicesAll[i][j].f_items.length; k++) {
834
- if (this.devicesAll[i][j].f_items[k].f_item_name == val2) {
835
- if (!this.devicesAll[i][j].f_items[k].f_is_defect) {
836
- return false
837
- } else {
838
- return true
839
- }
840
- }
841
- }
842
-
843
- }
844
- }
845
- }
846
- },
847
- showpicture2() {
848
- this.imgshow2 = true
849
- },
850
- getDeviceValue(val1, val2) {
851
- let aa = ''
852
- for (let i = 0; i < this.devicesAll.length; i++) {
853
- for (let j = 0; j < this.devicesAll[i].length; j++) {
854
- if (this.devicesAll[i][j].f_device_type == val1) {
855
- for (let k = 0; k < this.devicesAll[i][j].f_items.length; k++) {
856
- if (this.devicesAll[i][j].f_items[k].f_item_name == val2) {
857
- if (this.devicesAll[i][j].f_items[k].f_item_lists[0]) {
858
- for (let l = 0; l < this.devicesAll[i][j].f_items[k].f_item_lists.length; l++) {
859
- let val = this.devicesAll[i][j].f_items[k].f_item_lists[l].f_item_value
860
- aa += (val === null ? '空' : val) + ' '
861
- }
862
- return aa
863
- }
864
- }
865
- }
866
-
867
- }
868
- }
869
- }
870
-
871
- },
872
- getDevicePath(val1, val2) {
873
- for (let i = 0; i < this.devicesAll.length; i++) {
874
- for (let j = 0; j < this.devicesAll[i].length; j++) {
875
- if (this.devicesAll[i][j].f_device_type == val1) {
876
- for (let k = 0; k < this.devicesAll[i][j].f_items.length; k++) {
877
- if (this.devicesAll[i][j].f_items[k].f_item_name == val2) {
878
- return this.devicesAll[i][j].f_items[k].f_path
879
- }
880
- }
881
-
882
- }
883
- }
884
- }
885
-
886
- },
887
- getDeviceAll() {
888
- let keyall = Object.keys(this.data)
889
- for (let i = 0; i < keyall.length; i++) {
890
- //tag)
891
- if (keyall[i].startsWith('device') && keyall[i] != 'deviceundefined') {
892
- this.devicesAll.push(this.data[keyall[i]])
893
- //tag
894
- }
895
- }
896
- //tag
897
- //tag)
898
- this.devicesCollect()
899
-
900
- },
901
-
902
- back() {
903
- if (this.role == 'inspect') {
904
- if (!this.isStrat) {
905
- this.$back()
906
- return
907
- } else {
908
- this.savePaper(true).then(() => {
909
- this.$back()
910
- this.isStrat = false
911
- })
912
- }
913
- } else {
914
- this.$back()
915
- }
916
- },
917
- checkIsStart() {
918
- alert('asdad')
919
- return
920
- },
921
-
922
- viewPic(fileName) {
923
- //tag
924
- if (this.role == 'view') {
925
- if (!fileName.endsWith('nopic.png')) {
926
- this.pic_to_be_viewed = fileName
927
- this.showModal = true
928
- }
929
- } else {
930
- HostApp.viewPic(fileName)
931
- }
932
- },
933
- tick() {
934
- this.timer = null
935
- this.data.f_offsite_time = Util.toStandardTimeString()
936
- this.timer = window.setTimeout(this.tick, 1000)
937
- },
938
- getRepairState() {
939
- let repaired = true
940
- this.data.f_defects.forEach((defect) => {
941
- repaired = repaired & (defect.f_ratification == '已处理')
942
- })
943
- return repaired
944
- },
945
- verifyRepairDefects() {
946
- this.data.f_repair_date = Util.toStandardTimeString()
947
- this.data.f_repaired = this.getRepairState() ? '已修' : '在修'
948
- },
949
- genuineSave(saveOnly) {
950
- HostApp.__this__.save(saveOnly)
951
- if (!saveOnly)
952
- HostApp.__this__.disableTimer()
953
- HostApp.__callback__ = null
954
- HostApp.__this__ = null
955
- },
956
- setUrgency() {
957
- this.data.f_defect_urgency = 'Z'
958
- let that = this
959
- this.data.f_defects.forEach(function (defect) {
960
- if (that.data.f_defect_urgency > defect.f_defect_level.charAt(0))
961
- that.data.f_defect_urgency = defect.f_defect_level.charAt(0)
962
- })
963
- if (this.data.f_defect_urgency == 'Z')
964
- this.data.f_defect_urgency = null
965
- },
966
- disableTimer() {
967
- if (this.timer) {
968
- window.clearTimeout(this.timer)
969
- this.timer = null
970
- }
971
- },
972
- loaded(paper) {
973
- if (!paper.hasOwnProperty('id')) {
974
- this.$showMessage("该安检单在手机上已经不存在,可能是卸载过程序。可以进入重新安检,或返回安检计划。")
975
- this.init()
976
- } else {
977
- Util.booleanFilter(paper)
978
- HostApp.__this__.$set('data', paper)
979
- HostApp.__this__.$goto('paper-state', {}, 'paper-router')
980
- // 如果打回重检则重新计时
981
- //tag
982
- if (HostApp.__this__.role == 'inspect'
983
- && HostApp.__this__.data.f_approved
984
- && HostApp.__this__.data.f_approved == '打回') {
985
- //tag
986
- HostApp.__this__.data.f_onsite_time = Util.toStandardTimeString()
987
- HostApp.__this__.tick()
988
- }
989
- }
990
- HostApp.__callback__ = null
991
- HostApp.__this__ = null
992
- },
993
- S4() {
994
- return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
995
- },
996
- init() {
997
- this.data.f_noplan_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
998
- this.data.ename = Vue.user.ename
999
- this.data.f_outlets = Vue.user.f_parentname
1000
- this.data.f_meetunit = Vue.user.orgpathnames
1001
- this.data.orgpathstr = Vue.user.orgpathstr
1002
- this.data.f_check_item_id = this.item.id
1003
- this.data.f_check_plan_id = this.f_plan_id
1004
- this.data.f_checker_id = Vue.user.id
1005
- this.data.f_checker_name = Vue.user.name
1006
- this.data.f_check_type = this.item.f_user_type
1007
- this.data.f_subcompany = this.item.f_subcompany
1008
- this.data.f_approved = this.item.f_approved
1009
- this.data.f_repair_approved = this.item.f_repair_approved
1010
- this.data.f_no_checkplan = this.item.f_no_checkplan
1011
- this.data.f_approved = this.item.f_approved
1012
- this.data.f_filialeid = this.item.f_filialeid
1013
- this.data.f_orgstr = this.item.f_orgstr
1014
- this.data.version = this.item.version
1015
- this.$set('data.f_meters', this.item.f_plan_meters)
1016
- this.$set('data.f_userinfo_code', this.item.f_userinfo_code)
1017
- // 安检状态
1018
- this.$set('data.f_entry_status', '入户')
1019
- this.$set('data.f_usegas', '已使用')
1020
- this.$set('data.f_state', this.item.f_state)
1021
- // 用户信息
1022
- this.$set('data.f_user_name', this.item.f_user_name)
1023
- this.$set('data.f_user_phone', this.item.f_user_phone)
1024
- this.$set('data.f_userinfoid', this.item.f_userinfoid)
1025
- this.$set('data.f_address', this.item.f_address)
1026
- this.$set('data.f_card_id', this.item.f_card_id)
1027
- this.$set('data.f_area', this.item.f_area)
1028
- this.$set('data.f_street', this.item.f_street)
1029
- this.$set('data.f_room', this.item.f_room)
1030
- this.$set('data.f_building', this.item.f_building)
1031
- this.$set('data.f_unit', this.item.f_unit)
1032
- this.$set('data.f_floor', this.item.f_floor)
1033
- this.$set('data.f_residential_area', this.item.f_residential_area)
1034
- this.$set('data.f_idnumber', this.item.f_idnumber)
1035
- this.$set('data.f_comments', this.item.f_comments)
1036
- this.$set('data.f_userproperties', this.item.f_userproperties)
1037
- // 处置方式
1038
- this.$set('data.f_no_gas_device', false)
1039
- this.$set('data.f_close_valve', false)
1040
- this.$set('data.f_unload_battery', false)
1041
- if (this.data.f_check_item_id == '' && this.item.f_no_checkplan == '无计划安检') {
1042
- this.data.f_check_item_id = this.data.f_noplan_item_id
1043
- }
1044
-
1045
- //房屋结构
1046
- // this.$set('data.f_room_style', '多层')
1047
- //供暖方式
1048
- // this.$set('data.f_heating_style', '热力公司集中供暖')
1049
- if (this.item.f_plan_meters) {
1050
- for (let de in this.devices) {
1051
- this.$set('data.device' + this.devices[de].n, [])
1052
- for (let i = 0; i < this.item.f_plan_meters.length; i++) {
1053
- if (this.item.f_plan_meters[i].f_meter_type) {
1054
- if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('机表') > 0) {
1055
- delete this.config['燃气表']['items']['累计购气量']
1056
- this.data['device' + this.devices[de].n].push({
1057
- f_device_type: "燃气表",
1058
- f_items: [{
1059
- f_defect_level: null,
1060
- f_device_id: "",
1061
- f_is_defect: "",
1062
- f_item_name: "表品牌",
1063
- f_item_value: this.item.f_plan_meters[i].f_aliasname,
1064
- f_path: "",
1065
- type: "string"
1066
- },
1067
- {
1068
- f_defect_level: null,
1069
- f_device_id: "",
1070
- f_is_defect: "",
1071
- f_item_name: "位置",
1072
- f_item_value: this.item.f_plan_meters[i].f_weizhi,
1073
- f_path: "",
1074
- type: "selector"
1075
- },
1076
- {
1077
- f_defect_level: null,
1078
- f_device_id: "",
1079
- f_is_defect: "",
1080
- f_item_name: "表号",
1081
- f_item_value: this.item.f_plan_meters[i].f_meter_no,
1082
- f_path: "",
1083
- type: "number"
1084
- },
1085
- {
1086
- f_defect_level: null,
1087
- f_device_id: "",
1088
- f_is_defect: "",
1089
- f_item_name: "表封号",
1090
- f_item_value: this.item.f_plan_meters[i].f_metertitles,
1091
- f_path: "",
1092
- type: "number"
1093
- },
1094
- {
1095
- f_defect_level: null,
1096
- f_device_id: "",
1097
- f_is_defect: "",
1098
- f_item_name: "表型号",
1099
- f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
1100
- f_path: "",
1101
- type: "selector"
1102
- },
1103
- {
1104
- f_defect_level: null,
1105
- f_device_id: "",
1106
- f_is_defect: "",
1107
- f_item_name: "表底数",
1108
- f_item_value: this.item.f_plan_meters[i].f_prior_reading,
1109
- f_path: "",
1110
- type: "number"
1111
- }
1112
- ]
1113
- })
1114
- } else if (this.devices[de].device == "燃气表") {
1115
- delete this.config['燃气表']['items']['表底数']
1116
- this.data['device' + this.devices[de].n].push({
1117
- f_device_type: "燃气表",
1118
- f_items: [{
1119
- f_defect_level: null,
1120
- f_device_id: "",
1121
- f_is_defect: "",
1122
- f_item_name: "表品牌",
1123
- f_item_value: this.item.f_plan_meters[i].f_aliasname,
1124
- f_path: "",
1125
- type: "string"
1126
- },
1127
- {
1128
- f_defect_level: null,
1129
- f_device_id: "",
1130
- f_is_defect: "",
1131
- f_item_name: "位置",
1132
- f_item_value: this.item.f_plan_meters[i].f_weizhi,
1133
- f_path: "",
1134
- type: "selector"
1135
- },
1136
- {
1137
- f_defect_level: null,
1138
- f_device_id: "",
1139
- f_is_defect: "",
1140
- f_item_name: "表号",
1141
- f_item_value: this.item.f_plan_meters[i].f_meter_no,
1142
- f_path: "",
1143
- type: "number"
1144
- },
1145
- {
1146
- f_defect_level: null,
1147
- f_device_id: "",
1148
- f_is_defect: "",
1149
- f_item_name: "表封号",
1150
- f_item_value: this.item.f_plan_meters[i].f_metertitles,
1151
- f_path: "",
1152
- type: "number"
1153
- },
1154
- {
1155
- f_defect_level: null,
1156
- f_device_id: "",
1157
- f_is_defect: "",
1158
- f_item_name: "表型号",
1159
- f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
1160
- f_path: "",
1161
- type: "selector"
1162
- },
1163
- {
1164
- f_defect_level: null,
1165
- f_device_id: "",
1166
- f_is_defect: "",
1167
- f_item_name: "累计购气量",
1168
- f_item_value: this.item.f_plan_meters[i].f_prior_reading,
1169
- f_path: "",
1170
- type: "number"
1171
- }
1172
- ]
1173
- })
1174
- }
1175
- }
1176
- }
1177
- }
1178
- }
1179
-
1180
- this.$goto('paper-state', {}, 'paper-router')
1181
- },
1182
- extend(initalObj, finalObj) {
1183
- var obj = finalObj || {};
1184
- for (var i in initalObj) {
1185
- var prop = initalObj[i];
1186
-
1187
- // 避免相互引用对象导致死循环,如initalObj.a = initalObj的情况
1188
- if (prop === obj) {
1189
- continue;
1190
- }
1191
-
1192
- if (typeof prop === 'object') {
1193
- if (obj[i]) {
1194
- this.extend(obj[i], prop)
1195
- } else {
1196
- obj[i] = prop;
1197
- }
1198
- }
1199
- }
1200
- return obj;
1201
- },
1202
- //获取当前时间
1203
- getNowFormatDate() {
1204
- var date = new Date();
1205
- var seperator1 = "-";
1206
- var seperator2 = ":";
1207
- var month = date.getMonth() + 1;
1208
- var strDate = date.getDate();
1209
- if (month >= 1 && month <= 9) {
1210
- month = "0" + month;
1211
- }
1212
- if (strDate >= 0 && strDate <= 9) {
1213
- strDate = "0" + strDate;
1214
- }
1215
- var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
1216
- + " " + date.getHours() + seperator2 + date.getMinutes()
1217
- + seperator2 + date.getSeconds();
1218
- return currentdate;
1219
- }
1220
- },
1221
- ready() {
1222
- this.putDevices()
1223
- if (this.item.f_state != '未检' || this.item.f_no_checkplan == '无计划安检') {
1224
- if (this.role != 'inspect') {
1225
- let that = this
1226
- let id
1227
- if (this.role == 'view') {
1228
- id = this.item.id
1229
- } else if (this.role == 'androidview') {
1230
- id = this.item.f_paper_id
1231
- }
1232
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/path_getCheckPaper`, {data: {id: id}}).then((respanse) => {
1233
- //tag
1234
- if (respanse.data.length != 0) {
1235
- // 包含 其它 特殊处理的数组
1236
- // 对应位置
1237
- that.data = Object.assign(that.data, respanse.data[0])
1238
- if (respanse.data[0].f_devices) {
1239
- for (let da in that.devices) {
1240
- that.$set('data.device' + that.devices[da].n, [])
1241
- }
1242
- respanse.data[0].f_devices.forEach((item) => {
1243
- for (let de in that.devices) {
1244
- if (that.devices[de].device == item.f_device_type) {
1245
- item.f_items.forEach((f_item) => {
1246
- //tag
1247
- //tag
1248
- let itemValues = []
1249
- f_item.f_item_lists.forEach((tempItem) => {
1250
- //tag
1251
- if (tempItem.f_item_value !== 'null') {
1252
- itemValues.push(tempItem.f_item_value)
1253
- }
1254
- })
1255
- f_item.f_item_value = itemValues
1256
- })
1257
- that.data['device' + that.devices[de].n].push({
1258
- f_device_type: item.f_device_type,
1259
- f_items: item.f_items
1260
- })
1261
- }
1262
- }
1263
- })
1264
- }
1265
- Util.replaceFalse(that.data)
1266
- Util.booleanFilter(that.data)
1267
- if (this.role == 'view') {
1268
- Util.ratifyPics(that.data)
1269
- Util.ratifyPics(that.picture)
1270
- } else {
1271
- Util.androidRatifyPics(that.data, this.$androidUtil.getProxyUrl())
1272
- }
1273
- }
1274
- // this.$goto('paper-message-blank', {userinfo:this.data,devices:this.devices,config:this.config,role:this.role}, 'self')
1275
- this.isshow = true
1276
- console.log('Vue.config.safecheck.DevicesConfig', Vue.config.safecheck.DevicesConfig)
1277
- if (this.data.f_check_type == '民用') {
1278
- this.deviceconfig = JSON.parse(JSON.stringify(Vue.config.safecheck.DevicesConfig))
1279
- if (typeof this.deviceconfig==='string'){
1280
- this.deviceconfig=JSON.parse(this.deviceconfig)
1281
- }
1282
- //tag)
1283
- } else if (this.data.f_check_type == '非民用') {
1284
- this.deviceconfig = JSON.parse(JSON.stringify(Vue.config.safecheck.DevicesSetConfig))
1285
- if (typeof this.deviceconfig==='string'){
1286
- this.deviceconfig=JSON.parse(this.deviceconfig)
1287
- }
1288
- //tag)
1289
- }
1290
- if (respanse.data[0].f_collection_type == '按金额') {
1291
- let aaa = Object.assign({}, this.config2["燃气表"].items, this.deviceconfig["燃气表"].items)
1292
- this.deviceconfig["燃气表"].items = aaa
1293
- //this.deviceconfig["燃气表"]=this.config2["燃气表"]
1294
- //tag)
1295
- } else {
1296
- let aaa = Object.assign({}, this.config["燃气表"].items, this.deviceconfig["燃气表"].items)
1297
- this.deviceconfig["燃气表"].items = aaa
1298
- //tag)
1299
- }
1300
- this.deviceconfig2 = ObjConfig.getObjConfig(this.deviceconfig)
1301
- this.deviceconfig2[0].items = jsonSort(this.deviceconfig2[0].items, "index")
1302
- this.deviceconfig2[1].items = jsonSort(this.deviceconfig2[1].items, "index")
1303
- this.deviceconfig2 = jsonSort(this.deviceconfig2, "index")
1304
- this.getDeviceAll()
1305
- }
1306
- ).catch(
1307
- (respanse) => {
1308
- //tag
1309
- alert('查找安检单失败')
1310
- })
1311
- }
1312
- }
1313
-
1314
- },
1315
- watch: {
1316
- // 'isUpload'(val){
1317
- // //tag
1318
- // }
1319
- },
1320
- destroyed() {
1321
- //tag
1322
- this.disableTimer()
1323
- }
1324
- }
1325
-
1326
- </script>
1327
- <style scoped>
1328
- .table-striped thead tr th {
1329
- background-color: rgb(223, 237, 251);
1330
- padding: 10px;
1331
- border-left: solid 0px #dae4f2;
1332
- border-top: solid 1px #dae4f2;
1333
- border-right: none;
1334
- border-bottom: none;
1335
- text-align: center;
1336
- color: black;
1337
- }
1338
- </style>
1
+ <style scoped>
2
+ .img {
3
+ border: 1px solid #9773ed;
4
+ width: auto;
5
+ height: auto;
6
+ float: left;
7
+ text-align: center;
8
+ margin: 6px;
9
+ }
10
+
11
+ img {
12
+ margin: 6px;
13
+ }
14
+
15
+
16
+ .container {
17
+ margin: 10px auto;
18
+ width: 80%;
19
+ height: auto;
20
+ }
21
+
22
+ div::-webkit-scrollbar {
23
+ width: 0 !important;
24
+ height: 0 !important;
25
+ }
26
+
27
+ div {
28
+ -ms-overflow-style: none;
29
+ overflow: -moz-scrollbars-none;
30
+ }
31
+
32
+ .divmask {
33
+ pointer-events: none;
34
+ }
35
+
36
+ .app-header {
37
+ border-radius: 50%;
38
+ background: rgba(73, 158, 223, 0.4);
39
+ color: #FFF;
40
+ padding: 20px;
41
+ text-align: center;
42
+ font-size: 1.2em;
43
+ z-index: 10;
44
+ opacity: 0.5;
45
+ bottom: 50px;
46
+ margin-top: -20px;
47
+ position: absolute;
48
+ top: 10%;
49
+ right: 2%;
50
+ height: 8%;
51
+ }
52
+ </style>
53
+
54
+ <template>
55
+ <div class="basic-main" style="height: 100%">
56
+ <work-busy :is-busy="loading"></work-busy>
57
+ <div class="container-fluid" style="overflow: scroll">
58
+ <div class="row">
59
+ <div class="col-md-5" style="margin-right: 2%;margin-left: 2%;height: 100%;overflow: scroll">
60
+ <div style="width: 100%;margin: auto">
61
+ <table class="table table-striped table-bordered" style="margin-bottom: 6px">
62
+ <thead>
63
+ <tr>
64
+ <th colspan="6" style="text-align: center">用户基本信息</th>
65
+ </tr>
66
+ </thead>
67
+ <tbody>
68
+ <tr>
69
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">用户编号:</td>
70
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_userinfo_code }}</td>
71
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">用户名称:</td>
72
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_user_name }}</td>
73
+ </tr>
74
+ <tr>
75
+ <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">证件号码:</td>
76
+ <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;width: 83%">{{ paperdata.f_idnumber }}</td>
77
+ </tr>
78
+ <tr>
79
+ <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">用户电话:</td>
80
+ <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;width: 83%">{{ paperdata.f_user_phone }}</td>
81
+ </tr>
82
+ <tr>
83
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">用户类型:</td>
84
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_check_type }}</td>
85
+ <td style="text-align: center;border: #E9E9E9 solid 1px">区 / 县:</td>
86
+ <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_slice_area }}</td>
87
+ </tr>
88
+ <tr>
89
+ <td style="text-align: center;border: #E9E9E9 solid 1px">街 道:</td>
90
+ <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_street }}</td>
91
+ <td style="text-align: center;border: #E9E9E9 solid 1px">楼 号:</td>
92
+ <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_building }}</td>
93
+ </tr>
94
+ <tr>
95
+ <td style="text-align: center;border: #E9E9E9 solid 1px">单 元:</td>
96
+ <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_unit }}</td>
97
+ <td style="text-align: center;border: #E9E9E9 solid 1px">楼 层:</td>
98
+ <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_floor }}</td>
99
+ </tr>
100
+ <tr>
101
+ <td style="text-align: center;border: #E9E9E9 solid 1px">门 牌 号 :</td>
102
+ <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_room }}</td>
103
+ <td style="text-align: center;border: #E9E9E9 solid 1px">用户性质:</td>
104
+ <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_userproperties }}</td>
105
+ </tr>
106
+ <tr>
107
+ <td style="text-align: center;border: #E9E9E9 solid 1px">备注信息:</td>
108
+ <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_comments }}</td>
109
+ <td style="text-align: center;border: #E9E9E9 solid 1px">小区名称:</td>
110
+ <td style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_residential_area }}</td>
111
+ </tr>
112
+ <tr>
113
+ <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px">详细住址:</td>
114
+ <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px">{{ paperdata.f_address }}</td>
115
+ </tr>
116
+ </tbody>
117
+ </table>
118
+ <table class="table table-striped table-bordered" v-show="paperdata.f_entry_status=='入户'">
119
+ <thead>
120
+ <tr>
121
+ <th colspan="4" style="text-align: center">用户安检概况</th>
122
+ </tr>
123
+ </thead>
124
+ <tbody>
125
+ <tr>
126
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">到达时间:</td>
127
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_onsite_time }}</td>
128
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">离开时间:</td>
129
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_offsite_time }}</td>
130
+ </tr>
131
+ <tr>
132
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">入户状态:</td>
133
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_entry_status }}</td>
134
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">燃气使用:</td>
135
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_usegas }}</td>
136
+ </tr>
137
+ <tr>
138
+ <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">用户满意度:</td>
139
+ <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">{{
140
+ paperdata.f_client_evaluation
141
+ }}
142
+ </td>
143
+ <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">安检结果:</td>
144
+ <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;" :style="{'color':ajresult=='有隐患'?'red':''}">{{ ajresult }}</td>
145
+ </tr>
146
+ <tr>
147
+ <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">备注:</td>
148
+ <td colspan="3"
149
+ style="text-align: center;border: #E9E9E9 solid 1px;word-wrap:break-word;word-break:break-all;width:87%">
150
+ {{ paperdata.f_repair_approved_note }}
151
+ </td>
152
+ </tr>
153
+ <tr>
154
+ <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">隐患详情:</td>
155
+ <td colspan="3"
156
+ style="text-align: center;border: #E9E9E9 solid 1px;word-wrap:break-word;word-break:break-all;width:87%">
157
+ <span v-for="deviceCollect in deviceCollects">
158
+ <span class="li-font">
159
+ {{ deviceCollect.name }}:{{ deviceCollect.value }}&nbsp;&nbsp;&nbsp;
160
+ </span>
161
+ <br>
162
+ <span v-if="deviceCollect.value == '有隐患'">
163
+ <lable>
164
+ 隐患:
165
+ </lable>
166
+ <span v-for="val in deviceCollect.devices">
167
+ {{ val }}
168
+ </span><br>
169
+ </span>
170
+
171
+ </span>
172
+ </td>
173
+ </tr>
174
+
175
+ </tbody>
176
+ </table>
177
+ <table class="table table-striped table-bordered" v-show="paperdata.f_entry_status!='入户'">
178
+ <thead>
179
+ <tr>
180
+ <th colspan="4" style="text-align: center">用户安检概况</th>
181
+ </tr>
182
+ </thead>
183
+ <tbody>
184
+ <tr>
185
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">到达时间:</td>
186
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_onsite_time }}</td>
187
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">离开时间:</td>
188
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ paperdata.f_offsite_time }}</td>
189
+ </tr>
190
+ <tr>
191
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">入户状态:</td>
192
+ <td colspan="2" style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">
193
+ {{ paperdata.f_entry_status }}
194
+ </td>
195
+ <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">
196
+ <button-link style="color: black" type="button" class="btn btn-link" @click="showpicture2()">
197
+ {{ dev.lname }}
198
+ 查看{{ data.f_entry_status }}照片
199
+ </button-link>
200
+ </td>
201
+ </tr>
202
+
203
+ </tbody>
204
+ </table>
205
+ <table class="table table-striped table-bordered" v-show="paperdata.f_entry_status=='入户'">
206
+ <thead>
207
+ <tr>
208
+ <th style="text-align: center">总体安检照片</th>
209
+ </tr>
210
+ </thead>
211
+ <tbody>
212
+ <tr>
213
+ <td style="margin: auto;text-align: center">
214
+ <div class="container" style="max-width: 550px;background: #FFFFFF">
215
+ <div class="img" v-for="img in paperdata.f_overall_imgs">
216
+ <img-self :src="getimg(img.f_overall_path)" style="float: left" width="150"
217
+ height="200"></img-self>
218
+ </div>
219
+ </div>
220
+
221
+
222
+ </td>
223
+
224
+ </tr>
225
+ </tbody>
226
+ </table>
227
+ <table class="table table-striped table-bordered" v-show="paperdata.f_entry_status=='入户'">
228
+ <thead>
229
+ <tr>
230
+ <th style="text-align: center">用户签名照片</th>
231
+ </tr>
232
+ </thead>
233
+ <tbody>
234
+ <tr>
235
+ <td style="margin: auto;text-align: center">
236
+ <div class="container" style="max-width: 500px;background: #FFFFFF">
237
+ <div class="img" style="float: none">
238
+ <img-self :src="getimg(paperdata.f_sign_path)" width="150" style="float: left"
239
+ height="200"></img-self>
240
+ </div>
241
+ </div>
242
+ </td>
243
+ </tr>
244
+ </tbody>
245
+ </table>
246
+ <table class="table table-striped table-bordered" v-show="paperdata.f_entry_status=='入户' && paperdata.f_defect_notified">
247
+ <thead>
248
+ <tr>
249
+ <th style="text-align: center">安检通知书/隐患整改通知书</th>
250
+ </tr>
251
+ </thead>
252
+ <tbody>
253
+ <tr>
254
+ <td style="margin: auto;text-align: center">
255
+ <div class="container" style="max-width: 500px;background: #FFFFFF">
256
+ <div class="img" style="float: none">
257
+ <img-self :src="getimg(paperdata.f_notified_path)"width="150" style="float: left"
258
+ height="200"></img-self>
259
+ </div>
260
+ </div>
261
+ </td>
262
+ </tr>
263
+ </tbody>
264
+ </table>
265
+ </div>
266
+ </div>
267
+ <div class style="width: 1%;height: 100%;background-color: #F1F8FF;float: left;"></div>
268
+ <div class="col-md-6" style="height: 100%;overflow: scroll">
269
+ <div style="width: 95%;margin-left: 5%">
270
+ <table class="table table-striped table-bordered" v-for="config in deviceconfig2">
271
+ <thead v-show="!(config.checkname!='燃气表'&&paperdata.f_entry_status!='入户')">
272
+ <tr>
273
+ <th style="text-align: center">{{ config.checkname }}</th>
274
+ </tr>
275
+ </thead>
276
+ <tbody v-show="!(config.checkname!='燃气表'&&paperdata.f_entry_status!='入户')">
277
+ <tr v-for="dev in config.items">
278
+ <td v-if="dev.type!='text' && dev.isshow != false" >
279
+ <div class="row">
280
+ <div class="col-md-8" style="text-align: center;">
281
+ <label>
282
+ <button-link type="button" class="btn btn-link" @click="showpicture(config.checkname,dev.lname)"
283
+ :style="isred(config.checkname,dev.lname)?'color:red':'color:black'">
284
+ {{ dev.lname }}
285
+ </button-link>
286
+ </label>
287
+ </div>
288
+ <div class="col-md-4" style="text-align: center">
289
+ <label style="font-weight: normal"
290
+ v-if="dev.type!='picture'">{{ getDeviceValue(config.checkname, dev.lname) ? getDeviceValue(config.checkname, dev.lname) : '无' }}</label>
291
+ <label style="font-weight: normal" v-if="dev.type=='picture'">
292
+ <div v-show="getDevicePath(config.checkname,dev.lname)">
293
+ <button-link style="color: black" type="button" class="btn btn-link"
294
+ @click="showpath(getDevicePath(config.checkname,dev.lname),dev.lname)">查看照片
295
+ </button-link>
296
+ </div>
297
+ <div v-show="!getDevicePath(config.checkname,dev.lname)">无照片</div>
298
+ </label>
299
+ </div>
300
+ </div>
301
+ </td>
302
+ <td v-if="dev.type==='text' && dev.isshow != false">
303
+ <label style="width: 100%;text-align: center">{{ dev.lname }}</label>
304
+ </td>
305
+ </tr>
306
+ </tbody>
307
+ </table>
308
+ </div>
309
+ </div>
310
+
311
+ </div>
312
+ </div>
313
+ </div>
314
+ <modal :show.sync="imgshow" v-ref:modal backdrop="true">
315
+ <header slot="modal-header" class="modal-header">
316
+ {{ picturename }}
317
+ </header>
318
+ <article slot="modal-body" class="modal-body">
319
+ <div class="from-group">
320
+ <div class="row">
321
+ <div class="col-md-6">
322
+ <img-self v-if="showimg1" :src="getimg(showimg1)" width="240" height="300"></img-self>
323
+ </div>
324
+ <div class="col-md-6">
325
+ <img-self v-if="showimg2" :src="getimg(showimg2)" width="240" height="300"></img-self>
326
+ </div>
327
+ <div class="col-md-6" v-for="item in otherDarginShowImgs">
328
+ <img-self v-if="item.path" :src="getimg(item.path)" width="240" height="300"></img-self>
329
+ </div>
330
+ </div>
331
+ </div>
332
+ </article>
333
+ <footer slot="modal-footer" class="modal-footer" v-show="false">
334
+ <button type="button" class="btn btn-success" @click='imgclose'>关闭</button>
335
+ </footer>
336
+ </modal>
337
+ <modal :show.sync="imgshow2" v-ref:modal backdrop="true">
338
+ <header slot="modal-header" class="modal-header">
339
+ {{ paperdata.f_entry_status }}照片
340
+ </header>
341
+ <article slot="modal-body" class="modal-body">
342
+ <div class="from-group">
343
+ <div class="row">
344
+ <div class="col-md-6">
345
+ <img-self v-if="this.paperdata.f_entry_status=='到访不遇'&& this.paperdata.f_noanswer_path" :src="showimg3" width="282"
346
+ height="400"></img-self>
347
+ </div>
348
+ <div class="col-md-6">
349
+ <img-self v-if="this.paperdata.f_entry_status=='到访不遇'&& this.paperdata.f_noanswer1_path" :src="showimg5" width="282"
350
+ height="400"></img-self>
351
+ </div>
352
+ <div class="col-md-6">
353
+ <img-self v-if="this.paperdata.f_entry_status=='到访不遇'&& this.paperdata.f_noanswer2_path" :src="showimg6" width="282"
354
+ height="400"></img-self>
355
+ </div>
356
+ <div class="col-md-6">
357
+ <img-self v-if="this.paperdata.f_entry_status=='拒检' && this.paperdata.f_rejectcheck_path" :src="showimg4" width="282"
358
+ height="400"></img-self>
359
+ </div>
360
+ <div class="col-md-6">
361
+ <img-self v-if="this.paperdata.f_entry_status=='拒检' && this.paperdata.f_rejectcheck1_path" :src="showimg7" width="282"
362
+ height="400"></img-self>
363
+ </div>
364
+ <div class="col-md-6">
365
+ <img-self v-if="this.paperdata.f_entry_status=='拒检' && this.paperdata.f_rejectcheck2_path" :src="showimg8" width="282"
366
+ height="400"></img-self>
367
+ </div>
368
+ </div>
369
+ </div>
370
+ </article>
371
+ <footer slot="modal-footer" class="modal-footer" v-show="false">
372
+ <button type="button" class="btn btn-success" @click='imgclose'>关闭</button>
373
+ </footer>
374
+ </modal>
375
+ </template>
376
+
377
+ <script>
378
+ import ObjConfig from '../../utils/GerJsonObjectConfig'
379
+ import RadioGroup from 'vue-client/src/vue-strap/src/radioGroup'
380
+ import Radio from 'vue-client/src/vue-strap/src/radioBtn'
381
+ import Vue from 'vue'
382
+ import * as Util from '../../components/Util'
383
+ import {jsonSort} from '../../utils/LdapHelper'
384
+ import {HttpResetClass} from "vue-client";
385
+ import {isEmpty} from "../../components/Util";
386
+ let asyncReady = async function (self) {
387
+ try {
388
+ let res = await new HttpResetClass().load('GET',`${self.$androidUtil.getProxyUrl()}/api/af-safecheck/vue`,null, {resolveMsg: null, rejectMsg: null})
389
+ self.delConfigKey(res.data)
390
+ Vue.config.safecheck=res.data
391
+ Vue.config.safecheck.DevicesConfig =res.data.DevicesConfig
392
+ Vue.config.safecheck.DevicesSetConfig = res.data.DevicesSetConfig
393
+ console.log('获取配置结果===', res.data)
394
+ } catch (error) {
395
+ // 忽略704,文件找不到异常R
396
+ if (error.status !== 704) {
397
+ throw error
398
+ }
399
+ }
400
+ }
401
+ export default {
402
+ title: '安检单',
403
+ props: ['f_plan_id', 'item', 'role'],
404
+ data() {
405
+ return {
406
+ data: {
407
+ f_devices: [],
408
+ f_defect_content: ''
409
+ },
410
+ paperdata: {},
411
+ picturename: '隐患照片',
412
+ defectDevice: {},
413
+ hasDevice: false,
414
+ deviceCollect: {},
415
+ deviceCollects: [],
416
+ isshow: false,
417
+ ajresult: '',
418
+ loading: true,
419
+ imgshow: false,
420
+ imgshow2: false,
421
+ isUpload: false,
422
+ livedispose: '',
423
+ showimg1: '',
424
+ showimg2: '',
425
+ showimg3: '',
426
+ showimg4: '',
427
+ showimg5: '',
428
+ showimg6: '',
429
+ showimg7: '',
430
+ showimg8: '',
431
+ hiddenDangerImgNumber: 0, //配置项中隐患照片数
432
+ otherDarginShowImgs: [],//其他隐患图片
433
+ startClick: false, //开始安检按钮是否可点击
434
+ isStrat: false, //是否开始安检
435
+ checkResult: {},//查询结果
436
+ newcheckResult: {},
437
+ timer: null,
438
+ showModal: false,
439
+ pic_to_be_viewed: '',
440
+ showBack: true,
441
+ devices: [],
442
+ devicesAll: [],
443
+ configAJ: [],
444
+ configRQ: [],
445
+ deviceconfig: {},
446
+ deviceconfig2: [],
447
+ f_devices: [],
448
+ config: {
449
+ "燃气表": {
450
+ "checkmust": true,
451
+ "index": 1,
452
+ "items": {
453
+ "基表编号":{"index":1,"type":"string","readonly":true},
454
+ "气表型号":{"index":2,"type":"string","readonly":true},
455
+ "气表品牌":{"index":3,"type":"string","readonly":true},
456
+ "进气方向":{"index":4,"type":"string","readonly":true},
457
+ "初始表底":{"index":5,"type":"number","isshow":false,"readonly":true},
458
+ "上期表读数":{"index":6,"type":"number","readonly":true,isshow:false},
459
+ "累购气量":{"index":7,"type":"number","readonly":true},
460
+ "已用气量":{"index":8,"type":"number","checkmust": false},//基表数
461
+ "剩余气量":{"index":9,"type":"number","checkmust": false},//累购-已用
462
+ //显示屏数 --实际剩余气量
463
+ "气量异常差值":{"index":10,"type":"number","readonly": true},
464
+ "表箱号":{"index":11,"type":"string","readonly": true},
465
+ "燃气表照片":{"index":12,"type":"picture","checkmust": false},
466
+ }
467
+ // 注意,配置项的index必须与上面的固定配置保持'顺序'
468
+ }
469
+ },
470
+ //金额
471
+ config2: {
472
+ "燃气表": {
473
+ "checkmust": true,
474
+ "index": 1,
475
+ "items": {
476
+ "基表编号":{"index":1,"type":"string","readonly":true},
477
+ "气表型号":{"index":2,"type":"string","readonly":true},
478
+ "气表品牌":{"index":3,"type":"string","readonly":true},
479
+ "进气方向":{"index":4,"type":"string","readonly":true},
480
+ "初始表底":{"index":5,"type":"number","isshow":false,"readonly":true},
481
+ "上期表读数":{"index":6,"type":"number","readonly":true,isshow:false},
482
+ "累购金额":{"index":7,"type":"number","readonly":true},
483
+ "已用金额":{"index":8,"type":"number","checkmust": false},
484
+ //显示屏数 --实际剩余气量
485
+ "剩余金额":{"index":9,"type":"number","checkmust": false},
486
+ "金额异常差值":{"index":10,"type":"number","readonly": true},
487
+ "表箱号":{"index":11,"type":"string","readonly": true},
488
+ "燃气表照片":{"index":12,"type":"picture","checkmust": false},
489
+ }
490
+ }
491
+ },
492
+ }
493
+ },
494
+ components: {
495
+ RadioGroup,
496
+ Radio,
497
+ },
498
+ computed: {
499
+ isRecodrDownloadBtn(){
500
+ // 投诉单下派还是处理
501
+ let res = this.$appdata.getSingleValue('无限制录音');
502
+ if (res == 'true'){
503
+ return true;
504
+ }else {
505
+ return false;
506
+ }
507
+ },
508
+ selector: {
509
+ get() {
510
+ return 'paper-state'
511
+ },
512
+ set(val) {
513
+ if (this.isStrat) {
514
+ this.$goto(val, {userinfo: this.data}, 'paper-router')
515
+ } else {
516
+ this.$showMessage('未开始安检!')
517
+ }
518
+ }
519
+ },
520
+ actionEnabled: {
521
+ get() {
522
+ return this.role == 'inspect'
523
+ }
524
+ }
525
+ },
526
+ methods: {
527
+ delConfigKey(obj){
528
+ // 从琉璃中获取的配置中会包含 $开头的一些额外描述新的key。为了兼容v3的代码逻辑在此函数中去掉
529
+ Object.keys(obj).forEach(key =>{
530
+ Object.keys(obj[key]).forEach(col => {
531
+ // 检查键是否以$开头
532
+ if (col.startsWith('$')) {
533
+ // 使用delete操作符删除键
534
+ delete obj[key][col];
535
+ }
536
+ })
537
+ })
538
+ },
539
+ getimg(val){
540
+ if(isEmpty(val)){
541
+ return ''
542
+ }
543
+ console.log(`${this.$androidUtil.getProxyUrl()}/${val}`)
544
+
545
+ return `${this.$androidUtil.getProxyUrl()}/${val}`
546
+ },
547
+ devicesCollect() {
548
+ //tag
549
+ //tag)
550
+ //tag)
551
+ //tag
552
+ this.deviceCollects = []
553
+ let checkResult = '正常'
554
+ this.result = '正常'
555
+ let codata = JSON.parse(JSON.stringify(this.data))
556
+ //tag)
557
+ for (let device in this.data) {
558
+ let f_device_type
559
+ if (device.startsWith("device")) {
560
+ for (let item in this.data[device]) {
561
+ if (this.data[device].length > 1) {
562
+ let j = Number.parseInt(item) + 1
563
+ f_device_type = `${this.data[device][item].f_device_type}${j}`
564
+ } else {
565
+ f_device_type = this.data[device][item].f_device_type
566
+ }
567
+ // //tag
568
+ let deviceelse= []
569
+ let deviceInfos = []
570
+ for (let i in this.data[device][item].f_items) {
571
+ let defects = ''
572
+
573
+ let items = this.data[device][item].f_items[i]
574
+
575
+
576
+ if ((items.type === 'selector' || items.type === 'radio' || items.type === 'checkbox') && items.f_item_value != null && items.f_item_value instanceof Array) {
577
+ for (let i in items.f_item_value) {
578
+ let f_item_value = items.f_item_value[i]
579
+
580
+ //tag)
581
+ //tag)
582
+ //tag)
583
+ //tag)
584
+
585
+ if (!this.config[this.data[device][item].f_device_type].items[items.f_item_name] && (items.isdefect && (items.isdefect=='true' || items.isdefect==true))) {
586
+ continue
587
+ }
588
+ /*if(items.f_is_defect != true && items.f_is_defect != 'true'){
589
+ continue
590
+ }*/
591
+ if(items.f_is_defect == 'true' || items.f_is_defect == true){
592
+ checkResult = '有隐患'
593
+ this.result = '有隐患'
594
+ defects = `${defects}:${items.f_item_value}/`
595
+ }
596
+ /*let options = this.config[this.data[device][item].f_device_type].items[items.f_item_name].options
597
+ for (let option in options) {
598
+ if (options[option].data == f_item_value) {
599
+ if (options[option].isdefect == 'true' || options[option].isdefect == true) {
600
+ checkResult = '有隐患'
601
+ this.result = '有隐患'
602
+ defects = `${defects}:${options[option].data}/`
603
+ // let level = options[option].level
604
+ }
605
+ }
606
+ }*/
607
+ //tag)
608
+ }
609
+ if (defects != '') {
610
+ console.log('有隐患items', items)
611
+ deviceInfos.push(`${items.f_item_name}${defects.substring(0, defects.length - 1)}${items.f_else?items.f_else:''}`)
612
+ }
613
+ }
614
+ else if ( (items.type === 'string' || items.type === 'number') && items.f_is_defect && items.f_item_value[0] ) {
615
+ checkResult = '有隐患'
616
+ this.result = '有隐患'
617
+ deviceInfos.push(`${items.f_item_name}:${items.f_item_value[0]}`)
618
+
619
+ }
620
+ else if (items.f_item_name == '金额异常差值') {
621
+ var deviation = this.$appdata.getSingleValue('金额异常差值允许误差')
622
+ //tag
623
+ if (parseFloat(items.f_item_value[0]).toString() != "NaN" && parseFloat(deviation).toString() != "NaN") {
624
+ if (parseFloat(items.f_item_value[0]) > parseFloat(deviation) || parseFloat(items.f_item_value[0]) < parseFloat(deviation) * -1) {
625
+ checkResult = '有隐患'
626
+ this.result = '有隐患'
627
+ deviceInfos.push(`${items.f_item_name}:${items.f_item_value[0]}`)
628
+ }
629
+ }
630
+ }
631
+ else if (items.f_item_name == '气量异常差值') {
632
+ var deviation = this.$appdata.getSingleValue('气量异常差值允许误差')
633
+ //tag
634
+ if (parseFloat(items.f_item_value[0]).toString() != "NaN" && parseFloat(deviation).toString() != "NaN") {
635
+ if (parseFloat(items.f_item_value[0]) > parseFloat(deviation) || parseFloat(items.f_item_value[0]) < parseFloat(deviation) * -1) {
636
+ checkResult = '有隐患'
637
+ this.result = '有隐患'
638
+ deviceInfos.push(`${items.f_item_name}:${items.f_item_value[0]}`)
639
+ }
640
+ }
641
+ }
642
+ if(!this.config[this.data[device][item].f_device_type].items[items.f_item_name]){
643
+ // console.log('this.config[this.data[device][item].f_device_type]', this.config[this.data[device][item].f_device_type])
644
+ // console.log('this.deviceconfig2', this.deviceconfig2)
645
+ for(let dev in this.deviceconfig2){
646
+ if(this.deviceconfig2[dev].checkname==this.data[device][item].f_device_type){
647
+ let no_inArr = true
648
+ for (let deviceconfig2ElementKey in this.deviceconfig2[dev].items) {
649
+ if(this.deviceconfig2[dev].items[deviceconfig2ElementKey].lname == items.f_item_name){
650
+ no_inArr = false
651
+ }
652
+ }
653
+ if (no_inArr){
654
+ this.deviceconfig2[dev].items.push({
655
+ lname: items.f_item_name
656
+ })
657
+ }
658
+ }
659
+ }
660
+ }
661
+ // if(!this.config[this.data[device][item].f_device_type].items[items.f_item_name]){
662
+ // // console.log('this.config[this.data[device][item].f_device_type]', this.config[this.data[device][item].f_device_type])
663
+ // // console.log('this.deviceconfig2', this.deviceconfig2)
664
+ // for(let dev in this.deviceconfig2){
665
+ // if(this.deviceconfig2[dev].checkname==this.data[device][item].f_device_type){
666
+ // this.deviceconfig2[dev].items.push({
667
+ // lname: items.f_item_name
668
+ // })
669
+ // }
670
+ // }
671
+ // }
672
+ //tag)
673
+ //tag
674
+ //tag
675
+ if (items.type === 'selector') {
676
+ items.selected = []
677
+ } else if (items.type === 'inputSelector') {
678
+ items.selected = ''
679
+ }
680
+ }
681
+
682
+
683
+ //tag
684
+ this.$set('deviceCollect.name', f_device_type)
685
+ this.$set('deviceCollect.value', checkResult)
686
+ this.$set('deviceCollect.devices', deviceInfos)
687
+ this.$set('deviceCollect.else', deviceelse)
688
+ console.log('deviceCollect.devices',this.deviceCollect.devices)
689
+ console.log('deviceCollect.else',this.deviceCollect.else)
690
+ //tag)
691
+ if (this.deviceCollect.name) {
692
+ //tag
693
+ this.deviceCollects.push(JSON.parse(JSON.stringify(this.deviceCollect)))
694
+ }
695
+
696
+ checkResult = '正常'
697
+ this.deviceCollect = {}
698
+ }
699
+ }
700
+ }
701
+ if (this.deviceCollects.length > 0) {
702
+ this.hasDevice = true
703
+ }
704
+ this.ajresult = JSON.parse(this.data.f_defect_content).result
705
+ this.showimg3 = this.data.f_noanswer_path
706
+ this.showimg5 = this.data.f_noanswer1_path
707
+ this.showimg6 = this.data.f_noanswer2_path
708
+ this.showimg4 = this.data.f_rejectcheck_path
709
+ this.showimg7 = this.data.f_rejectcheck1_path
710
+ this.showimg8 = this.data.f_rejectcheck2_path
711
+ this.paperdata = this.data
712
+ this.loading = false
713
+ },
714
+ imgclose() {
715
+ this.imgshow = false
716
+ },
717
+ putDevices() {
718
+ ////tag
719
+ this.$set('data.approve', "true")
720
+ this.$set('data.writeback', "false")
721
+ if (Vue.config.safecheck.ApproveConfig != undefined) {
722
+ if (Vue.config.safecheck.ApproveConfig.approve != undefined) {
723
+ this.$set('data.approve', Vue.config.safecheck.ApproveConfig.approve)
724
+ }
725
+ if (Vue.config.safecheck.ApproveConfig.writeback != undefined) {
726
+ this.$set('data.writeback', Vue.config.safecheck.ApproveConfig.writeback)
727
+ }
728
+ if (Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
729
+ this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
730
+ }
731
+ if(Vue.config.safecheck.ApproveConfig.hiddendanger != undefined){
732
+ if (parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger) >= 3) {
733
+ this.hiddenDangerImgNumber = 3
734
+ }else {
735
+ this.hiddenDangerImgNumber = parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger)
736
+ }
737
+ }
738
+ }
739
+ //tag
740
+
741
+ //tag)
742
+ if (!this.item.f_safecheck_type && Vue.config.safecheck.SafecheckType && Vue.config.safecheck.SafecheckType['年度普检']) {
743
+ this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType['年度普检'][this.item.f_check_type]])
744
+ }else if (!this.item.f_safecheck_type && Vue.config.safecheck.SafecheckType && Vue.config.safecheck.SafecheckType['年度安检']){
745
+ this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType['年度安检'][this.item.f_check_type]])
746
+ }else if (Vue.config.safecheck.SafecheckType && Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type]]){
747
+ this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_check_type]])
748
+ }else {
749
+ if(this.item.f_check_type == '民用'){
750
+ this.config = this.extend(this.config, Vue.config.safecheck.DevicesConfig)
751
+ }else {
752
+ this.config = this.extend(this.config, Vue.config.safecheck.DevicesSetConfig)
753
+ }
754
+ }
755
+ //遍历安检项配置
756
+ for (let i in this.config) {
757
+ //取得安检项索引值
758
+ let n = this.config[i].index
759
+ this.devices[n - 1] = {device: i, n: n, checkmust: this.config[i].checkmust}
760
+ this.$set('data.' + 'device' + n, [])
761
+ // let items = []
762
+ // for (let it in this.config[i].items) {
763
+ // //赋值下拉选项
764
+ // if (this.config[i].items[it].type == 'selector') {
765
+ // for (let op in this.config[i].items[it].options)
766
+ // if (this.config[i].items[it].options[op].isdefault == true) {
767
+ // items.push({
768
+ // f_defect_level: this.config[i].items[it].options[op].level,
769
+ // f_is_defect: this.config[i].items[it].options[op].isdefect,
770
+ // f_item_name: it,
771
+ // f_item_value: this.config[i].items[it].options[op].data,
772
+ // f_path: "",
773
+ // type: "selector"
774
+ // })
775
+ // }
776
+ // }
777
+ // }
778
+ n = n + 1
779
+ }
780
+
781
+ },
782
+ showpath(val1, val2) {
783
+ //tag
784
+ //tag
785
+ if (val1) {
786
+ this.showimg1 = val1
787
+ this.picturename = val2
788
+ this.imgshow = true
789
+ }
790
+ },
791
+ showpicture(val1, val2) {
792
+ //tag
793
+ if (val2 == '气量异常差值' || val2 == '金额异常差值') {
794
+ return
795
+ }
796
+ for (let i = 0; i < this.devicesAll.length; i++) {
797
+ for (let j = 0; j < this.devicesAll[i].length; j++) {
798
+ if (this.devicesAll[i][j].f_device_type == val1) {
799
+ for (let k = 0; k < this.devicesAll[i][j].f_items.length; k++) {
800
+ if (this.devicesAll[i][j].f_items[k].f_item_name == val2) {
801
+ if (!this.devicesAll[i][j].f_items[k].f_is_defect) {
802
+ return false
803
+ } else {
804
+ this.showimg1 = this.devicesAll[i][j].f_items[k].f_path
805
+ this.showimg2 = this.devicesAll[i][j].f_items[k].f_second_path
806
+ this.otherDarginShowImgs = []
807
+ for (let l = 0; l < this.hiddenDangerImgNumber; l++) {
808
+ let img = {path:''}
809
+ if (this.devicesAll[i][j].f_items[k]['f_p' + (l+1)+'_path']) {
810
+ img.path = this.devicesAll[i][j].f_items[k]['f_p' + (l+1)+'_path'] + '?' + Math.random()
811
+ this.otherDarginShowImgs.push(img)
812
+ }
813
+ }
814
+ this.picturename = '隐患照片'
815
+ this.imgshow = true
816
+ return true
817
+ }
818
+ }
819
+ }
820
+
821
+ }
822
+ }
823
+ }
824
+ },
825
+ isred(val1, val2) {
826
+ //tag
827
+ if (val2 == '气量异常差值' || val2 == '金额异常差值') {
828
+ return
829
+ }
830
+ for (let i = 0; i < this.devicesAll.length; i++) {
831
+ for (let j = 0; j < this.devicesAll[i].length; j++) {
832
+ if (this.devicesAll[i][j].f_device_type == val1) {
833
+ for (let k = 0; k < this.devicesAll[i][j].f_items.length; k++) {
834
+ if (this.devicesAll[i][j].f_items[k].f_item_name == val2) {
835
+ if (!this.devicesAll[i][j].f_items[k].f_is_defect) {
836
+ return false
837
+ } else {
838
+ return true
839
+ }
840
+ }
841
+ }
842
+
843
+ }
844
+ }
845
+ }
846
+ },
847
+ showpicture2() {
848
+ this.imgshow2 = true
849
+ },
850
+ getDeviceValue(val1, val2) {
851
+ let aa = ''
852
+ for (let i = 0; i < this.devicesAll.length; i++) {
853
+ for (let j = 0; j < this.devicesAll[i].length; j++) {
854
+ if (this.devicesAll[i][j].f_device_type == val1) {
855
+ for (let k = 0; k < this.devicesAll[i][j].f_items.length; k++) {
856
+ if (this.devicesAll[i][j].f_items[k].f_item_name == val2) {
857
+ if (this.devicesAll[i][j].f_items[k].f_item_lists[0]) {
858
+ for (let l = 0; l < this.devicesAll[i][j].f_items[k].f_item_lists.length; l++) {
859
+ let val = this.devicesAll[i][j].f_items[k].f_item_lists[l].f_item_value
860
+ aa += (val === null ? '空' : val) + ' '
861
+ }
862
+ return aa
863
+ }
864
+ }
865
+ }
866
+
867
+ }
868
+ }
869
+ }
870
+
871
+ },
872
+ getDevicePath(val1, val2) {
873
+ for (let i = 0; i < this.devicesAll.length; i++) {
874
+ for (let j = 0; j < this.devicesAll[i].length; j++) {
875
+ if (this.devicesAll[i][j].f_device_type == val1) {
876
+ for (let k = 0; k < this.devicesAll[i][j].f_items.length; k++) {
877
+ if (this.devicesAll[i][j].f_items[k].f_item_name == val2) {
878
+ return this.devicesAll[i][j].f_items[k].f_path
879
+ }
880
+ }
881
+
882
+ }
883
+ }
884
+ }
885
+
886
+ },
887
+ getDeviceAll() {
888
+ let keyall = Object.keys(this.data)
889
+ for (let i = 0; i < keyall.length; i++) {
890
+ //tag)
891
+ if (keyall[i].startsWith('device') && keyall[i] != 'deviceundefined') {
892
+ this.devicesAll.push(this.data[keyall[i]])
893
+ //tag
894
+ }
895
+ }
896
+ //tag
897
+ //tag)
898
+ this.devicesCollect()
899
+
900
+ },
901
+
902
+ back() {
903
+ if (this.role == 'inspect') {
904
+ if (!this.isStrat) {
905
+ this.$back()
906
+ return
907
+ } else {
908
+ this.savePaper(true).then(() => {
909
+ this.$back()
910
+ this.isStrat = false
911
+ })
912
+ }
913
+ } else {
914
+ this.$back()
915
+ }
916
+ },
917
+ checkIsStart() {
918
+ alert('asdad')
919
+ return
920
+ },
921
+
922
+ viewPic(fileName) {
923
+ //tag
924
+ if (this.role == 'view') {
925
+ if (!fileName.endsWith('nopic.png')) {
926
+ this.pic_to_be_viewed = fileName
927
+ this.showModal = true
928
+ }
929
+ } else {
930
+ HostApp.viewPic(fileName)
931
+ }
932
+ },
933
+ tick() {
934
+ this.timer = null
935
+ this.data.f_offsite_time = Util.toStandardTimeString()
936
+ this.timer = window.setTimeout(this.tick, 1000)
937
+ },
938
+ getRepairState() {
939
+ let repaired = true
940
+ this.data.f_defects.forEach((defect) => {
941
+ repaired = repaired & (defect.f_ratification == '已处理')
942
+ })
943
+ return repaired
944
+ },
945
+ verifyRepairDefects() {
946
+ this.data.f_repair_date = Util.toStandardTimeString()
947
+ this.data.f_repaired = this.getRepairState() ? '已修' : '在修'
948
+ },
949
+ genuineSave(saveOnly) {
950
+ HostApp.__this__.save(saveOnly)
951
+ if (!saveOnly)
952
+ HostApp.__this__.disableTimer()
953
+ HostApp.__callback__ = null
954
+ HostApp.__this__ = null
955
+ },
956
+ setUrgency() {
957
+ this.data.f_defect_urgency = 'Z'
958
+ let that = this
959
+ this.data.f_defects.forEach(function (defect) {
960
+ if (that.data.f_defect_urgency > defect.f_defect_level.charAt(0))
961
+ that.data.f_defect_urgency = defect.f_defect_level.charAt(0)
962
+ })
963
+ if (this.data.f_defect_urgency == 'Z')
964
+ this.data.f_defect_urgency = null
965
+ },
966
+ disableTimer() {
967
+ if (this.timer) {
968
+ window.clearTimeout(this.timer)
969
+ this.timer = null
970
+ }
971
+ },
972
+ loaded(paper) {
973
+ if (!paper.hasOwnProperty('id')) {
974
+ this.$showMessage("该安检单在手机上已经不存在,可能是卸载过程序。可以进入重新安检,或返回安检计划。")
975
+ this.init()
976
+ } else {
977
+ Util.booleanFilter(paper)
978
+ HostApp.__this__.$set('data', paper)
979
+ HostApp.__this__.$goto('paper-state', {}, 'paper-router')
980
+ // 如果打回重检则重新计时
981
+ //tag
982
+ if (HostApp.__this__.role == 'inspect'
983
+ && HostApp.__this__.data.f_approved
984
+ && HostApp.__this__.data.f_approved == '打回') {
985
+ //tag
986
+ HostApp.__this__.data.f_onsite_time = Util.toStandardTimeString()
987
+ HostApp.__this__.tick()
988
+ }
989
+ }
990
+ HostApp.__callback__ = null
991
+ HostApp.__this__ = null
992
+ },
993
+ S4() {
994
+ return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
995
+ },
996
+ init() {
997
+ this.data.f_noplan_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
998
+ this.data.ename = Vue.user.ename
999
+ this.data.f_outlets = Vue.user.f_parentname
1000
+ this.data.f_meetunit = Vue.user.orgpathnames
1001
+ this.data.orgpathstr = Vue.user.orgpathstr
1002
+ this.data.f_check_item_id = this.item.id
1003
+ this.data.f_check_plan_id = this.f_plan_id
1004
+ this.data.f_checker_id = Vue.user.id
1005
+ this.data.f_checker_name = Vue.user.name
1006
+ this.data.f_check_type = this.item.f_user_type
1007
+ this.data.f_subcompany = this.item.f_subcompany
1008
+ this.data.f_approved = this.item.f_approved
1009
+ this.data.f_repair_approved = this.item.f_repair_approved
1010
+ this.data.f_no_checkplan = this.item.f_no_checkplan
1011
+ this.data.f_approved = this.item.f_approved
1012
+ this.data.f_filialeid = this.item.f_filialeid
1013
+ this.data.f_orgstr = this.item.f_orgstr
1014
+ this.data.version = this.item.version
1015
+ this.$set('data.f_meters', this.item.f_plan_meters)
1016
+ this.$set('data.f_userinfo_code', this.item.f_userinfo_code)
1017
+ // 安检状态
1018
+ this.$set('data.f_entry_status', '入户')
1019
+ this.$set('data.f_usegas', '已使用')
1020
+ this.$set('data.f_state', this.item.f_state)
1021
+ // 用户信息
1022
+ this.$set('data.f_user_name', this.item.f_user_name)
1023
+ this.$set('data.f_user_phone', this.item.f_user_phone)
1024
+ this.$set('data.f_userinfoid', this.item.f_userinfoid)
1025
+ this.$set('data.f_address', this.item.f_address)
1026
+ this.$set('data.f_card_id', this.item.f_card_id)
1027
+ this.$set('data.f_area', this.item.f_area)
1028
+ this.$set('data.f_street', this.item.f_street)
1029
+ this.$set('data.f_room', this.item.f_room)
1030
+ this.$set('data.f_building', this.item.f_building)
1031
+ this.$set('data.f_unit', this.item.f_unit)
1032
+ this.$set('data.f_floor', this.item.f_floor)
1033
+ this.$set('data.f_residential_area', this.item.f_residential_area)
1034
+ this.$set('data.f_idnumber', this.item.f_idnumber)
1035
+ this.$set('data.f_comments', this.item.f_comments)
1036
+ this.$set('data.f_userproperties', this.item.f_userproperties)
1037
+ // 处置方式
1038
+ this.$set('data.f_no_gas_device', false)
1039
+ this.$set('data.f_close_valve', false)
1040
+ this.$set('data.f_unload_battery', false)
1041
+ if (this.data.f_check_item_id == '' && this.item.f_no_checkplan == '无计划安检') {
1042
+ this.data.f_check_item_id = this.data.f_noplan_item_id
1043
+ }
1044
+
1045
+ //房屋结构
1046
+ // this.$set('data.f_room_style', '多层')
1047
+ //供暖方式
1048
+ // this.$set('data.f_heating_style', '热力公司集中供暖')
1049
+ if (this.item.f_plan_meters) {
1050
+ for (let de in this.devices) {
1051
+ this.$set('data.device' + this.devices[de].n, [])
1052
+ for (let i = 0; i < this.item.f_plan_meters.length; i++) {
1053
+ if (this.item.f_plan_meters[i].f_meter_type) {
1054
+ if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('机表') > 0) {
1055
+ delete this.config['燃气表']['items']['累计购气量']
1056
+ this.data['device' + this.devices[de].n].push({
1057
+ f_device_type: "燃气表",
1058
+ f_items: [{
1059
+ f_defect_level: null,
1060
+ f_device_id: "",
1061
+ f_is_defect: "",
1062
+ f_item_name: "表品牌",
1063
+ f_item_value: this.item.f_plan_meters[i].f_aliasname,
1064
+ f_path: "",
1065
+ type: "string"
1066
+ },
1067
+ {
1068
+ f_defect_level: null,
1069
+ f_device_id: "",
1070
+ f_is_defect: "",
1071
+ f_item_name: "位置",
1072
+ f_item_value: this.item.f_plan_meters[i].f_weizhi,
1073
+ f_path: "",
1074
+ type: "selector"
1075
+ },
1076
+ {
1077
+ f_defect_level: null,
1078
+ f_device_id: "",
1079
+ f_is_defect: "",
1080
+ f_item_name: "表号",
1081
+ f_item_value: this.item.f_plan_meters[i].f_meter_no,
1082
+ f_path: "",
1083
+ type: "number"
1084
+ },
1085
+ {
1086
+ f_defect_level: null,
1087
+ f_device_id: "",
1088
+ f_is_defect: "",
1089
+ f_item_name: "表封号",
1090
+ f_item_value: this.item.f_plan_meters[i].f_metertitles,
1091
+ f_path: "",
1092
+ type: "number"
1093
+ },
1094
+ {
1095
+ f_defect_level: null,
1096
+ f_device_id: "",
1097
+ f_is_defect: "",
1098
+ f_item_name: "表型号",
1099
+ f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
1100
+ f_path: "",
1101
+ type: "selector"
1102
+ },
1103
+ {
1104
+ f_defect_level: null,
1105
+ f_device_id: "",
1106
+ f_is_defect: "",
1107
+ f_item_name: "表底数",
1108
+ f_item_value: this.item.f_plan_meters[i].f_prior_reading,
1109
+ f_path: "",
1110
+ type: "number"
1111
+ }
1112
+ ]
1113
+ })
1114
+ } else if (this.devices[de].device == "燃气表") {
1115
+ delete this.config['燃气表']['items']['表底数']
1116
+ this.data['device' + this.devices[de].n].push({
1117
+ f_device_type: "燃气表",
1118
+ f_items: [{
1119
+ f_defect_level: null,
1120
+ f_device_id: "",
1121
+ f_is_defect: "",
1122
+ f_item_name: "表品牌",
1123
+ f_item_value: this.item.f_plan_meters[i].f_aliasname,
1124
+ f_path: "",
1125
+ type: "string"
1126
+ },
1127
+ {
1128
+ f_defect_level: null,
1129
+ f_device_id: "",
1130
+ f_is_defect: "",
1131
+ f_item_name: "位置",
1132
+ f_item_value: this.item.f_plan_meters[i].f_weizhi,
1133
+ f_path: "",
1134
+ type: "selector"
1135
+ },
1136
+ {
1137
+ f_defect_level: null,
1138
+ f_device_id: "",
1139
+ f_is_defect: "",
1140
+ f_item_name: "表号",
1141
+ f_item_value: this.item.f_plan_meters[i].f_meter_no,
1142
+ f_path: "",
1143
+ type: "number"
1144
+ },
1145
+ {
1146
+ f_defect_level: null,
1147
+ f_device_id: "",
1148
+ f_is_defect: "",
1149
+ f_item_name: "表封号",
1150
+ f_item_value: this.item.f_plan_meters[i].f_metertitles,
1151
+ f_path: "",
1152
+ type: "number"
1153
+ },
1154
+ {
1155
+ f_defect_level: null,
1156
+ f_device_id: "",
1157
+ f_is_defect: "",
1158
+ f_item_name: "表型号",
1159
+ f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
1160
+ f_path: "",
1161
+ type: "selector"
1162
+ },
1163
+ {
1164
+ f_defect_level: null,
1165
+ f_device_id: "",
1166
+ f_is_defect: "",
1167
+ f_item_name: "累计购气量",
1168
+ f_item_value: this.item.f_plan_meters[i].f_prior_reading,
1169
+ f_path: "",
1170
+ type: "number"
1171
+ }
1172
+ ]
1173
+ })
1174
+ }
1175
+ }
1176
+ }
1177
+ }
1178
+ }
1179
+
1180
+ this.$goto('paper-state', {}, 'paper-router')
1181
+ },
1182
+ extend(initalObj, finalObj) {
1183
+ var obj = finalObj || {};
1184
+ for (var i in initalObj) {
1185
+ var prop = initalObj[i];
1186
+
1187
+ // 避免相互引用对象导致死循环,如initalObj.a = initalObj的情况
1188
+ if (prop === obj) {
1189
+ continue;
1190
+ }
1191
+
1192
+ if (typeof prop === 'object') {
1193
+ if (obj[i]) {
1194
+ this.extend(obj[i], prop)
1195
+ } else {
1196
+ obj[i] = prop;
1197
+ }
1198
+ }
1199
+ }
1200
+ return obj;
1201
+ },
1202
+ //获取当前时间
1203
+ getNowFormatDate() {
1204
+ var date = new Date();
1205
+ var seperator1 = "-";
1206
+ var seperator2 = ":";
1207
+ var month = date.getMonth() + 1;
1208
+ var strDate = date.getDate();
1209
+ if (month >= 1 && month <= 9) {
1210
+ month = "0" + month;
1211
+ }
1212
+ if (strDate >= 0 && strDate <= 9) {
1213
+ strDate = "0" + strDate;
1214
+ }
1215
+ var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
1216
+ + " " + date.getHours() + seperator2 + date.getMinutes()
1217
+ + seperator2 + date.getSeconds();
1218
+ return currentdate;
1219
+ }
1220
+ },
1221
+ ready() {
1222
+ this.putDevices()
1223
+ if (this.item.f_state != '未检' || this.item.f_no_checkplan == '无计划安检') {
1224
+ if (this.role != 'inspect') {
1225
+ let that = this
1226
+ let id
1227
+ if (this.role == 'view') {
1228
+ id = this.item.id
1229
+ } else if (this.role == 'androidview') {
1230
+ id = this.item.f_paper_id
1231
+ }
1232
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/path_getCheckPaper`, {data: {id: id}}).then((respanse) => {
1233
+ //tag
1234
+ if (respanse.data.length != 0) {
1235
+ // 包含 其它 特殊处理的数组
1236
+ // 对应位置
1237
+ that.data = Object.assign(that.data, respanse.data[0])
1238
+ if (respanse.data[0].f_devices) {
1239
+ for (let da in that.devices) {
1240
+ that.$set('data.device' + that.devices[da].n, [])
1241
+ }
1242
+ respanse.data[0].f_devices.forEach((item) => {
1243
+ for (let de in that.devices) {
1244
+ if (that.devices[de].device == item.f_device_type) {
1245
+ item.f_items.forEach((f_item) => {
1246
+ //tag
1247
+ //tag
1248
+ let itemValues = []
1249
+ f_item.f_item_lists.forEach((tempItem) => {
1250
+ //tag
1251
+ if (tempItem.f_item_value !== 'null') {
1252
+ itemValues.push(tempItem.f_item_value)
1253
+ }
1254
+ })
1255
+ f_item.f_item_value = itemValues
1256
+ })
1257
+ that.data['device' + that.devices[de].n].push({
1258
+ f_device_type: item.f_device_type,
1259
+ f_items: item.f_items
1260
+ })
1261
+ }
1262
+ }
1263
+ })
1264
+ }
1265
+ Util.replaceFalse(that.data)
1266
+ Util.booleanFilter(that.data)
1267
+ if (this.role == 'view') {
1268
+ Util.ratifyPics(that.data)
1269
+ Util.ratifyPics(that.picture)
1270
+ } else {
1271
+ Util.androidRatifyPics(that.data, this.$androidUtil.getProxyUrl())
1272
+ }
1273
+ }
1274
+ // this.$goto('paper-message-blank', {userinfo:this.data,devices:this.devices,config:this.config,role:this.role}, 'self')
1275
+ this.isshow = true
1276
+ console.log('Vue.config.safecheck.DevicesConfig', Vue.config.safecheck.DevicesConfig)
1277
+ if (this.data.f_check_type == '民用') {
1278
+ this.deviceconfig = JSON.parse(JSON.stringify(Vue.config.safecheck.DevicesConfig))
1279
+ if (typeof this.deviceconfig==='string'){
1280
+ this.deviceconfig=JSON.parse(this.deviceconfig)
1281
+ }
1282
+ //tag)
1283
+ } else if (this.data.f_check_type == '非民用') {
1284
+ this.deviceconfig = JSON.parse(JSON.stringify(Vue.config.safecheck.DevicesSetConfig))
1285
+ if (typeof this.deviceconfig==='string'){
1286
+ this.deviceconfig=JSON.parse(this.deviceconfig)
1287
+ }
1288
+ //tag)
1289
+ }
1290
+ if (respanse.data[0].f_collection_type == '按金额') {
1291
+ let aaa = Object.assign({}, this.config2["燃气表"].items, this.deviceconfig["燃气表"].items)
1292
+ this.deviceconfig["燃气表"].items = aaa
1293
+ //this.deviceconfig["燃气表"]=this.config2["燃气表"]
1294
+ //tag)
1295
+ } else {
1296
+ let aaa = Object.assign({}, this.config["燃气表"].items, this.deviceconfig["燃气表"].items)
1297
+ this.deviceconfig["燃气表"].items = aaa
1298
+ //tag)
1299
+ }
1300
+ this.deviceconfig2 = ObjConfig.getObjConfig(this.deviceconfig)
1301
+ this.deviceconfig2[0].items = jsonSort(this.deviceconfig2[0].items, "index")
1302
+ this.deviceconfig2[1].items = jsonSort(this.deviceconfig2[1].items, "index")
1303
+ this.deviceconfig2 = jsonSort(this.deviceconfig2, "index")
1304
+ this.getDeviceAll()
1305
+ }
1306
+ ).catch(
1307
+ (respanse) => {
1308
+ //tag
1309
+ alert('查找安检单失败')
1310
+ })
1311
+ }
1312
+ }
1313
+
1314
+ },
1315
+ watch: {
1316
+ // 'isUpload'(val){
1317
+ // //tag
1318
+ // }
1319
+ },
1320
+ destroyed() {
1321
+ //tag
1322
+ this.disableTimer()
1323
+ }
1324
+ }
1325
+
1326
+ </script>
1327
+ <style scoped>
1328
+ .table-striped thead tr th {
1329
+ background-color: rgb(223, 237, 251);
1330
+ padding: 10px;
1331
+ border-left: solid 0px #dae4f2;
1332
+ border-top: solid 1px #dae4f2;
1333
+ border-right: none;
1334
+ border-bottom: none;
1335
+ text-align: center;
1336
+ color: black;
1337
+ }
1338
+ </style>