safecheck-client 3.0.39-5 → 3.0.39-6

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