safecheck-client 3.0.30-7 → 3.0.30-71

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