safecheck-client 4.0.0-55 → 4.0.0-57

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