safecheck-client 4.0.0-15 → 4.0.0-16

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,1337 +1,1337 @@
1
- <template>
2
- <div class="select-overspread repair-bg auto" style="padding-bottom:5px;">
3
- <!--<div class="bq-parent" v-if="shutype == 'heng'">-->
4
- <!--<blockquote class="blockquote">-->
5
- <!--<p><span>{{repairitem.header}}</span><a @click="mute()" style="float:right" href="#" class="repair-mute-class"><img src="../../assets/novoice.png" width="25px;" alt=""><span style="margin-left:10px;color: #304A66">关闭声音</span></a></p>-->
6
- <!--</blockquote>-->
7
- <!--</div>-->
8
- <div class="panel panel-default auto repair-info-content">
9
- <div class="panel-body" style="padding: 0">
10
- <!-- 安检项内容 -->
11
- <div class="auto repair-info-content compatible" style="padding: 0">
12
- <div class="row auto" style="padding: 0">
13
- <div v-show="false" class="{{shuclass}}" v-if=" device.device != '燃气表'">
14
- <button type="button" name="button" class="btn btn-primary" @click='adddetails()' :disabled="issee">增加</button>
15
- </div>
16
- <!--<div class="{{shuclass}}" v-if="device.device != '燃气表' && candelete">-->
17
- <!--<button type="button" name="button" class="btn btn-primary" @click='deletedetails()' :disabled="issee">删除</button>-->
18
- <!--</div>-->
19
- <div class="shuclass1" v-show="row.isshow" v-for="(idxs,row) in f_items" style="padding: 4px; border:1px solid #D4D4D4;border-bottom: 0" >
20
- <label v-if="row.type != 'radio' && row.type != 'text' && row.type != 'picture' && row.type != 'checkbox'" v-show="row.isshow" class="fivelabel">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
21
- <label v-if="row.type == 'radio'" v-show="row.isshow" class="radiolabel">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
22
- <label v-if="row.type == 'text'" v-show="row.isshow" class="textlabel1">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
23
- <label v-if="row.type == 'picture' || row.type == 'checkbox'" v-show="row.isshow" class="textlabel">{{row.f_item_name}} <br/>{{row.remark}} <span v-show="row.verification_state" :style="{color:row.verification_state==='pass'?'green':'red'}">{{row.verification_text}}</span></label>
24
- <!--<span v-if="show" style="font-weight:bold">{{row.f_content}}</span>-->
25
- <!--<datepicker placeholder="请选择时间"-->
26
- <!--:value.sync="row.f_content"-->
27
- <!--v-model="row.f_content"-->
28
- <!--:format="'yyyy-MM-dd'"-->
29
- <!--v-if="!show && row.type == 'date'"-->
30
- <!--:readonly="true"-->
31
- <!--&gt;</datepicker>-->
32
- <div style="clear: both" v-if="row.type == 'picture'" class="form-group col-sm-12" >
33
- <div class="auto" >
34
- <div class="panel">
35
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
36
- <div class="row" style="height: 160px;width:160px;overflow: scroll;top: 1px">
37
- <div class="col-sm-4" v-show="row.f_path">
38
- <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
39
- </div>
40
- <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name)">
41
- <img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
42
- </div>
43
- <img v-show="row.f_path" src="../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
44
- </div>
45
- </div>
46
- </div>
47
- </div>
48
- </div>
49
- <div style="float: left;width:60%" class="form-group" v-if="row.type == 'string'" v-show="row.isshow">
50
- <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" :readonly="role == 'androidview' || row.readonly">
51
- </div>
52
- <div style="float: left;width:60%" class="form-group col-sm-12" v-if="row.type == 'date'" v-show="row.isshow">
53
- <datepicker id="f_making_date" :placeholder= row.f_item_name
54
- :value.sync="row.f_item_value"
55
- v-if="row.type == 'date'"
56
- v-show="row.isshow"
57
- :disabled-days-of-Week="[]"
58
- :format="'yyyy-MM-dd HH:mm:ss'"
59
- :show-reset-button="reset" readonly="readonly">
60
- </datepicker>
61
- </div>
62
-
63
- <div style="float: left;width:60%" class="form-group" v-if="!show && row.type == 'number'" v-show="row.isshow">
64
- <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" onkeyup="value=value.replace(/[^\d\.-]/g,'')" :readonly="row.readonly">
65
- </div>
66
- <!--<input type="text" class="form-control" v-model="row.f_content" v-if="!show && row.type == 'string' && row.f_project != '表号'" :disabled="(!(ischecked == '有')) || issee" :readonly="issee">-->
67
- <!--<input type="text" class="form-control" v-model="meternum" v-if="!show && row.type == 'string' && row.f_project == '表号' " :disabled="(!(ischecked == '有')) || issee" :readonly="issee" >-->
68
- <!--<button type="button" name="button" class="btn btn-primary" @click="scan" v-if="!show && row.f_project == '表号' ">扫码</button>-->
69
- <input-select v-if="row.type == 'inputSelector'"
70
- v-show="row.isshow"
71
- :value.sync="row.selected"
72
- v-model="row.selected"
73
- :readonly="false"
74
- :options="row.options"
75
- @change="changse"
76
- @click="transelation(idxs)"></input-select>
77
- <v-select style="float: left" :value.sync="row.selected"
78
- v-model="row.selected"
79
- v-if="row.type == 'selector'"
80
- :search="false"
81
- v-show="row.isshow"
82
- placeholder='请选择'
83
- :options="row.options"
84
- :disabled="role == 'androidview' || row.readonly"
85
- @change="changse"
86
- @click="transelation(idxs)"
87
- :multiple="row.multiple"
88
- :close-on-select="!row.multiple" clear-button></v-select>
89
- <div style="float: left;width: 30%" class="form-group" v-if="!show && row.type == 'radio'">
90
- <div class="col-xs-6 col-sm-6 col-md-6" v-for="item in row.options">
91
- <!-- <input type="radio" :name="row.f_item_name" @click="disSelect($parent.idxs,item.value)" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value" >-->
92
- <input type="radio" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value" >
93
- <span>{{item.label}}</span>
94
- </div>
95
- </div>
96
- <div v-if="!show && row.type == 'checkbox'" class="col-xs-12 col-sm-12 col-md-12" style="white-space: nowrap" >
97
- <div style="float: left" v-for="item in row.options">
98
- <input type="checkbox" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value">
99
- <span>{{item.label}}</span>
100
- </div>
101
- </div>
102
- <div style="clear: both">
103
- <label v-if="row.f_item_value.indexOf('其他') >-1" class="fivelabel">其他</label>
104
- <div style="float: left;width:60%" class="form-group" v-if="row.f_item_value.indexOf('其他') >-1">
105
- <input type="text" class="form-control" maxlength="100" v-model="row.f_else" :readonly="role == 'androidview' || row.readonly">
106
- </div>
107
- </div>
108
- <div style="clear: both">
109
- <!-- <div class="form-group" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '') && (livedispose == 'true' || livedispose == true) " >-->
110
- <!-- <label class="fivelabel">现场已处理</label>-->
111
- <!-- <v-select :value="row.f_live_dispose"-->
112
- <!-- :value-single="true"-->
113
- <!-- :options="lives"-->
114
- <!-- :disabled="role == 'androidview'"-->
115
- <!-- @change="changlive"-->
116
- <!-- @click="transelation(idxs)"-->
117
- <!-- close-on-select clear-button></v-select>-->
118
- <!-- </div>-->
119
- <div class="form-group" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '') && (dealdispose == 'true' || dealdispose == true) " >
120
- <label class="fivelabel">处理方式</label>
121
- <v-select
122
- :value="row.f_deal_dispose"
123
- :value-single="true"
124
- :options="deals"
125
- :disabled="role == 'androidview'"
126
- @change="changdeal"
127
- @click="transelation(idxs)"
128
- close-on-select clear-button>
129
- </v-select>
130
- </div>
131
- <div style="display: flex;flex-wrap: wrap" v-if="row.f_deal_dispose == '自行处理' && this.showZXTime">
132
- <label class="fivelabel">处理时效:</label>
133
- <datepicker
134
- :value.sync="row.f_handle_date"
135
- v-model="row.f_handle_date"
136
- :format="'yyyy-MM-dd 00:00:00'"
137
- placeholder="请选择"
138
- style="width: 60%">
139
- </datepicker>
140
- </div>
141
- <div style="margin-left: 10px" class="form-group col-sm-10" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && row.tooltip != undefined && row.tooltip != '' ">
142
- ☆{{row.tooltip}}
143
- </div>
144
- <div class="form-group col-sm-12" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '')">
145
- <div class="auto" style="margin:1px;">
146
- <div class="panel">
147
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
148
- <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
149
- <div class="col-sm-4" v-show="row.f_path">
150
- <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
151
- </div>
152
- <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name)">
153
- <img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
154
- </div>
155
- <img v-show="row.f_path" src="../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
156
- </div>
157
- <button v-if="isalbum" style="float: right" type="button" name="button" class="btn btn-primary btn-photo"
158
- @click="takePic2(idxs, row.f_item_name)">相册
159
- </button>
160
- </div>
161
- </div>
162
- </div>
163
- <!--多张隐患照片-->
164
- <div class="auto" v-for="itemIndex in hiddenDangerImgNumber" style="margin: 1px;">
165
- <div class="panel">
166
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
167
- <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
168
- <div class="col-sm-4" v-show="row['f_p' + (itemIndex+1) + '_path']">
169
- <img-self :src="row['f_p' + (itemIndex+1) + '_path']" :alt="row.f_item_name" width="140" height="140"></img-self>
170
- </div>
171
- <div class="col-sm-4" v-show="!row['f_p' + (itemIndex+1) + '_path']" @click="takePic(idxs, row.f_item_name,'f_p' + (itemIndex+1)+ '_path')">
172
- <img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
173
- </div>
174
- <img v-show="row['f_p' + (itemIndex+1)+'_path']" src="../../assets/remove.png" :class="style__" @click="delfile(idxs,row['f_p' + (itemIndex+1)+'_path'],'f_p' + (itemIndex+1)+ '_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
175
- </div >
176
- <button v-if="isalbum" style="float: right" type="button" name="button" class="btn btn-primary btn-photo"
177
- @click="takePic2(idxs, row.f_item_name,'f_p' + (itemIndex+1)+ '_path')">相册
178
- </button>
179
- </div>
180
- </div>
181
- </div>
182
- <div style="display: flex;flex-wrap: wrap;margin-top: 10px" v-if="row.f_deal_dispose == '现场整改' && (row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && this.showXCImg">
183
- <label class="fivelabel">整改照片:</label>
184
- <div class="auto" style="margin:1px;">
185
- <div class="panel">
186
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
187
- <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
188
- <div class="col-sm-4" v-show="row.f_repair_path">
189
- <img-self :src="row.f_repair_path" :alt="row.f_item_name" width="140" height="140"></img-self>
190
- </div>
191
- <div class="col-sm-4" v-show="!row.f_repair_path" @click="takePic(idxs, row.f_item_name,'f_repair_path',row.f_defect_level)">
192
- <img src="../../assets/tackpic.png" alt="点击拍摄照片" width="140" height="140"></img>
193
- </div>
194
- <img v-show="row.f_repair_path" src="../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_repair_path, 'f_repair_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
195
- </div>
196
- </div>
197
- </div>
198
- </div>
199
- </div>
200
- </div>
201
- </div>
202
-
203
- <!--<v-select :value.sync="row.f_content" :options='getOptions(row.f_project)' placeholder='请选择' :disabled="(!(ischecked == '有')) || issee" close-on-select :value-single="true" v-if="!show && row.type == 'selector' && row.f_project != '气表品牌'"-->
204
- <!--&gt;</v-select>-->
205
- <!--<v-select :value.sync="row.f_content" :options='getOptions(row.f_project)' @change="getgasmodel" placeholder='请选择' :disabled="(!(ischecked == '有')) || issee" close-on-select :value-single="true" v-if="!show && row.type == 'selector' && row.f_project == '气表品牌'"-->
206
- <!--&gt;</v-select>-->
207
- <!-- <div class="auto" v-if="!show && row.type == 'checkbox' ">-->
208
- <!-- <input class="magic-checkbox" type="checkbox" id="shebeicheckbox"-->
209
- <!-- :checked="row.f_content == '有'"-->
210
- <!-- @click="switchDetails(row.f_project, $event)" :disabled="issee"/>-->
211
- <!-- <label for="shebeicheckbox" style="width:150px;padding-bottom: 10px">{{row.f_project}}</label>-->
212
- <!-- </div>-->
213
- <!--<img-area :model="Detail.imgs" :sutitle="row.f_project" v-if="row.type == 'picture'" :disabled="issee"></img-area>-->
214
- </div>
215
- </div>
216
- </div>
217
- <div style="border-top: 1px solid #D4D4D4"></div>
218
- </div>
219
- </div>
220
- </div>
221
- </template>
222
- <script>
223
- import Vue from 'vue'
224
- import * as Util from '../Util'
225
-
226
- export default {
227
- title: '维修列表信息',
228
- data() {
229
- return {
230
- // telphoneValid: '/^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$/',
231
- // meterstyle:[],
232
- hiddenDangerImgNumber:0,//隐患图片数
233
- shuclass:'col-xs-12 col-sm-12 col-md-12 form-input-group mg8',
234
- shuclass1:'col-xs-12 col-sm-12 col-md-12 mg8',
235
- // labels:[],
236
- meternum:'',
237
- ischecked:'有',
238
- gasmodel:'',
239
- textstyle:'color: red',
240
- paper: this.$parent.$parent.data,
241
- f_items:[],
242
- page:{},
243
- selectindex:null,
244
- lives:[{label: '是', value: '是'},{label: '否', value: '否'}],
245
- deals:[{label: '现场处理', value: '现场处理'},{label: '自行处理', value: '自行处理'}],
246
- f_live_dispose:'否',
247
- f_deal_dispose:'未处理',
248
- // 初始表底
249
- f_initial_base: {},
250
- // 气量异常差值 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
251
- f_gas_aberrant_number: {},
252
- // 金额异常差值 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
253
- f_fee_aberrant_number: {},
254
- // 累购气量
255
- f_total_gas: {},
256
- // 累购金额
257
- f_total_fee: {},
258
- // 已用气量
259
- f_table_base: {},
260
- // 已用金额
261
- f_fee_base: {},
262
- // 剩余气量
263
- f_gas_balance: {},
264
- // 剩余金额
265
- f_fee_balance: {},
266
- // 表端剩余金额
267
- f_table_balance: {},
268
- // 气量异常差值允许误差
269
-
270
- //物联网表数据存储
271
- f_balance_amount:{},//物联网表剩余金额
272
- f_meter_base:{},//物联网表读数
273
- f_balance_amount1:{},//物联网表现场录入的表上剩余金额
274
- f_meter_base1:{},//物联网表现场录入的表字轮数
275
- f_meter_aberrant_number1: {},//物联网表 表数异常差值
276
- f_fee_aberrant_number1: {},//物联网 表金额异常差值
277
- gasDeviation: (
278
- function (_this) {
279
- let deviation = _this.$appdata.getSingleValue('气量异常差值允许误差')
280
- if (deviation && !isNaN(deviation)) {
281
- return deviation
282
- } else {
283
- return 0
284
- }
285
- }
286
- )(this),
287
- // 金额异常差值允许误差
288
- feeDeviation: (
289
- function (_this) {
290
- let deviation = _this.$appdata.getSingleValue('金额异常差值允许误差')
291
- if (deviation && !isNaN(deviation)) {
292
- return deviation
293
- } else {
294
- return 0
295
- }
296
- }
297
- )(this),
298
- // 字轮异常差值允许误差
299
- meterbase: (
300
- function (_this) {
301
- let deviation = _this.$appdata.getSingleValue('字轮异常差值允许误差')
302
- if (deviation && !isNaN(deviation)) {
303
- return deviation
304
- } else {
305
- return 0
306
- }
307
- }
308
- )(this),
309
- showElse:false, //控制其他选项是否显示
310
- showXCImg: false, // 是否显示现场整改拍照选项
311
- showZXTime: false, // 是否显示自行整改处理时效
312
- isalbum:this.$appdata.getSingleValue('安检使用相册') || false,
313
- }
314
- },
315
- props: ['config','device','idx','operation','role'],
316
- // props: {
317
- // // 维修对应的用户数据收集
318
- // model: {
319
- // type: Object
320
- // },
321
- // service:{
322
- // type: Object
323
- // },
324
- // show: {
325
- // type: Boolean,
326
- // default: false
327
- // },
328
- // repairitem:{
329
- // type: Object
330
- // },
331
- // shutype:'heng',
332
- // tabs:{
333
- // type: Object
334
- // },
335
- // repairdetails:{
336
- // type: Object
337
- // },
338
- // faultshow:{
339
- // type: Object
340
- // },
341
- // issee:''
342
- // },
343
- methods: {
344
- changse(val){
345
- if(val == undefined){
346
- return
347
- }
348
- if(this.selectindex != null) {
349
- if(this.f_items[this.selectindex].type == 'selector'){
350
- this.f_items[this.selectindex].f_item_value = val
351
- }else if(this.f_items[this.selectindex].type == 'inputSelector'){
352
- this.f_items[this.selectindex].f_item_value = val.target.value
353
- }
354
- }
355
- },
356
- changlive(val){
357
- if(val == undefined){
358
- return
359
- }
360
- if(this.selectindex != null) {
361
- this.f_items[this.selectindex].f_live_dispose = val
362
- }
363
- },
364
- changdeal(val){
365
- if(val == undefined){
366
- return
367
- }
368
- if(this.selectindex != null) {
369
- this.f_items[this.selectindex].f_deal_dispose = val
370
- }
371
- },
372
- switchDetails(detailsType, event){
373
- if (event.srcElement.checked) {
374
- for(var i = 0;i<this.Detail.details.length;i++){
375
- if(this.Detail.details[i].f_project == detailsType){
376
- this.Detail.details[i].f_content = '有'
377
- this.ischecked = '有'
378
- return
379
- }
380
- }
381
- } else {
382
- this.Detail.imgs = []
383
- for(var i = 0;i<this.Detail.details.length;i++){
384
- if(this.Detail.details[i].f_project == detailsType){
385
- this.Detail.details[i].f_content = '无'
386
- this.ischecked = '无'
387
- }else{
388
- this.Detail.details[i].f_content = ''
389
- }
390
- }
391
- }
392
- },
393
- getgasmodel(val){
394
- this.gasmodel = val
395
- },
396
- getradios(val,flag){
397
- let Reoptions = []
398
- for (let i = 0;i<this.repairdetails.length;i++) {
399
- var t = false
400
- if(this.repairdetails[i].f_type == this.repairitem.header ){
401
- for(var j =0;j<this.repairdetails[i].details.length;j++){
402
- if(this.repairdetails[i].details[j].f_project == val ){
403
- Reoptions = this.repairdetails[i].details[j].options
404
- t = true
405
- break
406
- }
407
- }
408
- }
409
- if(t){
410
- break
411
- }
412
- }
413
- for(let j = 0;j<Reoptions.length;j++){
414
- if(Reoptions[j].data == flag){
415
- for(var e = 0;e<this.Detail.details.length;e++){
416
- if(this.Detail.details[e].f_project == val){
417
- this.Detail.details[e].f_status = Reoptions[j].f_status
418
- return
419
- }
420
- }
421
- break
422
- }
423
- }
424
- },
425
- deletedetails(){
426
- this.$showMessage('该操作会删除所填信息,是否继续!', ['confirm', 'cancel']).then((res) => {
427
- if (res === 'confirm') {
428
- for(var i = 0;i<this.tabs.length;i++){
429
- if(this.tabs[i].number == this.repairitem.number){
430
- this.tabs.splice(i, 1)
431
- this.model.servicerepair.splice(this.repairitem.number, 1)
432
- for(let t = i;t < this.tabs.length;t++ ) {
433
- this.tabs[t].number -= 1
434
- }
435
- return
436
- }
437
- }
438
- }
439
- })
440
- },
441
- takePic(prop, title, pathname='null') {
442
- if (this.role == 'androidview') {
443
- return
444
- }
445
- HostApp.__callback__ = this.cameraCallBack
446
- HostApp.__this__ = this
447
- //tag
448
- let fileName
449
- if (pathname == 'null') {
450
- if (!this.f_items[prop].f_path || this.f_items[prop].f_path.includes("nopic.png")) {
451
- fileName = Util.guid() + '-' + 'device'+this.device.n + '-' + this.idx + '-'+'f_items'+prop+ '.jpg'
452
- } else {
453
- fileName = Util.getFileName(this.f_items[prop].f_path)
454
- }
455
- } else {
456
- if (!this.f_items[prop][pathname] || this.f_items[prop][pathname].includes("nopic.png")) {
457
- fileName = Util.guid() + '-' + 'device'+this.device.n + '-' + this.idx + '-'+'f_items'+prop+ '.jpg'
458
- } else {
459
- fileName = Util.getFileName(this.f_items[prop][pathname])
460
- }
461
- }
462
- let jingweidu = ''
463
- if (this.$parent.$parent.is_has_jingweidu == 'true'){
464
- const obj = HostApp.getGpsDetailAddress()
465
- jingweidu = '\t经度:' + obj.longitude+ '\t纬度:' + obj.latitude
466
- this.f_items[prop].f_longitude = obj.longitude
467
- this.f_items[prop].f_latitude = obj.latitude
468
- }
469
- //tag
470
- //tag
471
- HostApp._open_a_page({type: 'boomerang',
472
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
473
- param: {file: fileName, requestCode: 111, callback:'javascript:HostApp.__callback__("'+ prop +'","'+ title +'", "%s","'+pathname+'");', watermark: title + '\t时间:'+ Util.toStandardTimeString() + '\t' + Vue.user.name + jingweidu}
474
- })
475
- },
476
- takePic2(prop, title, pathname='null') {
477
- if (this.role == 'androidview') {
478
- return
479
- }
480
- HostApp.__callback__ = this.cameraCallBack
481
- HostApp.__this__ = this
482
- //tag
483
- let fileName
484
- if (pathname == 'null') {
485
- if (!this.f_items[prop].f_path || this.f_items[prop].f_path.includes("nopic.png")) {
486
- fileName = Util.guid() + '-' + 'device' + this.device.n + '-' + this.idx + '-' + 'f_items' + prop + '.jpg'
487
- } else {
488
- fileName = Util.getFileName(this.f_items[prop].f_path)
489
- }
490
- } else {
491
- if (!this.f_items[prop][pathname] || this.f_items[prop][pathname].includes("nopic.png")) {
492
- fileName = Util.guid() + '-' + 'device' + this.device.n + '-' + this.idx + '-' + 'f_items' + prop + '.jpg'
493
- } else {
494
- fileName = Util.getFileName(this.f_items[prop][pathname])
495
- }
496
- }
497
- let jingweidu = ''
498
- if (this.$parent.$parent.is_has_jingweidu == 'true'){
499
- const obj = HostApp.getGpsDetailAddress()
500
- jingweidu = '\t经度:' + obj.longitude+ '\t纬度:' + obj.latitude
501
- this.f_items[prop].f_longitude = obj.longitude
502
- this.f_items[prop].f_latitude = obj.latitude
503
- }
504
- //tag
505
- //tag
506
- HostApp._open_a_page({type: 'boomerang',
507
- page: 'com.aofeng.hybrid.android.peripheral.ActionPickActivity',
508
- param: {file: fileName, requestCode: 111, callback:'javascript:HostApp.__callback__("'+ prop +'","'+ title +'", "%s","'+pathname+'");', watermark: title + '\t时间:'+ Util.toStandardTimeString() + '\t' + Vue.user.name + jingweidu}
509
- })
510
- },
511
- cameraCallBack(prop,title, fileName,pathname) {
512
- //tag
513
- if (pathname == 'null') {
514
- //tag
515
- HostApp.__this__.$set( 'f_items['+prop+'].f_path', fileName + '?' + Math.random())
516
- //tag
517
- HostApp.__callback__ = null
518
- HostApp.__this__ = null
519
- } else {
520
- //tag
521
- //tag)
522
- HostApp.__this__.$set( 'f_items['+prop+'].'+pathname+'', fileName + '?' + Math.random())
523
- HostApp.__callback__ = null
524
- HostApp.__this__ = null
525
- }
526
- if(this.f_items[prop].is_verification){
527
- let path=fileName.replace('http://newimg','')
528
- path=path.replace('file://','')
529
- console.log('fileName',fileName)
530
- console.log(path)
531
- let res=HostApp.pictureVerificationAI(path,title)
532
- if(res.code==200){
533
- if(res.type_result){
534
- // this.$showMessage("检测通过,当前照片为"+title)
535
- this.f_items[prop].verification_text=`检测通过,当前照片为 ${title}`
536
- this.f_items[prop].verification_state='pass'
537
- }else{
538
- // this.$showMessage("检测失败,未识别到当前照片为 "+title+",请重新拍摄!")
539
- this.f_items[prop].verification_text=`检测失败,未识别到当前照片为'${title}',请重新拍摄!`
540
- this.f_items[prop].verification_state='npass'
541
- }
542
- }else{
543
- // this.$showMessage("检测失败,请重试!")
544
- this.f_items[prop].verification_text=`检测失败,请重试!`
545
- this.f_items[prop].verification_state='npass'
546
- }
547
- }
548
- },
549
- delfile(prop, fileName, pathname='null') {
550
- if (pathname == 'null') {
551
- //tag
552
- //tag)
553
- if(fileName == Vue.nopic){
554
- return
555
- } else {
556
- HostApp.delfile(fileName)
557
- this.f_items[prop].f_path = Vue.nopic
558
- }
559
- }else {
560
- //tag
561
- //tag)
562
- if(fileName == Vue.nopic){
563
- return
564
- } else {
565
- HostApp.delfile(fileName)
566
- this.f_items[prop][pathname] = Vue.nopic
567
- }
568
- }
569
- },
570
- adddetails(){
571
- // 下标作为序号,取值用。 增加 序号得依次增加
572
- if(this.tabs.length > 0){
573
- for(let i = this.tabs.length-1;i > 0 ;i-- ){
574
- if(this.tabs[i].header == this.repairitem.header){
575
- if(this.model.servicerepair.length > 0){
576
- for(let j = this.model.servicerepair.length -1;j > -1;j-- ){
577
- if(this.model.servicerepair[j].f_type == this.repairitem.header){
578
- this.model.servicerepair.splice(j+1, 0, Object.assign({}, JSON.parse(JSON.stringify(this.tabs[i].details))))
579
- this.tabs.splice(i+1, 0, {header: `${this.repairitem.header}`,details:this.tabs[i].details,complete:'repair-details',class:'repair-details-class',number:j+1,items:this.tabs[i].items})
580
- for(let t = i+2;t < this.tabs.length;t++ ) {
581
- this.tabs[t].number += 1
582
- }
583
- this.faultshow.number += this.faultshow.number + 1
584
- return
585
- }
586
- }
587
- }
588
- }
589
- }
590
- }
591
- },
592
- transelation(val){
593
- this.selectindex = val
594
- },
595
- towatch(){
596
- for(let n in this.f_items){
597
- if(typeof this.f_items[n]=='function'){
598
- continue
599
- }
600
- if(this.f_items[n].type == 'selector' || this.f_items[n].type == 'inputSelector'){
601
- // 监听下拉框,如果有隐患,需要拍照
602
- this.$watch('f_items['+n+'].selected',function(val) {
603
- // 下拉框值
604
- //tag)
605
- // 下拉框所属设备
606
- //tag
607
- // 下拉框所属项
608
- //tag
609
- if (val == undefined || val.length == 0 || val[0] == ''){
610
- this.f_items[n].f_path = ''
611
- this.f_items[n].f_is_defect = ''
612
- this.f_items[n].f_defect_level = ''
613
- this.f_items[n].f_live_dispose = ''
614
- this.f_items[n].f_deal_dispose = ''
615
- this.f_items[n].tooltip = ''
616
- this.f_items[n].f_else = ''
617
- return
618
- }
619
- let shImage = false
620
- if(val.indexOf('其他') == -1){
621
- this.f_items[n].f_else = ''
622
- }
623
- // if(this.config[this.device.device].items[item].type == 'selector'){
624
- // this.f_items[n].f_item_value = val
625
- // }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
626
- // this.f_items[n].f_item_value = val[0]
627
- // }
628
- // 在配置中查找该项
629
- for (let item in this.config[this.device.device].items) {
630
- if(typeof this.config[this.device.device].items[item]=='function'){
631
- continue
632
- }
633
- let type = this.config[this.device.device].items[item].type
634
- let multiple = this.config[this.device.device].items[item].multiple?this.config[this.device.device].items[item].multiple:false
635
- let options = this.config[this.device.device].items[item].options
636
- if ((this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'inputSelector') && item == this.f_items[n].f_item_name) {
637
- for (let i in options) {
638
- if(typeof options[i]=='function'){
639
- continue
640
- }
641
- let value
642
- if(this.config[this.device.device].items[item].type == 'selector' && this.config[this.device.device].items[item].multiple == false){
643
- value = val[0]
644
- }else if (this.config[this.device.device].items[item].type == 'inputSelector'){
645
- value = val
646
- }
647
- //tag)
648
- // 如果未选择,清空图片、隐患信息等
649
- if((type == 'selector' && val.length == 0) || (type == 'inputSelector' && val == '')){
650
- this.f_items[n].f_path = ''
651
- this.f_items[n].f_is_defect = ''
652
- this.f_items[n].f_defect_level = ''
653
- this.f_items[n].f_live_dispose = ''
654
- this.f_items[n].f_deal_dispose = ''
655
- this.f_items[n].tooltip = ''
656
- }
657
- if((type == 'selector' && multiple == false && options[i].data == val[0]) || (type == 'inputSelector' && options[i].data == val) || (type == 'selector' && multiple == true && val.indexOf(options[i].data) > -1)){
658
- // 找到选中的项了
659
- //tag
660
- if(options[i].isdefect == true ){
661
- shImage = true
662
- }
663
- if(options[i].isdefect == false || this.f_items[n].f_item_value == ''){
664
- shImage = false
665
- }
666
- //tag
667
- if(shImage){
668
- this.f_items[n].f_is_defect =true
669
- this.f_items[n].f_defect_level = options[i].level
670
- this.f_items[n].f_path = Vue.nopic
671
- this.f_items[n].f_live_dispose = '否'
672
- this.f_items[n].f_deal_dispose = '未处理'
673
- //tag
674
- this.f_items[n].tooltip= options[i].tooltip
675
- }else{
676
- this.f_items[n].f_path = ''
677
- this.f_items[n].f_is_defect = ''
678
- this.f_items[n].f_defect_level = ''
679
- this.f_items[n].f_live_dispose = ''
680
- this.f_items[n].f_deal_dispose = ''
681
- this.f_items[n].tooltip = ''
682
- }
683
- }
684
- }
685
- }
686
- }
687
- }
688
- )
689
- // this.$watch('other',function(val){
690
- // //tag
691
- // if(this.selectindex != null) {
692
- // let index = this.f_items[this.selectindex].f_item_value.indexOf('其他')
693
- // if(index > -1){
694
- // this.f_items[this.selectindex].f_item_value.splice(index,1,this.other)
695
- // }
696
- // }
697
- //
698
- // })
699
- }else if(this.f_items[n].type == 'radio') {
700
- // 监听单选框,如果有隐患,需要拍照
701
- this.$watch('f_items[' + n + '].f_item_value', function (val) {
702
- //tag)
703
- let options = this.f_items[n].options
704
- //tag)
705
- for (let i = 0; i < options.length; i++) {
706
- //tag)
707
- // 找到选中的项了
708
- if (options[i].value == val) {
709
- // 如果有隐患,拍图片
710
- if (options[i].isdefect) {
711
- this.f_items[n].f_is_defect = true
712
- this.f_items[n].f_defect_level = options[i].level
713
- this.f_items[n].f_path = Vue.nopic
714
- this.f_items[n].f_live_dispose = '否'
715
- this.f_items[n].f_deal_dispose = '未处理'
716
- this.f_items[n].tooltip = options[i].tooltip
717
- //tag)
718
- return
719
- }
720
- }
721
- }
722
- this.f_items[n].f_path = ''
723
- this.f_items[n].f_is_defect = ''
724
- this.f_items[n].f_defect_level = ''
725
- this.f_items[n].f_live_dispose = ''
726
- this.f_items[n].f_deal_dispose = ''
727
- this.f_items[n].tooltip = ''
728
- })
729
- }else if(this.f_items[n].type == 'checkbox') {
730
- // 监听单选框,如果有隐患,需要拍照
731
- this.$watch('f_items[' + n + '].f_item_value', function (val) {
732
- //tag)
733
- // 如果是手动赋值,不执行下面逻辑
734
- if (this.f_items[n].isReSet) {
735
- this.f_items[n].isReSet = false
736
- return
737
- }
738
- let options = this.f_items[n].options
739
- //tag)
740
- // 取出选中项中有隐患的详细信息
741
- let selected = options.filter(item => { return val.indexOf(item.value) != -1 && item.isdefect })
742
-
743
- if(selected.length > 0){
744
- // 防止赋值无限调用
745
- this.f_items[n].isReSet = true
746
- let selectList = selected.map(item => {return item.value})
747
- // 如果选中的是非隐患项,取消选中isdefect为true的
748
- if (selectList.indexOf(val[val.length - 1]) == -1) {
749
- this.f_items[n].f_item_value = val.filter(item => {return selectList.indexOf(item) == -1})
750
- this.f_items[n].f_path = ''
751
- this.f_items[n].f_is_defect = ''
752
- this.f_items[n].f_defect_level = ''
753
- this.f_items[n].f_live_dispose = ''
754
- this.f_items[n].f_deal_dispose = ''
755
- this.f_items[n].tooltip = ''
756
- return
757
- }
758
- // 如果选中的是隐患项,取消选中isdefect为false的
759
- this.f_items[n].f_item_value = selectList
760
- // 如果第一次选择隐患项,初始化
761
- if (!this.f_items[n].f_is_defect) {
762
- this.f_items[n].f_is_defect = true
763
- this.f_items[n].f_defect_level = selected[0].level
764
- this.f_items[n].f_path = Vue.nopic
765
- this.f_items[n].f_live_dispose = '否'
766
- this.f_items[n].f_deal_dispose = '未处理'
767
- //tag
768
- this.f_items[n].tooltip = selected[0].tooltip
769
- }
770
- //tag)
771
- return
772
- }
773
- this.f_items[n].f_path = ''
774
- this.f_items[n].f_is_defect = ''
775
- this.f_items[n].f_defect_level = ''
776
- this.f_items[n].f_live_dispose = ''
777
- this.f_items[n].f_deal_dispose = ''
778
- this.f_items[n].tooltip = ''
779
- })
780
- }
781
- }
782
- //tag)
783
- },
784
- getGasAberrantNumber(val) {
785
- //tag
786
- if(!this.f_table_base.index || !this.f_gas_balance.index){
787
- //tag
788
- return
789
- }
790
- // 先清空
791
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
792
- this.f_items[this.f_gas_aberrant_number.index].f_is_defect = false
793
- if(val=='已用气量'){
794
- //剩余气量 = 累购-已用
795
- this.f_items[this.f_gas_balance.index].f_item_value= (this.f_items[this.f_total_gas.index].f_item_value-this.f_items[this.f_table_base.index].f_item_value).toFixed(2)
796
- if (isNaN(this.f_items[this.f_gas_balance.index].f_item_value)) {
797
- this.f_items[this.f_gas_balance.index].f_item_value = null
798
- }
799
- }
800
-
801
- // 只有两个值都填了才会计算
802
- if (!this.f_items[this.f_table_base.index].f_item_value || !this.f_items[this.f_gas_balance.index].f_item_value) {
803
- return
804
- }
805
- //tag)
806
- //tag
807
- //tag
808
-
809
- // 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
810
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_total_gas.index].f_item_value - this.f_items[this.f_gas_balance.index].f_item_value - (this.f_items[this.f_table_base.index].f_item_value - (this.f_initial_base.index?this.f_items[this.f_initial_base.index].f_item_value:0))
811
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_gas_aberrant_number.index].f_item_value.toFixed(3)
812
- // 如果数值有误,清空结果s
813
- if (isNaN(this.f_items[this.f_gas_aberrant_number.index].f_item_value)) {
814
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
815
- }
816
- //tag ===> ' + Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value))
817
- //tag ===> ' + JSON.stringify(Number(this.gasDeviation)))
818
- // 计算差值是否在范围内
819
- if (Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) > Number(this.gasDeviation)|| Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) < Number(this.gasDeviation) * -1) {
820
- this.f_items[this.f_gas_aberrant_number.index].f_is_defect = true
821
- this.f_items[this.f_gas_aberrant_number.index].f_deal_dispose = '未处理'
822
- }else{
823
- this.f_items[this.f_gas_aberrant_number.index].f_is_defect = null
824
- this.f_items[this.f_gas_aberrant_number.index].f_deal_dispose = null
825
- }
826
-
827
- //tag)
828
- },
829
- getFeeAberrantNumber(val) {
830
- //tag
831
- // 只有两个值都填了才会计算
832
- if(!this.f_fee_base.index || !this.f_fee_balance.index){
833
- //tag
834
- return
835
- }
836
- // 先清空
837
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
838
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
839
-
840
- if(val=='已用金额'){
841
- this.f_items[this.f_fee_balance.index].f_item_value=(this.f_items[this.f_total_fee.index].f_item_value-this.f_items[this.f_fee_base.index].f_item_value).toFixed(3)
842
- if (isNaN(this.f_items[this.f_fee_balance.index].f_item_value)) {
843
- this.f_items[this.f_fee_balance.index].f_item_value = null
844
- }
845
- }
846
-
847
- if (!this.f_items[this.f_fee_base.index].f_item_value || !this.f_items[this.f_fee_balance.index].f_item_value) {
848
- return
849
- }
850
-
851
- // 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
852
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_total_fee.index].f_item_value - this.f_items[this.f_fee_balance.index].f_item_value - this.f_items[this.f_fee_base.index].f_item_value
853
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_aberrant_number.index].f_item_value.toFixed(3)
854
- if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
855
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
856
- }
857
- //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
858
- //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
859
- // 计算差值是否在范围内
860
- if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
861
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
862
- this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = '未处理'
863
- }else{
864
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = null
865
- this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = null
866
- }
867
-
868
- //tag)
869
- },
870
- // 计算剩余金额和剩余金额差值
871
- getFeeAberrantNumber2(val) {
872
- //tag
873
- // 只有两个值都填了才会计算
874
- if(!this.f_table_balance.index || !this.f_fee_balance.index){
875
- //tag
876
- return
877
- }
878
- // 先清空
879
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
880
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
881
-
882
- // 计算公式 => 金额异常差值 = 系统剩余金额 - 表端剩余金额
883
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_balance.index].f_item_value - this.f_items[this.f_table_balance.index].f_item_value
884
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_aberrant_number.index].f_item_value.toFixed(3)
885
- if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
886
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
887
- }
888
- //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
889
- //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
890
- // 计算差值是否在范围内
891
- if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
892
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
893
- this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = '未处理'
894
- }else{
895
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = null
896
- this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = null
897
- }
898
- console.log('--------------------------------')
899
- console.log(this.f_items[this.f_fee_aberrant_number.index].f_item_value)
900
-
901
- //tag)
902
- },
903
- //物联网表字轮数改变触发
904
- getmeteraberrantnumber() {
905
- //tag
906
-
907
- // 先清空
908
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
909
- this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = false
910
- //tag
911
- // 只有两个值都填了才会计算
912
- if (!this.f_items[this.f_meter_base.index].f_item_value || !this.f_items[this.f_meter_base1.index].f_item_value) {
913
- return
914
- }
915
- //tag
916
- // 计算公式 => 表数异常差值= - 字轮数 - 后台表读数
917
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_base1.index].f_item_value - this.f_items[this.f_meter_base.index].f_item_value
918
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_aberrant_number1.index].f_item_value.toFixed(3)
919
- if (isNaN(this.f_items[this.f_meter_aberrant_number1.index].f_item_value)) {
920
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
921
- }
922
- //tag ===> ' + Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value))
923
- // 计算差值是否在范围内
924
- //tag)
925
- if (Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value) > Number(this.meterbase)){
926
- this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = true
927
- }
928
-
929
- //tag)
930
- },
931
-
932
- disSelect(index, itemValue) {
933
- //tag)
934
- //tag)
935
- if (this.f_items[index].f_item_value == itemValue) {
936
- this.$set(`f_items[${index}].f_item_value`, '')
937
- }
938
- }
939
- },
940
- ready() {
941
- //tag
942
- //tag
943
- if(Vue.config.safecheck != undefined){
944
- if(Vue.config.safecheck.ApproveConfig != undefined){
945
- if(Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
946
- this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
947
- }
948
- if(Vue.config.safecheck.ApproveConfig.dealdispose != undefined) {
949
- this.dealdispose = Vue.config.safecheck.ApproveConfig.dealdispose
950
- }
951
- if(Vue.config.safecheck.ApproveConfig.showtorepair) {
952
- this.deals=[{label: '现场整改', value: '现场整改'},
953
- {label: '自行处理', value: '自行处理'},
954
- {label: '转维修', value: '报修'}
955
- ]
956
- }
957
- if(Vue.config.safecheck.ApproveConfig.Processing) {
958
- if(Vue.config.safecheck.ApproveConfig.Processing.length > 0){
959
- this.deals = Vue.config.safecheck.ApproveConfig.Processing
960
- }
961
- }
962
- if(Vue.config.safecheck.ApproveConfig.showXCImg) {
963
- this.showXCImg = true
964
- }
965
- if(Vue.config.safecheck.ApproveConfig.showZXTime) {
966
- this.showZXTime = true
967
- }
968
- if(Vue.config.safecheck.ApproveConfig.showtorepair) {
969
- }
970
- if(Vue.config.safecheck.ApproveConfig.hiddendanger != undefined) {
971
- if (parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger) >= 5) {
972
- this.hiddenDangerImgNumber = 5
973
- }else {
974
- this.hiddenDangerImgNumber = parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger)
975
- }
976
- }
977
- }
978
- }
979
- //tag
980
- //tag)
981
- //tag)
982
- //tag)
983
- //创建页面所需数据
984
- this.$set('piece', this.paper['device'+this.device.n][this.idx])
985
- //tag)
986
- //tag)
987
- let n = 0
988
- for (let item in this.config[this.device.device].items) {
989
- if(typeof this.config[this.device.device].items[item]=='function'){
990
- continue
991
- }
992
- let index = this.config[this.device.device].items[item].index-1
993
- this.$set('page.options' + index, [])
994
- //tag)
995
- //tag)
996
- //tag)
997
- // 先根据配置组接页面
998
- let f_item_value
999
- if(this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'checkbox'){
1000
- f_item_value = []
1001
- // 判断选项的默认值
1002
- for (let defitem in this.config[this.device.device].items[item].options) {
1003
- if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
1004
- continue
1005
- }
1006
- let defopt = this.config[this.device.device].items[item].options[defitem]
1007
- if (defopt.isdefault) {
1008
- //tag
1009
- f_item_value[0] = defopt.data
1010
- }
1011
- }
1012
- // if(this.config[this.device.device].items[item].data){
1013
- // f_item_value.push(this.config[this.device.device].items[item].data)
1014
- // }
1015
- }else if(this.config[this.device.device].items[item].type == 'radio'){
1016
- //为radio添加默认值
1017
- f_item_value=''
1018
- //tag)
1019
- for (let defitem in this.config[this.device.device].items[item].options) {
1020
- if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
1021
- continue
1022
- }
1023
- //tag)
1024
- let defopt = this.config[this.device.device].items[item].options[defitem]
1025
- if (defopt.isdefault) {
1026
- //tag)
1027
- f_item_value = defopt.data
1028
- }
1029
- }
1030
- }else{
1031
- f_item_value = this.config[this.device.device].items[item].data ? this.config[this.device.device].items[item].data : ''
1032
- }
1033
- //tag)
1034
- let it = {
1035
- type: this.config[this.device.device].items[item].type,
1036
- f_item_name: item,
1037
- checkmust: this.config[this.device.device].items[item].checkmust,
1038
- f_item_value: f_item_value,
1039
- is_verification:this.config[this.device.device].items[item].is_verification,
1040
- verification_text:'',
1041
- verification_state:'',// ai验证是否通过 npass(未通过)/pass(通过)
1042
- f_is_defect: '',
1043
- multiple:this.config[this.device.device].items[item].multiple == true?this.config[this.device.device].items[item].multiple:false,
1044
- isshow:this.config[this.device.device].items[item].isshow == false?this.config[this.device.device].items[item].isshow:true,
1045
- readonly: this.config[this.device.device].items[item].readonly == true?true:false,
1046
- remark: this.config[this.device.device].items[item].remark ? this.config[this.device.device].items[item].remark : '',
1047
- f_path: '',
1048
- unit: this.config[this.device.device].items[item].unit ? this.config[this.device.device].items[item].unit : '',
1049
- tooltip:'',
1050
- f_live_dispose:'',
1051
- f_deal_dispose:'',
1052
- f_else: '',
1053
- f_p1_path: '',
1054
- f_p2_path: '',
1055
- f_p3_path: '',
1056
- f_longitude:'',
1057
- f_latitude:''
1058
- }
1059
- //tag)
1060
- //tag)
1061
- this.$set('f_items['+index+']',it)
1062
- if (this.config[this.device.device].items[item].type == 'selector' ||this.config[this.device.device].items[item].type == 'inputSelector') {
1063
- if(this.config[this.device.device].items[item].type == 'selector'){
1064
- this.page['options' + index].push({
1065
- label: "请选择",
1066
- value: ''
1067
- })
1068
- }
1069
- for (let i in this.config[this.device.device].items[item].options) {
1070
- if(typeof this.config[this.device.device].items[item].options[i]=='function'){
1071
- continue
1072
- }
1073
- this.page['options' + index].push({
1074
- label: this.config[this.device.device].items[item].options[i].data,
1075
- value: this.config[this.device.device].items[item].options[i].data,
1076
- tooltip: this.config[this.device.device].items[item].options[i].tooltip
1077
- })
1078
- }
1079
- if(this.config[this.device.device].items[item].type == 'selector'){
1080
- this.$set('f_items['+index+'].selected', f_item_value)
1081
- }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
1082
- this.$set('f_items['+index+'].selected', f_item_value)
1083
- }
1084
-
1085
- this.$set('f_items['+index+'].options',this.page['options' + index])
1086
-
1087
- //tag)
1088
- } else if (this.config[this.device.device].items[item].type == 'radio' || this.config[this.device.device].items[item].type == 'checkbox') {
1089
- //tag)
1090
- //tag
1091
- //tag)
1092
- for (let i in this.config[this.device.device].items[item].options) {
1093
- if(typeof this.config[this.device.device].items[item].options[i]=='function'){
1094
- continue
1095
- }
1096
- //tag
1097
- this.page['options' + index].push({
1098
- label: this.config[this.device.device].items[item].options[i].data,
1099
- value: this.config[this.device.device].items[item].options[i].data,
1100
- isdefect: this.config[this.device.device].items[item].options[i].isdefect,
1101
- level: this.config[this.device.device].items[item].options[i].level,
1102
- tooltip: this.config[this.device.device].items[item].options[i].tooltip
1103
- })
1104
- //tag)
1105
- }
1106
- //tag)
1107
- this.$set('f_items[' + index + '].options', this.page['options' + index])
1108
- this.$set('f_items[' + index + '].f_item_value', f_item_value)
1109
- //tag)
1110
- }
1111
- n = n + 1
1112
- }
1113
- if(!this.piece || JSON.stringify(this.piece) == '{}') {
1114
- // 如果没有,则新建
1115
- this.$set('piece.f_items',this.f_items)
1116
- this.$set('piece.f_device_type',this.device.device)
1117
- } else {
1118
- // 已经存在,把之前的数据重新填入
1119
- for (let f in this.f_items){
1120
- if(typeof this.f_items[f]=='function'){
1121
- continue
1122
- }
1123
- for(let p in this.piece.f_items) {
1124
- if(typeof this.piece.f_items[p]=='function'){
1125
- continue
1126
- }
1127
- if (this.f_items[f].f_item_name == this.piece.f_items[p].f_item_name) {
1128
- //tag)
1129
- //tag)
1130
- this.f_items[f] = Object.assign(this.f_items[f], this.piece.f_items[p])
1131
- //tag)
1132
- if (this.f_items[f].type == 'selector' || this.f_items[f].type == 'inputSelector') {
1133
- //tag)
1134
- //tag)
1135
- this.f_items[f].selected = this.piece.f_items[p].f_item_value
1136
- //tag)
1137
- }
1138
- // 取出特殊值
1139
- if (this.f_items[f].f_item_name == '初始表底') {
1140
- //tag)
1141
- this.f_initial_base.index = f
1142
- } else if (this.f_items[f].f_item_name == '累购气量') {
1143
- //tag)
1144
- this.f_total_gas.index = f
1145
- } else if (this.f_items[f].f_item_name == '已用气量') {
1146
- //tag)
1147
- this.f_table_base.index = f
1148
- this.$watch('f_items[' + f + '].f_item_value', function () {
1149
- this.getGasAberrantNumber('已用气量')
1150
- })
1151
- } else if (this.f_items[f].f_item_name == '剩余气量') {
1152
- //tag)
1153
- this.f_gas_balance.index = f
1154
- this.$watch('f_items[' + f + '].f_item_value', function () {
1155
- this.getGasAberrantNumber('')
1156
- })
1157
- } else if (this.f_items[f].f_item_name == '气量异常差值') {
1158
- //tag)
1159
- this.f_gas_aberrant_number.index = f
1160
- } else if (this.f_items[f].f_item_name == '累购金额') {
1161
- //tag)
1162
- this.f_total_fee.index = f
1163
- } else if (this.f_items[f].f_item_name == '已用金额') {
1164
- //tag)
1165
- this.f_fee_base.index = f
1166
- this.$watch('f_items[' + f + '].f_item_value', function () {
1167
- this.getFeeAberrantNumber('已用金额')
1168
- })
1169
- } else if (this.f_items[f].f_item_name == '剩余金额') {
1170
- //tag)
1171
- this.f_fee_balance.index = f
1172
- this.$watch('f_items[' + f + '].f_item_value', function () {
1173
- this.getFeeAberrantNumber('')
1174
- this.getFeeAberrantNumber2('')
1175
- })
1176
- } else if (this.f_items[f].f_item_name == '表端剩余金额') {
1177
- this.f_table_balance.index = f
1178
- this.$watch('f_items[' + f + '].f_item_value', function () {
1179
- this.getFeeAberrantNumber2('')
1180
- })
1181
- } else if (this.f_items[f].f_item_name == '金额异常差值') {
1182
- //tag)
1183
- this.f_fee_aberrant_number.index = f
1184
- }else if (this.f_items[f].f_item_name == '表读数') {
1185
- //tag)
1186
- this.f_meter_base.index = f
1187
- }else if (this.f_items[f].f_item_name == '表剩余金额') {
1188
- //tag)
1189
- this.f_balance_amount.index = f
1190
- }else if (this.f_items[f].f_item_name == '字轮数') {
1191
- //tag)
1192
- this.f_meter_base1.index = f
1193
- this.$watch('f_items[' + f + '].f_item_value', function () {
1194
- this.getmeteraberrantnumber()
1195
- })
1196
- }else if (this.f_items[f].f_item_name == '表余额') {
1197
- //tag)
1198
- this.f_balance_amount1.index = f
1199
- this.$watch('f_items[' + f + '].f_item_value', function () {
1200
- this.getfeeaberrantnumber1()
1201
- })
1202
- }else if (this.f_items[f].f_item_name == '表数异常差值') {
1203
- //tag)
1204
- this.f_meter_aberrant_number1.index = f
1205
- }else if (this.f_items[f].f_item_name == '表金额异常差值') {
1206
- //tag)
1207
- this.f_fee_aberrant_number1.index = f
1208
- }
1209
- }
1210
- }
1211
- for (let em in this.config[this.device.device].items) {
1212
- if(typeof this.config[this.device.device].items[em]=='function'){
1213
- continue
1214
- }
1215
- if (this.config[this.device.device].items[em].type == 'selector' && em == this.f_items[f].f_item_name) {
1216
- this.f_items[f].options =[]
1217
- for (let k in this.config[this.device.device].items[em].options) {
1218
- if(typeof this.config[this.device.device].items[em].options[k]=='function'){
1219
- continue
1220
- }
1221
- this.f_items[f].options.push({
1222
- label: this.config[this.device.device].items[em].options[k].data,
1223
- value: this.config[this.device.device].items[em].options[k].data
1224
- })
1225
- }
1226
- }
1227
- }
1228
- }
1229
- //tag)
1230
- this.$set('piece.f_items',this.f_items)
1231
- }
1232
- this.towatch()
1233
- },
1234
- destroyed(){
1235
- let nullCount = 0
1236
- let metertitles
1237
- //判断当前是否有选中项
1238
- for (let row in this.f_items){
1239
- if(typeof this.f_items[row]=='function'){
1240
- continue
1241
- }
1242
- if(this.f_items[row].selected && this.f_items[row].selected != '' && this.f_items[row].selected instanceof Array){
1243
- //tag
1244
- this.f_items[row].f_item_value = this.f_items[row].selected
1245
- }else if(this.f_items[row].selected && this.f_items[row].selected != ''){
1246
- //tag
1247
- this.f_items[row].f_item_value = this.f_items[row].selected
1248
- }
1249
- // if(this.f_items[row].f_item_value instanceof Array && this.f_items[row].f_item_value.length != 0 ){
1250
- // nullCount = nullCount+1
1251
- // }else if(this.f_items[row].f_item_value != ''){
1252
- // nullCount = nullCount+1
1253
- // }
1254
- }
1255
- let picture = []
1256
- // for (let row in this.f_items){
1257
- // let a={}
1258
- // a.f_path = this.f_items[row].f_path
1259
- // a.name = this.f_items[row].f_item_name
1260
- // }
1261
- // picture.push(a)
1262
- this.$set(`paper['device${this.device.n}'][${this.idx}]`, this.piece)
1263
- //tag
1264
- },
1265
- computed:{
1266
-
1267
- }
1268
- }
1269
- </script>
1270
- <style lang="less" scoped>
1271
- .class-erro {
1272
- color: #a94442;
1273
- }
1274
- .fivelabel{
1275
- border: none;
1276
- border-left: 5px solid #A2C2EB;
1277
- float: left;
1278
- width: 35%;
1279
- margin-bottom: 3px;
1280
- text-align: left;
1281
- word-wrap: break-word;
1282
- white-space: normal;
1283
- }
1284
- .radiolabel{
1285
- border: none;
1286
- border-left: 5px solid #A2C2EB;
1287
- float: left;
1288
- width: 65%;
1289
- margin-bottom: 3px;
1290
- text-align: left;
1291
- word-wrap: break-word;
1292
- white-space: normal;
1293
- }
1294
-
1295
- .textlabel {
1296
- border: none;
1297
- border-left: 5px solid #A2C2EB;
1298
- width: 100%;
1299
- margin-bottom: 3px;
1300
- text-align: left;
1301
- word-wrap: break-word;
1302
- white-space: normal;
1303
- }
1304
- .textlabel1 {
1305
- border: none;
1306
- border-left: 5px solid #f7cb32;
1307
- width: 100%;
1308
- margin-bottom: 3px;
1309
- text-align: left;
1310
- word-wrap: break-word;
1311
- white-space: normal;
1312
- }
1313
- .spanrodio{
1314
- margin-right: 10px;
1315
- }
1316
- .div-photo{
1317
- width: auto;
1318
- height: auto;
1319
- /* margin-top: 10px; */
1320
- position: absolute;
1321
- bottom: 10px;
1322
- right: 10px;
1323
- }
1324
- .panel-self{
1325
- border-radius: 5px;
1326
- border:1px solid #c5e1f7;
1327
- //background-color: #F2F6FA;
1328
- }
1329
- .btn-photo{
1330
- border: 0;
1331
- border-radius: 7px;
1332
- background-color: #7dc1f4;
1333
- font: 15px PingFang-SC-Bold;
1334
- height: 20%;
1335
- }
1336
- </style>
1337
-
1
+ <template>
2
+ <div class="select-overspread repair-bg auto" style="padding-bottom:5px;">
3
+ <!--<div class="bq-parent" v-if="shutype == 'heng'">-->
4
+ <!--<blockquote class="blockquote">-->
5
+ <!--<p><span>{{repairitem.header}}</span><a @click="mute()" style="float:right" href="#" class="repair-mute-class"><img src="../../assets/novoice.png" width="25px;" alt=""><span style="margin-left:10px;color: #304A66">关闭声音</span></a></p>-->
6
+ <!--</blockquote>-->
7
+ <!--</div>-->
8
+ <div class="panel panel-default auto repair-info-content">
9
+ <div class="panel-body" style="padding: 0">
10
+ <!-- 安检项内容 -->
11
+ <div class="auto repair-info-content compatible" style="padding: 0">
12
+ <div class="row auto" style="padding: 0">
13
+ <div v-show="false" class="{{shuclass}}" v-if=" device.device != '燃气表'">
14
+ <button type="button" name="button" class="btn btn-primary" @click='adddetails()' :disabled="issee">增加</button>
15
+ </div>
16
+ <!--<div class="{{shuclass}}" v-if="device.device != '燃气表' && candelete">-->
17
+ <!--<button type="button" name="button" class="btn btn-primary" @click='deletedetails()' :disabled="issee">删除</button>-->
18
+ <!--</div>-->
19
+ <div class="shuclass1" v-show="row.isshow" v-for="(idxs,row) in f_items" style="padding: 4px; border:1px solid #D4D4D4;border-bottom: 0" >
20
+ <label v-if="row.type != 'radio' && row.type != 'text' && row.type != 'picture' && row.type != 'checkbox'" v-show="row.isshow" class="fivelabel">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
21
+ <label v-if="row.type == 'radio'" v-show="row.isshow" class="radiolabel">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
22
+ <label v-if="row.type == 'text'" v-show="row.isshow" class="textlabel1">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
23
+ <label v-if="row.type == 'picture' || row.type == 'checkbox'" v-show="row.isshow" class="textlabel">{{row.f_item_name}} <br/>{{row.remark}} <span v-show="row.verification_state" :style="{color:row.verification_state==='pass'?'green':'red'}">{{row.verification_text}}</span></label>
24
+ <!--<span v-if="show" style="font-weight:bold">{{row.f_content}}</span>-->
25
+ <!--<datepicker placeholder="请选择时间"-->
26
+ <!--:value.sync="row.f_content"-->
27
+ <!--v-model="row.f_content"-->
28
+ <!--:format="'yyyy-MM-dd'"-->
29
+ <!--v-if="!show && row.type == 'date'"-->
30
+ <!--:readonly="true"-->
31
+ <!--&gt;</datepicker>-->
32
+ <div style="clear: both" v-if="row.type == 'picture'" class="form-group col-sm-12" >
33
+ <div class="auto" >
34
+ <div class="panel">
35
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
36
+ <div class="row" style="height: 160px;width:160px;overflow: scroll;top: 1px">
37
+ <div class="col-sm-4" v-show="row.f_path">
38
+ <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
39
+ </div>
40
+ <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name)">
41
+ <img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
42
+ </div>
43
+ <img v-show="row.f_path" src="../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ <div style="float: left;width:60%" class="form-group" v-if="row.type == 'string'" v-show="row.isshow">
50
+ <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" :readonly="role == 'androidview' || row.readonly">
51
+ </div>
52
+ <div style="float: left;width:60%" class="form-group col-sm-12" v-if="row.type == 'date'" v-show="row.isshow">
53
+ <datepicker id="f_making_date" :placeholder= row.f_item_name
54
+ :value.sync="row.f_item_value"
55
+ v-if="row.type == 'date'"
56
+ v-show="row.isshow"
57
+ :disabled-days-of-Week="[]"
58
+ :format="'yyyy-MM-dd HH:mm:ss'"
59
+ :show-reset-button="reset" readonly="readonly">
60
+ </datepicker>
61
+ </div>
62
+
63
+ <div style="float: left;width:60%" class="form-group" v-if="!show && row.type == 'number'" v-show="row.isshow">
64
+ <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" onkeyup="value=value.replace(/[^\d\.-]/g,'')" :readonly="row.readonly">
65
+ </div>
66
+ <!--<input type="text" class="form-control" v-model="row.f_content" v-if="!show && row.type == 'string' && row.f_project != '表号'" :disabled="(!(ischecked == '有')) || issee" :readonly="issee">-->
67
+ <!--<input type="text" class="form-control" v-model="meternum" v-if="!show && row.type == 'string' && row.f_project == '表号' " :disabled="(!(ischecked == '有')) || issee" :readonly="issee" >-->
68
+ <!--<button type="button" name="button" class="btn btn-primary" @click="scan" v-if="!show && row.f_project == '表号' ">扫码</button>-->
69
+ <input-select v-if="row.type == 'inputSelector'"
70
+ v-show="row.isshow"
71
+ :value.sync="row.selected"
72
+ v-model="row.selected"
73
+ :readonly="false"
74
+ :options="row.options"
75
+ @change="changse"
76
+ @click="transelation(idxs)"></input-select>
77
+ <v-select style="float: left" :value.sync="row.selected"
78
+ v-model="row.selected"
79
+ v-if="row.type == 'selector'"
80
+ :search="false"
81
+ v-show="row.isshow"
82
+ placeholder='请选择'
83
+ :options="row.options"
84
+ :disabled="role == 'androidview' || row.readonly"
85
+ @change="changse"
86
+ @click="transelation(idxs)"
87
+ :multiple="row.multiple"
88
+ :close-on-select="!row.multiple" clear-button></v-select>
89
+ <div style="float: left;width: 30%" class="form-group" v-if="!show && row.type == 'radio'">
90
+ <div class="col-xs-6 col-sm-6 col-md-6" v-for="item in row.options">
91
+ <!-- <input type="radio" :name="row.f_item_name" @click="disSelect($parent.idxs,item.value)" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value" >-->
92
+ <input type="radio" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value" >
93
+ <span>{{item.label}}</span>
94
+ </div>
95
+ </div>
96
+ <div v-if="!show && row.type == 'checkbox'" class="col-xs-12 col-sm-12 col-md-12" style="white-space: nowrap" >
97
+ <div style="float: left" v-for="item in row.options">
98
+ <input type="checkbox" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value">
99
+ <span>{{item.label}}</span>
100
+ </div>
101
+ </div>
102
+ <div style="clear: both">
103
+ <label v-if="row.f_item_value.indexOf('其他') >-1" class="fivelabel">其他</label>
104
+ <div style="float: left;width:60%" class="form-group" v-if="row.f_item_value.indexOf('其他') >-1">
105
+ <input type="text" class="form-control" maxlength="100" v-model="row.f_else" :readonly="role == 'androidview' || row.readonly">
106
+ </div>
107
+ </div>
108
+ <div style="clear: both">
109
+ <!-- <div class="form-group" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '') && (livedispose == 'true' || livedispose == true) " >-->
110
+ <!-- <label class="fivelabel">现场已处理</label>-->
111
+ <!-- <v-select :value="row.f_live_dispose"-->
112
+ <!-- :value-single="true"-->
113
+ <!-- :options="lives"-->
114
+ <!-- :disabled="role == 'androidview'"-->
115
+ <!-- @change="changlive"-->
116
+ <!-- @click="transelation(idxs)"-->
117
+ <!-- close-on-select clear-button></v-select>-->
118
+ <!-- </div>-->
119
+ <div class="form-group" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '') && (dealdispose == 'true' || dealdispose == true) " >
120
+ <label class="fivelabel">处理方式</label>
121
+ <v-select
122
+ :value="row.f_deal_dispose"
123
+ :value-single="true"
124
+ :options="deals"
125
+ :disabled="role == 'androidview'"
126
+ @change="changdeal"
127
+ @click="transelation(idxs)"
128
+ close-on-select clear-button>
129
+ </v-select>
130
+ </div>
131
+ <div style="display: flex;flex-wrap: wrap" v-if="row.f_deal_dispose == '自行处理' && this.showZXTime">
132
+ <label class="fivelabel">处理时效:</label>
133
+ <datepicker
134
+ :value.sync="row.f_handle_date"
135
+ v-model="row.f_handle_date"
136
+ :format="'yyyy-MM-dd 00:00:00'"
137
+ placeholder="请选择"
138
+ style="width: 60%">
139
+ </datepicker>
140
+ </div>
141
+ <div style="margin-left: 10px" class="form-group col-sm-10" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && row.tooltip != undefined && row.tooltip != '' ">
142
+ ☆{{row.tooltip}}
143
+ </div>
144
+ <div class="form-group col-sm-12" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '')">
145
+ <div class="auto" style="margin:1px;">
146
+ <div class="panel">
147
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
148
+ <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
149
+ <div class="col-sm-4" v-show="row.f_path">
150
+ <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
151
+ </div>
152
+ <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name)">
153
+ <img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
154
+ </div>
155
+ <img v-show="row.f_path" src="../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
156
+ </div>
157
+ <button v-if="isalbum" style="float: right" type="button" name="button" class="btn btn-primary btn-photo"
158
+ @click="takePic2(idxs, row.f_item_name)">相册
159
+ </button>
160
+ </div>
161
+ </div>
162
+ </div>
163
+ <!--多张隐患照片-->
164
+ <div class="auto" v-for="itemIndex in hiddenDangerImgNumber" style="margin: 1px;">
165
+ <div class="panel">
166
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
167
+ <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
168
+ <div class="col-sm-4" v-show="row['f_p' + (itemIndex+1) + '_path']">
169
+ <img-self :src="row['f_p' + (itemIndex+1) + '_path']" :alt="row.f_item_name" width="140" height="140"></img-self>
170
+ </div>
171
+ <div class="col-sm-4" v-show="!row['f_p' + (itemIndex+1) + '_path']" @click="takePic(idxs, row.f_item_name,'f_p' + (itemIndex+1)+ '_path')">
172
+ <img src="../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
173
+ </div>
174
+ <img v-show="row['f_p' + (itemIndex+1)+'_path']" src="../../assets/remove.png" :class="style__" @click="delfile(idxs,row['f_p' + (itemIndex+1)+'_path'],'f_p' + (itemIndex+1)+ '_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
175
+ </div >
176
+ <button v-if="isalbum" style="float: right" type="button" name="button" class="btn btn-primary btn-photo"
177
+ @click="takePic2(idxs, row.f_item_name,'f_p' + (itemIndex+1)+ '_path')">相册
178
+ </button>
179
+ </div>
180
+ </div>
181
+ </div>
182
+ <div style="display: flex;flex-wrap: wrap;margin-top: 10px" v-if="row.f_deal_dispose == '现场整改' && (row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && this.showXCImg">
183
+ <label class="fivelabel">整改照片:</label>
184
+ <div class="auto" style="margin:1px;">
185
+ <div class="panel">
186
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
187
+ <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
188
+ <div class="col-sm-4" v-show="row.f_repair_path">
189
+ <img-self :src="row.f_repair_path" :alt="row.f_item_name" width="140" height="140"></img-self>
190
+ </div>
191
+ <div class="col-sm-4" v-show="!row.f_repair_path" @click="takePic(idxs, row.f_item_name,'f_repair_path',row.f_defect_level)">
192
+ <img src="../../assets/tackpic.png" alt="点击拍摄照片" width="140" height="140"></img>
193
+ </div>
194
+ <img v-show="row.f_repair_path" src="../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_repair_path, 'f_repair_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
195
+ </div>
196
+ </div>
197
+ </div>
198
+ </div>
199
+ </div>
200
+ </div>
201
+ </div>
202
+
203
+ <!--<v-select :value.sync="row.f_content" :options='getOptions(row.f_project)' placeholder='请选择' :disabled="(!(ischecked == '有')) || issee" close-on-select :value-single="true" v-if="!show && row.type == 'selector' && row.f_project != '气表品牌'"-->
204
+ <!--&gt;</v-select>-->
205
+ <!--<v-select :value.sync="row.f_content" :options='getOptions(row.f_project)' @change="getgasmodel" placeholder='请选择' :disabled="(!(ischecked == '有')) || issee" close-on-select :value-single="true" v-if="!show && row.type == 'selector' && row.f_project == '气表品牌'"-->
206
+ <!--&gt;</v-select>-->
207
+ <!-- <div class="auto" v-if="!show && row.type == 'checkbox' ">-->
208
+ <!-- <input class="magic-checkbox" type="checkbox" id="shebeicheckbox"-->
209
+ <!-- :checked="row.f_content == '有'"-->
210
+ <!-- @click="switchDetails(row.f_project, $event)" :disabled="issee"/>-->
211
+ <!-- <label for="shebeicheckbox" style="width:150px;padding-bottom: 10px">{{row.f_project}}</label>-->
212
+ <!-- </div>-->
213
+ <!--<img-area :model="Detail.imgs" :sutitle="row.f_project" v-if="row.type == 'picture'" :disabled="issee"></img-area>-->
214
+ </div>
215
+ </div>
216
+ </div>
217
+ <div style="border-top: 1px solid #D4D4D4"></div>
218
+ </div>
219
+ </div>
220
+ </div>
221
+ </template>
222
+ <script>
223
+ import Vue from 'vue'
224
+ import * as Util from '../Util'
225
+
226
+ export default {
227
+ title: '维修列表信息',
228
+ data() {
229
+ return {
230
+ // telphoneValid: '/^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$/',
231
+ // meterstyle:[],
232
+ hiddenDangerImgNumber:0,//隐患图片数
233
+ shuclass:'col-xs-12 col-sm-12 col-md-12 form-input-group mg8',
234
+ shuclass1:'col-xs-12 col-sm-12 col-md-12 mg8',
235
+ // labels:[],
236
+ meternum:'',
237
+ ischecked:'有',
238
+ gasmodel:'',
239
+ textstyle:'color: red',
240
+ paper: this.$parent.$parent.data,
241
+ f_items:[],
242
+ page:{},
243
+ selectindex:null,
244
+ lives:[{label: '是', value: '是'},{label: '否', value: '否'}],
245
+ deals:[{label: '现场处理', value: '现场处理'},{label: '自行处理', value: '自行处理'}],
246
+ f_live_dispose:'否',
247
+ f_deal_dispose:'未处理',
248
+ // 初始表底
249
+ f_initial_base: {},
250
+ // 气量异常差值 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
251
+ f_gas_aberrant_number: {},
252
+ // 金额异常差值 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
253
+ f_fee_aberrant_number: {},
254
+ // 累购气量
255
+ f_total_gas: {},
256
+ // 累购金额
257
+ f_total_fee: {},
258
+ // 已用气量
259
+ f_table_base: {},
260
+ // 已用金额
261
+ f_fee_base: {},
262
+ // 剩余气量
263
+ f_gas_balance: {},
264
+ // 剩余金额
265
+ f_fee_balance: {},
266
+ // 表端剩余金额
267
+ f_table_balance: {},
268
+ // 气量异常差值允许误差
269
+
270
+ //物联网表数据存储
271
+ f_balance_amount:{},//物联网表剩余金额
272
+ f_meter_base:{},//物联网表读数
273
+ f_balance_amount1:{},//物联网表现场录入的表上剩余金额
274
+ f_meter_base1:{},//物联网表现场录入的表字轮数
275
+ f_meter_aberrant_number1: {},//物联网表 表数异常差值
276
+ f_fee_aberrant_number1: {},//物联网 表金额异常差值
277
+ gasDeviation: (
278
+ function (_this) {
279
+ let deviation = _this.$appdata.getSingleValue('气量异常差值允许误差')
280
+ if (deviation && !isNaN(deviation)) {
281
+ return deviation
282
+ } else {
283
+ return 0
284
+ }
285
+ }
286
+ )(this),
287
+ // 金额异常差值允许误差
288
+ feeDeviation: (
289
+ function (_this) {
290
+ let deviation = _this.$appdata.getSingleValue('金额异常差值允许误差')
291
+ if (deviation && !isNaN(deviation)) {
292
+ return deviation
293
+ } else {
294
+ return 0
295
+ }
296
+ }
297
+ )(this),
298
+ // 字轮异常差值允许误差
299
+ meterbase: (
300
+ function (_this) {
301
+ let deviation = _this.$appdata.getSingleValue('字轮异常差值允许误差')
302
+ if (deviation && !isNaN(deviation)) {
303
+ return deviation
304
+ } else {
305
+ return 0
306
+ }
307
+ }
308
+ )(this),
309
+ showElse:false, //控制其他选项是否显示
310
+ showXCImg: false, // 是否显示现场整改拍照选项
311
+ showZXTime: false, // 是否显示自行整改处理时效
312
+ isalbum:this.$appdata.getSingleValue('安检使用相册') || false,
313
+ }
314
+ },
315
+ props: ['config','device','idx','operation','role'],
316
+ // props: {
317
+ // // 维修对应的用户数据收集
318
+ // model: {
319
+ // type: Object
320
+ // },
321
+ // service:{
322
+ // type: Object
323
+ // },
324
+ // show: {
325
+ // type: Boolean,
326
+ // default: false
327
+ // },
328
+ // repairitem:{
329
+ // type: Object
330
+ // },
331
+ // shutype:'heng',
332
+ // tabs:{
333
+ // type: Object
334
+ // },
335
+ // repairdetails:{
336
+ // type: Object
337
+ // },
338
+ // faultshow:{
339
+ // type: Object
340
+ // },
341
+ // issee:''
342
+ // },
343
+ methods: {
344
+ changse(val){
345
+ if(val == undefined){
346
+ return
347
+ }
348
+ if(this.selectindex != null) {
349
+ if(this.f_items[this.selectindex].type == 'selector'){
350
+ this.f_items[this.selectindex].f_item_value = val
351
+ }else if(this.f_items[this.selectindex].type == 'inputSelector'){
352
+ this.f_items[this.selectindex].f_item_value = val.target.value
353
+ }
354
+ }
355
+ },
356
+ changlive(val){
357
+ if(val == undefined){
358
+ return
359
+ }
360
+ if(this.selectindex != null) {
361
+ this.f_items[this.selectindex].f_live_dispose = val
362
+ }
363
+ },
364
+ changdeal(val){
365
+ if(val == undefined){
366
+ return
367
+ }
368
+ if(this.selectindex != null) {
369
+ this.f_items[this.selectindex].f_deal_dispose = val
370
+ }
371
+ },
372
+ switchDetails(detailsType, event){
373
+ if (event.srcElement.checked) {
374
+ for(var i = 0;i<this.Detail.details.length;i++){
375
+ if(this.Detail.details[i].f_project == detailsType){
376
+ this.Detail.details[i].f_content = '有'
377
+ this.ischecked = '有'
378
+ return
379
+ }
380
+ }
381
+ } else {
382
+ this.Detail.imgs = []
383
+ for(var i = 0;i<this.Detail.details.length;i++){
384
+ if(this.Detail.details[i].f_project == detailsType){
385
+ this.Detail.details[i].f_content = '无'
386
+ this.ischecked = '无'
387
+ }else{
388
+ this.Detail.details[i].f_content = ''
389
+ }
390
+ }
391
+ }
392
+ },
393
+ getgasmodel(val){
394
+ this.gasmodel = val
395
+ },
396
+ getradios(val,flag){
397
+ let Reoptions = []
398
+ for (let i = 0;i<this.repairdetails.length;i++) {
399
+ var t = false
400
+ if(this.repairdetails[i].f_type == this.repairitem.header ){
401
+ for(var j =0;j<this.repairdetails[i].details.length;j++){
402
+ if(this.repairdetails[i].details[j].f_project == val ){
403
+ Reoptions = this.repairdetails[i].details[j].options
404
+ t = true
405
+ break
406
+ }
407
+ }
408
+ }
409
+ if(t){
410
+ break
411
+ }
412
+ }
413
+ for(let j = 0;j<Reoptions.length;j++){
414
+ if(Reoptions[j].data == flag){
415
+ for(var e = 0;e<this.Detail.details.length;e++){
416
+ if(this.Detail.details[e].f_project == val){
417
+ this.Detail.details[e].f_status = Reoptions[j].f_status
418
+ return
419
+ }
420
+ }
421
+ break
422
+ }
423
+ }
424
+ },
425
+ deletedetails(){
426
+ this.$showMessage('该操作会删除所填信息,是否继续!', ['confirm', 'cancel']).then((res) => {
427
+ if (res === 'confirm') {
428
+ for(var i = 0;i<this.tabs.length;i++){
429
+ if(this.tabs[i].number == this.repairitem.number){
430
+ this.tabs.splice(i, 1)
431
+ this.model.servicerepair.splice(this.repairitem.number, 1)
432
+ for(let t = i;t < this.tabs.length;t++ ) {
433
+ this.tabs[t].number -= 1
434
+ }
435
+ return
436
+ }
437
+ }
438
+ }
439
+ })
440
+ },
441
+ takePic(prop, title, pathname='null') {
442
+ if (this.role == 'androidview') {
443
+ return
444
+ }
445
+ HostApp.__callback__ = this.cameraCallBack
446
+ HostApp.__this__ = this
447
+ //tag
448
+ let fileName
449
+ if (pathname == 'null') {
450
+ if (!this.f_items[prop].f_path || this.f_items[prop].f_path.includes("nopic.png")) {
451
+ fileName = Util.guid() + '-' + 'device'+this.device.n + '-' + this.idx + '-'+'f_items'+prop+ '.jpg'
452
+ } else {
453
+ fileName = Util.getFileName(this.f_items[prop].f_path)
454
+ }
455
+ } else {
456
+ if (!this.f_items[prop][pathname] || this.f_items[prop][pathname].includes("nopic.png")) {
457
+ fileName = Util.guid() + '-' + 'device'+this.device.n + '-' + this.idx + '-'+'f_items'+prop+ '.jpg'
458
+ } else {
459
+ fileName = Util.getFileName(this.f_items[prop][pathname])
460
+ }
461
+ }
462
+ let jingweidu = ''
463
+ if (this.$parent.$parent.is_has_jingweidu == 'true'){
464
+ const obj = HostApp.getGpsDetailAddress()
465
+ jingweidu = '\t经度:' + obj.longitude+ '\t纬度:' + obj.latitude
466
+ this.f_items[prop].f_longitude = obj.longitude
467
+ this.f_items[prop].f_latitude = obj.latitude
468
+ }
469
+ //tag
470
+ //tag
471
+ HostApp._open_a_page({type: 'boomerang',
472
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
473
+ param: {file: fileName, requestCode: 111, callback:'javascript:HostApp.__callback__("'+ prop +'","'+ title +'", "%s","'+pathname+'");', watermark: title + '\t时间:'+ Util.toStandardTimeString() + '\t' + Vue.user.name + jingweidu}
474
+ })
475
+ },
476
+ takePic2(prop, title, pathname='null') {
477
+ if (this.role == 'androidview') {
478
+ return
479
+ }
480
+ HostApp.__callback__ = this.cameraCallBack
481
+ HostApp.__this__ = this
482
+ //tag
483
+ let fileName
484
+ if (pathname == 'null') {
485
+ if (!this.f_items[prop].f_path || this.f_items[prop].f_path.includes("nopic.png")) {
486
+ fileName = Util.guid() + '-' + 'device' + this.device.n + '-' + this.idx + '-' + 'f_items' + prop + '.jpg'
487
+ } else {
488
+ fileName = Util.getFileName(this.f_items[prop].f_path)
489
+ }
490
+ } else {
491
+ if (!this.f_items[prop][pathname] || this.f_items[prop][pathname].includes("nopic.png")) {
492
+ fileName = Util.guid() + '-' + 'device' + this.device.n + '-' + this.idx + '-' + 'f_items' + prop + '.jpg'
493
+ } else {
494
+ fileName = Util.getFileName(this.f_items[prop][pathname])
495
+ }
496
+ }
497
+ let jingweidu = ''
498
+ if (this.$parent.$parent.is_has_jingweidu == 'true'){
499
+ const obj = HostApp.getGpsDetailAddress()
500
+ jingweidu = '\t经度:' + obj.longitude+ '\t纬度:' + obj.latitude
501
+ this.f_items[prop].f_longitude = obj.longitude
502
+ this.f_items[prop].f_latitude = obj.latitude
503
+ }
504
+ //tag
505
+ //tag
506
+ HostApp._open_a_page({type: 'boomerang',
507
+ page: 'com.aofeng.hybrid.android.peripheral.ActionPickActivity',
508
+ param: {file: fileName, requestCode: 111, callback:'javascript:HostApp.__callback__("'+ prop +'","'+ title +'", "%s","'+pathname+'");', watermark: title + '\t时间:'+ Util.toStandardTimeString() + '\t' + Vue.user.name + jingweidu}
509
+ })
510
+ },
511
+ cameraCallBack(prop,title, fileName,pathname) {
512
+ //tag
513
+ if (pathname == 'null') {
514
+ //tag
515
+ HostApp.__this__.$set( 'f_items['+prop+'].f_path', fileName + '?' + Math.random())
516
+ //tag
517
+ HostApp.__callback__ = null
518
+ HostApp.__this__ = null
519
+ } else {
520
+ //tag
521
+ //tag)
522
+ HostApp.__this__.$set( 'f_items['+prop+'].'+pathname+'', fileName + '?' + Math.random())
523
+ HostApp.__callback__ = null
524
+ HostApp.__this__ = null
525
+ }
526
+ if(this.f_items[prop].is_verification){
527
+ let path=fileName.replace('http://newimg','')
528
+ path=path.replace('file://','')
529
+ console.log('fileName',fileName)
530
+ console.log(path)
531
+ let res=HostApp.pictureVerificationAI(path,title)
532
+ if(res.code==200){
533
+ if(res.type_result){
534
+ // this.$showMessage("检测通过,当前照片为"+title)
535
+ this.f_items[prop].verification_text=`检测通过,当前照片为 ${title}`
536
+ this.f_items[prop].verification_state='pass'
537
+ }else{
538
+ // this.$showMessage("检测失败,未识别到当前照片为 "+title+",请重新拍摄!")
539
+ this.f_items[prop].verification_text=`检测失败,未识别到当前照片为'${title}',请重新拍摄!`
540
+ this.f_items[prop].verification_state='npass'
541
+ }
542
+ }else{
543
+ // this.$showMessage("检测失败,请重试!")
544
+ this.f_items[prop].verification_text=`检测失败,请重试!`
545
+ this.f_items[prop].verification_state='npass'
546
+ }
547
+ }
548
+ },
549
+ delfile(prop, fileName, pathname='null') {
550
+ if (pathname == 'null') {
551
+ //tag
552
+ //tag)
553
+ if(fileName == Vue.nopic){
554
+ return
555
+ } else {
556
+ HostApp.delfile(fileName)
557
+ this.f_items[prop].f_path = Vue.nopic
558
+ }
559
+ }else {
560
+ //tag
561
+ //tag)
562
+ if(fileName == Vue.nopic){
563
+ return
564
+ } else {
565
+ HostApp.delfile(fileName)
566
+ this.f_items[prop][pathname] = Vue.nopic
567
+ }
568
+ }
569
+ },
570
+ adddetails(){
571
+ // 下标作为序号,取值用。 增加 序号得依次增加
572
+ if(this.tabs.length > 0){
573
+ for(let i = this.tabs.length-1;i > 0 ;i-- ){
574
+ if(this.tabs[i].header == this.repairitem.header){
575
+ if(this.model.servicerepair.length > 0){
576
+ for(let j = this.model.servicerepair.length -1;j > -1;j-- ){
577
+ if(this.model.servicerepair[j].f_type == this.repairitem.header){
578
+ this.model.servicerepair.splice(j+1, 0, Object.assign({}, JSON.parse(JSON.stringify(this.tabs[i].details))))
579
+ this.tabs.splice(i+1, 0, {header: `${this.repairitem.header}`,details:this.tabs[i].details,complete:'repair-details',class:'repair-details-class',number:j+1,items:this.tabs[i].items})
580
+ for(let t = i+2;t < this.tabs.length;t++ ) {
581
+ this.tabs[t].number += 1
582
+ }
583
+ this.faultshow.number += this.faultshow.number + 1
584
+ return
585
+ }
586
+ }
587
+ }
588
+ }
589
+ }
590
+ }
591
+ },
592
+ transelation(val){
593
+ this.selectindex = val
594
+ },
595
+ towatch(){
596
+ for(let n in this.f_items){
597
+ if(typeof this.f_items[n]=='function'){
598
+ continue
599
+ }
600
+ if(this.f_items[n].type == 'selector' || this.f_items[n].type == 'inputSelector'){
601
+ // 监听下拉框,如果有隐患,需要拍照
602
+ this.$watch('f_items['+n+'].selected',function(val) {
603
+ // 下拉框值
604
+ //tag)
605
+ // 下拉框所属设备
606
+ //tag
607
+ // 下拉框所属项
608
+ //tag
609
+ if (val == undefined || val.length == 0 || val[0] == ''){
610
+ this.f_items[n].f_path = ''
611
+ this.f_items[n].f_is_defect = ''
612
+ this.f_items[n].f_defect_level = ''
613
+ this.f_items[n].f_live_dispose = ''
614
+ this.f_items[n].f_deal_dispose = ''
615
+ this.f_items[n].tooltip = ''
616
+ this.f_items[n].f_else = ''
617
+ return
618
+ }
619
+ let shImage = false
620
+ if(val.indexOf('其他') == -1){
621
+ this.f_items[n].f_else = ''
622
+ }
623
+ // if(this.config[this.device.device].items[item].type == 'selector'){
624
+ // this.f_items[n].f_item_value = val
625
+ // }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
626
+ // this.f_items[n].f_item_value = val[0]
627
+ // }
628
+ // 在配置中查找该项
629
+ for (let item in this.config[this.device.device].items) {
630
+ if(typeof this.config[this.device.device].items[item]=='function'){
631
+ continue
632
+ }
633
+ let type = this.config[this.device.device].items[item].type
634
+ let multiple = this.config[this.device.device].items[item].multiple?this.config[this.device.device].items[item].multiple:false
635
+ let options = this.config[this.device.device].items[item].options
636
+ if ((this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'inputSelector') && item == this.f_items[n].f_item_name) {
637
+ for (let i in options) {
638
+ if(typeof options[i]=='function'){
639
+ continue
640
+ }
641
+ let value
642
+ if(this.config[this.device.device].items[item].type == 'selector' && this.config[this.device.device].items[item].multiple == false){
643
+ value = val[0]
644
+ }else if (this.config[this.device.device].items[item].type == 'inputSelector'){
645
+ value = val
646
+ }
647
+ //tag)
648
+ // 如果未选择,清空图片、隐患信息等
649
+ if((type == 'selector' && val.length == 0) || (type == 'inputSelector' && val == '')){
650
+ this.f_items[n].f_path = ''
651
+ this.f_items[n].f_is_defect = ''
652
+ this.f_items[n].f_defect_level = ''
653
+ this.f_items[n].f_live_dispose = ''
654
+ this.f_items[n].f_deal_dispose = ''
655
+ this.f_items[n].tooltip = ''
656
+ }
657
+ if((type == 'selector' && multiple == false && options[i].data == val[0]) || (type == 'inputSelector' && options[i].data == val) || (type == 'selector' && multiple == true && val.indexOf(options[i].data) > -1)){
658
+ // 找到选中的项了
659
+ //tag
660
+ if(options[i].isdefect == true ){
661
+ shImage = true
662
+ }
663
+ if(options[i].isdefect == false || this.f_items[n].f_item_value == ''){
664
+ shImage = false
665
+ }
666
+ //tag
667
+ if(shImage){
668
+ this.f_items[n].f_is_defect =true
669
+ this.f_items[n].f_defect_level = options[i].level
670
+ this.f_items[n].f_path = Vue.nopic
671
+ this.f_items[n].f_live_dispose = '否'
672
+ this.f_items[n].f_deal_dispose = '未处理'
673
+ //tag
674
+ this.f_items[n].tooltip= options[i].tooltip
675
+ }else{
676
+ this.f_items[n].f_path = ''
677
+ this.f_items[n].f_is_defect = ''
678
+ this.f_items[n].f_defect_level = ''
679
+ this.f_items[n].f_live_dispose = ''
680
+ this.f_items[n].f_deal_dispose = ''
681
+ this.f_items[n].tooltip = ''
682
+ }
683
+ }
684
+ }
685
+ }
686
+ }
687
+ }
688
+ )
689
+ // this.$watch('other',function(val){
690
+ // //tag
691
+ // if(this.selectindex != null) {
692
+ // let index = this.f_items[this.selectindex].f_item_value.indexOf('其他')
693
+ // if(index > -1){
694
+ // this.f_items[this.selectindex].f_item_value.splice(index,1,this.other)
695
+ // }
696
+ // }
697
+ //
698
+ // })
699
+ }else if(this.f_items[n].type == 'radio') {
700
+ // 监听单选框,如果有隐患,需要拍照
701
+ this.$watch('f_items[' + n + '].f_item_value', function (val) {
702
+ //tag)
703
+ let options = this.f_items[n].options
704
+ //tag)
705
+ for (let i = 0; i < options.length; i++) {
706
+ //tag)
707
+ // 找到选中的项了
708
+ if (options[i].value == val) {
709
+ // 如果有隐患,拍图片
710
+ if (options[i].isdefect) {
711
+ this.f_items[n].f_is_defect = true
712
+ this.f_items[n].f_defect_level = options[i].level
713
+ this.f_items[n].f_path = Vue.nopic
714
+ this.f_items[n].f_live_dispose = '否'
715
+ this.f_items[n].f_deal_dispose = '未处理'
716
+ this.f_items[n].tooltip = options[i].tooltip
717
+ //tag)
718
+ return
719
+ }
720
+ }
721
+ }
722
+ this.f_items[n].f_path = ''
723
+ this.f_items[n].f_is_defect = ''
724
+ this.f_items[n].f_defect_level = ''
725
+ this.f_items[n].f_live_dispose = ''
726
+ this.f_items[n].f_deal_dispose = ''
727
+ this.f_items[n].tooltip = ''
728
+ })
729
+ }else if(this.f_items[n].type == 'checkbox') {
730
+ // 监听单选框,如果有隐患,需要拍照
731
+ this.$watch('f_items[' + n + '].f_item_value', function (val) {
732
+ //tag)
733
+ // 如果是手动赋值,不执行下面逻辑
734
+ if (this.f_items[n].isReSet) {
735
+ this.f_items[n].isReSet = false
736
+ return
737
+ }
738
+ let options = this.f_items[n].options
739
+ //tag)
740
+ // 取出选中项中有隐患的详细信息
741
+ let selected = options.filter(item => { return val.indexOf(item.value) != -1 && item.isdefect })
742
+
743
+ if(selected.length > 0){
744
+ // 防止赋值无限调用
745
+ this.f_items[n].isReSet = true
746
+ let selectList = selected.map(item => {return item.value})
747
+ // 如果选中的是非隐患项,取消选中isdefect为true的
748
+ if (selectList.indexOf(val[val.length - 1]) == -1) {
749
+ this.f_items[n].f_item_value = val.filter(item => {return selectList.indexOf(item) == -1})
750
+ this.f_items[n].f_path = ''
751
+ this.f_items[n].f_is_defect = ''
752
+ this.f_items[n].f_defect_level = ''
753
+ this.f_items[n].f_live_dispose = ''
754
+ this.f_items[n].f_deal_dispose = ''
755
+ this.f_items[n].tooltip = ''
756
+ return
757
+ }
758
+ // 如果选中的是隐患项,取消选中isdefect为false的
759
+ this.f_items[n].f_item_value = selectList
760
+ // 如果第一次选择隐患项,初始化
761
+ if (!this.f_items[n].f_is_defect) {
762
+ this.f_items[n].f_is_defect = true
763
+ this.f_items[n].f_defect_level = selected[0].level
764
+ this.f_items[n].f_path = Vue.nopic
765
+ this.f_items[n].f_live_dispose = '否'
766
+ this.f_items[n].f_deal_dispose = '未处理'
767
+ //tag
768
+ this.f_items[n].tooltip = selected[0].tooltip
769
+ }
770
+ //tag)
771
+ return
772
+ }
773
+ this.f_items[n].f_path = ''
774
+ this.f_items[n].f_is_defect = ''
775
+ this.f_items[n].f_defect_level = ''
776
+ this.f_items[n].f_live_dispose = ''
777
+ this.f_items[n].f_deal_dispose = ''
778
+ this.f_items[n].tooltip = ''
779
+ })
780
+ }
781
+ }
782
+ //tag)
783
+ },
784
+ getGasAberrantNumber(val) {
785
+ //tag
786
+ if(!this.f_table_base.index || !this.f_gas_balance.index){
787
+ //tag
788
+ return
789
+ }
790
+ // 先清空
791
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
792
+ this.f_items[this.f_gas_aberrant_number.index].f_is_defect = false
793
+ if(val=='已用气量'){
794
+ //剩余气量 = 累购-已用
795
+ this.f_items[this.f_gas_balance.index].f_item_value= (this.f_items[this.f_total_gas.index].f_item_value-this.f_items[this.f_table_base.index].f_item_value).toFixed(2)
796
+ if (isNaN(this.f_items[this.f_gas_balance.index].f_item_value)) {
797
+ this.f_items[this.f_gas_balance.index].f_item_value = null
798
+ }
799
+ }
800
+
801
+ // 只有两个值都填了才会计算
802
+ if (!this.f_items[this.f_table_base.index].f_item_value || !this.f_items[this.f_gas_balance.index].f_item_value) {
803
+ return
804
+ }
805
+ //tag)
806
+ //tag
807
+ //tag
808
+
809
+ // 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
810
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_total_gas.index].f_item_value - this.f_items[this.f_gas_balance.index].f_item_value - (this.f_items[this.f_table_base.index].f_item_value - (this.f_initial_base.index?this.f_items[this.f_initial_base.index].f_item_value:0))
811
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_gas_aberrant_number.index].f_item_value.toFixed(3)
812
+ // 如果数值有误,清空结果s
813
+ if (isNaN(this.f_items[this.f_gas_aberrant_number.index].f_item_value)) {
814
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
815
+ }
816
+ //tag ===> ' + Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value))
817
+ //tag ===> ' + JSON.stringify(Number(this.gasDeviation)))
818
+ // 计算差值是否在范围内
819
+ if (Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) > Number(this.gasDeviation)|| Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) < Number(this.gasDeviation) * -1) {
820
+ this.f_items[this.f_gas_aberrant_number.index].f_is_defect = true
821
+ this.f_items[this.f_gas_aberrant_number.index].f_deal_dispose = '未处理'
822
+ }else{
823
+ this.f_items[this.f_gas_aberrant_number.index].f_is_defect = null
824
+ this.f_items[this.f_gas_aberrant_number.index].f_deal_dispose = null
825
+ }
826
+
827
+ //tag)
828
+ },
829
+ getFeeAberrantNumber(val) {
830
+ //tag
831
+ // 只有两个值都填了才会计算
832
+ if(!this.f_fee_base.index || !this.f_fee_balance.index){
833
+ //tag
834
+ return
835
+ }
836
+ // 先清空
837
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
838
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
839
+
840
+ if(val=='已用金额'){
841
+ this.f_items[this.f_fee_balance.index].f_item_value=(this.f_items[this.f_total_fee.index].f_item_value-this.f_items[this.f_fee_base.index].f_item_value).toFixed(3)
842
+ if (isNaN(this.f_items[this.f_fee_balance.index].f_item_value)) {
843
+ this.f_items[this.f_fee_balance.index].f_item_value = null
844
+ }
845
+ }
846
+
847
+ if (!this.f_items[this.f_fee_base.index].f_item_value || !this.f_items[this.f_fee_balance.index].f_item_value) {
848
+ return
849
+ }
850
+
851
+ // 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
852
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_total_fee.index].f_item_value - this.f_items[this.f_fee_balance.index].f_item_value - this.f_items[this.f_fee_base.index].f_item_value
853
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_aberrant_number.index].f_item_value.toFixed(3)
854
+ if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
855
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
856
+ }
857
+ //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
858
+ //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
859
+ // 计算差值是否在范围内
860
+ if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
861
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
862
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = '未处理'
863
+ }else{
864
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = null
865
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = null
866
+ }
867
+
868
+ //tag)
869
+ },
870
+ // 计算剩余金额和剩余金额差值
871
+ getFeeAberrantNumber2(val) {
872
+ //tag
873
+ // 只有两个值都填了才会计算
874
+ if(!this.f_table_balance.index || !this.f_fee_balance.index){
875
+ //tag
876
+ return
877
+ }
878
+ // 先清空
879
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
880
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
881
+
882
+ // 计算公式 => 金额异常差值 = 系统剩余金额 - 表端剩余金额
883
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_balance.index].f_item_value - this.f_items[this.f_table_balance.index].f_item_value
884
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_aberrant_number.index].f_item_value.toFixed(3)
885
+ if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
886
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
887
+ }
888
+ //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
889
+ //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
890
+ // 计算差值是否在范围内
891
+ if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
892
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
893
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = '未处理'
894
+ }else{
895
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = null
896
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = null
897
+ }
898
+ console.log('--------------------------------')
899
+ console.log(this.f_items[this.f_fee_aberrant_number.index].f_item_value)
900
+
901
+ //tag)
902
+ },
903
+ //物联网表字轮数改变触发
904
+ getmeteraberrantnumber() {
905
+ //tag
906
+
907
+ // 先清空
908
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
909
+ this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = false
910
+ //tag
911
+ // 只有两个值都填了才会计算
912
+ if (!this.f_items[this.f_meter_base.index].f_item_value || !this.f_items[this.f_meter_base1.index].f_item_value) {
913
+ return
914
+ }
915
+ //tag
916
+ // 计算公式 => 表数异常差值= - 字轮数 - 后台表读数
917
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_base1.index].f_item_value - this.f_items[this.f_meter_base.index].f_item_value
918
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_aberrant_number1.index].f_item_value.toFixed(3)
919
+ if (isNaN(this.f_items[this.f_meter_aberrant_number1.index].f_item_value)) {
920
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
921
+ }
922
+ //tag ===> ' + Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value))
923
+ // 计算差值是否在范围内
924
+ //tag)
925
+ if (Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value) > Number(this.meterbase)){
926
+ this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = true
927
+ }
928
+
929
+ //tag)
930
+ },
931
+
932
+ disSelect(index, itemValue) {
933
+ //tag)
934
+ //tag)
935
+ if (this.f_items[index].f_item_value == itemValue) {
936
+ this.$set(`f_items[${index}].f_item_value`, '')
937
+ }
938
+ }
939
+ },
940
+ ready() {
941
+ //tag
942
+ //tag
943
+ if(Vue.config.safecheck != undefined){
944
+ if(Vue.config.safecheck.ApproveConfig != undefined){
945
+ if(Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
946
+ this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
947
+ }
948
+ if(Vue.config.safecheck.ApproveConfig.dealdispose != undefined) {
949
+ this.dealdispose = Vue.config.safecheck.ApproveConfig.dealdispose
950
+ }
951
+ if(Vue.config.safecheck.ApproveConfig.showtorepair) {
952
+ this.deals=[{label: '现场整改', value: '现场整改'},
953
+ {label: '自行处理', value: '自行处理'},
954
+ {label: '转维修', value: '报修'}
955
+ ]
956
+ }
957
+ if(Vue.config.safecheck.ApproveConfig.Processing) {
958
+ if(Vue.config.safecheck.ApproveConfig.Processing.length > 0){
959
+ this.deals = Vue.config.safecheck.ApproveConfig.Processing
960
+ }
961
+ }
962
+ if(Vue.config.safecheck.ApproveConfig.showXCImg) {
963
+ this.showXCImg = true
964
+ }
965
+ if(Vue.config.safecheck.ApproveConfig.showZXTime) {
966
+ this.showZXTime = true
967
+ }
968
+ if(Vue.config.safecheck.ApproveConfig.showtorepair) {
969
+ }
970
+ if(Vue.config.safecheck.ApproveConfig.hiddendanger != undefined) {
971
+ if (parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger) >= 5) {
972
+ this.hiddenDangerImgNumber = 5
973
+ }else {
974
+ this.hiddenDangerImgNumber = parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger)
975
+ }
976
+ }
977
+ }
978
+ }
979
+ //tag
980
+ //tag)
981
+ //tag)
982
+ //tag)
983
+ //创建页面所需数据
984
+ this.$set('piece', this.paper['device'+this.device.n][this.idx])
985
+ //tag)
986
+ //tag)
987
+ let n = 0
988
+ for (let item in this.config[this.device.device].items) {
989
+ if(typeof this.config[this.device.device].items[item]=='function'){
990
+ continue
991
+ }
992
+ let index = this.config[this.device.device].items[item].index-1
993
+ this.$set('page.options' + index, [])
994
+ //tag)
995
+ //tag)
996
+ //tag)
997
+ // 先根据配置组接页面
998
+ let f_item_value
999
+ if(this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'checkbox'){
1000
+ f_item_value = []
1001
+ // 判断选项的默认值
1002
+ for (let defitem in this.config[this.device.device].items[item].options) {
1003
+ if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
1004
+ continue
1005
+ }
1006
+ let defopt = this.config[this.device.device].items[item].options[defitem]
1007
+ if (defopt.isdefault) {
1008
+ //tag
1009
+ f_item_value[0] = defopt.data
1010
+ }
1011
+ }
1012
+ // if(this.config[this.device.device].items[item].data){
1013
+ // f_item_value.push(this.config[this.device.device].items[item].data)
1014
+ // }
1015
+ }else if(this.config[this.device.device].items[item].type == 'radio'){
1016
+ //为radio添加默认值
1017
+ f_item_value=''
1018
+ //tag)
1019
+ for (let defitem in this.config[this.device.device].items[item].options) {
1020
+ if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
1021
+ continue
1022
+ }
1023
+ //tag)
1024
+ let defopt = this.config[this.device.device].items[item].options[defitem]
1025
+ if (defopt.isdefault) {
1026
+ //tag)
1027
+ f_item_value = defopt.data
1028
+ }
1029
+ }
1030
+ }else{
1031
+ f_item_value = this.config[this.device.device].items[item].data ? this.config[this.device.device].items[item].data : ''
1032
+ }
1033
+ //tag)
1034
+ let it = {
1035
+ type: this.config[this.device.device].items[item].type,
1036
+ f_item_name: item,
1037
+ checkmust: this.config[this.device.device].items[item].checkmust,
1038
+ f_item_value: f_item_value,
1039
+ is_verification:this.config[this.device.device].items[item].is_verification,
1040
+ verification_text:'',
1041
+ verification_state:'',// ai验证是否通过 npass(未通过)/pass(通过)
1042
+ f_is_defect: '',
1043
+ multiple:this.config[this.device.device].items[item].multiple == true?this.config[this.device.device].items[item].multiple:false,
1044
+ isshow:this.config[this.device.device].items[item].isshow == false?this.config[this.device.device].items[item].isshow:true,
1045
+ readonly: this.config[this.device.device].items[item].readonly == true?true:false,
1046
+ remark: this.config[this.device.device].items[item].remark ? this.config[this.device.device].items[item].remark : '',
1047
+ f_path: '',
1048
+ unit: this.config[this.device.device].items[item].unit ? this.config[this.device.device].items[item].unit : '',
1049
+ tooltip:'',
1050
+ f_live_dispose:'',
1051
+ f_deal_dispose:'',
1052
+ f_else: '',
1053
+ f_p1_path: '',
1054
+ f_p2_path: '',
1055
+ f_p3_path: '',
1056
+ f_longitude:'',
1057
+ f_latitude:''
1058
+ }
1059
+ //tag)
1060
+ //tag)
1061
+ this.$set('f_items['+index+']',it)
1062
+ if (this.config[this.device.device].items[item].type == 'selector' ||this.config[this.device.device].items[item].type == 'inputSelector') {
1063
+ if(this.config[this.device.device].items[item].type == 'selector'){
1064
+ this.page['options' + index].push({
1065
+ label: "请选择",
1066
+ value: ''
1067
+ })
1068
+ }
1069
+ for (let i in this.config[this.device.device].items[item].options) {
1070
+ if(typeof this.config[this.device.device].items[item].options[i]=='function'){
1071
+ continue
1072
+ }
1073
+ this.page['options' + index].push({
1074
+ label: this.config[this.device.device].items[item].options[i].data,
1075
+ value: this.config[this.device.device].items[item].options[i].data,
1076
+ tooltip: this.config[this.device.device].items[item].options[i].tooltip
1077
+ })
1078
+ }
1079
+ if(this.config[this.device.device].items[item].type == 'selector'){
1080
+ this.$set('f_items['+index+'].selected', f_item_value)
1081
+ }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
1082
+ this.$set('f_items['+index+'].selected', f_item_value)
1083
+ }
1084
+
1085
+ this.$set('f_items['+index+'].options',this.page['options' + index])
1086
+
1087
+ //tag)
1088
+ } else if (this.config[this.device.device].items[item].type == 'radio' || this.config[this.device.device].items[item].type == 'checkbox') {
1089
+ //tag)
1090
+ //tag
1091
+ //tag)
1092
+ for (let i in this.config[this.device.device].items[item].options) {
1093
+ if(typeof this.config[this.device.device].items[item].options[i]=='function'){
1094
+ continue
1095
+ }
1096
+ //tag
1097
+ this.page['options' + index].push({
1098
+ label: this.config[this.device.device].items[item].options[i].data,
1099
+ value: this.config[this.device.device].items[item].options[i].data,
1100
+ isdefect: this.config[this.device.device].items[item].options[i].isdefect,
1101
+ level: this.config[this.device.device].items[item].options[i].level,
1102
+ tooltip: this.config[this.device.device].items[item].options[i].tooltip
1103
+ })
1104
+ //tag)
1105
+ }
1106
+ //tag)
1107
+ this.$set('f_items[' + index + '].options', this.page['options' + index])
1108
+ this.$set('f_items[' + index + '].f_item_value', f_item_value)
1109
+ //tag)
1110
+ }
1111
+ n = n + 1
1112
+ }
1113
+ if(!this.piece || JSON.stringify(this.piece) == '{}') {
1114
+ // 如果没有,则新建
1115
+ this.$set('piece.f_items',this.f_items)
1116
+ this.$set('piece.f_device_type',this.device.device)
1117
+ } else {
1118
+ // 已经存在,把之前的数据重新填入
1119
+ for (let f in this.f_items){
1120
+ if(typeof this.f_items[f]=='function'){
1121
+ continue
1122
+ }
1123
+ for(let p in this.piece.f_items) {
1124
+ if(typeof this.piece.f_items[p]=='function'){
1125
+ continue
1126
+ }
1127
+ if (this.f_items[f].f_item_name == this.piece.f_items[p].f_item_name) {
1128
+ //tag)
1129
+ //tag)
1130
+ this.f_items[f] = Object.assign(this.f_items[f], this.piece.f_items[p])
1131
+ //tag)
1132
+ if (this.f_items[f].type == 'selector' || this.f_items[f].type == 'inputSelector') {
1133
+ //tag)
1134
+ //tag)
1135
+ this.f_items[f].selected = this.piece.f_items[p].f_item_value
1136
+ //tag)
1137
+ }
1138
+ // 取出特殊值
1139
+ if (this.f_items[f].f_item_name == '初始表底') {
1140
+ //tag)
1141
+ this.f_initial_base.index = f
1142
+ } else if (this.f_items[f].f_item_name == '累购气量') {
1143
+ //tag)
1144
+ this.f_total_gas.index = f
1145
+ } else if (this.f_items[f].f_item_name == '已用气量') {
1146
+ //tag)
1147
+ this.f_table_base.index = f
1148
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1149
+ this.getGasAberrantNumber('已用气量')
1150
+ })
1151
+ } else if (this.f_items[f].f_item_name == '剩余气量') {
1152
+ //tag)
1153
+ this.f_gas_balance.index = f
1154
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1155
+ this.getGasAberrantNumber('')
1156
+ })
1157
+ } else if (this.f_items[f].f_item_name == '气量异常差值') {
1158
+ //tag)
1159
+ this.f_gas_aberrant_number.index = f
1160
+ } else if (this.f_items[f].f_item_name == '累购金额') {
1161
+ //tag)
1162
+ this.f_total_fee.index = f
1163
+ } else if (this.f_items[f].f_item_name == '已用金额') {
1164
+ //tag)
1165
+ this.f_fee_base.index = f
1166
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1167
+ this.getFeeAberrantNumber('已用金额')
1168
+ })
1169
+ } else if (this.f_items[f].f_item_name == '剩余金额') {
1170
+ //tag)
1171
+ this.f_fee_balance.index = f
1172
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1173
+ this.getFeeAberrantNumber('')
1174
+ this.getFeeAberrantNumber2('')
1175
+ })
1176
+ } else if (this.f_items[f].f_item_name == '表端剩余金额') {
1177
+ this.f_table_balance.index = f
1178
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1179
+ this.getFeeAberrantNumber2('')
1180
+ })
1181
+ } else if (this.f_items[f].f_item_name == '金额异常差值') {
1182
+ //tag)
1183
+ this.f_fee_aberrant_number.index = f
1184
+ }else if (this.f_items[f].f_item_name == '表读数') {
1185
+ //tag)
1186
+ this.f_meter_base.index = f
1187
+ }else if (this.f_items[f].f_item_name == '表剩余金额') {
1188
+ //tag)
1189
+ this.f_balance_amount.index = f
1190
+ }else if (this.f_items[f].f_item_name == '字轮数') {
1191
+ //tag)
1192
+ this.f_meter_base1.index = f
1193
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1194
+ this.getmeteraberrantnumber()
1195
+ })
1196
+ }else if (this.f_items[f].f_item_name == '表余额') {
1197
+ //tag)
1198
+ this.f_balance_amount1.index = f
1199
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1200
+ this.getfeeaberrantnumber1()
1201
+ })
1202
+ }else if (this.f_items[f].f_item_name == '表数异常差值') {
1203
+ //tag)
1204
+ this.f_meter_aberrant_number1.index = f
1205
+ }else if (this.f_items[f].f_item_name == '表金额异常差值') {
1206
+ //tag)
1207
+ this.f_fee_aberrant_number1.index = f
1208
+ }
1209
+ }
1210
+ }
1211
+ for (let em in this.config[this.device.device].items) {
1212
+ if(typeof this.config[this.device.device].items[em]=='function'){
1213
+ continue
1214
+ }
1215
+ if (this.config[this.device.device].items[em].type == 'selector' && em == this.f_items[f].f_item_name) {
1216
+ this.f_items[f].options =[]
1217
+ for (let k in this.config[this.device.device].items[em].options) {
1218
+ if(typeof this.config[this.device.device].items[em].options[k]=='function'){
1219
+ continue
1220
+ }
1221
+ this.f_items[f].options.push({
1222
+ label: this.config[this.device.device].items[em].options[k].data,
1223
+ value: this.config[this.device.device].items[em].options[k].data
1224
+ })
1225
+ }
1226
+ }
1227
+ }
1228
+ }
1229
+ //tag)
1230
+ this.$set('piece.f_items',this.f_items)
1231
+ }
1232
+ this.towatch()
1233
+ },
1234
+ destroyed(){
1235
+ let nullCount = 0
1236
+ let metertitles
1237
+ //判断当前是否有选中项
1238
+ for (let row in this.f_items){
1239
+ if(typeof this.f_items[row]=='function'){
1240
+ continue
1241
+ }
1242
+ if(this.f_items[row].selected && this.f_items[row].selected != '' && this.f_items[row].selected instanceof Array){
1243
+ //tag
1244
+ this.f_items[row].f_item_value = this.f_items[row].selected
1245
+ }else if(this.f_items[row].selected && this.f_items[row].selected != ''){
1246
+ //tag
1247
+ this.f_items[row].f_item_value = this.f_items[row].selected
1248
+ }
1249
+ // if(this.f_items[row].f_item_value instanceof Array && this.f_items[row].f_item_value.length != 0 ){
1250
+ // nullCount = nullCount+1
1251
+ // }else if(this.f_items[row].f_item_value != ''){
1252
+ // nullCount = nullCount+1
1253
+ // }
1254
+ }
1255
+ let picture = []
1256
+ // for (let row in this.f_items){
1257
+ // let a={}
1258
+ // a.f_path = this.f_items[row].f_path
1259
+ // a.name = this.f_items[row].f_item_name
1260
+ // }
1261
+ // picture.push(a)
1262
+ this.$set(`paper['device${this.device.n}'][${this.idx}]`, this.piece)
1263
+ //tag
1264
+ },
1265
+ computed:{
1266
+
1267
+ }
1268
+ }
1269
+ </script>
1270
+ <style lang="less" scoped>
1271
+ .class-erro {
1272
+ color: #a94442;
1273
+ }
1274
+ .fivelabel{
1275
+ border: none;
1276
+ border-left: 5px solid #A2C2EB;
1277
+ float: left;
1278
+ width: 35%;
1279
+ margin-bottom: 3px;
1280
+ text-align: left;
1281
+ word-wrap: break-word;
1282
+ white-space: normal;
1283
+ }
1284
+ .radiolabel{
1285
+ border: none;
1286
+ border-left: 5px solid #A2C2EB;
1287
+ float: left;
1288
+ width: 65%;
1289
+ margin-bottom: 3px;
1290
+ text-align: left;
1291
+ word-wrap: break-word;
1292
+ white-space: normal;
1293
+ }
1294
+
1295
+ .textlabel {
1296
+ border: none;
1297
+ border-left: 5px solid #A2C2EB;
1298
+ width: 100%;
1299
+ margin-bottom: 3px;
1300
+ text-align: left;
1301
+ word-wrap: break-word;
1302
+ white-space: normal;
1303
+ }
1304
+ .textlabel1 {
1305
+ border: none;
1306
+ border-left: 5px solid #f7cb32;
1307
+ width: 100%;
1308
+ margin-bottom: 3px;
1309
+ text-align: left;
1310
+ word-wrap: break-word;
1311
+ white-space: normal;
1312
+ }
1313
+ .spanrodio{
1314
+ margin-right: 10px;
1315
+ }
1316
+ .div-photo{
1317
+ width: auto;
1318
+ height: auto;
1319
+ /* margin-top: 10px; */
1320
+ position: absolute;
1321
+ bottom: 10px;
1322
+ right: 10px;
1323
+ }
1324
+ .panel-self{
1325
+ border-radius: 5px;
1326
+ border:1px solid #c5e1f7;
1327
+ //background-color: #F2F6FA;
1328
+ }
1329
+ .btn-photo{
1330
+ border: 0;
1331
+ border-radius: 7px;
1332
+ background-color: #7dc1f4;
1333
+ font: 15px PingFang-SC-Bold;
1334
+ height: 20%;
1335
+ }
1336
+ </style>
1337
+