safecheck-client 3.0.34-2 → 3.0.34-21

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