safecheck-client 3.0.33-2 → 3.0.33-5

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