safecheck-client 3.0.32 → 3.0.33-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/package.json +133 -133
  2. package/src/App.vue +31 -31
  3. package/src/assets//345/215/225/345/205/203/345/217/267.png +0 -0
  4. package/src/assets//345/234/260/345/235/200.png +0 -0
  5. package/src/assets//345/247/223/345/220/215.png +0 -0
  6. package/src/assets//345/260/217/345/214/272.png +0 -0
  7. package/src/assets//345/260/217/345/214/272/350/223/235/350/211/262.png +0 -0
  8. package/src/assets//345/272/225/346/225/260.png +0 -0
  9. package/src/assets//346/210/267/347/274/226/345/217/267.png +0 -0
  10. package/src/assets//346/245/274/345/217/267.png +0 -0
  11. package/src/assets//346/245/274/345/261/202.png +0 -0
  12. package/src/assets//350/241/250/347/261/273/345/236/213.png +0 -0
  13. package/src/assets//351/227/250/347/211/214/345/217/267.png +0 -0
  14. package/src/components/android/AndroidDefectDeal.vue +5 -5
  15. package/src/components/android/PhoneUpUserinfo.vue +6 -0
  16. package/src/components/android/SafecheckOrderV.vue +4 -1
  17. package/src/components/map/checkScreen.vue +1 -1
  18. package/src/components/planmanage/checkPlanList.vue +3 -3
  19. package/src/components/rongcheng/AspiratedDevices.vue +34 -1
  20. package/src/components/rongcheng/DefectPaper.vue +4 -1
  21. package/src/components/rongcheng/SafecheckDevices.vue +34 -1
  22. package/src/components/rongcheng/SafecheckOrderV.vue +1 -0
  23. package/src/components/rongcheng/SafecheckUserInfo.vue +17 -0
  24. package/src/filiale/Util.js +7 -0
  25. package/src/filiale/ankangyihua/android/AndroidDefectDeal.vue +1 -1
  26. package/src/filiale/ankangyihua/android/CurrentCreate.vue +1 -1
  27. package/src/filiale/bayan/pc/NewCheckpaper.vue +1 -1
  28. package/src/filiale/dexin/android/CasualSave.vue +1050 -0
  29. package/src/filiale/dexin/android/SafecheckDevices.vue +4 -4
  30. package/src/filiale/dexin/android/SafecheckOrderV.vue +2407 -2355
  31. package/src/filiale/dexin/android/WebMeterOpen.vue +377 -0
  32. package/src/filiale/dexin/android/WebMeterOpenEdit.vue +225 -0
  33. package/src/filiale/dexin/android.js +4 -1
  34. package/src/filiale/fugou/pc/AddToCheckBook.vue +160 -0
  35. package/src/filiale/fugou/pc/CheckBook.vue +301 -0
  36. package/src/filiale/fugou/pc/CheckBookAll.vue +67 -0
  37. package/src/filiale/fugou/pc/CheckBookArea.vue +146 -0
  38. package/src/filiale/fugou/pc/CheckBookCompany.vue +144 -0
  39. package/src/filiale/fugou/pc/CheckBookDetails.vue +161 -0
  40. package/src/filiale/fugou/pc/CheckBookEntry.vue +66 -0
  41. package/src/filiale/fugou/pc/CheckBookList.vue +366 -0
  42. package/src/filiale/fugou/pc/CheckBookSearchArea.vue +560 -0
  43. package/src/filiale/fugou/pc/CheckBookSearchUnit.vue +229 -0
  44. package/src/filiale/fugou/pc/CheckBookSearchUser.vue +651 -0
  45. package/src/filiale/fugou/pc/CheckBookSearchUserList.vue +674 -0
  46. package/src/filiale/fugou/pc/CheckBookUser.vue +101 -0
  47. package/src/filiale/fugou/pc/DefectPaperNew.vue +1 -1
  48. package/src/filiale/fugou/pc/PaperDefectMain.vue +22 -1
  49. package/src/filiale/fugou/pc/PlanManage.vue +1007 -0
  50. package/src/filiale/fugou/pc/checkPlanList.vue +371 -0
  51. package/src/filiale/fugou/pc/checkUserList.vue +20 -120
  52. package/src/filiale/fugou/pc.js +60 -5
  53. package/src/filiale/jingyang/android/AddPlanItem.vue +246 -246
  54. package/src/filiale/jingyang/android/CurrentCreate.vue +18 -18
  55. package/src/filiale/jingyang/android/SafecheckOrderV.vue +2281 -2281
  56. package/src/filiale/jingyang/android/SafecheckUserInfo.vue +1 -0
  57. package/src/filiale/jingyang/android.js +4 -0
  58. package/src/filiale/kelai/android/SafecheckDevices.vue +1 -1
  59. package/src/filiale/qianneng/pc/NewCheckpaper.vue +1 -1
  60. package/src/filiale/qingjian/android/SafecheckOrderV.vue +1 -0
  61. package/src/filiale/qingjian/android/SafecheckUserInfo.vue +4 -0
  62. package/src/filiale/rongchuang/android/SafecheckDevices.vue +1680 -0
  63. package/src/filiale/rongchuang/android/SafecheckOrderV.vue +975 -488
  64. package/src/filiale/rongchuang/pc/NewCheckpaper.vue +111 -48
  65. package/src/filiale/shanxian/android/SafecheckOrderV.vue +1 -1
  66. package/src/filiale/shexian/pc/PaperList.vue +822 -0
  67. package/src/filiale/shexian/pc.js +1 -0
  68. package/src/filiale/tongchuan/pc/CheckPlanCountChartArea.vue +1 -1
  69. package/src/filiale/wensu/android/CurrentCreate.vue +1 -1
  70. package/src/filiale/wensu/pc/CheckSearchUser.vue +58 -53
  71. package/src/filiale/wensu/pc/DefectPaperNew.vue +15 -9
  72. package/src/filiale/wensu/pc/PlanManage.vue +831 -0
  73. package/src/filiale/wensu/pc/PrintMaterialBill.vue +28 -11
  74. package/src/filiale/wensu/pc/RoleSelector.vue +2 -2
  75. package/src/filiale/wensu/pc/SelectCheckPlan.vue +208 -168
  76. package/src/filiale/wensu/pc/checkUserList.vue +5 -1
  77. package/src/filiale/wensu/pc.js +20 -19
  78. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +6 -2
  79. package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +3 -3
  80. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +1 -1
  81. package/src/filiale/yangchunboneng/pc/CheckBookUser.vue +3 -3
  82. package/src/filiale/yongzhou/pc/safeStatistics.vue +1 -0
  83. package/src/filiale/yongzhou/pc/safeStatisticsYear.vue +1 -0
  84. package/src/filiale/yunchengminsheng/android/SafecheckDevices.vue +3 -0
  85. package/src/filiale/zhongyi/pc/DefectListNew.vue +6 -6
  86. package/src/main.js +33 -33
  87. package/static/stretch_bottom.png +0 -0
  88. package/static/stretch_top.png +0 -0
