safecheck-client 3.0.30-2 → 3.0.30-4

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