safecheck-client 3.0.33-66 → 3.0.33-68

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,1081 +1,1081 @@
1
- <template>
2
- <div class="flex">
3
- <work-busy :is-busy="isbusy"></work-busy>
4
- <criteria-paged :model="model" v-ref:paged>
5
- <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row" v-show="!$parent.$parent.$parent.showItem">
8
- <div :class="$parent.$parent.style">
9
- <label class="font_normal_body">安检计划</label>
10
- <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
11
- @click="$parent.$parent.showChooser"
12
- style="width: 60%" placeholder="安检计划" readonly="readonly">
13
- </div>
14
- <div :class="$parent.$parent.style">
15
- <label class="font_normal_body">存在隐患</label>
16
- <v-select style="width:60% "
17
- class="select select_list"
18
- :value.sync="model.f_has_defect"
19
- v-model="model.f_has_defect"
20
- :options='$parent.$parent.hasDefectOptions'
21
- :placeholder='model.f_has_defect'
22
- condition="f_has_defect = '{}'"
23
- close-on-select>
24
- </v-select>
25
- </div>
26
- <div :class="$parent.$parent.style">
27
- <label class="font_normal_body">用户编号</label>
28
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
29
- condition="f_userinfo_code = '{}'"
30
- style="width: 60%" placeholder="用户编号">
31
- </div>
32
- <div :class="$parent.$parent.style">
33
- <label class="font_normal_body">用户表号</label>
34
- <input type="text" class="input_search" v-model="model.f_meternumber"
35
- condition="f_meternumber = '{}'"
36
- style="width: 60%" placeholder="用户表号">
37
- </div>
38
- <div :class="$parent.$parent.style">
39
- <label class="font_normal_body">结果查询</label>
40
- <v-select
41
- placeholder='维修结果查询'
42
- :value-single="true"
43
- class="select select_list" style="width: 60%"
44
- v-model='model.f_is_repair'
45
- :value.sync="model.f_is_repair"
46
- :options='$parent.$parent.repaired'
47
- condition="f_is_repair = '{}'"
48
- close-on-select clear-button> </v-select>
49
- </div>
50
- <div class=" col-sm-4 form-group button-range" >
51
- <div class="span" style="float: right;margin-top: 8px">
52
- <div style="float: right" class="button_spacing"
53
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
54
- @click="$parent.$parent.hiddenr()"></div>
55
- <div style="float: right" class="button_spacing"
56
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
57
- @click="$parent.$parent.hidden()"></div>
58
- <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
59
- <!-- <button style="float: right" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>-->
60
- <div style="float: right">
61
- <export-excel-safe :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids,f_defect_content:$parent.$parent.model.f_defect_content}"
62
- :field="$parent.$parent.getfield"
63
- progress="safeGetExportProgress"
64
- sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefectNew2" template-name='安检隐患明细' :choose-col="true"></export-excel-safe>
65
- </div>
66
- </div>
67
- </div>
68
- </div>
69
- <div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
70
- <div :class="$parent.$parent.style">
71
- <label class="font_normal_body">片&emsp;&emsp;区</label>
72
- <v-select class="select_list select"
73
- placeholder='片区/管理站' style="width: 60%"
74
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
75
- :options='$parent.$parent.sliceArea'
76
- filer-key="name"
77
- close-on-select clear-button
78
- condition="f_slice_area='{}'"
79
- @change="$parent.$parent.getmeterbook(model.f_slice_area)"
80
- :value-single="true">
81
- </v-select>
82
- </div>
83
- <div :class="$parent.$parent.style2" style="margin: 0">
84
- <role-selector-safe
85
- role-name="安检员"
86
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
87
- :resobjprop.sync="$parent.$parent.resids"
88
- @re-res="$parent.$parent.getRes"
89
- :value.sync="model.f_checker_id"
90
- v-model="model.f_checker_id"
91
- condition="f_checker_name = '{}'">
92
- </role-selector-safe>
93
- </div>
94
-
95
- <div :class="$parent.$parent.style">
96
- <label class="font_normal_body">抄&ensp;表&ensp;册</label>
97
- <v-select class="select_list select"
98
- placeholder='抄表册' style="width: 60%"
99
- :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
100
- :options='$parent.$parent.cbc'
101
- filer-key="name"
102
- close-on-select clear-button
103
- condition="f_meter_book_num={}"
104
- :value-single="true">
105
- </v-select>
106
- </div>
107
- <div :class="$parent.$parent.style">
108
- <label class="font_normal_body">起始时间</label>
109
- <datepicker
110
- placeholder='起始时间' style="width:60%"
111
- :disabled-days-of-week="[]"
112
- :format="'yyyy-MM-dd'"
113
- :show-rest-button="reset"
114
- :value.sync="model.f_start_time"
115
- v-model="model.f_start_time"
116
- condition="f_offsite_time >= '{} 00:00:00'">
117
- </datepicker>
118
- </div>
119
- <div :class="$parent.$parent.style">
120
- <label class="font_normal_body">结束时间</label>
121
- <datepicker
122
- placeholder='结束时间' style="width:60%"
123
- :disabled-days-of-week="[]"
124
- :format="'yyyy-MM-dd'"
125
- :show-rest-button="reset"
126
- :value.sync="model.f_end_time"
127
- v-model="model.f_end_time"
128
- condition="f_offsite_time <= '{} 23:59:59'">
129
- </datepicker>
130
- </div>
131
- </div>
132
- <div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
133
-
134
- <div :class="$parent.$parent.style">
135
- <label class="font_normal_body">维&ensp;修&ensp;员</label>
136
- <input type="text" class="input_search" v-model="model.f_repairman"
137
- condition="f_repairman = '{}'"
138
- style="width: 60%" placeholder="维修员">
139
- </div>
140
- <div :class="$parent.$parent.style">
141
- <label class="font_normal_body">处理查询</label>
142
- <v-select
143
- placeholder='处理结果查询'
144
- :value-single="true"
145
- class="select select_list" style="width: 60%"
146
- v-model='model.f_is_deal'
147
- :value.sync="model.f_is_deal"
148
- :options='$parent.$parent.deals'
149
- condition="f_is_deal = '{}'"
150
- close-on-select clear-button> </v-select>
151
- </div>
152
- <div :class="$parent.$parent.style">
153
- <label class="font_normal_body">是否维修</label>
154
- <v-select
155
- placeholder='是否维修'
156
- :value-single="true"
157
- class="select select_list" style="width: 60%"
158
- v-model='model.f_repaired'
159
- :value.sync="model.f_repaired"
160
- :options='$parent.$parent.repairedOptions'
161
- condition="f_repaired = '{}'"
162
- close-on-select clear-button> </v-select>
163
- </div>
164
- <div :class="$parent.$parent.style">
165
- <label class="font_normal_body">地&ensp;&ensp;&ensp;&ensp;址</label>
166
- <input type="text" class="input_search" v-model="model.f_address"
167
- condition="f_address like '%{}%'"
168
- style="width: 60%" placeholder="地址">
169
- </div>
170
- <div :class="$parent.$parent.style">
171
- <label class="font_normal_body">开户时间</label>
172
- <datepicker
173
- placeholder='起始时间' style="width:60%"
174
- :disabled-days-of-week="[]"
175
- :format="'yyyy-MM-dd'"
176
- :show-rest-button="reset"
177
- :value.sync="model.f_start_gastime"
178
- v-model="model.f_start_gastime"
179
- condition="f_gas_date >= '{} 00:00:00'">
180
- </datepicker>
181
- </div>
182
- <div :class="$parent.$parent.style">
183
- <label class="font_normal_body">开户时间</label>
184
- <datepicker
185
- placeholder='结束时间' style="width:60%"
186
- :disabled-days-of-week="[]"
187
- :format="'yyyy-MM-dd'"
188
- :show-rest-button="reset"
189
- :value.sync="model.f_end_gastime"
190
- v-model="model.f_end_gastime"
191
- condition="f_gas_date <= '{} 23:59:59'">
192
- </datepicker>
193
- </div>
194
- <div :class="$parent.$parent.style">
195
- <label class="font_normal_body">用户标签</label>
196
- <v-select class="select_list select"
197
- placeholder='请选择' style="width: 60%"
198
- :value.sync="model.f_user_tags"
199
- v-model="model.f_user_tags"
200
- :options='$parent.$parent.userTags'
201
- filer-key="name"
202
- close-on-select clear-button
203
- condition="f_user_tags='{}'"
204
- :value-single="true">
205
- </v-select>
206
- </div>
207
- <div :class="$parent.$parent.style">
208
- <label class="font_normal_body">用气类型</label>
209
- <v-select class="select_list select"
210
- placeholder='请选择' style="width: 60%"
211
- :value.sync="model.f_user_gas_type"
212
- v-model="model.f_user_gas_type"
213
- :options='$parent.$parent.userGasType'
214
- filer-key="name"
215
- close-on-select clear-button
216
- condition="f_user_gas_type='{}'"
217
- :value-single="true">
218
- </v-select>
219
- </div>
220
- </div>
221
-
222
- <div class="row" v-show="$parent.$parent.$parent.showItem">
223
- <div :class="$parent.$parent.style">
224
- <label class="font_normal_body">安检计划</label>
225
- <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
226
- @click="$parent.$parent.showChooser"
227
- style="width: 60%" placeholder="安检计划" readonly="readonly">
228
- </div>
229
- <div :class="$parent.$parent.style">
230
- <label class="font_normal_body">存在隐患</label>
231
- <v-select style="width:60% "
232
- class="select select_list"
233
- :value.sync="model.f_has_defect"
234
- v-model="model.f_has_defect"
235
- :options='$parent.$parent.hasDefectOptions'
236
- :placeholder='model.f_has_defect'
237
- condition="f_has_defect = '{}'"
238
- close-on-select>
239
- </v-select>
240
- </div>
241
-
242
- <div class=" col-sm-4 form-group button-range">
243
- <div class="span" style="float: right;margin-top: 8px;margin-right: 50px">
244
- <div style="float: right" class="button_spacing"
245
- :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
246
- @click="$parent.$parent.hiddenr()"></div>
247
- <div style="float: right" class="button_spacing"
248
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
249
- @click="$parent.$parent.hidden()"></div>
250
- <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
251
- <!-- <button style="float: right" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>-->
252
- <div style="float: right">
253
- <export-excel-safe :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids,f_defect_content:$parent.$parent.model.f_defect_content}"
254
- :field="$parent.$parent.getfield"
255
- progress="safeGetExportProgress"
256
- sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefectNew2" template-name='安检计划明细' :choose-col="true"></export-excel-safe>
257
- </div>
258
- </div>
259
- </div>
260
-
261
-
262
-
263
- </div>
264
- <div class="row" v-show="$parent.$parent.criteriaShow&&$parent.$parent.$parent.showItem">
265
- <div :class="$parent.$parent.style">
266
- <label class="font_normal_body">用户编号</label>
267
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
268
- condition="f_userinfo_code = '{}'"
269
- style="width: 60%" placeholder="用户编号">
270
- </div>
271
- <div :class="$parent.$parent.style">
272
- <label class="font_normal_body">用户表号</label>
273
- <input type="text" class="input_search" v-model="model.f_meternumber"
274
- condition="f_meternumber = '{}'"
275
- style="width: 60%" placeholder="用户表号">
276
- </div>
277
- <div :class="$parent.$parent.style">
278
- <label class="font_normal_body">结果查询</label>
279
- <v-select
280
- placeholder='处理结果查询'
281
- :value-single="true"
282
- class="select select_list" style="width: 60%"
283
- v-model='model.f_repaired'
284
- :value.sync="model.f_repaired"
285
- :options='$parent.$parent.repaired'
286
- condition="f_repaired = '{}'"
287
- close-on-select clear-button> </v-select>
288
- </div>
289
-
290
- <div :class="$parent.$parent.style2" style="margin: 0">
291
- <role-selector-safe
292
- role-name="安检员"
293
- :resobjprop.sync="$parent.$parent.resids"
294
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
295
- @re-res="$parent.$parent.getRes"
296
- :value.sync="model.f_checker_id"
297
- v-model="model.f_checker_id"
298
- condition="f_checker_name = '{}'">
299
- </role-selector-safe>
300
- </div>
301
- </div>
302
- <div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
303
- <div :class="$parent.$parent.style">
304
- <label class="font_normal_body">片&emsp;&emsp;区</label>
305
- <v-select class="select_list select"
306
- placeholder='片区/管理站' style="width: 60%"
307
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
308
- :options='$parent.$parent.sliceArea'
309
- filer-key="name"
310
- close-on-select clear-button
311
- condition="f_slice_area='{}'"
312
- @change="$parent.$parent.getmeterbook(model.f_slice_area)"
313
- :value-single="true">
314
- </v-select>
315
- </div>
316
- <div :class="$parent.$parent.style">
317
- <label class="font_normal_body">抄&ensp;表&ensp;册</label>
318
- <v-select class="select_list select"
319
- placeholder='抄表册' style="width: 60%"
320
- :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
321
- :options='$parent.$parent.cbc'
322
- filer-key="name"
323
- close-on-select clear-button
324
- condition="f_meter_book_num={}"
325
- :value-single="true">
326
- </v-select>
327
- </div>
328
- <div :class="$parent.$parent.style">
329
- <label class="font_normal_body">起始时间</label>
330
- <datepicker
331
- placeholder='起始时间' style="width:60%"
332
- :disabled-days-of-week="[]"
333
- :format="'yyyy-MM-dd'"
334
- :show-rest-button="reset"
335
- :value.sync="model.f_start_time"
336
- v-model="model.f_start_time"
337
- condition="f_offsite_time >= '{} 00:00:00'">
338
- </datepicker>
339
- </div>
340
- <div :class="$parent.$parent.style">
341
- <label class="font_normal_body">结束时间</label>
342
- <datepicker
343
- placeholder='结束时间' style="width:60%"
344
- :disabled-days-of-week="[]"
345
- :format="'yyyy-MM-dd'"
346
- :show-rest-button="reset"
347
- :value.sync="model.f_end_time"
348
- v-model="model.f_end_time"
349
- condition="f_offsite_time <= '{} 23:59:59'">
350
- </datepicker>
351
- </div>
352
- </div>
353
- <div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
354
-
355
- <div :class="$parent.$parent.style">
356
- <label class="font_normal_body">维&ensp;修&ensp;员</label>
357
- <input type="text" class="input_search" v-model="model.f_repairman"
358
- condition="f_repairman = '{}'"
359
- style="width: 60%" placeholder="维修员">
360
- </div>
361
- <div :class="$parent.$parent.style">
362
- <label class="font_normal_body">处理查询</label>
363
- <v-select
364
- placeholder='处理结果查询'
365
- :value-single="true"
366
- class="select select_list" style="width: 60%"
367
- v-model='model.f_is_deal'
368
- :value.sync="model.f_is_deal"
369
- :options='$parent.$parent.deals'
370
- condition="f_is_deal = '{}'"
371
- close-on-select clear-button> </v-select>
372
- </div>
373
- <div :class="$parent.$parent.style">
374
- <label class="font_normal_body">地&ensp;&ensp;&ensp;&ensp;址</label>
375
- <input type="text" class="input_search" v-model="model.f_address"
376
- condition="f_address like '%{}%'"
377
- style="width: 60%" placeholder="地址">
378
- </div>
379
- <div :class="$parent.$parent.style">
380
- <label class="font_normal_body">开户时间</label>
381
- <datepicker
382
- placeholder='起始时间' style="width:60%"
383
- :disabled-days-of-week="[]"
384
- :format="'yyyy-MM-dd'"
385
- :show-rest-button="reset"
386
- :value.sync="model.f_start_gastime"
387
- v-model="model.f_start_gastime"
388
- condition="f_gas_date >= '{} 00:00:00'">
389
- </datepicker>
390
- </div>
391
- <div :class="$parent.$parent.style">
392
- <label class="font_normal_body">开户时间</label>
393
- <datepicker
394
- placeholder='结束时间' style="width:60%"
395
- :disabled-days-of-week="[]"
396
- :format="'yyyy-MM-dd'"
397
- :show-rest-button="reset"
398
- :value.sync="model.f_end_gastime"
399
- v-model="model.f_end_gastime"
400
- condition="f_gas_date <= '{} 23:59:59'">
401
- </datepicker>
402
- </div>
403
- </div>
404
- </div>
405
- </criteria>
406
- <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
407
- <template partial='head'>
408
- <tr>
409
- <!-- <th><nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll" @click.stop="()=>{return}" />全选</nobr></th>-->
410
- <th><nobr>入户状态</nobr></th>
411
- <th><nobr>用户编号</nobr></th>
412
- <th><nobr>用户名</nobr></th>
413
- <th><nobr>用户表号</nobr></th>
414
- <th><nobr>用户电话</nobr></th>
415
- <th><nobr>用户小区</nobr></th>
416
- <th><nobr>用户地址</nobr></th>
417
- <th><nobr>开户时间</nobr></th>
418
- <th><nobr>安检时间</nobr></th>
419
- <th><nobr>安检员</nobr></th>
420
- <th><nobr>计划名</nobr></th>
421
- <th><nobr>是否有隐患</nobr></th>
422
- <th><nobr>隐患数</nobr></th>
423
- <th><nobr>处理数</nobr></th>
424
- <th><nobr>处理情况</nobr></th>
425
- <th><nobr>维修员</nobr></th>
426
- <th><nobr>隐患明细</nobr></th>
427
- <!-- <th><nobr>备注</nobr></th>-->
428
- </tr>
429
- </template>
430
- <template partial='body'>
431
- <!-- <td style="text-align: center;white-space:nowrap;"><input type="checkbox" @click="$event.cancelBubble=true" :checked="$parent.$parent.$parent.isChecked(row.id)" @change="$parent.$parent.$parent.setCheckes(row.id)"></input></td>-->
432
- <td style="text-align: center;white-space:nowrap;">{{row.f_entry_status}}</td>
433
- <td style="text-align: center;white-space:nowrap;">{{row.f_userinfo_code}}</td>
434
- <td style="text-align: center;white-space:nowrap;">{{row.f_user_name}}</td>
435
- <td style="text-align: center;white-space:nowrap;">{{row.f_meternumber}}</td>
436
- <td style="text-align: center;white-space:nowrap;">{{row.f_user_phone}}</td>
437
- <td style="text-align: center;white-space:nowrap;">{{row.f_residential_area}}</td>
438
- <td style="text-align: center;white-space:nowrap;">{{row.f_address}}</td>
439
- <td style="text-align: center;white-space:nowrap;">{{row.f_gas_date}}</td>
440
- <td style="text-align: center;white-space:nowrap;">{{row.f_offsite_time}}</td>
441
- <td style="text-align: center;white-space:nowrap;">{{row.f_checker_name}}</td>
442
- <td style="text-align: center;white-space:nowrap;">{{row.f_plan_name}}</td>
443
- <td style="text-align: center;white-space:nowrap;">{{row.f_has_defect}}</td>
444
- <td style="text-align: center;white-space:nowrap;">{{row.f_defect_count}}</td>
445
- <td style="text-align: center;white-space:nowrap;">{{row.f_deal_count}}</td>
446
- <td style="text-align: center;white-space:nowrap;">{{row.f_is_deal}}</td>
447
- <td style="text-align: center;white-space:nowrap;">{{row.f_repairman}}</td>
448
- <td style="text-align: center;white-space:nowrap;">{{ $parent.$parent.$parent.trouble(row.f_defect_content)}}</td>
449
- <!-- <td style="text-align: center;white-space:nowrap;">{{ row.f_deal_remark}}</td>-->
450
- </template>
451
- </data-grid>
452
- </criteria-paged>
453
- <modal :show.sync="showModal" v-ref:modal backdrop="false">
454
- <div slot="modal-header" class="modal-header">
455
- <h4 class="modal-title">
456
- 选择计划
457
- </h4>
458
- </div>
459
- <div slot="modal-body" class="modal-body">
460
- <plan-chooser :f.sync="$login.f" v-ref:chooser></plan-chooser>
461
- </div>
462
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
463
- <button class="button_search" @click="ok">确认</button>
464
- <button class="button_search" @click="cancel">取消</button>
465
- </div>
466
- </modal>
467
- <modal :show.sync="showModal2" :backdrop="false">
468
- <div slot="modal-header" class="modal-header">
469
- <h4 class="modal-title">
470
- 转维修
471
- </h4>
472
- </div>
473
- <div slot="modal-body" class="modal-body">
474
- <div v-if="true">
475
- <div class="row" style="margin-top: 10px">
476
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
477
- <div class="col-xs-8 col-md-8">
478
- <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
479
- :options='dispatchTypeOptions' placeholder='派发类型'
480
- close-on-select>
481
- </v-select>
482
- </div>
483
- </div>
484
- <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
485
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">维&ensp;修&ensp;员</label>
486
- <div class="col-xs-8 col-md-8">
487
- <v-select
488
- :value.sync="selectData.f_repairman"
489
- :value-single="true"
490
- :options='repairers'
491
- placeholder='请选择维修员'
492
- close-on-select></v-select>
493
- </div>
494
- </div>
495
- <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
496
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">站&ensp;&ensp;&ensp;&ensp;点</label>
497
- <div class="col-xs-8 col-md-8">
498
- <right-tree
499
- islist
500
- :userid="userid"
501
- :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
502
- @re-res="getSiteRes"></right-tree>
503
- </div>
504
- </div>
505
- <div class="row" style="margin-top: 10px">
506
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
507
- <div class="col-xs-8 col-md-8">
508
- <v-select :value.sync="selectData.f_repairtype" style="width:60%"
509
- class="select select_list"
510
- :value-single="true"
511
- :options='repairTypeOptions'
512
- close-on-select>
513
- </v-select>
514
- </div>
515
- </div>
516
- <div class="row" style="margin-top: 10px">
517
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
518
- <div class="col-xs-8 col-md-8">
519
- <textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
520
- </div>
521
- </div>
522
- </div>
523
- </div>
524
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
525
- <!-- <button class="button_search" @click="rectification">转维修</button>-->
526
- <button class="button_search" @click="cancel1">取消</button>
527
- </div>
528
- </modal>
529
- <modal :show.sync="showModal3">
530
- <div slot="modal-header" class="modal-header">
531
- <h4 class="modal-title">
532
- 转维修进度{{ progressbarWidth }}%
533
- </h4>
534
- </div>
535
- <div slot="modal-body" class="modal-body">
536
- <div class="progress">
537
- <div class="progress-bar" role="progressbar" aria-valuenow="60"
538
- aria-valuemin="0" aria-valuemax="100" :style="'width:'+ progressbarWidth+'%'">
539
- <!-- <span class="sr-only">40% 完成</span>-->
540
- </div>
541
- </div>
542
- </div>
543
- <div slot="modal-footer" class="modal-footer" style="text-align: center" v-show="false"></div>
544
- </modal>
545
- </div>
546
- </template>
547
- <script>
548
- import {PagedList} from 'vue-client'
549
- import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
550
- import co from 'co'
551
- import Vue from 'vue'
552
- import * as Util from '../../Util'
553
-
554
- let select = function* (self) {
555
- let http = new HttpResetClass()
556
- let getGasman = yield http.load('POST', '/rs/search', {
557
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
558
- userid: self.$login.f.id
559
- }, {resolveMsg: null, rejectMsg: null})
560
- //tag
561
- self.checkersid.push({label: '全部', value: ''})
562
- getGasman.data.forEach((checker) => {
563
- self.checkersid.push({label: checker.name, value: checker.name})
564
- })
565
- }
566
- export default {
567
- title: '隐患查询',
568
- data() {
569
- let model = new PagedList('rs/sql/GetCheckPaperByDefectNew2', 20, {
570
- f_filialeids: 'this.f_filialeids',f_defect_content: 'this.f_defect_content'
571
- })
572
- model.f_filialeids = '(' + this.$login.f.orgid + ')'
573
- model.f_defect_content="CASE WHEN CHARINDEX( '\"result\":\"正常\"', f_defect_content ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( f_defect_content, len( f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
574
- return {
575
- repaired:[{label: '全部', value: ''},{label: '未完成', value: '未完成'}, {label: '已完成', value: '已完成'}],
576
- deals:[{label: '全部', value: ''},{label: '未处理', value: '未处理'}, {label: '已处理', value: '已处理'},{label: '处理中', value: '处理中'}],
577
- hasDefectOptions: [{label: '全部', value: ''}, {label: '有隐患', value: '有隐患'}, {label: '无隐患', value: '无隐患'}],
578
- f: this.$login.f,
579
- model: model,
580
- userTags:[{label: '全部', value: ''},...this.$appdata.getParam('用户标签')],
581
- userGasType:[{label: '全部', value: ''},...this.$appdata.getParam('用气类型')],
582
- criteriaShow: false,
583
- checkAll:false,
584
- timercount:0,
585
- showModal2:false,
586
- repairTypeOptions:this.$appdata.getParam('转维修类型'),
587
- dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'}],
588
- checkes:[],
589
- showModal: false,
590
- f_check_plan: {f_plan_name: '', id: ''},
591
- sumsmodel: {},
592
- resids:{},
593
- all: false,
594
- fields: {},
595
-
596
- selectData:{
597
- dispatchType:'',
598
- f_repairman:'',
599
- f_remarks:'',
600
- f_repairtype:''
601
- },
602
- progressbarWidth:'0',
603
- modelval: [],
604
- isbusy:false,
605
- checkersid: [],
606
- showModal3:false,
607
- toRepairCount:0,
608
- sliceArea: [],
609
- callSends:[],
610
- cbc:[],
611
- repairedOptions:[{label: '全部', value: ''},{label: '已修', value: '已修'}, {label: '未修', value: '未修'}],
612
- repairers:[],
613
- cbcs:[],
614
- thead: '',
615
- headData: ['入户状态','用户编号','用户表号','用户名','用户电话','用户小区','用户地址','开户时间','安检时间','安检员','计划名','是否有隐患','隐患数','隐患明细','处理情况'],
616
- bodyData: ['f_entry_status','f_userinfo_code','f_meternumber','f_user_name','f_user_phone','f_residential_area','f_address','f_gas_date','f_offsite_time','f_checker_name','f_plan_name','f_has_defect','f_defect_count','defecttext','f_is_deal'],
617
- }
618
- },
619
- props:{
620
- style: {
621
- type: String,
622
- default: 'col-sm-2 form-group'
623
- },
624
- style2: {
625
- type: String,
626
- default: 'col-sm-4 form-group'
627
- }
628
-
629
- },
630
-
631
- methods: {
632
- trouble(val) {
633
- // return val.replaceAll("'",'')
634
- // .replaceAll("\"",'')
635
- // .replaceAll("{",'')
636
- // .replaceAll("}",'')
637
- // .replaceAll("]",'')
638
- // .replaceAll("[",'')
639
- // .replaceAll("result:",'')
640
- // .replaceAll("data:",'')
641
- // .replaceAll("有隐患",'')
642
- // .replaceAll(",",'')
643
-
644
-
645
- const defect_content = JSON.parse(val)
646
- let result = ''
647
- if (defect_content.data) {
648
- const jsonData = defect_content.data
649
- for (const itemdata of jsonData) {
650
- const keys = Object.keys(itemdata)
651
- for (const itm of keys) {
652
- const value = itemdata[itm]
653
- result += itm + ':' + value
654
- }
655
- }
656
- }
657
- return result
658
- },
659
- getEmp() {
660
- let val = {source: 'this.getParentByType($organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$)!=null ).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${this.$login.f.id}`}
661
- let http = new HttpResetClass()
662
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
663
- let str=''
664
- res.data.forEach((item,idx,arr) => {
665
- //tag
666
- if(idx+1==arr.length){
667
- str += item.id
668
- }else{
669
- str += item.id+','
670
- }
671
-
672
- })
673
- let http1 = new HttpResetClass()
674
- http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
675
- data: {
676
- items: 'id,f_user_telephone',
677
- tablename: 't_user',
678
- condition: `id in (${str})`,
679
- orderitem: 'id'
680
- }
681
- }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
682
-
683
- res.data.forEach((user)=>{
684
- try {
685
- ress.data.forEach((tel,tidx,arr)=>{
686
- //tag
687
- if(user.id==tel.id){
688
- this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
689
- ress.data.splice(tidx,1)
690
- //tag
691
- throw new Error("跳出循环");
692
- }
693
- })
694
- }catch (e) {
695
- //tag
696
- }
697
- })
698
- })
699
-
700
- })
701
- },
702
- toRepair(){
703
- //tag
704
- this.showModal2=true
705
- },
706
- async rectification(){
707
- this.isbusy =true
708
- // if (this.checkAll){
709
- let data={
710
- f_filialeids: this.model.params.f_filialeids,
711
- f_defect_content: this.model.params.f_defect_content,
712
- condition:this.model.params.condition
713
- }
714
- let res1= await new HttpResetClass().load('post','rs/sql/GetCheckPaperByDefectNew2',{data: data })
715
- for (let i = 0; i < res1.data.length; i++) {
716
- let data1={
717
- f_paper_id: res1.data[i].id,
718
- condition:`f_repaire_type != '无隐患'`
719
- }
720
- let res2 = await new HttpResetClass().load('POST' , 'rs/sql/GetDefectByPaperIdNew2' , {data: data1 } )
721
- //tag
722
- const uploadData = {
723
- model: {
724
- serviceacitivity: [{
725
- f_service_acitivity_type: '派单'
726
- }],
727
- f_repairitems: {},
728
- failure: '',
729
- f_source: '安检',
730
- f_service_id: '',
731
- f_contact_phone: '',
732
- f_meetunit: '',
733
- f_phone: '',
734
- f_user_name: '',
735
- f_address: '',
736
- f_repair_date: '',
737
- f_reciever: '',
738
- f_remarks: '',
739
- f_user_type: '',
740
- f_area: '',
741
- f_unit_name: '',
742
- f_street: '',
743
- f_residential_area: '',
744
- f_building: '',
745
- f_unit: '',
746
- f_floor: '',
747
- f_room: '',
748
- aState: '',
749
- f_repairtype: '',
750
- f_userinfo_id: '',
751
- f_userinfo_code: '',
752
- f_orgstr: '',
753
- f_outlets: '',
754
- f_attendant: this.$login.f.name
755
- },
756
- loginUser: {
757
- name: this.$login.f.name,
758
- ename: this.$login.f.ename
759
- },
760
- user: {
761
- f_userinfo_id: ''
762
- },
763
- callObj: null
764
- }
765
-
766
- uploadData.model.serviceacitivity[0].f_reciever = this.selectData.f_repairman
767
- // uploadData.model.f_meetunit = self.$login.f.orgpathnames
768
- // uploadData.model.f_orgstr = self.$login.f.orgpathstr
769
- // uploadData.model.f_outlets = self.$login.f.f_parentname
770
- uploadData.model.f_meetunit = this.$login.f.deps
771
- uploadData.model.f_orgid = this.$login.f.orgid
772
- uploadData.model.f_filiale = this.$login.f.org
773
- uploadData.model.f_outlets = this.$login.f.deps
774
- uploadData.model.f_filiale_id = this.$login.f.orgid
775
- uploadData.toRepair = '一级派单'
776
- let res3 = await new HttpResetClass().load('post','/rs/sql/GetUserForRepaireNew2', {data: {f_userinfo_id: res1.data[i].f_userinfo_id}})
777
- uploadData.model = Object.assign(uploadData.model, res3.data[0])
778
- uploadData.user.f_userinfo_id = res3.data[0].f_userinfo_id
779
- uploadData.model.f_repair_date = Util.getNowDate()
780
- uploadData.model.f_repairtype = res3.data[0].f_repairtype
781
- uploadData.model.f_remarks = res3.data[0].f_remarks
782
- let failure = []
783
- res2.data.forEach(row => {
784
- if (row.f_repaire_type == '隐患未处理') {
785
- console.log('row.f_item_value',row.f_item_value)
786
- failure.push({
787
- f_failure_type: row.f_item_name,
788
- failurecase: row.f_item_value?row.f_item_value.split(','):''
789
- })
790
- }
791
- })
792
- uploadData.model.failure = failure
793
- // 拼接repairitems
794
- let rows = JSON.parse(JSON.stringify(res2.data))
795
- let repairitems = {
796
- data: []
797
- }
798
- let safecheckOptions = [{"data": "已处理"}, {"data": "未处理"}]
799
- // 取隐患未处理的
800
- rows = rows.filter(row => row.f_repaire_type == '隐患未处理')
801
- //tag)
802
- // 开始拼接
803
- rows.forEach(row => {
804
- let existIndex = -1
805
- // 判断该设备是否已经存在
806
- for (let i = 0; i < repairitems.data.length; i++) {
807
- if (repairitems.data[i].f_type == row.f_device_type) {
808
- existIndex = i
809
- break
810
- }
811
- }
812
- if (existIndex == -1) {
813
- // 不存在则新建
814
- let newItem = {
815
- f_type: row.f_device_type,
816
- details: [{
817
- f_defect_id: row.id,
818
- f_project: `${row.f_item_name}:${row.f_item_value}`,
819
- type: 'selector',
820
- options: safecheckOptions
821
- }]
822
- }
823
- repairitems.data.push(newItem)
824
- } else {
825
- // 存在则追加
826
- repairitems.data[existIndex].details.push({
827
- f_defect_id: row.id,
828
- f_project: `${row.f_item_name}:${row.f_item_value}`,
829
- type: 'selector',
830
- options: safecheckOptions
831
- })
832
- }
833
- })
834
- uploadData.model.f_repairitems = repairitems
835
- uploadData.rows=rows
836
- //tag)
837
- //tag
838
- if (uploadData.model.f_repairitems.data.length>0){
839
- this.callSends.push(uploadData)
840
- }else{
841
- //tag
842
- }
843
- }
844
- //tag)
845
- let timer = setInterval(async ()=>{
846
- this.showModal3=true
847
- this.isbusy=false
848
- if (this.timercount<this.callSends.length){
849
- //tag)
850
- let rows=this.callSends[this.timercount].rows
851
- //tag)
852
- let result = await this.$resetpost('/rs/logic/callerSend', this.callSends[this.timercount])
853
- //tag)
854
- if (result.data.f_service_id) {
855
- const data = {
856
- f_paper_id: rows[0].f_paper_id,
857
- f_service_id: result.data.f_service_id,
858
- itemsId: this.$login.convertToIn(rows.map(row => row.id))
859
- }
860
- //tag
861
- let updateRes = await this.$resetpost('/rs/logic/updateDefectStateNew', data)
862
- }
863
- this.toRepairCount++
864
- //tag
865
- this.timercount++
866
- }else{
867
- clearInterval(timer)
868
- //tag
869
- this.callSends=[]
870
- this.timercount=0
871
- this.showModal3=false
872
- this.cancel1()
873
- this.$showMessage('本次转维修成功'+this.toRepairCount+'单')
874
- this.toRepairCount=0
875
- }
876
- }, 3000)
877
- },
878
- cancel1(){
879
- this.showModal2=false
880
- this.selectData={
881
- dispatchType:'',
882
- f_repairman:'',
883
- f_remarks:'',
884
- f_repairtype:''
885
- }
886
- },
887
- sleep(d){
888
- //tag)
889
- var t = Date.now()
890
- while(Date.now - t <= d){
891
-
892
- }
893
- //tag)
894
- },
895
- isChecked(v) {
896
- // 如果全选,不在的按选中算,否则,在的按选中算
897
- if (this.checkAll) {
898
- return this.checkes.indexOf(v) == -1
899
- } else {
900
- return this.checkes.indexOf(v) != -1
901
- }
902
- },
903
- setCheckAll() {
904
- this.checkAll=this.checkAll?false:true;
905
- // 全选改变后,清空选中数据
906
- this.checkes = []
907
- },
908
- setCheckes(id) {
909
- let index=this.checkes.indexOf(id)
910
- if(index<0){
911
- this.checkes.push(id)
912
- }else{
913
- this.checkes.splice(index,1)
914
- }
915
- },
916
-
917
- getmeterbook(val){
918
- this.cbc=[]
919
- this.cbc.push({
920
- label:'全部',
921
- value:''
922
- })
923
- if (val==''){
924
-
925
- this.cbcs.forEach(res=>{
926
- this.cbc.push({
927
- label:res.f_book_name,
928
- value:res.id
929
- })
930
- })
931
- }else{
932
- this.cbcs.forEach(res=>{
933
- if (res.f_book_slice_area==val){
934
- this.cbc.push({
935
- label:res.f_book_name,
936
- value:res.id
937
- })
938
- }
939
- })
940
- }
941
- },
942
-
943
- Mreadibook(val){
944
- //tag
945
- //tag
946
- this.sliceArea=[]
947
- if (val){
948
- new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
949
- items: 'name',
950
- tablename: 't_zone',
951
- condition: `parentid in ${val}`,
952
- orderitem: 'id'
953
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
954
- this.sliceArea.push({
955
- label:'全部',
956
- value:''
957
- })
958
- res.data.forEach(ress=>{
959
- this.sliceArea.push({
960
- label:ress.name,
961
- value:ress.name
962
- })
963
- })
964
-
965
- })
966
- }
967
- },
968
- getAllMeterBook(val){
969
- //tag
970
- //tag
971
- this.cbcs=[]
972
- if (val){
973
- new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
974
- items: 'f_book_name,f_book_slice_area,id',
975
- tablename: 't_meter_book',
976
- condition: `f_filiale_id in ${val}`,
977
- orderitem: 'id'
978
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
979
- res.data.forEach(ress=>{
980
- this.cbcs.push({
981
- id:ress.id,
982
- f_book_name:ress.f_book_name,
983
- f_book_slice_area:ress.f_book_slice_area
984
- })
985
- })
986
- this.cbc=[]
987
- this.cbc.push({
988
- label:'全部',
989
- value:''
990
- })
991
- this.cbcs.forEach(res=>{
992
- this.cbc.push({
993
- label:res.f_book_name,
994
- value:res.id
995
- })
996
- })
997
- })
998
- }
999
- },
1000
- hiddenr() {
1001
- this.$parent.showItem = !this.$parent.showItem
1002
- },
1003
- hidden() {
1004
- this.criteriaShow = !this.criteriaShow
1005
- },
1006
- search(args) {
1007
- //tag
1008
- if (this.f_check_plan.f_plan_name) {
1009
- args.condition += ` and f_check_plan_id = '${this.f_check_plan.id}'`
1010
- }
1011
- this.checkes = []
1012
- this.checkAll=false
1013
- this.model.search(args.condition, args.model)
1014
- },
1015
- getRes(obj) {
1016
- //tag
1017
- this.resids = {res:obj.res[0], resids:obj.resids[0]}
1018
- this.model.f_filialeids = this.$login.convertToIn(obj.resids);
1019
- this.Mreadibook(this.model.f_filialeids)
1020
- this.getAllMeterBook(this.model.f_filialeids)
1021
- },
1022
- showChooser() {
1023
- this.showModal = true
1024
- },
1025
- ok() {
1026
- this.showModal = false
1027
- if (this.$refs.modal.$children[0].selectedRow.id) {
1028
- this.f_check_plan = this.$refs.modal.$children[0].selectedRow
1029
- }
1030
- },
1031
- cancel() {
1032
- this.showModal = false
1033
- this.f_check_plan = {f_plan_name: '', id: ''}
1034
- }
1035
- },
1036
- ready() {
1037
- //tag
1038
-
1039
- this.$refs.paged.$refs.criteria.model.f_has_defect = '有隐患'
1040
- this.getEmp()
1041
- let gen = select(this)
1042
- // this.Mreadibook(`('${this.$login.f.orgid}')`)
1043
- co(gen)
1044
- },
1045
- watch:{
1046
- 'timercount'(){
1047
- if (this.timercount===0){
1048
- this.progressbarWidth = '0'
1049
- }else {
1050
- //tag
1051
- //tag
1052
- this.progressbarWidth=parseInt(this.timercount*100/(this.callSends.length+1))
1053
- }
1054
-
1055
- }
1056
- },
1057
- computed: {
1058
- selected() {
1059
- return this.$refs.paged.$refs.grid.selected
1060
- },
1061
- getfield () {
1062
- //tag
1063
- let data = {}
1064
- this.bodyData.forEach((value, index) => {
1065
- data[this.bodyData[index]] = this.headData[index]
1066
- })
1067
- //合计字段打印
1068
- this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
1069
- if (this.sumsmodel) {
1070
- Object.keys(this.sumsmodel).forEach((key) => {
1071
- this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
1072
- })
1073
- } else {
1074
- this.tfoot += '暂无'
1075
- }
1076
- this.tfoot += '</th></tr>'
1077
- return data
1078
- }
1079
- }
1080
- }
1081
- </script>
1
+ <template>
2
+ <div class="flex">
3
+ <work-busy :is-busy="isbusy"></work-busy>
4
+ <criteria-paged :model="model" v-ref:paged>
5
+ <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row" v-show="!$parent.$parent.$parent.showItem">
8
+ <div :class="$parent.$parent.style">
9
+ <label class="font_normal_body">安检计划</label>
10
+ <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
11
+ @click="$parent.$parent.showChooser"
12
+ style="width: 60%" placeholder="安检计划" readonly="readonly">
13
+ </div>
14
+ <div :class="$parent.$parent.style">
15
+ <label class="font_normal_body">存在隐患</label>
16
+ <v-select style="width:60% "
17
+ class="select select_list"
18
+ :value.sync="model.f_has_defect"
19
+ v-model="model.f_has_defect"
20
+ :options='$parent.$parent.hasDefectOptions'
21
+ :placeholder='model.f_has_defect'
22
+ condition="f_has_defect = '{}'"
23
+ close-on-select>
24
+ </v-select>
25
+ </div>
26
+ <div :class="$parent.$parent.style">
27
+ <label class="font_normal_body">用户编号</label>
28
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
29
+ condition="f_userinfo_code = '{}'"
30
+ style="width: 60%" placeholder="用户编号">
31
+ </div>
32
+ <div :class="$parent.$parent.style">
33
+ <label class="font_normal_body">用户表号</label>
34
+ <input type="text" class="input_search" v-model="model.f_meternumber"
35
+ condition="f_meternumber = '{}'"
36
+ style="width: 60%" placeholder="用户表号">
37
+ </div>
38
+ <div :class="$parent.$parent.style">
39
+ <label class="font_normal_body">结果查询</label>
40
+ <v-select
41
+ placeholder='维修结果查询'
42
+ :value-single="true"
43
+ class="select select_list" style="width: 60%"
44
+ v-model='model.f_is_repair'
45
+ :value.sync="model.f_is_repair"
46
+ :options='$parent.$parent.repaired'
47
+ condition="f_is_repair = '{}'"
48
+ close-on-select clear-button> </v-select>
49
+ </div>
50
+ <div class=" col-sm-4 form-group button-range" >
51
+ <div class="span" style="float: right;margin-top: 8px">
52
+ <div style="float: right" class="button_spacing"
53
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
54
+ @click="$parent.$parent.hiddenr()"></div>
55
+ <div style="float: right" class="button_spacing"
56
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
57
+ @click="$parent.$parent.hidden()"></div>
58
+ <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
59
+ <!-- <button style="float: right" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>-->
60
+ <div style="float: right">
61
+ <export-excel-safe :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids,f_defect_content:$parent.$parent.model.f_defect_content}"
62
+ :field="$parent.$parent.getfield"
63
+ progress="safeGetExportProgress"
64
+ sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefectNew2" template-name='安检隐患明细' :choose-col="true"></export-excel-safe>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ <div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
70
+ <div :class="$parent.$parent.style">
71
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
72
+ <v-select class="select_list select"
73
+ placeholder='片区/管理站' style="width: 60%"
74
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
75
+ :options='$parent.$parent.sliceArea'
76
+ filer-key="name"
77
+ close-on-select clear-button
78
+ condition="f_slice_area='{}'"
79
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
80
+ :value-single="true">
81
+ </v-select>
82
+ </div>
83
+ <div :class="$parent.$parent.style2" style="margin: 0">
84
+ <role-selector-safe
85
+ role-name="安检员"
86
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
87
+ :resobjprop.sync="$parent.$parent.resids"
88
+ @re-res="$parent.$parent.getRes"
89
+ :value.sync="model.f_checker_id"
90
+ v-model="model.f_checker_id"
91
+ condition="f_checker_name = '{}'">
92
+ </role-selector-safe>
93
+ </div>
94
+
95
+ <div :class="$parent.$parent.style">
96
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
97
+ <v-select class="select_list select"
98
+ placeholder='抄表册' style="width: 60%"
99
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
100
+ :options='$parent.$parent.cbc'
101
+ filer-key="name"
102
+ close-on-select clear-button
103
+ condition="f_meter_book_num={}"
104
+ :value-single="true">
105
+ </v-select>
106
+ </div>
107
+ <div :class="$parent.$parent.style">
108
+ <label class="font_normal_body">起始时间</label>
109
+ <datepicker
110
+ placeholder='起始时间' style="width:60%"
111
+ :disabled-days-of-week="[]"
112
+ :format="'yyyy-MM-dd'"
113
+ :show-rest-button="reset"
114
+ :value.sync="model.f_start_time"
115
+ v-model="model.f_start_time"
116
+ condition="f_offsite_time >= '{} 00:00:00'">
117
+ </datepicker>
118
+ </div>
119
+ <div :class="$parent.$parent.style">
120
+ <label class="font_normal_body">结束时间</label>
121
+ <datepicker
122
+ placeholder='结束时间' style="width:60%"
123
+ :disabled-days-of-week="[]"
124
+ :format="'yyyy-MM-dd'"
125
+ :show-rest-button="reset"
126
+ :value.sync="model.f_end_time"
127
+ v-model="model.f_end_time"
128
+ condition="f_offsite_time <= '{} 23:59:59'">
129
+ </datepicker>
130
+ </div>
131
+ </div>
132
+ <div class="row" v-show="$parent.$parent.criteriaShow&&!$parent.$parent.$parent.showItem">
133
+
134
+ <div :class="$parent.$parent.style">
135
+ <label class="font_normal_body">维&ensp;修&ensp;员</label>
136
+ <input type="text" class="input_search" v-model="model.f_repairman"
137
+ condition="f_repairman = '{}'"
138
+ style="width: 60%" placeholder="维修员">
139
+ </div>
140
+ <div :class="$parent.$parent.style">
141
+ <label class="font_normal_body">处理查询</label>
142
+ <v-select
143
+ placeholder='处理结果查询'
144
+ :value-single="true"
145
+ class="select select_list" style="width: 60%"
146
+ v-model='model.f_is_deal'
147
+ :value.sync="model.f_is_deal"
148
+ :options='$parent.$parent.deals'
149
+ condition="f_is_deal = '{}'"
150
+ close-on-select clear-button> </v-select>
151
+ </div>
152
+ <div :class="$parent.$parent.style">
153
+ <label class="font_normal_body">是否维修</label>
154
+ <v-select
155
+ placeholder='是否维修'
156
+ :value-single="true"
157
+ class="select select_list" style="width: 60%"
158
+ v-model='model.f_repaired'
159
+ :value.sync="model.f_repaired"
160
+ :options='$parent.$parent.repairedOptions'
161
+ condition="f_repaired = '{}'"
162
+ close-on-select clear-button> </v-select>
163
+ </div>
164
+ <div :class="$parent.$parent.style">
165
+ <label class="font_normal_body">地&ensp;&ensp;&ensp;&ensp;址</label>
166
+ <input type="text" class="input_search" v-model="model.f_address"
167
+ condition="f_address like '%{}%'"
168
+ style="width: 60%" placeholder="地址">
169
+ </div>
170
+ <div :class="$parent.$parent.style">
171
+ <label class="font_normal_body">开户时间</label>
172
+ <datepicker
173
+ placeholder='起始时间' style="width:60%"
174
+ :disabled-days-of-week="[]"
175
+ :format="'yyyy-MM-dd'"
176
+ :show-rest-button="reset"
177
+ :value.sync="model.f_start_gastime"
178
+ v-model="model.f_start_gastime"
179
+ condition="f_gas_date >= '{} 00:00:00'">
180
+ </datepicker>
181
+ </div>
182
+ <div :class="$parent.$parent.style">
183
+ <label class="font_normal_body">开户时间</label>
184
+ <datepicker
185
+ placeholder='结束时间' style="width:60%"
186
+ :disabled-days-of-week="[]"
187
+ :format="'yyyy-MM-dd'"
188
+ :show-rest-button="reset"
189
+ :value.sync="model.f_end_gastime"
190
+ v-model="model.f_end_gastime"
191
+ condition="f_gas_date <= '{} 23:59:59'">
192
+ </datepicker>
193
+ </div>
194
+ <div :class="$parent.$parent.style">
195
+ <label class="font_normal_body">用户标签</label>
196
+ <v-select class="select_list select"
197
+ placeholder='请选择' style="width: 60%"
198
+ :value.sync="model.f_user_tags"
199
+ v-model="model.f_user_tags"
200
+ :options='$parent.$parent.userTags'
201
+ filer-key="name"
202
+ :multiple="true"
203
+ condition="f_user_tags in {}"
204
+ >
205
+ </v-select>
206
+ </div>
207
+ <div :class="$parent.$parent.style">
208
+ <label class="font_normal_body">用气类型</label>
209
+ <v-select class="select_list select"
210
+ placeholder='请选择' style="width: 60%"
211
+ :value.sync="model.f_user_gas_type"
212
+ v-model="model.f_user_gas_type"
213
+ :options='$parent.$parent.userGasType'
214
+ filer-key="name"
215
+ :multiple="true"
216
+ condition="f_user_gas_type in {}"
217
+ >
218
+ </v-select>
219
+ </div>
220
+ </div>
221
+
222
+ <div class="row" v-show="$parent.$parent.$parent.showItem">
223
+ <div :class="$parent.$parent.style">
224
+ <label class="font_normal_body">安检计划</label>
225
+ <input type="text" class="input_search" v-model="$parent.$parent.f_check_plan.f_plan_name"
226
+ @click="$parent.$parent.showChooser"
227
+ style="width: 60%" placeholder="安检计划" readonly="readonly">
228
+ </div>
229
+ <div :class="$parent.$parent.style">
230
+ <label class="font_normal_body">存在隐患</label>
231
+ <v-select style="width:60% "
232
+ class="select select_list"
233
+ :value.sync="model.f_has_defect"
234
+ v-model="model.f_has_defect"
235
+ :options='$parent.$parent.hasDefectOptions'
236
+ :placeholder='model.f_has_defect'
237
+ condition="f_has_defect = '{}'"
238
+ close-on-select>
239
+ </v-select>
240
+ </div>
241
+
242
+ <div class=" col-sm-4 form-group button-range">
243
+ <div class="span" style="float: right;margin-top: 8px;margin-right: 50px">
244
+ <div style="float: right" class="button_spacing"
245
+ :class="{'button_shrink_left':$parent.$parent.$parent.showItem,'button_shrink_right':!$parent.$parent.$parent.showItem}"
246
+ @click="$parent.$parent.hiddenr()"></div>
247
+ <div style="float: right" class="button_spacing"
248
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
249
+ @click="$parent.$parent.hidden()"></div>
250
+ <button style="float: right" class="button_search button_spacing" @click="search">查询</button>
251
+ <!-- <button style="float: right" class="button_search button_spacing" @click="$parent.$parent.toRepair">转维修</button>-->
252
+ <div style="float: right">
253
+ <export-excel-safe :data="{condition: $parent.$parent.model.condition,f_filialeids:$parent.$parent.model.f_filialeids,f_defect_content:$parent.$parent.model.f_defect_content}"
254
+ :field="$parent.$parent.getfield"
255
+ progress="safeGetExportProgress"
256
+ sqlurl="rs/logic/SafeExportExcel" sql-name="GetCheckPaperByDefectNew2" template-name='安检计划明细' :choose-col="true"></export-excel-safe>
257
+ </div>
258
+ </div>
259
+ </div>
260
+
261
+
262
+
263
+ </div>
264
+ <div class="row" v-show="$parent.$parent.criteriaShow&&$parent.$parent.$parent.showItem">
265
+ <div :class="$parent.$parent.style">
266
+ <label class="font_normal_body">用户编号</label>
267
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
268
+ condition="f_userinfo_code = '{}'"
269
+ style="width: 60%" placeholder="用户编号">
270
+ </div>
271
+ <div :class="$parent.$parent.style">
272
+ <label class="font_normal_body">用户表号</label>
273
+ <input type="text" class="input_search" v-model="model.f_meternumber"
274
+ condition="f_meternumber = '{}'"
275
+ style="width: 60%" placeholder="用户表号">
276
+ </div>
277
+ <div :class="$parent.$parent.style">
278
+ <label class="font_normal_body">结果查询</label>
279
+ <v-select
280
+ placeholder='处理结果查询'
281
+ :value-single="true"
282
+ class="select select_list" style="width: 60%"
283
+ v-model='model.f_repaired'
284
+ :value.sync="model.f_repaired"
285
+ :options='$parent.$parent.repaired'
286
+ condition="f_repaired = '{}'"
287
+ close-on-select clear-button> </v-select>
288
+ </div>
289
+
290
+ <div :class="$parent.$parent.style2" style="margin: 0">
291
+ <role-selector-safe
292
+ role-name="安检员"
293
+ :resobjprop.sync="$parent.$parent.resids"
294
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
295
+ @re-res="$parent.$parent.getRes"
296
+ :value.sync="model.f_checker_id"
297
+ v-model="model.f_checker_id"
298
+ condition="f_checker_name = '{}'">
299
+ </role-selector-safe>
300
+ </div>
301
+ </div>
302
+ <div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
303
+ <div :class="$parent.$parent.style">
304
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
305
+ <v-select class="select_list select"
306
+ placeholder='片区/管理站' style="width: 60%"
307
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
308
+ :options='$parent.$parent.sliceArea'
309
+ filer-key="name"
310
+ close-on-select clear-button
311
+ condition="f_slice_area='{}'"
312
+ @change="$parent.$parent.getmeterbook(model.f_slice_area)"
313
+ :value-single="true">
314
+ </v-select>
315
+ </div>
316
+ <div :class="$parent.$parent.style">
317
+ <label class="font_normal_body">抄&ensp;表&ensp;册</label>
318
+ <v-select class="select_list select"
319
+ placeholder='抄表册' style="width: 60%"
320
+ :value.sync="model.f_meter_book_num" v-model="model.f_meter_book_num"
321
+ :options='$parent.$parent.cbc'
322
+ filer-key="name"
323
+ close-on-select clear-button
324
+ condition="f_meter_book_num={}"
325
+ :value-single="true">
326
+ </v-select>
327
+ </div>
328
+ <div :class="$parent.$parent.style">
329
+ <label class="font_normal_body">起始时间</label>
330
+ <datepicker
331
+ placeholder='起始时间' style="width:60%"
332
+ :disabled-days-of-week="[]"
333
+ :format="'yyyy-MM-dd'"
334
+ :show-rest-button="reset"
335
+ :value.sync="model.f_start_time"
336
+ v-model="model.f_start_time"
337
+ condition="f_offsite_time >= '{} 00:00:00'">
338
+ </datepicker>
339
+ </div>
340
+ <div :class="$parent.$parent.style">
341
+ <label class="font_normal_body">结束时间</label>
342
+ <datepicker
343
+ placeholder='结束时间' style="width:60%"
344
+ :disabled-days-of-week="[]"
345
+ :format="'yyyy-MM-dd'"
346
+ :show-rest-button="reset"
347
+ :value.sync="model.f_end_time"
348
+ v-model="model.f_end_time"
349
+ condition="f_offsite_time <= '{} 23:59:59'">
350
+ </datepicker>
351
+ </div>
352
+ </div>
353
+ <div class="row" v-show="$parent.$parent.criteriaShow && $parent.$parent.$parent.showItem">
354
+
355
+ <div :class="$parent.$parent.style">
356
+ <label class="font_normal_body">维&ensp;修&ensp;员</label>
357
+ <input type="text" class="input_search" v-model="model.f_repairman"
358
+ condition="f_repairman = '{}'"
359
+ style="width: 60%" placeholder="维修员">
360
+ </div>
361
+ <div :class="$parent.$parent.style">
362
+ <label class="font_normal_body">处理查询</label>
363
+ <v-select
364
+ placeholder='处理结果查询'
365
+ :value-single="true"
366
+ class="select select_list" style="width: 60%"
367
+ v-model='model.f_is_deal'
368
+ :value.sync="model.f_is_deal"
369
+ :options='$parent.$parent.deals'
370
+ condition="f_is_deal = '{}'"
371
+ close-on-select clear-button> </v-select>
372
+ </div>
373
+ <div :class="$parent.$parent.style">
374
+ <label class="font_normal_body">地&ensp;&ensp;&ensp;&ensp;址</label>
375
+ <input type="text" class="input_search" v-model="model.f_address"
376
+ condition="f_address like '%{}%'"
377
+ style="width: 60%" placeholder="地址">
378
+ </div>
379
+ <div :class="$parent.$parent.style">
380
+ <label class="font_normal_body">开户时间</label>
381
+ <datepicker
382
+ placeholder='起始时间' style="width:60%"
383
+ :disabled-days-of-week="[]"
384
+ :format="'yyyy-MM-dd'"
385
+ :show-rest-button="reset"
386
+ :value.sync="model.f_start_gastime"
387
+ v-model="model.f_start_gastime"
388
+ condition="f_gas_date >= '{} 00:00:00'">
389
+ </datepicker>
390
+ </div>
391
+ <div :class="$parent.$parent.style">
392
+ <label class="font_normal_body">开户时间</label>
393
+ <datepicker
394
+ placeholder='结束时间' style="width:60%"
395
+ :disabled-days-of-week="[]"
396
+ :format="'yyyy-MM-dd'"
397
+ :show-rest-button="reset"
398
+ :value.sync="model.f_end_gastime"
399
+ v-model="model.f_end_gastime"
400
+ condition="f_gas_date <= '{} 23:59:59'">
401
+ </datepicker>
402
+ </div>
403
+ </div>
404
+ </div>
405
+ </criteria>
406
+ <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
407
+ <template partial='head'>
408
+ <tr>
409
+ <!-- <th><nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll" @click.stop="()=>{return}" />全选</nobr></th>-->
410
+ <th><nobr>入户状态</nobr></th>
411
+ <th><nobr>用户编号</nobr></th>
412
+ <th><nobr>用户名</nobr></th>
413
+ <th><nobr>用户表号</nobr></th>
414
+ <th><nobr>用户电话</nobr></th>
415
+ <th><nobr>用户小区</nobr></th>
416
+ <th><nobr>用户地址</nobr></th>
417
+ <th><nobr>开户时间</nobr></th>
418
+ <th><nobr>安检时间</nobr></th>
419
+ <th><nobr>安检员</nobr></th>
420
+ <th><nobr>计划名</nobr></th>
421
+ <th><nobr>是否有隐患</nobr></th>
422
+ <th><nobr>隐患数</nobr></th>
423
+ <th><nobr>处理数</nobr></th>
424
+ <th><nobr>处理情况</nobr></th>
425
+ <th><nobr>维修员</nobr></th>
426
+ <th><nobr>隐患明细</nobr></th>
427
+ <!-- <th><nobr>备注</nobr></th>-->
428
+ </tr>
429
+ </template>
430
+ <template partial='body'>
431
+ <!-- <td style="text-align: center;white-space:nowrap;"><input type="checkbox" @click="$event.cancelBubble=true" :checked="$parent.$parent.$parent.isChecked(row.id)" @change="$parent.$parent.$parent.setCheckes(row.id)"></input></td>-->
432
+ <td style="text-align: center;white-space:nowrap;">{{row.f_entry_status}}</td>
433
+ <td style="text-align: center;white-space:nowrap;">{{row.f_userinfo_code}}</td>
434
+ <td style="text-align: center;white-space:nowrap;">{{row.f_user_name}}</td>
435
+ <td style="text-align: center;white-space:nowrap;">{{row.f_meternumber}}</td>
436
+ <td style="text-align: center;white-space:nowrap;">{{row.f_user_phone}}</td>
437
+ <td style="text-align: center;white-space:nowrap;">{{row.f_residential_area}}</td>
438
+ <td style="text-align: center;white-space:nowrap;">{{row.f_address}}</td>
439
+ <td style="text-align: center;white-space:nowrap;">{{row.f_gas_date}}</td>
440
+ <td style="text-align: center;white-space:nowrap;">{{row.f_offsite_time}}</td>
441
+ <td style="text-align: center;white-space:nowrap;">{{row.f_checker_name}}</td>
442
+ <td style="text-align: center;white-space:nowrap;">{{row.f_plan_name}}</td>
443
+ <td style="text-align: center;white-space:nowrap;">{{row.f_has_defect}}</td>
444
+ <td style="text-align: center;white-space:nowrap;">{{row.f_defect_count}}</td>
445
+ <td style="text-align: center;white-space:nowrap;">{{row.f_deal_count}}</td>
446
+ <td style="text-align: center;white-space:nowrap;">{{row.f_is_deal}}</td>
447
+ <td style="text-align: center;white-space:nowrap;">{{row.f_repairman}}</td>
448
+ <td style="text-align: center;white-space:nowrap;">{{ $parent.$parent.$parent.trouble(row.f_defect_content)}}</td>
449
+ <!-- <td style="text-align: center;white-space:nowrap;">{{ row.f_deal_remark}}</td>-->
450
+ </template>
451
+ </data-grid>
452
+ </criteria-paged>
453
+ <modal :show.sync="showModal" v-ref:modal backdrop="false">
454
+ <div slot="modal-header" class="modal-header">
455
+ <h4 class="modal-title">
456
+ 选择计划
457
+ </h4>
458
+ </div>
459
+ <div slot="modal-body" class="modal-body">
460
+ <plan-chooser :f.sync="$login.f" v-ref:chooser></plan-chooser>
461
+ </div>
462
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
463
+ <button class="button_search" @click="ok">确认</button>
464
+ <button class="button_search" @click="cancel">取消</button>
465
+ </div>
466
+ </modal>
467
+ <modal :show.sync="showModal2" :backdrop="false">
468
+ <div slot="modal-header" class="modal-header">
469
+ <h4 class="modal-title">
470
+ 转维修
471
+ </h4>
472
+ </div>
473
+ <div slot="modal-body" class="modal-body">
474
+ <div v-if="true">
475
+ <div class="row" style="margin-top: 10px">
476
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
477
+ <div class="col-xs-8 col-md-8">
478
+ <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
479
+ :options='dispatchTypeOptions' placeholder='派发类型'
480
+ close-on-select>
481
+ </v-select>
482
+ </div>
483
+ </div>
484
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
485
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">维&ensp;修&ensp;员</label>
486
+ <div class="col-xs-8 col-md-8">
487
+ <v-select
488
+ :value.sync="selectData.f_repairman"
489
+ :value-single="true"
490
+ :options='repairers'
491
+ placeholder='请选择维修员'
492
+ close-on-select></v-select>
493
+ </div>
494
+ </div>
495
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
496
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">站&ensp;&ensp;&ensp;&ensp;点</label>
497
+ <div class="col-xs-8 col-md-8">
498
+ <right-tree
499
+ islist
500
+ :userid="userid"
501
+ :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
502
+ @re-res="getSiteRes"></right-tree>
503
+ </div>
504
+ </div>
505
+ <div class="row" style="margin-top: 10px">
506
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
507
+ <div class="col-xs-8 col-md-8">
508
+ <v-select :value.sync="selectData.f_repairtype" style="width:60%"
509
+ class="select select_list"
510
+ :value-single="true"
511
+ :options='repairTypeOptions'
512
+ close-on-select>
513
+ </v-select>
514
+ </div>
515
+ </div>
516
+ <div class="row" style="margin-top: 10px">
517
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
518
+ <div class="col-xs-8 col-md-8">
519
+ <textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
520
+ </div>
521
+ </div>
522
+ </div>
523
+ </div>
524
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
525
+ <!-- <button class="button_search" @click="rectification">转维修</button>-->
526
+ <button class="button_search" @click="cancel1">取消</button>
527
+ </div>
528
+ </modal>
529
+ <modal :show.sync="showModal3">
530
+ <div slot="modal-header" class="modal-header">
531
+ <h4 class="modal-title">
532
+ 转维修进度{{ progressbarWidth }}%
533
+ </h4>
534
+ </div>
535
+ <div slot="modal-body" class="modal-body">
536
+ <div class="progress">
537
+ <div class="progress-bar" role="progressbar" aria-valuenow="60"
538
+ aria-valuemin="0" aria-valuemax="100" :style="'width:'+ progressbarWidth+'%'">
539
+ <!-- <span class="sr-only">40% 完成</span>-->
540
+ </div>
541
+ </div>
542
+ </div>
543
+ <div slot="modal-footer" class="modal-footer" style="text-align: center" v-show="false"></div>
544
+ </modal>
545
+ </div>
546
+ </template>
547
+ <script>
548
+ import {PagedList} from 'vue-client'
549
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
550
+ import co from 'co'
551
+ import Vue from 'vue'
552
+ import * as Util from '../../Util'
553
+
554
+ let select = function* (self) {
555
+ let http = new HttpResetClass()
556
+ let getGasman = yield http.load('POST', '/rs/search', {
557
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
558
+ userid: self.$login.f.id
559
+ }, {resolveMsg: null, rejectMsg: null})
560
+ //tag
561
+ self.checkersid.push({label: '全部', value: ''})
562
+ getGasman.data.forEach((checker) => {
563
+ self.checkersid.push({label: checker.name, value: checker.name})
564
+ })
565
+ }
566
+ export default {
567
+ title: '隐患查询',
568
+ data() {
569
+ let model = new PagedList('rs/sql/GetCheckPaperByDefectNew2', 20, {
570
+ f_filialeids: 'this.f_filialeids',f_defect_content: 'this.f_defect_content'
571
+ })
572
+ model.f_filialeids = '(' + this.$login.f.orgid + ')'
573
+ model.f_defect_content="CASE WHEN CHARINDEX( '\"result\":\"正常\"', f_defect_content ) > 0 THEN '无隐患' ELSE replace(replace(replace( replace( RIGHT ( f_defect_content, len( f_defect_content ) - 26 ), substring('{}',2,1), '' ), substring('{}',1,1), '' ),']',''),'\"','') END"
574
+ return {
575
+ repaired:[{label: '全部', value: ''},{label: '未完成', value: '未完成'}, {label: '已完成', value: '已完成'}],
576
+ deals:[{label: '全部', value: ''},{label: '未处理', value: '未处理'}, {label: '已处理', value: '已处理'},{label: '处理中', value: '处理中'}],
577
+ hasDefectOptions: [{label: '全部', value: ''}, {label: '有隐患', value: '有隐患'}, {label: '无隐患', value: '无隐患'}],
578
+ f: this.$login.f,
579
+ model: model,
580
+ userTags:[{label: '全部', value: ''},...this.$appdata.getParam('用户标签')],
581
+ userGasType:[{label: '全部', value: ''},...this.$appdata.getParam('用气类型')],
582
+ criteriaShow: false,
583
+ checkAll:false,
584
+ timercount:0,
585
+ showModal2:false,
586
+ repairTypeOptions:this.$appdata.getParam('转维修类型'),
587
+ dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'}],
588
+ checkes:[],
589
+ showModal: false,
590
+ f_check_plan: {f_plan_name: '', id: ''},
591
+ sumsmodel: {},
592
+ resids:{},
593
+ all: false,
594
+ fields: {},
595
+
596
+ selectData:{
597
+ dispatchType:'',
598
+ f_repairman:'',
599
+ f_remarks:'',
600
+ f_repairtype:''
601
+ },
602
+ progressbarWidth:'0',
603
+ modelval: [],
604
+ isbusy:false,
605
+ checkersid: [],
606
+ showModal3:false,
607
+ toRepairCount:0,
608
+ sliceArea: [],
609
+ callSends:[],
610
+ cbc:[],
611
+ repairedOptions:[{label: '全部', value: ''},{label: '已修', value: '已修'}, {label: '未修', value: '未修'}],
612
+ repairers:[],
613
+ cbcs:[],
614
+ thead: '',
615
+ headData: ['入户状态','用户编号','用户表号','用户名','用户电话','用户小区','用户地址','开户时间','安检时间','安检员','计划名','是否有隐患','隐患数','隐患明细','处理情况'],
616
+ bodyData: ['f_entry_status','f_userinfo_code','f_meternumber','f_user_name','f_user_phone','f_residential_area','f_address','f_gas_date','f_offsite_time','f_checker_name','f_plan_name','f_has_defect','f_defect_count','defecttext','f_is_deal'],
617
+ }
618
+ },
619
+ props:{
620
+ style: {
621
+ type: String,
622
+ default: 'col-sm-2 form-group'
623
+ },
624
+ style2: {
625
+ type: String,
626
+ default: 'col-sm-4 form-group'
627
+ }
628
+
629
+ },
630
+
631
+ methods: {
632
+ trouble(val) {
633
+ // return val.replaceAll("'",'')
634
+ // .replaceAll("\"",'')
635
+ // .replaceAll("{",'')
636
+ // .replaceAll("}",'')
637
+ // .replaceAll("]",'')
638
+ // .replaceAll("[",'')
639
+ // .replaceAll("result:",'')
640
+ // .replaceAll("data:",'')
641
+ // .replaceAll("有隐患",'')
642
+ // .replaceAll(",",'')
643
+
644
+
645
+ const defect_content = JSON.parse(val)
646
+ let result = ''
647
+ if (defect_content.data) {
648
+ const jsonData = defect_content.data
649
+ for (const itemdata of jsonData) {
650
+ const keys = Object.keys(itemdata)
651
+ for (const itm of keys) {
652
+ const value = itemdata[itm]
653
+ result += itm + ':' + value
654
+ }
655
+ }
656
+ }
657
+ return result
658
+ },
659
+ getEmp() {
660
+ let val = {source: 'this.getParentByType($organization$).getSpecialResByType($user$).where(row.getAttributes().get($rolestr$)!=null ).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${this.$login.f.id}`}
661
+ let http = new HttpResetClass()
662
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
663
+ let str=''
664
+ res.data.forEach((item,idx,arr) => {
665
+ //tag
666
+ if(idx+1==arr.length){
667
+ str += item.id
668
+ }else{
669
+ str += item.id+','
670
+ }
671
+
672
+ })
673
+ let http1 = new HttpResetClass()
674
+ http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
675
+ data: {
676
+ items: 'id,f_user_telephone',
677
+ tablename: 't_user',
678
+ condition: `id in (${str})`,
679
+ orderitem: 'id'
680
+ }
681
+ }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
682
+
683
+ res.data.forEach((user)=>{
684
+ try {
685
+ ress.data.forEach((tel,tidx,arr)=>{
686
+ //tag
687
+ if(user.id==tel.id){
688
+ this.repairers.push({label: `${user.name}:${tel.f_user_telephone}`, value: user.name})
689
+ ress.data.splice(tidx,1)
690
+ //tag
691
+ throw new Error("跳出循环");
692
+ }
693
+ })
694
+ }catch (e) {
695
+ //tag
696
+ }
697
+ })
698
+ })
699
+
700
+ })
701
+ },
702
+ toRepair(){
703
+ //tag
704
+ this.showModal2=true
705
+ },
706
+ async rectification(){
707
+ this.isbusy =true
708
+ // if (this.checkAll){
709
+ let data={
710
+ f_filialeids: this.model.params.f_filialeids,
711
+ f_defect_content: this.model.params.f_defect_content,
712
+ condition:this.model.params.condition
713
+ }
714
+ let res1= await new HttpResetClass().load('post','rs/sql/GetCheckPaperByDefectNew2',{data: data })
715
+ for (let i = 0; i < res1.data.length; i++) {
716
+ let data1={
717
+ f_paper_id: res1.data[i].id,
718
+ condition:`f_repaire_type != '无隐患'`
719
+ }
720
+ let res2 = await new HttpResetClass().load('POST' , 'rs/sql/GetDefectByPaperIdNew2' , {data: data1 } )
721
+ //tag
722
+ const uploadData = {
723
+ model: {
724
+ serviceacitivity: [{
725
+ f_service_acitivity_type: '派单'
726
+ }],
727
+ f_repairitems: {},
728
+ failure: '',
729
+ f_source: '安检',
730
+ f_service_id: '',
731
+ f_contact_phone: '',
732
+ f_meetunit: '',
733
+ f_phone: '',
734
+ f_user_name: '',
735
+ f_address: '',
736
+ f_repair_date: '',
737
+ f_reciever: '',
738
+ f_remarks: '',
739
+ f_user_type: '',
740
+ f_area: '',
741
+ f_unit_name: '',
742
+ f_street: '',
743
+ f_residential_area: '',
744
+ f_building: '',
745
+ f_unit: '',
746
+ f_floor: '',
747
+ f_room: '',
748
+ aState: '',
749
+ f_repairtype: '',
750
+ f_userinfo_id: '',
751
+ f_userinfo_code: '',
752
+ f_orgstr: '',
753
+ f_outlets: '',
754
+ f_attendant: this.$login.f.name
755
+ },
756
+ loginUser: {
757
+ name: this.$login.f.name,
758
+ ename: this.$login.f.ename
759
+ },
760
+ user: {
761
+ f_userinfo_id: ''
762
+ },
763
+ callObj: null
764
+ }
765
+
766
+ uploadData.model.serviceacitivity[0].f_reciever = this.selectData.f_repairman
767
+ // uploadData.model.f_meetunit = self.$login.f.orgpathnames
768
+ // uploadData.model.f_orgstr = self.$login.f.orgpathstr
769
+ // uploadData.model.f_outlets = self.$login.f.f_parentname
770
+ uploadData.model.f_meetunit = this.$login.f.deps
771
+ uploadData.model.f_orgid = this.$login.f.orgid
772
+ uploadData.model.f_filiale = this.$login.f.org
773
+ uploadData.model.f_outlets = this.$login.f.deps
774
+ uploadData.model.f_filiale_id = this.$login.f.orgid
775
+ uploadData.toRepair = '一级派单'
776
+ let res3 = await new HttpResetClass().load('post','/rs/sql/GetUserForRepaireNew2', {data: {f_userinfo_id: res1.data[i].f_userinfo_id}})
777
+ uploadData.model = Object.assign(uploadData.model, res3.data[0])
778
+ uploadData.user.f_userinfo_id = res3.data[0].f_userinfo_id
779
+ uploadData.model.f_repair_date = Util.getNowDate()
780
+ uploadData.model.f_repairtype = res3.data[0].f_repairtype
781
+ uploadData.model.f_remarks = res3.data[0].f_remarks
782
+ let failure = []
783
+ res2.data.forEach(row => {
784
+ if (row.f_repaire_type == '隐患未处理') {
785
+ console.log('row.f_item_value',row.f_item_value)
786
+ failure.push({
787
+ f_failure_type: row.f_item_name,
788
+ failurecase: row.f_item_value?row.f_item_value.split(','):''
789
+ })
790
+ }
791
+ })
792
+ uploadData.model.failure = failure
793
+ // 拼接repairitems
794
+ let rows = JSON.parse(JSON.stringify(res2.data))
795
+ let repairitems = {
796
+ data: []
797
+ }
798
+ let safecheckOptions = [{"data": "已处理"}, {"data": "未处理"}]
799
+ // 取隐患未处理的
800
+ rows = rows.filter(row => row.f_repaire_type == '隐患未处理')
801
+ //tag)
802
+ // 开始拼接
803
+ rows.forEach(row => {
804
+ let existIndex = -1
805
+ // 判断该设备是否已经存在
806
+ for (let i = 0; i < repairitems.data.length; i++) {
807
+ if (repairitems.data[i].f_type == row.f_device_type) {
808
+ existIndex = i
809
+ break
810
+ }
811
+ }
812
+ if (existIndex == -1) {
813
+ // 不存在则新建
814
+ let newItem = {
815
+ f_type: row.f_device_type,
816
+ details: [{
817
+ f_defect_id: row.id,
818
+ f_project: `${row.f_item_name}:${row.f_item_value}`,
819
+ type: 'selector',
820
+ options: safecheckOptions
821
+ }]
822
+ }
823
+ repairitems.data.push(newItem)
824
+ } else {
825
+ // 存在则追加
826
+ repairitems.data[existIndex].details.push({
827
+ f_defect_id: row.id,
828
+ f_project: `${row.f_item_name}:${row.f_item_value}`,
829
+ type: 'selector',
830
+ options: safecheckOptions
831
+ })
832
+ }
833
+ })
834
+ uploadData.model.f_repairitems = repairitems
835
+ uploadData.rows=rows
836
+ //tag)
837
+ //tag
838
+ if (uploadData.model.f_repairitems.data.length>0){
839
+ this.callSends.push(uploadData)
840
+ }else{
841
+ //tag
842
+ }
843
+ }
844
+ //tag)
845
+ let timer = setInterval(async ()=>{
846
+ this.showModal3=true
847
+ this.isbusy=false
848
+ if (this.timercount<this.callSends.length){
849
+ //tag)
850
+ let rows=this.callSends[this.timercount].rows
851
+ //tag)
852
+ let result = await this.$resetpost('/rs/logic/callerSend', this.callSends[this.timercount])
853
+ //tag)
854
+ if (result.data.f_service_id) {
855
+ const data = {
856
+ f_paper_id: rows[0].f_paper_id,
857
+ f_service_id: result.data.f_service_id,
858
+ itemsId: this.$login.convertToIn(rows.map(row => row.id))
859
+ }
860
+ //tag
861
+ let updateRes = await this.$resetpost('/rs/logic/updateDefectStateNew', data)
862
+ }
863
+ this.toRepairCount++
864
+ //tag
865
+ this.timercount++
866
+ }else{
867
+ clearInterval(timer)
868
+ //tag
869
+ this.callSends=[]
870
+ this.timercount=0
871
+ this.showModal3=false
872
+ this.cancel1()
873
+ this.$showMessage('本次转维修成功'+this.toRepairCount+'单')
874
+ this.toRepairCount=0
875
+ }
876
+ }, 3000)
877
+ },
878
+ cancel1(){
879
+ this.showModal2=false
880
+ this.selectData={
881
+ dispatchType:'',
882
+ f_repairman:'',
883
+ f_remarks:'',
884
+ f_repairtype:''
885
+ }
886
+ },
887
+ sleep(d){
888
+ //tag)
889
+ var t = Date.now()
890
+ while(Date.now - t <= d){
891
+
892
+ }
893
+ //tag)
894
+ },
895
+ isChecked(v) {
896
+ // 如果全选,不在的按选中算,否则,在的按选中算
897
+ if (this.checkAll) {
898
+ return this.checkes.indexOf(v) == -1
899
+ } else {
900
+ return this.checkes.indexOf(v) != -1
901
+ }
902
+ },
903
+ setCheckAll() {
904
+ this.checkAll=this.checkAll?false:true;
905
+ // 全选改变后,清空选中数据
906
+ this.checkes = []
907
+ },
908
+ setCheckes(id) {
909
+ let index=this.checkes.indexOf(id)
910
+ if(index<0){
911
+ this.checkes.push(id)
912
+ }else{
913
+ this.checkes.splice(index,1)
914
+ }
915
+ },
916
+
917
+ getmeterbook(val){
918
+ this.cbc=[]
919
+ this.cbc.push({
920
+ label:'全部',
921
+ value:''
922
+ })
923
+ if (val==''){
924
+
925
+ this.cbcs.forEach(res=>{
926
+ this.cbc.push({
927
+ label:res.f_book_name,
928
+ value:res.id
929
+ })
930
+ })
931
+ }else{
932
+ this.cbcs.forEach(res=>{
933
+ if (res.f_book_slice_area==val){
934
+ this.cbc.push({
935
+ label:res.f_book_name,
936
+ value:res.id
937
+ })
938
+ }
939
+ })
940
+ }
941
+ },
942
+
943
+ Mreadibook(val){
944
+ //tag
945
+ //tag
946
+ this.sliceArea=[]
947
+ if (val){
948
+ new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
949
+ items: 'name',
950
+ tablename: 't_zone',
951
+ condition: `parentid in ${val}`,
952
+ orderitem: 'id'
953
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
954
+ this.sliceArea.push({
955
+ label:'全部',
956
+ value:''
957
+ })
958
+ res.data.forEach(ress=>{
959
+ this.sliceArea.push({
960
+ label:ress.name,
961
+ value:ress.name
962
+ })
963
+ })
964
+
965
+ })
966
+ }
967
+ },
968
+ getAllMeterBook(val){
969
+ //tag
970
+ //tag
971
+ this.cbcs=[]
972
+ if (val){
973
+ new HttpResetClass().load('POST',`/rs/sql/tel_singleTable_OrderBy`, {data: {
974
+ items: 'f_book_name,f_book_slice_area,id',
975
+ tablename: 't_meter_book',
976
+ condition: `f_filiale_id in ${val}`,
977
+ orderitem: 'id'
978
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
979
+ res.data.forEach(ress=>{
980
+ this.cbcs.push({
981
+ id:ress.id,
982
+ f_book_name:ress.f_book_name,
983
+ f_book_slice_area:ress.f_book_slice_area
984
+ })
985
+ })
986
+ this.cbc=[]
987
+ this.cbc.push({
988
+ label:'全部',
989
+ value:''
990
+ })
991
+ this.cbcs.forEach(res=>{
992
+ this.cbc.push({
993
+ label:res.f_book_name,
994
+ value:res.id
995
+ })
996
+ })
997
+ })
998
+ }
999
+ },
1000
+ hiddenr() {
1001
+ this.$parent.showItem = !this.$parent.showItem
1002
+ },
1003
+ hidden() {
1004
+ this.criteriaShow = !this.criteriaShow
1005
+ },
1006
+ search(args) {
1007
+ //tag
1008
+ if (this.f_check_plan.f_plan_name) {
1009
+ args.condition += ` and f_check_plan_id = '${this.f_check_plan.id}'`
1010
+ }
1011
+ this.checkes = []
1012
+ this.checkAll=false
1013
+ this.model.search(args.condition, args.model)
1014
+ },
1015
+ getRes(obj) {
1016
+ //tag
1017
+ this.resids = {res:obj.res[0], resids:obj.resids[0]}
1018
+ this.model.f_filialeids = this.$login.convertToIn(obj.resids);
1019
+ this.Mreadibook(this.model.f_filialeids)
1020
+ this.getAllMeterBook(this.model.f_filialeids)
1021
+ },
1022
+ showChooser() {
1023
+ this.showModal = true
1024
+ },
1025
+ ok() {
1026
+ this.showModal = false
1027
+ if (this.$refs.modal.$children[0].selectedRow.id) {
1028
+ this.f_check_plan = this.$refs.modal.$children[0].selectedRow
1029
+ }
1030
+ },
1031
+ cancel() {
1032
+ this.showModal = false
1033
+ this.f_check_plan = {f_plan_name: '', id: ''}
1034
+ }
1035
+ },
1036
+ ready() {
1037
+ //tag
1038
+
1039
+ this.$refs.paged.$refs.criteria.model.f_has_defect = '有隐患'
1040
+ this.getEmp()
1041
+ let gen = select(this)
1042
+ // this.Mreadibook(`('${this.$login.f.orgid}')`)
1043
+ co(gen)
1044
+ },
1045
+ watch:{
1046
+ 'timercount'(){
1047
+ if (this.timercount===0){
1048
+ this.progressbarWidth = '0'
1049
+ }else {
1050
+ //tag
1051
+ //tag
1052
+ this.progressbarWidth=parseInt(this.timercount*100/(this.callSends.length+1))
1053
+ }
1054
+
1055
+ }
1056
+ },
1057
+ computed: {
1058
+ selected() {
1059
+ return this.$refs.paged.$refs.grid.selected
1060
+ },
1061
+ getfield () {
1062
+ //tag
1063
+ let data = {}
1064
+ this.bodyData.forEach((value, index) => {
1065
+ data[this.bodyData[index]] = this.headData[index]
1066
+ })
1067
+ //合计字段打印
1068
+ this.tfoot = `<tr><th colspan=${this.modelval.length}>全表汇总信息: `
1069
+ if (this.sumsmodel) {
1070
+ Object.keys(this.sumsmodel).forEach((key) => {
1071
+ this.tfoot += this.fields[key] + '合计: ' + `<font color="blue">${this.sumsmodel[key]} </font>`
1072
+ })
1073
+ } else {
1074
+ this.tfoot += '暂无'
1075
+ }
1076
+ this.tfoot += '</th></tr>'
1077
+ return data
1078
+ }
1079
+ }
1080
+ }
1081
+ </script>