safecheck-client 3.0.35-6 → 3.0.35-61

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +31 -31
  3. package/src/components/NewDefectList/DefectPaperNew.vue +3 -3
  4. package/src/components/Util/SafecheckUpload.vue +4 -0
  5. package/src/components/android/AddPlanItemYy.vue +451 -451
  6. package/src/components/android/CheckPlanDown.vue +1 -1
  7. package/src/components/android/CivilCurrentCreate.vue +56 -41
  8. package/src/components/android/Insurance/PhoneInsurancePurchaseDetail.vue +7 -9
  9. package/src/components/android/NoCivilCurrentCreate.vue +10 -0
  10. package/src/components/android/PaperFeedback.vue +1 -1
  11. package/src/components/android/PhoneSellInfo.vue +100 -65
  12. package/src/components/android/PhoneUpUserinfo.vue +25 -6
  13. package/src/components/android/PhoneotherInfo.vue +0 -14
  14. package/src/components/android/PhoneotherInfov3.vue +118 -0
  15. package/src/components/android/SafecheckDevices.vue +2 -2
  16. package/src/components/android/SafecheckOrderV.vue +2 -529
  17. package/src/components/android/examples/SafeListExamples.vue +296 -296
  18. package/src/components/pc/AddPlanItemYyChange.vue +743 -0
  19. package/src/components/pc/NewCheckpaper.vue +58 -3
  20. package/src/components/pc/SecurityCheckLedger.vue +143 -0
  21. package/src/components/pc/SecurityCheckList.vue +160 -0
  22. package/src/components/pc/SecurityCheckManage.vue +113 -0
  23. package/src/components/pc/SecurityCheckUser.vue +440 -0
  24. package/src/components/planmanage/PlanManage.vue +47 -1
  25. package/src/components/report/CheckPlanAreaList.vue +25 -5
  26. package/src/components/rongcheng/AddPlanItem.vue +1 -1
  27. package/src/components/rongcheng/AspiratedAreaPlan.vue +575 -574
  28. package/src/components/rongcheng/AspiratedPaperFeedbackm.vue +4 -0
  29. package/src/components/rongcheng/AspiratedUserInfo.vue +12 -4
  30. package/src/components/rongcheng/CheckSearchUser.vue +1 -1
  31. package/src/components/rongcheng/PhoneUpUserinfo.vue +1236 -1236
  32. package/src/components/rongcheng/SafecheckOrderV.vue +1 -1
  33. package/src/components/rongcheng/SafecheckUserInfo.vue +12 -12
  34. package/src/components/userfile/InfoModifyModal.vue +1 -0
  35. package/src/components/userfile/UserInfoAudit.vue +2 -0
  36. package/src/components/userfile/UserinfoModify.vue +6 -0
  37. package/src/filiale/bayan/android/AddPlanItem.vue +450 -430
  38. package/src/filiale/bayan/android/CurrentCreate.vue +10 -0
  39. package/src/filiale/bayan/android/PhoneUpUserinfo.vue +1380 -1380
  40. package/src/filiale/bayan/android/SafecheckOrderV.vue +9 -0
  41. package/src/filiale/bayan/android/SafecheckUserInfo.vue +882 -868
  42. package/src/filiale/bayan/pc/DefectPaperNew.vue +22 -1
  43. package/src/filiale/bayan/pc/SelectCheckPlan.vue +6 -1
  44. package/src/filiale/bayan/pc/usergashistory.vue +149 -0
  45. package/src/filiale/bayan/pc/usergashistorynian.vue +149 -0
  46. package/src/filiale/bayan/pc.js +24 -22
  47. package/src/filiale/dexin/android/SafecheckOrderV.vue +7 -11
  48. package/src/filiale/dexin/pc/DefectListNew.vue +643 -0
  49. package/src/filiale/dexin/pc/DefectMainNew.vue +63 -0
  50. package/src/filiale/dexin/pc/DefectPaperNew.vue +1066 -0
  51. package/src/filiale/dexin/pc.js +1 -0
  52. package/src/filiale/huaran/android/CheckPlanDown.vue +212 -0
  53. package/src/filiale/huaran/android.js +1 -0
  54. package/src/filiale/huaran/pc/PaperList.vue +22 -1
  55. package/src/filiale/huaran/pc/PlanManage.vue +66 -7
  56. package/src/filiale/huaran/pc/checkUserList.vue +55 -22
  57. package/src/filiale/huaran/pc.js +1 -0
  58. package/src/filiale/minsheng/android/PhoneUpUserinfo.vue +21 -1
  59. package/src/filiale/qianneng/android/SwitchValve.vue +1 -0
  60. package/src/filiale/rizhao/pc/NewCheckpaper.vue +10 -5
  61. package/src/filiale/shanxian/android/SafecheckOrderV.vue +1 -1
  62. package/src/filiale/shanxian/pc/SelectCheckPlan.vue +21 -0
  63. package/src/filiale/shanxian/pc/checkUserList.vue +1 -1
  64. package/src/filiale/siyang/android/AddPlanItem.vue +450 -450
  65. package/src/filiale/siyang/android/PaperFeedback.vue +1514 -0
  66. package/src/filiale/siyang/android.js +1 -0
  67. package/src/filiale/siyang/pc/PlanManage.vue +26 -16
  68. package/src/filiale/siyang/pc/checkUserList.vue +123 -148
  69. package/src/filiale/tianke/pc/DefectListNew.vue +10 -3
  70. package/src/filiale/tongchuan/android/SafecheckOrderV.vue +3 -3
  71. package/src/filiale/tongchuan/pc/CheckSearchUser.vue +5 -13
  72. package/src/filiale/weinan/android/PaperFeedback.vue +34 -8
  73. package/src/filiale/weinan/android/SafecheckOrderV.vue +6 -2
  74. package/src/filiale/weinan/android/SafecheckUserInfo.vue +14 -0
  75. package/src/filiale/weinan/pc/NewCheckpaper.vue +20 -0
  76. package/src/filiale/weinan/pc/PaperList.vue +14 -1
  77. package/src/filiale/xilan/android/CurrentCreate.vue +0 -14
  78. package/src/filiale/xilan/android.js +10 -11
  79. package/src/filiale/xilan/pc/PaperList.vue +795 -0
  80. package/src/filiale/xilan/pc.js +1 -0
  81. package/src/filiale/yangchunboneng/pc/CheckPlanAreaList.vue +1 -1
  82. package/src/filiale/zhongsheng/android/SafecheckDevices.vue +4 -4
  83. package/src/filiale/zhongsheng/pc/CheckPlanAreaList.vue +33 -1
  84. package/src/main.js +1 -1
  85. package/src/safecheck-android.js +303 -307
  86. package/src/safecheck.js +15 -0
  87. package/src/filiale/xilan/android/AddPlanItem.vue +0 -461
