safecheck-client 3.0.30-62-t9 → 3.0.30-62-t11

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