safecheck-client 3.0.35-48 → 3.0.35-50

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