safecheck-client 3.0.39-1 → 3.0.39-3

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