safecheck-client 3.0.35-38 → 3.0.35-39

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