safecheck-client 3.0.39-73 → 3.0.39-74

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