safecheck-client 3.0.30-7 → 3.0.30-8

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,1090 +1,1090 @@
1
- <template>
2
- <div class="flex-row">
3
- <div class="basic-main">
4
- <criteria-paged :model="model" v-ref:paged @sort="sort">
5
- <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
- <div class="row">
8
- <div class="form-group col-sm-2" >
9
- <label class="font_normal_body">客户编号</label>
10
- <input type="text" class="input_search" v-model="model.f_userinfo_code"
11
- style="width: 60%" placeholder="客户编号" condition="f_userinfo_code='{}'">
12
- </div>
13
- <div class="form-group col-sm-2" >
14
- <label class="font_normal_body">客户名称</label>
15
- <input type="text" class="input_search" v-model="model.f_user_name"
16
- style="width: 60%" placeholder="客户名称" condition="f_user_name like '%{}%'">
17
- </div>
18
- <div class="form-group col-sm-2" >
19
- <label class="font_normal_body">客户电话</label>
20
- <input type="text" class="input_search" v-model="model.f_user_phone"
21
- style="width: 60%" placeholder="客户电话" condition="f_user_phone like '%{}%'">
22
- </div>
23
- <div class="form-group col-sm-2" >
24
- <label class="font_normal_body">小&emsp;&emsp;区</label>
25
- <input type="text" class="input_search" v-model="model.f_residential_area"
26
- style="width: 60%" placeholder="小区" condition="f_residential_area like '%{}%'">
27
- </div>
28
- <div class="form-group col-sm-2" >
29
- <label class="font_normal_body">详细地址</label>
30
- <input type="text" class="input_search" v-model="model.f_address"
31
- style="width: 60%" placeholder="详细地址" condition="f_address like '%{}%'">
32
- </div>
33
- <div class="form-group col-sm-2" style="width: auto;margin-top:8px;float: right">
34
-
35
- <export-excel-safe :data="$parent.$parent.searchData"
36
- :field="$parent.$parent.excelHeaders"
37
- progress="safeGetExportProgress"
38
- sqlurl="rs/logic/SafeExportExcel" sql-name="defectDetails" template-name='安检隐患明细' :choose-col="true"></export-excel-safe>
39
- <!-- <button class="button_spacing button_search" @click="$parent.$parent.showaudio()" v-if="!$parent.$parent.audioshow">录音</button>-->
40
- <button class="button_spacing button_search" @click="$parent.$parent.showaudio()" v-if="$parent.$parent.audioshow">隐藏</button>
41
- <button class="button_search" @click="$parent.$parent.toRepair" v-if="$parent.$parent.canToRepair == '是'">转维修</button>
42
-
43
- <button class="button_spacing button_search" @click="search()">查询</button>
44
- <div style="float: right" class="button_spacing"
45
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
46
- @click="$parent.$parent.hidden()"></div>
47
- </div>
48
-
49
- </div>
50
- <div class="row">
51
- <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
52
- <role-selector-safe
53
- role-name="安检员"
54
- role-lable="安&nbsp;检&nbsp;员&nbsp;"
55
- @re-res="$parent.$parent.getRes"
56
- :value.sync="model.f_checker_id"
57
- v-model="model.f_checker_id"
58
- condition="f_checker_name in {}"
59
- :value-multiple="true">
60
- </role-selector-safe>
61
- </div>
62
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
63
- <label class="font_normal_body">检&ensp;查&ensp;项</label>
64
- <v-select :value.sync="model.f_device_type" v-model='model.f_device_type'
65
- :value-single="true" style="width: 60%"
66
- class="select_list select"
67
- :options='$parent.$parent.device_types' placeholder='检查项'
68
- close-on-select
69
- @change="$parent.$parent.changeDefect"
70
- condition="f_device_type like '%{}%'"></v-select>
71
- <!--<input type="text" class="input_search" v-model="model.f_device_type"-->
72
- <!--style="width: 60%" placeholder="检&ensp;查&ensp;项" condition="f_device_type like '%{}%'">-->
73
- </div>
74
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
75
- <label class="font_normal_body">隐患名称</label>
76
- <v-select :value.sync="model.f_item_name" v-model='model.f_item_name'
77
- :value-single="true" style="width: 60%"
78
- class="select_list select"
79
- :options='$parent.$parent.DefectConfigs' placeholder='隐患名称'
80
- close-on-select
81
- condition="f_item_name like '%{}%'"></v-select>
82
- </div>
83
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
84
- <label class="font_normal_body">安检起始</label>
85
- <datepicker
86
- :value.sync="model.f_check_start"
87
- placeholder='安检起始时间' style="width: 60%"
88
- :disabled-days-of-week="[]"
89
- :format="'yyyy-MM-dd'"
90
- :show-rest-button="reset"
91
- v-model="model.f_check_start"
92
- condition="f_offsite_time >='{} 00:00:00'">
93
- </datepicker>
94
- </div>
95
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
96
- <label class="font_normal_body">安检结束</label>
97
- <datepicker
98
- :value.sync="model.f_check_end"
99
- placeholder='安检结束时间' style="width: 60%"
100
- :disabled-days-of-week="[]"
101
- :format="'yyyy-MM-dd'"
102
- :show-rest-button="reset"
103
- v-model="model.f_check_end"
104
- condition="f_offsite_time <='{} 23:59:59'">
105
- </datepicker>
106
- </div>
107
-
108
- </div>
109
- <div class="row">
110
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
111
- <label class="font_normal_body">维修结果</label>
112
- <v-select class="select_list select"
113
- placeholder='维修结果' style="width: 60%"
114
- :value.sync="model.f_repaired" v-model="model.f_repaired"
115
- :options='$parent.$parent.repaireds'
116
- filer-key="name"
117
- close-on-select clear-button
118
- condition="f_repaired='{}'"
119
- :value-single="true">
120
- </v-select>
121
- <!--<input type="text" class="input_search" v-model="model.f_device_type"-->
122
- <!--style="width: 60%" placeholder="检&ensp;查&ensp;项" condition="f_device_type like '%{}%'">-->
123
- </div>
124
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
125
- <label class="font_normal_body">用户类型</label>
126
- <v-select class="select_list select"
127
- placeholder='用户类型' style="width: 60%"
128
- :value.sync="model.f_check_type" v-model="model.f_check_type"
129
- :options='$parent.$parent.checktype'
130
- filer-key="name"
131
- close-on-select clear-button
132
- condition="f_check_type='{}'"
133
- :value-single="true">
134
- </v-select>
135
- </div>
136
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
137
- <label class="font_normal_body">片&emsp;&emsp;区</label>
138
- <v-select class="select_list select"
139
- placeholder='片区' style="width: 60%"
140
- :value.sync="model.f_slice_area" v-model="model.f_slice_area"
141
- :options='$parent.$parent.sliceArea'
142
- filer-key="name"
143
- close-on-select clear-button
144
- condition="f_slice_area='{}'"
145
- :value-single="true">
146
- </v-select>
147
- </div>
148
-
149
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
150
- <label class="font_normal_body">区&emsp;&emsp;域</label>
151
- <v-select class="select_list select"
152
- placeholder='请选择' style="width: 60%"
153
- :value.sync="model.f_pcd" v-model="model.f_pcd"
154
- :options='$parent.$parent.pcds'
155
- filer-key="name"
156
- clear-button
157
- condition="f_pcd in {}"
158
- :multiple="true">
159
- </v-select>
160
- </div>
161
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
162
- <label class="font_normal_body">处理人</label>
163
- <input type="text" class="input_search" v-model="model.f_repairman"
164
- style="width: 60%" placeholder="处理人" condition="f_repairman like '%{}%'">
165
- </div>
166
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
167
- <label class="font_normal_body">处理起始</label>
168
- <datepicker
169
- :value.sync="model.f_repair_start"
170
- placeholder='处理起始时间' style="width: 60%"
171
- :disabled-days-of-week="[]"
172
- :format="'yyyy-MM-dd'"
173
- :show-rest-button="reset"
174
- v-model="model.f_repair_start"
175
- condition="f_repair_date >='{} 00:00:00'">
176
- </datepicker>
177
- </div>
178
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
179
- <label class="font_normal_body">处理结束</label>
180
- <datepicker
181
- :value.sync="model.f_repair_end"
182
- placeholder='处理结束时间' style="width: 60%"
183
- :disabled-days-of-week="[]"
184
- :format="'yyyy-MM-dd'"
185
- :show-rest-button="reset"
186
- v-model="model.f_repair_end"
187
- condition="f_repair_date <='{} 23:59:59'">
188
- </datepicker>
189
- </div>
190
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
191
- <label class="font_normal_body">处理结果</label>
192
- <v-select class="select_list select"
193
- placeholder='处理结果' style="width: 60%"
194
- :value.sync="model.f_repair_result" v-model="model.f_repair_result"
195
- :options='$parent.$parent.repairresults'
196
- filer-key="name"
197
- close-on-select clear-button
198
- :value-single="true">
199
- </v-select>
200
- </div>
201
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
202
- <label class="font_normal_body">逾期起始</label>
203
- <datepicker
204
- :value.sync="model.f_handle_start"
205
- placeholder='逾期起始时间' style="width: 60%"
206
- :disabled-days-of-week="[]"
207
- :format="'yyyy-MM-dd'"
208
- :show-rest-button="reset"
209
- v-model="model.f_handle_start"
210
- condition="f_handle_date >='{} 00:00:00'">
211
- </datepicker>
212
- </div>
213
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
214
- <label class="font_normal_body">逾期结束</label>
215
- <datepicker
216
- :value.sync="model.f_handle_end"
217
- placeholder='逾期结束时间' style="width: 60%"
218
- :disabled-days-of-week="[]"
219
- :format="'yyyy-MM-dd'"
220
- :show-rest-button="reset"
221
- v-model="model.f_handle_end"
222
- condition="f_handle_date <='{} 23:59:59'">
223
- </datepicker>
224
- </div>
225
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
226
- <label class="font_normal_body">逾期状态</label>
227
- <v-select class="select_list select"
228
- placeholder='逾期状态' style="width: 60%"
229
- :value.sync="model.f_is_handle" v-model="model.f_is_handle"
230
- :options='$parent.$parent.ishandles'
231
- filer-key="name"
232
- close-on-select clear-button
233
- condition="f_is_handle='{}'"
234
- :value-single="true">
235
- </v-select>
236
- </div>
237
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
238
- <label class="font_normal_body">处理方式</label>
239
- <v-select class="select_list select"
240
- placeholder='处理方式' style="width: 60%"
241
- :value.sync="model.f_is_repaired" v-model="model.f_is_repaired"
242
- :options='$parent.$parent.is_repaired'
243
- filer-key="name"
244
- close-on-select clear-button
245
- condition="f_is_repaired='{}'"
246
- :value-single="true">
247
- </v-select>
248
- </div>
249
- <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
250
- <label class="font_normal_body">隐患状态</label>
251
- <v-select class="select_list select"
252
- placeholder='隐患状态' style="width: 60%"
253
- :value.sync="model.is_repaired" v-model="model.is_repaired"
254
- :options='$parent.$parent.is_repaireds'
255
- filer-key="name"
256
- close-on-select clear-button
257
- condition="is_repaired='{}'"
258
- :value-single="true">
259
- </v-select>
260
- </div>
261
- </div>
262
- <modal :show.sync="$parent.$parent.showModal" v-ref:modal>
263
- <div slot="modal-header" class="modal-header">
264
- <h4 class="modal-title">
265
- 选择计划
266
- </h4>
267
- </div>
268
- <div slot="modal-body" class="modal-body">
269
- <plan-chooser :f.sync="$parent.$parent.fun" v-ref:chooser></plan-chooser>
270
- </div>
271
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
272
- <button class="button_search" @click="$parent.$parent.ok">确认</button>
273
- <button class="button_search" @click="$parent.$parent.cancel">取消</button>
274
- </div>
275
- </modal>
276
- </div>
277
- </criteria>
278
- <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
279
- <template partial='head'>
280
- <tr>
281
- <th v-if="$parent.$parent.$parent.canToRepair=='是'"><nobr>选择</nobr></th>
282
- <th>
283
- <nobr>检查项</nobr>
284
- </th>
285
- <th>
286
- <nobr>隐患原因</nobr>
287
- </th>
288
- <th>
289
- <nobr>隐患级别</nobr>
290
- </th>
291
- <th>
292
- <nobr>客户编号</nobr>
293
- </th>
294
- <th>
295
- <nobr>客户名称</nobr>
296
- </th>
297
- <th>
298
- <nobr>客户电话</nobr>
299
- </th>
300
- <th>
301
- <nobr>客户小区</nobr>
302
- </th>
303
- <th>
304
- <data-order field="f_address" name="客户地址"></data-order>
305
- </th>
306
-
307
- <th>
308
- <data-order field="f_offsite_time" name="安检时间"></data-order>
309
- </th>
310
- <th>
311
- <nobr>逾期时间</nobr>
312
- </th>
313
- <th>
314
- <nobr>逾期状态</nobr>
315
- </th>
316
- <th>
317
- <nobr>安检员</nobr>
318
- </th>
319
- <th>
320
- <nobr>处理方式</nobr>
321
- </th>
322
- <th>
323
- <nobr>处理人</nobr>
324
- </th>
325
- <th>
326
- <nobr>处理时间</nobr>
327
- </th>
328
- <th>
329
- <nobr>处理结果</nobr>
330
- </th>
331
- <th>
332
- <nobr>操作</nobr>
333
- </th>
334
- </tr>
335
- </template>
336
- <template partial='body'>
337
- <td v-if="$parent.$parent.$parent.canToRepair=='是'" style="text-align: center;white-space:nowrap;"><input type="checkbox" v-if="['现场已处理','维修已处理','无隐患','转维修'].indexOf(row.f_is_repaired) == -1" @click="$event.cancelBubble=true" :checked="$parent.$parent.$parent.isChecked(row)" @change="$parent.$parent.$parent.setCheckes(row)"></input></td>
338
- <td style="text-align: center">{{row.f_device_type}}</td>
339
- <td style="text-align: center">{{row.f_item_name}}/{{row.f_item_value}}</td>
340
- <td style="text-align: center">{{row.f_defect_level}}</td>
341
- <td style="text-align: center">{{row.f_userinfo_code}}</td>
342
- <td style="text-align: center">{{row.f_user_name}}</td>
343
- <td style="text-align: center">{{row.f_user_phone}}</td>
344
- <td style="text-align: center">{{row.f_residential_area}}</td>
345
- <td style="text-align: center">{{row.f_address}}</td>
346
- <td style="text-align: center">{{row.f_offsite_time}}</td>
347
- <td style="text-align: center">{{row.f_handle_date}}</td>
348
- <td style="text-align: center">{{row.f_is_handle}}</td>
349
- <td style="text-align: center">{{row.f_checker_name}}</td>
350
- <td style="text-align: center">{{row.f_is_repaired}}</td>
351
- <td style="text-align: center">{{row.f_repairman}}</td>
352
- <td style="text-align: center">{{row.f_repair_date}}</td>
353
- <td style="text-align: center">{{row.f_repair_result}}</td>
354
- <td style="text-align: center">
355
- <button v-if="row.f_is_repaired == '隐患未处理' || (row.f_is_repaired == '用户自行整改' && row.f_repair_result == '未处理') " class="button_spacing button_search-1" @click="$parent.$parent.$parent.solveDefect( row, 'solve')">处理隐患</button>
356
- </td>
357
- </template>
358
- </data-grid>
359
- </criteria-paged>
360
- <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
361
- </div>
362
- <modal :show.sync="showModal2" :backdrop="false">
363
- <div slot="modal-header" class="modal-header">
364
- <h4 class="modal-title">
365
- 转维修
366
- </h4>
367
- </div>
368
- <div slot="modal-body" class="modal-body">
369
- <div v-if="true">
370
- <div>
371
-
372
- </div>
373
- <!-- <div v-for="(index, item) in dangerGroup">-->
374
-
375
- <!-- </div>-->
376
- <div class="row" style="margin-top: 10px">
377
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
378
- <div class="col-xs-8 col-md-8">
379
- <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
380
- :options='dispatchTypeOptions' placeholder='派发类型'
381
- close-on-select>
382
- </v-select>
383
- </div>
384
- </div>
385
- <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
386
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">维&ensp;修&ensp;员</label>
387
- <div class="col-xs-8 col-md-8">
388
- <v-select
389
- :value.sync="selectData.f_repairman"
390
- :value-single="true"
391
- :options='repairers'
392
- placeholder='请选择维修员'
393
- close-on-select></v-select>
394
- </div>
395
- </div>
396
- <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
397
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">站&ensp;&ensp;&ensp;&ensp;点</label>
398
- <div class="col-xs-8 col-md-8">
399
- <right-tree
400
- islist
401
- :userid="userid"
402
- :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
403
- @re-res="getSiteRes"></right-tree>
404
- </div>
405
- </div>
406
- <div class="row" style="margin-top: 10px">
407
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
408
- <div class="col-xs-8 col-md-8">
409
- <v-select :value.sync="selectData.f_repairtype" style="width:60%"
410
- class="select select_list"
411
- :value-single="true"
412
- :options='repairTypeOptions'
413
- close-on-select>
414
- </v-select>
415
- </div>
416
- </div>
417
- <div class="row" style="margin-top: 10px">
418
- <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
419
- <div class="col-xs-8 col-md-8">
420
- <textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
421
- </div>
422
- </div>
423
- </div>
424
- </div>
425
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
426
- <button class="button_search" @click="rectification">转维修</button>
427
- <button class="button_search" @click="cancel1">取消</button>
428
- </div>
429
- </modal>
430
- <modal :show.sync="showSolveModal" v-ref:solveModal>
431
- <div slot="modal-header" class="modal-header">
432
- <h4 class="modal-title">
433
- {{solveModal.preData.type == 'view'?'处理详情':'处理隐患'}}
434
- </h4>
435
- </div>
436
- <div slot="modal-body" class="modal-body">
437
- <div style="width: 100%;height: 36px;background-color: #f1f8ff;float: left">
438
- <div style="width: 8px;height: 100%;background-color: #6aa6e2;margin-right: 20px;float: left"></div>
439
- <div style="width: auto;height:100%;float: left;"><p class="title-font" style="margin-top: 5px">处理前</p></div>
440
- </div>
441
-
442
- <div class="col-sm-6" style="margin-top: 10px">
443
- <label class="font_normal_body">安&nbsp;检&nbsp;员</label>
444
- <input class="input_search" style="width: 60%" type="text" disabled="true" v-model="check.f_checker_name" placeholder="安检员">
445
- </div>
446
- <div class="col-sm-6" style="margin-top: 10px">
447
- <label class="font_normal_body">安检时间</label>
448
- <input class="input_search" style="width: 60%" type="text" disabled="true" v-model="check.f_offsite_time" placeholder="安检时间">
449
- </div>
450
- <div class="col-sm-12" style="margin-bottom: 10px">
451
- <label class="font_normal_body">隐患图片</label>
452
- <img-self :width="200" :height="200" :src="solveModal.preData.defectImg"></img-self>
453
- </div>
454
-
455
- <div style="width: 100%;height: 36px;background-color: #f1f8ff;float: left">
456
- <div style="width: 8px;height: 100%;background-color: #6aa6e2;margin-right: 20px;float: left"></div>
457
- <div style="width: auto;height:100%;float: left;"><p class="title-font" style="margin-top: 5px">处理后</p></div>
458
- </div>
459
- <div class="col-sm-6" style="margin-top: 10px">
460
- <label class="font_normal_body">处&nbsp;理&nbsp;人</label>
461
- <input class="input_search" style="width: 60%" disabled="true" type="text" v-model="solveModal.uploadData.f_repairman" placeholder="处理人">
462
- </div>
463
- <div class="col-sm-6" style="margin-top: 10px">
464
- <label class="font_normal_body">处理时间</label>
465
- <datepicker
466
- :disabled="solveModal.preData.type == 'view'"
467
- placeholder='处理时间' style="width:60%"
468
- :disabled-days-of-week="[]"
469
- :format="'yyyy-MM-dd'"
470
- :show-rest-button="reset"
471
- :value.sync="solveModal.uploadData.f_repair_date">
472
- </datepicker>
473
- </div>
474
- <div v-if="solveModal.preData.type == 'solve'" class="col-sm-12" style="margin-bottom: 10px">
475
- <label class="font_normal_body">处理后图片</label>
476
- <avatar-upload :width="200" :height="200" :img-src.sync="solveModal.uploadData.imgSrc" :filename.sync="solveModal.uploadData.filename" v-ref:imginfo></avatar-upload>
477
- </div>
478
- <div v-if="solveModal.preData.type == 'view'" class="col-sm-12" style="margin-bottom: 10px">
479
- <label class="font_normal_body">处理后图片</label>
480
- <img-self :width="200" :height="200" :src="solveModal.preData.repairedImg"></img-self>
481
- </div>
482
- </div>
483
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
484
- <button class="button_search" v-if="solveModal.preData.type == 'solve'" @click="ok2">确认</button>
485
- <button class="button_search" @click="cancel2">取消</button>
486
- </div>
487
- </modal>
488
- </div>
489
- </template>
490
-
491
- <script>
492
- import {PagedList} from 'vue-client'
493
- import Vue from 'vue'
494
- import co from 'co'
495
- import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
496
- import BenzAMRRecorder from 'benz-amr-recorder'
497
- import * as Util from "../../Util";
498
-
499
- const upSolveDefect = function* (self) {
500
- let uploadData = self.solveModal.uploadData
501
- //tag)
502
- self.$resetpost('/rs/logic/pcRepairDefect', self.solveModal.uploadData, {resolveMsg: null, rejectMsg: null})
503
- .then(res => {
504
- if (res.data.code == 200) {
505
- self.$showMessage('隐患已处理。')
506
- self.showSolveModal = false
507
- self.$refs.paged.$refs.criteria.search()
508
- }
509
- })
510
- }
511
-
512
- //获取json配置文件
513
- let asyncReady = async function (self) {
514
- // 获取配置信息
515
- try {
516
- let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
517
- Vue.config = res.data
518
- self.getDefectInfoConfig(res.data)
519
- } catch (error) {
520
- // 忽略704,文件找不到异常R
521
- if (error.status !== 704) {
522
- throw error
523
- }
524
- }
525
- }
526
-
527
- let select = function* (self) {
528
- let http = new HttpResetClass()
529
- let getGasman = yield http.load('POST', '/rs/search', {
530
- source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
531
- userid: self.$login.f.id
532
- }, {resolveMsg: null, rejectMsg: null})
533
- ////tag
534
- self.checkersid.push({label: '全部', value: ''})
535
- getGasman.data.forEach((checker) => {
536
- self.checkersid.push({label: checker.name, value: checker.id})
537
- })
538
- }
539
-
540
- export default {
541
- title: '隐患明细查看',
542
- data() {
543
- let model = new PagedList('rs/sql/defectDetails', 20)
544
- model.f_plan_id = ''
545
- model.f_approved = ''
546
- model.f_entry = ''
547
- model.f_no_checkplan = ''
548
- model.f_filialeid = `('${this.$login.f.orgid}')`
549
- //model.f_check_type='民用'
550
- // let searchData={
551
- // f_plan_id: this.model.f_checker_id==undefined?"":this.model.f_checker_id,
552
- // f_approved: this.model.f_approved,
553
- // f_entry_status: this.model.f_entry,
554
- // f_no_checkplan:this.model.f_no_checkplan[0],
555
- // f_filialeid: this.model.f_filialeid,
556
- // //orderitem: this.model.f_offsite_time,
557
- // //condition:this.model.condition
558
- // }
559
- // model.f_subcompany = this.$login.f.f_fengongsi
560
- return {
561
- audioshow:false,
562
- showSolveModal: false,
563
- searchData: {
564
- condition: "1=1",
565
- },
566
- model: model,
567
- //searchData:searchData,
568
- excelHeaders: {
569
- 'f_device_type': '检查项',
570
- 'f_item_name': '隐患名称',
571
- 'f_item_value': '隐患原因',
572
- 'f_userinfo_code': '客户编号',
573
- 'f_user_name': '客户姓名',
574
- 'f_user_phone': '客户电话',
575
- 'f_residential_area': '小区',
576
- 'f_address': '客户地址',
577
- 'f_offsite_time': '安检时间',
578
- 'f_handle_date': '逾期时间',
579
- 'f_is_handle': '逾期状态',
580
- 'f_checker_name': '安检员',
581
- 'f_is_repaired': '处理方式',
582
- 'f_repairman': '处理人',
583
- 'f_repair_date': '处理时间',
584
- 'f_repair_result': '处理结果'
585
- },
586
- fun: this.$login.f,
587
- checkersid: [],
588
- safetype: this.getSafeParam('安检类型'),
589
- criteriaShow: false,
590
- repaireds: [{label: '全部', value: ''},{label: '已修', value: '已修'},{label: '未修', value: '未修'}],
591
- checktype: [{label: '全部', value: ''},{label: '民用', value: '民用'},{label: '非民用', value: '非民用'}],
592
- showModal: false,
593
- pcds: [],
594
- f_approval_states: this.getSafeParam('安检单审核状态'),
595
- f_entry_status:this.getSafeParam('安检状态'),
596
- f_checkplans: this.getSafeParam('有无计划'),
597
- is_repaired: this.getSafeParam('安检患隐处理方式'),
598
- is_repaireds:[{label: '全部', value: ''},{label: '已处理未消除隐患', value: '已处理未消除隐患'},{label: '已处理已消除隐患', value: '已处理已消除隐患'}],
599
- showcheckmsg: false,
600
- checkInfo: {},
601
- repairers: [],
602
- dispatchTypeOptions: [{label: '派发给站点', value: '派发给站点'},{label: '派发给维修员', value: '派发给维修员'}],
603
- canToRepair: this.$appdata.getSingleValue('隐患明细转维修') || '是',
604
- repairTypeOptions:this.$appdata.getParam('报修类型'),
605
- selectData:{
606
- dispatchType:'',
607
- f_repairman:'',
608
- f_remarks:'',
609
- f_repairtype:''
610
- },
611
- checkes: [],
612
- showModal2: false,
613
- solveModal: {
614
- preData: {
615
- type: 'view',
616
- defectImg: '',
617
- repairedImg: ''
618
- },
619
- uploadData: {
620
- id: '',
621
- f_repairman: this.$login.f.name,
622
- f_repair_date: Util.getNowDate().substr(0, 10),
623
- f_repair_path: '',
624
- imgSrc: '',
625
- filename: ''
626
- }
627
- },
628
- orderDefault: "'f_offsite_time'",
629
- orderFields: {
630
- f_offsite_time: 'no'
631
- },
632
- sliceArea: [],
633
- cbc:[],
634
- DefectConfig:'' ,
635
- DefectConfigs:[{label:'全部',value:''},{label:'气量异常差值',value:'气量异常差值'}],
636
- ishandles:[{label:'全部',value:''},{label:'未逾期',value:'未逾期'},{label:'已逾期',value:'已逾期'}],
637
- repairresults:[{label:'全部',value:''},{label:'已处理',value:'已处理'},{label:'未处理',value:'未处理'}],
638
- device_types:[{label:'全部',value:''}],
639
- }
640
- },
641
- methods: {
642
- ok2() {
643
- if (!(this.solveModal.uploadData.filename && this.solveModal.uploadData.filename.length > 0)) {
644
- this.$showMessage('请录入处理后照片')
645
- return
646
- }
647
- co(upSolveDefect(this))
648
- },
649
- cancel2() {
650
- this.showSolveModal = false
651
- this.showToRepairModal = false
652
- },
653
- solveDefect(row, type) {
654
- if(row.f_repair_path && row.f_repair_path.startsWith('http')){
655
- this.solveModal.preData.repairedImg = row.f_repair_path
656
- }else {
657
- this.solveModal.preData.repairedImg = '/rs/image/file/' + row.f_repair_path
658
- }
659
- this.solveModal.preData.defectImg = '/rs/image/file/' + row.f_path
660
- this.solveModal.uploadData.id = row.id
661
- this.solveModal.preData.type = type
662
- if (type == 'view') {
663
- this.solveModal.preData.f_repair_path = '/rs/image/file/' + row.f_repair_path
664
- this.solveModal.uploadData.f_repairman = row.f_repairman
665
- this.solveModal.uploadData.f_repair_date = row.f_repair_date
666
- } else {
667
- this.solveModal.uploadData.f_repairman = this.$login.f.name
668
- this.solveModal.uploadData.f_repair_date = Util.getNowDate().substr(0, 10)
669
- }
670
- this.showSolveModal = !this.showSolveModal
671
- },
672
- getEmp() {
673
- let val = {source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1 ))', userid: `${this.$login.f.id}`}
674
- let http = new HttpResetClass()
675
- http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
676
- if (res.data.length == 0){
677
- this.repairers= []
678
- return
679
- }
680
- res.data.forEach((user)=>{
681
- this.repairers.push({label: user.name, value: user.name})
682
- })
683
- })
684
- },
685
- getSiteRes(obj) {
686
- console.log('siteRes ---> ')
687
- console.log(obj)
688
- if(obj.resids[0]){
689
- this.selectData.f_meetunit = obj.res.join('.')
690
- this.selectData.f_reciever = obj.resids.join('.')
691
- this.selectData.f_outlets = obj.res[obj.res.length - 1]
692
- }else {
693
- this.selectData.f_meetunit = ''
694
- this.selectData.f_reciever = ''
695
- this.selectData.f_outlets = ''
696
- }
697
- },
698
- cancel1(){
699
- this.showModal2=false
700
- this.selectData={
701
- dispatchType:'',
702
- f_repairman:'',
703
- f_remarks:'',
704
- f_repairtype:''
705
- }
706
- },
707
- async rectification(){
708
- if(this.selectData.dispatchType){
709
- if(this.selectData.dispatchType=='派发给站点'){
710
- if(!this.selectData.f_reciever){
711
- this.$showMessage('请选择部门!')
712
- return
713
- }
714
- }else{
715
- if(!this.selectData.f_repairman){
716
- this.$showMessage('请选择维修员!')
717
- return
718
- }
719
- }
720
- }else {
721
- this.$showMessage('请选择派发类型!')
722
- return
723
- }
724
-
725
- if(!this.selectData.f_repairtype){
726
- this.$showMessage('请选择报修类型!')
727
- return
728
- }
729
- this.showModal3=true
730
- let act={}
731
- let toRepair=''
732
- let successCount=0
733
- if(this.selectData.dispatchType=='派发给站点'){
734
- act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
735
- toRepair=null
736
- }else{
737
- console.log('派发给维修员---------'+this.selectData.f_repairman)
738
- act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
739
- toRepair='一级派单'
740
- }
741
- let rep={
742
- loginUser: {
743
- name: this.$login.f.name,
744
- ename: this.$login.f.ename
745
- },
746
- f_meetunit: this.$login.f.deps,
747
- f_attendant: this.$login.f.name,
748
- f_outlets: this.$login.f.deps,
749
- f_remarks: this.selectData.f_remarks,
750
- f_repairtype: this.selectData.f_repairtype,
751
- toRepair: toRepair,
752
- activity:act
753
- }
754
- for(let i=0; i<this.dangerGroups.length; i++){
755
- let defectIdStr = ''
756
- const defectIds = []
757
- for (let j = 0; j < this.dangerGroups[i].dangers.length; j++) {
758
- defectIds.push(`'${this.dangerGroups[i].dangers[j].f_defect_id}'`)
759
- }
760
- defectIdStr = `(${defectIds.join(',')})`
761
- const data = {
762
- id:this.dangerGroups[i].dangers[0].f_paper_id,
763
- repData:rep,
764
- source:'pc',
765
- defectIdStr: defectIdStr
766
- }
767
- console.log('data=', JSON.stringify(data))
768
- try {
769
- let result =await new HttpResetClass().load('post','/rs/logic/phoneUploadRectification', data, {resolveMsg: null, rejectMsg: null})
770
- if (result.data.code==200) {
771
- successCount += result.data.successcon
772
- this.progressbarWidth=Math.ceil((i+1)*100/(this.dangerGroups.length))
773
- }
774
- }catch (e) {
775
- this.showModal3=false
776
- this.$showMessage('网络异常,请稍后再试!')
777
- return
778
- }
779
- }
780
- this.showModal3=false
781
- this.cancel1()
782
- this.$showMessage('本次转维修成功'+successCount+'单')
783
- },
784
- isChecked(row) {
785
- return this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id) != -1
786
- },
787
- setCheckes(row) {
788
- let index=this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id)
789
- if(index<0){
790
- this.checkes.push(row)
791
- }else{
792
- this.checkes.splice(index,1)
793
- }
794
- console.log('this.checkes=', JSON.stringify(this.checkes))
795
- },
796
- toRepair(){
797
- console.log('this.checkes=', JSON.stringify(this.checkes))
798
- if(this.checkes.length==0){
799
- return this.$showMessage('请先选择需要转维修的隐患!')
800
- }
801
-
802
- const dangerGroups = []
803
- for (const danger of this.checkes) {
804
- let i = dangerGroups.findIndex(dangerGroup => dangerGroup.f_userinfo_code === danger.f_userinfo_code)
805
- if (i == -1){
806
- dangerGroups.push({
807
- f_userinfo_code: danger.f_userinfo_code,
808
- dangers: []
809
- })
810
- i = dangerGroups.length - 1
811
- }
812
- dangerGroups[i].dangers.push(danger)
813
- }
814
- this.dangerGroups = dangerGroups
815
- console.log('this.dangerGroups=', JSON.stringify(this.dangerGroups))
816
- this.showModal2=true
817
- },
818
- changeDefect(val){
819
- try {
820
- if(val){
821
- for (var Key1 in this.DefectConfig){
822
- if(Key1 == val){
823
- this.DefectConfigs = [{label:'全部',value:''}]
824
- for(var Key2 in this.DefectConfig[Key1].items){
825
- this.DefectConfigs.push({label:Key2,value:Key2})
826
- }
827
- return
828
- }
829
- }
830
- }else if(val == ''){
831
- this.DefectConfigs = [{label:'全部',value:''}]
832
- for (var Key1 in this.DefectConfig){
833
- for(var Key2 in this.DefectConfig[Key1].items){
834
- this.DefectConfigs.push({label:Key2,value:Key2})
835
- }
836
- }
837
- }
838
- }catch (e) {
839
- //tag
840
- }
841
- },
842
- getDefectInfoConfig(val){
843
- try {
844
- if (val.safecheck.DevicesSetConfig != undefined) {
845
- this.DefectConfig = val.safecheck.DevicesConfig
846
- // 获取到配置项,进行遍历,获取每个隐患项
847
- for (var Key1 in this.DefectConfig){
848
- this.device_types.push({label:Key1,value:Key1})
849
- for(var Key2 in this.DefectConfig[Key1].items){
850
- this.DefectConfigs.push({label:Key2,value:Key2})
851
- }
852
- }
853
- // 非民用或其他配置项加入,在进行遍历
854
- }
855
- }catch (e) {
856
- //tag
857
- }
858
- },
859
- showaudio(){
860
- //tag
861
- this.audioshow=!this.audioshow
862
- //tag
863
- },
864
- getmeterbook(val){
865
- this.cbc=[]
866
- this.cbc.push({
867
- label:'全部',
868
- value:''
869
- })
870
- if (val==''){
871
-
872
- this.cbcs.forEach(res=>{
873
- this.cbc.push({
874
- label:res.f_book_name,
875
- value:res.id
876
- })
877
- })
878
- }else{
879
- this.cbcs.forEach(res=>{
880
- if (res.f_book_slice_area==val){
881
- this.cbc.push({
882
- label:res.f_book_name,
883
- value:res.id
884
- })
885
- }
886
- })
887
- }
888
- },
889
- getSafeParam(val){
890
- if(this.$appdata.getParam(val)){
891
- return [{label: '全部', value: ''}, ...this.$appdata.getParam(val)]
892
- }else{
893
- return [{label: '全部', value: ''}]
894
- }
895
-
896
- },
897
- Mreadibook(val){
898
- if (val){
899
- new HttpResetClass().load('POST',`/rs/sql/safe_singleTable_OrderBy`, {data: {
900
- items: 'name',
901
- tablename: 't_zone',
902
- condition: `parentid in ${val}`,
903
- orderitem: 'id'
904
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
905
- this.sliceArea=[{
906
- label:'全部',
907
- value:''
908
- }]
909
- res.data.forEach(ress=>{
910
- this.sliceArea.push({
911
- label:ress.name,
912
- value:ress.name
913
- })
914
- })
915
-
916
- })
917
- }
918
- },
919
- getAllMeterBook(val){
920
- this.cbcs=[]
921
- if (val){
922
- new HttpResetClass().load('POST',`/rs/sql/safe_singleTable_OrderBy`, {data: {
923
- items: 'f_book_name,f_book_slice_area,id',
924
- tablename: 't_meter_book',
925
- condition: `f_filiale_id in ${val}`,
926
- orderitem: 'id'
927
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
928
- res.data.forEach(ress=>{
929
- this.cbcs.push({
930
- id:ress.id,
931
- f_book_name:ress.f_book_name,
932
- f_book_slice_area:ress.f_book_slice_area
933
- })
934
- })
935
- this.cbc=[]
936
- this.cbc.push({
937
- label:'全部',
938
- value:''
939
- })
940
- this.cbcs.forEach(res=>{
941
- this.cbc.push({
942
- label:res.f_book_name,
943
- value:res.id
944
- })
945
- })
946
- })
947
- }
948
- },
949
- getRes(obj) {
950
- this.model.f_filialeid = this.$login.convertToIn(obj.resids);
951
- this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
952
- this.Mreadibook(this.model.f_filialeid)
953
- // this.getAllMeterBook(this.model.f_filialeid)
954
- //this.$refs.paged.$refs.criteria.search()
955
- },
956
-
957
- change(row) {
958
- // Vue.$login = {jwt: row.f_checker_id}
959
- asyncReady(this).then(() => {
960
- ////tag)
961
- row.f_upload_state = '已传'
962
- this.$goto('new-check-paper', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
963
- }).catch(
964
- (respanse) => {
965
- alert('获取配置文件失败')
966
- })
967
- },
968
- readConfig() {
969
- let gen = asyncReady(this)
970
- return co(gen)
971
- },
972
- showChooser() {
973
- this.showModal = true
974
- },
975
- hidden() {
976
- this.criteriaShow = !this.criteriaShow
977
- },
978
- refresh() {
979
- this.$refs.paged.$refs.criteria.search()
980
- },
981
- ok() {
982
- this.showModal = false
983
- if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
984
- this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
985
- this.model.f_check_plan=this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
986
- }
987
- },
988
- cancel() {
989
- this.showModal = false
990
- this.model.f_check_plan = {f_plan_name: '', id: ''}
991
- this.model.f_plan_id=''
992
- },
993
- print(row) {
994
- this.showcheckmsg = true
995
- this.checkInfo = row
996
- },
997
-
998
- sort(field, rule) {
999
- // 将所有排序方式设为不排序,实现相互排斥
1000
- for (let key in this.orderFields) {
1001
- if (key === field) {
1002
- this.orderFields[key] = rule
1003
- } else {
1004
- this.orderFields[key] = 'no'
1005
- }
1006
- }
1007
- // 如果新规则不排序,还原为默认排序
1008
- if (rule === 'no') {
1009
- this.model.paramSource.orderitem = `'${this.orderDefault}'`
1010
- } else {
1011
- this.model.paramSource.orderitem = `'${field} ${rule}'`
1012
- }
1013
- this.search()
1014
- },
1015
- search() {
1016
- this.$refs.paged.$refs.criteria.search()
1017
- },
1018
- selfSearch(args) {
1019
- ////tag
1020
- if (args.model.f_repair_result == '已处理'){
1021
- args.condition += ` and f_repair_date != '****-**-** **:**:**' `
1022
- }
1023
- if (args.model.f_repair_result == '未处理'){
1024
- args.condition += ` and f_repair_date = '****-**-** **:**:**' `
1025
- }
1026
- args.condition += ` and f_filialeid in ${this.model.f_filialeid} `
1027
- this.model.search(args.condition, args.model, args.condValue)
1028
- },
1029
- getPcds(val) {
1030
- this.pcds = [{label: '全部', value: ''}]
1031
- new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
1032
- {data: {items: "*", tablename: "t_pcd", orderitem: "id", condition: `f_orgid in ${val}`}},
1033
- {resolveMsg: null, rejectMsg: null}).then((pcdlist) => {
1034
- pcdlist.data.forEach((result) => {
1035
- this.pcds.push({label: result.f_pcd, value: result.f_pcd})
1036
- })
1037
- })
1038
- },
1039
- },
1040
-
1041
- ready() {
1042
- this.getEmp()
1043
- this.readConfig()
1044
- this.function = this.f
1045
- this.getPcds(`('${this.$login.f.orgid}')`)
1046
- let gen = select(this)
1047
- // this.Mreadibook(`('${this.$login.f.orgid}')`)
1048
- co(gen)
1049
- },
1050
- watch: {
1051
- 'model.f_no_checkplan'(val) {
1052
- if (this.model.f_no_checkplan){
1053
- this.searchData.f_no_checkplan = val
1054
- }
1055
- if (this.model.f_no_checkplan == '有计划安检') {
1056
-
1057
- this.showChooser()
1058
- }
1059
- },
1060
- 'model.condition'(val) {
1061
- if (val) {
1062
- this.searchData.condition = val
1063
- }
1064
-
1065
- },
1066
- 'model.f_entry'(val) {
1067
- if (val) {
1068
- this.searchData.f_entry_status = val
1069
-
1070
- }
1071
- },
1072
- 'model.f_plan_id'(val) {
1073
- if (val) {
1074
- this.searchData.f_plan_id = val
1075
- }
1076
- },
1077
- 'model.f_slice_area'(val) {
1078
- if (val) {
1079
-
1080
- }
1081
- },
1082
- 'model.f_approved'(val) {
1083
- if (val) {
1084
- this.searchData.f_approved = val
1085
- }
1086
- },
1087
- }
1088
-
1089
- }
1090
- </script>
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="basic-main">
4
+ <criteria-paged :model="model" v-ref:paged @sort="sort">
5
+ <criteria partial='criteria' class="search_area" @condition-changed='$parent.selfSearch' v-ref:criteria>
6
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+ <div class="form-group col-sm-2" >
9
+ <label class="font_normal_body">客户编号</label>
10
+ <input type="text" class="input_search" v-model="model.f_userinfo_code"
11
+ style="width: 60%" placeholder="客户编号" condition="f_userinfo_code='{}'">
12
+ </div>
13
+ <div class="form-group col-sm-2" >
14
+ <label class="font_normal_body">客户名称</label>
15
+ <input type="text" class="input_search" v-model="model.f_user_name"
16
+ style="width: 60%" placeholder="客户名称" condition="f_user_name like '%{}%'">
17
+ </div>
18
+ <div class="form-group col-sm-2" >
19
+ <label class="font_normal_body">客户电话</label>
20
+ <input type="text" class="input_search" v-model="model.f_user_phone"
21
+ style="width: 60%" placeholder="客户电话" condition="f_user_phone like '%{}%'">
22
+ </div>
23
+ <div class="form-group col-sm-2" >
24
+ <label class="font_normal_body">小&emsp;&emsp;区</label>
25
+ <input type="text" class="input_search" v-model="model.f_residential_area"
26
+ style="width: 60%" placeholder="小区" condition="f_residential_area like '%{}%'">
27
+ </div>
28
+ <div class="form-group col-sm-2" >
29
+ <label class="font_normal_body">详细地址</label>
30
+ <input type="text" class="input_search" v-model="model.f_address"
31
+ style="width: 60%" placeholder="详细地址" condition="f_address like '%{}%'">
32
+ </div>
33
+ <div class="form-group col-sm-2" style="width: auto;margin-top:8px;float: right">
34
+
35
+ <export-excel-safe :data="$parent.$parent.searchData"
36
+ :field="$parent.$parent.excelHeaders"
37
+ progress="safeGetExportProgress"
38
+ sqlurl="rs/logic/SafeExportExcel" sql-name="defectDetails" template-name='安检隐患明细' :choose-col="true"></export-excel-safe>
39
+ <!-- <button class="button_spacing button_search" @click="$parent.$parent.showaudio()" v-if="!$parent.$parent.audioshow">录音</button>-->
40
+ <button class="button_spacing button_search" @click="$parent.$parent.showaudio()" v-if="$parent.$parent.audioshow">隐藏</button>
41
+ <button class="button_search" @click="$parent.$parent.toRepair" v-if="$parent.$parent.canToRepair == '是'">转维修</button>
42
+
43
+ <button class="button_spacing button_search" @click="search()">查询</button>
44
+ <div style="float: right" class="button_spacing"
45
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
46
+ @click="$parent.$parent.hidden()"></div>
47
+ </div>
48
+
49
+ </div>
50
+ <div class="row">
51
+ <div class="col-sm-4 form-group" v-show="$parent.$parent.criteriaShow" style="margin: 0">
52
+ <role-selector-safe
53
+ role-name="安检员"
54
+ role-lable="安&nbsp;检&nbsp;员&nbsp;"
55
+ @re-res="$parent.$parent.getRes"
56
+ :value.sync="model.f_checker_id"
57
+ v-model="model.f_checker_id"
58
+ condition="f_checker_name in {}"
59
+ :value-multiple="true">
60
+ </role-selector-safe>
61
+ </div>
62
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
63
+ <label class="font_normal_body">检&ensp;查&ensp;项</label>
64
+ <v-select :value.sync="model.f_device_type" v-model='model.f_device_type'
65
+ :value-single="true" style="width: 60%"
66
+ class="select_list select"
67
+ :options='$parent.$parent.device_types' placeholder='检查项'
68
+ close-on-select
69
+ @change="$parent.$parent.changeDefect"
70
+ condition="f_device_type like '%{}%'"></v-select>
71
+ <!--<input type="text" class="input_search" v-model="model.f_device_type"-->
72
+ <!--style="width: 60%" placeholder="检&ensp;查&ensp;项" condition="f_device_type like '%{}%'">-->
73
+ </div>
74
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
75
+ <label class="font_normal_body">隐患名称</label>
76
+ <v-select :value.sync="model.f_item_name" v-model='model.f_item_name'
77
+ :value-single="true" style="width: 60%"
78
+ class="select_list select"
79
+ :options='$parent.$parent.DefectConfigs' placeholder='隐患名称'
80
+ close-on-select
81
+ condition="f_item_name like '%{}%'"></v-select>
82
+ </div>
83
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
84
+ <label class="font_normal_body">安检起始</label>
85
+ <datepicker
86
+ :value.sync="model.f_check_start"
87
+ placeholder='安检起始时间' style="width: 60%"
88
+ :disabled-days-of-week="[]"
89
+ :format="'yyyy-MM-dd'"
90
+ :show-rest-button="reset"
91
+ v-model="model.f_check_start"
92
+ condition="f_offsite_time >='{} 00:00:00'">
93
+ </datepicker>
94
+ </div>
95
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
96
+ <label class="font_normal_body">安检结束</label>
97
+ <datepicker
98
+ :value.sync="model.f_check_end"
99
+ placeholder='安检结束时间' style="width: 60%"
100
+ :disabled-days-of-week="[]"
101
+ :format="'yyyy-MM-dd'"
102
+ :show-rest-button="reset"
103
+ v-model="model.f_check_end"
104
+ condition="f_offsite_time <='{} 23:59:59'">
105
+ </datepicker>
106
+ </div>
107
+
108
+ </div>
109
+ <div class="row">
110
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
111
+ <label class="font_normal_body">维修结果</label>
112
+ <v-select class="select_list select"
113
+ placeholder='维修结果' style="width: 60%"
114
+ :value.sync="model.f_repaired" v-model="model.f_repaired"
115
+ :options='$parent.$parent.repaireds'
116
+ filer-key="name"
117
+ close-on-select clear-button
118
+ condition="f_repaired='{}'"
119
+ :value-single="true">
120
+ </v-select>
121
+ <!--<input type="text" class="input_search" v-model="model.f_device_type"-->
122
+ <!--style="width: 60%" placeholder="检&ensp;查&ensp;项" condition="f_device_type like '%{}%'">-->
123
+ </div>
124
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
125
+ <label class="font_normal_body">用户类型</label>
126
+ <v-select class="select_list select"
127
+ placeholder='用户类型' style="width: 60%"
128
+ :value.sync="model.f_check_type" v-model="model.f_check_type"
129
+ :options='$parent.$parent.checktype'
130
+ filer-key="name"
131
+ close-on-select clear-button
132
+ condition="f_check_type='{}'"
133
+ :value-single="true">
134
+ </v-select>
135
+ </div>
136
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
137
+ <label class="font_normal_body">片&emsp;&emsp;区</label>
138
+ <v-select class="select_list select"
139
+ placeholder='片区' style="width: 60%"
140
+ :value.sync="model.f_slice_area" v-model="model.f_slice_area"
141
+ :options='$parent.$parent.sliceArea'
142
+ filer-key="name"
143
+ close-on-select clear-button
144
+ condition="f_slice_area='{}'"
145
+ :value-single="true">
146
+ </v-select>
147
+ </div>
148
+
149
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
150
+ <label class="font_normal_body">区&emsp;&emsp;域</label>
151
+ <v-select class="select_list select"
152
+ placeholder='请选择' style="width: 60%"
153
+ :value.sync="model.f_pcd" v-model="model.f_pcd"
154
+ :options='$parent.$parent.pcds'
155
+ filer-key="name"
156
+ clear-button
157
+ condition="f_pcd in {}"
158
+ :multiple="true">
159
+ </v-select>
160
+ </div>
161
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
162
+ <label class="font_normal_body">处理人</label>
163
+ <input type="text" class="input_search" v-model="model.f_repairman"
164
+ style="width: 60%" placeholder="处理人" condition="f_repairman like '%{}%'">
165
+ </div>
166
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
167
+ <label class="font_normal_body">处理起始</label>
168
+ <datepicker
169
+ :value.sync="model.f_repair_start"
170
+ placeholder='处理起始时间' style="width: 60%"
171
+ :disabled-days-of-week="[]"
172
+ :format="'yyyy-MM-dd'"
173
+ :show-rest-button="reset"
174
+ v-model="model.f_repair_start"
175
+ condition="f_repair_date >='{} 00:00:00'">
176
+ </datepicker>
177
+ </div>
178
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
179
+ <label class="font_normal_body">处理结束</label>
180
+ <datepicker
181
+ :value.sync="model.f_repair_end"
182
+ placeholder='处理结束时间' style="width: 60%"
183
+ :disabled-days-of-week="[]"
184
+ :format="'yyyy-MM-dd'"
185
+ :show-rest-button="reset"
186
+ v-model="model.f_repair_end"
187
+ condition="f_repair_date <='{} 23:59:59'">
188
+ </datepicker>
189
+ </div>
190
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
191
+ <label class="font_normal_body">处理结果</label>
192
+ <v-select class="select_list select"
193
+ placeholder='处理结果' style="width: 60%"
194
+ :value.sync="model.f_repair_result" v-model="model.f_repair_result"
195
+ :options='$parent.$parent.repairresults'
196
+ filer-key="name"
197
+ close-on-select clear-button
198
+ :value-single="true">
199
+ </v-select>
200
+ </div>
201
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
202
+ <label class="font_normal_body">逾期起始</label>
203
+ <datepicker
204
+ :value.sync="model.f_handle_start"
205
+ placeholder='逾期起始时间' style="width: 60%"
206
+ :disabled-days-of-week="[]"
207
+ :format="'yyyy-MM-dd'"
208
+ :show-rest-button="reset"
209
+ v-model="model.f_handle_start"
210
+ condition="f_handle_date >='{} 00:00:00'">
211
+ </datepicker>
212
+ </div>
213
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
214
+ <label class="font_normal_body">逾期结束</label>
215
+ <datepicker
216
+ :value.sync="model.f_handle_end"
217
+ placeholder='逾期结束时间' style="width: 60%"
218
+ :disabled-days-of-week="[]"
219
+ :format="'yyyy-MM-dd'"
220
+ :show-rest-button="reset"
221
+ v-model="model.f_handle_end"
222
+ condition="f_handle_date <='{} 23:59:59'">
223
+ </datepicker>
224
+ </div>
225
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
226
+ <label class="font_normal_body">逾期状态</label>
227
+ <v-select class="select_list select"
228
+ placeholder='逾期状态' style="width: 60%"
229
+ :value.sync="model.f_is_handle" v-model="model.f_is_handle"
230
+ :options='$parent.$parent.ishandles'
231
+ filer-key="name"
232
+ close-on-select clear-button
233
+ condition="f_is_handle='{}'"
234
+ :value-single="true">
235
+ </v-select>
236
+ </div>
237
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
238
+ <label class="font_normal_body">处理方式</label>
239
+ <v-select class="select_list select"
240
+ placeholder='处理方式' style="width: 60%"
241
+ :value.sync="model.f_is_repaired" v-model="model.f_is_repaired"
242
+ :options='$parent.$parent.is_repaired'
243
+ filer-key="name"
244
+ close-on-select clear-button
245
+ condition="f_is_repaired='{}'"
246
+ :value-single="true">
247
+ </v-select>
248
+ </div>
249
+ <div class="form-group col-sm-2" v-show="$parent.$parent.criteriaShow">
250
+ <label class="font_normal_body">隐患状态</label>
251
+ <v-select class="select_list select"
252
+ placeholder='隐患状态' style="width: 60%"
253
+ :value.sync="model.is_repaired" v-model="model.is_repaired"
254
+ :options='$parent.$parent.is_repaireds'
255
+ filer-key="name"
256
+ close-on-select clear-button
257
+ condition="is_repaired='{}'"
258
+ :value-single="true">
259
+ </v-select>
260
+ </div>
261
+ </div>
262
+ <modal :show.sync="$parent.$parent.showModal" v-ref:modal>
263
+ <div slot="modal-header" class="modal-header">
264
+ <h4 class="modal-title">
265
+ 选择计划
266
+ </h4>
267
+ </div>
268
+ <div slot="modal-body" class="modal-body">
269
+ <plan-chooser :f.sync="$parent.$parent.fun" v-ref:chooser></plan-chooser>
270
+ </div>
271
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
272
+ <button class="button_search" @click="$parent.$parent.ok">确认</button>
273
+ <button class="button_search" @click="$parent.$parent.cancel">取消</button>
274
+ </div>
275
+ </modal>
276
+ </div>
277
+ </criteria>
278
+ <data-grid class="list_area table_sy" style="overflow: hidden" :model="model" partial='list' v-ref:grid>
279
+ <template partial='head'>
280
+ <tr>
281
+ <th v-if="$parent.$parent.$parent.canToRepair=='是'"><nobr>选择</nobr></th>
282
+ <th>
283
+ <nobr>检查项</nobr>
284
+ </th>
285
+ <th>
286
+ <nobr>隐患原因</nobr>
287
+ </th>
288
+ <th>
289
+ <nobr>隐患级别</nobr>
290
+ </th>
291
+ <th>
292
+ <nobr>客户编号</nobr>
293
+ </th>
294
+ <th>
295
+ <nobr>客户名称</nobr>
296
+ </th>
297
+ <th>
298
+ <nobr>客户电话</nobr>
299
+ </th>
300
+ <th>
301
+ <nobr>客户小区</nobr>
302
+ </th>
303
+ <th>
304
+ <data-order field="f_address" name="客户地址"></data-order>
305
+ </th>
306
+
307
+ <th>
308
+ <data-order field="f_offsite_time" name="安检时间"></data-order>
309
+ </th>
310
+ <th>
311
+ <nobr>逾期时间</nobr>
312
+ </th>
313
+ <th>
314
+ <nobr>逾期状态</nobr>
315
+ </th>
316
+ <th>
317
+ <nobr>安检员</nobr>
318
+ </th>
319
+ <th>
320
+ <nobr>处理方式</nobr>
321
+ </th>
322
+ <th>
323
+ <nobr>处理人</nobr>
324
+ </th>
325
+ <th>
326
+ <nobr>处理时间</nobr>
327
+ </th>
328
+ <th>
329
+ <nobr>处理结果</nobr>
330
+ </th>
331
+ <th>
332
+ <nobr>操作</nobr>
333
+ </th>
334
+ </tr>
335
+ </template>
336
+ <template partial='body'>
337
+ <td v-if="$parent.$parent.$parent.canToRepair=='是'" style="text-align: center;white-space:nowrap;"><input type="checkbox" v-if="['现场已处理','维修已处理','无隐患','转维修'].indexOf(row.f_is_repaired) == -1" @click="$event.cancelBubble=true" :checked="$parent.$parent.$parent.isChecked(row)" @change="$parent.$parent.$parent.setCheckes(row)"></input></td>
338
+ <td style="text-align: center">{{row.f_device_type}}</td>
339
+ <td style="text-align: center">{{row.f_item_name}}/{{row.f_item_value}}</td>
340
+ <td style="text-align: center">{{row.f_defect_level}}</td>
341
+ <td style="text-align: center">{{row.f_userinfo_code}}</td>
342
+ <td style="text-align: center">{{row.f_user_name}}</td>
343
+ <td style="text-align: center">{{row.f_user_phone}}</td>
344
+ <td style="text-align: center">{{row.f_residential_area}}</td>
345
+ <td style="text-align: center">{{row.f_address}}</td>
346
+ <td style="text-align: center">{{row.f_offsite_time}}</td>
347
+ <td style="text-align: center">{{row.f_handle_date}}</td>
348
+ <td style="text-align: center">{{row.f_is_handle}}</td>
349
+ <td style="text-align: center">{{row.f_checker_name}}</td>
350
+ <td style="text-align: center">{{row.f_is_repaired}}</td>
351
+ <td style="text-align: center">{{row.f_repairman}}</td>
352
+ <td style="text-align: center">{{row.f_repair_date}}</td>
353
+ <td style="text-align: center">{{row.f_repair_result}}</td>
354
+ <td style="text-align: center">
355
+ <button v-if="row.f_is_repaired == '隐患未处理' || (row.f_is_repaired == '用户自行整改' && row.f_repair_result == '未处理') " class="button_spacing button_search-1" @click="$parent.$parent.$parent.solveDefect( row, 'solve')">处理隐患</button>
356
+ </td>
357
+ </template>
358
+ </data-grid>
359
+ </criteria-paged>
360
+ <check-msg v-if="showcheckmsg" :show="showcheckmsg" :data="checkInfo"></check-msg>
361
+ </div>
362
+ <modal :show.sync="showModal2" :backdrop="false">
363
+ <div slot="modal-header" class="modal-header">
364
+ <h4 class="modal-title">
365
+ 转维修
366
+ </h4>
367
+ </div>
368
+ <div slot="modal-body" class="modal-body">
369
+ <div v-if="true">
370
+ <div>
371
+
372
+ </div>
373
+ <!-- <div v-for="(index, item) in dangerGroup">-->
374
+
375
+ <!-- </div>-->
376
+ <div class="row" style="margin-top: 10px">
377
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">派发类型</label>
378
+ <div class="col-xs-8 col-md-8">
379
+ <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
380
+ :options='dispatchTypeOptions' placeholder='派发类型'
381
+ close-on-select>
382
+ </v-select>
383
+ </div>
384
+ </div>
385
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
386
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">维&ensp;修&ensp;员</label>
387
+ <div class="col-xs-8 col-md-8">
388
+ <v-select
389
+ :value.sync="selectData.f_repairman"
390
+ :value-single="true"
391
+ :options='repairers'
392
+ placeholder='请选择维修员'
393
+ close-on-select></v-select>
394
+ </div>
395
+ </div>
396
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
397
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">站&ensp;&ensp;&ensp;&ensp;点</label>
398
+ <div class="col-xs-8 col-md-8">
399
+ <right-tree
400
+ islist
401
+ :userid="userid"
402
+ :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
403
+ @re-res="getSiteRes"></right-tree>
404
+ </div>
405
+ </div>
406
+ <div class="row" style="margin-top: 10px">
407
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">报修类型</label>
408
+ <div class="col-xs-8 col-md-8">
409
+ <v-select :value.sync="selectData.f_repairtype" style="width:60%"
410
+ class="select select_list"
411
+ :value-single="true"
412
+ :options='repairTypeOptions'
413
+ close-on-select>
414
+ </v-select>
415
+ </div>
416
+ </div>
417
+ <div class="row" style="margin-top: 10px">
418
+ <label class="control-label font text-left" style="float:left;margin-left:20%;margin-top:5px">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
419
+ <div class="col-xs-8 col-md-8">
420
+ <textarea style="width: 60%; height: 100px" v-model="selectData.f_remarks"></textarea>
421
+ </div>
422
+ </div>
423
+ </div>
424
+ </div>
425
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
426
+ <button class="button_search" @click="rectification">转维修</button>
427
+ <button class="button_search" @click="cancel1">取消</button>
428
+ </div>
429
+ </modal>
430
+ <modal :show.sync="showSolveModal" v-ref:solveModal>
431
+ <div slot="modal-header" class="modal-header">
432
+ <h4 class="modal-title">
433
+ {{solveModal.preData.type == 'view'?'处理详情':'处理隐患'}}
434
+ </h4>
435
+ </div>
436
+ <div slot="modal-body" class="modal-body">
437
+ <div style="width: 100%;height: 36px;background-color: #f1f8ff;float: left">
438
+ <div style="width: 8px;height: 100%;background-color: #6aa6e2;margin-right: 20px;float: left"></div>
439
+ <div style="width: auto;height:100%;float: left;"><p class="title-font" style="margin-top: 5px">处理前</p></div>
440
+ </div>
441
+
442
+ <div class="col-sm-6" style="margin-top: 10px">
443
+ <label class="font_normal_body">安&nbsp;检&nbsp;员</label>
444
+ <input class="input_search" style="width: 60%" type="text" disabled="true" v-model="check.f_checker_name" placeholder="安检员">
445
+ </div>
446
+ <div class="col-sm-6" style="margin-top: 10px">
447
+ <label class="font_normal_body">安检时间</label>
448
+ <input class="input_search" style="width: 60%" type="text" disabled="true" v-model="check.f_offsite_time" placeholder="安检时间">
449
+ </div>
450
+ <div class="col-sm-12" style="margin-bottom: 10px">
451
+ <label class="font_normal_body">隐患图片</label>
452
+ <img-self :width="200" :height="200" :src="solveModal.preData.defectImg"></img-self>
453
+ </div>
454
+
455
+ <div style="width: 100%;height: 36px;background-color: #f1f8ff;float: left">
456
+ <div style="width: 8px;height: 100%;background-color: #6aa6e2;margin-right: 20px;float: left"></div>
457
+ <div style="width: auto;height:100%;float: left;"><p class="title-font" style="margin-top: 5px">处理后</p></div>
458
+ </div>
459
+ <div class="col-sm-6" style="margin-top: 10px">
460
+ <label class="font_normal_body">处&nbsp;理&nbsp;人</label>
461
+ <input class="input_search" style="width: 60%" disabled="true" type="text" v-model="solveModal.uploadData.f_repairman" placeholder="处理人">
462
+ </div>
463
+ <div class="col-sm-6" style="margin-top: 10px">
464
+ <label class="font_normal_body">处理时间</label>
465
+ <datepicker
466
+ :disabled="solveModal.preData.type == 'view'"
467
+ placeholder='处理时间' style="width:60%"
468
+ :disabled-days-of-week="[]"
469
+ :format="'yyyy-MM-dd'"
470
+ :show-rest-button="reset"
471
+ :value.sync="solveModal.uploadData.f_repair_date">
472
+ </datepicker>
473
+ </div>
474
+ <div v-if="solveModal.preData.type == 'solve'" class="col-sm-12" style="margin-bottom: 10px">
475
+ <label class="font_normal_body">处理后图片</label>
476
+ <avatar-upload :width="200" :height="200" :img-src.sync="solveModal.uploadData.imgSrc" :filename.sync="solveModal.uploadData.filename" v-ref:imginfo></avatar-upload>
477
+ </div>
478
+ <div v-if="solveModal.preData.type == 'view'" class="col-sm-12" style="margin-bottom: 10px">
479
+ <label class="font_normal_body">处理后图片</label>
480
+ <img-self :width="200" :height="200" :src="solveModal.preData.repairedImg"></img-self>
481
+ </div>
482
+ </div>
483
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
484
+ <button class="button_search" v-if="solveModal.preData.type == 'solve'" @click="ok2">确认</button>
485
+ <button class="button_search" @click="cancel2">取消</button>
486
+ </div>
487
+ </modal>
488
+ </div>
489
+ </template>
490
+
491
+ <script>
492
+ import {PagedList} from 'vue-client'
493
+ import Vue from 'vue'
494
+ import co from 'co'
495
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
496
+ import BenzAMRRecorder from 'benz-amr-recorder'
497
+ import * as Util from "../../Util";
498
+
499
+ const upSolveDefect = function* (self) {
500
+ let uploadData = self.solveModal.uploadData
501
+ //tag)
502
+ self.$resetpost('/rs/logic/pcRepairDefect', self.solveModal.uploadData, {resolveMsg: null, rejectMsg: null})
503
+ .then(res => {
504
+ if (res.data.code == 200) {
505
+ self.$showMessage('隐患已处理。')
506
+ self.showSolveModal = false
507
+ self.$refs.paged.$refs.criteria.search()
508
+ }
509
+ })
510
+ }
511
+
512
+ //获取json配置文件
513
+ let asyncReady = async function (self) {
514
+ // 获取配置信息
515
+ try {
516
+ let res = await Vue.resetget(`/phone/rs/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
517
+ Vue.config = res.data
518
+ self.getDefectInfoConfig(res.data)
519
+ } catch (error) {
520
+ // 忽略704,文件找不到异常R
521
+ if (error.status !== 704) {
522
+ throw error
523
+ }
524
+ }
525
+ }
526
+
527
+ let select = function* (self) {
528
+ let http = new HttpResetClass()
529
+ let getGasman = yield http.load('POST', '/rs/search', {
530
+ source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1))',
531
+ userid: self.$login.f.id
532
+ }, {resolveMsg: null, rejectMsg: null})
533
+ ////tag
534
+ self.checkersid.push({label: '全部', value: ''})
535
+ getGasman.data.forEach((checker) => {
536
+ self.checkersid.push({label: checker.name, value: checker.id})
537
+ })
538
+ }
539
+
540
+ export default {
541
+ title: '隐患明细查看',
542
+ data() {
543
+ let model = new PagedList('rs/sql/defectDetails', 20)
544
+ model.f_plan_id = ''
545
+ model.f_approved = ''
546
+ model.f_entry = ''
547
+ model.f_no_checkplan = ''
548
+ model.f_filialeid = `('${this.$login.f.orgid}')`
549
+ //model.f_check_type='民用'
550
+ // let searchData={
551
+ // f_plan_id: this.model.f_checker_id==undefined?"":this.model.f_checker_id,
552
+ // f_approved: this.model.f_approved,
553
+ // f_entry_status: this.model.f_entry,
554
+ // f_no_checkplan:this.model.f_no_checkplan[0],
555
+ // f_filialeid: this.model.f_filialeid,
556
+ // //orderitem: this.model.f_offsite_time,
557
+ // //condition:this.model.condition
558
+ // }
559
+ // model.f_subcompany = this.$login.f.f_fengongsi
560
+ return {
561
+ audioshow:false,
562
+ showSolveModal: false,
563
+ searchData: {
564
+ condition: "1=1",
565
+ },
566
+ model: model,
567
+ //searchData:searchData,
568
+ excelHeaders: {
569
+ 'f_device_type': '检查项',
570
+ 'f_item_name': '隐患名称',
571
+ 'f_item_value': '隐患原因',
572
+ 'f_userinfo_code': '客户编号',
573
+ 'f_user_name': '客户姓名',
574
+ 'f_user_phone': '客户电话',
575
+ 'f_residential_area': '小区',
576
+ 'f_address': '客户地址',
577
+ 'f_offsite_time': '安检时间',
578
+ 'f_handle_date': '逾期时间',
579
+ 'f_is_handle': '逾期状态',
580
+ 'f_checker_name': '安检员',
581
+ 'f_is_repaired': '处理方式',
582
+ 'f_repairman': '处理人',
583
+ 'f_repair_date': '处理时间',
584
+ 'f_repair_result': '处理结果'
585
+ },
586
+ fun: this.$login.f,
587
+ checkersid: [],
588
+ safetype: this.getSafeParam('安检类型'),
589
+ criteriaShow: false,
590
+ repaireds: [{label: '全部', value: ''},{label: '已修', value: '已修'},{label: '未修', value: '未修'}],
591
+ checktype: [{label: '全部', value: ''},{label: '民用', value: '民用'},{label: '非民用', value: '非民用'}],
592
+ showModal: false,
593
+ pcds: [],
594
+ f_approval_states: this.getSafeParam('安检单审核状态'),
595
+ f_entry_status:this.getSafeParam('安检状态'),
596
+ f_checkplans: this.getSafeParam('有无计划'),
597
+ is_repaired: this.getSafeParam('安检患隐处理方式'),
598
+ is_repaireds:[{label: '全部', value: ''},{label: '已处理未消除隐患', value: '已处理未消除隐患'},{label: '已处理已消除隐患', value: '已处理已消除隐患'}],
599
+ showcheckmsg: false,
600
+ checkInfo: {},
601
+ repairers: [],
602
+ dispatchTypeOptions: [{label: '派发给站点', value: '派发给站点'},{label: '派发给维修员', value: '派发给维修员'}],
603
+ canToRepair: this.$appdata.getSingleValue('隐患明细转维修') || '是',
604
+ repairTypeOptions:this.$appdata.getParam('报修类型'),
605
+ selectData:{
606
+ dispatchType:'',
607
+ f_repairman:'',
608
+ f_remarks:'',
609
+ f_repairtype:''
610
+ },
611
+ checkes: [],
612
+ showModal2: false,
613
+ solveModal: {
614
+ preData: {
615
+ type: 'view',
616
+ defectImg: '',
617
+ repairedImg: ''
618
+ },
619
+ uploadData: {
620
+ id: '',
621
+ f_repairman: this.$login.f.name,
622
+ f_repair_date: Util.getNowDate().substr(0, 10),
623
+ f_repair_path: '',
624
+ imgSrc: '',
625
+ filename: ''
626
+ }
627
+ },
628
+ orderDefault: "'f_offsite_time'",
629
+ orderFields: {
630
+ f_offsite_time: 'no'
631
+ },
632
+ sliceArea: [],
633
+ cbc:[],
634
+ DefectConfig:'' ,
635
+ DefectConfigs:[{label:'全部',value:''},{label:'气量异常差值',value:'气量异常差值'}],
636
+ ishandles:[{label:'全部',value:''},{label:'未逾期',value:'未逾期'},{label:'已逾期',value:'已逾期'}],
637
+ repairresults:[{label:'全部',value:''},{label:'已处理',value:'已处理'},{label:'未处理',value:'未处理'}],
638
+ device_types:[{label:'全部',value:''}],
639
+ }
640
+ },
641
+ methods: {
642
+ ok2() {
643
+ if (!(this.solveModal.uploadData.filename && this.solveModal.uploadData.filename.length > 0)) {
644
+ this.$showMessage('请录入处理后照片')
645
+ return
646
+ }
647
+ co(upSolveDefect(this))
648
+ },
649
+ cancel2() {
650
+ this.showSolveModal = false
651
+ this.showToRepairModal = false
652
+ },
653
+ solveDefect(row, type) {
654
+ if(row.f_repair_path && row.f_repair_path.startsWith('http')){
655
+ this.solveModal.preData.repairedImg = row.f_repair_path
656
+ }else {
657
+ this.solveModal.preData.repairedImg = '/rs/image/file/' + row.f_repair_path
658
+ }
659
+ this.solveModal.preData.defectImg = '/rs/image/file/' + row.f_path
660
+ this.solveModal.uploadData.id = row.id
661
+ this.solveModal.preData.type = type
662
+ if (type == 'view') {
663
+ this.solveModal.preData.f_repair_path = '/rs/image/file/' + row.f_repair_path
664
+ this.solveModal.uploadData.f_repairman = row.f_repairman
665
+ this.solveModal.uploadData.f_repair_date = row.f_repair_date
666
+ } else {
667
+ this.solveModal.uploadData.f_repairman = this.$login.f.name
668
+ this.solveModal.uploadData.f_repair_date = Util.getNowDate().substr(0, 10)
669
+ }
670
+ this.showSolveModal = !this.showSolveModal
671
+ },
672
+ getEmp() {
673
+ let val = {source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1 ))', userid: `${this.$login.f.id}`}
674
+ let http = new HttpResetClass()
675
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
676
+ if (res.data.length == 0){
677
+ this.repairers= []
678
+ return
679
+ }
680
+ res.data.forEach((user)=>{
681
+ this.repairers.push({label: user.name, value: user.name})
682
+ })
683
+ })
684
+ },
685
+ getSiteRes(obj) {
686
+ console.log('siteRes ---> ')
687
+ console.log(obj)
688
+ if(obj.resids[0]){
689
+ this.selectData.f_meetunit = obj.res.join('.')
690
+ this.selectData.f_reciever = obj.resids.join('.')
691
+ this.selectData.f_outlets = obj.res[obj.res.length - 1]
692
+ }else {
693
+ this.selectData.f_meetunit = ''
694
+ this.selectData.f_reciever = ''
695
+ this.selectData.f_outlets = ''
696
+ }
697
+ },
698
+ cancel1(){
699
+ this.showModal2=false
700
+ this.selectData={
701
+ dispatchType:'',
702
+ f_repairman:'',
703
+ f_remarks:'',
704
+ f_repairtype:''
705
+ }
706
+ },
707
+ async rectification(){
708
+ if(this.selectData.dispatchType){
709
+ if(this.selectData.dispatchType=='派发给站点'){
710
+ if(!this.selectData.f_reciever){
711
+ this.$showMessage('请选择部门!')
712
+ return
713
+ }
714
+ }else{
715
+ if(!this.selectData.f_repairman){
716
+ this.$showMessage('请选择维修员!')
717
+ return
718
+ }
719
+ }
720
+ }else {
721
+ this.$showMessage('请选择派发类型!')
722
+ return
723
+ }
724
+
725
+ if(!this.selectData.f_repairtype){
726
+ this.$showMessage('请选择报修类型!')
727
+ return
728
+ }
729
+ this.showModal3=true
730
+ let act={}
731
+ let toRepair=''
732
+ let successCount=0
733
+ if(this.selectData.dispatchType=='派发给站点'){
734
+ act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
735
+ toRepair=null
736
+ }else{
737
+ console.log('派发给维修员---------'+this.selectData.f_repairman)
738
+ act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
739
+ toRepair='一级派单'
740
+ }
741
+ let rep={
742
+ loginUser: {
743
+ name: this.$login.f.name,
744
+ ename: this.$login.f.ename
745
+ },
746
+ f_meetunit: this.$login.f.deps,
747
+ f_attendant: this.$login.f.name,
748
+ f_outlets: this.$login.f.deps,
749
+ f_remarks: this.selectData.f_remarks,
750
+ f_repairtype: this.selectData.f_repairtype,
751
+ toRepair: toRepair,
752
+ activity:act
753
+ }
754
+ for(let i=0; i<this.dangerGroups.length; i++){
755
+ let defectIdStr = ''
756
+ const defectIds = []
757
+ for (let j = 0; j < this.dangerGroups[i].dangers.length; j++) {
758
+ defectIds.push(`'${this.dangerGroups[i].dangers[j].f_defect_id}'`)
759
+ }
760
+ defectIdStr = `(${defectIds.join(',')})`
761
+ const data = {
762
+ id:this.dangerGroups[i].dangers[0].f_paper_id,
763
+ repData:rep,
764
+ source:'pc',
765
+ defectIdStr: defectIdStr
766
+ }
767
+ console.log('data=', JSON.stringify(data))
768
+ try {
769
+ let result =await new HttpResetClass().load('post','/rs/logic/phoneUploadRectification', data, {resolveMsg: null, rejectMsg: null})
770
+ if (result.data.code==200) {
771
+ successCount += result.data.successcon
772
+ this.progressbarWidth=Math.ceil((i+1)*100/(this.dangerGroups.length))
773
+ }
774
+ }catch (e) {
775
+ this.showModal3=false
776
+ this.$showMessage('网络异常,请稍后再试!')
777
+ return
778
+ }
779
+ }
780
+ this.showModal3=false
781
+ this.cancel1()
782
+ this.$showMessage('本次转维修成功'+successCount+'单')
783
+ },
784
+ isChecked(row) {
785
+ return this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id) != -1
786
+ },
787
+ setCheckes(row) {
788
+ let index=this.checkes.findIndex(item => item.f_defect_id == row.f_defect_id)
789
+ if(index<0){
790
+ this.checkes.push(row)
791
+ }else{
792
+ this.checkes.splice(index,1)
793
+ }
794
+ console.log('this.checkes=', JSON.stringify(this.checkes))
795
+ },
796
+ toRepair(){
797
+ console.log('this.checkes=', JSON.stringify(this.checkes))
798
+ if(this.checkes.length==0){
799
+ return this.$showMessage('请先选择需要转维修的隐患!')
800
+ }
801
+
802
+ const dangerGroups = []
803
+ for (const danger of this.checkes) {
804
+ let i = dangerGroups.findIndex(dangerGroup => dangerGroup.f_userinfo_code === danger.f_userinfo_code)
805
+ if (i == -1){
806
+ dangerGroups.push({
807
+ f_userinfo_code: danger.f_userinfo_code,
808
+ dangers: []
809
+ })
810
+ i = dangerGroups.length - 1
811
+ }
812
+ dangerGroups[i].dangers.push(danger)
813
+ }
814
+ this.dangerGroups = dangerGroups
815
+ console.log('this.dangerGroups=', JSON.stringify(this.dangerGroups))
816
+ this.showModal2=true
817
+ },
818
+ changeDefect(val){
819
+ try {
820
+ if(val){
821
+ for (var Key1 in this.DefectConfig){
822
+ if(Key1 == val){
823
+ this.DefectConfigs = [{label:'全部',value:''}]
824
+ for(var Key2 in this.DefectConfig[Key1].items){
825
+ this.DefectConfigs.push({label:Key2,value:Key2})
826
+ }
827
+ return
828
+ }
829
+ }
830
+ }else if(val == ''){
831
+ this.DefectConfigs = [{label:'全部',value:''}]
832
+ for (var Key1 in this.DefectConfig){
833
+ for(var Key2 in this.DefectConfig[Key1].items){
834
+ this.DefectConfigs.push({label:Key2,value:Key2})
835
+ }
836
+ }
837
+ }
838
+ }catch (e) {
839
+ //tag
840
+ }
841
+ },
842
+ getDefectInfoConfig(val){
843
+ try {
844
+ if (val.safecheck.DevicesSetConfig != undefined) {
845
+ this.DefectConfig = val.safecheck.DevicesConfig
846
+ // 获取到配置项,进行遍历,获取每个隐患项
847
+ for (var Key1 in this.DefectConfig){
848
+ this.device_types.push({label:Key1,value:Key1})
849
+ for(var Key2 in this.DefectConfig[Key1].items){
850
+ this.DefectConfigs.push({label:Key2,value:Key2})
851
+ }
852
+ }
853
+ // 非民用或其他配置项加入,在进行遍历
854
+ }
855
+ }catch (e) {
856
+ //tag
857
+ }
858
+ },
859
+ showaudio(){
860
+ //tag
861
+ this.audioshow=!this.audioshow
862
+ //tag
863
+ },
864
+ getmeterbook(val){
865
+ this.cbc=[]
866
+ this.cbc.push({
867
+ label:'全部',
868
+ value:''
869
+ })
870
+ if (val==''){
871
+
872
+ this.cbcs.forEach(res=>{
873
+ this.cbc.push({
874
+ label:res.f_book_name,
875
+ value:res.id
876
+ })
877
+ })
878
+ }else{
879
+ this.cbcs.forEach(res=>{
880
+ if (res.f_book_slice_area==val){
881
+ this.cbc.push({
882
+ label:res.f_book_name,
883
+ value:res.id
884
+ })
885
+ }
886
+ })
887
+ }
888
+ },
889
+ getSafeParam(val){
890
+ if(this.$appdata.getParam(val)){
891
+ return [{label: '全部', value: ''}, ...this.$appdata.getParam(val)]
892
+ }else{
893
+ return [{label: '全部', value: ''}]
894
+ }
895
+
896
+ },
897
+ Mreadibook(val){
898
+ if (val){
899
+ new HttpResetClass().load('POST',`/rs/sql/safe_singleTable_OrderBy`, {data: {
900
+ items: 'name',
901
+ tablename: 't_zone',
902
+ condition: `parentid in ${val}`,
903
+ orderitem: 'id'
904
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
905
+ this.sliceArea=[{
906
+ label:'全部',
907
+ value:''
908
+ }]
909
+ res.data.forEach(ress=>{
910
+ this.sliceArea.push({
911
+ label:ress.name,
912
+ value:ress.name
913
+ })
914
+ })
915
+
916
+ })
917
+ }
918
+ },
919
+ getAllMeterBook(val){
920
+ this.cbcs=[]
921
+ if (val){
922
+ new HttpResetClass().load('POST',`/rs/sql/safe_singleTable_OrderBy`, {data: {
923
+ items: 'f_book_name,f_book_slice_area,id',
924
+ tablename: 't_meter_book',
925
+ condition: `f_filiale_id in ${val}`,
926
+ orderitem: 'id'
927
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
928
+ res.data.forEach(ress=>{
929
+ this.cbcs.push({
930
+ id:ress.id,
931
+ f_book_name:ress.f_book_name,
932
+ f_book_slice_area:ress.f_book_slice_area
933
+ })
934
+ })
935
+ this.cbc=[]
936
+ this.cbc.push({
937
+ label:'全部',
938
+ value:''
939
+ })
940
+ this.cbcs.forEach(res=>{
941
+ this.cbc.push({
942
+ label:res.f_book_name,
943
+ value:res.id
944
+ })
945
+ })
946
+ })
947
+ }
948
+ },
949
+ getRes(obj) {
950
+ this.model.f_filialeid = this.$login.convertToIn(obj.resids);
951
+ this.searchData.f_filialeid = this.$login.convertToIn(obj.resids);
952
+ this.Mreadibook(this.model.f_filialeid)
953
+ // this.getAllMeterBook(this.model.f_filialeid)
954
+ //this.$refs.paged.$refs.criteria.search()
955
+ },
956
+
957
+ change(row) {
958
+ // Vue.$login = {jwt: row.f_checker_id}
959
+ asyncReady(this).then(() => {
960
+ ////tag)
961
+ row.f_upload_state = '已传'
962
+ this.$goto('new-check-paper', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
963
+ }).catch(
964
+ (respanse) => {
965
+ alert('获取配置文件失败')
966
+ })
967
+ },
968
+ readConfig() {
969
+ let gen = asyncReady(this)
970
+ return co(gen)
971
+ },
972
+ showChooser() {
973
+ this.showModal = true
974
+ },
975
+ hidden() {
976
+ this.criteriaShow = !this.criteriaShow
977
+ },
978
+ refresh() {
979
+ this.$refs.paged.$refs.criteria.search()
980
+ },
981
+ ok() {
982
+ this.showModal = false
983
+ if (this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id) {
984
+ this.model.f_plan_id = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow.id
985
+ this.model.f_check_plan=this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
986
+ }
987
+ },
988
+ cancel() {
989
+ this.showModal = false
990
+ this.model.f_check_plan = {f_plan_name: '', id: ''}
991
+ this.model.f_plan_id=''
992
+ },
993
+ print(row) {
994
+ this.showcheckmsg = true
995
+ this.checkInfo = row
996
+ },
997
+
998
+ sort(field, rule) {
999
+ // 将所有排序方式设为不排序,实现相互排斥
1000
+ for (let key in this.orderFields) {
1001
+ if (key === field) {
1002
+ this.orderFields[key] = rule
1003
+ } else {
1004
+ this.orderFields[key] = 'no'
1005
+ }
1006
+ }
1007
+ // 如果新规则不排序,还原为默认排序
1008
+ if (rule === 'no') {
1009
+ this.model.paramSource.orderitem = `'${this.orderDefault}'`
1010
+ } else {
1011
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
1012
+ }
1013
+ this.search()
1014
+ },
1015
+ search() {
1016
+ this.$refs.paged.$refs.criteria.search()
1017
+ },
1018
+ selfSearch(args) {
1019
+ ////tag
1020
+ if (args.model.f_repair_result == '已处理'){
1021
+ args.condition += ` and f_repair_date != '****-**-** **:**:**' `
1022
+ }
1023
+ if (args.model.f_repair_result == '未处理'){
1024
+ args.condition += ` and f_repair_date = '****-**-** **:**:**' `
1025
+ }
1026
+ args.condition += ` and f_filialeid in ${this.model.f_filialeid} `
1027
+ this.model.search(args.condition, args.model, args.condValue)
1028
+ },
1029
+ getPcds(val) {
1030
+ this.pcds = [{label: '全部', value: ''}]
1031
+ new HttpResetClass().load("POST", `/rs/sql/safe_singleTable_OrderBy`,
1032
+ {data: {items: "*", tablename: "t_pcd", orderitem: "id", condition: `f_orgid in ${val}`}},
1033
+ {resolveMsg: null, rejectMsg: null}).then((pcdlist) => {
1034
+ pcdlist.data.forEach((result) => {
1035
+ this.pcds.push({label: result.f_pcd, value: result.f_pcd})
1036
+ })
1037
+ })
1038
+ },
1039
+ },
1040
+
1041
+ ready() {
1042
+ this.getEmp()
1043
+ this.readConfig()
1044
+ this.function = this.f
1045
+ this.getPcds(`('${this.$login.f.orgid}')`)
1046
+ let gen = select(this)
1047
+ // this.Mreadibook(`('${this.$login.f.orgid}')`)
1048
+ co(gen)
1049
+ },
1050
+ watch: {
1051
+ 'model.f_no_checkplan'(val) {
1052
+ if (this.model.f_no_checkplan){
1053
+ this.searchData.f_no_checkplan = val
1054
+ }
1055
+ if (this.model.f_no_checkplan == '有计划安检') {
1056
+
1057
+ this.showChooser()
1058
+ }
1059
+ },
1060
+ 'model.condition'(val) {
1061
+ if (val) {
1062
+ this.searchData.condition = val
1063
+ }
1064
+
1065
+ },
1066
+ 'model.f_entry'(val) {
1067
+ if (val) {
1068
+ this.searchData.f_entry_status = val
1069
+
1070
+ }
1071
+ },
1072
+ 'model.f_plan_id'(val) {
1073
+ if (val) {
1074
+ this.searchData.f_plan_id = val
1075
+ }
1076
+ },
1077
+ 'model.f_slice_area'(val) {
1078
+ if (val) {
1079
+
1080
+ }
1081
+ },
1082
+ 'model.f_approved'(val) {
1083
+ if (val) {
1084
+ this.searchData.f_approved = val
1085
+ }
1086
+ },
1087
+ }
1088
+
1089
+ }
1090
+ </script>