safecheck-client 3.0.39-20 → 3.0.39-21

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 (270) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/android.html +18 -18
  4. package/config/dev.env.js +6 -6
  5. package/config/index.js +38 -38
  6. package/config/prod.env.js +3 -3
  7. package/config/test.env.js +6 -6
  8. package/docs/AppBase.md +22 -22
  9. package/docs/Busy.md +14 -14
  10. package/docs/CriteriaPaged.md +47 -47
  11. package/docs/DataGrid.md +54 -54
  12. package/docs/DataModel.md +22 -22
  13. package/docs/Dynamic.md +42 -42
  14. package/docs/GetParams.md +11 -11
  15. package/docs/HttpBusy.md +13 -13
  16. package/docs/HttpStore.md +29 -29
  17. package/docs/MessageBox.md +28 -28
  18. package/docs/PagedList.md +29 -29
  19. package/docs/Pager.md +21 -21
  20. package/docs/Project.md +23 -23
  21. package/docs/Route.md +105 -105
  22. package/docs/SafetyCheck/AdjustPlan.md +13 -13
  23. package/docs/SafetyCheck/CheckerPlan.md +12 -12
  24. package/docs/Task.md +46 -46
  25. package/docs/TreeList.md +28 -28
  26. package/docs/TreeMixin.md +18 -18
  27. package/docs/all.md +10 -10
  28. package/docs/list.md +42 -42
  29. package/docs/partial.md +75 -75
  30. package/docs/selector.md +82 -82
  31. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/Snippets.md +28 -28
  32. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue-strap/345/217/230/346/233/264/350/256/260/345/275/225.md +7 -7
  33. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue/345/217/230/346/233/264/350/256/260/345/275/225.md +13 -13
  34. package/docs//345/274/200/345/217/221/346/226/207/346/241/243//345/274/200/345/217/221/347/216/257/345/242/203/350/256/276/347/275/256.md +77 -77
  35. package/docs//347/225/214/351/235/242/345/210/266/344/275/234/350/247/204/350/214/203.md +54 -54
  36. package/examples/AddressList/App.vue +13 -13
  37. package/examples/AddressList/index.html +11 -11
  38. package/examples/DispatchList/App.vue +10 -10
  39. package/examples/DispatchList/BaseTree.vue +13 -13
  40. package/examples/DispatchList/Init.vue +22 -22
  41. package/examples/DispatchList/Test.vue +20 -20
  42. package/examples/DispatchList/index.html +11 -11
  43. package/examples/DispatchList/main.js +18 -18
  44. package/home.html +16 -16
  45. package/package.json +1 -1
  46. package/publish.bat +7 -7
  47. package/release.bat +5 -5
  48. package/src/App.vue +31 -26
  49. package/src/Widget.vue +13 -13
  50. package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  51. package/src/android-bootstrap/less/.csscomb.json +304 -304
  52. package/src/android-bootstrap/less/.csslintrc +19 -19
  53. package/src/android-bootstrap/less/alerts.less +73 -73
  54. package/src/android-bootstrap/less/badges.less +66 -66
  55. package/src/android-bootstrap/less/bootstrap.less +56 -56
  56. package/src/android-bootstrap/less/breadcrumbs.less +26 -26
  57. package/src/android-bootstrap/less/button-groups.less +247 -247
  58. package/src/android-bootstrap/less/buttons.less +173 -173
  59. package/src/android-bootstrap/less/carousel.less +269 -269
  60. package/src/android-bootstrap/less/close.less +34 -34
  61. package/src/android-bootstrap/less/code.less +69 -69
  62. package/src/android-bootstrap/less/component-animations.less +33 -33
  63. package/src/android-bootstrap/less/grid.less +84 -84
  64. package/src/android-bootstrap/less/input-groups.less +167 -167
  65. package/src/android-bootstrap/less/jumbotron.less +52 -52
  66. package/src/android-bootstrap/less/labels.less +64 -64
  67. package/src/android-bootstrap/less/list-group.less +141 -141
  68. package/src/android-bootstrap/less/media.less +66 -66
  69. package/src/android-bootstrap/less/mixins/alerts.less +14 -14
  70. package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
  71. package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
  72. package/src/android-bootstrap/less/mixins/buttons.less +69 -69
  73. package/src/android-bootstrap/less/mixins/center-block.less +7 -7
  74. package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
  75. package/src/android-bootstrap/less/mixins/forms.less +90 -90
  76. package/src/android-bootstrap/less/mixins/gradients.less +59 -59
  77. package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
  78. package/src/android-bootstrap/less/mixins/grid.less +122 -122
  79. package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
  80. package/src/android-bootstrap/less/mixins/image.less +33 -33
  81. package/src/android-bootstrap/less/mixins/labels.less +12 -12
  82. package/src/android-bootstrap/less/mixins/list-group.less +30 -30
  83. package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
  84. package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
  85. package/src/android-bootstrap/less/mixins/opacity.less +8 -8
  86. package/src/android-bootstrap/less/mixins/pagination.less +24 -24
  87. package/src/android-bootstrap/less/mixins/panels.less +24 -24
  88. package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
  89. package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
  90. package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
  91. package/src/android-bootstrap/less/mixins/resize.less +6 -6
  92. package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
  93. package/src/android-bootstrap/less/mixins/size.less +10 -10
  94. package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
  95. package/src/android-bootstrap/less/mixins/table-row.less +44 -44
  96. package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
  97. package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
  98. package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
  99. package/src/android-bootstrap/less/mixins.less +40 -40
  100. package/src/android-bootstrap/less/modals.less +151 -151
  101. package/src/android-bootstrap/less/navbar.less +660 -660
  102. package/src/android-bootstrap/less/navs.less +290 -290
  103. package/src/android-bootstrap/less/normalize.less +424 -424
  104. package/src/android-bootstrap/less/pager.less +76 -76
  105. package/src/android-bootstrap/less/pagination.less +89 -89
  106. package/src/android-bootstrap/less/panels.less +274 -274
  107. package/src/android-bootstrap/less/popovers.less +131 -131
  108. package/src/android-bootstrap/less/print.less +101 -101
  109. package/src/android-bootstrap/less/progress-bars.less +87 -87
  110. package/src/android-bootstrap/less/responsive-embed.less +35 -35
  111. package/src/android-bootstrap/less/responsive-utilities.less +194 -194
  112. package/src/android-bootstrap/less/scaffolding.less +161 -161
  113. package/src/android-bootstrap/less/tables.less +262 -262
  114. package/src/android-bootstrap/less/theme.less +291 -291
  115. package/src/android-bootstrap/less/thumbnails.less +36 -36
  116. package/src/android-bootstrap/less/tooltip.less +102 -102
  117. package/src/android-bootstrap/less/type.less +303 -303
  118. package/src/android-bootstrap/less/utilities.less +55 -55
  119. package/src/android-bootstrap/less/variables.less +896 -896
  120. package/src/android-bootstrap/less/wells.less +29 -29
  121. package/src/bootstrap/less/.csscomb.json +304 -304
  122. package/src/bootstrap/less/.csslintrc +19 -19
  123. package/src/bootstrap/less/alerts.less +73 -73
  124. package/src/bootstrap/less/badges.less +66 -66
  125. package/src/bootstrap/less/breadcrumbs.less +26 -26
  126. package/src/bootstrap/less/button-groups.less +247 -247
  127. package/src/bootstrap/less/buttons.less +172 -172
  128. package/src/bootstrap/less/carousel.less +269 -269
  129. package/src/bootstrap/less/close.less +34 -34
  130. package/src/bootstrap/less/code.less +69 -69
  131. package/src/bootstrap/less/component-animations.less +33 -33
  132. package/src/bootstrap/less/dropdowns.less +216 -216
  133. package/src/bootstrap/less/grid.less +84 -84
  134. package/src/bootstrap/less/input-groups.less +167 -167
  135. package/src/bootstrap/less/jumbotron.less +52 -52
  136. package/src/bootstrap/less/labels.less +64 -64
  137. package/src/bootstrap/less/list-group.less +141 -141
  138. package/src/bootstrap/less/media.less +66 -66
  139. package/src/bootstrap/less/mixins/alerts.less +14 -14
  140. package/src/bootstrap/less/mixins/background-variant.less +9 -9
  141. package/src/bootstrap/less/mixins/border-radius.less +18 -18
  142. package/src/bootstrap/less/mixins/buttons.less +69 -69
  143. package/src/bootstrap/less/mixins/center-block.less +7 -7
  144. package/src/bootstrap/less/mixins/clearfix.less +22 -22
  145. package/src/bootstrap/less/mixins/forms.less +90 -90
  146. package/src/bootstrap/less/mixins/gradients.less +59 -59
  147. package/src/bootstrap/less/mixins/grid-framework.less +92 -92
  148. package/src/bootstrap/less/mixins/grid.less +122 -122
  149. package/src/bootstrap/less/mixins/hide-text.less +21 -21
  150. package/src/bootstrap/less/mixins/image.less +33 -33
  151. package/src/bootstrap/less/mixins/labels.less +12 -12
  152. package/src/bootstrap/less/mixins/list-group.less +30 -30
  153. package/src/bootstrap/less/mixins/nav-divider.less +10 -10
  154. package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
  155. package/src/bootstrap/less/mixins/opacity.less +8 -8
  156. package/src/bootstrap/less/mixins/pagination.less +24 -24
  157. package/src/bootstrap/less/mixins/panels.less +24 -24
  158. package/src/bootstrap/less/mixins/progress-bar.less +10 -10
  159. package/src/bootstrap/less/mixins/reset-filter.less +8 -8
  160. package/src/bootstrap/less/mixins/reset-text.less +18 -18
  161. package/src/bootstrap/less/mixins/resize.less +6 -6
  162. package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
  163. package/src/bootstrap/less/mixins/size.less +10 -10
  164. package/src/bootstrap/less/mixins/tab-focus.less +9 -9
  165. package/src/bootstrap/less/mixins/table-row.less +44 -44
  166. package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
  167. package/src/bootstrap/less/mixins/text-overflow.less +8 -8
  168. package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
  169. package/src/bootstrap/less/mixins.less +40 -40
  170. package/src/bootstrap/less/modals.less +151 -151
  171. package/src/bootstrap/less/navbar.less +660 -660
  172. package/src/bootstrap/less/normalize.less +424 -424
  173. package/src/bootstrap/less/pagination.less +89 -89
  174. package/src/bootstrap/less/panels.less +275 -275
  175. package/src/bootstrap/less/popovers.less +131 -131
  176. package/src/bootstrap/less/print.less +101 -101
  177. package/src/bootstrap/less/progress-bars.less +87 -87
  178. package/src/bootstrap/less/responsive-embed.less +35 -35
  179. package/src/bootstrap/less/responsive-utilities.less +194 -194
  180. package/src/bootstrap/less/scaffolding.less +161 -161
  181. package/src/bootstrap/less/theme.less +291 -291
  182. package/src/bootstrap/less/thumbnails.less +36 -36
  183. package/src/bootstrap/less/tooltip.less +102 -102
  184. package/src/bootstrap/less/type.less +303 -303
  185. package/src/bootstrap/less/utilities.less +55 -55
  186. package/src/bootstrap/less/wells.less +29 -29
  187. package/src/components/FileUpload.vue +696 -696
  188. package/src/components/Hello.vue +39 -39
  189. package/src/components/LeftTree.vue +27 -27
  190. package/src/components/android/AndroidDefectDeal.vue +634 -634
  191. package/src/components/android/AttendanceTally.vue +116 -116
  192. package/src/components/android/Blank.vue +10 -10
  193. package/src/components/android/CheckUnplanPage.vue +56 -56
  194. package/src/components/android/Checker.vue +12 -12
  195. package/src/components/android/CheckerAnnual.vue +81 -81
  196. package/src/components/android/CheckerAvarta.vue +82 -82
  197. package/src/components/android/EquipmentInspection.vue +348 -348
  198. package/src/components/android/FootprintMap.vue +120 -120
  199. package/src/components/android/HiddentroubleInvestigation.vue +192 -192
  200. package/src/components/android/MasterMain.vue +77 -77
  201. package/src/components/android/Menu.vue +132 -132
  202. package/src/components/android/PaperAlarm.vue +85 -85
  203. package/src/components/android/PaperDeviceNoncivil.vue +214 -214
  204. package/src/components/android/PlumberAnnual.vue +83 -83
  205. package/src/components/android/PlumberAnnualDetail.vue +65 -65
  206. package/src/components/android/PlumberMonthly.vue +84 -84
  207. package/src/components/android/PostMap.vue +83 -83
  208. package/src/components/android/QueryCheckHistory.vue +122 -122
  209. package/src/components/android/QueryCheckHistoryItem.vue +62 -62
  210. package/src/components/android/RepairMain.vue +60 -60
  211. package/src/components/android/Repairman.vue +12 -12
  212. package/src/components/android/StationMaster.vue +12 -12
  213. package/src/components/defects/DefectModal.vue +101 -101
  214. package/src/components/defects/DevicesAndItem.vue +39 -39
  215. package/src/components/issueplan/IssuePlanMain.vue +23 -23
  216. package/src/components/notice/NoticeForm.vue +100 -100
  217. package/src/components/notice/NoticeIssue.vue +20 -20
  218. package/src/components/paper/PicViewer.vue +18 -18
  219. package/src/components/pc/RoleSelector.vue +172 -172
  220. package/src/components/phonestate/MonthlyTraffic.vue +66 -66
  221. package/src/components/phonestate/MonthlyTrafficRouter.vue +15 -15
  222. package/src/components/phonestate/PostMap.vue +82 -82
  223. package/src/components/querycheckpaper/PaperItem.vue +59 -59
  224. package/src/components/rongcheng/AddPlanItem.vue +344 -344
  225. package/src/components/rongcheng/CheckCurrentCreate.vue +1081 -1081
  226. package/src/components/rongcheng/PaperDefectMain.vue +828 -828
  227. package/src/components/userfile/MeterFile.vue +145 -145
  228. package/src/components/userfile/MeterModify.vue +46 -46
  229. package/src/components/userfileaudit/MeterAuditFile.vue +129 -129
  230. package/src/filiale/BFshiye/pc/checkUserList.vue +772 -772
  231. package/src/filiale/dexin/pc/PaperList.vue +840 -840
  232. package/src/filiale/jinhuang/android/AddPlanItem.vue +430 -430
  233. package/src/filiale/jinhuang/android.js +15 -15
  234. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1336 -1336
  235. package/src/filiale/qingjian/android/SafecheckUserInfo.vue +823 -823
  236. package/src/filiale/qingjian/pc/NewCheckpaper.vue +1919 -1919
  237. package/src/filiale/rongchuang/android/PhoneUpUserinfo.vue +1262 -0
  238. package/src/filiale/rongchuang/android/SafecheckDevices.vue +1317 -1317
  239. package/src/filiale/rongchuang/android.js +16 -15
  240. package/src/filiale/rongchuang/pc/checkPlanList.vue +398 -0
  241. package/src/filiale/rongchuang/pc.js +18 -17
  242. package/src/filiale/wensu/android/SafecheckOrderV.vue +2444 -2444
  243. package/src/filiale/wensu/android/SafecheckUserInfo.vue +712 -712
  244. package/src/filiale/wensu/pc/CheckSearchUser.vue +1251 -1251
  245. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +1191 -1191
  246. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +913 -913
  247. package/src/filiale/yangchunboneng/android.js +21 -21
  248. package/src/filiale/yangchunboneng/pc/CheckBookList.vue +353 -353
  249. package/src/filiale/yangchunboneng/pc/CheckPlanAreaList.vue +677 -677
  250. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1197 -1197
  251. package/src/filiale/yangchunboneng/pc/HiddenSituation.vue +171 -171
  252. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +1112 -1112
  253. package/src/filiale/yangchunboneng/pc/PaperList.vue +757 -757
  254. package/src/filiale/yangchunboneng/pc/SelectCheckPlan.vue +331 -331
  255. package/src/filiale/yangchunboneng/pc.js +29 -29
  256. package/src/main.js +33 -33
  257. package/src/plugins/LoadData.js +10 -10
  258. package/src/plugins/LoadParams.js +24 -24
  259. package/src/rongcheng.js +319 -319
  260. package/src/stores/wxconfig.js +10 -10
  261. package/src/utils/getNowDate.js +33 -33
  262. package/test/e2e/custom-assertions/elementCount.js +26 -26
  263. package/test/e2e/nightwatch.conf.js +40 -40
  264. package/test/e2e/runner.js +30 -30
  265. package/test/e2e/specs/test.js +13 -13
  266. package/test/unit/.eslintrc +5 -5
  267. package/test/unit/TestUtil.js +62 -62
  268. package/test/unit/context.html +20 -20
  269. package/test/unit/index.js +13 -13
  270. package/yarn-error.log +0 -140
