safecheck-client 4.0.2-69 → 4.0.2-70

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