safecheck-client 3.0.34-1 → 3.0.34-2

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