@@ -1,1317 +1,1317 @@
1
- <template>
2
- <div class="select-overspread repair-bg auto" style="padding-bottom:5px;">
3
- <!--<div class="bq-parent" v-if="shutype == 'heng'">-->
4
- <!--<blockquote class="blockquote">-->
5
- <!--<p><span>{{repairitem.header}}</span><a @click="mute()" style="float:right" href="#" class="repair-mute-class"><img src="../../assets/novoice.png" width="25px;" alt=""><span style="margin-left:10px;color: #304A66">关闭声音</span></a></p>-->
6
- <!--</blockquote>-->
7
- <!--</div>-->
8
- <div class="panel panel-default auto repair-info-content">
9
- <div class="panel-body" style="padding: 0">
10
- <!-- 安检项内容 -->
11
- <div class="auto repair-info-content compatible" style="padding: 0">
12
- <div class="row auto" style="padding: 0">
13
- <div v-show="false" class="{{shuclass}}" v-if=" device.device != '燃气表'">
14
- <button type="button" name="button" class="btn btn-primary" @click='adddetails()' :disabled="issee">增加</button>
15
- </div>
16
- <!--<div class="{{shuclass}}" v-if="device.device != '燃气表' && candelete">-->
17
- <!--<button type="button" name="button" class="btn btn-primary" @click='deletedetails()' :disabled="issee">删除</button>-->
18
- <!--</div>-->
19
- <div class="shuclass1" v-show="row.isshow" v-for="(idxs,row) in f_items" style="padding: 4px; border:1px solid #D4D4D4;border-bottom: 0" >
20
- <label v-if="row.type != 'radio' && row.type != 'text' && row.type != 'picture' && row.type != 'checkbox'" v-show="row.isshow" class="fivelabel">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
21
- <label v-if="row.type == 'radio'" v-show="row.isshow" class="radiolabel">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
22
- <label v-if="row.type == 'text'" v-show="row.isshow" class="textlabel1">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
23
- <label v-if="row.type == 'picture' || row.type == 'checkbox'" v-show="row.isshow" class="textlabel">{{row.f_item_name}} <br/>{{row.remark}} <span v-show="row.verification_state" :style="{color:row.verification_state==='pass'?'green':'red'}">{{row.verification_text}}</span></label>
24
- <!--<span v-if="show" style="font-weight:bold">{{row.f_content}}</span>-->
25
- <!--<datepicker placeholder="请选择时间"-->
26
- <!--:value.sync="row.f_content"-->
27
- <!--v-model="row.f_content"-->
28
- <!--:format="'yyyy-MM-dd'"-->
29
- <!--v-if="!show && row.type == 'date'"-->
30
- <!--:readonly="true"-->
31
- <!--&gt;</datepicker>-->
32
- <div style="clear: both" v-if="row.type == 'picture'" class="form-group col-sm-12" >
33
- <div class="auto" >
34
- <div class="panel">
35
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
36
- <div class="row" style="height: 160px;width:160px;overflow: scroll;top: 1px">
37
- <div class="col-sm-4" v-show="row.f_path">
38
- <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
39
- </div>
40
- <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name,null,row)">
41
- <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
42
- </div>
43
- <img v-show="row.f_path" src="../../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
44
- </div>
45
- </div>
46
- </div>
47
- </div>
48
- </div>
49
- <div style="clear: both" v-if="row.type == 'picture' && row.f_item_name == '燃气表照片'" class="form-group col-sm-12" >
50
- <div class="auto" >
51
- <div class="panel">
52
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
53
- <div class="row" style="height: 160px;width:160px;overflow: scroll;top: 1px">
54
- <div class="col-sm-4" v-show="row.f_p1_path">
55
- <img-self :src="row.f_p1_path" :alt="row.f_item_name" width="140" height="140"></img-self>
56
- </div>
57
- <div class="col-sm-4" v-show="!row.f_p1_path" @click="takePic(idxs, row.f_item_name,'f_p1_path',row)">
58
- <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
59
- </div>
60
- <img v-show="row.f_p1_path" src="../../../assets/remove.png" :class="style__" @click="delfile(idxs,row.f_p1_path,'f_p1_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
61
- </div>
62
- </div>
63
- </div>
64
- </div>
65
- </div>
66
- <div style="float: left;width:60%" class="form-group" v-if="row.type == 'string'" v-show="row.isshow">
67
- <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" :readonly="role == 'androidview' || row.readonly">
68
- </div>
69
- <div style="float: left;width:60%" class="form-group col-sm-12" v-if="row.type == 'date'" v-show="row.isshow">
70
- <datepicker id="f_making_date" :placeholder= row.f_item_name
71
- :value.sync="row.f_item_value"
72
- v-if="row.type == 'date'"
73
- v-show="row.isshow"
74
- :disabled-days-of-Week="[]"
75
- :format="'yyyy-MM-dd HH:mm:ss'"
76
- :show-reset-button="reset" readonly="readonly">
77
- </datepicker>
78
- </div>
79
-
80
- <div style="float: left;width:60%" class="form-group" v-if="!show && row.type == 'number'" v-show="row.isshow">
81
- <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" onkeyup="value=value.replace(/[^\d\.-]/g,'')" :readonly="row.readonly">
82
- </div>
83
- <!--<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">-->
84
- <!--<input type="text" class="form-control" v-model="meternum" v-if="!show && row.type == 'string' && row.f_project == '表号' " :disabled="(!(ischecked == '有')) || issee" :readonly="issee" >-->
85
- <!--<button type="button" name="button" class="btn btn-primary" @click="scan" v-if="!show && row.f_project == '表号' ">扫码</button>-->
86
- <input-select v-if="row.type == 'inputSelector'"
87
- v-show="row.isshow"
88
- :value.sync="row.selected"
89
- v-model="row.selected"
90
- :readonly="false"
91
- :options="row.options"
92
- @change="changse"
93
- @click="transelation(idxs)"></input-select>
94
- <v-select style="float: left" :value.sync="row.selected"
95
- v-model="row.selected"
96
- v-if="row.type == 'selector'"
97
- :search="false"
98
- v-show="row.isshow"
99
- placeholder='请选择'
100
- :options="row.options"
101
- :disabled="role == 'androidview' || row.readonly"
102
- @change="changse"
103
- @click="transelation(idxs)"
104
- :multiple="row.multiple"
105
- :close-on-select="!row.multiple" clear-button></v-select>
106
- <div style="float: left;width: 30%" class="form-group" v-if="!show && row.type == 'radio'">
107
- <div class="col-xs-6 col-sm-6 col-md-6" v-for="item in row.options">
108
- <!-- <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" >-->
109
- <input type="radio" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value" >
110
- <span>{{item.label}}</span>
111
- </div>
112
- </div>
113
- <div v-if="!show && row.type == 'checkbox'" class="col-xs-12 col-sm-12 col-md-12" style="white-space: nowrap" >
114
- <div style="float: left" v-for="item in row.options">
115
- <input type="checkbox" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value">
116
- <span>{{item.label}}</span>
117
- </div>
118
- </div>
119
- <div style="clear: both">
120
- <label v-if="row.f_item_value.indexOf('其他') >-1" class="fivelabel">其他</label>
121
- <div style="float: left;width:60%" class="form-group" v-if="row.f_item_value.indexOf('其他') >-1">
122
- <input type="text" class="form-control" maxlength="100" v-model="row.f_else" :readonly="role == 'androidview' || row.readonly">
123
- </div>
124
- </div>
125
- <div style="clear: both">
126
- <!-- <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) " >-->
127
- <!-- <label class="fivelabel">现场已处理</label>-->
128
- <!-- <v-select :value="row.f_live_dispose"-->
129
- <!-- :value-single="true"-->
130
- <!-- :options="lives"-->
131
- <!-- :disabled="role == 'androidview'"-->
132
- <!-- @change="changlive"-->
133
- <!-- @click="transelation(idxs)"-->
134
- <!-- close-on-select clear-button></v-select>-->
135
- <!-- </div>-->
136
- <div class="form-group" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '') && (dealdispose == 'true' || dealdispose == true) " >
137
- <label class="fivelabel">处理方式</label>
138
- <v-select
139
- :value="row.f_deal_dispose"
140
- :value-single="true"
141
- :options="deals"
142
- :disabled="role == 'androidview'"
143
- @change="changdeal"
144
- @click="transelation(idxs)"
145
- close-on-select clear-button>
146
- </v-select>
147
- </div>
148
- <div style="display: flex;flex-wrap: wrap" v-if="row.f_deal_dispose == '自行处理' && this.showZXTime">
149
- <label class="fivelabel">处理时效:</label>
150
- <datepicker
151
- :value.sync="row.f_handle_date"
152
- v-model="row.f_handle_date"
153
- :format="'yyyy-MM-dd 00:00:00'"
154
- placeholder="请选择"
155
- style="width: 60%">
156
- </datepicker>
157
- </div>
158
- <div style="margin-left: 10px" class="form-group col-sm-10" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && row.tooltip != undefined && row.tooltip != '' ">
159
- ☆{{row.tooltip}}
160
- </div>
161
- <div class="form-group col-sm-12" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '')">
162
- <div class="auto" style="margin:1px;">
163
- <div class="panel">
164
- <div class="panel-body panel-self" 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_path">
167
- <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
168
- </div>
169
- <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name,null,row)">
170
- <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
171
- </div>
172
- <img v-show="row.f_path" src="../../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
173
- </div>
174
- </div>
175
- </div>
176
- </div>
177
- <!--多张隐患照片-->
178
- <div class="auto" v-for="itemIndex in hiddenDangerImgNumber" style="margin: 1px;">
179
- <div class="panel">
180
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
181
- <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
182
- <div class="col-sm-4" v-show="row['f_p' + (itemIndex+1) + '_path']">
183
- <img-self :src="row['f_p' + (itemIndex+1) + '_path']" :alt="row.f_item_name" width="140" height="140"></img-self>
184
- </div>
185
- <div class="col-sm-4" v-show="!row['f_p' + (itemIndex+1) + '_path']" @click="takePic(idxs, row.f_item_name,'f_p' + (itemIndex+1)+ '_path',row)">
186
- <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
187
- </div>
188
- <img v-show="row['f_p' + (itemIndex+1)+'_path']" src="../../../assets/remove.png" :class="style__" @click="delfile(idxs,row['f_p' + (itemIndex+1)+'_path'],'f_p' + (itemIndex+1)+ '_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
189
- </div >
190
- </div>
191
- </div>
192
- </div>
193
- <div style="display: flex;flex-wrap: wrap;margin-top: 10px" v-if="row.f_deal_dispose == '现场整改' && (row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && this.showXCImg">
194
- <label class="fivelabel">整改照片:</label>
195
- <div class="auto" style="margin:1px;">
196
- <div class="panel">
197
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
198
- <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
199
- <div class="col-sm-4" v-show="row.f_repair_path">
200
- <img-self :src="row.f_repair_path" :alt="row.f_item_name" width="140" height="140"></img-self>
201
- </div>
202
- <div class="col-sm-4" v-show="!row.f_repair_path" @click="takePic(idxs, row.f_item_name,'f_repair_path',row)">
203
- <img src="../../../assets/tackpic.png" alt="点击拍摄照片" width="140" height="140"></img>
204
- </div>
205
- <img v-show="row.f_repair_path" src="../../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_repair_path, 'f_repair_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
206
- </div>
207
- </div>
208
- </div>
209
- </div>
210
- </div>
211
- </div>
212
- </div>
213
-
214
- <!--<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 != '气表品牌'"-->
215
- <!--&gt;</v-select>-->
216
- <!--<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 == '气表品牌'"-->
217
- <!--&gt;</v-select>-->
218
- <!-- <div class="auto" v-if="!show && row.type == 'checkbox' ">-->
219
- <!-- <input class="magic-checkbox" type="checkbox" id="shebeicheckbox"-->
220
- <!-- :checked="row.f_content == '有'"-->
221
- <!-- @click="switchDetails(row.f_project, $event)" :disabled="issee"/>-->
222
- <!-- <label for="shebeicheckbox" style="width:150px;padding-bottom: 10px">{{row.f_project}}</label>-->
223
- <!-- </div>-->
224
- <!--<img-area :model="Detail.imgs" :sutitle="row.f_project" v-if="row.type == 'picture'" :disabled="issee"></img-area>-->
225
- </div>
226
- </div>
227
- </div>
228
- <div style="border-top: 1px solid #D4D4D4"></div>
229
- </div>
230
- </div>
231
- </div>
232
- </template>
233
- <script>
234
- import Vue from 'vue'
235
- import * as Util from '../../Util'
236
-
237
- export default {
238
- title: '维修列表信息',
239
- data() {
240
- return {
241
- // telphoneValid: '/^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$/',
242
- // meterstyle:[],
243
- hiddenDangerImgNumber:0,//隐患图片数
244
- shuclass:'col-xs-12 col-sm-12 col-md-12 form-input-group mg8',
245
- shuclass1:'col-xs-12 col-sm-12 col-md-12 mg8',
246
- // labels:[],
247
- meternum:'',
248
- ischecked:'有',
249
- gasmodel:'',
250
- textstyle:'color: red',
251
- paper: this.$parent.$parent.data,
252
- f_items:[],
253
- page:{},
254
- selectindex:null,
255
- lives:[{label: '是', value: '是'},{label: '否', value: '否'}],
256
- deals:[{label: '现场处理', value: '现场处理'},{label: '自行处理', value: '自行处理'}],
257
- f_live_dispose:'否',
258
- f_deal_dispose:'未处理',
259
- // 初始表底
260
- f_initial_base: {},
261
- // 气量异常差值 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
262
- f_gas_aberrant_number: {},
263
- // 金额异常差值 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
264
- f_fee_aberrant_number: {},
265
- // 累购气量
266
- f_total_gas: {},
267
- // 累购金额
268
- f_total_fee: {},
269
- // 已用气量
270
- f_table_base: {},
271
- // 已用金额
272
- f_fee_base: {},
273
- // 剩余气量
274
- f_gas_balance: {},
275
- // 剩余金额
276
- f_fee_balance: {},
277
- // 表端剩余金额
278
- f_table_balance: {},
279
- // 气量异常差值允许误差
280
-
281
- //物联网表数据存储
282
- f_balance_amount:{},//物联网表剩余金额
283
- f_meter_base:{},//物联网表读数
284
- f_balance_amount1:{},//物联网表现场录入的表上剩余金额
285
- f_meter_base1:{},//物联网表现场录入的表字轮数
286
- f_meter_aberrant_number1: {},//物联网表 表数异常差值
287
- f_fee_aberrant_number1: {},//物联网 表金额异常差值
288
- gasDeviation: (
289
- function (_this) {
290
- let deviation = _this.$appdata.getSingleValue('气量异常差值允许误差')
291
- if (deviation && !isNaN(deviation)) {
292
- return deviation
293
- } else {
294
- return 0
295
- }
296
- }
297
- )(this),
298
- // 金额异常差值允许误差
299
- feeDeviation: (
300
- function (_this) {
301
- let deviation = _this.$appdata.getSingleValue('金额异常差值允许误差')
302
- if (deviation && !isNaN(deviation)) {
303
- return deviation
304
- } else {
305
- return 0
306
- }
307
- }
308
- )(this),
309
- // 字轮异常差值允许误差
310
- meterbase: (
311
- function (_this) {
312
- let deviation = _this.$appdata.getSingleValue('字轮异常差值允许误差')
313
- if (deviation && !isNaN(deviation)) {
314
- return deviation
315
- } else {
316
- return 0
317
- }
318
- }
319
- )(this),
320
- showElse:false, //控制其他选项是否显示
321
- showXCImg: false, // 是否显示现场整改拍照选项
322
- showZXTime: false // 是否显示自行整改处理时效
323
- }
324
- },
325
- props: ['config','device','idx','operation','role'],
326
- // props: {
327
- // // 维修对应的用户数据收集
328
- // model: {
329
- // type: Object
330
- // },
331
- // service:{
332
- // type: Object
333
- // },
334
- // show: {
335
- // type: Boolean,
336
- // default: false
337
- // },
338
- // repairitem:{
339
- // type: Object
340
- // },
341
- // shutype:'heng',
342
- // tabs:{
343
- // type: Object
344
- // },
345
- // repairdetails:{
346
- // type: Object
347
- // },
348
- // faultshow:{
349
- // type: Object
350
- // },
351
- // issee:''
352
- // },
353
- methods: {
354
- changse(val){
355
- if(val == undefined){
356
- return
357
- }
358
- if(this.selectindex != null) {
359
- if(this.f_items[this.selectindex].type == 'selector'){
360
- this.f_items[this.selectindex].f_item_value = val
361
- }else if(this.f_items[this.selectindex].type == 'inputSelector'){
362
- this.f_items[this.selectindex].f_item_value = val.target.value
363
- }
364
- }
365
- },
366
- changlive(val){
367
- if(val == undefined){
368
- return
369
- }
370
- if(this.selectindex != null) {
371
- this.f_items[this.selectindex].f_live_dispose = val
372
- }
373
- },
374
- changdeal(val){
375
- if(val == undefined){
376
- return
377
- }
378
- if(this.selectindex != null) {
379
- this.f_items[this.selectindex].f_deal_dispose = val
380
- }
381
- },
382
- switchDetails(detailsType, event){
383
- if (event.srcElement.checked) {
384
- for(var i = 0;i<this.Detail.details.length;i++){
385
- if(this.Detail.details[i].f_project == detailsType){
386
- this.Detail.details[i].f_content = '有'
387
- this.ischecked = '有'
388
- return
389
- }
390
- }
391
- } else {
392
- this.Detail.imgs = []
393
- for(var i = 0;i<this.Detail.details.length;i++){
394
- if(this.Detail.details[i].f_project == detailsType){
395
- this.Detail.details[i].f_content = '无'
396
- this.ischecked = '无'
397
- }else{
398
- this.Detail.details[i].f_content = ''
399
- }
400
- }
401
- }
402
- },
403
- getgasmodel(val){
404
- this.gasmodel = val
405
- },
406
- getradios(val,flag){
407
- let Reoptions = []
408
- for (let i = 0;i<this.repairdetails.length;i++) {
409
- var t = false
410
- if(this.repairdetails[i].f_type == this.repairitem.header ){
411
- for(var j =0;j<this.repairdetails[i].details.length;j++){
412
- if(this.repairdetails[i].details[j].f_project == val ){
413
- Reoptions = this.repairdetails[i].details[j].options
414
- t = true
415
- break
416
- }
417
- }
418
- }
419
- if(t){
420
- break
421
- }
422
- }
423
- for(let j = 0;j<Reoptions.length;j++){
424
- if(Reoptions[j].data == flag){
425
- for(var e = 0;e<this.Detail.details.length;e++){
426
- if(this.Detail.details[e].f_project == val){
427
- this.Detail.details[e].f_status = Reoptions[j].f_status
428
- return
429
- }
430
- }
431
- break
432
- }
433
- }
434
- },
435
- deletedetails(){
436
- this.$showMessage('该操作会删除所填信息,是否继续!', ['confirm', 'cancel']).then((res) => {
437
- if (res === 'confirm') {
438
- for(var i = 0;i<this.tabs.length;i++){
439
- if(this.tabs[i].number == this.repairitem.number){
440
- this.tabs.splice(i, 1)
441
- this.model.servicerepair.splice(this.repairitem.number, 1)
442
- for(let t = i;t < this.tabs.length;t++ ) {
443
- this.tabs[t].number -= 1
444
- }
445
- return
446
- }
447
- }
448
- }
449
- })
450
- },
451
- takePic(prop, title, pathname='null',row) {
452
- if (this.role == 'androidview') {
453
- return
454
- }
455
- HostApp.__callback__ = this.cameraCallBack
456
- HostApp.__this__ = this
457
- //tag
458
- let fileName
459
- if (pathname == 'null') {
460
- if (!this.f_items[prop].f_path || this.f_items[prop].f_path.includes("nopic.png")) {
461
- fileName = Util.guid() + '-' + 'device-' + row.f_sequence_index + '-f_items' + row.f_item_index + '.jpg'
462
- } else {
463
- fileName = Util.getFileName(this.f_items[prop].f_path)
464
- }
465
- } else {
466
- if (!this.f_items[prop][pathname] || this.f_items[prop][pathname].includes("nopic.png")) {
467
- fileName = Util.guid() + '-' + 'device-' + row.f_sequence_index + '-f_items' + row.f_item_index + '.jpg'
468
- } else {
469
- fileName = Util.getFileName(this.f_items[prop][pathname])
470
- }
471
- }
472
- let jingweidu = ''
473
- if (this.$parent.$parent.is_has_jingweidu == 'true'){
474
- const obj = HostApp.getGpsDetailAddress()
475
- jingweidu = '\t经度:' + obj.longitude+ '\t纬度:' + obj.latitude
476
- this.f_items[prop].f_longitude = obj.longitude
477
- this.f_items[prop].f_latitude = obj.latitude
478
- }
479
- //tag
480
- //tag
481
- HostApp._open_a_page({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
- getGasAberrantNumber(val) {
763
- //tag
764
- if(!this.f_table_base.index || !this.f_gas_balance.index){
765
- //tag
766
- return
767
- }
768
- // 先清空
769
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
770
- this.f_items[this.f_gas_aberrant_number.index].f_is_defect = false
771
- if(val=='已用气量'){
772
- //剩余气量 = 累购-已用
773
- this.f_items[this.f_gas_balance.index].f_item_value= (this.f_items[this.f_total_gas.index].f_item_value-this.f_items[this.f_table_base.index].f_item_value).toFixed(2)
774
- if (isNaN(this.f_items[this.f_gas_balance.index].f_item_value)) {
775
- this.f_items[this.f_gas_balance.index].f_item_value = null
776
- }
777
- }
778
-
779
- // 只有两个值都填了才会计算
780
- if (!this.f_items[this.f_table_base.index].f_item_value || !this.f_items[this.f_gas_balance.index].f_item_value) {
781
- return
782
- }
783
- //tag)
784
- //tag
785
- //tag
786
-
787
- // 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
788
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_total_gas.index].f_item_value - this.f_items[this.f_gas_balance.index].f_item_value - (this.f_items[this.f_table_base.index].f_item_value - (this.f_initial_base.index?this.f_items[this.f_initial_base.index].f_item_value:0))
789
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_gas_aberrant_number.index].f_item_value.toFixed(3)
790
- // 如果数值有误,清空结果s
791
- if (isNaN(this.f_items[this.f_gas_aberrant_number.index].f_item_value)) {
792
- this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
793
- }
794
- //tag ===> ' + Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value))
795
- //tag ===> ' + JSON.stringify(Number(this.gasDeviation)))
796
- // 计算差值是否在范围内
797
- if (Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) > Number(this.gasDeviation)|| Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) < Number(this.gasDeviation) * -1) {
798
- this.f_items[this.f_gas_aberrant_number.index].f_is_defect = true
799
- this.f_items[this.f_gas_aberrant_number.index].f_deal_dispose = '未处理'
800
- }else{
801
- this.f_items[this.f_gas_aberrant_number.index].f_is_defect = null
802
- this.f_items[this.f_gas_aberrant_number.index].f_deal_dispose = null
803
- }
804
-
805
- //tag)
806
- },
807
- getFeeAberrantNumber(val) {
808
- //tag
809
- // 只有两个值都填了才会计算
810
- if(!this.f_fee_base.index || !this.f_fee_balance.index){
811
- //tag
812
- return
813
- }
814
- // 先清空
815
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
816
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
817
-
818
- if(val=='已用金额'){
819
- this.f_items[this.f_fee_balance.index].f_item_value=(this.f_items[this.f_total_fee.index].f_item_value-this.f_items[this.f_fee_base.index].f_item_value).toFixed(3)
820
- if (isNaN(this.f_items[this.f_fee_balance.index].f_item_value)) {
821
- this.f_items[this.f_fee_balance.index].f_item_value = null
822
- }
823
- }
824
-
825
- if (!this.f_items[this.f_fee_base.index].f_item_value || !this.f_items[this.f_fee_balance.index].f_item_value) {
826
- return
827
- }
828
-
829
- // 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
830
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_total_fee.index].f_item_value - this.f_items[this.f_fee_balance.index].f_item_value - this.f_items[this.f_fee_base.index].f_item_value
831
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_aberrant_number.index].f_item_value.toFixed(3)
832
- if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
833
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
834
- }
835
- //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
836
- //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
837
- // 计算差值是否在范围内
838
- if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
839
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
840
- this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = '未处理'
841
- }else{
842
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = null
843
- this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = null
844
- }
845
-
846
- //tag)
847
- },
848
- // 计算剩余金额和剩余金额差值
849
- getFeeAberrantNumber2(val) {
850
- //tag
851
- // 只有两个值都填了才会计算
852
- if(!this.f_table_balance.index || !this.f_fee_balance.index){
853
- //tag
854
- return
855
- }
856
- // 先清空
857
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
858
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
859
-
860
- // 计算公式 => 金额异常差值 = 系统剩余金额 - 表端剩余金额
861
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_balance.index].f_item_value - this.f_items[this.f_table_balance.index].f_item_value
862
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_aberrant_number.index].f_item_value.toFixed(3)
863
- if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
864
- this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
865
- }
866
- //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
867
- //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
868
- // 计算差值是否在范围内
869
- if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
870
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
871
- this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = '未处理'
872
- }else{
873
- this.f_items[this.f_fee_aberrant_number.index].f_is_defect = null
874
- this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = null
875
- }
876
- console.log('--------------------------------')
877
- console.log(this.f_items[this.f_fee_aberrant_number.index].f_item_value)
878
-
879
- //tag)
880
- },
881
- //物联网表字轮数改变触发
882
- getmeteraberrantnumber() {
883
- //tag
884
-
885
- // 先清空
886
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
887
- this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = false
888
- //tag
889
- // 只有两个值都填了才会计算
890
- if (!this.f_items[this.f_meter_base.index].f_item_value || !this.f_items[this.f_meter_base1.index].f_item_value) {
891
- return
892
- }
893
- //tag
894
- // 计算公式 => 表数异常差值= - 字轮数 - 后台表读数
895
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_base1.index].f_item_value - this.f_items[this.f_meter_base.index].f_item_value
896
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_aberrant_number1.index].f_item_value.toFixed(3)
897
- if (isNaN(this.f_items[this.f_meter_aberrant_number1.index].f_item_value)) {
898
- this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
899
- }
900
- //tag ===> ' + Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value))
901
- // 计算差值是否在范围内
902
- //tag)
903
- if (Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value) > Number(this.meterbase)){
904
- this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = true
905
- }
906
-
907
- //tag)
908
- },
909
-
910
- disSelect(index, itemValue) {
911
- //tag)
912
- //tag)
913
- if (this.f_items[index].f_item_value == itemValue) {
914
- this.$set(`f_items[${index}].f_item_value`, '')
915
- }
916
- }
917
- },
918
- ready() {
919
- //tag
920
- //tag
921
- if(Vue.config.safecheck != undefined){
922
- if(Vue.config.safecheck.ApproveConfig != undefined){
923
- if(Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
924
- this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
925
- }
926
- if(Vue.config.safecheck.ApproveConfig.dealdispose != undefined) {
927
- this.dealdispose = Vue.config.safecheck.ApproveConfig.dealdispose
928
- }
929
- if(Vue.config.safecheck.ApproveConfig.showtorepair) {
930
- this.deals=[{label: '现场整改', value: '现场整改'},
931
- {label: '自行处理', value: '自行处理'},
932
- {label: '转维修', value: '报修'}
933
- ]
934
- }
935
- if(Vue.config.safecheck.ApproveConfig.Processing) {
936
- if(Vue.config.safecheck.ApproveConfig.Processing.length > 0){
937
- this.deals = Vue.config.safecheck.ApproveConfig.Processing
938
- }
939
- }
940
- if(Vue.config.safecheck.ApproveConfig.showXCImg) {
941
- this.showXCImg = true
942
- }
943
- if(Vue.config.safecheck.ApproveConfig.showZXTime) {
944
- this.showZXTime = true
945
- }
946
- if(Vue.config.safecheck.ApproveConfig.showtorepair) {
947
- }
948
- if(Vue.config.safecheck.ApproveConfig.hiddendanger != undefined) {
949
- if (parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger) >= 5) {
950
- this.hiddenDangerImgNumber = 5
951
- }else {
952
- this.hiddenDangerImgNumber = parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger)
953
- }
954
- }
955
- }
956
- }
957
- //tag
958
- //tag)
959
- //tag)
960
- //tag)
961
- //创建页面所需数据
962
- this.$set('piece', this.paper['device'+this.device.n][this.idx])
963
- //tag)
964
- //tag)
965
- let n = 0
966
- for (let item in this.config[this.device.device].items) {
967
- if(typeof this.config[this.device.device].items[item]=='function'){
968
- continue
969
- }
970
- let index = this.config[this.device.device].items[item].index-1
971
- this.$set('page.options' + index, [])
972
- //tag)
973
- //tag)
974
- //tag)
975
- // 先根据配置组接页面
976
- let f_item_value
977
- if(this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'checkbox'){
978
- f_item_value = []
979
- // 判断选项的默认值
980
- for (let defitem in this.config[this.device.device].items[item].options) {
981
- if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
982
- continue
983
- }
984
- let defopt = this.config[this.device.device].items[item].options[defitem]
985
- if (defopt.isdefault) {
986
- //tag
987
- f_item_value[0] = defopt.data
988
- }
989
- }
990
- // if(this.config[this.device.device].items[item].data){
991
- // f_item_value.push(this.config[this.device.device].items[item].data)
992
- // }
993
- }else if(this.config[this.device.device].items[item].type == 'radio'){
994
- //为radio添加默认值
995
- f_item_value=''
996
- //tag)
997
- for (let defitem in this.config[this.device.device].items[item].options) {
998
- if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
999
- continue
1000
- }
1001
- //tag)
1002
- let defopt = this.config[this.device.device].items[item].options[defitem]
1003
- if (defopt.isdefault) {
1004
- //tag)
1005
- f_item_value = defopt.data
1006
- }
1007
- }
1008
- }else{
1009
- f_item_value = this.config[this.device.device].items[item].data ? this.config[this.device.device].items[item].data : ''
1010
- }
1011
- //tag)
1012
- let it = {
1013
- type: this.config[this.device.device].items[item].type,
1014
- f_item_name: item,
1015
- checkmust: this.config[this.device.device].items[item].checkmust,
1016
- f_item_index: this.config[this.device.device].items[item].index,
1017
- f_sequence_index: this.config[this.device.device].index,
1018
- f_item_value: f_item_value,
1019
- is_verification:this.config[this.device.device].items[item].is_verification,
1020
- verification_text:'',
1021
- verification_state:'',// ai验证是否通过 npass(未通过)/pass(通过)
1022
- f_is_defect: '',
1023
- multiple:this.config[this.device.device].items[item].multiple == true?this.config[this.device.device].items[item].multiple:false,
1024
- isshow:this.config[this.device.device].items[item].isshow == false?this.config[this.device.device].items[item].isshow:true,
1025
- readonly: this.config[this.device.device].items[item].readonly == true?true:false,
1026
- remark: this.config[this.device.device].items[item].remark ? this.config[this.device.device].items[item].remark : '',
1027
- f_path: '',
1028
- unit: this.config[this.device.device].items[item].unit ? this.config[this.device.device].items[item].unit : '',
1029
- tooltip:'',
1030
- f_live_dispose:'',
1031
- f_deal_dispose:'',
1032
- f_else: '',
1033
- f_p1_path: '',
1034
- f_p2_path: '',
1035
- f_p3_path: '',
1036
- f_longitude:'',
1037
- f_latitude:''
1038
- }
1039
- //tag)
1040
- //tag)
1041
- this.$set('f_items['+index+']',it)
1042
- if (this.config[this.device.device].items[item].type == 'selector' ||this.config[this.device.device].items[item].type == 'inputSelector') {
1043
- if(this.config[this.device.device].items[item].type == 'selector'){
1044
- this.page['options' + index].push({
1045
- label: "请选择",
1046
- value: ''
1047
- })
1048
- }
1049
- for (let i in this.config[this.device.device].items[item].options) {
1050
- if(typeof this.config[this.device.device].items[item].options[i]=='function'){
1051
- continue
1052
- }
1053
- this.page['options' + index].push({
1054
- label: this.config[this.device.device].items[item].options[i].data,
1055
- value: this.config[this.device.device].items[item].options[i].data,
1056
- tooltip: this.config[this.device.device].items[item].options[i].tooltip
1057
- })
1058
- }
1059
- if(this.config[this.device.device].items[item].type == 'selector'){
1060
- this.$set('f_items['+index+'].selected', f_item_value)
1061
- }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
1062
- this.$set('f_items['+index+'].selected', f_item_value)
1063
- }
1064
-
1065
- this.$set('f_items['+index+'].options',this.page['options' + index])
1066
-
1067
- //tag)
1068
- } else if (this.config[this.device.device].items[item].type == 'radio' || this.config[this.device.device].items[item].type == 'checkbox') {
1069
- //tag)
1070
- //tag
1071
- //tag)
1072
- for (let i in this.config[this.device.device].items[item].options) {
1073
- if(typeof this.config[this.device.device].items[item].options[i]=='function'){
1074
- continue
1075
- }
1076
- //tag
1077
- this.page['options' + index].push({
1078
- label: this.config[this.device.device].items[item].options[i].data,
1079
- value: this.config[this.device.device].items[item].options[i].data,
1080
- isdefect: this.config[this.device.device].items[item].options[i].isdefect,
1081
- level: this.config[this.device.device].items[item].options[i].level,
1082
- tooltip: this.config[this.device.device].items[item].options[i].tooltip
1083
- })
1084
- //tag)
1085
- }
1086
- //tag)
1087
- this.$set('f_items[' + index + '].options', this.page['options' + index])
1088
- this.$set('f_items[' + index + '].f_item_value', f_item_value)
1089
- //tag)
1090
- }
1091
- n = n + 1
1092
- }
1093
- if(!this.piece || JSON.stringify(this.piece) == '{}') {
1094
- // 如果没有,则新建
1095
- this.$set('piece.f_items',this.f_items)
1096
- this.$set('piece.f_device_type',this.device.device)
1097
- } else {
1098
- // 已经存在,把之前的数据重新填入
1099
- for (let f in this.f_items){
1100
- if(typeof this.f_items[f]=='function'){
1101
- continue
1102
- }
1103
- for(let p in this.piece.f_items) {
1104
- if(typeof this.piece.f_items[p]=='function'){
1105
- continue
1106
- }
1107
- if (this.f_items[f].f_item_name == this.piece.f_items[p].f_item_name) {
1108
- //tag)
1109
- //tag)
1110
- this.f_items[f] = Object.assign(this.f_items[f], this.piece.f_items[p])
1111
- //tag)
1112
- if (this.f_items[f].type == 'selector' || this.f_items[f].type == 'inputSelector') {
1113
- //tag)
1114
- //tag)
1115
- this.f_items[f].selected = this.piece.f_items[p].f_item_value
1116
- //tag)
1117
- }
1118
- // 取出特殊值
1119
- if (this.f_items[f].f_item_name == '初始表底') {
1120
- //tag)
1121
- this.f_initial_base.index = f
1122
- } else if (this.f_items[f].f_item_name == '累购气量') {
1123
- //tag)
1124
- this.f_total_gas.index = f
1125
- } else if (this.f_items[f].f_item_name == '已用气量') {
1126
- //tag)
1127
- this.f_table_base.index = f
1128
- this.$watch('f_items[' + f + '].f_item_value', function () {
1129
- this.getGasAberrantNumber('已用气量')
1130
- })
1131
- } else if (this.f_items[f].f_item_name == '剩余气量') {
1132
- //tag)
1133
- this.f_gas_balance.index = f
1134
- this.$watch('f_items[' + f + '].f_item_value', function () {
1135
- this.getGasAberrantNumber('')
1136
- })
1137
- } else if (this.f_items[f].f_item_name == '气量异常差值') {
1138
- //tag)
1139
- this.f_gas_aberrant_number.index = f
1140
- } else if (this.f_items[f].f_item_name == '累购金额') {
1141
- //tag)
1142
- this.f_total_fee.index = f
1143
- } else if (this.f_items[f].f_item_name == '已用金额') {
1144
- //tag)
1145
- this.f_fee_base.index = f
1146
- this.$watch('f_items[' + f + '].f_item_value', function () {
1147
- this.getFeeAberrantNumber('已用金额')
1148
- })
1149
- } else if (this.f_items[f].f_item_name == '剩余金额') {
1150
- //tag)
1151
- this.f_fee_balance.index = f
1152
- this.$watch('f_items[' + f + '].f_item_value', function () {
1153
- this.getFeeAberrantNumber('')
1154
- this.getFeeAberrantNumber2('')
1155
- })
1156
- } else if (this.f_items[f].f_item_name == '表端剩余金额') {
1157
- this.f_table_balance.index = f
1158
- this.$watch('f_items[' + f + '].f_item_value', function () {
1159
- this.getFeeAberrantNumber2('')
1160
- })
1161
- } else if (this.f_items[f].f_item_name == '金额异常差值') {
1162
- //tag)
1163
- this.f_fee_aberrant_number.index = f
1164
- }else if (this.f_items[f].f_item_name == '表读数') {
1165
- //tag)
1166
- this.f_meter_base.index = f
1167
- }else if (this.f_items[f].f_item_name == '表剩余金额') {
1168
- //tag)
1169
- this.f_balance_amount.index = f
1170
- }else if (this.f_items[f].f_item_name == '字轮数') {
1171
- //tag)
1172
- this.f_meter_base1.index = f
1173
- this.$watch('f_items[' + f + '].f_item_value', function () {
1174
- this.getmeteraberrantnumber()
1175
- })
1176
- }else if (this.f_items[f].f_item_name == '表余额') {
1177
- //tag)
1178
- this.f_balance_amount1.index = f
1179
- this.$watch('f_items[' + f + '].f_item_value', function () {
1180
- this.getfeeaberrantnumber1()
1181
- })
1182
- }else if (this.f_items[f].f_item_name == '表数异常差值') {
1183
- //tag)
1184
- this.f_meter_aberrant_number1.index = f
1185
- }else if (this.f_items[f].f_item_name == '表金额异常差值') {
1186
- //tag)
1187
- this.f_fee_aberrant_number1.index = f
1188
- }
1189
- }
1190
- }
1191
- for (let em in this.config[this.device.device].items) {
1192
- if(typeof this.config[this.device.device].items[em]=='function'){
1193
- continue
1194
- }
1195
- if (this.config[this.device.device].items[em].type == 'selector' && em == this.f_items[f].f_item_name) {
1196
- this.f_items[f].options =[]
1197
- for (let k in this.config[this.device.device].items[em].options) {
1198
- if(typeof this.config[this.device.device].items[em].options[k]=='function'){
1199
- continue
1200
- }
1201
- this.f_items[f].options.push({
1202
- label: this.config[this.device.device].items[em].options[k].data,
1203
- value: this.config[this.device.device].items[em].options[k].data
1204
- })
1205
- }
1206
- }
1207
- }
1208
- }
1209
- //tag)
1210
- this.$set('piece.f_items',this.f_items)
1211
- }
1212
- this.towatch()
1213
- },
1214
- destroyed(){
1215
- let nullCount = 0
1216
- let metertitles
1217
- //判断当前是否有选中项
1218
- for (let row in this.f_items){
1219
- if(typeof this.f_items[row]=='function'){
1220
- continue
1221
- }
1222
- if(this.f_items[row].selected && this.f_items[row].selected != '' && this.f_items[row].selected instanceof Array){
1223
- //tag
1224
- this.f_items[row].f_item_value = this.f_items[row].selected
1225
- }else if(this.f_items[row].selected && this.f_items[row].selected != ''){
1226
- //tag
1227
- this.f_items[row].f_item_value = this.f_items[row].selected
1228
- }
1229
- // if(this.f_items[row].f_item_value instanceof Array && this.f_items[row].f_item_value.length != 0 ){
1230
- // nullCount = nullCount+1
1231
- // }else if(this.f_items[row].f_item_value != ''){
1232
- // nullCount = nullCount+1
1233
- // }
1234
- }
1235
- let picture = []
1236
- // for (let row in this.f_items){
1237
- // let a={}
1238
- // a.f_path = this.f_items[row].f_path
1239
- // a.name = this.f_items[row].f_item_name
1240
- // }
1241
- // picture.push(a)
1242
- this.$set(`paper['device${this.device.n}'][${this.idx}]`, this.piece)
1243
- //tag
1244
- },
1245
- computed:{
1246
-
1247
- }
1248
- }
1249
- </script>
1250
- <style lang="less" scoped>
1251
- .class-erro {
1252
- color: #a94442;
1253
- }
1254
- .fivelabel{
1255
- border: none;
1256
- border-left: 5px solid #A2C2EB;
1257
- float: left;
1258
- width: 35%;
1259
- margin-bottom: 3px;
1260
- text-align: left;
1261
- word-wrap: break-word;
1262
- white-space: normal;
1263
- }
1264
- .radiolabel{
1265
- border: none;
1266
- border-left: 5px solid #A2C2EB;
1267
- float: left;
1268
- width: 65%;
1269
- margin-bottom: 3px;
1270
- text-align: left;
1271
- word-wrap: break-word;
1272
- white-space: normal;
1273
- }
1274
-
1275
- .textlabel {
1276
- border: none;
1277
- border-left: 5px solid #A2C2EB;
1278
- width: 100%;
1279
- margin-bottom: 3px;
1280
- text-align: left;
1281
- word-wrap: break-word;
1282
- white-space: normal;
1283
- }
1284
- .textlabel1 {
1285
- border: none;
1286
- border-left: 5px solid #f7cb32;
1287
- width: 100%;
1288
- margin-bottom: 3px;
1289
- text-align: left;
1290
- word-wrap: break-word;
1291
- white-space: normal;
1292
- }
1293
- .spanrodio{
1294
- margin-right: 10px;
1295
- }
1296
- .div-photo{
1297
- width: auto;
1298
- height: auto;
1299
- /* margin-top: 10px; */
1300
- position: absolute;
1301
- bottom: 10px;
1302
- right: 10px;
1303
- }
1304
- .panel-self{
1305
- border-radius: 5px;
1306
- border:1px solid #c5e1f7;
1307
- //background-color: #F2F6FA;
1308
- }
1309
- .btn-photo{
1310
- border: 0;
1311
- border-radius: 7px;
1312
- background-color: #7dc1f4;
1313
- font: 15px PingFang-SC-Bold;
1314
- height: 20%;
1315
- }
1316
- </style>
1317
-
1
+ <template>
2
+ <div class="select-overspread repair-bg auto" style="padding-bottom:5px;">
3
+ <!--<div class="bq-parent" v-if="shutype == 'heng'">-->
4
+ <!--<blockquote class="blockquote">-->
5
+ <!--<p><span>{{repairitem.header}}</span><a @click="mute()" style="float:right" href="#" class="repair-mute-class"><img src="../../assets/novoice.png" width="25px;" alt=""><span style="margin-left:10px;color: #304A66">关闭声音</span></a></p>-->
6
+ <!--</blockquote>-->
7
+ <!--</div>-->
8
+ <div class="panel panel-default auto repair-info-content">
9
+ <div class="panel-body" style="padding: 0">
10
+ <!-- 安检项内容 -->
11
+ <div class="auto repair-info-content compatible" style="padding: 0">
12
+ <div class="row auto" style="padding: 0">
13
+ <div v-show="false" class="{{shuclass}}" v-if=" device.device != '燃气表'">
14
+ <button type="button" name="button" class="btn btn-primary" @click='adddetails()' :disabled="issee">增加</button>
15
+ </div>
16
+ <!--<div class="{{shuclass}}" v-if="device.device != '燃气表' && candelete">-->
17
+ <!--<button type="button" name="button" class="btn btn-primary" @click='deletedetails()' :disabled="issee">删除</button>-->
18
+ <!--</div>-->
19
+ <div class="shuclass1" v-show="row.isshow" v-for="(idxs,row) in f_items" style="padding: 4px; border:1px solid #D4D4D4;border-bottom: 0" >
20
+ <label v-if="row.type != 'radio' && row.type != 'text' && row.type != 'picture' && row.type != 'checkbox'" v-show="row.isshow" class="fivelabel">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
21
+ <label v-if="row.type == 'radio'" v-show="row.isshow" class="radiolabel">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
22
+ <label v-if="row.type == 'text'" v-show="row.isshow" class="textlabel1">{{row.f_item_name}}<span v-if="row.unit">({{row.unit}})</span><br/>{{row.remark}}</label>
23
+ <label v-if="row.type == 'picture' || row.type == 'checkbox'" v-show="row.isshow" class="textlabel">{{row.f_item_name}} <br/>{{row.remark}} <span v-show="row.verification_state" :style="{color:row.verification_state==='pass'?'green':'red'}">{{row.verification_text}}</span></label>
24
+ <!--<span v-if="show" style="font-weight:bold">{{row.f_content}}</span>-->
25
+ <!--<datepicker placeholder="请选择时间"-->
26
+ <!--:value.sync="row.f_content"-->
27
+ <!--v-model="row.f_content"-->
28
+ <!--:format="'yyyy-MM-dd'"-->
29
+ <!--v-if="!show && row.type == 'date'"-->
30
+ <!--:readonly="true"-->
31
+ <!--&gt;</datepicker>-->
32
+ <div style="clear: both" v-if="row.type == 'picture'" class="form-group col-sm-12" >
33
+ <div class="auto" >
34
+ <div class="panel">
35
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
36
+ <div class="row" style="height: 160px;width:160px;overflow: scroll;top: 1px">
37
+ <div class="col-sm-4" v-show="row.f_path">
38
+ <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
39
+ </div>
40
+ <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name,null,row)">
41
+ <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
42
+ </div>
43
+ <img v-show="row.f_path" src="../../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ <div style="clear: both" v-if="row.type == 'picture' && row.f_item_name == '燃气表照片'" class="form-group col-sm-12" >
50
+ <div class="auto" >
51
+ <div class="panel">
52
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
53
+ <div class="row" style="height: 160px;width:160px;overflow: scroll;top: 1px">
54
+ <div class="col-sm-4" v-show="row.f_p1_path">
55
+ <img-self :src="row.f_p1_path" :alt="row.f_item_name" width="140" height="140"></img-self>
56
+ </div>
57
+ <div class="col-sm-4" v-show="!row.f_p1_path" @click="takePic(idxs, row.f_item_name,'f_p1_path',row)">
58
+ <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
59
+ </div>
60
+ <img v-show="row.f_p1_path" src="../../../assets/remove.png" :class="style__" @click="delfile(idxs,row.f_p1_path,'f_p1_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ <div style="float: left;width:60%" class="form-group" v-if="row.type == 'string'" v-show="row.isshow">
67
+ <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" :readonly="role == 'androidview' || row.readonly">
68
+ </div>
69
+ <div style="float: left;width:60%" class="form-group col-sm-12" v-if="row.type == 'date'" v-show="row.isshow">
70
+ <datepicker id="f_making_date" :placeholder= row.f_item_name
71
+ :value.sync="row.f_item_value"
72
+ v-if="row.type == 'date'"
73
+ v-show="row.isshow"
74
+ :disabled-days-of-Week="[]"
75
+ :format="'yyyy-MM-dd HH:mm:ss'"
76
+ :show-reset-button="reset" readonly="readonly">
77
+ </datepicker>
78
+ </div>
79
+
80
+ <div style="float: left;width:60%" class="form-group" v-if="!show && row.type == 'number'" v-show="row.isshow">
81
+ <input type="text" class="form-control" maxlength="100" v-model="row.f_item_value" onkeyup="value=value.replace(/[^\d\.-]/g,'')" :readonly="row.readonly">
82
+ </div>
83
+ <!--<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">-->
84
+ <!--<input type="text" class="form-control" v-model="meternum" v-if="!show && row.type == 'string' && row.f_project == '表号' " :disabled="(!(ischecked == '有')) || issee" :readonly="issee" >-->
85
+ <!--<button type="button" name="button" class="btn btn-primary" @click="scan" v-if="!show && row.f_project == '表号' ">扫码</button>-->
86
+ <input-select v-if="row.type == 'inputSelector'"
87
+ v-show="row.isshow"
88
+ :value.sync="row.selected"
89
+ v-model="row.selected"
90
+ :readonly="false"
91
+ :options="row.options"
92
+ @change="changse"
93
+ @click="transelation(idxs)"></input-select>
94
+ <v-select style="float: left" :value.sync="row.selected"
95
+ v-model="row.selected"
96
+ v-if="row.type == 'selector'"
97
+ :search="false"
98
+ v-show="row.isshow"
99
+ placeholder='请选择'
100
+ :options="row.options"
101
+ :disabled="role == 'androidview' || row.readonly"
102
+ @change="changse"
103
+ @click="transelation(idxs)"
104
+ :multiple="row.multiple"
105
+ :close-on-select="!row.multiple" clear-button></v-select>
106
+ <div style="float: left;width: 30%" class="form-group" v-if="!show && row.type == 'radio'">
107
+ <div class="col-xs-6 col-sm-6 col-md-6" v-for="item in row.options">
108
+ <!-- <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" >-->
109
+ <input type="radio" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value" >
110
+ <span>{{item.label}}</span>
111
+ </div>
112
+ </div>
113
+ <div v-if="!show && row.type == 'checkbox'" class="col-xs-12 col-sm-12 col-md-12" style="white-space: nowrap" >
114
+ <div style="float: left" v-for="item in row.options">
115
+ <input type="checkbox" :name="row.f_item_name" :value="item.value" :disabled="(!(ischecked == '有')) || issee" v-model="row.f_item_value">
116
+ <span>{{item.label}}</span>
117
+ </div>
118
+ </div>
119
+ <div style="clear: both">
120
+ <label v-if="row.f_item_value.indexOf('其他') >-1" class="fivelabel">其他</label>
121
+ <div style="float: left;width:60%" class="form-group" v-if="row.f_item_value.indexOf('其他') >-1">
122
+ <input type="text" class="form-control" maxlength="100" v-model="row.f_else" :readonly="role == 'androidview' || row.readonly">
123
+ </div>
124
+ </div>
125
+ <div style="clear: both">
126
+ <!-- <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) " >-->
127
+ <!-- <label class="fivelabel">现场已处理</label>-->
128
+ <!-- <v-select :value="row.f_live_dispose"-->
129
+ <!-- :value-single="true"-->
130
+ <!-- :options="lives"-->
131
+ <!-- :disabled="role == 'androidview'"-->
132
+ <!-- @change="changlive"-->
133
+ <!-- @click="transelation(idxs)"-->
134
+ <!-- close-on-select clear-button></v-select>-->
135
+ <!-- </div>-->
136
+ <div class="form-group" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '') && (dealdispose == 'true' || dealdispose == true) " >
137
+ <label class="fivelabel">处理方式</label>
138
+ <v-select
139
+ :value="row.f_deal_dispose"
140
+ :value-single="true"
141
+ :options="deals"
142
+ :disabled="role == 'androidview'"
143
+ @change="changdeal"
144
+ @click="transelation(idxs)"
145
+ close-on-select clear-button>
146
+ </v-select>
147
+ </div>
148
+ <div style="display: flex;flex-wrap: wrap" v-if="row.f_deal_dispose == '自行处理' && this.showZXTime">
149
+ <label class="fivelabel">处理时效:</label>
150
+ <datepicker
151
+ :value.sync="row.f_handle_date"
152
+ v-model="row.f_handle_date"
153
+ :format="'yyyy-MM-dd 00:00:00'"
154
+ placeholder="请选择"
155
+ style="width: 60%">
156
+ </datepicker>
157
+ </div>
158
+ <div style="margin-left: 10px" class="form-group col-sm-10" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && row.tooltip != undefined && row.tooltip != '' ">
159
+ ☆{{row.tooltip}}
160
+ </div>
161
+ <div class="form-group col-sm-12" style="display: flex;flex-wrap: wrap" v-if="(row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && (row.f_path != '' || row.f_is_defect != '')">
162
+ <div class="auto" style="margin:1px;">
163
+ <div class="panel">
164
+ <div class="panel-body panel-self" 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_path">
167
+ <img-self :src="row.f_path" :alt="row.f_item_name" width="140" height="140"></img-self>
168
+ </div>
169
+ <div class="col-sm-4" v-show="!row.f_path" @click="takePic(idxs, row.f_item_name,null,row)">
170
+ <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
171
+ </div>
172
+ <img v-show="row.f_path" src="../../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_path)" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
173
+ </div>
174
+ </div>
175
+ </div>
176
+ </div>
177
+ <!--多张隐患照片-->
178
+ <div class="auto" v-for="itemIndex in hiddenDangerImgNumber" style="margin: 1px;">
179
+ <div class="panel">
180
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
181
+ <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
182
+ <div class="col-sm-4" v-show="row['f_p' + (itemIndex+1) + '_path']">
183
+ <img-self :src="row['f_p' + (itemIndex+1) + '_path']" :alt="row.f_item_name" width="140" height="140"></img-self>
184
+ </div>
185
+ <div class="col-sm-4" v-show="!row['f_p' + (itemIndex+1) + '_path']" @click="takePic(idxs, row.f_item_name,'f_p' + (itemIndex+1)+ '_path',row)">
186
+ <img src="../../../assets/tackpic.png" :alt="点击拍摄照片" width="140" height="140"></img>
187
+ </div>
188
+ <img v-show="row['f_p' + (itemIndex+1)+'_path']" src="../../../assets/remove.png" :class="style__" @click="delfile(idxs,row['f_p' + (itemIndex+1)+'_path'],'f_p' + (itemIndex+1)+ '_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
189
+ </div >
190
+ </div>
191
+ </div>
192
+ </div>
193
+ <div style="display: flex;flex-wrap: wrap;margin-top: 10px" v-if="row.f_deal_dispose == '现场整改' && (row.type == 'selector' || row.type == 'radio' || row.type =='checkbox') && this.showXCImg">
194
+ <label class="fivelabel">整改照片:</label>
195
+ <div class="auto" style="margin:1px;">
196
+ <div class="panel">
197
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 160px;height: 160px;position: relative">
198
+ <div class="col-xs-6" style="height: 160px;width:160px;overflow: scroll;top: 1px">
199
+ <div class="col-sm-4" v-show="row.f_repair_path">
200
+ <img-self :src="row.f_repair_path" :alt="row.f_item_name" width="140" height="140"></img-self>
201
+ </div>
202
+ <div class="col-sm-4" v-show="!row.f_repair_path" @click="takePic(idxs, row.f_item_name,'f_repair_path',row)">
203
+ <img src="../../../assets/tackpic.png" alt="点击拍摄照片" width="140" height="140"></img>
204
+ </div>
205
+ <img v-show="row.f_repair_path" src="../../../assets/remove.png" :class="style__" @click="delfile(idxs, row.f_repair_path, 'f_repair_path')" v-if="role!='androidview'" style="width: 40px;height: 40px;position: absolute;left:110px;top:110px"></img>
206
+ </div>
207
+ </div>
208
+ </div>
209
+ </div>
210
+ </div>
211
+ </div>
212
+ </div>
213
+
214
+ <!--<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 != '气表品牌'"-->
215
+ <!--&gt;</v-select>-->
216
+ <!--<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 == '气表品牌'"-->
217
+ <!--&gt;</v-select>-->
218
+ <!-- <div class="auto" v-if="!show && row.type == 'checkbox' ">-->
219
+ <!-- <input class="magic-checkbox" type="checkbox" id="shebeicheckbox"-->
220
+ <!-- :checked="row.f_content == '有'"-->
221
+ <!-- @click="switchDetails(row.f_project, $event)" :disabled="issee"/>-->
222
+ <!-- <label for="shebeicheckbox" style="width:150px;padding-bottom: 10px">{{row.f_project}}</label>-->
223
+ <!-- </div>-->
224
+ <!--<img-area :model="Detail.imgs" :sutitle="row.f_project" v-if="row.type == 'picture'" :disabled="issee"></img-area>-->
225
+ </div>
226
+ </div>
227
+ </div>
228
+ <div style="border-top: 1px solid #D4D4D4"></div>
229
+ </div>
230
+ </div>
231
+ </div>
232
+ </template>
233
+ <script>
234
+ import Vue from 'vue'
235
+ import * as Util from '../../Util'
236
+
237
+ export default {
238
+ title: '维修列表信息',
239
+ data() {
240
+ return {
241
+ // telphoneValid: '/^((0\\d{2,3}-\\d{7,8})|(1[3584]\\d{9}))$/',
242
+ // meterstyle:[],
243
+ hiddenDangerImgNumber:0,//隐患图片数
244
+ shuclass:'col-xs-12 col-sm-12 col-md-12 form-input-group mg8',
245
+ shuclass1:'col-xs-12 col-sm-12 col-md-12 mg8',
246
+ // labels:[],
247
+ meternum:'',
248
+ ischecked:'有',
249
+ gasmodel:'',
250
+ textstyle:'color: red',
251
+ paper: this.$parent.$parent.data,
252
+ f_items:[],
253
+ page:{},
254
+ selectindex:null,
255
+ lives:[{label: '是', value: '是'},{label: '否', value: '否'}],
256
+ deals:[{label: '自行处理', value: '自行处理'}],
257
+ f_live_dispose:'否',
258
+ f_deal_dispose:'未处理',
259
+ // 初始表底
260
+ f_initial_base: {},
261
+ // 气量异常差值 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
262
+ f_gas_aberrant_number: {},
263
+ // 金额异常差值 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
264
+ f_fee_aberrant_number: {},
265
+ // 累购气量
266
+ f_total_gas: {},
267
+ // 累购金额
268
+ f_total_fee: {},
269
+ // 已用气量
270
+ f_table_base: {},
271
+ // 已用金额
272
+ f_fee_base: {},
273
+ // 剩余气量
274
+ f_gas_balance: {},
275
+ // 剩余金额
276
+ f_fee_balance: {},
277
+ // 表端剩余金额
278
+ f_table_balance: {},
279
+ // 气量异常差值允许误差
280
+
281
+ //物联网表数据存储
282
+ f_balance_amount:{},//物联网表剩余金额
283
+ f_meter_base:{},//物联网表读数
284
+ f_balance_amount1:{},//物联网表现场录入的表上剩余金额
285
+ f_meter_base1:{},//物联网表现场录入的表字轮数
286
+ f_meter_aberrant_number1: {},//物联网表 表数异常差值
287
+ f_fee_aberrant_number1: {},//物联网 表金额异常差值
288
+ gasDeviation: (
289
+ function (_this) {
290
+ let deviation = _this.$appdata.getSingleValue('气量异常差值允许误差')
291
+ if (deviation && !isNaN(deviation)) {
292
+ return deviation
293
+ } else {
294
+ return 0
295
+ }
296
+ }
297
+ )(this),
298
+ // 金额异常差值允许误差
299
+ feeDeviation: (
300
+ function (_this) {
301
+ let deviation = _this.$appdata.getSingleValue('金额异常差值允许误差')
302
+ if (deviation && !isNaN(deviation)) {
303
+ return deviation
304
+ } else {
305
+ return 0
306
+ }
307
+ }
308
+ )(this),
309
+ // 字轮异常差值允许误差
310
+ meterbase: (
311
+ function (_this) {
312
+ let deviation = _this.$appdata.getSingleValue('字轮异常差值允许误差')
313
+ if (deviation && !isNaN(deviation)) {
314
+ return deviation
315
+ } else {
316
+ return 0
317
+ }
318
+ }
319
+ )(this),
320
+ showElse:false, //控制其他选项是否显示
321
+ showXCImg: false, // 是否显示现场整改拍照选项
322
+ showZXTime: false // 是否显示自行整改处理时效
323
+ }
324
+ },
325
+ props: ['config','device','idx','operation','role'],
326
+ // props: {
327
+ // // 维修对应的用户数据收集
328
+ // model: {
329
+ // type: Object
330
+ // },
331
+ // service:{
332
+ // type: Object
333
+ // },
334
+ // show: {
335
+ // type: Boolean,
336
+ // default: false
337
+ // },
338
+ // repairitem:{
339
+ // type: Object
340
+ // },
341
+ // shutype:'heng',
342
+ // tabs:{
343
+ // type: Object
344
+ // },
345
+ // repairdetails:{
346
+ // type: Object
347
+ // },
348
+ // faultshow:{
349
+ // type: Object
350
+ // },
351
+ // issee:''
352
+ // },
353
+ methods: {
354
+ changse(val){
355
+ if(val == undefined){
356
+ return
357
+ }
358
+ if(this.selectindex != null) {
359
+ if(this.f_items[this.selectindex].type == 'selector'){
360
+ this.f_items[this.selectindex].f_item_value = val
361
+ }else if(this.f_items[this.selectindex].type == 'inputSelector'){
362
+ this.f_items[this.selectindex].f_item_value = val.target.value
363
+ }
364
+ }
365
+ },
366
+ changlive(val){
367
+ if(val == undefined){
368
+ return
369
+ }
370
+ if(this.selectindex != null) {
371
+ this.f_items[this.selectindex].f_live_dispose = val
372
+ }
373
+ },
374
+ changdeal(val){
375
+ if(val == undefined){
376
+ return
377
+ }
378
+ if(this.selectindex != null) {
379
+ this.f_items[this.selectindex].f_deal_dispose = val
380
+ }
381
+ },
382
+ switchDetails(detailsType, event){
383
+ if (event.srcElement.checked) {
384
+ for(var i = 0;i<this.Detail.details.length;i++){
385
+ if(this.Detail.details[i].f_project == detailsType){
386
+ this.Detail.details[i].f_content = '有'
387
+ this.ischecked = '有'
388
+ return
389
+ }
390
+ }
391
+ } else {
392
+ this.Detail.imgs = []
393
+ for(var i = 0;i<this.Detail.details.length;i++){
394
+ if(this.Detail.details[i].f_project == detailsType){
395
+ this.Detail.details[i].f_content = '无'
396
+ this.ischecked = '无'
397
+ }else{
398
+ this.Detail.details[i].f_content = ''
399
+ }
400
+ }
401
+ }
402
+ },
403
+ getgasmodel(val){
404
+ this.gasmodel = val
405
+ },
406
+ getradios(val,flag){
407
+ let Reoptions = []
408
+ for (let i = 0;i<this.repairdetails.length;i++) {
409
+ var t = false
410
+ if(this.repairdetails[i].f_type == this.repairitem.header ){
411
+ for(var j =0;j<this.repairdetails[i].details.length;j++){
412
+ if(this.repairdetails[i].details[j].f_project == val ){
413
+ Reoptions = this.repairdetails[i].details[j].options
414
+ t = true
415
+ break
416
+ }
417
+ }
418
+ }
419
+ if(t){
420
+ break
421
+ }
422
+ }
423
+ for(let j = 0;j<Reoptions.length;j++){
424
+ if(Reoptions[j].data == flag){
425
+ for(var e = 0;e<this.Detail.details.length;e++){
426
+ if(this.Detail.details[e].f_project == val){
427
+ this.Detail.details[e].f_status = Reoptions[j].f_status
428
+ return
429
+ }
430
+ }
431
+ break
432
+ }
433
+ }
434
+ },
435
+ deletedetails(){
436
+ this.$showMessage('该操作会删除所填信息,是否继续!', ['confirm', 'cancel']).then((res) => {
437
+ if (res === 'confirm') {
438
+ for(var i = 0;i<this.tabs.length;i++){
439
+ if(this.tabs[i].number == this.repairitem.number){
440
+ this.tabs.splice(i, 1)
441
+ this.model.servicerepair.splice(this.repairitem.number, 1)
442
+ for(let t = i;t < this.tabs.length;t++ ) {
443
+ this.tabs[t].number -= 1
444
+ }
445
+ return
446
+ }
447
+ }
448
+ }
449
+ })
450
+ },
451
+ takePic(prop, title, pathname='null',row) {
452
+ if (this.role == 'androidview') {
453
+ return
454
+ }
455
+ HostApp.__callback__ = this.cameraCallBack
456
+ HostApp.__this__ = this
457
+ //tag
458
+ let fileName
459
+ if (pathname == 'null') {
460
+ if (!this.f_items[prop].f_path || this.f_items[prop].f_path.includes("nopic.png")) {
461
+ fileName = Util.guid() + '-' + 'device-' + row.f_sequence_index + '-f_items' + row.f_item_index + '.jpg'
462
+ } else {
463
+ fileName = Util.getFileName(this.f_items[prop].f_path)
464
+ }
465
+ } else {
466
+ if (!this.f_items[prop][pathname] || this.f_items[prop][pathname].includes("nopic.png")) {
467
+ fileName = Util.guid() + '-' + 'device-' + row.f_sequence_index + '-f_items' + row.f_item_index + '.jpg'
468
+ } else {
469
+ fileName = Util.getFileName(this.f_items[prop][pathname])
470
+ }
471
+ }
472
+ let jingweidu = ''
473
+ if (this.$parent.$parent.is_has_jingweidu == 'true'){
474
+ const obj = HostApp.getGpsDetailAddress()
475
+ jingweidu = '\t经度:' + obj.longitude+ '\t纬度:' + obj.latitude
476
+ this.f_items[prop].f_longitude = obj.longitude
477
+ this.f_items[prop].f_latitude = obj.latitude
478
+ }
479
+ //tag
480
+ //tag
481
+ HostApp._open_a_page({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
+ getGasAberrantNumber(val) {
763
+ //tag
764
+ if(!this.f_table_base.index || !this.f_gas_balance.index){
765
+ //tag
766
+ return
767
+ }
768
+ // 先清空
769
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
770
+ this.f_items[this.f_gas_aberrant_number.index].f_is_defect = false
771
+ if(val=='已用气量'){
772
+ //剩余气量 = 累购-已用
773
+ this.f_items[this.f_gas_balance.index].f_item_value= (this.f_items[this.f_total_gas.index].f_item_value-this.f_items[this.f_table_base.index].f_item_value).toFixed(2)
774
+ if (isNaN(this.f_items[this.f_gas_balance.index].f_item_value)) {
775
+ this.f_items[this.f_gas_balance.index].f_item_value = null
776
+ }
777
+ }
778
+
779
+ // 只有两个值都填了才会计算
780
+ if (!this.f_items[this.f_table_base.index].f_item_value || !this.f_items[this.f_gas_balance.index].f_item_value) {
781
+ return
782
+ }
783
+ //tag)
784
+ //tag
785
+ //tag
786
+
787
+ // 计算公式 => 气量异常差值 = 累计购气量 - (已用气量 - 初始表底) - 剩余气量
788
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_total_gas.index].f_item_value - this.f_items[this.f_gas_balance.index].f_item_value - (this.f_items[this.f_table_base.index].f_item_value - (this.f_initial_base.index?this.f_items[this.f_initial_base.index].f_item_value:0))
789
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = this.f_items[this.f_gas_aberrant_number.index].f_item_value.toFixed(3)
790
+ // 如果数值有误,清空结果s
791
+ if (isNaN(this.f_items[this.f_gas_aberrant_number.index].f_item_value)) {
792
+ this.f_items[this.f_gas_aberrant_number.index].f_item_value = null
793
+ }
794
+ //tag ===> ' + Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value))
795
+ //tag ===> ' + JSON.stringify(Number(this.gasDeviation)))
796
+ // 计算差值是否在范围内
797
+ if (Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) > Number(this.gasDeviation)|| Math.abs(this.f_items[this.f_gas_aberrant_number.index].f_item_value) < Number(this.gasDeviation) * -1) {
798
+ this.f_items[this.f_gas_aberrant_number.index].f_is_defect = true
799
+ this.f_items[this.f_gas_aberrant_number.index].f_deal_dispose = '未处理'
800
+ }else{
801
+ this.f_items[this.f_gas_aberrant_number.index].f_is_defect = null
802
+ this.f_items[this.f_gas_aberrant_number.index].f_deal_dispose = null
803
+ }
804
+
805
+ //tag)
806
+ },
807
+ getFeeAberrantNumber(val) {
808
+ //tag
809
+ // 只有两个值都填了才会计算
810
+ if(!this.f_fee_base.index || !this.f_fee_balance.index){
811
+ //tag
812
+ return
813
+ }
814
+ // 先清空
815
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
816
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
817
+
818
+ if(val=='已用金额'){
819
+ this.f_items[this.f_fee_balance.index].f_item_value=(this.f_items[this.f_total_fee.index].f_item_value-this.f_items[this.f_fee_base.index].f_item_value).toFixed(3)
820
+ if (isNaN(this.f_items[this.f_fee_balance.index].f_item_value)) {
821
+ this.f_items[this.f_fee_balance.index].f_item_value = null
822
+ }
823
+ }
824
+
825
+ if (!this.f_items[this.f_fee_base.index].f_item_value || !this.f_items[this.f_fee_balance.index].f_item_value) {
826
+ return
827
+ }
828
+
829
+ // 计算公式 => 金额异常差值 = 累计购金额 - 已用金额 - 剩余金额
830
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_total_fee.index].f_item_value - this.f_items[this.f_fee_balance.index].f_item_value - this.f_items[this.f_fee_base.index].f_item_value
831
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_aberrant_number.index].f_item_value.toFixed(3)
832
+ if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
833
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
834
+ }
835
+ //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
836
+ //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
837
+ // 计算差值是否在范围内
838
+ if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
839
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
840
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = '未处理'
841
+ }else{
842
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = null
843
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = null
844
+ }
845
+
846
+ //tag)
847
+ },
848
+ // 计算剩余金额和剩余金额差值
849
+ getFeeAberrantNumber2(val) {
850
+ //tag
851
+ // 只有两个值都填了才会计算
852
+ if(!this.f_table_balance.index || !this.f_fee_balance.index){
853
+ //tag
854
+ return
855
+ }
856
+ // 先清空
857
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
858
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = false
859
+
860
+ // 计算公式 => 金额异常差值 = 系统剩余金额 - 表端剩余金额
861
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_balance.index].f_item_value - this.f_items[this.f_table_balance.index].f_item_value
862
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = this.f_items[this.f_fee_aberrant_number.index].f_item_value.toFixed(3)
863
+ if (isNaN(this.f_items[this.f_fee_aberrant_number.index].f_item_value)) {
864
+ this.f_items[this.f_fee_aberrant_number.index].f_item_value = null
865
+ }
866
+ //tag ===> ' + Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value))
867
+ //tag ===> ' + JSON.stringify(Number(this.feeDeviation)))
868
+ // 计算差值是否在范围内
869
+ if (Math.abs(this.f_items[this.f_fee_aberrant_number.index].f_item_value) > Number(this.feeDeviation)) {
870
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = true
871
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = '未处理'
872
+ }else{
873
+ this.f_items[this.f_fee_aberrant_number.index].f_is_defect = null
874
+ this.f_items[this.f_fee_aberrant_number.index].f_deal_dispose = null
875
+ }
876
+ console.log('--------------------------------')
877
+ console.log(this.f_items[this.f_fee_aberrant_number.index].f_item_value)
878
+
879
+ //tag)
880
+ },
881
+ //物联网表字轮数改变触发
882
+ getmeteraberrantnumber() {
883
+ //tag
884
+
885
+ // 先清空
886
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
887
+ this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = false
888
+ //tag
889
+ // 只有两个值都填了才会计算
890
+ if (!this.f_items[this.f_meter_base.index].f_item_value || !this.f_items[this.f_meter_base1.index].f_item_value) {
891
+ return
892
+ }
893
+ //tag
894
+ // 计算公式 => 表数异常差值= - 字轮数 - 后台表读数
895
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_base1.index].f_item_value - this.f_items[this.f_meter_base.index].f_item_value
896
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = this.f_items[this.f_meter_aberrant_number1.index].f_item_value.toFixed(3)
897
+ if (isNaN(this.f_items[this.f_meter_aberrant_number1.index].f_item_value)) {
898
+ this.f_items[this.f_meter_aberrant_number1.index].f_item_value = null
899
+ }
900
+ //tag ===> ' + Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value))
901
+ // 计算差值是否在范围内
902
+ //tag)
903
+ if (Math.abs(this.f_items[this.f_meter_aberrant_number1.index].f_item_value) > Number(this.meterbase)){
904
+ this.f_items[this.f_meter_aberrant_number1.index].f_is_defect = true
905
+ }
906
+
907
+ //tag)
908
+ },
909
+
910
+ disSelect(index, itemValue) {
911
+ //tag)
912
+ //tag)
913
+ if (this.f_items[index].f_item_value == itemValue) {
914
+ this.$set(`f_items[${index}].f_item_value`, '')
915
+ }
916
+ }
917
+ },
918
+ ready() {
919
+ //tag
920
+ //tag
921
+ if(Vue.config.safecheck != undefined){
922
+ if(Vue.config.safecheck.ApproveConfig != undefined){
923
+ if(Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
924
+ this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
925
+ }
926
+ if(Vue.config.safecheck.ApproveConfig.dealdispose != undefined) {
927
+ this.dealdispose = Vue.config.safecheck.ApproveConfig.dealdispose
928
+ }
929
+ if(Vue.config.safecheck.ApproveConfig.showtorepair) {
930
+ this.deals=[{label: '现场整改', value: '现场整改'},
931
+ {label: '自行处理', value: '自行处理'},
932
+ {label: '转维修', value: '报修'}
933
+ ]
934
+ }
935
+ if(Vue.config.safecheck.ApproveConfig.Processing) {
936
+ if(Vue.config.safecheck.ApproveConfig.Processing.length > 0){
937
+ this.deals = Vue.config.safecheck.ApproveConfig.Processing
938
+ }
939
+ }
940
+ if(Vue.config.safecheck.ApproveConfig.showXCImg) {
941
+ this.showXCImg = true
942
+ }
943
+ if(Vue.config.safecheck.ApproveConfig.showZXTime) {
944
+ this.showZXTime = true
945
+ }
946
+ if(Vue.config.safecheck.ApproveConfig.showtorepair) {
947
+ }
948
+ if(Vue.config.safecheck.ApproveConfig.hiddendanger != undefined) {
949
+ if (parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger) >= 5) {
950
+ this.hiddenDangerImgNumber = 5
951
+ }else {
952
+ this.hiddenDangerImgNumber = parseInt(Vue.config.safecheck.ApproveConfig.hiddendanger)
953
+ }
954
+ }
955
+ }
956
+ }
957
+ //tag
958
+ //tag)
959
+ //tag)
960
+ //tag)
961
+ //创建页面所需数据
962
+ this.$set('piece', this.paper['device'+this.device.n][this.idx])
963
+ //tag)
964
+ //tag)
965
+ let n = 0
966
+ for (let item in this.config[this.device.device].items) {
967
+ if(typeof this.config[this.device.device].items[item]=='function'){
968
+ continue
969
+ }
970
+ let index = this.config[this.device.device].items[item].index-1
971
+ this.$set('page.options' + index, [])
972
+ //tag)
973
+ //tag)
974
+ //tag)
975
+ // 先根据配置组接页面
976
+ let f_item_value
977
+ if(this.config[this.device.device].items[item].type == 'selector' || this.config[this.device.device].items[item].type == 'checkbox'){
978
+ f_item_value = []
979
+ // 判断选项的默认值
980
+ for (let defitem in this.config[this.device.device].items[item].options) {
981
+ if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
982
+ continue
983
+ }
984
+ let defopt = this.config[this.device.device].items[item].options[defitem]
985
+ if (defopt.isdefault) {
986
+ //tag
987
+ f_item_value[0] = defopt.data
988
+ }
989
+ }
990
+ // if(this.config[this.device.device].items[item].data){
991
+ // f_item_value.push(this.config[this.device.device].items[item].data)
992
+ // }
993
+ }else if(this.config[this.device.device].items[item].type == 'radio'){
994
+ //为radio添加默认值
995
+ f_item_value=''
996
+ //tag)
997
+ for (let defitem in this.config[this.device.device].items[item].options) {
998
+ if(typeof this.config[this.device.device].items[item].options[defitem]=='function'){
999
+ continue
1000
+ }
1001
+ //tag)
1002
+ let defopt = this.config[this.device.device].items[item].options[defitem]
1003
+ if (defopt.isdefault) {
1004
+ //tag)
1005
+ f_item_value = defopt.data
1006
+ }
1007
+ }
1008
+ }else{
1009
+ f_item_value = this.config[this.device.device].items[item].data ? this.config[this.device.device].items[item].data : ''
1010
+ }
1011
+ //tag)
1012
+ let it = {
1013
+ type: this.config[this.device.device].items[item].type,
1014
+ f_item_name: item,
1015
+ checkmust: this.config[this.device.device].items[item].checkmust,
1016
+ f_item_index: this.config[this.device.device].items[item].index,
1017
+ f_sequence_index: this.config[this.device.device].index,
1018
+ f_item_value: f_item_value,
1019
+ is_verification:this.config[this.device.device].items[item].is_verification,
1020
+ verification_text:'',
1021
+ verification_state:'',// ai验证是否通过 npass(未通过)/pass(通过)
1022
+ f_is_defect: '',
1023
+ multiple:this.config[this.device.device].items[item].multiple == true?this.config[this.device.device].items[item].multiple:false,
1024
+ isshow:this.config[this.device.device].items[item].isshow == false?this.config[this.device.device].items[item].isshow:true,
1025
+ readonly: this.config[this.device.device].items[item].readonly == true?true:false,
1026
+ remark: this.config[this.device.device].items[item].remark ? this.config[this.device.device].items[item].remark : '',
1027
+ f_path: '',
1028
+ unit: this.config[this.device.device].items[item].unit ? this.config[this.device.device].items[item].unit : '',
1029
+ tooltip:'',
1030
+ f_live_dispose:'',
1031
+ f_deal_dispose:'',
1032
+ f_else: '',
1033
+ f_p1_path: '',
1034
+ f_p2_path: '',
1035
+ f_p3_path: '',
1036
+ f_longitude:'',
1037
+ f_latitude:''
1038
+ }
1039
+ //tag)
1040
+ //tag)
1041
+ this.$set('f_items['+index+']',it)
1042
+ if (this.config[this.device.device].items[item].type == 'selector' ||this.config[this.device.device].items[item].type == 'inputSelector') {
1043
+ if(this.config[this.device.device].items[item].type == 'selector'){
1044
+ this.page['options' + index].push({
1045
+ label: "请选择",
1046
+ value: ''
1047
+ })
1048
+ }
1049
+ for (let i in this.config[this.device.device].items[item].options) {
1050
+ if(typeof this.config[this.device.device].items[item].options[i]=='function'){
1051
+ continue
1052
+ }
1053
+ this.page['options' + index].push({
1054
+ label: this.config[this.device.device].items[item].options[i].data,
1055
+ value: this.config[this.device.device].items[item].options[i].data,
1056
+ tooltip: this.config[this.device.device].items[item].options[i].tooltip
1057
+ })
1058
+ }
1059
+ if(this.config[this.device.device].items[item].type == 'selector'){
1060
+ this.$set('f_items['+index+'].selected', f_item_value)
1061
+ }else if(this.config[this.device.device].items[item].type == 'inputSelector'){
1062
+ this.$set('f_items['+index+'].selected', f_item_value)
1063
+ }
1064
+
1065
+ this.$set('f_items['+index+'].options',this.page['options' + index])
1066
+
1067
+ //tag)
1068
+ } else if (this.config[this.device.device].items[item].type == 'radio' || this.config[this.device.device].items[item].type == 'checkbox') {
1069
+ //tag)
1070
+ //tag
1071
+ //tag)
1072
+ for (let i in this.config[this.device.device].items[item].options) {
1073
+ if(typeof this.config[this.device.device].items[item].options[i]=='function'){
1074
+ continue
1075
+ }
1076
+ //tag
1077
+ this.page['options' + index].push({
1078
+ label: this.config[this.device.device].items[item].options[i].data,
1079
+ value: this.config[this.device.device].items[item].options[i].data,
1080
+ isdefect: this.config[this.device.device].items[item].options[i].isdefect,
1081
+ level: this.config[this.device.device].items[item].options[i].level,
1082
+ tooltip: this.config[this.device.device].items[item].options[i].tooltip
1083
+ })
1084
+ //tag)
1085
+ }
1086
+ //tag)
1087
+ this.$set('f_items[' + index + '].options', this.page['options' + index])
1088
+ this.$set('f_items[' + index + '].f_item_value', f_item_value)
1089
+ //tag)
1090
+ }
1091
+ n = n + 1
1092
+ }
1093
+ if(!this.piece || JSON.stringify(this.piece) == '{}') {
1094
+ // 如果没有,则新建
1095
+ this.$set('piece.f_items',this.f_items)
1096
+ this.$set('piece.f_device_type',this.device.device)
1097
+ } else {
1098
+ // 已经存在,把之前的数据重新填入
1099
+ for (let f in this.f_items){
1100
+ if(typeof this.f_items[f]=='function'){
1101
+ continue
1102
+ }
1103
+ for(let p in this.piece.f_items) {
1104
+ if(typeof this.piece.f_items[p]=='function'){
1105
+ continue
1106
+ }
1107
+ if (this.f_items[f].f_item_name == this.piece.f_items[p].f_item_name) {
1108
+ //tag)
1109
+ //tag)
1110
+ this.f_items[f] = Object.assign(this.f_items[f], this.piece.f_items[p])
1111
+ //tag)
1112
+ if (this.f_items[f].type == 'selector' || this.f_items[f].type == 'inputSelector') {
1113
+ //tag)
1114
+ //tag)
1115
+ this.f_items[f].selected = this.piece.f_items[p].f_item_value
1116
+ //tag)
1117
+ }
1118
+ // 取出特殊值
1119
+ if (this.f_items[f].f_item_name == '初始表底') {
1120
+ //tag)
1121
+ this.f_initial_base.index = f
1122
+ } else if (this.f_items[f].f_item_name == '累购气量') {
1123
+ //tag)
1124
+ this.f_total_gas.index = f
1125
+ } else if (this.f_items[f].f_item_name == '已用气量') {
1126
+ //tag)
1127
+ this.f_table_base.index = f
1128
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1129
+ this.getGasAberrantNumber('已用气量')
1130
+ })
1131
+ } else if (this.f_items[f].f_item_name == '剩余气量') {
1132
+ //tag)
1133
+ this.f_gas_balance.index = f
1134
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1135
+ this.getGasAberrantNumber('')
1136
+ })
1137
+ } else if (this.f_items[f].f_item_name == '气量异常差值') {
1138
+ //tag)
1139
+ this.f_gas_aberrant_number.index = f
1140
+ } else if (this.f_items[f].f_item_name == '累购金额') {
1141
+ //tag)
1142
+ this.f_total_fee.index = f
1143
+ } else if (this.f_items[f].f_item_name == '已用金额') {
1144
+ //tag)
1145
+ this.f_fee_base.index = f
1146
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1147
+ this.getFeeAberrantNumber('已用金额')
1148
+ })
1149
+ } else if (this.f_items[f].f_item_name == '剩余金额') {
1150
+ //tag)
1151
+ this.f_fee_balance.index = f
1152
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1153
+ this.getFeeAberrantNumber('')
1154
+ this.getFeeAberrantNumber2('')
1155
+ })
1156
+ } else if (this.f_items[f].f_item_name == '表端剩余金额') {
1157
+ this.f_table_balance.index = f
1158
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1159
+ this.getFeeAberrantNumber2('')
1160
+ })
1161
+ } else if (this.f_items[f].f_item_name == '金额异常差值') {
1162
+ //tag)
1163
+ this.f_fee_aberrant_number.index = f
1164
+ }else if (this.f_items[f].f_item_name == '表读数') {
1165
+ //tag)
1166
+ this.f_meter_base.index = f
1167
+ }else if (this.f_items[f].f_item_name == '表剩余金额') {
1168
+ //tag)
1169
+ this.f_balance_amount.index = f
1170
+ }else if (this.f_items[f].f_item_name == '字轮数') {
1171
+ //tag)
1172
+ this.f_meter_base1.index = f
1173
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1174
+ this.getmeteraberrantnumber()
1175
+ })
1176
+ }else if (this.f_items[f].f_item_name == '表余额') {
1177
+ //tag)
1178
+ this.f_balance_amount1.index = f
1179
+ this.$watch('f_items[' + f + '].f_item_value', function () {
1180
+ this.getfeeaberrantnumber1()
1181
+ })
1182
+ }else if (this.f_items[f].f_item_name == '表数异常差值') {
1183
+ //tag)
1184
+ this.f_meter_aberrant_number1.index = f
1185
+ }else if (this.f_items[f].f_item_name == '表金额异常差值') {
1186
+ //tag)
1187
+ this.f_fee_aberrant_number1.index = f
1188
+ }
1189
+ }
1190
+ }
1191
+ for (let em in this.config[this.device.device].items) {
1192
+ if(typeof this.config[this.device.device].items[em]=='function'){
1193
+ continue
1194
+ }
1195
+ if (this.config[this.device.device].items[em].type == 'selector' && em == this.f_items[f].f_item_name) {
1196
+ this.f_items[f].options =[]
1197
+ for (let k in this.config[this.device.device].items[em].options) {
1198
+ if(typeof this.config[this.device.device].items[em].options[k]=='function'){
1199
+ continue
1200
+ }
1201
+ this.f_items[f].options.push({
1202
+ label: this.config[this.device.device].items[em].options[k].data,
1203
+ value: this.config[this.device.device].items[em].options[k].data
1204
+ })
1205
+ }
1206
+ }
1207
+ }
1208
+ }
1209
+ //tag)
1210
+ this.$set('piece.f_items',this.f_items)
1211
+ }
1212
+ this.towatch()
1213
+ },
1214
+ destroyed(){
1215
+ let nullCount = 0
1216
+ let metertitles
1217
+ //判断当前是否有选中项
1218
+ for (let row in this.f_items){
1219
+ if(typeof this.f_items[row]=='function'){
1220
+ continue
1221
+ }
1222
+ if(this.f_items[row].selected && this.f_items[row].selected != '' && this.f_items[row].selected instanceof Array){
1223
+ //tag
1224
+ this.f_items[row].f_item_value = this.f_items[row].selected
1225
+ }else if(this.f_items[row].selected && this.f_items[row].selected != ''){
1226
+ //tag
1227
+ this.f_items[row].f_item_value = this.f_items[row].selected
1228
+ }
1229
+ // if(this.f_items[row].f_item_value instanceof Array && this.f_items[row].f_item_value.length != 0 ){
1230
+ // nullCount = nullCount+1
1231
+ // }else if(this.f_items[row].f_item_value != ''){
1232
+ // nullCount = nullCount+1
1233
+ // }
1234
+ }
1235
+ let picture = []
1236
+ // for (let row in this.f_items){
1237
+ // let a={}
1238
+ // a.f_path = this.f_items[row].f_path
1239
+ // a.name = this.f_items[row].f_item_name
1240
+ // }
1241
+ // picture.push(a)
1242
+ this.$set(`paper['device${this.device.n}'][${this.idx}]`, this.piece)
1243
+ //tag
1244
+ },
1245
+ computed:{
1246
+
1247
+ }
1248
+ }
1249
+ </script>
1250
+ <style lang="less" scoped>
1251
+ .class-erro {
1252
+ color: #a94442;
1253
+ }
1254
+ .fivelabel{
1255
+ border: none;
1256
+ border-left: 5px solid #A2C2EB;
1257
+ float: left;
1258
+ width: 35%;
1259
+ margin-bottom: 3px;
1260
+ text-align: left;
1261
+ word-wrap: break-word;
1262
+ white-space: normal;
1263
+ }
1264
+ .radiolabel{
1265
+ border: none;
1266
+ border-left: 5px solid #A2C2EB;
1267
+ float: left;
1268
+ width: 65%;
1269
+ margin-bottom: 3px;
1270
+ text-align: left;
1271
+ word-wrap: break-word;
1272
+ white-space: normal;
1273
+ }
1274
+
1275
+ .textlabel {
1276
+ border: none;
1277
+ border-left: 5px solid #A2C2EB;
1278
+ width: 100%;
1279
+ margin-bottom: 3px;
1280
+ text-align: left;
1281
+ word-wrap: break-word;
1282
+ white-space: normal;
1283
+ }
1284
+ .textlabel1 {
1285
+ border: none;
1286
+ border-left: 5px solid #f7cb32;
1287
+ width: 100%;
1288
+ margin-bottom: 3px;
1289
+ text-align: left;
1290
+ word-wrap: break-word;
1291
+ white-space: normal;
1292
+ }
1293
+ .spanrodio{
1294
+ margin-right: 10px;
1295
+ }
1296
+ .div-photo{
1297
+ width: auto;
1298
+ height: auto;
1299
+ /* margin-top: 10px; */
1300
+ position: absolute;
1301
+ bottom: 10px;
1302
+ right: 10px;
1303
+ }
1304
+ .panel-self{
1305
+ border-radius: 5px;
1306
+ border:1px solid #c5e1f7;
1307
+ //background-color: #F2F6FA;
1308
+ }
1309
+ .btn-photo{
1310
+ border: 0;
1311
+ border-radius: 7px;
1312
+ background-color: #7dc1f4;
1313
+ font: 15px PingFang-SC-Bold;
1314
+ height: 20%;
1315
+ }
1316
+ </style>
1317
+