@@ -0,0 +1,1680 @@
1
+ <template>
2
+ <div class="select-overspread repair-bg auto" style="padding-bottom:5px;">
3
+ <!--<div class="bq-parent" v-if="shutype == 'heng'">-->
4
+ <!--<blockquote class="blockquote">-->
5
+ <!--<p><span>{{repairitem.header}}</span><a @click="mute()" style="float:right" href="#" class="repair-mute-class"><img src="../../../assets/novoice.png" width="25px;" alt=""><span style="margin-left:10px;color: #304A66">关闭声音</span></a></p>-->
6
+ <!--</blockquote>-->
7
+ <!--</div>-->
8
+ <div class="panel panel-default auto repair-info-content">
9
+ <div class="panel-body" style="padding: 0">
10
+ <!-- 安检项内容 -->
11
+ <div class="auto repair-info-content compatible" style="padding: 0">
12
+ <div class="row auto" style="padding: 0">
13
+ <div v-show="false" class="{{shuclass}}" v-if="device.device != '燃气表'">
14
+ <button type="button" name="button" class="btn btn-primary" @click='adddetails()'
15
+ :disabled="issee">增加</button>
16
+ </div>
17
+ <!--<div class="{{shuclass}}" v-if="device.device != '燃气表' && candelete">-->
18
+ <!--<button type="button" name="button" class="btn btn-primary" @click='deletedetails()' :disabled="issee">删除</button>-->
19
+ <!--</div>-->
20
+ <div class="shuclass1" v-show="row.isshow" v-for="(idxs, row) in f_items"
21
+ style="padding: 4px; border:1px solid #D4D4D4;border-bottom: 0">
22
+ <label v-if="row.type != 'radio' && row.type != 'text' && row.type != 'picture' && row.type != 'checkbox'"
23
+ v-show="row.isshow" class="fivelabel">{{ row.f_item_name }}<span
24
+ v-if="row.unit">({{ row.unit }})</span><br />{{ row.remark }}</label>
25
+ <label v-if="row.type == 'radio'" v-show="row.isshow" class="radiolabel">{{ row.f_item_name }}<span
26
+ v-if="row.unit">({{ row.unit }})</span><br />{{ row.remark }}</label>
27
+ <label v-if="row.type == 'text'" v-show="row.isshow" class="textlabel1">{{ row.f_item_name }}<span
28
+ v-if="row.unit">({{ row.unit }})</span><br />{{ row.remark }}</label>
29
+ <label v-if="row.type == 'picture' || row.type == 'checkbox'" v-show="row.isshow"
30
+ class="textlabel">{{ row.f_item_name }} <br />{{ row.remark }} <span v-show="row.verification_state"
31
+ :style="{ color: row.verification_state === 'pass' ? 'green' : 'red' }">{{ row.verification_text }}</span></label>
32
+ <!--<span v-if="show" style="font-weight:bold">{{row.f_content}}</span>-->
33
+ <!--<datepicker placeholder="请选择时间"-->
34
+ <!--:value.sync="row.f_content"-->
35
+ <!--v-model="row.f_content"-->
36
+ <!--:format="'yyyy-MM-dd'"-->
37
+ <!--v-if="!show && row.type == 'date'"-->
38
+ <!--:readonly="true"-->
39
+ <!--&gt;</datepicker>-->
40
+ <div style="clear: both" v-if="row.type == 'picture'" class="form-group col-sm-12">
41
+ <div class="auto">
42
+ <div class="panel">
43
+ <div class="panel-body panel-self"
44
+ style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
45
+ <div class="row" style="height: 160px;width:160px;overflow: scroll;top: 1px">
46
+ <div class="col-sm-4" v-show="row.f_path">
47
+ <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
48
+ </div>
49
+ <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name)">
50
+ <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
51
+ </div>
52
+ <img v-show="row.f_path" src="../../../assets/remove.png" :class="style__"
53
+ @click="delfile(idxs, row.f_path)" v-if="role != 'androidview'"
54
+ style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ <div style="float: left;width:60%" class="form-group" v-if="row.type == 'string'" v-show="row.isshow">
61
+ <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value"
62
+ :readonly="role == 'androidview' || row.readonly">
63
+ </div>
64
+ <div style="float: left;width:60%" class="form-group col-sm-12" v-if="row.type == 'date'"
65
+ v-show="row.isshow">
66
+ <datepicker id="f_making_date" :placeholder=row.f_item_name :value.sync="row.f_item_value"
67
+ v-if="row.type == 'date'" v-show="row.isshow" :disabled-days-of-Week="[]"
68
+ :format="'yyyy-MM-dd HH:mm:ss'" :show-reset-button="reset" readonly="readonly">
69
+ </datepicker>
70
+ </div>
71
+
72
+ <div style="float: left;width:60%" class="form-group" v-if="!show && row.type == 'number'"
73
+ v-show="row.isshow">
74
+ <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value"
75
+ onkeyup="value=value.replace(/[^\d\.-]/g,'')" :readonly="row.readonly">
76
+ </div>
77
+ <!--<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">-->
78
+ <!--<input type="text" class="form-control" v-model="meternum" v-if="!show && row.type == 'string' && row.f_project == '表号' " :disabled="(!(ischecked == '有')) || issee" :readonly="issee" >-->
79
+ <!--<button type="button" name="button" class="btn btn-primary" @click="scan" v-if="!show && row.f_project == '表号' ">扫码</button>-->
80
+ <input-select v-if="row.type == 'inputSelector'" v-show="row.isshow" :value.sync="row.selected"
81
+ v-model="row.selected" :readonly="false" :options="row.options" @change="changse"
82
+ @click="transelation(idxs)"></input-select>
83
+ <v-select style="float: left" :value.sync="row.selected" v-model="row.selected"
84
+ v-if="row.type == 'selector'" :search="false" v-show="row.isshow" placeholder='请选择'
85
+ :options="row.options" :disabled="role == 'androidview' || row.readonly" @change="changse"
86
+ @click="transelation(idxs)" :multiple="row.multiple" :close-on-select="!row.multiple"
87
+ clear-button></v-select>
88
+ <div style="float: left;width: 30%" class="form-group" v-if="!show && row.type == 'radio'">
89
+ <div class="col-xs-6 col-sm-6 col-md-6" v-for="item in row.options">
90
+ <!-- <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" >-->
91
+ <input type="radio" :name="row.f_item_name" :value="item.value"
92
+ :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value">
93
+ <span>{{ item.label }}</span>
94
+ </div>
95
+ </div>
96
+ <div v-if="!show && row.type == 'checkbox'" class="col-xs-12 col-sm-12 col-md-12"
97
+ style="white-space: nowrap">
98
+ <div style="float: left" v-for="item in row.options">
99
+ <input type="checkbox" :name="row.f_item_name" :value="item.value"
100
+ :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value">
101
+ <span>{{ item.label }}</span>
102
+ </div>
103
+ </div>
104
+ <div style="clear: both">
105
+ <label v-if="row.f_item_value.indexOf('其他') > -1" class="fivelabel">其他</label>
106
+ <div style="float: left;width:60%" class="form-group" v-if="row.f_item_value.indexOf('其他') > -1">
107
+ <input type="text" class="form-control" maxlength="100" v-model="row.f_else"
108
+ :readonly="role == 'androidview' || row.readonly">
109
+ </div>
110
+ </div>
111
+ <div style="clear: both">
112
+ <!-- <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) " >-->
113
+ <!-- <label class="fivelabel">现场已处理</label>-->
114
+ <!-- <v-select :value="row.f_live_dispose"-->
115
+ <!-- :value-single="true"-->
116
+ <!-- :options="lives"-->
117
+ <!-- :disabled="role == 'androidview'"-->
118
+ <!-- @change="changlive"-->
119
+ <!-- @click="transelation(idxs)"-->
120
+ <!-- close-on-select clear-button></v-select>-->
121
+ <!-- </div>-->
122
+ <div class="form-group" style="display: flex;flex-wrap: wrap"
123
+ v-if="(row.type == 'selector' || row.type == 'radio' || row.type == 'checkbox') && (row.f_path != '' || row.f_is_defect != '') && (dealdispose == 'true' || dealdispose == true)">
124
+ <label class="fivelabel">处理方式</label>
125
+ <v-select :value="row.f_deal_dispose" :value-single="true" :options="deals"
126
+ :disabled="role == 'androidview'" @change="changdeal" @click="transelation(idxs)" close-on-select
127
+ clear-button>
128
+ </v-select>
129
+ </div>
130
+ <div style="display: flex;flex-wrap: wrap" v-if="row.f_deal_dispose == '自行处理' && this.showZXTime">
131
+ <label class="fivelabel">处理时效:</label>
132
+ <datepicker :value.sync="row.f_handle_date" v-model="row.f_handle_date"
133
+ :format="'yyyy-MM-dd 00:00:00'" placeholder="请选择" style="width: 60%">
134
+ </datepicker>
135
+ </div>
136
+ <div style="margin-left: 10px" class="form-group col-sm-10"
137
+ v-if="(row.type == 'selector' || row.type == 'radio' || row.type == 'checkbox') && row.tooltip != undefined && row.tooltip != ''">
138
+ ☆{{ row.tooltip }}
139
+ </div>
140
+ <div class="form-group col-sm-12" style="display: flex;flex-wrap: wrap"
141
+ v-if="(row.type == 'selector' || row.type == 'radio' || row.type == 'checkbox') && (row.f_path != '' || row.f_is_defect != '')">
142
+ <div class="auto" style="margin:1px;">
143
+ <div class="panel">
144
+ <div class="panel-body panel-self"
145
+ style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
146
+ <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
147
+ <div class="col-sm-4" v-show="row.f_path">
148
+ <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
149
+ </div>
150
+ <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name)">
151
+ <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
152
+ </div>
153
+ <img v-show="row.f_path" src="../../../assets/remove.png" :class="style__"
154
+ @click="delfile(idxs, row.f_path)" v-if="role != 'androidview'"
155
+ style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
156
+ </div>
157
+ </div>
158
+ </div>
159
+ </div>
160
+ <!--多张隐患照片-->
161
+ <div class="auto" v-for="itemIndex in hiddenDangerImgNumber" style="margin: 1px;">
162
+ <div class="panel">
163
+ <div class="panel-body panel-self"
164
+ style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
165
+ <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
166
+ <div class="col-sm-4" v-show="row['f_p' + (itemIndex + 1) + '_path']">
167
+ <img-self :src="row['f_p' + (itemIndex + 1) + '_path']" :alt="row.f_item_name" width="140"
168
+ height="140"></img-self>
169
+ </div>
170
+ <div class="col-sm-4" v-show="!row['f_p' + (itemIndex + 1) + '_path']"
171
+ @click="takePic(idxs, row.f_item_name, 'f_p' + (itemIndex + 1) + '_path')">
172
+ <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
173
+ </div>
174
+ <img v-show="row['f_p' + (itemIndex + 1) + '_path']" src="../../../assets/remove.png"
175
+ :class="style__"
176
+ @click="delfile(idxs, row['f_p' + (itemIndex + 1) + '_path'], 'f_p' + (itemIndex + 1) + '_path')"
177
+ v-if="role != 'androidview'"
178
+ style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
179
+ </div>
180
+ </div>
181
+ </div>
182
+ </div>
183
+ <div style="display: flex;flex-wrap: wrap;margin-top: 10px"
184
+ v-if="row.f_deal_dispose == '现场整改' && (row.type == 'selector' || row.type == 'radio' || row.type == 'checkbox') && this.showXCImg">
185
+ <label class="fivelabel">整改照片:</label>
186
+ <div class="auto" style="margin:1px;">
187
+ <div class="panel">
188
+ <div class="panel-body panel-self"
189
+ style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
190
+ <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
191
+ <div class="col-sm-4" v-show="row.f_repair_path">
192
+ <img-self :src="row.f_repair_path" :alt="row.f_item_name" width="140"
193
+ height="140"></img-self>
194
+ </div>
195
+ <div class="col-sm-4" v-show="!row.f_repair_path"
196
+ @click="takePic(idxs, row.f_item_name, 'f_repair_path', row.f_defect_level)">
197
+ <img src="../../../assets/tackpic.png" alt="点击拍摄照片" width="140" height="140"></img>
198
+ </div>
199
+ <img v-show="row.f_repair_path" src="../../../assets/remove.png" :class="style__"
200
+ @click="delfile(idxs, row.f_repair_path, 'f_repair_path')" v-if="role != 'androidview'"
201
+ style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
202
+ </div>
203
+ </div>
204
+ </div>
205
+ </div>
206
+ </div>
207
+ </div>
208
+ </div>
209
+
210
+ <!--<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 != '气表品牌'"-->
211
+ <!--&gt;</v-select>-->
212
+ <!--<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 == '气表品牌'"-->
213
+ <!--&gt;</v-select>-->
214
+ <!-- <div class="auto" v-if="!show && row.type == 'checkbox' ">-->
215
+ <!-- <input class="magic-checkbox" type="checkbox" id="shebeicheckbox"-->
216
+ <!-- :checked="row.f_content == '有'"-->
217
+ <!-- @click="switchDetails(row.f_project, $event)" :disabled="issee"/>-->
218
+ <!-- <label for="shebeicheckbox" style="width:150px;padding-bottom: 10px">{{row.f_project}}</label>-->
219
+ <!-- </div>-->
220
+ <!--<img-area :model="Detail.imgs" :sutitle="row.f_project" v-if="row.type == 'picture'" :disabled="issee"></img-area>-->
221
+ </div>
222
+ </div>
223
+ </div>
224
+ <div style="border-top: 1px solid #D4D4D4"></div>
225
+ </div>
226
+ </div>
227
+ </div>
228
+ </template>
229
+ <script>
230
+ import Vue from 'vue'
231
+ import * as Util from '../../Util'
232
+
233
+ export default {
234
+ title: '维修列表信息',
235
+ data() {
236
+ return {
237
+ // telphoneValid: '/^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$/',
238
+ // meterstyle:[],
239
+ hiddenDangerImgNumber: 0,//隐患图片数
240
+ shuclass: 'col-xs-12 col-sm-12 col-md-12 form-input-group mg8',
241
+ shuclass1: 'col-xs-12 col-sm-12 col-md-12 mg8',
242
+ // labels:[],
243
+ meternum: '',
244
+ ischecked: '有',
245
+ gasmodel: '',
246
+ textstyle: 'color: red',
247
+ paper: this.$parent.$parent.data,
248
+ f_items: [],
249
+ page: {},
250
+ selectindex: null,
251
+ lives: [{ label: '是', value: '是' }, { label: '否', value: '否' }],
252
+ deals: [{ label: '现场处理', value: '现场处理' }, { label: '自行处理', value: '自行处理' }],
253
+ f_live_dispose: '否',
254
+ f_deal_dispose: '未处理',
255
+ // 初始表底
256
+ f_initial_base: {},
257
+ // 气量异常差值 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
258
+ f_gas_aberrant_number: {},
259
+ // 金额异常差值 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
260
+ f_fee_aberrant_number: {},
261
+ // 累购气量
262
+ f_total_gas: {},
263
+ // 累购金额
264
+ f_total_fee: {},
265
+ // 已用气量
266
+ f_table_base: {},
267
+ // 已用金额
268
+ f_fee_base: {},
269
+ // 剩余气量
270
+ f_gas_balance: {},
271
+ f_meter_base2: {},
272
+ // 剩余金额
273
+ f_fee_balance: {},
274
+ // 表端剩余金额
275
+ f_table_balance: {},
276
+ // 气量异常差值允许误差
277
+ //物联网表数据存储
278
+ // 表底异常
279
+ f_total_biaodi: {},
280
+ f_table_biaodi: {},
281
+ f_biaodi_number: {},
282
+ //物联网表数据存储
283
+ f_balance_amount: {},//物联网表剩余金额
284
+ f_meter_base: {},//物联网表读数
285
+ f_balance_amount1: {},//物联网表现场录入的表上剩余金额
286
+ f_meter_base1: {},//物联网表现场录入的表字轮数
287
+ f_meter_aberrant_number1: {},//物联网表 表数异常差值
288
+ f_fee_aberrant_number1: {},//物联网 表金额异常差值
289
+ gasDeviation: (
290
+ function (_this) {
291
+ let deviation = _this.$appdata.getSingleValue('气量异常差值允许误差')
292
+ if (deviation && !isNaN(deviation)) {
293
+ return deviation
294
+ } else {
295
+ return 0
296
+ }
297
+ }
298
+ )(this),
299
+ // 金额异常差值允许误差
300
+ feeDeviation: (
301
+ function (_this) {
302
+ let deviation = _this.$appdata.getSingleValue('金额异常差值允许误差')
303
+ if (deviation && !isNaN(deviation)) {
304
+ return deviation
305
+ } else {
306
+ return 0
307
+ }
308
+ }
309
+ )(this),
310
+ // 字轮异常差值允许误差
311
+ meterbase: (
312
+ function (_this) {
313
+ let deviation = _this.$appdata.getSingleValue('字轮异常差值允许误差')
314
+ if (deviation && !isNaN(deviation)) {
315
+ return deviation
316
+ } else {
317
+ return 0
318
+ }
319
+ }
320
+ )(this),
321
+ showElse: false, //控制其他选项是否显示
322
+ showXCImg: false, // 是否显示现场整改拍照选项
323
+ showZXTime: false // 是否显示自行整改处理时效
324
+ }
325
+ },
326
+ props: ['config', 'device', 'idx', 'operation', 'role'],
327
+ // props: {
328
+ // // 维修对应的用户数据收集
329
+ // model: {
330
+ // type: Object
331
+ // },
332
+ // service:{
333
+ // type: Object
334
+ // },
335
+ // show: {
336
+ // type: Boolean,
337
+ // default: false
338
+ // },
339
+ // repairitem:{
340
+ // type: Object
341
+ // },
342
+ // shutype:'heng',
343
+ // tabs:{
344
+ // type: Object
345
+ // },
346
+ // repairdetails:{
347
+ // type: Object
348
+ // },
349
+ // faultshow:{
350
+ // type: Object
351
+ // },
352
+ // issee:''
353
+ // },
354
+ methods: {
355
+ changse(val) {
356
+ if (val == undefined) {
357
+ return
358
+ }
359
+ if (this.selectindex != null) {
360
+ if (this.f_items[this.selectindex].type == 'selector') {
361
+ this.f_items[this.selectindex].f_item_value = val
362
+ } else if (this.f_items[this.selectindex].type == 'inputSelector') {
363
+ this.f_items[this.selectindex].f_item_value = val.target.value
364
+ }
365
+ }
366
+ },
367
+ changlive(val) {
368
+ if (val == undefined) {
369
+ return
370
+ }
371
+ if (this.selectindex != null) {
372
+ this.f_items[this.selectindex].f_live_dispose = val
373
+ }
374
+ },
375
+ changdeal(val) {
376
+ if (val == undefined) {
377
+ return
378
+ }
379
+ if (this.selectindex != null) {
380
+ this.f_items[this.selectindex].f_deal_dispose = val
381
+ }
382
+ },
383
+ switchDetails(detailsType, event) {
384
+ if (event.srcElement.checked) {
385
+ for (var i = 0; i < this.Detail.details.length; i++) {
386
+ if (this.Detail.details[i].f_project == detailsType) {
387
+ this.Detail.details[i].f_content = '有'
388
+ this.ischecked = '有'
389
+ return
390
+ }
391
+ }
392
+ } else {
393
+ this.Detail.imgs = []
394
+ for (var i = 0; i < this.Detail.details.length; i++) {
395
+ if (this.Detail.details[i].f_project == detailsType) {
396
+ this.Detail.details[i].f_content = '无'
397
+ this.ischecked = '无'
398
+ } else {
399
+ this.Detail.details[i].f_content = ''
400
+ }
401
+ }
402
+ }
403
+ },
404
+ getgasmodel(val) {
405
+ this.gasmodel = val
406
+ },
407
+ getradios(val, flag) {
408
+ let Reoptions = []
409
+ for (let i = 0; i < this.repairdetails.length; i++) {
410
+ var t = false
411
+ if (this.repairdetails[i].f_type == this.repairitem.header) {
412
+ for (var j = 0; j < this.repairdetails[i].details.length; j++) {
413
+ if (this.repairdetails[i].details[j].f_project == val) {
414
+ Reoptions = this.repairdetails[i].details[j].options
415
+ t = true
416
+ break
417
+ }
418
+ }
419
+ }
420
+ if (t) {
421
+ break
422
+ }
423
+ }
424
+ for (let j = 0; j < Reoptions.length; j++) {
425
+ if (Reoptions[j].data == flag) {
426
+ for (var e = 0; e < this.Detail.details.length; e++) {
427
+ if (this.Detail.details[e].f_project == val) {
428
+ this.Detail.details[e].f_status = Reoptions[j].f_status
429
+ return
430
+ }
431
+ }
432
+ break
433
+ }
434
+ }
435
+ },
436
+ deletedetails() {
437
+ this.$showMessage('该操作会删除所填信息,是否继续!', ['confirm', 'cancel']).then((res) => {
438
+ if (res === 'confirm') {
439
+ for (var i = 0; i < this.tabs.length; i++) {
440
+ if (this.tabs[i].number == this.repairitem.number) {
441
+ this.tabs.splice(i, 1)
442
+ this.model.servicerepair.splice(this.repairitem.number, 1)
443
+ for (let t = i; t < this.tabs.length; t++) {
444
+ this.tabs[t].number -= 1
445
+ }
446
+ return
447
+ }
448
+ }
449
+ }
450
+ })
451
+ },
452
+ takePic(prop, title, pathname = 'null') {
453
+ if (this.role == 'androidview') {
454
+ return
455
+ }
456
+ const obj = HostApp.getGpsDetailAddress()
457
+ HostApp.__callback__ = this.cameraCallBack
458
+ HostApp.__this__ = this
459
+ //tag
460
+ let fileName
461
+ if (pathname == 'null') {
462
+ if (!this.f_items[prop].f_path || this.f_items[prop].f_path.includes("nopic.png")) {
463
+ fileName = Util.guid() + '-' + 'device' + this.device.n + '-' + this.idx + '-' + 'f_items' + prop + '.jpg'
464
+ } else {
465
+ fileName = Util.getFileName(this.f_items[prop].f_path)
466
+ }
467
+ } else {
468
+ if (!this.f_items[prop][pathname] || this.f_items[prop][pathname].includes("nopic.png")) {
469
+ fileName = Util.guid() + '-' + 'device' + this.device.n + '-' + this.idx + '-' + 'f_items' + prop + '.jpg'
470
+ } else {
471
+ fileName = Util.getFileName(this.f_items[prop][pathname])
472
+ }
473
+ }
474
+ let jingweidu = ''
475
+ if (this.$parent.$parent.is_has_jingweidu == 'true') {
476
+ jingweidu = '\t经度:' + obj.longitude + '\t纬度:' + obj.latitude
477
+ }
478
+ //tag
479
+ //tag
480
+ HostApp._open_a_page({
481
+ type: 'boomerang',
482
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
483
+ param: { file: fileName, requestCode: 111, callback: 'javascript:HostApp.__callback__("' + prop + '","' + title + '", "%s","' + pathname + '");', watermark: title + '\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name + jingweidu }
484
+ })
485
+ },
486
+ cameraCallBack(prop, title, fileName, pathname) {
487
+ //tag
488
+ if (pathname == 'null') {
489
+ //tag
490
+ HostApp.__this__.$set('f_items[' + prop + '].f_path', fileName + '?' + Math.random())
491
+ //tag
492
+ HostApp.__callback__ = null
493
+ HostApp.__this__ = null
494
+ } else {
495
+ //tag
496
+ //tag)
497
+ HostApp.__this__.$set('f_items[' + prop + '].' + pathname + '', fileName + '?' + Math.random())
498
+ HostApp.__callback__ = null
499
+ HostApp.__this__ = null
500
+ }
501
+ if (this.f_items[prop].is_verification) {
502
+ let path = fileName.replace('http://newimg', '')
503
+ path = path.replace('file://', '')
504
+ console.log('fileName', fileName)
505
+ console.log(path)
506
+ let res = HostApp.pictureVerificationAI(path, title)
507
+ if (res.code == 200) {
508
+ if (res.type_result) {
509
+ // this.$showMessage("检测通过,当前照片为"+title)
510
+ this.f_items[prop].verification_text = `检测通过,当前照片为 ${title}`
511
+ this.f_items[prop].verification_state = 'pass'
512
+ } else {
513
+ // this.$showMessage("检测失败,未识别到当前照片为 "+title+",请重新拍摄!")
514
+ this.f_items[prop].verification_text = `检测失败,未识别到当前照片为'${title}',请重新拍摄!`
515
+ this.f_items[prop].verification_state = 'npass'
516
+ }
517
+ } else {
518
+ // this.$showMessage("检测失败,请重试!")
519
+ this.f_items[prop].verification_text = `检测失败,请重试!`
520
+ this.f_items[prop].verification_state = 'npass'
521
+ }
522
+ }
523
+ },
524
+ delfile(prop, fileName, pathname = 'null') {
525
+ if (pathname == 'null') {
526
+ //tag
527
+ //tag)
528
+ if (fileName == Vue.nopic) {
529
+ return
530
+ } else {
531
+ HostApp.delfile(fileName)
532
+ this.f_items[prop].f_path = Vue.nopic
533
+ }
534
+ } else {
535
+ //tag
536
+ //tag)
537
+ if (fileName == Vue.nopic) {
538
+ return
539
+ } else {
540
+ HostApp.delfile(fileName)
541
+ this.f_items[prop][pathname] = Vue.nopic
542
+ }
543
+ }
544
+ },
545
+ adddetails() {
546
+ // 下标作为序号,取值用。 增加 序号得依次增加
547
+ if (this.tabs.length > 0) {
548
+ for (let i = this.tabs.length - 1; i > 0; i--) {
549
+ if (this.tabs[i].header == this.repairitem.header) {
550
+ if (this.model.servicerepair.length > 0) {
551
+ for (let j = this.model.servicerepair.length - 1; j > -1; j--) {
552
+ if (this.model.servicerepair[j].f_type == this.repairitem.header) {
553
+ this.model.servicerepair.splice(j + 1, 0, Object.assign({}, JSON.parse(JSON.stringify(this.tabs[i].details))))
554
+ this.tabs.splice(i + 1, 0, { header: `${this.repairitem.header}`, details: this.tabs[i].details, complete: 'repair-details', class: 'repair-details-class', number: j + 1, items: this.tabs[i].items })
555
+ for (let t = i + 2; t < this.tabs.length; t++) {
556
+ this.tabs[t].number += 1
557
+ }
558
+ this.faultshow.number += this.faultshow.number + 1
559
+ return
560
+ }
561
+ }
562
+ }
563
+ }
564
+ }
565
+ }
566
+ },
567
+ transelation(val) {
568
+ this.selectindex = val
569
+ },
570
+ towatch() {
571
+ for (let n in this.f_items) {
572
+ if (typeof this.f_items[n] == 'function') {
573
+ continue
574
+ }
575
+ if (this.f_items[n].type == 'selector' || this.f_items[n].type == 'inputSelector') {
576
+ // 监听下拉框,如果有隐患,需要拍照
577
+ this.$watch('f_items[' + n + '].selected', function (val, old) {
578
+ if (val == old) {
579
+ return
580
+ }
581
+ // 下拉框值
582
+ //tag)
583
+ // 下拉框所属设备
584
+ //tag
585
+ // 下拉框所属项
586
+ //tag
587
+ if (val == undefined || val.length == 0 || val[0] == '') {
588
+ this.f_items[n].f_path = ''
589
+ this.f_items[n].f_is_defect = ''
590
+ this.f_items[n].f_defect_level = ''
591
+ this.f_items[n].f_live_dispose = ''
592
+ this.f_items[n].f_deal_dispose = ''
593
+ this.f_items[n].tooltip = ''
594
+ this.f_items[n].f_else = ''
595
+ return
596
+ }
597
+ let shImage = false
598
+ if (val.indexOf('其他') == -1) {
599
+ this.f_items[n].f_else = ''
600
+ }
601
+ // if(this.config[this.device.device].items[item].type == 'selector'){
602
+ // this.f_items[n].f_item_value = val
603
+ // }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
604
+ // this.f_items[n].f_item_value = val[0]
605
+ // }
606
+ // 在配置中查找该项
607
+ for (let item in this.config[this.device.device].items) {
608
+ if (typeof this.config[this.device.device].items[item] == 'function') {
609
+ continue
610
+ }
611
+ let type = this.config[this.device.device].items[item].type
612
+ let multiple = this.config[this.device.device].items[item].multiple ? this.config[this.device.device].items[item].multiple : false
613
+ let options = this.config[this.device.device].items[item].options
614
+ 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) {
615
+ for (let i in options) {
616
+ if (typeof options[i] == 'function') {
617
+ continue
618
+ }
619
+ let value
620
+ if (this.config[this.device.device].items[item].type == 'selector' && this.config[this.device.device].items[item].multiple == false) {
621
+ value = val[0]
622
+ } else if (this.config[this.device.device].items[item].type == 'inputSelector') {
623
+ value = val
624
+ }
625
+ //tag)
626
+ // 如果未选择,清空图片、隐患信息等
627
+ if ((type == 'selector' && val.length == 0) || (type == 'inputSelector' && val == '')) {
628
+ this.f_items[n].f_path = ''
629
+ this.f_items[n].f_is_defect = ''
630
+ this.f_items[n].f_defect_level = ''
631
+ this.f_items[n].f_live_dispose = ''
632
+ this.f_items[n].f_deal_dispose = ''
633
+ this.f_items[n].tooltip = ''
634
+ }
635
+ 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)) {
636
+ // 找到选中的项了
637
+ //tag
638
+ if (options[i].isdefect == true) {
639
+ shImage = true
640
+ }
641
+ if (options[i].isdefect == false || this.f_items[n].f_item_value == '') {
642
+ shImage = false
643
+ }
644
+ //tag
645
+ if (shImage) {
646
+ this.f_items[n].f_is_defect = true
647
+ this.f_items[n].f_defect_level = options[i].level
648
+ this.f_items[n].f_path = Vue.nopic
649
+ this.f_items[n].f_live_dispose = '否'
650
+ this.f_items[n].f_deal_dispose = '未处理'
651
+ //tag
652
+ this.f_items[n].tooltip = options[i].tooltip
653
+ } else {
654
+ this.f_items[n].f_path = ''
655
+ this.f_items[n].f_is_defect = ''
656
+ this.f_items[n].f_defect_level = ''
657
+ this.f_items[n].f_live_dispose = ''
658
+ this.f_items[n].f_deal_dispose = ''
659
+ this.f_items[n].tooltip = ''
660
+ }
661
+ }
662
+ }
663
+ }
664
+ }
665
+ }
666
+ )
667
+ // this.$watch('other',function(val){
668
+ // //tag
669
+ // if(this.selectindex != null) {
670
+ // let index = this.f_items[this.selectindex].f_item_value.indexOf('其他')
671
+ // if(index > -1){
672
+ // this.f_items[this.selectindex].f_item_value.splice(index,1,this.other)
673
+ // }
674
+ // }
675
+ //
676
+ // })
677
+ } else if (this.f_items[n].type == 'radio') {
678
+ // 监听单选框,如果有隐患,需要拍照
679
+ this.$watch('f_items[' + n + '].f_item_value', function (val) {
680
+ //tag)
681
+ let options = this.f_items[n].options
682
+ //tag)
683
+ for (let i = 0; i < options.length; i++) {
684
+ //tag)
685
+ // 找到选中的项了
686
+ if (options[i].value == val) {
687
+ // 如果有隐患,拍图片
688
+ if (options[i].isdefect) {
689
+ this.f_items[n].f_is_defect = true
690
+ this.f_items[n].f_defect_level = options[i].level
691
+ this.f_items[n].f_path = Vue.nopic
692
+ this.f_items[n].f_live_dispose = '否'
693
+ this.f_items[n].f_deal_dispose = '未处理'
694
+ this.f_items[n].tooltip = options[i].tooltip
695
+ //tag)
696
+ return
697
+ }
698
+ }
699
+ }
700
+ this.f_items[n].f_path = ''
701
+ this.f_items[n].f_is_defect = ''
702
+ this.f_items[n].f_defect_level = ''
703
+ this.f_items[n].f_live_dispose = ''
704
+ this.f_items[n].f_deal_dispose = ''
705
+ this.f_items[n].tooltip = ''
706
+ })
707
+ } else if (this.f_items[n].type == 'checkbox') {
708
+ // 监听单选框,如果有隐患,需要拍照
709
+ this.$watch('f_items[' + n + '].f_item_value', function (val) {
710
+ //tag)
711
+ // 如果是手动赋值,不执行下面逻辑
712
+ if (this.f_items[n].isReSet) {
713
+ this.f_items[n].isReSet = false
714
+ return
715
+ }
716
+ let options = this.f_items[n].options
717
+ //tag)
718
+ // 取出选中项中有隐患的详细信息
719
+ let selected = options.filter(item => { return val.indexOf(item.value) != -1 && item.isdefect })
720
+
721
+ if (selected.length > 0) {
722
+ // 防止赋值无限调用
723
+ this.f_items[n].isReSet = true
724
+ let selectList = selected.map(item => { return item.value })
725
+ // 如果选中的是非隐患项,取消选中isdefect为true的
726
+ if (selectList.indexOf(val[val.length - 1]) == -1) {
727
+ this.f_items[n].f_item_value = val.filter(item => { return selectList.indexOf(item) == -1 })
728
+ this.f_items[n].f_path = ''
729
+ this.f_items[n].f_is_defect = ''
730
+ this.f_items[n].f_defect_level = ''
731
+ this.f_items[n].f_live_dispose = ''
732
+ this.f_items[n].f_deal_dispose = ''
733
+ this.f_items[n].tooltip = ''
734
+ return
735
+ }
736
+ // 如果选中的是隐患项,取消选中isdefect为false的
737
+ this.f_items[n].f_item_value = selectList
738
+ // 如果第一次选择隐患项,初始化
739
+ if (!this.f_items[n].f_is_defect) {
740
+ this.f_items[n].f_is_defect = true
741
+ this.f_items[n].f_defect_level = selected[0].level
742
+ this.f_items[n].f_path = Vue.nopic
743
+ this.f_items[n].f_live_dispose = '否'
744
+ this.f_items[n].f_deal_dispose = '未处理'
745
+ //tag
746
+ this.f_items[n].tooltip = selected[0].tooltip
747
+ }
748
+ //tag)
749
+ return
750
+ }
751
+ this.f_items[n].f_path = ''
752
+ this.f_items[n].f_is_defect = ''
753
+ this.f_items[n].f_defect_level = ''
754
+ this.f_items[n].f_live_dispose = ''
755
+ this.f_items[n].f_deal_dispose = ''
756
+ this.f_items[n].tooltip = ''
757
+ })
758
+ }
759
+ }
760
+ //tag)
761
+ },
762
+ getbiaodinumber() {
763
+ //tag
764
+ if (this.f_items[this.f_table_biaodi.index].f_item_value < 0) {
765
+ this.$showMessage('表底数不能为负数')
766
+ return
767
+ }
768
+ // 先清空
769
+ this.f_items[this.f_biaodi_number.index].f_item_value = null
770
+ this.f_items[this.f_biaodi_number.index].f_is_defect = null
771
+ //tag
772
+ // 只有两个值都填了才会计算
773
+ if (!this.f_items[this.f_table_biaodi.index].f_item_value) {
774
+ return
775
+ }
776
+ //tag
777
+ // 计算公式 => 表底异常差值= 本次表底- 上次表底
778
+ this.f_items[this.f_biaodi_number.index].f_item_value = this.f_items[this.f_table_biaodi.index].f_item_value - this.f_items[this.f_total_biaodi.index].f_item_value
779
+ this.f_items[this.f_biaodi_number.index].f_item_value = this.f_items[this.f_biaodi_number.index].f_item_value.toFixed(3)
780
+ if (isNaN(this.f_items[this.f_biaodi_number.index].f_item_value)) {
781
+ this.f_items[this.f_biaodi_number.index].f_item_value = null
782
+ }
783
+ // 计算差值是否在范围内
784
+ // if (this.f_items[this.f_biaodi_number.index].f_item_value< 0){
785
+ // this.f_items[this.f_biaodi_number.index].f_is_defect = true
786
+ // }
787
+
788
+ //tag)
789
+ },
790
+ getGasAberrantNumber(val) {
791
+ //tag
792
+ if (!this.f_table_base.index || !this.f_gas_balance.index) {
793
+ //tag
794
+ return
795
+ }
796
+ // 先清空
797
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
798
+ this.f_items[this.f_gas_aberrant_number.index].f_is_defect = false
799
+ if (val == '已用气量') {
800
+ //剩余气量 = 累购-已用
801
+ this.f_items[this.f_gas_balance.index].f_item_value = this.f_items[this.f_total_gas.index].f_item_value - this.f_items[this.f_table_base.index].f_item_value
802
+ if (isNaN(this.f_items[this.f_gas_balance.index].f_item_value)) {
803
+ this.f_items[this.f_gas_balance.index].f_item_value = null
804
+ }
805
+ }
806
+
807
+ // 只有两个值都填了才会计算
808
+ if (!this.f_items[this.f_table_base.index].f_item_value || !this.f_items[this.f_gas_balance.index].f_item_value) {
809
+ return
810
+ }
811
+ //tag)
812
+ //tag
813
+ //tag
814
+
815
+ // 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
816
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_total_gas.index].f_item_value - this.f_items[this.f_gas_balance.index].f_item_value - (this.f_items[this.f_table_base.index].f_item_value - (this.f_initial_base.index ? this.f_items[this.f_initial_base.index].f_item_value : 0))
817
+ 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)
818
+ // 如果数值有误,清空结果s
819
+ if (isNaN(this.f_items[this.f_gas_aberrant_number.index].f_item_value)) {
820
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
821
+ }
822
+ //tag ===> ' + Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value))
823
+ //tag ===> ' + JSON.stringify(Number(this.gasDeviation)))
824
+ // 计算差值是否在范围内
825
+ if (Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) > Number(this.gasDeviation) || Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) < Number(this.gasDeviation) * -1) {
826
+ this.f_items[this.f_gas_aberrant_number.index].f_is_defect = true
827
+ this.f_items[this.f_gas_aberrant_number.index].f_deal_dispose = '未处理'
828
+ } else {
829
+ this.f_items[this.f_gas_aberrant_number.index].f_is_defect = null
830
+ this.f_items[this.f_gas_aberrant_number.index].f_deal_dispose = null
831
+ }
832
+
833
+ //tag)
834
+ },
835
+ getFeeAberrantNumber(val) {
836
+ //tag
837
+ // 只有两个值都填了才会计算
838
+ if (!this.f_fee_base.index || !this.f_fee_balance.index) {
839
+ //tag
840
+ return
841
+ }
842
+ // 先清空
843
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
844
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
845
+
846
+ if (val == '已用金额') {
847
+ this.f_items[this.f_fee_balance.index].f_item_value = (this.f_items[this.f_total_fee.index].f_item_value - this.f_items[this.f_fee_base.index].f_item_value).toFixed(3)
848
+ if (isNaN(this.f_items[this.f_fee_balance.index].f_item_value)) {
849
+ this.f_items[this.f_fee_balance.index].f_item_value = null
850
+ }
851
+ }
852
+
853
+ if (!this.f_items[this.f_fee_base.index].f_item_value || !this.f_items[this.f_fee_balance.index].f_item_value) {
854
+ return
855
+ }
856
+
857
+ // 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
858
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_total_fee.index].f_item_value - this.f_items[this.f_fee_balance.index].f_item_value - this.f_items[this.f_fee_base.index].f_item_value
859
+ 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)
860
+ if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
861
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
862
+ }
863
+ //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
864
+ //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
865
+ // 计算差值是否在范围内
866
+ if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
867
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
868
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = '未处理'
869
+ } else {
870
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = null
871
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = null
872
+ }
873
+
874
+ //tag)
875
+ },
876
+ // 计算剩余金额和剩余金额差值
877
+ getFeeAberrantNumber2(val) {
878
+ //tag
879
+ // 只有两个值都填了才会计算
880
+ if (!this.f_table_balance.index || !this.f_fee_balance.index) {
881
+ //tag
882
+ return
883
+ }
884
+ // 先清空
885
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
886
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
887
+
888
+ // 计算公式 => 金额异常差值 = 系统剩余金额 - 表端剩余金额
889
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_balance.index].f_item_value - this.f_items[this.f_table_balance.index].f_item_value
890
+ 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)
891
+ if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
892
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
893
+ }
894
+ //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
895
+ //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
896
+ // 计算差值是否在范围内
897
+ if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
898
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
899
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = '未处理'
900
+ } else {
901
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = null
902
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = null
903
+ }
904
+ console.log('--------------------------------')
905
+ console.log(this.f_items[this.f_fee_aberrant_number.index].f_item_value)
906
+
907
+ //tag)
908
+ },
909
+ deviceOverdueDefect(index, device) {
910
+ let i = 0
911
+ if (device == '燃气灶') {
912
+ i = this.f_stove.index
913
+ } else if (device == '壁挂炉') {
914
+ i = this.f_wall.index
915
+ } else if (device == '热水器') {
916
+ i = this.f_water.index
917
+ } else {
918
+ return
919
+ }
920
+ try {
921
+ let value = parseInt(this.f_items[index].f_item_value.substring(0, 4))
922
+ if (new Date().getFullYear() - value > 8) {
923
+ this.f_items[i].f_is_defect = true
924
+ this.f_items[i].f_item_value = '是'
925
+ this.f_items[i].f_is_repaired = '已告知'
926
+ this.f_items[i].f_deal_dispose = '自行处理'
927
+ } else {
928
+ this.f_items[i].f_is_defect = null
929
+ this.f_items[i].f_item_value = '否'
930
+ this.f_items[i].f_is_repaired = null
931
+ this.f_items[i].f_deal_dispose = null
932
+ }
933
+ } catch (e) {
934
+ this.f_items[i].f_is_defect = null
935
+ this.f_items[i].f_is_repaired = null
936
+ }
937
+ console.log('this.f_items=', JSON.stringify(this.f_items))
938
+ },
939
+ //物联网表字轮数改变触发
940
+ getmeteraberrantnumber() {
941
+ //tag
942
+
943
+ // 先清空
944
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
945
+ this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = false
946
+ //tag
947
+ // 只有两个值都填了才会计算
948
+ if (!this.f_items[this.f_meter_base.index].f_item_value || !this.f_items[this.f_meter_base1.index].f_item_value) {
949
+ return
950
+ }
951
+ //tag
952
+ // 计算公式 => 表数异常差值= - 字轮数 - 后台表读数
953
+ 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
954
+ 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)
955
+ if (isNaN(this.f_items[this.f_meter_aberrant_number1.index].f_item_value)) {
956
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
957
+ }
958
+ //tag ===> ' + Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value))
959
+ // 计算差值是否在范围内
960
+ //tag)
961
+ if (Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value) > Number(this.meterbase)) {
962
+ this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = true
963
+ }
964
+
965
+ //tag)
966
+ },
967
+
968
+ disSelect(index, itemValue) {
969
+ //tag)
970
+ //tag)
971
+ if (this.f_items[index].f_item_value == itemValue) {
972
+ this.$set(`f_items[${index}].f_item_value`, '')
973
+ }
974
+ },
975
+ prepare() {
976
+ ['config', 'device', 'idx', 'operation', 'role']
977
+ this.hiddenDangerImgNumber = 2
978
+ //创建页面所需数据
979
+ this.$set('piece', this.paper['device' + this.device.n][this.idx])
980
+ //tag)
981
+ //f_deal_dispose f_handle_date
982
+ let n = 0
983
+ for (let item in this.config[this.device.device].items) {
984
+ if (typeof this.config[this.device.device].items[item] == 'function') {
985
+ continue
986
+ }
987
+ let index = item
988
+ this.$set('page.options' + index, [])
989
+ //tag)
990
+ //tag)
991
+ //tag)
992
+ // 先根据配置组接页面
993
+ let f_item_value
994
+ if (this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'checkbox') {
995
+ f_item_value = []
996
+ // 判断选项的默认值
997
+ for (let defitem in this.config[this.device.device].items[item].options) {
998
+ if (typeof this.config[this.device.device].items[item].options[defitem] == 'function') {
999
+ continue
1000
+ }
1001
+ let defopt = this.config[this.device.device].items[item].options[defitem]
1002
+ if (defopt.isdefault) {
1003
+ //tag
1004
+ f_item_value[0] = defopt.data
1005
+ }
1006
+ }
1007
+ // if(this.config[this.device.device].items[item].data){
1008
+ // f_item_value.push(this.config[this.device.device].items[item].data)
1009
+ // }
1010
+ } else if (this.config[this.device.device].items[item].type == 'radio') {
1011
+ //为radio添加默认值
1012
+ f_item_value = ''
1013
+ //tag)
1014
+ for (let defitem in this.config[this.device.device].items[item].options) {
1015
+ if (typeof this.config[this.device.device].items[item].options[defitem] == 'function') {
1016
+ continue
1017
+ }
1018
+ //tag)
1019
+ let defopt = this.config[this.device.device].items[item].options[defitem]
1020
+ if (defopt.isdefault) {
1021
+ //tag)
1022
+ f_item_value = defopt.data
1023
+ }
1024
+ }
1025
+ } else {
1026
+ f_item_value = this.config[this.device.device].items[item].data ? this.config[this.device.device].items[item].data : ''
1027
+ }
1028
+ //tag)
1029
+ let it = {
1030
+ type: this.config[this.device.device].items[item].type,
1031
+ f_item_name: this.config[this.device.device].items[item].itemname,
1032
+ checkmust: this.config[this.device.device].items[item].checkmust,
1033
+ f_item_value: this.config[this.device.device].items[item].f_item_value || f_item_value,
1034
+ f_is_defect: '',
1035
+ multiple: this.config[this.device.device].items[item].multiple == true ? this.config[this.device.device].items[item].multiple : false,
1036
+ isshow: this.config[this.device.device].items[item].isshow == false ? this.config[this.device.device].items[item].isshow : true,
1037
+ readonly: this.config[this.device.device].items[item].readonly == true ? true : false,
1038
+ remark: this.config[this.device.device].items[item].remark ? this.config[this.device.device].items[item].remark : '',
1039
+ f_path: '',
1040
+ unit: this.config[this.device.device].items[item].unit ? this.config[this.device.device].items[item].unit : '',
1041
+ tooltip: '',
1042
+ f_live_dispose: '',
1043
+ f_deal_dispose: this.config[this.device.device].items[item].f_process_mode,
1044
+ f_else: '',
1045
+ f_p1_path: '',
1046
+ f_p2_path: '',
1047
+ f_p3_path: '',
1048
+ f_handle_date: Util.dateAddDay(new Date(), this.config[this.device.device].items[item].f_aging || 0),
1049
+ count: this.config[this.device.device].items[item].count
1050
+ }
1051
+ if (this.config[this.device.device].items[item].f_process_mode == '现场整改') {
1052
+ it.f_is_repaired = '已处理'
1053
+ it.f_repair_date = Util.toStandardTimeString()
1054
+ it.f_repairman = Vue.user.name
1055
+ }
1056
+ if (this.config[this.device.device].items[item].type == 'selector' && this.config[this.device.device].items[item].f_item_value) {
1057
+ f_item_value = this.config[this.device.device].items[item].f_item_value
1058
+ }
1059
+ //tag)
1060
+ //tag)
1061
+ this.$set('f_items[' + index + ']', it)
1062
+ if (this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'inputSelector') {
1063
+ if (this.config[this.device.device].items[item].type == 'selector') {
1064
+ // this.page['options' + index].push({
1065
+ // label: "请选择",
1066
+ // value: ''
1067
+ // })
1068
+ }
1069
+ for (let i in this.config[this.device.device].items[item].options) {
1070
+ if (typeof this.config[this.device.device].items[item].options[i] == 'function') {
1071
+ continue
1072
+ }
1073
+ this.page['options' + index].push({
1074
+ label: this.config[this.device.device].items[item].options[i].data,
1075
+ value: this.config[this.device.device].items[item].options[i].data,
1076
+ tooltip: this.config[this.device.device].items[item].options[i].tooltip
1077
+ })
1078
+ }
1079
+ if (this.config[this.device.device].items[item].type == 'selector') {
1080
+ this.$set('f_items[' + index + '].selected', f_item_value)
1081
+ } else if (this.config[this.device.device].items[item].type == 'inputSelector') {
1082
+ this.$set('f_items[' + index + '].selected', f_item_value)
1083
+ }
1084
+
1085
+ this.$set('f_items[' + index + '].options', this.page['options' + index])
1086
+
1087
+ //tag)
1088
+ } else if (this.config[this.device.device].items[item].type == 'radio' || this.config[this.device.device].items[item].type == 'checkbox') {
1089
+ //tag)
1090
+ //tag
1091
+ //tag)
1092
+ for (let i in this.config[this.device.device].items[item].options) {
1093
+ if (typeof this.config[this.device.device].items[item].options[i] == 'function') {
1094
+ continue
1095
+ }
1096
+ //tag
1097
+ this.page['options' + index].push({
1098
+ label: this.config[this.device.device].items[item].options[i].data,
1099
+ value: this.config[this.device.device].items[item].options[i].data,
1100
+ isdefect: this.config[this.device.device].items[item].options[i].isdefect,
1101
+ level: this.config[this.device.device].items[item].options[i].level,
1102
+ tooltip: this.config[this.device.device].items[item].options[i].tooltip
1103
+ })
1104
+ //tag)
1105
+ }
1106
+ //tag)
1107
+ this.$set('f_items[' + index + '].options', this.page['options' + index])
1108
+ this.$set('f_items[' + index + '].f_item_value', f_item_value)
1109
+ //tag)
1110
+ }
1111
+ n = n + 1
1112
+ }
1113
+ if (!this.piece || JSON.stringify(this.piece) == '{}') {
1114
+ // 如果没有,则新建
1115
+ this.$set('piece.f_items', this.f_items)
1116
+ this.$set('piece.f_device_type', this.config[this.device.device].itemname)
1117
+ this.prepare()
1118
+ } else {
1119
+ console.log('this.f_items12=', JSON.stringify(this.f_items))
1120
+ // 已经存在,把之前的数据重新填入
1121
+ for (let f in this.f_items) {
1122
+ if (typeof this.f_items[f] == 'function') {
1123
+ continue
1124
+ }
1125
+ for (let p in this.piece.f_items) {
1126
+ if (typeof this.piece.f_items[p] == 'function') {
1127
+ continue
1128
+ }
1129
+ if (this.f_items[f].f_item_name == this.piece.f_items[p].f_item_name) {
1130
+ //tag)
1131
+ //tag)
1132
+ this.f_items[f] = Object.assign(this.f_items[f], this.piece.f_items[p])
1133
+ //tag)
1134
+ if (this.f_items[f].type == 'selector' || this.f_items[f].type == 'inputSelector') {
1135
+ //tag)
1136
+ //tag)
1137
+ this.f_items[f].selected = this.piece.f_items[p].f_item_value
1138
+ //tag)
1139
+ }
1140
+ // 取出特殊值
1141
+ if (this.f_items[f].f_item_name == '初始表底') {
1142
+ //tag)
1143
+ this.f_initial_base.index = f
1144
+ } else if (this.f_items[f].f_item_name == '累购气量') {
1145
+ //tag)
1146
+ this.f_total_gas.index = f
1147
+ } else if (this.f_items[f].f_item_name == '已用气量') {
1148
+ //tag)
1149
+ this.f_table_base.index = f
1150
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1151
+ this.getGasAberrantNumber('已用气量')
1152
+ })
1153
+ } else if (this.f_items[f].f_item_name == '上次表底') {
1154
+ //tag)
1155
+ this.f_total_biaodi.index = f
1156
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1157
+ this.getbiaodinumber()
1158
+ })
1159
+ } else if (this.f_items[f].f_item_name == '本次表底') {
1160
+ //tag)
1161
+ this.f_table_biaodi.index = f
1162
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1163
+ this.getbiaodinumber()
1164
+ })
1165
+ } else if (this.f_items[f].f_item_name == '表底差值') {
1166
+ //tag)
1167
+ this.f_biaodi_number.index = f
1168
+ } else if (this.f_items[f].f_item_name == '系统表底数') {
1169
+ //tag)
1170
+ this.f_meter_base2.index = f
1171
+ } else if (this.f_items[f].f_item_name == '剩余气量') {
1172
+ //tag)
1173
+ this.f_gas_balance.index = f
1174
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1175
+ this.getGasAberrantNumber('')
1176
+ })
1177
+ } else if (this.f_items[f].f_item_name == '气量异常差值') {
1178
+ //tag)
1179
+ this.f_gas_aberrant_number.index = f
1180
+ } else if (this.f_items[f].f_item_name == '累购金额') {
1181
+ //tag)
1182
+ this.f_total_fee.index = f
1183
+ } else if (this.f_items[f].f_item_name == '已用金额') {
1184
+ //tag)
1185
+ this.f_fee_base.index = f
1186
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1187
+ this.getFeeAberrantNumber('已用金额')
1188
+ })
1189
+ } else if (this.f_items[f].f_item_name == '剩余金额') {
1190
+ //tag)
1191
+ this.f_fee_balance.index = f
1192
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1193
+ this.getFeeAberrantNumber('')
1194
+ this.getFeeAberrantNumber2('')
1195
+ })
1196
+ } else if (this.f_items[f].f_item_name == '表端剩余金额') {
1197
+ this.f_table_balance.index = f
1198
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1199
+ this.getFeeAberrantNumber2('')
1200
+ })
1201
+ } else if (this.f_items[f].f_item_name == '金额异常差值') {
1202
+ //tag)
1203
+ this.f_fee_aberrant_number.index = f
1204
+ } else if (this.f_items[f].f_item_name == '表读数') {
1205
+ //tag)
1206
+ this.f_meter_base.index = f
1207
+ } else if (this.f_items[f].f_item_name == '表剩余金额') {
1208
+ //tag)
1209
+ this.f_balance_amount.index = f
1210
+ } else if (this.f_items[f].f_item_name == '字轮数') {
1211
+ //tag)
1212
+ this.f_meter_base1.index = f
1213
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1214
+ this.getmeteraberrantnumber()
1215
+ })
1216
+ } else if (this.f_items[f].f_item_name == '表余额') {
1217
+ //tag)
1218
+ this.f_balance_amount1.index = f
1219
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1220
+ this.getfeeaberrantnumber1()
1221
+ })
1222
+ } else if (this.f_items[f].f_item_name == '表数异常差值') {
1223
+ //tag)
1224
+ this.f_meter_aberrant_number1.index = f
1225
+ } else if (this.f_items[f].f_item_name == '表金额异常差值') {
1226
+ //tag)
1227
+ this.f_fee_aberrant_number1.index = f
1228
+ } else if (this.f_items[f].f_item_name == '燃气灶安装时间') {
1229
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1230
+ this.deviceOverdueDefect(f, '燃气灶')
1231
+ })
1232
+ } else if (this.f_items[f].f_item_name == '燃气灶超期') {
1233
+ this.f_stove.index = f
1234
+ this.f_items[f].readonly = true
1235
+ } else if (this.f_items[f].f_item_name == '壁挂炉安装时间') {
1236
+ this.f_wall.index = f
1237
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1238
+ this.deviceOverdueDefect(f, '壁挂炉')
1239
+ })
1240
+ } else if (this.f_items[f].f_item_name == '壁挂炉超期') {
1241
+ this.f_wall.index = f
1242
+ this.f_items[f].readonly = true
1243
+ } else if (this.f_items[f].f_item_name == '热水器安装时间') {
1244
+ this.f_water.index = f
1245
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1246
+ this.deviceOverdueDefect(f, '热水器')
1247
+ })
1248
+ } else if (this.f_items[f].f_item_name == '热水器超期') {
1249
+ this.f_water.index = f
1250
+ this.f_items[f].readonly = true
1251
+ }
1252
+ }
1253
+ }
1254
+ for (let em in this.config[this.device.device].items) {
1255
+ if (typeof this.config[this.device.device].items[em] == 'function') {
1256
+ continue
1257
+ }
1258
+ if (this.config[this.device.device].items[em].type == 'selector' && em == this.f_items[f].f_item_name) {
1259
+ this.f_items[f].options = []
1260
+ for (let k in this.config[this.device.device].items[em].options) {
1261
+ if (typeof this.config[this.device.device].items[em].options[k] == 'function') {
1262
+ continue
1263
+ }
1264
+ this.f_items[f].options.push({
1265
+ label: this.config[this.device.device].items[em].options[k].data,
1266
+ value: this.config[this.device.device].items[em].options[k].data
1267
+ })
1268
+ }
1269
+ }
1270
+ }
1271
+ }
1272
+ //tag)
1273
+ this.$set('piece.f_items', this.f_items)
1274
+ }
1275
+ this.towatch()
1276
+ }
1277
+ },
1278
+ ready() {
1279
+ this.prepare()
1280
+ //tag
1281
+ //tag
1282
+ // if(Vue.config.safecheck != undefined){
1283
+ // if(Vue.config.safecheck.ApproveConfig != undefined){
1284
+ // if(Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
1285
+ // this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
1286
+ // }
1287
+ // if(Vue.config.safecheck.ApproveConfig.dealdispose != undefined) {
1288
+ // this.dealdispose = Vue.config.safecheck.ApproveConfig.dealdispose
1289
+ // }
1290
+ // if(Vue.config.safecheck.ApproveConfig.showtorepair) {
1291
+ // this.deals=[{label: '现场整改', value: '现场整改'},
1292
+ // {label: '自行处理', value: '自行处理'},
1293
+ // {label: '转维修', value: '报修'}
1294
+ // ]
1295
+ // }
1296
+ // if(Vue.config.safecheck.ApproveConfig.Processing) {
1297
+ // if(Vue.config.safecheck.ApproveConfig.Processing.length > 0){
1298
+ // this.deals = Vue.config.safecheck.ApproveConfig.Processing
1299
+ // }
1300
+ // }
1301
+ // if(Vue.config.safecheck.ApproveConfig.showXCImg) {
1302
+ // this.showXCImg = true
1303
+ // }
1304
+ // if(Vue.config.safecheck.ApproveConfig.showZXTime) {
1305
+ // this.showZXTime = true
1306
+ // }
1307
+ // if(Vue.config.safecheck.ApproveConfig.showtorepair) {
1308
+ // }
1309
+ // if(Vue.config.safecheck.ApproveConfig.hiddendanger != undefined) {
1310
+ // if (parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger) >= 3) {
1311
+ // this.hiddenDangerImgNumber = 3
1312
+ // }else {
1313
+ // this.hiddenDangerImgNumber = parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger)
1314
+ // }
1315
+ // }
1316
+ // }
1317
+ // }
1318
+ // //tag
1319
+ // //tag)
1320
+ // //tag)
1321
+ // //tag)
1322
+ // //创建页面所需数据
1323
+ // this.$set('piece', this.paper['device'+this.device.n][this.idx])
1324
+ // //tag)
1325
+ // //tag)
1326
+ // let n = 0
1327
+ // for (let item in this.config[this.device.device].items) {
1328
+ // if(typeof this.config[this.device.device].items[item]=='function'){
1329
+ // continue
1330
+ // }
1331
+ // let index = this.config[this.device.device].items[item].index-1
1332
+ // this.$set('page.options' + index, [])
1333
+ // //tag)
1334
+ // //tag)
1335
+ // //tag)
1336
+ // // 先根据配置组接页面
1337
+ // let f_item_value
1338
+ // if(this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'checkbox'){
1339
+ // f_item_value = []
1340
+ // // 判断选项的默认值
1341
+ // for (let defitem in this.config[this.device.device].items[item].options) {
1342
+ // if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
1343
+ // continue
1344
+ // }
1345
+ // let defopt = this.config[this.device.device].items[item].options[defitem]
1346
+ // if (defopt.isdefault) {
1347
+ // //tag
1348
+ // f_item_value[0] = defopt.data
1349
+ // }
1350
+ // }
1351
+ // // if(this.config[this.device.device].items[item].data){
1352
+ // // f_item_value.push(this.config[this.device.device].items[item].data)
1353
+ // // }
1354
+ // }else if(this.config[this.device.device].items[item].type == 'radio'){
1355
+ // //为radio添加默认值
1356
+ // f_item_value=''
1357
+ // //tag)
1358
+ // for (let defitem in this.config[this.device.device].items[item].options) {
1359
+ // if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
1360
+ // continue
1361
+ // }
1362
+ // //tag)
1363
+ // let defopt = this.config[this.device.device].items[item].options[defitem]
1364
+ // if (defopt.isdefault) {
1365
+ // //tag)
1366
+ // f_item_value = defopt.data
1367
+ // }
1368
+ // }
1369
+ // }else{
1370
+ // f_item_value = this.config[this.device.device].items[item].data ? this.config[this.device.device].items[item].data : ''
1371
+ // }
1372
+ // //tag)
1373
+ // let it = {
1374
+ // type: this.config[this.device.device].items[item].type,
1375
+ // f_item_name: item,
1376
+ // checkmust: this.config[this.device.device].items[item].checkmust,
1377
+ // f_item_value: f_item_value,
1378
+ // is_verification:this.config[this.device.device].items[item].is_verification,
1379
+ // verification_text:'',
1380
+ // verification_state:'',// ai验证是否通过 npass(未通过)/pass(通过)
1381
+ // f_is_defect: '',
1382
+ // multiple:this.config[this.device.device].items[item].multiple == true?this.config[this.device.device].items[item].multiple:false,
1383
+ // isshow:this.config[this.device.device].items[item].isshow == false?this.config[this.device.device].items[item].isshow:true,
1384
+ // readonly: this.config[this.device.device].items[item].readonly == true?true:false,
1385
+ // remark: this.config[this.device.device].items[item].remark ? this.config[this.device.device].items[item].remark : '',
1386
+ // f_path: '',
1387
+ // unit: this.config[this.device.device].items[item].unit ? this.config[this.device.device].items[item].unit : '',
1388
+ // tooltip:'',
1389
+ // f_live_dispose:'',
1390
+ // f_deal_dispose:'',
1391
+ // f_else: '',
1392
+ // f_p1_path: '',
1393
+ // f_p2_path: '',
1394
+ // f_p3_path: ''
1395
+ // }
1396
+ // //tag)
1397
+ // //tag)
1398
+ // this.$set('f_items['+index+']',it)
1399
+ // if (this.config[this.device.device].items[item].type == 'selector' ||this.config[this.device.device].items[item].type == 'inputSelector') {
1400
+ // if(this.config[this.device.device].items[item].type == 'selector'){
1401
+ // this.page['options' + index].push({
1402
+ // label: "请选择",
1403
+ // value: ''
1404
+ // })
1405
+ // }
1406
+ // for (let i in this.config[this.device.device].items[item].options) {
1407
+ // if(typeof this.config[this.device.device].items[item].options[i]=='function'){
1408
+ // continue
1409
+ // }
1410
+ // this.page['options' + index].push({
1411
+ // label: this.config[this.device.device].items[item].options[i].data,
1412
+ // value: this.config[this.device.device].items[item].options[i].data,
1413
+ // tooltip: this.config[this.device.device].items[item].options[i].tooltip
1414
+ // })
1415
+ // }
1416
+ // if(this.config[this.device.device].items[item].type == 'selector'){
1417
+ // this.$set('f_items['+index+'].selected', f_item_value)
1418
+ // }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
1419
+ // this.$set('f_items['+index+'].selected', f_item_value)
1420
+ // }
1421
+ //
1422
+ // this.$set('f_items['+index+'].options',this.page['options' + index])
1423
+ //
1424
+ // //tag)
1425
+ // } else if (this.config[this.device.device].items[item].type == 'radio' || this.config[this.device.device].items[item].type == 'checkbox') {
1426
+ // //tag)
1427
+ // //tag
1428
+ // //tag)
1429
+ // for (let i in this.config[this.device.device].items[item].options) {
1430
+ // if(typeof this.config[this.device.device].items[item].options[i]=='function'){
1431
+ // continue
1432
+ // }
1433
+ // //tag
1434
+ // this.page['options' + index].push({
1435
+ // label: this.config[this.device.device].items[item].options[i].data,
1436
+ // value: this.config[this.device.device].items[item].options[i].data,
1437
+ // isdefect: this.config[this.device.device].items[item].options[i].isdefect,
1438
+ // level: this.config[this.device.device].items[item].options[i].level,
1439
+ // tooltip: this.config[this.device.device].items[item].options[i].tooltip
1440
+ // })
1441
+ // //tag)
1442
+ // }
1443
+ // //tag)
1444
+ // this.$set('f_items[' + index + '].options', this.page['options' + index])
1445
+ // this.$set('f_items[' + index + '].f_item_value', f_item_value)
1446
+ // //tag)
1447
+ // }
1448
+ // n = n + 1
1449
+ // }
1450
+ // if(!this.piece || JSON.stringify(this.piece) == '{}') {
1451
+ // // 如果没有,则新建
1452
+ // this.$set('piece.f_items',this.f_items)
1453
+ // this.$set('piece.f_device_type',this.device.device)
1454
+ // } else {
1455
+ // // 已经存在,把之前的数据重新填入
1456
+ // for (let f in this.f_items){
1457
+ // if(typeof this.f_items[f]=='function'){
1458
+ // continue
1459
+ // }
1460
+ // for(let p in this.piece.f_items) {
1461
+ // if(typeof this.piece.f_items[p]=='function'){
1462
+ // continue
1463
+ // }
1464
+ // if (this.f_items[f].f_item_name == this.piece.f_items[p].f_item_name) {
1465
+ // //tag)
1466
+ // //tag)
1467
+ // this.f_items[f] = Object.assign(this.f_items[f], this.piece.f_items[p])
1468
+ // //tag)
1469
+ // if (this.f_items[f].type == 'selector' || this.f_items[f].type == 'inputSelector') {
1470
+ // //tag)
1471
+ // //tag)
1472
+ // this.f_items[f].selected = this.piece.f_items[p].f_item_value
1473
+ // //tag)
1474
+ // }
1475
+ // // 取出特殊值
1476
+ // if (this.f_items[f].f_item_name == '初始表底') {
1477
+ // //tag)
1478
+ // this.f_initial_base.index = f
1479
+ // } else if (this.f_items[f].f_item_name == '累购气量') {
1480
+ // //tag)
1481
+ // this.f_total_gas.index = f
1482
+ // } else if (this.f_items[f].f_item_name == '已用气量') {
1483
+ // //tag)
1484
+ // this.f_table_base.index = f
1485
+ // this.$watch('f_items[' + f + '].f_item_value', function () {
1486
+ // this.getGasAberrantNumber('已用气量')
1487
+ // })
1488
+ // } else if (this.f_items[f].f_item_name == '剩余气量') {
1489
+ // //tag)
1490
+ // this.f_gas_balance.index = f
1491
+ // this.$watch('f_items[' + f + '].f_item_value', function () {
1492
+ // this.getGasAberrantNumber('')
1493
+ // })
1494
+ // } else if (this.f_items[f].f_item_name == '气量异常差值') {
1495
+ // //tag)
1496
+ // this.f_gas_aberrant_number.index = f
1497
+ // } else if (this.f_items[f].f_item_name == '累购金额') {
1498
+ // //tag)
1499
+ // this.f_total_fee.index = f
1500
+ // } else if (this.f_items[f].f_item_name == '已用金额') {
1501
+ // //tag)
1502
+ // this.f_fee_base.index = f
1503
+ // this.$watch('f_items[' + f + '].f_item_value', function () {
1504
+ // this.getFeeAberrantNumber('已用金额')
1505
+ // })
1506
+ // } else if (this.f_items[f].f_item_name == '剩余金额') {
1507
+ // //tag)
1508
+ // this.f_fee_balance.index = f
1509
+ // this.$watch('f_items[' + f + '].f_item_value', function () {
1510
+ // this.getFeeAberrantNumber('')
1511
+ // this.getFeeAberrantNumber2('')
1512
+ // })
1513
+ // } else if (this.f_items[f].f_item_name == '表端剩余金额') {
1514
+ // this.f_table_balance.index = f
1515
+ // this.$watch('f_items[' + f + '].f_item_value', function () {
1516
+ // this.getFeeAberrantNumber2('')
1517
+ // })
1518
+ // } else if (this.f_items[f].f_item_name == '金额异常差值') {
1519
+ // //tag)
1520
+ // this.f_fee_aberrant_number.index = f
1521
+ // }else if (this.f_items[f].f_item_name == '表读数') {
1522
+ // //tag)
1523
+ // this.f_meter_base.index = f
1524
+ // }else if (this.f_items[f].f_item_name == '表剩余金额') {
1525
+ // //tag)
1526
+ // this.f_balance_amount.index = f
1527
+ // }else if (this.f_items[f].f_item_name == '字轮数') {
1528
+ // //tag)
1529
+ // this.f_meter_base1.index = f
1530
+ // this.$watch('f_items[' + f + '].f_item_value', function () {
1531
+ // this.getmeteraberrantnumber()
1532
+ // })
1533
+ // }else if (this.f_items[f].f_item_name == '表余额') {
1534
+ // //tag)
1535
+ // this.f_balance_amount1.index = f
1536
+ // this.$watch('f_items[' + f + '].f_item_value', function () {
1537
+ // this.getfeeaberrantnumber1()
1538
+ // })
1539
+ // }else if (this.f_items[f].f_item_name == '表数异常差值') {
1540
+ // //tag)
1541
+ // this.f_meter_aberrant_number1.index = f
1542
+ // }else if (this.f_items[f].f_item_name == '表金额异常差值') {
1543
+ // //tag)
1544
+ // this.f_fee_aberrant_number1.index = f
1545
+ // }
1546
+ // }
1547
+ // }
1548
+ // for (let em in this.config[this.device.device].items) {
1549
+ // if(typeof this.config[this.device.device].items[em]=='function'){
1550
+ // continue
1551
+ // }
1552
+ // if (this.config[this.device.device].items[em].type == 'selector' && em == this.f_items[f].f_item_name) {
1553
+ // this.f_items[f].options =[]
1554
+ // for (let k in this.config[this.device.device].items[em].options) {
1555
+ // if(typeof this.config[this.device.device].items[em].options[k]=='function'){
1556
+ // continue
1557
+ // }
1558
+ // this.f_items[f].options.push({
1559
+ // label: this.config[this.device.device].items[em].options[k].data,
1560
+ // value: this.config[this.device.device].items[em].options[k].data
1561
+ // })
1562
+ // }
1563
+ // }
1564
+ // }
1565
+ // }
1566
+ // //tag)
1567
+ // this.$set('piece.f_items',this.f_items)
1568
+ // }
1569
+ // this.towatch()
1570
+ },
1571
+ destroyed() {
1572
+ let nullCount = 0
1573
+ let metertitles
1574
+ //判断当前是否有选中项
1575
+ for (let row in this.f_items) {
1576
+ if (typeof this.f_items[row] == 'function') {
1577
+ continue
1578
+ }
1579
+ if (this.f_items[row].selected && this.f_items[row].selected != '' && this.f_items[row].selected instanceof Array) {
1580
+ //tag
1581
+ this.f_items[row].f_item_value = this.f_items[row].selected
1582
+ } else if (this.f_items[row].selected && this.f_items[row].selected != '') {
1583
+ //tag
1584
+ this.f_items[row].f_item_value = this.f_items[row].selected
1585
+ }
1586
+ // if(this.f_items[row].f_item_value instanceof Array && this.f_items[row].f_item_value.length != 0 ){
1587
+ // nullCount = nullCount+1
1588
+ // }else if(this.f_items[row].f_item_value != ''){
1589
+ // nullCount = nullCount+1
1590
+ // }
1591
+ }
1592
+ let picture = []
1593
+ // for (let row in this.f_items){
1594
+ // let a={}
1595
+ // a.f_path = this.f_items[row].f_path
1596
+ // a.name = this.f_items[row].f_item_name
1597
+ // }
1598
+ // picture.push(a)
1599
+ this.$set(`paper['device${this.device.n}'][${this.idx}]`, this.piece)
1600
+ //tag
1601
+ },
1602
+ computed: {
1603
+
1604
+ }
1605
+ }
1606
+ </script>
1607
+ <style lang="less" scoped>
1608
+ .class-erro {
1609
+ color: #a94442;
1610
+ }
1611
+
1612
+ .fivelabel {
1613
+ border: none;
1614
+ border-left: 5px solid #A2C2EB;
1615
+ float: left;
1616
+ width: 35%;
1617
+ margin-bottom: 3px;
1618
+ text-align: left;
1619
+ word-wrap: break-word;
1620
+ white-space: normal;
1621
+ }
1622
+
1623
+ .radiolabel {
1624
+ border: none;
1625
+ border-left: 5px solid #A2C2EB;
1626
+ float: left;
1627
+ width: 65%;
1628
+ margin-bottom: 3px;
1629
+ text-align: left;
1630
+ word-wrap: break-word;
1631
+ white-space: normal;
1632
+ }
1633
+
1634
+ .textlabel {
1635
+ border: none;
1636
+ border-left: 5px solid #A2C2EB;
1637
+ width: 100%;
1638
+ margin-bottom: 3px;
1639
+ text-align: left;
1640
+ word-wrap: break-word;
1641
+ white-space: normal;
1642
+ }
1643
+
1644
+ .textlabel1 {
1645
+ border: none;
1646
+ border-left: 5px solid #f7cb32;
1647
+ width: 100%;
1648
+ margin-bottom: 3px;
1649
+ text-align: left;
1650
+ word-wrap: break-word;
1651
+ white-space: normal;
1652
+ }
1653
+
1654
+ .spanrodio {
1655
+ margin-right: 10px;
1656
+ }
1657
+
1658
+ .div-photo {
1659
+ width: auto;
1660
+ height: auto;
1661
+ /* margin-top: 10px; */
1662
+ position: absolute;
1663
+ bottom: 10px;
1664
+ right: 10px;
1665
+ }
1666
+
1667
+ .panel-self {
1668
+ border-radius: 5px;
1669
+ border: 1px solid #c5e1f7;
1670
+ //background-color: #F2F6FA;
1671
+ }
1672
+
1673
+ .btn-photo {
1674
+ border: 0;
1675
+ border-radius: 7px;
1676
+ background-color: #7dc1f4;
1677
+ font: 15px PingFang-SC-Bold;
1678
+ height: 20%;
1679
+ }
1680
+ </style>