safecheck-client 3.0.34-79 → 3.0.34-80

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