safecheck-client 3.0.33-113 → 3.0.33-114

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