safecheck-client 3.0.34-13 → 3.0.34-16

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