safecheck-client 3.0.32-21 → 3.0.32-23

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