safecheck-client 3.0.34-3 → 3.0.34-30

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