safecheck-client 3.0.30-8 → 3.0.30-80

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