safecheck-client 3.0.35-43 → 3.0.35-44

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