safecheck-client 3.0.30-23 → 3.0.30-25

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,1434 +1,1434 @@
1
- <template>
2
- <form novalidate class="form-horizontal" style="width: 95%;margin: auto">
3
- <div class="form-group col-md-12 col-sm-12 col-xs-12" :class="style__">
4
- <div class="form-group col-md-12 col-sm-12 col-xs-12">
5
- <label class="control-label font text-left col-md-4 col-xs-4">备注</label>
6
- <div class="col-md-12 col-sm-12 col-xs-12">
7
- <textarea v-model="paper.f_repair_approved_note" class="form-control"></textarea>
8
- </div>
9
- </div>
10
- </div>
11
- <div class="form-group col-sm-12 col-xs-12 col-md-12 info" :class="style__">
12
- <div class="text-center">
13
- <label class="font">总体安检照片请依次拍摄:</label>
14
- </div>
15
- <div class="col-md-12 col-sm-12 col-xs-12">
16
- <ol class="showIi">
17
- <li>1.燃气设施全景</li>
18
- <li>2.燃气表照片</li>
19
- <li>3.灶具照片</li>
20
- <li>4.其他照片</li>
21
- </ol>
22
- </div>
23
- </div>
24
-
25
- <div class="form-group col-sm-12 col-xs-12 col-md-12 " :class="style__">
26
- <label class="text-left font">总体隐患照片</label>
27
-
28
- <div class="auto" :class="style__">
29
- <div class="panel" style="padding: 10px 10px 5px 10px;">
30
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
31
- <div class="row" style="height: 240px;overflow: scroll;top: 1px" >
32
- <div class="col-xs-4 col-sm-3 col-md-2" style="margin-bottom: 35px" v-for="(index,img) in defectImgs">
33
- <img-self :src="img" alt="总体隐患照片" :width="140" :height="170"></img-self>
34
- <!-- <img src="../../assets/删除.png" @click="delfile('f_overall_path', img.f_overall_path,index)" style="width: 15px;margin-top: -80px" alt="">-->
35
- </div>
36
- </div>
37
- </div>
38
- </div>
39
- </div>
40
- </div>
41
- <div class="form-group col-sm-12 col-xs-12 col-md-12 info" :class="style__">
42
- <div class="text-center">
43
- <label class="font">隐患汇总:</label>
44
- </div>
45
- <div class="col-md-12 col-sm-12 col-xs-12">
46
- <ol class="showIi">
47
- <li v-for="item in defectReason">{{ item.deviceitem }}</li>
48
- </ol>
49
- </div>
50
- </div>
51
- <div class="form-group col-sm-12 col-xs-12 col-md-12 " :class="style__">
52
- <label class="text-left font">总体安检照片</label>
53
-
54
- <div class="auto" :class="style__">
55
- <div class="panel" style="padding: 10px 10px 5px 10px;">
56
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
57
- <div class="row" style="height: 240px;overflow: scroll;top: 1px" >
58
- <div class="col-xs-4 col-sm-3 col-md-2" style="margin-bottom: 35px" v-for="(index,img) in paper.f_overall_imgs">
59
- <img-self :src="img.f_overall_path" alt="总体安检照片" :width="140" :height="170"></img-self>
60
- <img src="../../../assets/删除.png" @click="delfile('f_overall_path', img.f_overall_path,index)" style="width: 15px;margin-top: -80px" alt="">
61
- </div>
62
- </div>
63
- <div class="row text-right div-photo">
64
- <button type="button" name="button" class="btn btn-photo" @click="takePic('f_overall_path', '总体安检照片')">拍照</button>
65
- <!--<button type="button" name="button" class="btn btn-primary btn-photo" @click="takePic('f_overall_path', '总体安检照片1')">拍照</button>-->
66
- <!--&nbsp;&nbsp;&nbsp;&nbsp;<img src="../../../assets/remove.png" :class="style__" @click="delfile('f_overall_path', img.f_overall_path)" style="width: 25%;"></img>-->
67
- </div>
68
- </div>
69
- </div>
70
- </div>
71
- </div>
72
- <!-- <div class="form-group col-sm-12 col-xs-12 col-md-12 info" :class="style__" v-if="defectToolTip">-->
73
- <!-- <div class="text-center">-->
74
- <!-- <label class="font">整改建议汇总:</label>-->
75
- <!-- </div>-->
76
- <!-- <div class="col-md-12 col-sm-12 col-xs-12">-->
77
- <!-- <ol class="showIi">-->
78
- <!-- <li v-for="item in defectToolTip">{{ item }}</li>-->
79
- <!-- </ol>-->
80
- <!-- </div>-->
81
- <!-- </div>-->
82
- <div class="form-group col-sm-12 col-xs-12 col-md-12 " :class="style__">
83
- <input type="checkbox" v-model="paper.f_read_instructions"/><label class="text-left font">我已阅读须知内容</label>
84
-
85
- </div>
86
- <div class="form-group col-sm-12 col-xs-12 col-md-12 " :class="style__" v-if="paper.f_read_instructions">
87
- <label class="text-left font">用户签名</label>
88
- <div class="auto">
89
- <div class="panel">
90
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
91
- <div class="row" style="height: 240px;overflow: scroll;top: 1px">
92
- <div class="col-sm-4">
93
- <img :class="style__" :src="paper.f_sign_path" :width="200" :height="150" />
94
- </div>
95
- </div>
96
- <div class="row text-right div-photo">
97
- <button type="button" name="button" class="btn btn-primary btn-photo" @click="sign">签名</button>
98
- </div>
99
- </div>
100
- </div>
101
- </div>
102
- </div>
103
- <div class="form-group col-sm-12 col-xs-12 col-md-12 " :style="timeSet(this.isneedDate)?'':'display:none'">
104
- <label>请输入超期原因:</label><br/>
105
- <textarea style="width: 100%;" v-model="paper.f_exceed_reason"></textarea>
106
- </div>
107
- <div class="form-group col-md-12 col-sm-12 col-xs-12" :class="style__">
108
- <div class="col-xs-6 col-sm-6">
109
- <input type="checkbox" v-model="backlistisselect" :readonly="enabled"/><label class="text-left font" >限制购气</label>
110
- </div>
111
- <div class="col-xs-6 col-sm-6">
112
- <input type="checkbox" v-model="deletebacklistisselect" :readonly="deleteenabled"/><label class="text-left font" >取消限制</label>
113
- </div>
114
- </div>
115
- <div class="form-group col-md-12 col-sm-12 col-xs-12" :class="style__" v-if="Vue.$appdata.getParam('安检天然气安全使用须知检查')=='是'">
116
- <div class="col-xs-12 col-sm-12">
117
- <input type="checkbox" v-model="paper.f_gas_guidelines" /><label class="text-left font" >天然气安全使用须知</label>
118
- </div>
119
- <div class="col-xs-12 col-sm-12">
120
- <input type="checkbox" v-model="paper.f_safety_warning" /><label class="text-left font" >天然气室内使用安全警示</label>
121
- </div>
122
- <div class="col-xs-12 col-sm-12">
123
- <input type="checkbox" v-model="paper.f_gas_manual" /><label class="text-left font" >安全用气手册</label>
124
- </div>
125
- </div>
126
- <div class="row">
127
- <label for="readsafe" class="text-left font">蓝牙状态:{{blueState}}</label>
128
- <button type="button" @click="initBlueState()">重新连接</button>
129
- </div>
130
- <div class="form-group col-md-12 col-sm-12 col-xs-12" :class="style__">
131
- <div class="form-group col-md-12 col-sm-12 col-xs-12">
132
- <input type="checkbox" v-model="paper.f_defect_notified" class="showIi" />隐患整改单
133
- </div>
134
- <div class="form-group col-md-12 col-sm-12 col-xs-12" v-if="paper.f_defect_notified">
135
- <div class="form-group col-md-12 col-sm-12 col-xs-12">
136
- <button type="button" @click="print()">打印隐患整改单</button>
137
- </div>
138
- <div class="form-group col-md-12 col-sm-12 col-xs-12">
139
- <label class="text-left font">隐患整改单照片(要求内容清晰包含用户签字):</label>
140
- <div class="auto" >
141
- <div class="panel" style="padding: 10px 10px 5px 10px;">
142
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
143
- <div class="row" style="height: 240px;overflow: scroll;top: 1px">
144
- <div class="col-sm-4">
145
- <img-self :src="paper.f_notified_path" alt="隐患整改单" width="150" height="200"></img-self>
146
- </div>
147
- </div>
148
- <div class="row text-right div-photo">
149
- <button type="button" name="button" class="btn btn-primary btn-photo" @click="takePic('f_notified_path', '隐患整改单照片')">拍照</button>
150
- &nbsp;&nbsp;&nbsp;&nbsp;<img src="../../../assets/remove.png" :class="style__" @click="delfile('f_notified_path', this.paper.f_notified_path)" style="width: 25%;"></img>
151
- </div>
152
- </div>
153
- </div>
154
- </div>
155
- </div>
156
- </div>
157
- <!-- <div class="form-group col-md-12 col-sm-12 col-xs-12">-->
158
- <!-- <div class="row">-->
159
- <!-- <label class="text-left">请对我们的服务做出评价:</label>-->
160
- <!-- </div>-->
161
- <!-- <div class="col-xs-4 col-sm-4" v-for="item in radios">-->
162
- <!-- <input v-model="paper.f_client_evaluation" :value="item.label" :checked='item.isChecked' @click="check(item.value)" type="radio">{{item.label}}-->
163
- <!-- </div>-->
164
-
165
- <!--<div class="col-sm-4">-->
166
- <!--<radio-group :value.sync="paper.f_client_evaluation" type="success" buttons="false">-->
167
- <!--<radio value="满意">满意</radio>-->
168
- <!--<radio value="基本满意">基本满意</radio>-->
169
- <!--<radio value="不满意">不满意</radio>-->
170
- <!--</radio-group>-->
171
- <!--</div>-->
172
- <!-- </div>-->
173
-
174
- <div class="form-group col-md-12 col-sm-12 col-xs-12" v-if="isRecodr=='false'">
175
- <label class="text-left font">反馈录音:</label>
176
- <div class="col-md-12 col-sm-12 col-xs-12">
177
- <button type="button" name="button" class="btn btn-primary btn-voice" @click="record">
178
- <img src="../../../assets/录音.png" style="width: 14%;">
179
- <span v-if="!paper.f_recording1_path">开始录音</span>
180
- <span v-if="paper.f_recording1_path">已录音</span>
181
- </button>
182
- &nbsp;&nbsp;&nbsp;&nbsp;<img src="../../../assets/remove.png" style="width: 15px;" :class="style__" @click="delAudioFile('f_recording1_path', paper.f_recording1_path)"></img>
183
- </div>
184
- </div>
185
-
186
- <div v-if="false">
187
- <div class="text-center form-group col-md-12 col-sm-12 col-xs-12">
188
- <button style="width: 30%;margin:3%;margin-bottom: 0%" type="button" v-show="$parent.$parent.actionEnabled && upload_state !='已传' &&(paper.f_complete != '已完成' || paper.back_f_entry_status != '入户') " class="btn save-btn" @click="$parent.$parent.save('temp')">临时保存</button>
189
- <button style="width: 30%;margin:3%;margin-bottom: 0%" type="button" v-show="$parent.$parent.actionEnabled && upload_state !='已传' && (paper.f_complete != '已完成' || paper.back_f_entry_status != '入户')" class="btn save-btn " @click="$parent.$parent.save('finish')">完成安检</button>
190
- </div>
191
- <div class="text-center form-group col-md-12 col-sm-12 col-xs-12">
192
- <button style="width: 30%;margin:3%;margin-bottom: 0%;margin-top: 0%" id="upload" type="button" v-show="$parent.$parent.actionEnabled && upload_state !='已传' && (paper.f_complete != '已完成' || paper.back_f_entry_status != '入户')" class="btn upload-btn " @click="$parent.$parent.uploadCheckPaper" >上传</button>
193
- <button style="width: 30%;margin:3%;margin-bottom: 0%;margin-top: 0%" v-if="(safeCheckToRepair == true || safeCheckToRepair == 'true') && $parent.$parent.actionEnabled" class="btn repair-btn btn-warning " type="button" @click="showToRepair">转维修</button> </div>
194
- </div>
195
-
196
- </div>
197
- </form>
198
- <!-- <modal :show.sync="showCheckToRepair" v-ref:modal :backdrop="isback">-->
199
- <!-- <div slot="modal-header" class="modal-header">-->
200
- <!-- <h4 class="modal-title">-->
201
- <!-- 安检转维修-->
202
- <!-- </h4>-->
203
- <!-- </div>-->
204
- <!-- <div slot="modal-body" class="modal-body">-->
205
- <!-- <div v-if="showrepair">-->
206
- <!-- <div class="row">-->
207
- <!-- <label class="col-xs-4 col-md-4 control-label text-left">派单方式</label>-->
208
- <!-- <div class="col-xs-8 col-md-8">-->
209
- <!-- <label v-for="handling1 in handling" >-->
210
- <!-- <input type="radio"-->
211
- <!-- v-model="meading"-->
212
- <!-- value="{{handling1.label}}">-->
213
- <!-- {{handling1.label}}-->
214
- <!-- </label>-->
215
- <!-- </div>-->
216
- <!-- </div>-->
217
- <!-- <div class="row" v-if="meading == '转站点'">-->
218
- <!-- <label class="col-xs-4 col-md-4 control-label font text-left" for="f_reciever">站点</label>-->
219
- <!-- &lt;!&ndash;<input type="text" v-show="false" v-model="serviceacitivity.f_reciever"&ndash;&gt;-->
220
- <!-- &lt;!&ndash;v-validate:f_reciever='{ required: true }'>&ndash;&gt;-->
221
- <!-- <div class="col-xs-8 col-md-8">-->
222
- <!-- <right-tree @ready="onReady" islist :Url="Url" :userid="userid" :source="source" v-on:re-res="reres" :textContent="选择站点管理员" :selectData="" v-ref:f_reciever>-->
223
- <!-- </right-tree>-->
224
- <!-- </div>-->
225
- <!-- </div>-->
226
-
227
- <!-- <div class="row" style="margin-top: 6px" v-if="meading == '转维修员'">-->
228
- <!-- <label class="col-xs-4 col-md-4 control-label font text-left">维修人</label>-->
229
- <!-- <div class="col-xs-8">-->
230
- <!-- <v-select :value="$parent.$parent.model.serviceacitivity[0].f_reciever" :value-single="true"-->
231
- <!-- :options='f_repair_person' placeholder='请选择维修员'-->
232
- <!-- close-on-select v-on:change="repiarmancg"></v-select>-->
233
- <!-- </div>-->
234
-
235
- <!-- </div>-->
236
- <!-- <div class="row" style="margin-top: 6px">-->
237
- <!-- <label for="f_repair" class="col-xs-4 col-md-4 control-label font text-left">报修类型</label>-->
238
- <!-- <div class="col-xs-8 col-md-8">-->
239
- <!-- <v-select :value.sync="$parent.$parent.model.f_repairtype" :value-single="true"-->
240
- <!-- :options='repairstypes' placeholder='报修类型'-->
241
- <!-- close-on-select>-->
242
- <!-- </v-select>-->
243
- <!-- </div>-->
244
- <!-- </div>-->
245
-
246
- <!-- <div class="row" style="margin-top: 6px">-->
247
- <!-- <label class="control-label font text-left col-md-4 col-xs-4">备注</label>-->
248
- <!-- <div class="col-xs-8 col-md-8">-->
249
- <!-- <input type="text" v-model="$parent.$parent.model.f_remarks"/>-->
250
- <!-- </div>-->
251
-
252
- <!-- </div>-->
253
-
254
- <!-- </div>-->
255
- <!-- <div v-if="!showrepair">-->
256
- <!-- 暂无隐患设备信息-->
257
- <!-- </div>-->
258
- <!-- </div>-->
259
- <!-- <div slot="modal-footer" class="modal-footer">-->
260
- <!-- <button type="button" class="btn btn-default" @click="uploadPaper()">确定</button>-->
261
- <!-- <button type="button" class="btn btn-default" @click="undo()">取消</button>-->
262
- <!-- </div>-->
263
- <!-- </modal>-->
264
- <!--拉黑框-->
265
- <modal :show.sync="showmodel" v-ref:modal>
266
- <div slot="modal-header" class="modal-header">
267
- <h4 class="modal-title">
268
- 限制用户购气
269
- </h4>
270
- </div>
271
- <div slot="modal-body" class="modal-body">
272
- <!-- <div class="row" style="margin-top: 6px">-->
273
- <!-- <label style="color: red;">注:当前页面无法取消对用户的限制购气</label>-->
274
- <!-- </div>-->
275
- <div class="row" style="margin-top: 6px">
276
- <textarea id="el_ca_tx" v-model.trim="cause" style="border-radius:4px;width: 100%;" placeholder="请输入限制用户购气原因" >
277
- </textarea>
278
- </div>
279
- </div>
280
- <div slot="modal-footer" class="modal-footer">
281
- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="backlist()">确认</button>
282
- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="cancel()">取消</button>
283
- </div>
284
- </modal>
285
-
286
- <modal :show.sync="showmodelthree" v-ref:modal>
287
- <div slot="modal-header" class="modal-header">
288
- <h4 class="modal-title">
289
- 取消限制用户购气
290
- </h4>
291
- </div>
292
- <div slot="modal-body" class="modal-body">
293
- <!-- <div class="row" style="margin-top: 6px">-->
294
- <!-- <label style="color: red;">注:当前页面无法取消对用户的限制购气</label>-->
295
- <!-- </div>-->
296
- <div class="row" style="margin-top: 6px">
297
- <textarea id="el_ca_txt" v-model.trim="deletecause" style="border-radius:4px;width: 100%;" placeholder="请输入取消限制用户购气原因" >
298
- </textarea>
299
- </div>
300
- </div>
301
- <div slot="modal-footer" class="modal-footer">
302
- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="deletebacklist()">确认</button>
303
- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="deletecancel()">取消</button>
304
- </div>
305
- </modal>
306
- </template>
307
-
308
- <script>
309
- import Vue from 'vue'
310
- import * as Util from '../../Util'
311
- import { HttpResetClass } from 'vue-client'
312
- import RadioGroup from 'vue-client/src/vue-strap/src/radioGroup'
313
- import Radio from 'vue-client/src/vue-strap/src/radioBtn'
314
- import co from 'co'
315
-
316
- // let getRepairParam = function * (self){
317
- // let data = {
318
- // $parent.$parent.model: self.$parent.$parent.model, loginUser: {
319
- // name: self.role == 'view'?self.$login.f.name:Vue.user.name,
320
- // ename: self.role == 'view'?self.$login.f.ename:Vue.user.ename
321
- // }, user: self.user, callObj: self.callObj
322
- // }
323
- // if(self.$parent.$parent.meading == '转维修员'){
324
- // data.toRepair = '一级派单'
325
- // }
326
- // data.$parent.$parent.model.f_attendant = data.loginUser.name
327
- // ////tag
328
- // ////tag
329
- // let res
330
- // let errString = self.$parent. $parent.errorVerify()
331
- // if(errString){
332
- // ////tag
333
- // if (Vue.android)
334
- // self.undo()
335
- // this.$showMessage(errString)
336
- // return
337
- // } else {
338
- // if(self.role == 'inspect'){
339
- // if(self.$parent.$parent.meading == '转维修员' && (self.$parent.$parent.model.serviceacitivity[0].f_reciever == '' || self.$parent.$parent.model.serviceacitivity[0].f_reciever == undefined)){
340
- // this.$showMessage("请选择维修员!")
341
- // return
342
- // }
343
- // if(self.$parent.$parent.meading == '转站点' && (self.$parent.$parent.model.serviceacitivity[0].f_reciever == '' || self.$parent.$parent.model.serviceacitivity[0].f_reciever == undefined)){
344
- // HostApp.alert()
345
- // this.$showMessage("请选择站点!")
346
- // return
347
- // }
348
- // if(self.$parent.$parent.model.f_repairtype == ''){
349
- // this.$showMessage("请选择报修类型!")
350
- // return
351
- // }
352
- // ////tag)
353
- // let checkResult = '正常'
354
- // let options = [{"data": "已处理"},{"data": "未处理"}]
355
- // let value = ''
356
- // let codata = JSON.parse(JSON.stringify(self.paper))
357
- // for(let device in codata){
358
- // ////tag)
359
- // let f_device_type
360
- // if(device.startsWith("device")){
361
- // for(let item in codata[device]) {
362
- // if(codata[device].length > 1 ){
363
- // let j = Number.parseInt(item)+1
364
- // f_device_type = `${codata[device][item].f_device_type}${j}`
365
- // }else{
366
- // f_device_type = codata[device][item].f_device_type
367
- // }
368
- // // ////tag
369
- // let details = []
370
- // for(let i in codata[device][item].f_items){
371
- // let items = codata[device][item].f_items[i]
372
- // ////tag
373
- // if(items.f_is_defect == true || items.f_is_defect == 'true'){
374
- // checkResult = '有隐患'
375
- // ////tag
376
- // let res = yield self.$resetpost(`${self.Url}/rs/sql/getDeviceItem`,{data:{f_device_id:codata[device][item].f_device_id,f_item_name:items.f_item_name}})
377
- // ////tag)
378
- // self.$set('detail.f_defect_id', res.data[0].id)
379
- // self.$set('detail.f_project',`${items.f_item_name}:${items.f_item_value}`)
380
- // self.$set('detail.type',items.type)
381
- // self.$set('detail.options',options)
382
- // details.push(JSON.parse(JSON.stringify(self.detail)))
383
- // }
384
- // if(items.type == 'selector'){
385
- // items.selected = ''
386
- // }
387
- // self.detail = {}
388
- // }
389
- // ////tag
390
- // self.$set('defectDevice.f_type',f_device_type)
391
- // self.$set('defectDevice.details',details)
392
- // if(self.defectDevice.details.length >0 ){
393
- // self.repairitems.push(JSON.parse(JSON.stringify(self.defectDevice)))
394
- // }
395
- // self.defectDevice = {}
396
- // ////tag
397
- // }
398
- // }
399
- // }
400
- // self.$set('$parent.$parent.model.f_repairitems.data',self.repairitems)
401
- //
402
- //
403
- // ////tag)
404
- // res = self.$androidUtil.bzLogic('safecheckToRepair',data)
405
- // ////tag
406
- // ////tag
407
- // ////tag
408
- // if(res.code == 200){
409
- // self.$parent.$parent.isSafeCheckToRepair = true
410
- // self.undo()
411
- // self.$set('paper.f_SafeToRepair_id',res.data.f_service_id)
412
- // ////tag
413
- // self.$resetpost(`${self.Url}/rs/logic/updatePaperRepair`,{data:{f_paper_id:self.paper.f_paper_id,f_SafeToRepair_id:res.data.f_service_id}}).then((ret)=>{
414
- // ////tag
415
- // if(ret.data.code ==200){
416
- // ////tag
417
- // self.$parent.$parent.$back()
418
- // }else{
419
- // self.$showMessage('安检转维修失败!')
420
- // }
421
- // }).catch(v=>{
422
- // ////tag)
423
- // self.$showMessage('安检转维修失败!')
424
- // })
425
- // }else{
426
- // self.$showMessage('安检转维修失败!')
427
- // }
428
- // }
429
- // }
430
- // }
431
-
432
-
433
-
434
- // let getRepairs = async function(self,url) {
435
- // // 获取配置信息
436
- // try {
437
- // let val = {source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1 ))', userid: `${Vue.user.id}`}
438
- // let repairs =[]
439
- // let res = await Vue.resetpost(`${url}/rs/search`,{data: val},{resolveMsg: null, rejectMsg: null})
440
- // res.data.forEach((item) => {
441
- // repairs.push({label: item.name, value: item})
442
- // })
443
- // self.f_repair_person = repairs
444
- // if(self.$parent.$parent.role == 'inspect'){
445
- // let res = self.$androidUtil.bzLogic('getUserInfo',{id:self.paper.f_userinfoid})
446
- // if(res.code == 200){
447
- // self.$parent.$parent.user = res.data[0]
448
- // self.$parent.$parent.model.f_area = self.$parent.$parent.user.f_area
449
- // }
450
- // }else{
451
- // ////tag
452
- // self.$resetpost(`${self.Url}/rs/sql/safeCheckgetUserInfo`,{data:{id:self.paper.f_userinfoid}},{resolveMsg: null, rejectMsg: null}).then((res)=>{
453
- // ////tag
454
- // if(res.data.length != 0){
455
- // self.$parent.$parent.user = res.data[0]
456
- // self.$parent.$parent.model.f_area = self.$parent.$parent.user.f_area
457
- // }
458
- // })
459
- // // path({alias:'getUserInfo',data:{id:this.paper.f_userinfoid}})
460
- // }
461
- // } catch (error) {
462
- // ////tag
463
- // }
464
- // }
465
-
466
- export default {
467
- title: '用户反馈',
468
- data() {
469
- return {
470
- blueState:'',
471
- defectImgs: [],
472
- defectToolTip: [],
473
- defectReason: [],
474
- images: [],
475
- showmodelthree: false,
476
- isneedDate: this.$parent.$parent.isneedDate,
477
- plan: this.$parent.$parent.item,
478
- meading: this.$parent.$parent.meading,
479
- paper: this.$parent.$parent.data,
480
- printContent: [],
481
- upload_state: this.$parent.$parent.item.f_upload_state,
482
- enabled: false,//控制限制购气是否可选
483
- deleteenabled: false,
484
- showmodel: false,
485
- backlistisselect: false,
486
- deletebacklistisselect: false,
487
- radios: [
488
- {
489
- label: '满意',
490
- value: 0,
491
- isChecked: false,
492
- },
493
- {
494
- label: '基本满意',
495
- value: 1,
496
- isChecked: false,
497
- },
498
- {
499
- label: '不满意',
500
- value: 2,
501
- isChecked: false,
502
- },
503
- ],
504
- repairitems: [],
505
- repairstypes: this.$appdata.getParam('报修类型'),
506
- // f_repair_person: this.readRepair(),
507
- showrepair: false,
508
- safeCheckToRepair: '',
509
- showCheckToRepair: false,
510
- userid: '',
511
- source:
512
- 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
513
- 'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
514
- isback: false,
515
- defectDevice: {},
516
- detail: {},
517
- callObj: null,
518
- user: {},
519
- role: this.$parent.$parent.role,
520
- handling: [{label: '转站点', value: '转站点'}, {label: '转维修员', value: '转维修员'}],
521
- Url: this.$androidUtil.getProxyUrl(),
522
- cause: "",
523
- deletecause: "",
524
- isRecodr: "false", //单值参数,为true则是开启全程录音
525
- }
526
- },
527
- props: ['idx'],
528
- components: {
529
- RadioGroup,
530
- Radio
531
- },
532
- methods: {
533
- initBlueState(){
534
- let state = HostApp.getBluetoothState()
535
- if (state && state.state == 3){
536
- this.blueState = '连接完成'
537
- }else {
538
- if (state && state.state == -1){
539
- this.$showMessage('蓝牙连接未打开,打开后重新尝试')
540
- return
541
- }
542
- this.blueState = '连接失败,请重试'
543
- this.$androidUtil.print(JSON.stringify([{ type: 4, value: 2, unit: 'line' }]))
544
- let state2 = HostApp.getBluetoothState()
545
- if (state2 && state2.state == 3){
546
- this.blueState = '连接完成'
547
- }else {
548
- this.blueState = '连接失败,请重试'
549
- }
550
- }
551
- },
552
- timeSet(val) {
553
- //////tag
554
- if (!val) {
555
- return
556
- }
557
- let time = new Date(val).getTime()
558
- let time2 = new Date().getTime()
559
- if (time2 > time) {
560
- return true
561
- }
562
- },
563
- // async isoverDate(){
564
- // ////tag
565
- // let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/androidGetuserinfo`, {data:{
566
- // condition:"f_plan_item_id='"+this.$parent.$parent.item.id+"'"
567
- // }
568
- // })
569
- // this.isneedDate=res.data[0]["f_subscribe_date"]
570
- // ////tag
571
- // },
572
- check(index) {
573
- ////tag
574
- // 先取消所有选中项
575
- for (let item of this.radios) {
576
- item.isChecked = false;
577
- }
578
- //再设置当前点击项选中
579
- this.paper.f_client_evaluation = this.radios[index].label;
580
- // 设置值,以供传递
581
- this.radios[index].isChecked = true;
582
- ////tag;
583
- },
584
- getSignValue(fileName) {
585
- this.f_signname = fileName
586
- },
587
- cameraCallBack(prop, fileName) {
588
- if (prop == 'f_overall_path') {
589
- let f_overall_path = fileName + '?' + Math.random()
590
- HostApp.__this__.paper.f_overall_imgs.push({
591
- f_overall_path: f_overall_path
592
- })
593
- } else {
594
- HostApp.__this__.paper[prop] = fileName + '?' + Math.random()
595
- }
596
- HostApp.__callback__ = null
597
- HostApp.__this__ = null
598
- },
599
- takePic(prop, title, index) {
600
- HostApp.__callback__ = this.cameraCallBack
601
- HostApp.__this__ = this
602
- ////tag
603
- ////tag
604
- let fileName
605
- if (prop == 'f_overall_path') {
606
- if (!this.paper.f_overall_imgs[index] || this.paper.f_overall_imgs[index].f_overall_path.includes("nopic.png")) {
607
- fileName = Util.guid() + '-' + prop + '.jpg'
608
- } else {
609
- fileName = Util.getFileName(this.paper.f_overall_imgs[index].f_overall_path)
610
- }
611
- } else {
612
- if (!this.paper[prop] || this.paper[prop].includes("nopic.png")) {
613
- fileName = Util.guid() + '-' + prop + '.jpg'
614
- } else {
615
- fileName = Util.getFileName(this.paper[prop])
616
- }
617
- }
618
-
619
- HostApp._open_a_page({
620
- type: 'boomerang',
621
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
622
- param: {
623
- file: fileName,
624
- requestCode: 111,
625
- callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
626
- watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name + '\t' + this.paper.f_userinfo_code+ '\t' + this.paper.f_user_name+ '\t' + this.paper.f_address
627
- }
628
- })
629
- },
630
- amrCallBack(fileName) {
631
- HostApp.__this__.$set('paper.f_recording1_path', fileName)
632
- HostApp.__callback__ = null
633
- HostApp.__this__ = null
634
- },
635
- record() {
636
- if (this.$parent.$parent.role != 'inspect') {
637
- if (this.paper.f_recording1_path != '') {
638
- window.location = this.paper.f_recording1_path
639
- }
640
- } else {
641
- HostApp.__callback__ = this.amrCallBack
642
- HostApp.__this__ = this
643
- let fileName
644
- if (!this.paper.f_recording1_path) {
645
- fileName = Util.guid() + '.amr'
646
- } else {
647
- fileName = Util.getFileName(this.paper.f_recording1_path)
648
- }
649
- HostApp._open_a_page({
650
- type: 'boomerang',
651
- page: 'com.aofeng.hybrid.android.peripheral.AudioClipActivity',
652
- param: {file: fileName, requestCode: 111, callback: 'javascript:HostApp.__callback__("%s");'}
653
- })
654
- }
655
- },
656
- // 签名回调
657
- signCallback(prop, fileName) {
658
- // HostApp.alert('绑定属性:' + prop + ' 文件全路径如file:///storage/sdcard0/safecheck/abc.jpg:' + fullFileName)
659
- HostApp.__this__.$set('paper.f_sign_path', fileName)
660
- HostApp.__callback__ = null
661
- HostApp.__this__ = null
662
- },
663
- // 用户签名
664
- sign() {
665
- // if (!this.paper.f_read_instructions) {
666
- // this.$showMessage('请先阅读并勾选用户须知内容后进行签名!')
667
- // return
668
- // }
669
- this.delAudioFile('f_sign_path', this.paper.f_sign_path)
670
- let prop = 'f_sign_path'
671
- let idx = 'aofeng'
672
- let fileName
673
- if (!this.paper.f_sign_path) {
674
- fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
675
- } else {
676
- fileName = Util.getFileName(this.paper.f_sign_path)
677
- }
678
- HostApp.__callback__ = this.signCallback
679
- HostApp.__this__ = this
680
- HostApp.getSignature({
681
- file: fileName,
682
- requestCode: 111,
683
- callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");'
684
- })
685
- },
686
- delfile(prop, fileName, index) {
687
- if (fileName == Vue.nopic)
688
- return
689
- else {
690
- if (prop == 'f_overall_path') {
691
- this.paper.f_overall_imgs.splice(index, 1)
692
- HostApp.delfile(fileName)
693
- } else {
694
- HostApp.delfile(fileName)
695
- this.paper[prop] = Vue.nopic
696
- }
697
- }
698
- },
699
- delAudioFile(prop, fileName) {
700
- if (!fileName)
701
- return
702
- else {
703
- HostApp.delfile(fileName)
704
- this.paper[prop] = null
705
- }
706
- },
707
- //获取打印用户信息
708
- getUser() {
709
- if (this.paper.f_user_name == undefined)
710
- this.paper.f_user_name = ''
711
- this.printContent.push({
712
- type: 3,
713
- text: '用户名称:' + this.paper.f_user_name,
714
- fontsize: 2,
715
- isbold: false,
716
- align: 'left'
717
- })
718
- if (this.paper.f_userinfo_code == undefined)
719
- this.paper.f_userinfo_code = ''
720
- this.printContent.push({
721
- type: 3,
722
- text: '用户编号:' + this.paper.f_userinfo_code,
723
- fontsize: 2,
724
- isbold: false,
725
- align: 'left'
726
- })
727
- if (this.paper.f_address == undefined)
728
- this.paper.f_address = ''
729
- this.printContent.push({type: 3, text: '地址:' + this.paper.f_address, fontsize: 2, isbold: false, align: 'left'})
730
- if (this.paper.f_user_phone == undefined){
731
- this.paper.f_user_phone = ''
732
- }
733
- this.printContent.push({
734
- type: 3,
735
- text: '电话:' + this.paper.f_user_phone,
736
- fontsize: 2,
737
- isbold: false,
738
- align: 'left'
739
- })
740
- this.printContent.push({
741
- type: 3,
742
- text: '入户证号:' + (this.$parent.$parent.item.f_enter_number || ''),
743
- fontsize: 2,
744
- isbold: false,
745
- align: 'left'
746
- })
747
- this.printContent.push({
748
- type: 3,
749
- text: '用气性质:' + (this.$parent.$parent.item.f_user_type || ''),
750
- fontsize: 2,
751
- isbold: false,
752
- align: 'left'
753
- })
754
- this.printContent.push({
755
- type: 3,
756
- text: '表具类型:' + (this.$parent.$parent.item.f_plan_meters[0].f_meter_type || ''),
757
- fontsize: 2,
758
- isbold: false,
759
- align: 'left'
760
- })
761
- this.printContent.push({
762
- type: 3,
763
- text: '表具编号:' + (this.$parent.$parent.item.f_plan_meters[0].f_meter_no || ''),
764
- fontsize: 2,
765
- isbold: false,
766
- align: 'left'
767
- })
768
- this.printContent.push({
769
- type: 3,
770
- text: '本次表底:' + (this.$parent.$parent .item.f_plan_meters[0].f_metergasnums || ''),
771
- fontsize: 2,
772
- isbold: false,
773
- align: 'left'
774
- })
775
-
776
- },
777
- verify() {
778
- let hasError = this.$parent.$parent.verifyUser()
779
- if (hasError)
780
- return hasError
781
- hasError = this.$parent.$parent.verifyDevices()
782
- if (hasError)
783
- return hasError
784
- },
785
- print() {
786
- let state = HostApp.getBluetoothState()
787
- if (state && state.state == 3){
788
- this.blueState = '连接完成'
789
- }else {
790
- this.blueState = '连接失败,请重试'
791
- }
792
- if (state && state.state == -1){
793
- this.$showMessage('蓝牙未打开,请确认蓝牙是否打开')
794
- return
795
- }
796
- let errString = this.verify()
797
- if (errString) {
798
- ////tag
799
- if (Vue.android)
800
- this.$showMessage(errString)
801
- return
802
- }
803
- // 文本
804
- let templatename = '安检结果单'
805
- if (Vue.config.safecheck != undefined) {
806
- if (Vue.config.safecheck.ApproveConfig != undefined) {
807
- if (Vue.config.safecheck.ApproveConfig.templatename != undefined) {
808
- templatename = Vue.config.safecheck.ApproveConfig.templatename
809
- }
810
- }
811
- }
812
- let textHead = {type: 3, text: templatename, fontsize: 3, isbold: true, align: 'center'}
813
- let feedPageHead = {type: 4, value: 2, unit: 'line'}
814
- let feedPageEnd = {type: 4, value: 4, unit: 'line'}
815
- this.printContent.push({type: 3, text: Vue.user.orgs, fontsize: 3, isbold: true, align: 'center'})
816
- this.printContent.push(textHead)
817
- this.printContent.push(feedPageHead)
818
- this.getUser()
819
- this.getDefect()
820
- this.getCheck()
821
- this.printContent.push(feedPageEnd)
822
- let arrstr = JSON.stringify(this.printContent)
823
- ////tag
824
- this.$androidUtil.print(arrstr)
825
- this.$set('printContent', [])
826
- },
827
- //打印安检信息
828
- getCheck() {
829
- let telephone = '96777'
830
- if (Vue.config.safecheck != undefined) {
831
- if (Vue.config.safecheck.ApproveConfig != undefined) {
832
- if (Vue.config.safecheck.ApproveConfig.checkphone != undefined) {
833
- telephone = Vue.config.safecheck.ApproveConfig.checkphone
834
- }
835
- }
836
- }
837
- this.printContent.push({
838
- type: 3,
839
- text: '*******************************',
840
- fontsize: 3,
841
- isbold: false,
842
- align: 'center'
843
- })
844
- // this.printContent.push({type: 3, text: '咨询电话;' , fontsize: 2, isbold: false, align: 'left'})
845
- this.printContent.push({type: 3, text: '安检人员:' + Vue.user.name, fontsize: 2, isbold: false, align: 'left'})
846
- this.printContent.push({
847
- type: 3,
848
- text: '安检日期:' + this.getNowFormatDate(),
849
- fontsize: 2,
850
- isbold: false,
851
- align: 'left'
852
- })
853
- let f_sign_path = this.paper.f_sign_path
854
- this.printContent.push({ type: 3, text: '用户签字:', fontsize: 2, isbold: false, align: 'left' })
855
- if(f_sign_path){
856
- f_sign_path = f_sign_path.replace('http://newimg/','')
857
- this.printContent.push({ type: 5, url: f_sign_path, align: 'left' })
858
- }else{
859
- this.printContent.push({ type: 4, value: 2, unit: 'line' })
860
- this.printContent.push({ type: 4, value: 2, unit: 'line' })
861
- this.printContent.push({ type: 4, value: 2, unit: 'line' })
862
- }
863
- this.printContent.push({
864
- type: 3,
865
- text: '*******************************',
866
- fontsize: 3,
867
- isbold: false,
868
- align: 'center'
869
- })
870
- this.printContent.push({type: 3, text: '温馨提示:请在燃气使用后及时关闭灶前阀门,任何情况下严禁使用明火查漏。' , fontsize: 2, isbold: false, align: 'left'})
871
-
872
- this.printContent.push({type: 3, text: '如发生燃气泄漏:' , fontsize: 2, isbold: false, align: 'left'})
873
- this.printContent.push({type: 3, text: '1.关闭所有燃气阀门;' , fontsize: 2, isbold: false, align: 'left'})
874
- this.printContent.push({type: 3, text: '2.不要开、关任何电器设施,杜绝一切产生火花的行为;' , fontsize: 2, isbold: false, align: 'left'})
875
- this.printContent.push({type: 3, text: '3.立即开窗通风;' , fontsize: 2, isbold: false, align: 'left'})
876
- this.printContent.push({type: 3, text: '4.到室外拨打燃气公司电话报修;' , fontsize: 2, isbold: false, align: 'left'})
877
- this.printContent.push({type: 3, text: '' , fontsize: 2, isbold: false, align: 'left'})
878
- this.printContent.push({type: 3, text: `潜能燃气24小时维修电话:${(this.$appdata.getSingleValue(Vue.user.orgs+'联系电话') || '') }` , fontsize: 2, isbold: false, align: 'left'})
879
- },
880
-
881
- getDefect() {
882
- let showmore = false
883
- if (Vue.config.safecheck != undefined) {
884
- if (Vue.config.safecheck.ApproveConfig != undefined) {
885
- if (Vue.config.safecheck.ApproveConfig.showmore != undefined) {
886
- showmore = Vue.config.safecheck.ApproveConfig.showmore
887
- }
888
- }
889
- }
890
-
891
- let backData = this.$parent.$parent.getAllDefect()
892
- // 对隐患信息进行遍历
893
- let res = JSON.parse(backData.f_defect_content)
894
- this.printContent.push({
895
- type: 3,
896
- text: '安检结果:' + res.result,
897
- fontsize: 2,
898
- isbold: false,
899
- align: 'left'
900
- })
901
- this.printContent.push({
902
- type: 3,
903
- text: '*******************************',
904
- fontsize: 3,
905
- isbold: false,
906
- align: 'center'
907
- })
908
- this.printContent.push({type: 3, text: '' , fontsize: 2, isbold: false, align: 'left'})
909
- this.printContent.push({type: 3, text: '' , fontsize: 2, isbold: false, align: 'left'})
910
- this.printContent.push({
911
- type: 3,
912
- text: '隐患及处理方式:',
913
- fontsize: 3,
914
- isbold: false,
915
- align: 'center'
916
- })
917
- this.printContent.push({type: 3, text: '' , fontsize: 2, isbold: false, align: 'left'})
918
- for (let dev in this.$parent.$parent.config) {
919
- for (let device in backData) {
920
- if (device.startsWith("device")) {
921
- for (let item in backData[device]) {
922
- if (backData[device].length != 0 && backData[device][item].f_device_type == dev) {
923
- for (let i in backData[device][item].f_items) {
924
- if (backData[device][item].f_items[i].f_is_defect == true || backData[device][item].f_items[i].f_is_defect == 'true') {
925
- this.printContent.push({
926
- type: 3,
927
- text: backData[device][item].f_items[i].f_item_name +':'+ (backData[device][item].f_items[i].f_deal_dispose == '报修' ? '转维修': backData[device][item].f_items[i].f_deal_dispose),
928
- fontsize: 2,
929
- isbold: false,
930
- align: 'left'
931
- })
932
- }
933
- }
934
- }
935
- }
936
- }
937
- }
938
- }
939
- for (let dev in this.$parent.$parent.config) {
940
- for (let device in backData) {
941
- if (device.startsWith("device")) {
942
- for (let item in backData[device]) {
943
- if (backData[device].length != 0 && backData[device][item].f_device_type == dev) {
944
- for (let i in backData[device][item].f_items) {
945
- if(backData[device][item].f_items[i].f_item_name.includes('除上述条目以外的管道燃气问题')){
946
- this.printContent.push({
947
- type: 3,
948
- text: '除上述条目以外的管道燃气问题:'+ backData[device][item].f_items[i].f_item_value,
949
- fontsize: 2,
950
- isbold: false,
951
- align: 'left'
952
- })
953
- }
954
- }
955
- }
956
- }
957
- }
958
- }
959
- }
960
- this.printContent.push({
961
- type: 3,
962
- text: `备注:${this.paper.f_repair_approved_note || ''}`,
963
- fontsize: 3,
964
- isbold: false,
965
- align: 'center'
966
- })
967
- },
968
- //获取当前时间
969
- getNowFormatDate() {
970
- var date = new Date();
971
- var seperator1 = "-";
972
- var seperator2 = ":";
973
- var month = date.getMonth() + 1;
974
- var strDate = date.getDate();
975
- if (month >= 1 && month <= 9) {
976
- month = "0" + month;
977
- }
978
- if (strDate >= 0 && strDate <= 9) {
979
- strDate = "0" + strDate;
980
- }
981
- var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
982
- + " " + date.getHours() + seperator2 + date.getMinutes()
983
- + seperator2 + date.getSeconds();
984
- return currentdate;
985
- },
986
- readRepair() {
987
- let url = this.$androidUtil.getProxyUrl()
988
- let gen = getRepairs(this, url)
989
- return co(gen)
990
- },
991
- showToRepair() {
992
- let res = this.hasDefect()
993
- ////tag
994
- ////tag
995
- if (res == '正常') {
996
- this.showrepair = false
997
- } else {
998
- this.showrepair = true
999
- this.assignObj()
1000
- }
1001
- this.showCheckToRepair = !this.showCheckToRepair
1002
- },
1003
- // 选中部门
1004
- reres(val) {
1005
- if (val.res == undefined) {
1006
- return
1007
- }
1008
- this.$parent.$parent.model.serviceacitivity[0].f_meetunit = val.res
1009
- this.$parent.$parent.model.f_meetunit = val.res
1010
- this.$parent.$parent.model.f_orgstr = val.resids
1011
- var arr = val.res.split('.')
1012
- this.$parent.$parent.model.f_outlets = arr[arr.length - 1]
1013
- this.$parent.$parent.model.serviceacitivity[0].f_reciever = val.resids
1014
- },
1015
- assignObj() {
1016
- this.$parent.$parent.model.f_contact_phone = this.paper.f_user_phone
1017
- this.$parent.$parent.model.f_user_name = this.paper.f_user_name
1018
- this.$parent.$parent.model.f_address = this.paper.f_address
1019
- this.$parent.$parent.model.f_user_type = this.paper.f_check_type
1020
- this.$parent.$parent.model.f_street = this.paper.f_street
1021
- this.$parent.$parent.model.f_residential_area = this.paper.f_residential_area
1022
- this.$parent.$parent.model.f_building = this.paper.f_building
1023
- this.$parent.$parent.model.f_unit = this.paper.f_unit
1024
- this.$parent.$parent.model.f_floor = this.paper.f_floor
1025
- this.$parent.$parent.model.f_room = this.paper.f_room
1026
- this.$parent.$parent.model.f_floor = this.paper.f_floor
1027
- this.$parent.$parent.model.f_userinfo_id = this.paper.f_userinfoid
1028
- this.$parent.$parent.model.f_userinfo_code = this.paper.f_userinfo_code
1029
- },
1030
- hasDefect() {
1031
- let checkResult = '正常'
1032
- let codata = JSON.parse(JSON.stringify(this.paper))
1033
- for (let device in this.paper) {
1034
- if (device.startsWith("device")) {
1035
- for (let item in this.paper[device]) {
1036
- for (let i in this.paper[device][item].f_items) {
1037
- let items = this.paper[device][item].f_items[i]
1038
- ////tag
1039
- if (items.f_is_defect == true || items.f_is_defect == 'true') {
1040
- checkResult = '有隐患'
1041
- }
1042
- }
1043
- }
1044
- }
1045
- }
1046
- return checkResult
1047
- },
1048
- uploadPaper() {
1049
- if (this.showrepair) {
1050
- ////tag
1051
- ////tag
1052
- ////tag
1053
- ////tag
1054
-
1055
- if (this.meading == '转维修员' && (this.$parent.$parent.model.serviceacitivity[0].f_reciever == '' || this.$parent.$parent.model.serviceacitivity[0].f_reciever == undefined)) {
1056
- this.$showMessage("请选择维修员!")
1057
- return
1058
- }
1059
- if (this.$parent.$parent.meading == '转站点' && (this.$parent.$parent.model.serviceacitivity[0].f_reciever == '' || this.$parent.$parent.model.serviceacitivity[0].f_reciever == undefined)) {
1060
- this.$showMessage("请选择站点!")
1061
- return
1062
- }
1063
- if (this.$parent.$parent.model.f_repairtype == '') {
1064
- this.$showMessage("请选择报修类型!")
1065
- return
1066
- }
1067
- this.$parent.$parent.isToRepair = true
1068
- this.$parent.$parent.uploadCheckPaper()
1069
- // this.$parent.$parent.savePaper(false).then((res) => {
1070
- // ////tag
1071
- // if(res != true){
1072
- // ////tag
1073
- // return
1074
- // }else{
1075
- // this.$parent.$parent.todo()
1076
- // }
1077
- // })
1078
- } else {
1079
- this.$parent.$parent.undo()
1080
- }
1081
-
1082
- },
1083
- //确认安检转维修
1084
-
1085
- undo() {
1086
- this.showCheckToRepair = !this.showCheckToRepair
1087
- this.$parent.$parent.model.serviceacitivity[0].f_reciever = ''
1088
- this.$parent.$parent.model.serviceacitivity[0].f_meetunit = ''
1089
- this.$parent.$parent.model.f_repairtype = ''
1090
- this.meading = '转站点'
1091
- },
1092
- //取消拉黑
1093
- async deletebacklist() {
1094
- if (!this.deletecause) {
1095
- this.$showMessage("请填写取消拉黑原因!")
1096
- return
1097
- }
1098
- this.paper.f_blocking_cause = this.deletecause
1099
- ////tag)
1100
- let http = new HttpResetClass()
1101
- ////tag
1102
- let res1 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
1103
- data: {
1104
- items: "version",
1105
- tablename: "t_userinfo",
1106
- condition: "f_userinfo_id=" + this.paper.f_userinfoid,
1107
- orderitem: "f_userinfo_id"
1108
- }
1109
- }, {resolveMsg: null, rejectMsg: null})
1110
- ////tag)
1111
- ////tag
1112
- let res2 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/backlistOperate`, {
1113
- data: {
1114
- "f_operat_type": "取消拉黑",
1115
- "f_state": "有效",
1116
- "f_user_name": this.paper.f_user_name,
1117
- "f_comments": this.paper.f_delete_cause,
1118
- "f_operator": Vue.user.name,
1119
- "f_operatorid": Vue.user.id,
1120
- "f_orgid": Vue.user.orgid,
1121
- "f_orgname": Vue.user.orgs,
1122
- "f_depid": Vue.user.depids,
1123
- "f_depname": Vue.user.deps,
1124
- "f_describe": `${Vue.user.name}对用户${this.paper.f_user_name}进行取消拉黑`,
1125
- "f_userinfo_id": {
1126
- "f_userinfo_id": this.paper.f_userinfoid,
1127
- "f_user_state": "正常",
1128
- "version": res1.data[0].version
1129
- },
1130
- "f_limit_times":"",
1131
- "f_limit_value":""
1132
- }
1133
- }, {resolveMsg: null, rejectMsg: null})
1134
-
1135
- ////tag)
1136
- if (res2.data.code == 200) {
1137
- this.showmodelthree = false
1138
- this.deleteenabled = true
1139
- this.paper.f_blacklist = "否"
1140
- this.$showMessage("取消该用户限制购气成功!")
1141
- } else {
1142
- this.$showMessage("网络异常,请稍后再试!")
1143
- }
1144
- },
1145
- async backlist() {
1146
- if (!this.cause) {
1147
- this.$showMessage("请填写拉黑原因!")
1148
- return
1149
- }
1150
- this.paper.f_blocking_cause = this.cause
1151
- ////tag)
1152
- let http = new HttpResetClass()
1153
- ////tag
1154
- let res1 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
1155
- data: {
1156
- items: "version",
1157
- tablename: "t_userinfo",
1158
- condition: "f_userinfo_id=" + this.paper.f_userinfoid,
1159
- orderitem: "f_userinfo_id"
1160
- }
1161
- }, {resolveMsg: null, rejectMsg: null})
1162
- ////tag)
1163
- ////tag
1164
- let res2 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/backlistOperate`, {
1165
- data: {
1166
- data:this.$parent.$parent.data,
1167
- item:this.$parent.$parent.data.item,
1168
- "f_operat_type": "拉黑",
1169
- "f_state": "有效",
1170
- "f_user_name": this.paper.f_user_name,
1171
- "f_comments": this.paper.f_blocking_cause,
1172
- "f_operator": Vue.user.name,
1173
- "f_operatorid": Vue.user.id,
1174
- "f_orgid": Vue.user.orgid,
1175
- "f_orgname": Vue.user.orgs,
1176
- "f_depid": Vue.user.depids,
1177
- "f_depname": Vue.user.deps,
1178
- "f_describe": `${Vue.user.name}对用户${this.paper.f_user_name}进行拉黑`,
1179
- "f_userinfo_id": {
1180
- "f_userinfo_id": this.paper.f_userinfoid,
1181
- "f_user_state": "正常",
1182
- "version": res1.data[0].version
1183
- },
1184
- "f_limit_times":"0",
1185
- "f_limit_value":"0"
1186
- }
1187
- }, {resolveMsg: null, rejectMsg: null})
1188
-
1189
- ////tag)
1190
- if (res2.data.code == 200) {
1191
- this.showmodel = false
1192
- this.enabled = true
1193
- this.paper.f_blacklist = "是"
1194
- this.$showMessage("将该用户限制购气成功!")
1195
- } else if (res2.data.msg == '数据增加重复') {
1196
- this.showmodel = false
1197
- this.enabled = true
1198
- this.$showMessage("该用户已被限制购气,请勿重复提交!")
1199
- } else {
1200
- this.$showMessage("网络异常,请稍后再试!")
1201
- }
1202
- },
1203
- cancel() {
1204
- this.backlistisselect = false
1205
- this.showmodel = false
1206
- },
1207
- deletecancel() {
1208
- this.deletebacklistisselect = false
1209
- this.showmodelthree = false
1210
- },
1211
- repiarmancg(val) {
1212
- if (val) {
1213
- ////tag
1214
- this.$parent.$parent.model.serviceacitivity[0].f_reciever = val.name
1215
- let http1 = new HttpResetClass()
1216
- http1.load('POST', `${this.Url}/rs/sql/tel_singleTable_OrderBy`, {
1217
- data: {
1218
- items: 'f_user_telephone',
1219
- tablename: 't_user',
1220
- condition: `name = '${val}'`,
1221
- orderitem: 'id'
1222
- }
1223
- }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
1224
- this.$parent.$parent.model.f_repairman_phone = ress.data[0].f_user_telephone
1225
- })
1226
- }
1227
- },
1228
- },
1229
- async ready() {
1230
- let state = HostApp.getBluetoothState()
1231
- if (state && state.state == 3){
1232
- this.blueState = '连接完成'
1233
- }else {
1234
- this.blueState = '连接失败,请重试'
1235
- }
1236
- this.isRecodr = this.$appdata.getSingleValue('无限制录音');
1237
- // await this.isoverDate()
1238
- ////tag
1239
- ////tag
1240
- ////tag)
1241
- ////tag))
1242
- if (this.$parent.$parent.role == 'repair') {
1243
- this.$set('style__', 'divmask')
1244
- this.$set('style_view_', '')
1245
- } else if (this.$parent.$parent.role == 'view' || this.$parent.$parent.item.f_upload_state == '已传') {
1246
- this.$set('style__', 'divmask')
1247
- this.$set('style_view_', 'divmask')
1248
- ////tag
1249
- } else {
1250
- this.$set('style__', '')
1251
- this.$set('style_view_', '')
1252
- }
1253
-
1254
- for (let item of this.radios) {
1255
- if (this.paper.f_client_evaluation == item.label) {
1256
- item.isChecked = true;
1257
- }
1258
- }
1259
- if (!this.paper.f_notified_path)
1260
- this.$set('paper.f_notified_path', Vue.nopic)
1261
- if (!this.paper.f_sign_path)
1262
- this.$set('paper.f_sign_path', Vue.nopic)
1263
- ////tag
1264
- if (!this.paper.f_overall_imgs) {
1265
- let imgs = []
1266
- // imgs.push({f_overall_path:Vue.nopic})
1267
- this.$set('paper.f_overall_imgs', imgs)
1268
- ////tag
1269
- }
1270
- if (!this.paper.f_overall2_path)
1271
- this.$set('paper.f_overall2_path', Vue.nopic)
1272
-
1273
- this.userid = this.role == 'view' ? this.$login.f.id : Vue.user.id
1274
- if (Vue.config.safecheck != undefined) {
1275
- if (Vue.config.safecheck.ApproveConfig != undefined) {
1276
- if (Vue.config.safecheck.ApproveConfig.safeCheckToRepair != undefined) {
1277
- this.safeCheckToRepair = Vue.config.safecheck.ApproveConfig.safeCheckToRepair
1278
- }
1279
- }
1280
- }
1281
- let device = this.$parent.$parent.data
1282
- for (const deviceitem in device) {
1283
- if (deviceitem.startsWith('device') && device[deviceitem] && device[deviceitem].length > 0){
1284
- //tag)
1285
- let items = device[deviceitem][0].f_items
1286
- let deviceType = device[deviceitem][0].f_device_type
1287
- for (let i = 0; i < items.length; i++) {
1288
- if (items[i].f_is_defect){
1289
- let reason = items[i].f_item_name+":"
1290
- if (items[i].type === 'selector' || items[i].type === 'radio' || items[i].type === 'checkbox'){
1291
- for (let j = 0; j < items[i].f_item_value.length; j++) {
1292
- if (j+1 === items[i].f_item_value.length){
1293
- reason += items[i].f_item_value[j]
1294
- }else{
1295
- reason += items[i].f_item_value[j] + ","
1296
- }
1297
- }
1298
- }else{
1299
- reason += items[i].f_item_value
1300
- }
1301
- if (items[i].f_path){
1302
- this.defectImgs.push(items[i].f_path)
1303
- }
1304
- if (items[i].f_p1_path){
1305
- this.defectImgs.push(items[i].f_p1_path)
1306
- }
1307
- if (items[i].f_p2_path){
1308
- this.defectImgs.push(items[i].f_p2_path)
1309
- }
1310
- if (items[i].f_p3_path){
1311
- this.defectImgs.push(items[i].f_p3_path)
1312
- }
1313
- if (items[i].tooltip){
1314
- this.defectToolTip.push(items[i].tooltip)
1315
- }
1316
- this.defectReason.push({device:deviceType,deviceitem:reason})
1317
- }
1318
-
1319
- }
1320
- }
1321
- }
1322
- ////tag
1323
- ////tag
1324
- //tag
1325
- ////tag
1326
- //tag)
1327
- //tag)
1328
- //tag)
1329
- ////tag
1330
- ////tag
1331
- ////tag
1332
- },
1333
- watch: {
1334
- '$parent.$parent.isUpload'(val) {
1335
- ////tag
1336
- },
1337
- 'meading'(val) {
1338
- ////tag
1339
- this.$parent.$parent.meading = val
1340
- },
1341
- 'backlistisselect'(val) {
1342
- if (val == true) {
1343
- this.showmodel = true
1344
- this.deletebacklistisselect=false
1345
- }
1346
- },
1347
- 'deletebacklistisselect'(val) {
1348
- if (val == true) {
1349
- this.showmodelthree = true
1350
- this.backlistisselect=false
1351
- }
1352
- },
1353
- 'isRecodr'(val) {
1354
- if (val == 'false' || val == undefined || val == null || val == '' || val == 'undefined') {
1355
- this.isRecodr = "false";
1356
- }
1357
- }
1358
- }
1359
- }
1360
- </script>
1361
- <style scoped>
1362
- .panel-self{
1363
- border-radius: 5px;
1364
- border:1px solid #c5e1f7;
1365
- background-color: #F2F6FA;
1366
- }
1367
- .text-left{
1368
- text-align:left;
1369
- }
1370
- .font{
1371
- font: 15px PingFang-SC-Medium;
1372
- color: #333333;
1373
- }
1374
- .showIi{
1375
- font: 14px PingFang-SC-Medium;
1376
- color: #666666;
1377
- }
1378
- .info{
1379
- margin-top: 15px;
1380
- border-radius: 5px;
1381
- background-color: #f3faff;
1382
- }
1383
- .btn-photo{
1384
- border: 0;
1385
- border-radius: 7px;
1386
- background-color: #7dc1f4;
1387
- font: 15px PingFang-SC-Bold;
1388
- height: 20%;
1389
- }
1390
- .div-photo{
1391
- width: auto;
1392
- height: auto;
1393
- /* margin-top: 10px; */
1394
- position: absolute;
1395
- bottom: 10px;
1396
- right: 10px;
1397
- }
1398
- .btn-voice{
1399
- border-radius: 7px;
1400
- border: 1px solid #dedede;
1401
- background-color: #f5fbff;
1402
- font: 15px PingFang-SC-Bold;
1403
- color: #499edf;
1404
- }
1405
- .save-btn{
1406
- width: 25%;
1407
- background-color:#499edf;
1408
- border-radius: 6px;
1409
- color: #FFFFFF;
1410
- font: 15px PingFang-SC-Bold;
1411
- }
1412
- .upload-btn{
1413
- width: 25%;
1414
- background-color:#ffffff;
1415
- border: 1px solid #499edf;
1416
- border-radius: 6px;
1417
- color: #499edf;
1418
- font: 15px PingFang-SC-Bold;
1419
- }
1420
- .repair-btn{
1421
- width: 25%;
1422
- border: 1px solid #499edf;
1423
- border-radius: 6px;
1424
- font: 15px PingFang-SC-Bold;
1425
- }
1426
- #el_ca_tx{
1427
- width: 100%;
1428
- margin: 5px;
1429
- }
1430
- #el_ca_txt{
1431
- width: 100%;
1432
- margin: 5px;
1433
- }
1434
- </style>
1
+ <template>
2
+ <form novalidate class="form-horizontal" style="width: 95%;margin: auto">
3
+ <div class="form-group col-md-12 col-sm-12 col-xs-12" :class="style__">
4
+ <div class="form-group col-md-12 col-sm-12 col-xs-12">
5
+ <label class="control-label font text-left col-md-4 col-xs-4">备注</label>
6
+ <div class="col-md-12 col-sm-12 col-xs-12">
7
+ <textarea v-model="paper.f_repair_approved_note" class="form-control"></textarea>
8
+ </div>
9
+ </div>
10
+ </div>
11
+ <div class="form-group col-sm-12 col-xs-12 col-md-12 info" :class="style__">
12
+ <div class="text-center">
13
+ <label class="font">总体安检照片请依次拍摄:</label>
14
+ </div>
15
+ <div class="col-md-12 col-sm-12 col-xs-12">
16
+ <ol class="showIi">
17
+ <li>1.燃气设施全景</li>
18
+ <li>2.燃气表照片</li>
19
+ <li>3.灶具照片</li>
20
+ <li>4.其他照片</li>
21
+ </ol>
22
+ </div>
23
+ </div>
24
+
25
+ <div class="form-group col-sm-12 col-xs-12 col-md-12 " :class="style__">
26
+ <label class="text-left font">总体隐患照片</label>
27
+
28
+ <div class="auto" :class="style__">
29
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
30
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
31
+ <div class="row" style="height: 240px;overflow: scroll;top: 1px" >
32
+ <div class="col-xs-4 col-sm-3 col-md-2" style="margin-bottom: 35px" v-for="(index,img) in defectImgs">
33
+ <img-self :src="img" alt="总体隐患照片" :width="140" :height="170"></img-self>
34
+ <!-- <img src="../../assets/删除.png" @click="delfile('f_overall_path', img.f_overall_path,index)" style="width: 15px;margin-top: -80px" alt="">-->
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ <div class="form-group col-sm-12 col-xs-12 col-md-12 info" :class="style__">
42
+ <div class="text-center">
43
+ <label class="font">隐患汇总:</label>
44
+ </div>
45
+ <div class="col-md-12 col-sm-12 col-xs-12">
46
+ <ol class="showIi">
47
+ <li v-for="item in defectReason">{{ item.deviceitem }}</li>
48
+ </ol>
49
+ </div>
50
+ </div>
51
+ <div class="form-group col-sm-12 col-xs-12 col-md-12 " :class="style__">
52
+ <label class="text-left font">总体安检照片</label>
53
+
54
+ <div class="auto" :class="style__">
55
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
56
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
57
+ <div class="row" style="height: 240px;overflow: scroll;top: 1px" >
58
+ <div class="col-xs-4 col-sm-3 col-md-2" style="margin-bottom: 35px" v-for="(index,img) in paper.f_overall_imgs">
59
+ <img-self :src="img.f_overall_path" alt="总体安检照片" :width="140" :height="170"></img-self>
60
+ <img src="../../../assets/删除.png" @click="delfile('f_overall_path', img.f_overall_path,index)" style="width: 15px;margin-top: -80px" alt="">
61
+ </div>
62
+ </div>
63
+ <div class="row text-right div-photo">
64
+ <button type="button" name="button" class="btn btn-photo" @click="takePic('f_overall_path', '总体安检照片')">拍照</button>
65
+ <!--<button type="button" name="button" class="btn btn-primary btn-photo" @click="takePic('f_overall_path', '总体安检照片1')">拍照</button>-->
66
+ <!--&nbsp;&nbsp;&nbsp;&nbsp;<img src="../../../assets/remove.png" :class="style__" @click="delfile('f_overall_path', img.f_overall_path)" style="width: 25%;"></img>-->
67
+ </div>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ <!-- <div class="form-group col-sm-12 col-xs-12 col-md-12 info" :class="style__" v-if="defectToolTip">-->
73
+ <!-- <div class="text-center">-->
74
+ <!-- <label class="font">整改建议汇总:</label>-->
75
+ <!-- </div>-->
76
+ <!-- <div class="col-md-12 col-sm-12 col-xs-12">-->
77
+ <!-- <ol class="showIi">-->
78
+ <!-- <li v-for="item in defectToolTip">{{ item }}</li>-->
79
+ <!-- </ol>-->
80
+ <!-- </div>-->
81
+ <!-- </div>-->
82
+ <div class="form-group col-sm-12 col-xs-12 col-md-12 " :class="style__">
83
+ <input type="checkbox" v-model="paper.f_read_instructions"/><label class="text-left font">我已阅读须知内容</label>
84
+
85
+ </div>
86
+ <div class="form-group col-sm-12 col-xs-12 col-md-12 " :class="style__" v-if="paper.f_read_instructions">
87
+ <label class="text-left font">用户签名</label>
88
+ <div class="auto">
89
+ <div class="panel">
90
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
91
+ <div class="row" style="height: 240px;overflow: scroll;top: 1px">
92
+ <div class="col-sm-4">
93
+ <img :class="style__" :src="paper.f_sign_path" :width="200" :height="150" />
94
+ </div>
95
+ </div>
96
+ <div class="row text-right div-photo">
97
+ <button type="button" name="button" class="btn btn-primary btn-photo" @click="sign">签名</button>
98
+ </div>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ </div>
103
+ <div class="form-group col-sm-12 col-xs-12 col-md-12 " :style="timeSet(this.isneedDate)?'':'display:none'">
104
+ <label>请输入超期原因:</label><br/>
105
+ <textarea style="width: 100%;" v-model="paper.f_exceed_reason"></textarea>
106
+ </div>
107
+ <div class="form-group col-md-12 col-sm-12 col-xs-12" :class="style__">
108
+ <div class="col-xs-6 col-sm-6">
109
+ <input type="checkbox" v-model="backlistisselect" :readonly="enabled"/><label class="text-left font" >限制购气</label>
110
+ </div>
111
+ <div class="col-xs-6 col-sm-6">
112
+ <input type="checkbox" v-model="deletebacklistisselect" :readonly="deleteenabled"/><label class="text-left font" >取消限制</label>
113
+ </div>
114
+ </div>
115
+ <div class="form-group col-md-12 col-sm-12 col-xs-12" :class="style__" v-if="Vue.$appdata.getParam('安检天然气安全使用须知检查')=='是'">
116
+ <div class="col-xs-12 col-sm-12">
117
+ <input type="checkbox" v-model="paper.f_gas_guidelines" /><label class="text-left font" >天然气安全使用须知</label>
118
+ </div>
119
+ <div class="col-xs-12 col-sm-12">
120
+ <input type="checkbox" v-model="paper.f_safety_warning" /><label class="text-left font" >天然气室内使用安全警示</label>
121
+ </div>
122
+ <div class="col-xs-12 col-sm-12">
123
+ <input type="checkbox" v-model="paper.f_gas_manual" /><label class="text-left font" >安全用气手册</label>
124
+ </div>
125
+ </div>
126
+ <div class="row">
127
+ <label for="readsafe" class="text-left font">蓝牙状态:{{blueState}}</label>
128
+ <button type="button" @click="initBlueState()">重新连接</button>
129
+ </div>
130
+ <div class="form-group col-md-12 col-sm-12 col-xs-12" :class="style__">
131
+ <div class="form-group col-md-12 col-sm-12 col-xs-12">
132
+ <input type="checkbox" v-model="paper.f_defect_notified" class="showIi" />隐患整改单
133
+ </div>
134
+ <div class="form-group col-md-12 col-sm-12 col-xs-12" v-if="paper.f_defect_notified">
135
+ <div class="form-group col-md-12 col-sm-12 col-xs-12">
136
+ <button type="button" @click="print()">打印隐患整改单</button>
137
+ </div>
138
+ <div class="form-group col-md-12 col-sm-12 col-xs-12">
139
+ <label class="text-left font">隐患整改单照片(要求内容清晰包含用户签字):</label>
140
+ <div class="auto" >
141
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
142
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
143
+ <div class="row" style="height: 240px;overflow: scroll;top: 1px">
144
+ <div class="col-sm-4">
145
+ <img-self :src="paper.f_notified_path" alt="隐患整改单" width="150" height="200"></img-self>
146
+ </div>
147
+ </div>
148
+ <div class="row text-right div-photo">
149
+ <button type="button" name="button" class="btn btn-primary btn-photo" @click="takePic('f_notified_path', '隐患整改单照片')">拍照</button>
150
+ &nbsp;&nbsp;&nbsp;&nbsp;<img src="../../../assets/remove.png" :class="style__" @click="delfile('f_notified_path', this.paper.f_notified_path)" style="width: 25%;"></img>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ </div>
155
+ </div>
156
+ </div>
157
+ <!-- <div class="form-group col-md-12 col-sm-12 col-xs-12">-->
158
+ <!-- <div class="row">-->
159
+ <!-- <label class="text-left">请对我们的服务做出评价:</label>-->
160
+ <!-- </div>-->
161
+ <!-- <div class="col-xs-4 col-sm-4" v-for="item in radios">-->
162
+ <!-- <input v-model="paper.f_client_evaluation" :value="item.label" :checked='item.isChecked' @click="check(item.value)" type="radio">{{item.label}}-->
163
+ <!-- </div>-->
164
+
165
+ <!--<div class="col-sm-4">-->
166
+ <!--<radio-group :value.sync="paper.f_client_evaluation" type="success" buttons="false">-->
167
+ <!--<radio value="满意">满意</radio>-->
168
+ <!--<radio value="基本满意">基本满意</radio>-->
169
+ <!--<radio value="不满意">不满意</radio>-->
170
+ <!--</radio-group>-->
171
+ <!--</div>-->
172
+ <!-- </div>-->
173
+
174
+ <div class="form-group col-md-12 col-sm-12 col-xs-12" v-if="isRecodr=='false'">
175
+ <label class="text-left font">反馈录音:</label>
176
+ <div class="col-md-12 col-sm-12 col-xs-12">
177
+ <button type="button" name="button" class="btn btn-primary btn-voice" @click="record">
178
+ <img src="../../../assets/录音.png" style="width: 14%;">
179
+ <span v-if="!paper.f_recording1_path">开始录音</span>
180
+ <span v-if="paper.f_recording1_path">已录音</span>
181
+ </button>
182
+ &nbsp;&nbsp;&nbsp;&nbsp;<img src="../../../assets/remove.png" style="width: 15px;" :class="style__" @click="delAudioFile('f_recording1_path', paper.f_recording1_path)"></img>
183
+ </div>
184
+ </div>
185
+
186
+ <div v-if="false">
187
+ <div class="text-center form-group col-md-12 col-sm-12 col-xs-12">
188
+ <button style="width: 30%;margin:3%;margin-bottom: 0%" type="button" v-show="$parent.$parent.actionEnabled && upload_state !='已传' &&(paper.f_complete != '已完成' || paper.back_f_entry_status != '入户') " class="btn save-btn" @click="$parent.$parent.save('temp')">临时保存</button>
189
+ <button style="width: 30%;margin:3%;margin-bottom: 0%" type="button" v-show="$parent.$parent.actionEnabled && upload_state !='已传' && (paper.f_complete != '已完成' || paper.back_f_entry_status != '入户')" class="btn save-btn " @click="$parent.$parent.save('finish')">完成安检</button>
190
+ </div>
191
+ <div class="text-center form-group col-md-12 col-sm-12 col-xs-12">
192
+ <button style="width: 30%;margin:3%;margin-bottom: 0%;margin-top: 0%" id="upload" type="button" v-show="$parent.$parent.actionEnabled && upload_state !='已传' && (paper.f_complete != '已完成' || paper.back_f_entry_status != '入户')" class="btn upload-btn " @click="$parent.$parent.uploadCheckPaper" >上传</button>
193
+ <button style="width: 30%;margin:3%;margin-bottom: 0%;margin-top: 0%" v-if="(safeCheckToRepair == true || safeCheckToRepair == 'true') && $parent.$parent.actionEnabled" class="btn repair-btn btn-warning " type="button" @click="showToRepair">转维修</button> </div>
194
+ </div>
195
+
196
+ </div>
197
+ </form>
198
+ <!-- <modal :show.sync="showCheckToRepair" v-ref:modal :backdrop="isback">-->
199
+ <!-- <div slot="modal-header" class="modal-header">-->
200
+ <!-- <h4 class="modal-title">-->
201
+ <!-- 安检转维修-->
202
+ <!-- </h4>-->
203
+ <!-- </div>-->
204
+ <!-- <div slot="modal-body" class="modal-body">-->
205
+ <!-- <div v-if="showrepair">-->
206
+ <!-- <div class="row">-->
207
+ <!-- <label class="col-xs-4 col-md-4 control-label text-left">派单方式</label>-->
208
+ <!-- <div class="col-xs-8 col-md-8">-->
209
+ <!-- <label v-for="handling1 in handling" >-->
210
+ <!-- <input type="radio"-->
211
+ <!-- v-model="meading"-->
212
+ <!-- value="{{handling1.label}}">-->
213
+ <!-- {{handling1.label}}-->
214
+ <!-- </label>-->
215
+ <!-- </div>-->
216
+ <!-- </div>-->
217
+ <!-- <div class="row" v-if="meading == '转站点'">-->
218
+ <!-- <label class="col-xs-4 col-md-4 control-label font text-left" for="f_reciever">站点</label>-->
219
+ <!-- &lt;!&ndash;<input type="text" v-show="false" v-model="serviceacitivity.f_reciever"&ndash;&gt;-->
220
+ <!-- &lt;!&ndash;v-validate:f_reciever='{ required: true }'>&ndash;&gt;-->
221
+ <!-- <div class="col-xs-8 col-md-8">-->
222
+ <!-- <right-tree @ready="onReady" islist :Url="Url" :userid="userid" :source="source" v-on:re-res="reres" :textContent="选择站点管理员" :selectData="" v-ref:f_reciever>-->
223
+ <!-- </right-tree>-->
224
+ <!-- </div>-->
225
+ <!-- </div>-->
226
+
227
+ <!-- <div class="row" style="margin-top: 6px" v-if="meading == '转维修员'">-->
228
+ <!-- <label class="col-xs-4 col-md-4 control-label font text-left">维修人</label>-->
229
+ <!-- <div class="col-xs-8">-->
230
+ <!-- <v-select :value="$parent.$parent.model.serviceacitivity[0].f_reciever" :value-single="true"-->
231
+ <!-- :options='f_repair_person' placeholder='请选择维修员'-->
232
+ <!-- close-on-select v-on:change="repiarmancg"></v-select>-->
233
+ <!-- </div>-->
234
+
235
+ <!-- </div>-->
236
+ <!-- <div class="row" style="margin-top: 6px">-->
237
+ <!-- <label for="f_repair" class="col-xs-4 col-md-4 control-label font text-left">报修类型</label>-->
238
+ <!-- <div class="col-xs-8 col-md-8">-->
239
+ <!-- <v-select :value.sync="$parent.$parent.model.f_repairtype" :value-single="true"-->
240
+ <!-- :options='repairstypes' placeholder='报修类型'-->
241
+ <!-- close-on-select>-->
242
+ <!-- </v-select>-->
243
+ <!-- </div>-->
244
+ <!-- </div>-->
245
+
246
+ <!-- <div class="row" style="margin-top: 6px">-->
247
+ <!-- <label class="control-label font text-left col-md-4 col-xs-4">备注</label>-->
248
+ <!-- <div class="col-xs-8 col-md-8">-->
249
+ <!-- <input type="text" v-model="$parent.$parent.model.f_remarks"/>-->
250
+ <!-- </div>-->
251
+
252
+ <!-- </div>-->
253
+
254
+ <!-- </div>-->
255
+ <!-- <div v-if="!showrepair">-->
256
+ <!-- 暂无隐患设备信息-->
257
+ <!-- </div>-->
258
+ <!-- </div>-->
259
+ <!-- <div slot="modal-footer" class="modal-footer">-->
260
+ <!-- <button type="button" class="btn btn-default" @click="uploadPaper()">确定</button>-->
261
+ <!-- <button type="button" class="btn btn-default" @click="undo()">取消</button>-->
262
+ <!-- </div>-->
263
+ <!-- </modal>-->
264
+ <!--拉黑框-->
265
+ <modal :show.sync="showmodel" v-ref:modal>
266
+ <div slot="modal-header" class="modal-header">
267
+ <h4 class="modal-title">
268
+ 限制用户购气
269
+ </h4>
270
+ </div>
271
+ <div slot="modal-body" class="modal-body">
272
+ <!-- <div class="row" style="margin-top: 6px">-->
273
+ <!-- <label style="color: red;">注:当前页面无法取消对用户的限制购气</label>-->
274
+ <!-- </div>-->
275
+ <div class="row" style="margin-top: 6px">
276
+ <textarea id="el_ca_tx" v-model.trim="cause" style="border-radius:4px;width: 100%;" placeholder="请输入限制用户购气原因" >
277
+ </textarea>
278
+ </div>
279
+ </div>
280
+ <div slot="modal-footer" class="modal-footer">
281
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="backlist()">确认</button>
282
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="cancel()">取消</button>
283
+ </div>
284
+ </modal>
285
+
286
+ <modal :show.sync="showmodelthree" v-ref:modal>
287
+ <div slot="modal-header" class="modal-header">
288
+ <h4 class="modal-title">
289
+ 取消限制用户购气
290
+ </h4>
291
+ </div>
292
+ <div slot="modal-body" class="modal-body">
293
+ <!-- <div class="row" style="margin-top: 6px">-->
294
+ <!-- <label style="color: red;">注:当前页面无法取消对用户的限制购气</label>-->
295
+ <!-- </div>-->
296
+ <div class="row" style="margin-top: 6px">
297
+ <textarea id="el_ca_txt" v-model.trim="deletecause" style="border-radius:4px;width: 100%;" placeholder="请输入取消限制用户购气原因" >
298
+ </textarea>
299
+ </div>
300
+ </div>
301
+ <div slot="modal-footer" class="modal-footer">
302
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="deletebacklist()">确认</button>
303
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="deletecancel()">取消</button>
304
+ </div>
305
+ </modal>
306
+ </template>
307
+
308
+ <script>
309
+ import Vue from 'vue'
310
+ import * as Util from '../../Util'
311
+ import { HttpResetClass } from 'vue-client'
312
+ import RadioGroup from 'vue-client/src/vue-strap/src/radioGroup'
313
+ import Radio from 'vue-client/src/vue-strap/src/radioBtn'
314
+ import co from 'co'
315
+
316
+ // let getRepairParam = function * (self){
317
+ // let data = {
318
+ // $parent.$parent.model: self.$parent.$parent.model, loginUser: {
319
+ // name: self.role == 'view'?self.$login.f.name:Vue.user.name,
320
+ // ename: self.role == 'view'?self.$login.f.ename:Vue.user.ename
321
+ // }, user: self.user, callObj: self.callObj
322
+ // }
323
+ // if(self.$parent.$parent.meading == '转维修员'){
324
+ // data.toRepair = '一级派单'
325
+ // }
326
+ // data.$parent.$parent.model.f_attendant = data.loginUser.name
327
+ // ////tag
328
+ // ////tag
329
+ // let res
330
+ // let errString = self.$parent. $parent.errorVerify()
331
+ // if(errString){
332
+ // ////tag
333
+ // if (Vue.android)
334
+ // self.undo()
335
+ // this.$showMessage(errString)
336
+ // return
337
+ // } else {
338
+ // if(self.role == 'inspect'){
339
+ // if(self.$parent.$parent.meading == '转维修员' && (self.$parent.$parent.model.serviceacitivity[0].f_reciever == '' || self.$parent.$parent.model.serviceacitivity[0].f_reciever == undefined)){
340
+ // this.$showMessage("请选择维修员!")
341
+ // return
342
+ // }
343
+ // if(self.$parent.$parent.meading == '转站点' && (self.$parent.$parent.model.serviceacitivity[0].f_reciever == '' || self.$parent.$parent.model.serviceacitivity[0].f_reciever == undefined)){
344
+ // HostApp.alert()
345
+ // this.$showMessage("请选择站点!")
346
+ // return
347
+ // }
348
+ // if(self.$parent.$parent.model.f_repairtype == ''){
349
+ // this.$showMessage("请选择报修类型!")
350
+ // return
351
+ // }
352
+ // ////tag)
353
+ // let checkResult = '正常'
354
+ // let options = [{"data": "已处理"},{"data": "未处理"}]
355
+ // let value = ''
356
+ // let codata = JSON.parse(JSON.stringify(self.paper))
357
+ // for(let device in codata){
358
+ // ////tag)
359
+ // let f_device_type
360
+ // if(device.startsWith("device")){
361
+ // for(let item in codata[device]) {
362
+ // if(codata[device].length > 1 ){
363
+ // let j = Number.parseInt(item)+1
364
+ // f_device_type = `${codata[device][item].f_device_type}${j}`
365
+ // }else{
366
+ // f_device_type = codata[device][item].f_device_type
367
+ // }
368
+ // // ////tag
369
+ // let details = []
370
+ // for(let i in codata[device][item].f_items){
371
+ // let items = codata[device][item].f_items[i]
372
+ // ////tag
373
+ // if(items.f_is_defect == true || items.f_is_defect == 'true'){
374
+ // checkResult = '有隐患'
375
+ // ////tag
376
+ // let res = yield self.$resetpost(`${self.Url}/rs/sql/getDeviceItem`,{data:{f_device_id:codata[device][item].f_device_id,f_item_name:items.f_item_name}})
377
+ // ////tag)
378
+ // self.$set('detail.f_defect_id', res.data[0].id)
379
+ // self.$set('detail.f_project',`${items.f_item_name}:${items.f_item_value}`)
380
+ // self.$set('detail.type',items.type)
381
+ // self.$set('detail.options',options)
382
+ // details.push(JSON.parse(JSON.stringify(self.detail)))
383
+ // }
384
+ // if(items.type == 'selector'){
385
+ // items.selected = ''
386
+ // }
387
+ // self.detail = {}
388
+ // }
389
+ // ////tag
390
+ // self.$set('defectDevice.f_type',f_device_type)
391
+ // self.$set('defectDevice.details',details)
392
+ // if(self.defectDevice.details.length >0 ){
393
+ // self.repairitems.push(JSON.parse(JSON.stringify(self.defectDevice)))
394
+ // }
395
+ // self.defectDevice = {}
396
+ // ////tag
397
+ // }
398
+ // }
399
+ // }
400
+ // self.$set('$parent.$parent.model.f_repairitems.data',self.repairitems)
401
+ //
402
+ //
403
+ // ////tag)
404
+ // res = self.$androidUtil.bzLogic('safecheckToRepair',data)
405
+ // ////tag
406
+ // ////tag
407
+ // ////tag
408
+ // if(res.code == 200){
409
+ // self.$parent.$parent.isSafeCheckToRepair = true
410
+ // self.undo()
411
+ // self.$set('paper.f_SafeToRepair_id',res.data.f_service_id)
412
+ // ////tag
413
+ // self.$resetpost(`${self.Url}/rs/logic/updatePaperRepair`,{data:{f_paper_id:self.paper.f_paper_id,f_SafeToRepair_id:res.data.f_service_id}}).then((ret)=>{
414
+ // ////tag
415
+ // if(ret.data.code ==200){
416
+ // ////tag
417
+ // self.$parent.$parent.$back()
418
+ // }else{
419
+ // self.$showMessage('安检转维修失败!')
420
+ // }
421
+ // }).catch(v=>{
422
+ // ////tag)
423
+ // self.$showMessage('安检转维修失败!')
424
+ // })
425
+ // }else{
426
+ // self.$showMessage('安检转维修失败!')
427
+ // }
428
+ // }
429
+ // }
430
+ // }
431
+
432
+
433
+
434
+ // let getRepairs = async function(self,url) {
435
+ // // 获取配置信息
436
+ // try {
437
+ // let val = {source: 'this.getParentByType($department$).getAllChildrens().where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1 ))', userid: `${Vue.user.id}`}
438
+ // let repairs =[]
439
+ // let res = await Vue.resetpost(`${url}/rs/search`,{data: val},{resolveMsg: null, rejectMsg: null})
440
+ // res.data.forEach((item) => {
441
+ // repairs.push({label: item.name, value: item})
442
+ // })
443
+ // self.f_repair_person = repairs
444
+ // if(self.$parent.$parent.role == 'inspect'){
445
+ // let res = self.$androidUtil.bzLogic('getUserInfo',{id:self.paper.f_userinfoid})
446
+ // if(res.code == 200){
447
+ // self.$parent.$parent.user = res.data[0]
448
+ // self.$parent.$parent.model.f_area = self.$parent.$parent.user.f_area
449
+ // }
450
+ // }else{
451
+ // ////tag
452
+ // self.$resetpost(`${self.Url}/rs/sql/safeCheckgetUserInfo`,{data:{id:self.paper.f_userinfoid}},{resolveMsg: null, rejectMsg: null}).then((res)=>{
453
+ // ////tag
454
+ // if(res.data.length != 0){
455
+ // self.$parent.$parent.user = res.data[0]
456
+ // self.$parent.$parent.model.f_area = self.$parent.$parent.user.f_area
457
+ // }
458
+ // })
459
+ // // path({alias:'getUserInfo',data:{id:this.paper.f_userinfoid}})
460
+ // }
461
+ // } catch (error) {
462
+ // ////tag
463
+ // }
464
+ // }
465
+
466
+ export default {
467
+ title: '用户反馈',
468
+ data() {
469
+ return {
470
+ blueState:'',
471
+ defectImgs: [],
472
+ defectToolTip: [],
473
+ defectReason: [],
474
+ images: [],
475
+ showmodelthree: false,
476
+ isneedDate: this.$parent.$parent.isneedDate,
477
+ plan: this.$parent.$parent.item,
478
+ meading: this.$parent.$parent.meading,
479
+ paper: this.$parent.$parent.data,
480
+ printContent: [],
481
+ upload_state: this.$parent.$parent.item.f_upload_state,
482
+ enabled: false,//控制限制购气是否可选
483
+ deleteenabled: false,
484
+ showmodel: false,
485
+ backlistisselect: false,
486
+ deletebacklistisselect: false,
487
+ radios: [
488
+ {
489
+ label: '满意',
490
+ value: 0,
491
+ isChecked: false,
492
+ },
493
+ {
494
+ label: '基本满意',
495
+ value: 1,
496
+ isChecked: false,
497
+ },
498
+ {
499
+ label: '不满意',
500
+ value: 2,
501
+ isChecked: false,
502
+ },
503
+ ],
504
+ repairitems: [],
505
+ repairstypes: this.$appdata.getParam('报修类型'),
506
+ // f_repair_person: this.readRepair(),
507
+ showrepair: false,
508
+ safeCheckToRepair: '',
509
+ showCheckToRepair: false,
510
+ userid: '',
511
+ source:
512
+ 'dep=this.getParentByType($organization$).getSpecialResByType($department$),' +
513
+ 'tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))',
514
+ isback: false,
515
+ defectDevice: {},
516
+ detail: {},
517
+ callObj: null,
518
+ user: {},
519
+ role: this.$parent.$parent.role,
520
+ handling: [{label: '转站点', value: '转站点'}, {label: '转维修员', value: '转维修员'}],
521
+ Url: this.$androidUtil.getProxyUrl(),
522
+ cause: "",
523
+ deletecause: "",
524
+ isRecodr: "false", //单值参数,为true则是开启全程录音
525
+ }
526
+ },
527
+ props: ['idx'],
528
+ components: {
529
+ RadioGroup,
530
+ Radio
531
+ },
532
+ methods: {
533
+ initBlueState(){
534
+ let state = HostApp.getBluetoothState()
535
+ if (state && state.state == 3){
536
+ this.blueState = '连接完成'
537
+ }else {
538
+ if (state && state.state == -1){
539
+ this.$showMessage('蓝牙连接未打开,打开后重新尝试')
540
+ return
541
+ }
542
+ this.blueState = '连接失败,请重试'
543
+ this.$androidUtil.print(JSON.stringify([{ type: 4, value: 2, unit: 'line' }]))
544
+ let state2 = HostApp.getBluetoothState()
545
+ if (state2 && state2.state == 3){
546
+ this.blueState = '连接完成'
547
+ }else {
548
+ this.blueState = '连接失败,请重试'
549
+ }
550
+ }
551
+ },
552
+ timeSet(val) {
553
+ //////tag
554
+ if (!val) {
555
+ return
556
+ }
557
+ let time = new Date(val).getTime()
558
+ let time2 = new Date().getTime()
559
+ if (time2 > time) {
560
+ return true
561
+ }
562
+ },
563
+ // async isoverDate(){
564
+ // ////tag
565
+ // let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/androidGetuserinfo`, {data:{
566
+ // condition:"f_plan_item_id='"+this.$parent.$parent.item.id+"'"
567
+ // }
568
+ // })
569
+ // this.isneedDate=res.data[0]["f_subscribe_date"]
570
+ // ////tag
571
+ // },
572
+ check(index) {
573
+ ////tag
574
+ // 先取消所有选中项
575
+ for (let item of this.radios) {
576
+ item.isChecked = false;
577
+ }
578
+ //再设置当前点击项选中
579
+ this.paper.f_client_evaluation = this.radios[index].label;
580
+ // 设置值,以供传递
581
+ this.radios[index].isChecked = true;
582
+ ////tag;
583
+ },
584
+ getSignValue(fileName) {
585
+ this.f_signname = fileName
586
+ },
587
+ cameraCallBack(prop, fileName) {
588
+ if (prop == 'f_overall_path') {
589
+ let f_overall_path = fileName + '?' + Math.random()
590
+ HostApp.__this__.paper.f_overall_imgs.push({
591
+ f_overall_path: f_overall_path
592
+ })
593
+ } else {
594
+ HostApp.__this__.paper[prop] = fileName + '?' + Math.random()
595
+ }
596
+ HostApp.__callback__ = null
597
+ HostApp.__this__ = null
598
+ },
599
+ takePic(prop, title, index) {
600
+ HostApp.__callback__ = this.cameraCallBack
601
+ HostApp.__this__ = this
602
+ ////tag
603
+ ////tag
604
+ let fileName
605
+ if (prop == 'f_overall_path') {
606
+ if (!this.paper.f_overall_imgs[index] || this.paper.f_overall_imgs[index].f_overall_path.includes("nopic.png")) {
607
+ fileName = Util.guid() + '-' + prop + '.jpg'
608
+ } else {
609
+ fileName = Util.getFileName(this.paper.f_overall_imgs[index].f_overall_path)
610
+ }
611
+ } else {
612
+ if (!this.paper[prop] || this.paper[prop].includes("nopic.png")) {
613
+ fileName = Util.guid() + '-' + prop + '.jpg'
614
+ } else {
615
+ fileName = Util.getFileName(this.paper[prop])
616
+ }
617
+ }
618
+
619
+ HostApp._open_a_page({
620
+ type: 'boomerang',
621
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
622
+ param: {
623
+ file: fileName,
624
+ requestCode: 111,
625
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");',
626
+ watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name + '\t' + this.paper.f_userinfo_code+ '\t' + this.paper.f_user_name+ '\t' + this.paper.f_address
627
+ }
628
+ })
629
+ },
630
+ amrCallBack(fileName) {
631
+ HostApp.__this__.$set('paper.f_recording1_path', fileName)
632
+ HostApp.__callback__ = null
633
+ HostApp.__this__ = null
634
+ },
635
+ record() {
636
+ if (this.$parent.$parent.role != 'inspect') {
637
+ if (this.paper.f_recording1_path != '') {
638
+ window.location = this.paper.f_recording1_path
639
+ }
640
+ } else {
641
+ HostApp.__callback__ = this.amrCallBack
642
+ HostApp.__this__ = this
643
+ let fileName
644
+ if (!this.paper.f_recording1_path) {
645
+ fileName = Util.guid() + '.amr'
646
+ } else {
647
+ fileName = Util.getFileName(this.paper.f_recording1_path)
648
+ }
649
+ HostApp._open_a_page({
650
+ type: 'boomerang',
651
+ page: 'com.aofeng.hybrid.android.peripheral.AudioClipActivity',
652
+ param: {file: fileName, requestCode: 111, callback: 'javascript:HostApp.__callback__("%s");'}
653
+ })
654
+ }
655
+ },
656
+ // 签名回调
657
+ signCallback(prop, fileName) {
658
+ // HostApp.alert('绑定属性:' + prop + ' 文件全路径如file:///storage/sdcard0/safecheck/abc.jpg:' + fullFileName)
659
+ HostApp.__this__.$set('paper.f_sign_path', fileName)
660
+ HostApp.__callback__ = null
661
+ HostApp.__this__ = null
662
+ },
663
+ // 用户签名
664
+ sign() {
665
+ // if (!this.paper.f_read_instructions) {
666
+ // this.$showMessage('请先阅读并勾选用户须知内容后进行签名!')
667
+ // return
668
+ // }
669
+ this.delAudioFile('f_sign_path', this.paper.f_sign_path)
670
+ let prop = 'f_sign_path'
671
+ let idx = 'aofeng'
672
+ let fileName
673
+ if (!this.paper.f_sign_path) {
674
+ fileName = Util.guid() + '-valve-' + idx + '-' + prop + '.jpg'
675
+ } else {
676
+ fileName = Util.getFileName(this.paper.f_sign_path)
677
+ }
678
+ HostApp.__callback__ = this.signCallback
679
+ HostApp.__this__ = this
680
+ HostApp.getSignature({
681
+ file: fileName,
682
+ requestCode: 111,
683
+ callback: 'javascript:HostApp.__callback__("' + prop + '", "%s");'
684
+ })
685
+ },
686
+ delfile(prop, fileName, index) {
687
+ if (fileName == Vue.nopic)
688
+ return
689
+ else {
690
+ if (prop == 'f_overall_path') {
691
+ this.paper.f_overall_imgs.splice(index, 1)
692
+ HostApp.delfile(fileName)
693
+ } else {
694
+ HostApp.delfile(fileName)
695
+ this.paper[prop] = Vue.nopic
696
+ }
697
+ }
698
+ },
699
+ delAudioFile(prop, fileName) {
700
+ if (!fileName)
701
+ return
702
+ else {
703
+ HostApp.delfile(fileName)
704
+ this.paper[prop] = null
705
+ }
706
+ },
707
+ //获取打印用户信息
708
+ getUser() {
709
+ if (this.paper.f_user_name == undefined)
710
+ this.paper.f_user_name = ''
711
+ this.printContent.push({
712
+ type: 3,
713
+ text: '用户名称:' + this.paper.f_user_name,
714
+ fontsize: 2,
715
+ isbold: false,
716
+ align: 'left'
717
+ })
718
+ if (this.paper.f_userinfo_code == undefined)
719
+ this.paper.f_userinfo_code = ''
720
+ this.printContent.push({
721
+ type: 3,
722
+ text: '用户编号:' + this.paper.f_userinfo_code,
723
+ fontsize: 2,
724
+ isbold: false,
725
+ align: 'left'
726
+ })
727
+ if (this.paper.f_address == undefined)
728
+ this.paper.f_address = ''
729
+ this.printContent.push({type: 3, text: '地址:' + this.paper.f_address, fontsize: 2, isbold: false, align: 'left'})
730
+ if (this.paper.f_user_phone == undefined){
731
+ this.paper.f_user_phone = ''
732
+ }
733
+ this.printContent.push({
734
+ type: 3,
735
+ text: '电话:' + this.paper.f_user_phone,
736
+ fontsize: 2,
737
+ isbold: false,
738
+ align: 'left'
739
+ })
740
+ this.printContent.push({
741
+ type: 3,
742
+ text: '入户证号:' + (this.$parent.$parent.item.f_enter_number || ''),
743
+ fontsize: 2,
744
+ isbold: false,
745
+ align: 'left'
746
+ })
747
+ this.printContent.push({
748
+ type: 3,
749
+ text: '用气性质:' + (this.$parent.$parent.item.f_user_type || ''),
750
+ fontsize: 2,
751
+ isbold: false,
752
+ align: 'left'
753
+ })
754
+ this.printContent.push({
755
+ type: 3,
756
+ text: '表具类型:' + (this.$parent.$parent.item.f_plan_meters[0].f_meter_type || ''),
757
+ fontsize: 2,
758
+ isbold: false,
759
+ align: 'left'
760
+ })
761
+ this.printContent.push({
762
+ type: 3,
763
+ text: '表具编号:' + (this.$parent.$parent.item.f_plan_meters[0].f_meter_no || ''),
764
+ fontsize: 2,
765
+ isbold: false,
766
+ align: 'left'
767
+ })
768
+ this.printContent.push({
769
+ type: 3,
770
+ text: '本次表底:' + (this.$parent.$parent .item.f_plan_meters[0].f_metergasnums || ''),
771
+ fontsize: 2,
772
+ isbold: false,
773
+ align: 'left'
774
+ })
775
+
776
+ },
777
+ verify() {
778
+ let hasError = this.$parent.$parent.verifyUser()
779
+ if (hasError)
780
+ return hasError
781
+ hasError = this.$parent.$parent.verifyDevices()
782
+ if (hasError)
783
+ return hasError
784
+ },
785
+ print() {
786
+ let state = HostApp.getBluetoothState()
787
+ if (state && state.state == 3){
788
+ this.blueState = '连接完成'
789
+ }else {
790
+ this.blueState = '连接失败,请重试'
791
+ }
792
+ if (state && state.state == -1){
793
+ this.$showMessage('蓝牙未打开,请确认蓝牙是否打开')
794
+ return
795
+ }
796
+ let errString = this.verify()
797
+ if (errString) {
798
+ ////tag
799
+ if (Vue.android)
800
+ this.$showMessage(errString)
801
+ return
802
+ }
803
+ // 文本
804
+ let templatename = '安检结果单'
805
+ if (Vue.config.safecheck != undefined) {
806
+ if (Vue.config.safecheck.ApproveConfig != undefined) {
807
+ if (Vue.config.safecheck.ApproveConfig.templatename != undefined) {
808
+ templatename = Vue.config.safecheck.ApproveConfig.templatename
809
+ }
810
+ }
811
+ }
812
+ let textHead = {type: 3, text: templatename, fontsize: 3, isbold: true, align: 'center'}
813
+ let feedPageHead = {type: 4, value: 2, unit: 'line'}
814
+ let feedPageEnd = {type: 4, value: 4, unit: 'line'}
815
+ this.printContent.push({type: 3, text: Vue.user.orgs, fontsize: 3, isbold: true, align: 'center'})
816
+ this.printContent.push(textHead)
817
+ this.printContent.push(feedPageHead)
818
+ this.getUser()
819
+ this.getDefect()
820
+ this.getCheck()
821
+ this.printContent.push(feedPageEnd)
822
+ let arrstr = JSON.stringify(this.printContent)
823
+ ////tag
824
+ this.$androidUtil.print(arrstr)
825
+ this.$set('printContent', [])
826
+ },
827
+ //打印安检信息
828
+ getCheck() {
829
+ let telephone = '96777'
830
+ if (Vue.config.safecheck != undefined) {
831
+ if (Vue.config.safecheck.ApproveConfig != undefined) {
832
+ if (Vue.config.safecheck.ApproveConfig.checkphone != undefined) {
833
+ telephone = Vue.config.safecheck.ApproveConfig.checkphone
834
+ }
835
+ }
836
+ }
837
+ this.printContent.push({
838
+ type: 3,
839
+ text: '*******************************',
840
+ fontsize: 3,
841
+ isbold: false,
842
+ align: 'center'
843
+ })
844
+ // this.printContent.push({type: 3, text: '咨询电话;' , fontsize: 2, isbold: false, align: 'left'})
845
+ this.printContent.push({type: 3, text: '安检人员:' + Vue.user.name, fontsize: 2, isbold: false, align: 'left'})
846
+ this.printContent.push({
847
+ type: 3,
848
+ text: '安检日期:' + this.getNowFormatDate(),
849
+ fontsize: 2,
850
+ isbold: false,
851
+ align: 'left'
852
+ })
853
+ let f_sign_path = this.paper.f_sign_path
854
+ this.printContent.push({ type: 3, text: '用户签字:', fontsize: 2, isbold: false, align: 'left' })
855
+ if(f_sign_path){
856
+ f_sign_path = f_sign_path.replace('http://newimg/','')
857
+ this.printContent.push({ type: 5, url: f_sign_path, align: 'left' })
858
+ }else{
859
+ this.printContent.push({ type: 4, value: 2, unit: 'line' })
860
+ this.printContent.push({ type: 4, value: 2, unit: 'line' })
861
+ this.printContent.push({ type: 4, value: 2, unit: 'line' })
862
+ }
863
+ this.printContent.push({
864
+ type: 3,
865
+ text: '*******************************',
866
+ fontsize: 3,
867
+ isbold: false,
868
+ align: 'center'
869
+ })
870
+ this.printContent.push({type: 3, text: '温馨提示:请在燃气使用后及时关闭灶前阀门,任何情况下严禁使用明火查漏。' , fontsize: 2, isbold: false, align: 'left'})
871
+
872
+ this.printContent.push({type: 3, text: '如发生燃气泄漏:' , fontsize: 2, isbold: false, align: 'left'})
873
+ this.printContent.push({type: 3, text: '1.关闭所有燃气阀门;' , fontsize: 2, isbold: false, align: 'left'})
874
+ this.printContent.push({type: 3, text: '2.不要开、关任何电器设施,杜绝一切产生火花的行为;' , fontsize: 2, isbold: false, align: 'left'})
875
+ this.printContent.push({type: 3, text: '3.立即开窗通风;' , fontsize: 2, isbold: false, align: 'left'})
876
+ this.printContent.push({type: 3, text: '4.到室外拨打燃气公司电话报修;' , fontsize: 2, isbold: false, align: 'left'})
877
+ this.printContent.push({type: 3, text: '' , fontsize: 2, isbold: false, align: 'left'})
878
+ this.printContent.push({type: 3, text: `潜能燃气24小时维修电话:${(this.$appdata.getSingleValue(Vue.user.orgs+'联系电话') || '') }` , fontsize: 2, isbold: false, align: 'left'})
879
+ },
880
+
881
+ getDefect() {
882
+ let showmore = false
883
+ if (Vue.config.safecheck != undefined) {
884
+ if (Vue.config.safecheck.ApproveConfig != undefined) {
885
+ if (Vue.config.safecheck.ApproveConfig.showmore != undefined) {
886
+ showmore = Vue.config.safecheck.ApproveConfig.showmore
887
+ }
888
+ }
889
+ }
890
+
891
+ let backData = this.$parent.$parent.getAllDefect()
892
+ // 对隐患信息进行遍历
893
+ let res = JSON.parse(backData.f_defect_content)
894
+ this.printContent.push({
895
+ type: 3,
896
+ text: '安检结果:' + res.result,
897
+ fontsize: 2,
898
+ isbold: false,
899
+ align: 'left'
900
+ })
901
+ this.printContent.push({
902
+ type: 3,
903
+ text: '*******************************',
904
+ fontsize: 3,
905
+ isbold: false,
906
+ align: 'center'
907
+ })
908
+ this.printContent.push({type: 3, text: '' , fontsize: 2, isbold: false, align: 'left'})
909
+ this.printContent.push({type: 3, text: '' , fontsize: 2, isbold: false, align: 'left'})
910
+ this.printContent.push({
911
+ type: 3,
912
+ text: '隐患及处理方式:',
913
+ fontsize: 3,
914
+ isbold: false,
915
+ align: 'center'
916
+ })
917
+ this.printContent.push({type: 3, text: '' , fontsize: 2, isbold: false, align: 'left'})
918
+ for (let dev in this.$parent.$parent.config) {
919
+ for (let device in backData) {
920
+ if (device.startsWith("device")) {
921
+ for (let item in backData[device]) {
922
+ if (backData[device].length != 0 && backData[device][item].f_device_type == dev) {
923
+ for (let i in backData[device][item].f_items) {
924
+ if (backData[device][item].f_items[i].f_is_defect == true || backData[device][item].f_items[i].f_is_defect == 'true') {
925
+ this.printContent.push({
926
+ type: 3,
927
+ text: backData[device][item].f_items[i].f_item_name +':'+ (backData[device][item].f_items[i].f_deal_dispose == '报修' ? '转维修': backData[device][item].f_items[i].f_deal_dispose),
928
+ fontsize: 2,
929
+ isbold: false,
930
+ align: 'left'
931
+ })
932
+ }
933
+ }
934
+ }
935
+ }
936
+ }
937
+ }
938
+ }
939
+ for (let dev in this.$parent.$parent.config) {
940
+ for (let device in backData) {
941
+ if (device.startsWith("device")) {
942
+ for (let item in backData[device]) {
943
+ if (backData[device].length != 0 && backData[device][item].f_device_type == dev) {
944
+ for (let i in backData[device][item].f_items) {
945
+ if(backData[device][item].f_items[i].f_item_name.includes('除上述条目以外的管道燃气问题')){
946
+ this.printContent.push({
947
+ type: 3,
948
+ text: '除上述条目以外的管道燃气问题:'+ backData[device][item].f_items[i].f_item_value,
949
+ fontsize: 2,
950
+ isbold: false,
951
+ align: 'left'
952
+ })
953
+ }
954
+ }
955
+ }
956
+ }
957
+ }
958
+ }
959
+ }
960
+ this.printContent.push({
961
+ type: 3,
962
+ text: `备注:${this.paper.f_repair_approved_note || ''}`,
963
+ fontsize: 3,
964
+ isbold: false,
965
+ align: 'center'
966
+ })
967
+ },
968
+ //获取当前时间
969
+ getNowFormatDate() {
970
+ var date = new Date();
971
+ var seperator1 = "-";
972
+ var seperator2 = ":";
973
+ var month = date.getMonth() + 1;
974
+ var strDate = date.getDate();
975
+ if (month >= 1 && month <= 9) {
976
+ month = "0" + month;
977
+ }
978
+ if (strDate >= 0 && strDate <= 9) {
979
+ strDate = "0" + strDate;
980
+ }
981
+ var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
982
+ + " " + date.getHours() + seperator2 + date.getMinutes()
983
+ + seperator2 + date.getSeconds();
984
+ return currentdate;
985
+ },
986
+ readRepair() {
987
+ let url = this.$androidUtil.getProxyUrl()
988
+ let gen = getRepairs(this, url)
989
+ return co(gen)
990
+ },
991
+ showToRepair() {
992
+ let res = this.hasDefect()
993
+ ////tag
994
+ ////tag
995
+ if (res == '正常') {
996
+ this.showrepair = false
997
+ } else {
998
+ this.showrepair = true
999
+ this.assignObj()
1000
+ }
1001
+ this.showCheckToRepair = !this.showCheckToRepair
1002
+ },
1003
+ // 选中部门
1004
+ reres(val) {
1005
+ if (val.res == undefined) {
1006
+ return
1007
+ }
1008
+ this.$parent.$parent.model.serviceacitivity[0].f_meetunit = val.res
1009
+ this.$parent.$parent.model.f_meetunit = val.res
1010
+ this.$parent.$parent.model.f_orgstr = val.resids
1011
+ var arr = val.res.split('.')
1012
+ this.$parent.$parent.model.f_outlets = arr[arr.length - 1]
1013
+ this.$parent.$parent.model.serviceacitivity[0].f_reciever = val.resids
1014
+ },
1015
+ assignObj() {
1016
+ this.$parent.$parent.model.f_contact_phone = this.paper.f_user_phone
1017
+ this.$parent.$parent.model.f_user_name = this.paper.f_user_name
1018
+ this.$parent.$parent.model.f_address = this.paper.f_address
1019
+ this.$parent.$parent.model.f_user_type = this.paper.f_check_type
1020
+ this.$parent.$parent.model.f_street = this.paper.f_street
1021
+ this.$parent.$parent.model.f_residential_area = this.paper.f_residential_area
1022
+ this.$parent.$parent.model.f_building = this.paper.f_building
1023
+ this.$parent.$parent.model.f_unit = this.paper.f_unit
1024
+ this.$parent.$parent.model.f_floor = this.paper.f_floor
1025
+ this.$parent.$parent.model.f_room = this.paper.f_room
1026
+ this.$parent.$parent.model.f_floor = this.paper.f_floor
1027
+ this.$parent.$parent.model.f_userinfo_id = this.paper.f_userinfoid
1028
+ this.$parent.$parent.model.f_userinfo_code = this.paper.f_userinfo_code
1029
+ },
1030
+ hasDefect() {
1031
+ let checkResult = '正常'
1032
+ let codata = JSON.parse(JSON.stringify(this.paper))
1033
+ for (let device in this.paper) {
1034
+ if (device.startsWith("device")) {
1035
+ for (let item in this.paper[device]) {
1036
+ for (let i in this.paper[device][item].f_items) {
1037
+ let items = this.paper[device][item].f_items[i]
1038
+ ////tag
1039
+ if (items.f_is_defect == true || items.f_is_defect == 'true') {
1040
+ checkResult = '有隐患'
1041
+ }
1042
+ }
1043
+ }
1044
+ }
1045
+ }
1046
+ return checkResult
1047
+ },
1048
+ uploadPaper() {
1049
+ if (this.showrepair) {
1050
+ ////tag
1051
+ ////tag
1052
+ ////tag
1053
+ ////tag
1054
+
1055
+ if (this.meading == '转维修员' && (this.$parent.$parent.model.serviceacitivity[0].f_reciever == '' || this.$parent.$parent.model.serviceacitivity[0].f_reciever == undefined)) {
1056
+ this.$showMessage("请选择维修员!")
1057
+ return
1058
+ }
1059
+ if (this.$parent.$parent.meading == '转站点' && (this.$parent.$parent.model.serviceacitivity[0].f_reciever == '' || this.$parent.$parent.model.serviceacitivity[0].f_reciever == undefined)) {
1060
+ this.$showMessage("请选择站点!")
1061
+ return
1062
+ }
1063
+ if (this.$parent.$parent.model.f_repairtype == '') {
1064
+ this.$showMessage("请选择报修类型!")
1065
+ return
1066
+ }
1067
+ this.$parent.$parent.isToRepair = true
1068
+ this.$parent.$parent.uploadCheckPaper()
1069
+ // this.$parent.$parent.savePaper(false).then((res) => {
1070
+ // ////tag
1071
+ // if(res != true){
1072
+ // ////tag
1073
+ // return
1074
+ // }else{
1075
+ // this.$parent.$parent.todo()
1076
+ // }
1077
+ // })
1078
+ } else {
1079
+ this.$parent.$parent.undo()
1080
+ }
1081
+
1082
+ },
1083
+ //确认安检转维修
1084
+
1085
+ undo() {
1086
+ this.showCheckToRepair = !this.showCheckToRepair
1087
+ this.$parent.$parent.model.serviceacitivity[0].f_reciever = ''
1088
+ this.$parent.$parent.model.serviceacitivity[0].f_meetunit = ''
1089
+ this.$parent.$parent.model.f_repairtype = ''
1090
+ this.meading = '转站点'
1091
+ },
1092
+ //取消拉黑
1093
+ async deletebacklist() {
1094
+ if (!this.deletecause) {
1095
+ this.$showMessage("请填写取消拉黑原因!")
1096
+ return
1097
+ }
1098
+ this.paper.f_blocking_cause = this.deletecause
1099
+ ////tag)
1100
+ let http = new HttpResetClass()
1101
+ ////tag
1102
+ let res1 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
1103
+ data: {
1104
+ items: "version",
1105
+ tablename: "t_userinfo",
1106
+ condition: "f_userinfo_id=" + this.paper.f_userinfoid,
1107
+ orderitem: "f_userinfo_id"
1108
+ }
1109
+ }, {resolveMsg: null, rejectMsg: null})
1110
+ ////tag)
1111
+ ////tag
1112
+ let res2 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/backlistOperate`, {
1113
+ data: {
1114
+ "f_operat_type": "取消拉黑",
1115
+ "f_state": "有效",
1116
+ "f_user_name": this.paper.f_user_name,
1117
+ "f_comments": this.paper.f_delete_cause,
1118
+ "f_operator": Vue.user.name,
1119
+ "f_operatorid": Vue.user.id,
1120
+ "f_orgid": Vue.user.orgid,
1121
+ "f_orgname": Vue.user.orgs,
1122
+ "f_depid": Vue.user.depids,
1123
+ "f_depname": Vue.user.deps,
1124
+ "f_describe": `${Vue.user.name}对用户${this.paper.f_user_name}进行取消拉黑`,
1125
+ "f_userinfo_id": {
1126
+ "f_userinfo_id": this.paper.f_userinfoid,
1127
+ "f_user_state": "正常",
1128
+ "version": res1.data[0].version
1129
+ },
1130
+ "f_limit_times":"",
1131
+ "f_limit_value":""
1132
+ }
1133
+ }, {resolveMsg: null, rejectMsg: null})
1134
+
1135
+ ////tag)
1136
+ if (res2.data.code == 200) {
1137
+ this.showmodelthree = false
1138
+ this.deleteenabled = true
1139
+ this.paper.f_blacklist = "否"
1140
+ this.$showMessage("取消该用户限制购气成功!")
1141
+ } else {
1142
+ this.$showMessage("网络异常,请稍后再试!")
1143
+ }
1144
+ },
1145
+ async backlist() {
1146
+ if (!this.cause) {
1147
+ this.$showMessage("请填写拉黑原因!")
1148
+ return
1149
+ }
1150
+ this.paper.f_blocking_cause = this.cause
1151
+ ////tag)
1152
+ let http = new HttpResetClass()
1153
+ ////tag
1154
+ let res1 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
1155
+ data: {
1156
+ items: "version",
1157
+ tablename: "t_userinfo",
1158
+ condition: "f_userinfo_id=" + this.paper.f_userinfoid,
1159
+ orderitem: "f_userinfo_id"
1160
+ }
1161
+ }, {resolveMsg: null, rejectMsg: null})
1162
+ ////tag)
1163
+ ////tag
1164
+ let res2 = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/backlistOperate`, {
1165
+ data: {
1166
+ data:this.$parent.$parent.data,
1167
+ item:this.$parent.$parent.data.item,
1168
+ "f_operat_type": "拉黑",
1169
+ "f_state": "有效",
1170
+ "f_user_name": this.paper.f_user_name,
1171
+ "f_comments": this.paper.f_blocking_cause,
1172
+ "f_operator": Vue.user.name,
1173
+ "f_operatorid": Vue.user.id,
1174
+ "f_orgid": Vue.user.orgid,
1175
+ "f_orgname": Vue.user.orgs,
1176
+ "f_depid": Vue.user.depids,
1177
+ "f_depname": Vue.user.deps,
1178
+ "f_describe": `${Vue.user.name}对用户${this.paper.f_user_name}进行拉黑`,
1179
+ "f_userinfo_id": {
1180
+ "f_userinfo_id": this.paper.f_userinfoid,
1181
+ "f_user_state": "正常",
1182
+ "version": res1.data[0].version
1183
+ },
1184
+ "f_limit_times":"0",
1185
+ "f_limit_value":"0"
1186
+ }
1187
+ }, {resolveMsg: null, rejectMsg: null})
1188
+
1189
+ ////tag)
1190
+ if (res2.data.code == 200) {
1191
+ this.showmodel = false
1192
+ this.enabled = true
1193
+ this.paper.f_blacklist = "是"
1194
+ this.$showMessage("将该用户限制购气成功!")
1195
+ } else if (res2.data.msg == '数据增加重复') {
1196
+ this.showmodel = false
1197
+ this.enabled = true
1198
+ this.$showMessage("该用户已被限制购气,请勿重复提交!")
1199
+ } else {
1200
+ this.$showMessage("网络异常,请稍后再试!")
1201
+ }
1202
+ },
1203
+ cancel() {
1204
+ this.backlistisselect = false
1205
+ this.showmodel = false
1206
+ },
1207
+ deletecancel() {
1208
+ this.deletebacklistisselect = false
1209
+ this.showmodelthree = false
1210
+ },
1211
+ repiarmancg(val) {
1212
+ if (val) {
1213
+ ////tag
1214
+ this.$parent.$parent.model.serviceacitivity[0].f_reciever = val.name
1215
+ let http1 = new HttpResetClass()
1216
+ http1.load('POST', `${this.Url}/rs/sql/tel_singleTable_OrderBy`, {
1217
+ data: {
1218
+ items: 'f_user_telephone',
1219
+ tablename: 't_user',
1220
+ condition: `name = '${val}'`,
1221
+ orderitem: 'id'
1222
+ }
1223
+ }, {resolveMsg: null, rejectMsg: null}).then((ress) => {
1224
+ this.$parent.$parent.model.f_repairman_phone = ress.data[0].f_user_telephone
1225
+ })
1226
+ }
1227
+ },
1228
+ },
1229
+ async ready() {
1230
+ let state = HostApp.getBluetoothState()
1231
+ if (state && state.state == 3){
1232
+ this.blueState = '连接完成'
1233
+ }else {
1234
+ this.blueState = '连接失败,请重试'
1235
+ }
1236
+ this.isRecodr = this.$appdata.getSingleValue('无限制录音');
1237
+ // await this.isoverDate()
1238
+ ////tag
1239
+ ////tag
1240
+ ////tag)
1241
+ ////tag))
1242
+ if (this.$parent.$parent.role == 'repair') {
1243
+ this.$set('style__', 'divmask')
1244
+ this.$set('style_view_', '')
1245
+ } else if (this.$parent.$parent.role == 'view' || this.$parent.$parent.item.f_upload_state == '已传') {
1246
+ this.$set('style__', 'divmask')
1247
+ this.$set('style_view_', 'divmask')
1248
+ ////tag
1249
+ } else {
1250
+ this.$set('style__', '')
1251
+ this.$set('style_view_', '')
1252
+ }
1253
+
1254
+ for (let item of this.radios) {
1255
+ if (this.paper.f_client_evaluation == item.label) {
1256
+ item.isChecked = true;
1257
+ }
1258
+ }
1259
+ if (!this.paper.f_notified_path)
1260
+ this.$set('paper.f_notified_path', Vue.nopic)
1261
+ if (!this.paper.f_sign_path)
1262
+ this.$set('paper.f_sign_path', Vue.nopic)
1263
+ ////tag
1264
+ if (!this.paper.f_overall_imgs) {
1265
+ let imgs = []
1266
+ // imgs.push({f_overall_path:Vue.nopic})
1267
+ this.$set('paper.f_overall_imgs', imgs)
1268
+ ////tag
1269
+ }
1270
+ if (!this.paper.f_overall2_path)
1271
+ this.$set('paper.f_overall2_path', Vue.nopic)
1272
+
1273
+ this.userid = this.role == 'view' ? this.$login.f.id : Vue.user.id
1274
+ if (Vue.config.safecheck != undefined) {
1275
+ if (Vue.config.safecheck.ApproveConfig != undefined) {
1276
+ if (Vue.config.safecheck.ApproveConfig.safeCheckToRepair != undefined) {
1277
+ this.safeCheckToRepair = Vue.config.safecheck.ApproveConfig.safeCheckToRepair
1278
+ }
1279
+ }
1280
+ }
1281
+ let device = this.$parent.$parent.data
1282
+ for (const deviceitem in device) {
1283
+ if (deviceitem.startsWith('device') && device[deviceitem] && device[deviceitem].length > 0){
1284
+ //tag)
1285
+ let items = device[deviceitem][0].f_items
1286
+ let deviceType = device[deviceitem][0].f_device_type
1287
+ for (let i = 0; i < items.length; i++) {
1288
+ if (items[i].f_is_defect){
1289
+ let reason = items[i].f_item_name+":"
1290
+ if (items[i].type === 'selector' || items[i].type === 'radio' || items[i].type === 'checkbox'){
1291
+ for (let j = 0; j < items[i].f_item_value.length; j++) {
1292
+ if (j+1 === items[i].f_item_value.length){
1293
+ reason += items[i].f_item_value[j]
1294
+ }else{
1295
+ reason += items[i].f_item_value[j] + ","
1296
+ }
1297
+ }
1298
+ }else{
1299
+ reason += items[i].f_item_value
1300
+ }
1301
+ if (items[i].f_path){
1302
+ this.defectImgs.push(items[i].f_path)
1303
+ }
1304
+ if (items[i].f_p1_path){
1305
+ this.defectImgs.push(items[i].f_p1_path)
1306
+ }
1307
+ if (items[i].f_p2_path){
1308
+ this.defectImgs.push(items[i].f_p2_path)
1309
+ }
1310
+ if (items[i].f_p3_path){
1311
+ this.defectImgs.push(items[i].f_p3_path)
1312
+ }
1313
+ if (items[i].tooltip){
1314
+ this.defectToolTip.push(items[i].tooltip)
1315
+ }
1316
+ this.defectReason.push({device:deviceType,deviceitem:reason})
1317
+ }
1318
+
1319
+ }
1320
+ }
1321
+ }
1322
+ ////tag
1323
+ ////tag
1324
+ //tag
1325
+ ////tag
1326
+ //tag)
1327
+ //tag)
1328
+ //tag)
1329
+ ////tag
1330
+ ////tag
1331
+ ////tag
1332
+ },
1333
+ watch: {
1334
+ '$parent.$parent.isUpload'(val) {
1335
+ ////tag
1336
+ },
1337
+ 'meading'(val) {
1338
+ ////tag
1339
+ this.$parent.$parent.meading = val
1340
+ },
1341
+ 'backlistisselect'(val) {
1342
+ if (val == true) {
1343
+ this.showmodel = true
1344
+ this.deletebacklistisselect=false
1345
+ }
1346
+ },
1347
+ 'deletebacklistisselect'(val) {
1348
+ if (val == true) {
1349
+ this.showmodelthree = true
1350
+ this.backlistisselect=false
1351
+ }
1352
+ },
1353
+ 'isRecodr'(val) {
1354
+ if (val == 'false' || val == undefined || val == null || val == '' || val == 'undefined') {
1355
+ this.isRecodr = "false";
1356
+ }
1357
+ }
1358
+ }
1359
+ }
1360
+ </script>
1361
+ <style scoped>
1362
+ .panel-self{
1363
+ border-radius: 5px;
1364
+ border:1px solid #c5e1f7;
1365
+ background-color: #F2F6FA;
1366
+ }
1367
+ .text-left{
1368
+ text-align:left;
1369
+ }
1370
+ .font{
1371
+ font: 15px PingFang-SC-Medium;
1372
+ color: #333333;
1373
+ }
1374
+ .showIi{
1375
+ font: 14px PingFang-SC-Medium;
1376
+ color: #666666;
1377
+ }
1378
+ .info{
1379
+ margin-top: 15px;
1380
+ border-radius: 5px;
1381
+ background-color: #f3faff;
1382
+ }
1383
+ .btn-photo{
1384
+ border: 0;
1385
+ border-radius: 7px;
1386
+ background-color: #7dc1f4;
1387
+ font: 15px PingFang-SC-Bold;
1388
+ height: 20%;
1389
+ }
1390
+ .div-photo{
1391
+ width: auto;
1392
+ height: auto;
1393
+ /* margin-top: 10px; */
1394
+ position: absolute;
1395
+ bottom: 10px;
1396
+ right: 10px;
1397
+ }
1398
+ .btn-voice{
1399
+ border-radius: 7px;
1400
+ border: 1px solid #dedede;
1401
+ background-color: #f5fbff;
1402
+ font: 15px PingFang-SC-Bold;
1403
+ color: #499edf;
1404
+ }
1405
+ .save-btn{
1406
+ width: 25%;
1407
+ background-color:#499edf;
1408
+ border-radius: 6px;
1409
+ color: #FFFFFF;
1410
+ font: 15px PingFang-SC-Bold;
1411
+ }
1412
+ .upload-btn{
1413
+ width: 25%;
1414
+ background-color:#ffffff;
1415
+ border: 1px solid #499edf;
1416
+ border-radius: 6px;
1417
+ color: #499edf;
1418
+ font: 15px PingFang-SC-Bold;
1419
+ }
1420
+ .repair-btn{
1421
+ width: 25%;
1422
+ border: 1px solid #499edf;
1423
+ border-radius: 6px;
1424
+ font: 15px PingFang-SC-Bold;
1425
+ }
1426
+ #el_ca_tx{
1427
+ width: 100%;
1428
+ margin: 5px;
1429
+ }
1430
+ #el_ca_txt{
1431
+ width: 100%;
1432
+ margin: 5px;
1433
+ }
1434
+ </style>