@@ -0,0 +1,643 @@
1
+ <template>
2
+ <div>
3
+ <div :style="{'height':needRepair?'60%':'100%'}">
4
+ <criteria-paged :model="model" :pager="false" v-ref:paged>
5
+ <!-- <criteria partial='criteria' @condition-changed='$parent.search' v-ref:criteria>-->
6
+ <!-- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>-->
7
+ <!-- <div class="row">-->
8
+ <!-- <div style="width:40% ">-->
9
+ <!-- <label class="font_normal_body">检查类别</label>-->
10
+ <!-- <v-select-->
11
+ <!-- :value.sync="model.f_device_type"-->
12
+ <!-- v-model="model.f_device_type"-->
13
+ <!-- :options='$parent.$parent.checkType'-->
14
+ <!-- :placeholder='model.f_device_type'-->
15
+ <!-- condition="f_device_type= '{}'"-->
16
+ <!-- close-on-select>-->
17
+ <!-- </v-select>-->
18
+ <!-- </div>-->
19
+ <!-- <div class=" col-sm-4 form-group button-range" >-->
20
+ <!-- <div class="span" style="float: right;margin-top: 8px">-->
21
+ <!-- <button style="float: right" class="button_search button_spacing" @click="search">查询</button>-->
22
+ <!-- </div>-->
23
+ <!-- </div>-->
24
+ <!-- </div>-->
25
+ <!-- </div>-->
26
+ <!-- </criteria>-->
27
+ <criteria partial='criteria'>
28
+ <div partial>
29
+ <ul class="nav nav-tabs">
30
+ <li role="presentation" class="active"><a style=" color: #5ac0d9 !important;">隐患明细</a></li>
31
+ </ul>
32
+ </div>
33
+ </criteria>
34
+ <data-grid :model="model" partial='list' class="table_sy">
35
+ <template partial='head'>
36
+ <tr>
37
+ <th>
38
+ <nobr>检查类别</nobr>
39
+ </th>
40
+ <th>
41
+ <nobr>隐患项</nobr>
42
+ </th>
43
+ <th>
44
+ <nobr>隐患原因</nobr>
45
+ </th>
46
+ <th>
47
+ <nobr>隐患处理方式</nobr>
48
+ </th>
49
+ <th>
50
+ <nobr>处理结果</nobr>
51
+ </th>
52
+ <th v-if="$parent.$parent.$parent.checkDefect=='是'">
53
+ <nobr>审核结果</nobr>
54
+ </th>
55
+ <th>
56
+ <nobr>操作</nobr>
57
+ </th>
58
+ </tr>
59
+ </template>
60
+ <template partial='body'>
61
+ <td style="text-align: center">
62
+ <nobr>{{row.f_device_type}}</nobr>
63
+ </td>
64
+ <td style="text-align: center">
65
+ <nobr>{{row.f_item_name}}</nobr>
66
+ </td>
67
+ <td style="text-align: center">
68
+ <nobr>{{row.f_item_value}}</nobr>
69
+ </td>
70
+ <td style="text-align: center">
71
+ <nobr>{{row.f_repaire_type}}</nobr>
72
+ </td>
73
+ <td style="text-align: center">
74
+ <nobr>{{row.f_repaire_state}}</nobr>
75
+ </td>
76
+ <td style="text-align: center" v-if="$parent.$parent.$parent.checkDefect=='是'">
77
+ <nobr>{{row.f_audit_results?row.f_audit_results:'暂无审核结果'}}</nobr>
78
+ </td>
79
+ <td style="text-align: center">
80
+ <div>
81
+ <!-- <img-button v-if="row.f_repaire_type != '无隐患' && row.f_repaire_type != '维修已处理' && row.f_path" :src="'/rs/image/file/'+row.f_path" :value="'隐患图片'"></img-button>-->
82
+ <!-- <button style="margin-top: 3px" v-if="row.f_repaire_type == '维修已处理'" class="button_new-1 button_spacing" @click="$parent.$parent.$parent.solveDefect( row, 'view')">处理详情</button>-->
83
+ <button style="margin-top: 3px" class="button_new-1 button_spacing" @click="$parent.$parent.$parent.solveDefect(row, row.f_repaire_type)">处理详情</button>
84
+ <button style="margin-top: 3px" v-if="row.f_repaire_type == '隐患未处理' && $parent.$parent.$parent.showHandleDefectButton === '是'" class="button_spacing button_search-1" @click="$parent.$parent.$parent.solveDefect(row, 'solve')">处理隐患</button>
85
+ </div>
86
+ </td>
87
+ </template>
88
+ </data-grid>
89
+ </criteria-paged>
90
+ </div>
91
+ <div style="overflow-y: scroll;height: 40%" v-if="needRepair">
92
+ <div class="form-horizontal auto">
93
+ <ul class="nav nav-tabs">
94
+ <li role="presentation" class="active"><a style=" color: #000 !important;font-size: 14px">转维修</a></li>
95
+ </ul>
96
+ <validator name='v' @valid="valid = true" @invalid="valid = false">
97
+ <div class="row">
98
+ <div class="col-sm-4" :class="[$v.dispatchtype.required ? 'select-error' : '']">
99
+ <label for="dispatchtype" class="font_normal_body">派发类型</label>
100
+ <input id="dispatchtype" type="text" v-show="false" v-model="$refs.dispatchtype.selectedItems" v-validate:dispatchtype='{required: true }'>
101
+ <v-select :value.sync="toRepairModal.preData.dispatchType" v-model="toRepairModal.preData.dispatchType"
102
+ :options='toRepairModal.preData.dispatchTypeOptions' placeholder='派发类型'
103
+ close-on-select v-ref:dispatchtype>
104
+ </v-select>
105
+ </div>
106
+ <div class="col-sm-4 " v-if="toRepairModal.preData.dispatchType == '派发给站点'">
107
+ <label class="font_normal_body">站&nbsp;&nbsp;点</label>
108
+ <right-tree
109
+ islist
110
+ :userid="$login.f.id"
111
+ :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
112
+ @re-res="getSiteRes">
113
+ </right-tree>
114
+ </div>
115
+ <div class="col-sm-4 " v-if="toRepairModal.preData.dispatchType == '派发给维修员'" :class="[$v.f_repairman.required ? 'select-error' : '']">
116
+ <input type="text" v-show="false" v-model="toRepairModal.preData.f_repairman" v-validate:f_repairman='{required: true }'>
117
+ <label class="font_normal_body">维修员</label>
118
+ <v-select
119
+ :value.sync="toRepairModal.preData.f_repairman"
120
+ :value-single="true"
121
+ :options='toRepairModal.preData.repairers'
122
+ placeholder='请选择维修员'
123
+ close-on-select></v-select>
124
+ </div>
125
+ <div class="col-sm-4" :class="[$v.f_repairtype.required ? 'select-error' : '']">
126
+ <input type="text" v-show="false" v-model="toRepairModal.preData.f_repairtype" v-validate:f_repairtype='{required: true }'>
127
+ <label class="font_normal_body">报修类型</label>
128
+ <v-select :value.sync="toRepairModal.preData.f_repairtype" style="width:60%"
129
+ class="select select_list"
130
+ :value-single="true"
131
+ :options='toRepairModal.preData.repairTypeOptions'
132
+ close-on-select>
133
+ </v-select>
134
+ </div>
135
+ </div>
136
+ <div class="row">
137
+ <div class="col-sm-8 form-group">
138
+ <label class="font_normal_body" >备&emsp;&emsp;注</label>
139
+ <input class="input_search" style="width: 60%" type="text" v-model="toRepairModal.preData.f_remarks" placeholder="备注">
140
+
141
+ </div>
142
+ <div class="col-sm-4" style="margin-top: 1%">
143
+ <button class="button_search" :disabled="!valid" @click="confirm">转维修</button>
144
+ </div>
145
+ </div>
146
+ </validator>
147
+ </div>
148
+ </div>
149
+ <modal :show.sync="showSolveModal" v-ref:solveModal>
150
+ <div slot="modal-header" class="modal-header">
151
+ <h4 class="modal-title">
152
+ {{solveModal.preData.type == 'view'?'处理详情':'处理隐患'}}
153
+ </h4>
154
+ </div>
155
+ <div slot="modal-body" class="modal-body">
156
+ <div style="width: 100%;height: 36px;background-color: #f1f8ff;float: left">
157
+ <div style="width: 8px;height: 100%;background-color: #6aa6e2;margin-right: 20px;float: left"></div>
158
+ <div style="width: auto;height:100%;float: left;"><p class="title-font" style="margin-top: 5px">处理前</p></div>
159
+ </div>
160
+
161
+ <div class="col-sm-6" style="margin-top: 10px">
162
+ <label class="font_normal_body">安&nbsp;检&nbsp;员</label>
163
+ <input class="input_search" style="width: 60%" type="text" disabled="true" v-model="check.f_checker_name" placeholder="安检员">
164
+ </div>
165
+ <div class="col-sm-6" style="margin-top: 10px">
166
+ <label class="font_normal_body">安检时间</label>
167
+ <input class="input_search" style="width: 60%" type="text" disabled="true" v-model="check.f_offsite_time" placeholder="安检时间">
168
+ </div>
169
+ <div class="col-sm-12" style="margin-bottom: 10px" v-if="solveModal.preData.defectImg">
170
+ <label class="font_normal_body">隐患图片</label>
171
+ <img-self :width="200" :height="200" :src="solveModal.preData.defectImg"></img-self>
172
+ </div>
173
+ <div class="col-sm-12" style="margin-bottom: 10px" v-show="solveModal.preData.defectImg1">
174
+ <label class="font_normal_body">隐患图片</label>
175
+ <img-self :width="200" :height="200" :src="solveModal.preData.defectImg1"></img-self>
176
+ </div>
177
+ <div class="col-sm-12" style="margin-bottom: 10px" v-show="solveModal.preData.defectImg2">
178
+ <label class="font_normal_body">隐患图片</label>
179
+ <img-self :width="200" :height="200" :src="solveModal.preData.defectImg2"></img-self>
180
+ </div>
181
+ <div class="col-sm-12" style="margin-bottom: 10px" v-show="solveModal.preData.defectImg3">
182
+ <label class="font_normal_body">隐患图片</label>
183
+ <img-self :width="200" :height="200" :src="solveModal.preData.defectImg3"></img-self>
184
+ </div>
185
+
186
+ <div style="width: 100%;height: 36px;background-color: #f1f8ff;float: left" v-show="solveModal.preData.state == '已处理' || solveModal.preData.type != 'solve'">
187
+ <div style="width: 8px;height: 100%;background-color: #6aa6e2;margin-right: 20px;float: left"></div>
188
+ <div style="width: auto;height:100%;float: left;"><p class="title-font" style="margin-top: 5px">处理后</p></div>
189
+ </div>
190
+ <div class="col-sm-6" style="margin-top: 10px" v-show="solveModal.preData.state == '已处理'">
191
+ <label class="font_normal_body">处&nbsp;理&nbsp;人</label>
192
+ <input v-if="solveModal.preData.type != 'solve'" class="input_search" style="width: 60%" disabled="true" type="text" v-model="solveModal.uploadData.f_repairman" placeholder="处理人">
193
+ <v-select
194
+ v-if="solveModal.preData.type == 'solve'"
195
+ :value.sync="solveModal.uploadData.f_repairman"
196
+ :value-single="true"
197
+ :options='toRepairModal.preData.repairers'
198
+ placeholder='请选择维修员'
199
+ close-on-select></v-select>
200
+ </div>
201
+ <div class="col-sm-6" style="margin-top: 10px" v-show="solveModal.preData.state == '已处理'">
202
+ <label class="font_normal_body">处理时间</label>
203
+ <datepicker
204
+ :disabled="solveModal.preData.type == 'view'"
205
+ placeholder='处理时间' style="width:60%"
206
+ :disabled-days-of-week="[]"
207
+ :format="'yyyy-MM-dd'"
208
+ :show-rest-button="reset"
209
+ :value.sync="solveModal.uploadData.f_repair_date">
210
+ </datepicker>
211
+ </div>
212
+ <div v-if="solveModal.preData.type == 'solve'" class="col-sm-12" style="margin-bottom: 10px">
213
+ <label class="font_normal_body">处理后图片</label>
214
+ <avatar-upload :width="200" :height="200" :img-src.sync="solveModal.uploadData.imgSrc" :filename.sync="solveModal.uploadData.filename" v-ref:imginfo></avatar-upload>
215
+ </div>
216
+ <div v-if="solveModal.preData.state == '已处理'" class="col-sm-12" style="margin-bottom: 10px">
217
+ <p> <label class="font_normal_body">处理后图片</label></p>
218
+ <P></P>
219
+ <div class="col-sm-12">
220
+ <div class="col-sm-6" v-if="solveModal.preData.repairedImg">
221
+ <img-self :width="200" :height="200" :src="solveModal.preData.repairedImg" style="margin-left: 10px"></img-self>
222
+ </div>
223
+ <div class="col-sm-6" v-if="solveModal.preData.repairedImg1">
224
+ <img-self :width="200" :height="200" :src="solveModal.preData.repairedImg1" style="margin-left: 10px"></img-self>
225
+ </div>
226
+ <div class="col-sm-6" v-if="solveModal.preData.repairedImg2">
227
+ <img-self :width="200" :height="200" :src="solveModal.preData.repairedImg2" style="margin-left: 10px"></img-self>
228
+ </div>
229
+ <div class="col-sm-6" v-if="solveModal.preData.repairedImg2">
230
+ <img-self :width="200" :height="200" :src="solveModal.preData.repairedImg2" style="margin-left: 10px"></img-self>
231
+ </div>
232
+ <div class="col-sm-6" v-if="solveModal.preData.repairedImg3">
233
+ <img-self :width="200" :height="200" :src="solveModal.preData.repairedImg3" style="margin-left: 10px"></img-self>
234
+ </div>
235
+ <div class="col-sm-6" v-if="solveModal.preData.repairedImg4">
236
+ <img-self :width="200" :height="200" :src="solveModal.preData.repairedImg4" style="margin-left: 10px"></img-self>
237
+ </div>
238
+ <div class="col-sm-6" v-if="solveModal.preData.repairedImg5">
239
+ <img-self :width="200" :height="200" :src="solveModal.preData.repairedImg5" style="margin-left: 10px"></img-self>
240
+ </div>
241
+
242
+ </div>
243
+ </div>
244
+ </div>
245
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
246
+ <button class="button_search" v-if="checkDefect=='是' && solveModal.preData.type == 'view'" @click="auditsure('通过')" v-if="solveModal.preData.type == 'view' && !solveModal.f_audit_results">审核通过</button>
247
+ <button class="button_search" v-if="checkDefect=='是' && solveModal.preData.type == 'view'" @click="auditsure('不通过')" v-if="solveModal.preData.type == 'view' && !solveModal.f_audit_results">审核不通过</button>
248
+ <button class="button_search" v-if="solveModal.preData.type == 'solve'" @click="ok">确认</button>
249
+ <button class="button_search" @click="cancel">取消</button>
250
+ </div>
251
+ </modal>
252
+
253
+ </div>
254
+ </template>
255
+
256
+ <script>
257
+ import {PagedList, HttpResetClass} from 'vue-client'
258
+ import * as Util from '../../Util'
259
+ import co from 'co'
260
+ import Vue from "vue";
261
+
262
+ const upSolveDefect = function * (self) {
263
+ let uploadData = self.solveModal.uploadData
264
+ //tag)
265
+ self.$resetpost('/rs/logic/pcRepairDefectNew', self.solveModal.uploadData, {resolveMsg: null, rejectMsg: null})
266
+ .then(res => {
267
+ if (res.data.code === 200) {
268
+ self.$showMessage('隐患已处理。')
269
+ self.showSolveModal = false
270
+ self.model.search('f_repaire_type != \'无隐患\'', {})
271
+ self.solveModal.uploadData={
272
+ id: '',
273
+ f_repairman: self.$login.f.name,
274
+ f_repair_date: Util.getNowDate().substr(0, 10),
275
+ f_repair_path: '',
276
+ imgSrc: '',
277
+ filename: '',
278
+ f_defect_remark:''
279
+ }
280
+ }
281
+ })
282
+ }
283
+
284
+ const sendRepair = function* (self) {
285
+ let preData = self.toRepairModal.preData
286
+ let uploadData = self.toRepairModal.uploadData
287
+
288
+ if (preData.dispatchType == '派发给站点') {
289
+ uploadData.model.serviceacitivity[0].f_meetunit = preData.f_meetunit
290
+ uploadData.model.serviceacitivity[0].f_reciever = preData.f_reciever
291
+ uploadData.model.f_meetunit = preData.f_meetunit
292
+ uploadData.model.f_orgstr = preData.f_reciever
293
+ uploadData.model.f_outlets = preData.f_outlets
294
+ } else if (preData.dispatchType == '派发给维修员') {
295
+ uploadData.model.serviceacitivity[0].f_reciever = preData.f_repairman
296
+ // uploadData.model.f_meetunit = self.$login.f.orgpathnames
297
+ // uploadData.model.f_orgstr = self.$login.f.orgpathstr
298
+ // uploadData.model.f_outlets = self.$login.f.f_parentname
299
+ uploadData.model.f_meetunit = self.$login.f.deps
300
+ uploadData.model.f_orgid = self.$login.f.orgid
301
+ uploadData.model.f_filiale = self.$login.f.org
302
+ uploadData.model.f_outlets = self.$login.f.deps
303
+ uploadData.model.f_filiale_id = self.$login.f.orgid
304
+ uploadData.toRepair = '一级派单'
305
+ }
306
+ let res = yield self.$resetpost('/rs/sql/GetUserForRepaireNew', {data: {f_userinfo_id: self.check.f_userinfo_id}})
307
+ preData.userInfo = res.data[0]
308
+ uploadData.model = Object.assign(uploadData.model, preData.userInfo)
309
+ uploadData.user.f_userinfo_id = preData.userInfo.f_userinfo_id
310
+ uploadData.model.f_repair_date = Util.getNowDate()
311
+ uploadData.model.f_repairtype = preData.f_repairtype
312
+ uploadData.model.f_remarks = preData.f_remarks
313
+ uploadData.model.f_paper_id = self.check.id
314
+ // 拼接failure
315
+ let failure = []
316
+ self.model.rows.forEach(row => {
317
+ if (row.f_repaire_type == '隐患未处理') {
318
+ failure.push({
319
+ f_failure_type: row.f_item_name,
320
+ failurecase: row.f_item_value?row.f_item_value.split(','):''
321
+ })
322
+ }
323
+ })
324
+ uploadData.model.failure = failure
325
+ // 拼接repairitems
326
+ let rows = JSON.parse(JSON.stringify(self.model.rows))
327
+ let repairitems = {
328
+ data: []
329
+ }
330
+ let safecheckOptions = [{"data": "已处理"}, {"data": "未处理"}]
331
+ // 取隐患未处理的
332
+ rows = rows.filter(row => row.f_repaire_type == '隐患未处理')
333
+ //tag)
334
+ // 开始拼接
335
+ rows.forEach(row => {
336
+ let existIndex = -1
337
+ // 判断该设备是否已经存在
338
+ for (let i = 0; i < repairitems.data.length; i++) {
339
+ if (repairitems.data[i].f_type == row.f_device_type) {
340
+ existIndex = i
341
+ break
342
+ }
343
+ }
344
+ if (existIndex == -1) {
345
+ // 不存在则新建
346
+ let newItem = {
347
+ f_type: row.f_device_type,
348
+ details: [{
349
+ f_defect_id: row.id,
350
+ f_project: `${row.f_item_name}:${row.f_item_value}`,
351
+ type: 'selector',
352
+ options: safecheckOptions
353
+ }]
354
+ }
355
+ repairitems.data.push(newItem)
356
+ } else {
357
+ // 存在则追加
358
+ repairitems.data[existIndex].details.push({
359
+ f_defect_id: row.id,
360
+ f_project: `${row.f_item_name}:${row.f_item_value}`,
361
+ type: 'selector',
362
+ options: safecheckOptions
363
+ })
364
+ }
365
+ })
366
+ uploadData.model.f_repairitems = repairitems
367
+ //tag)
368
+ // 调工单接口
369
+ let result = yield self.$resetpost('/rs/logic/callerSend', uploadData)
370
+ //tag)
371
+ if (result.data.f_service_id) {
372
+ const data = {
373
+ f_paper_id: rows[0].f_paper_id,
374
+ f_service_id: result.data.f_service_id,
375
+ itemsId: self.$login.convertToIn(rows.map(row => row.id))
376
+ }
377
+ //tag
378
+ let updateRes = yield self.$resetpost('/rs/logic/updateDefectStateNew', data)
379
+ if (updateRes.data.code == 200) {
380
+ self.$showMessage('隐患已转维修。')
381
+ self.model.search(`f_repaire_type != '无隐患'`, {})
382
+ }
383
+ }
384
+ }
385
+
386
+ export default {
387
+ title: '隐患项列表',
388
+ data() {
389
+ return {
390
+ model: new PagedList('rs/sql/GetDefectByPaperIdNew', 100, {
391
+ f_paper_id: 'this.f_paper_id',f_item_value: 'this.f_item_value'
392
+ }),
393
+ checkType:this.$appdata.getParam('安检检查类别'),
394
+ showSolveModal: false,
395
+ showToRepairModal: false,
396
+ showDefectModal: false,
397
+ valid: false,
398
+ checkDefect:null,
399
+ needRepair: false,
400
+ solveModal: {
401
+ preData: {
402
+ type: '',
403
+ defectImg: '',
404
+ defectImg1:'',
405
+ defectImg2:'',
406
+ defectImg3:'',
407
+ repairedImg: '',
408
+ repairedImg1: '',
409
+ repairedImg2: '',
410
+ repairedImg3: '',
411
+ repairedImg4: '',
412
+ repairedImg5: '',
413
+ state: ''
414
+ },
415
+ uploadData: {
416
+ id: '',
417
+ f_repairman: this.$login.f.name,
418
+ f_repair_date: Util.getNowDate().substr(0, 10),
419
+ f_repair_path: '',
420
+ imgSrc: '',
421
+ filename: ''
422
+ }
423
+ },
424
+ toRepairModal: {
425
+ preData: {
426
+ dispatchTypeOptions: [{label: '派发给站点', value: '派发给站点'}, {label: '派发给维修员', value: '派发给维修员'}],
427
+ repairTypeOptions: this.$appdata.getParam('报修类型'),
428
+ dispatchType: '',
429
+ f_repairman: '',
430
+ f_repairtype: '',
431
+ f_remarks: '',
432
+ f_meetunit: '',
433
+ f_reciever: '',
434
+ f_outlets: '',
435
+ userInfo: {},
436
+ repairers: []
437
+ },
438
+ uploadData: {
439
+ model: {
440
+ serviceacitivity: [{
441
+ f_service_acitivity_type: '派单'
442
+ }],
443
+ f_repairitems: {},
444
+ failure: '',
445
+ f_source: '安检',
446
+ f_service_id: '',
447
+ f_contact_phone: '',
448
+ f_meetunit: '',
449
+ f_phone: '',
450
+ f_user_name: '',
451
+ f_address: '',
452
+ f_repair_date: '',
453
+ f_reciever: '',
454
+ f_remarks: '',
455
+ f_user_type: '',
456
+ f_area: '',
457
+ f_unit_name: '',
458
+ f_street: '',
459
+ f_residential_area: '',
460
+ f_building: '',
461
+ f_unit: '',
462
+ f_floor: '',
463
+ f_room: '',
464
+ aState: '',
465
+ f_repairtype: '',
466
+ f_userinfo_id: '',
467
+ f_userinfo_code: '',
468
+ f_orgstr: '',
469
+ f_outlets: '',
470
+ f_attendant: this.$login.f.name
471
+ },
472
+ loginUser: {
473
+ name: this.$login.f.name,
474
+ ename: this.$login.f.ename
475
+ },
476
+ user: {
477
+ f_userinfo_id: ''
478
+ },
479
+ callObj: null
480
+ }
481
+ },
482
+ showHandleDefectButton: null
483
+ }
484
+ },
485
+ props: ['check'],
486
+ ready() {
487
+ this.checkDefect=Vue.$appdata.getSingleValue('安检隐患维修后审核')
488
+ this.showHandleDefectButton = Vue.$appdata.getSingleValue('隐患查看处理隐患')
489
+ this.model.f_item_value = `(SELECT stuff(( SELECT ',' + f_item_value FROM t_devices_items_lists WHERE ( f_is_defect = 'true' OR di.f_is_defect = 'true') AND f_item_id = di.id FOR xml path ( '' ) ),1,1,'' ) )`
490
+ if (this.check) {
491
+ this.model.f_paper_id = this.check.id
492
+ this.model.search(`f_repaire_type != '无隐患'`, {})
493
+ }
494
+ this.getEmp()
495
+ },
496
+ methods: {
497
+ search(args){
498
+ args.condition+=` and f_repaire_type != '无隐患' `
499
+ this.model.search(args.condition, args.model)
500
+ },
501
+ //审核通过
502
+ auditsure(info){
503
+ // 拿到t_devices_items 的ID,给f_audit_results中存入通过 如果未通过,需要可以再次派单,对隐患进行处理
504
+ var data = {
505
+ id: this.solveModal.uploadData.id,
506
+ info:info
507
+ }
508
+ let http = new HttpResetClass()
509
+ http.load('POST', 'rs/logic/DefectAuditUpdate', data, {resolveMsg: null, rejectMsg: null}).then((res) => {
510
+ if(res.data.code == 200){
511
+ this.model.search(`f_repaire_type != '无隐患'`, {})
512
+ this.showSolveModal = false
513
+ this.showToRepairModal = false
514
+ this.$showMessage('提交成功')
515
+ }else{
516
+ this.$showMessage('提交失败,请重试')
517
+ }
518
+ })
519
+ },
520
+ solveDefect(row, type) {
521
+ console.log(row)
522
+ this.solveModal.preData.defectImg = ''
523
+ this.solveModal.preData.f_repair_path = ''
524
+ this.solveModal.preData.repairedImg = ''
525
+ this.solveModal.preData.repairedImg1 = ''
526
+ this.solveModal.preData.repairedImg2 = ''
527
+ this.solveModal.preData.repairedImg3 = ''
528
+ this.solveModal.preData.repairedImg4 = ''
529
+ this.solveModal.preData.repairedImg5 = ''
530
+ this.solveModal.preData.defectImg = row.f_path?'/rs/image/file/' + row.f_path:''
531
+ this.solveModal.preData.defectImg1 = row.f_p1_path?'/rs/image/file/' + row.f_p1_path:''
532
+ this.solveModal.preData.defectImg2 = row.f_p2_path?'/rs/image/file/' + row.f_p2_path:''
533
+ this.solveModal.preData.defectImg3 = row.f_p3_path?'/rs/image/file/' + row.f_p3_path:''
534
+ this.solveModal.uploadData.id = row.id
535
+ this.solveModal.preData.type = type
536
+ this.solveModal.preData.state = row.f_repaire_state
537
+ this.solveModal.preData.source = row.f_repair_path_source
538
+ if (row.f_repaire_state === '已处理') {
539
+ if (row.f_repair_path_source === '微信') {
540
+ this.solveModal.preData.f_repair_path = row.f_repair_path
541
+ this.solveModal.preData.repairedImg = row.f_repair_path
542
+ this.solveModal.preData.repairedImg1 = row.f_repair1_path
543
+ } else {
544
+ this.solveModal.preData.f_repair_path = row.f_repair_path? '/rs/image/file/' + row.f_repair_path:null
545
+ this.solveModal.preData.repairedImg = row.f_repair_path? '/rs/image/file/' + row.f_repair_path:null
546
+ this.solveModal.preData.repairedImg1 = row.f_other_dealpath1? '/rs/image/file/' + row.f_other_dealpath1:null
547
+ this.solveModal.preData.repairedImg2 = row.f_other_dealpath2? '/rs/image/file/' + row.f_other_dealpath2:null
548
+ this.solveModal.preData.repairedImg3 = row.f_repair2_path ? ('/rs/image/file/' + row.f_repair2_path) : ''
549
+ this.solveModal.preData.repairedImg4 = row.f_repair3_path ? ('/rs/image/file/' + row.f_repair3_path) : ''
550
+ this.solveModal.preData.repairedImg5 = row.f_repair4_path ? ('/rs/image/file/' + row.f_repair4_path) : ''
551
+ }
552
+ if (type === '现场已处理') {
553
+ this.solveModal.uploadData.f_repairman = this.check.f_checker_name
554
+ this.solveModal.uploadData.f_repair_date = this.check.f_offsite_time
555
+ } else {
556
+ this.solveModal.uploadData.f_repairman = row.f_repairman
557
+ this.solveModal.uploadData.f_repair_date = row.f_repair_date
558
+ this.$set('solveModal.f_audit_results',row.f_audit_results)
559
+ }
560
+ } else {
561
+ this.solveModal.uploadData.f_repairman = this.$login.f.name
562
+ this.solveModal.uploadData.f_repair_date = Util.getNowDate().substr(0, 10)
563
+ }
564
+ this.showSolveModal = !this.showSolveModal
565
+ },
566
+ ok() {
567
+ if (!(this.solveModal.uploadData.filename && this.solveModal.uploadData.filename.length > 0)) {
568
+ this.$showMessage('请录入处理后照片')
569
+ return
570
+ }
571
+ co(upSolveDefect(this))
572
+ },
573
+ cancel() {
574
+ this.showSolveModal = false
575
+ this.showToRepairModal = false
576
+ },
577
+ toRepair() {
578
+ this.showToRepairModal = !this.showToRepairModal
579
+ },
580
+ getSiteRes(obj) {
581
+ //tag
582
+ //tag
583
+ if(obj.resids[0]){
584
+ this.toRepairModal.preData.f_meetunit = obj.res.join('.')
585
+ this.toRepairModal.preData.f_reciever = obj.resids.join('.')
586
+ }else {
587
+ this.toRepairModal.preData.f_meetunit = ''
588
+ this.toRepairModal.preData.f_reciever = ''
589
+ this.toRepairModal.preData.f_outlets = ''
590
+ }
591
+ },
592
+ // 获取维修员
593
+ getEmp() {
594
+ let val = {source: 'this.getParentByType($organization$).getChildByName($维修员$).getUsers()', userid: `${this.$login.f.id}`}
595
+ let http = new HttpResetClass()
596
+ http.load('POST', '/rs/search', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
597
+ res.data.forEach((item) => {
598
+ let http1 = new HttpResetClass()
599
+ http1.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
600
+ data: {
601
+ items: 'f_user_telephone',
602
+ tablename: 't_user',
603
+ condition: `id = ${item.id}`,
604
+ orderitem: 'id'
605
+ }
606
+ }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
607
+ this.toRepairModal.preData.repairers.push({label: `${item.name}:${ress.data[0].f_user_telephone}`, value: item.name})
608
+ })
609
+ })
610
+ })
611
+ },
612
+ confirm() {
613
+ if (this.toRepairModal.preData.dispatchType == '派发给站点' && !this.toRepairModal.preData.f_meetunit) {
614
+ this.$showMessage('请选择站点。')
615
+ return
616
+ }
617
+ co(sendRepair(this))
618
+ }
619
+ },
620
+ watch: {
621
+ 'check'() {
622
+ this.model.f_paper_id = this.check.id
623
+ this.model.search(`f_repaire_type != '无隐患'`, {})
624
+ },
625
+ 'model.rows'() {
626
+ if (this.model.rows.length > 0) {
627
+ if (this.model.rows[0].f_repaire_type == '隐患未处理') {
628
+ this.needRepair = true
629
+ return
630
+ }
631
+ }
632
+ this.needRepair = false
633
+ }
634
+ }
635
+ }
636
+ </script>
637
+ <style lang="less" scoped>
638
+ .select-error {
639
+ button {
640
+ border-bottom: 1px solid #a94442 !important;
641
+ }
642
+ }
643
+ </style>