safecheck-client 3.0.33-23 → 3.0.33-24

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