safecheck-client 4.0.2-48 → 4.0.2-49

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