safecheck-client 3.0.33-99 → 3.0.34-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/android.html +18 -18
  4. package/build/css-loaders.js +34 -34
  5. package/build/dev-android.js +151 -151
  6. package/build/dev-client.js +8 -8
  7. package/build/release.sh +28 -28
  8. package/build/utils.js +71 -71
  9. package/build/webpack.baseandroid.conf.js +83 -83
  10. package/build/webpack.devandroid.conf.js +33 -33
  11. package/build/webpack.hanwei.conf.js +57 -57
  12. package/build/webpack.hwbase.conf.js +78 -78
  13. package/build/webpack.prodandroid.conf.js +60 -60
  14. package/build/webpack.test.conf.js +31 -31
  15. package/config/dev.env.js +6 -6
  16. package/config/index.js +38 -38
  17. package/config/prod.env.js +3 -3
  18. package/config/test.env.js +6 -6
  19. package/docs/AppBase.md +22 -22
  20. package/docs/Busy.md +14 -14
  21. package/docs/Criteria.md +47 -47
  22. package/docs/CriteriaPaged.md +47 -47
  23. package/docs/DataGrid.md +54 -54
  24. package/docs/DataModel.md +22 -22
  25. package/docs/Dynamic.md +42 -42
  26. package/docs/FormPrint.md +18 -18
  27. package/docs/GetParams.md +11 -11
  28. package/docs/GridTree.md +47 -47
  29. package/docs/HttpBusy.md +13 -13
  30. package/docs/HttpStore.md +29 -29
  31. package/docs/MessageBox.md +28 -28
  32. package/docs/PagedList.md +29 -29
  33. package/docs/Pager.md +21 -21
  34. package/docs/PrintFile.md +38 -38
  35. package/docs/Project.md +23 -23
  36. package/docs/Route.md +105 -105
  37. package/docs/SafetyCheck/AdjustPlan.md +13 -13
  38. package/docs/SafetyCheck/CheckerPlan.md +12 -12
  39. package/docs/Task.md +46 -46
  40. package/docs/TreeList.md +28 -28
  41. package/docs/TreeMixin.md +18 -18
  42. package/docs/all.md +10 -10
  43. package/docs/list.md +42 -42
  44. package/docs/partial.md +75 -75
  45. package/docs/selector.md +82 -82
  46. package/docs/tree.md +40 -40
  47. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/Snippets.md +28 -28
  48. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue-strap/345/217/230/346/233/264/350/256/260/345/275/225.md +7 -7
  49. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue/345/217/230/346/233/264/350/256/260/345/275/225.md +13 -13
  50. package/docs//345/274/200/345/217/221/346/226/207/346/241/243//345/274/200/345/217/221/347/216/257/345/242/203/350/256/276/347/275/256.md +77 -77
  51. package/docs//347/225/214/351/235/242/345/210/266/344/275/234/350/247/204/350/214/203.md +54 -54
  52. package/examples/AddressList/App.vue +13 -13
  53. package/examples/AddressList/index.html +11 -11
  54. package/examples/DispatchList/App.vue +10 -10
  55. package/examples/DispatchList/BaseTree.vue +13 -13
  56. package/examples/DispatchList/Init.vue +22 -22
  57. package/examples/DispatchList/Test.vue +20 -20
  58. package/examples/DispatchList/index.html +11 -11
  59. package/examples/DispatchList/main.js +18 -18
  60. package/home.html +16 -16
  61. package/package.json +3 -4
  62. package/publish.bat +7 -7
  63. package/release.bat +5 -5
  64. package/src/Widget.vue +13 -13
  65. package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  66. package/src/android-bootstrap/less/.csscomb.json +304 -304
  67. package/src/android-bootstrap/less/.csslintrc +19 -19
  68. package/src/android-bootstrap/less/alerts.less +73 -73
  69. package/src/android-bootstrap/less/badges.less +66 -66
  70. package/src/android-bootstrap/less/bootstrap.less +56 -56
  71. package/src/android-bootstrap/less/breadcrumbs.less +26 -26
  72. package/src/android-bootstrap/less/button-groups.less +247 -247
  73. package/src/android-bootstrap/less/buttons.less +173 -173
  74. package/src/android-bootstrap/less/carousel.less +269 -269
  75. package/src/android-bootstrap/less/close.less +34 -34
  76. package/src/android-bootstrap/less/code.less +69 -69
  77. package/src/android-bootstrap/less/component-animations.less +33 -33
  78. package/src/android-bootstrap/less/grid.less +84 -84
  79. package/src/android-bootstrap/less/input-groups.less +167 -167
  80. package/src/android-bootstrap/less/jumbotron.less +52 -52
  81. package/src/android-bootstrap/less/labels.less +64 -64
  82. package/src/android-bootstrap/less/list-group.less +141 -141
  83. package/src/android-bootstrap/less/media.less +66 -66
  84. package/src/android-bootstrap/less/mixins/alerts.less +14 -14
  85. package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
  86. package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
  87. package/src/android-bootstrap/less/mixins/buttons.less +69 -69
  88. package/src/android-bootstrap/less/mixins/center-block.less +7 -7
  89. package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
  90. package/src/android-bootstrap/less/mixins/forms.less +90 -90
  91. package/src/android-bootstrap/less/mixins/gradients.less +59 -59
  92. package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
  93. package/src/android-bootstrap/less/mixins/grid.less +122 -122
  94. package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
  95. package/src/android-bootstrap/less/mixins/image.less +33 -33
  96. package/src/android-bootstrap/less/mixins/labels.less +12 -12
  97. package/src/android-bootstrap/less/mixins/list-group.less +30 -30
  98. package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
  99. package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
  100. package/src/android-bootstrap/less/mixins/opacity.less +8 -8
  101. package/src/android-bootstrap/less/mixins/pagination.less +24 -24
  102. package/src/android-bootstrap/less/mixins/panels.less +24 -24
  103. package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
  104. package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
  105. package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
  106. package/src/android-bootstrap/less/mixins/resize.less +6 -6
  107. package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
  108. package/src/android-bootstrap/less/mixins/size.less +10 -10
  109. package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
  110. package/src/android-bootstrap/less/mixins/table-row.less +44 -44
  111. package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
  112. package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
  113. package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
  114. package/src/android-bootstrap/less/mixins.less +40 -40
  115. package/src/android-bootstrap/less/modals.less +151 -151
  116. package/src/android-bootstrap/less/navbar.less +660 -660
  117. package/src/android-bootstrap/less/navs.less +290 -290
  118. package/src/android-bootstrap/less/normalize.less +424 -424
  119. package/src/android-bootstrap/less/pager.less +76 -76
  120. package/src/android-bootstrap/less/pagination.less +89 -89
  121. package/src/android-bootstrap/less/panels.less +274 -274
  122. package/src/android-bootstrap/less/popovers.less +131 -131
  123. package/src/android-bootstrap/less/print.less +101 -101
  124. package/src/android-bootstrap/less/progress-bars.less +87 -87
  125. package/src/android-bootstrap/less/responsive-embed.less +35 -35
  126. package/src/android-bootstrap/less/responsive-utilities.less +194 -194
  127. package/src/android-bootstrap/less/scaffolding.less +161 -161
  128. package/src/android-bootstrap/less/tables.less +262 -262
  129. package/src/android-bootstrap/less/theme.less +291 -291
  130. package/src/android-bootstrap/less/thumbnails.less +36 -36
  131. package/src/android-bootstrap/less/tooltip.less +102 -102
  132. package/src/android-bootstrap/less/type.less +303 -303
  133. package/src/android-bootstrap/less/utilities.less +55 -55
  134. package/src/android-bootstrap/less/variables.less +896 -896
  135. package/src/android-bootstrap/less/wells.less +29 -29
  136. package/src/androidTest.js +20 -20
  137. package/src/bootstrap/less/.csscomb.json +304 -304
  138. package/src/bootstrap/less/.csslintrc +19 -19
  139. package/src/bootstrap/less/alerts.less +73 -73
  140. package/src/bootstrap/less/badges.less +66 -66
  141. package/src/bootstrap/less/breadcrumbs.less +26 -26
  142. package/src/bootstrap/less/button-groups.less +247 -247
  143. package/src/bootstrap/less/buttons.less +172 -172
  144. package/src/bootstrap/less/carousel.less +269 -269
  145. package/src/bootstrap/less/close.less +34 -34
  146. package/src/bootstrap/less/code.less +69 -69
  147. package/src/bootstrap/less/component-animations.less +33 -33
  148. package/src/bootstrap/less/dropdowns.less +216 -216
  149. package/src/bootstrap/less/forms.less +626 -626
  150. package/src/bootstrap/less/grid.less +84 -84
  151. package/src/bootstrap/less/input-groups.less +167 -167
  152. package/src/bootstrap/less/jumbotron.less +52 -52
  153. package/src/bootstrap/less/labels.less +64 -64
  154. package/src/bootstrap/less/list-group.less +141 -141
  155. package/src/bootstrap/less/media.less +66 -66
  156. package/src/bootstrap/less/mixins/alerts.less +14 -14
  157. package/src/bootstrap/less/mixins/background-variant.less +9 -9
  158. package/src/bootstrap/less/mixins/border-radius.less +18 -18
  159. package/src/bootstrap/less/mixins/buttons.less +69 -69
  160. package/src/bootstrap/less/mixins/center-block.less +7 -7
  161. package/src/bootstrap/less/mixins/clearfix.less +22 -22
  162. package/src/bootstrap/less/mixins/forms.less +90 -90
  163. package/src/bootstrap/less/mixins/gradients.less +59 -59
  164. package/src/bootstrap/less/mixins/grid-framework.less +92 -92
  165. package/src/bootstrap/less/mixins/grid.less +122 -122
  166. package/src/bootstrap/less/mixins/hide-text.less +21 -21
  167. package/src/bootstrap/less/mixins/image.less +33 -33
  168. package/src/bootstrap/less/mixins/labels.less +12 -12
  169. package/src/bootstrap/less/mixins/list-group.less +30 -30
  170. package/src/bootstrap/less/mixins/nav-divider.less +10 -10
  171. package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
  172. package/src/bootstrap/less/mixins/opacity.less +8 -8
  173. package/src/bootstrap/less/mixins/pagination.less +24 -24
  174. package/src/bootstrap/less/mixins/panels.less +24 -24
  175. package/src/bootstrap/less/mixins/progress-bar.less +10 -10
  176. package/src/bootstrap/less/mixins/reset-filter.less +8 -8
  177. package/src/bootstrap/less/mixins/reset-text.less +18 -18
  178. package/src/bootstrap/less/mixins/resize.less +6 -6
  179. package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
  180. package/src/bootstrap/less/mixins/size.less +10 -10
  181. package/src/bootstrap/less/mixins/tab-focus.less +9 -9
  182. package/src/bootstrap/less/mixins/table-row.less +44 -44
  183. package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
  184. package/src/bootstrap/less/mixins/text-overflow.less +8 -8
  185. package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
  186. package/src/bootstrap/less/mixins.less +40 -40
  187. package/src/bootstrap/less/modals.less +151 -151
  188. package/src/bootstrap/less/navbar.less +660 -660
  189. package/src/bootstrap/less/normalize.less +424 -424
  190. package/src/bootstrap/less/pager.less +76 -76
  191. package/src/bootstrap/less/pagination.less +89 -89
  192. package/src/bootstrap/less/panels.less +275 -275
  193. package/src/bootstrap/less/popovers.less +131 -131
  194. package/src/bootstrap/less/print.less +101 -101
  195. package/src/bootstrap/less/progress-bars.less +87 -87
  196. package/src/bootstrap/less/responsive-embed.less +35 -35
  197. package/src/bootstrap/less/responsive-utilities.less +194 -194
  198. package/src/bootstrap/less/scaffolding.less +161 -161
  199. package/src/bootstrap/less/theme.less +291 -291
  200. package/src/bootstrap/less/thumbnails.less +36 -36
  201. package/src/bootstrap/less/tooltip.less +102 -102
  202. package/src/bootstrap/less/type.less +303 -303
  203. package/src/bootstrap/less/utilities.less +55 -55
  204. package/src/bootstrap/less/wells.less +29 -29
  205. package/src/components/FileUpload.vue +696 -696
  206. package/src/components/Hello.vue +39 -39
  207. package/src/components/LeftTree.vue +27 -27
  208. package/src/components/Util/ImgSelfSafePlus.vue +7 -0
  209. package/src/components/Util.js +7 -0
  210. package/src/components/android/AddGas.vue +147 -147
  211. package/src/components/android/AddressList.vue +61 -61
  212. package/src/components/android/AreaPlan.vue +2 -1
  213. package/src/components/android/AttendanceTally.vue +116 -116
  214. package/src/components/android/Blank.vue +10 -10
  215. package/src/components/android/CheckUnplanPage.vue +56 -56
  216. package/src/components/android/Checker.vue +12 -12
  217. package/src/components/android/CheckerAnnual.vue +81 -81
  218. package/src/components/android/CheckerAvarta.vue +82 -82
  219. package/src/components/android/CheckerMonthly.vue +84 -84
  220. package/src/components/android/EquipmentInspection.vue +348 -348
  221. package/src/components/android/FootprintMap.vue +120 -120
  222. package/src/components/android/HiddentroubleInvestigation.vue +192 -192
  223. package/src/components/android/ImgSelfAndroid.vue +181 -181
  224. package/src/components/android/LcheckUnplan.vue +108 -108
  225. package/src/components/android/MasterMain.vue +77 -77
  226. package/src/components/android/Menu.vue +132 -132
  227. package/src/components/android/NavBottom.vue +157 -157
  228. package/src/components/android/PaperAlarm.vue +85 -85
  229. package/src/components/android/PaperDeviceNoncivil.vue +214 -214
  230. package/src/components/android/PlumberAnnual.vue +83 -83
  231. package/src/components/android/PlumberAnnualDetail.vue +65 -65
  232. package/src/components/android/PlumberMonthly.vue +84 -84
  233. package/src/components/android/PostMap.vue +83 -83
  234. package/src/components/android/QueryCheckHistory.vue +122 -122
  235. package/src/components/android/QueryCheckHistoryItem.vue +62 -62
  236. package/src/components/android/RepairMain.vue +60 -60
  237. package/src/components/android/Repairman.vue +12 -12
  238. package/src/components/android/SafePlanItem.vue +14 -2
  239. package/src/components/android/SafecheckDevices.vue +3 -1
  240. package/src/components/android/SafecheckOrderV.vue +18 -12
  241. package/src/components/android/StationMaster.vue +12 -12
  242. package/src/components/android/SwitchValve.vue +1 -1
  243. package/src/components/checkerphonestate/Checker.vue +32 -32
  244. package/src/components/checkerphonestate/CheckerState.vue +97 -97
  245. package/src/components/defects/AddDefectModal.vue +120 -120
  246. package/src/components/defects/AddDevice.vue +95 -95
  247. package/src/components/defects/DefectModal.vue +101 -101
  248. package/src/components/defects/DevicesAndItem.vue +39 -39
  249. package/src/components/defects/DevicesSeting.vue +106 -106
  250. package/src/components/issueplan/IssuePlanMain.vue +23 -23
  251. package/src/components/map/checkScreen.vue +27 -21
  252. package/src/components/metterfiles/AddUserfiles.vue +246 -246
  253. package/src/components/metterfiles/MetterFiles.vue +104 -104
  254. package/src/components/notice/NoticeForm.vue +100 -100
  255. package/src/components/notice/NoticeIssue.vue +20 -20
  256. package/src/components/notice/NoticeQuery.vue +76 -76
  257. package/src/components/paper/PicViewer.vue +18 -18
  258. package/src/components/paper/PlanChooser.vue +167 -167
  259. package/src/components/paper/RepairVerifyForm.vue +76 -76
  260. package/src/components/pc/NewCheckpaper.vue +11 -8
  261. package/src/components/phonestate/DailyTraffic.vue +57 -57
  262. package/src/components/phonestate/LastKnownState.vue +74 -74
  263. package/src/components/phonestate/MonthlyTraffic.vue +66 -66
  264. package/src/components/phonestate/MonthlyTrafficRouter.vue +15 -15
  265. package/src/components/phonestate/PostMap.vue +82 -82
  266. package/src/components/planmanage/PlanManage.vue +843 -836
  267. package/src/components/querycheckpaper/PaperItem.vue +59 -59
  268. package/src/components/rongcheng/AspiratedPaperFeedbackm.vue +2 -3
  269. package/src/components/rongcheng/PaperListNPSQ.vue +6 -5
  270. package/src/components/rongcheng/PaperListSQ.vue +1 -1
  271. package/src/components/safecheckNew/PaperList.vue +785 -0
  272. package/src/components/safecheckNew/android/AddPlanItem.vue +419 -0
  273. package/src/components/safecheckNew/android/AreaPlan.vue +561 -0
  274. package/src/components/safecheckNew/android/CurrentCreate.vue +1050 -0
  275. package/src/components/safecheckNew/android/Recheck.vue +379 -0
  276. package/src/components/safecheckNew/android/SafecheckDevices.vue +1400 -0
  277. package/src/components/safecheckNew/android/SafecheckOrderV.vue +2731 -0
  278. package/src/components/task/RepairAnnual.vue +79 -79
  279. package/src/components/task/RepairAnnualDetail.vue +49 -49
  280. package/src/components/task/RepairMonthly.vue +91 -91
  281. package/src/components/task/TaskAnnual.vue +77 -77
  282. package/src/components/task/TaskAnnualDetail.vue +47 -47
  283. package/src/components/task/TaskMonthly.vue +89 -89
  284. package/src/components/userfile/MeterFile.vue +145 -145
  285. package/src/components/userfile/MeterModify.vue +46 -46
  286. package/src/components/userfile/UserFile.vue +118 -118
  287. package/src/components/userfile/UserfileChange.vue +277 -277
  288. package/src/components/userfileaudit/MeterAuditFile.vue +129 -129
  289. package/src/filiale/baiyin/android/AndroidDefectDeal.vue +633 -0
  290. package/src/filiale/baiyin/android.js +10 -0
  291. package/src/filiale/baiyin/pc/CheckPlanAreaList.vue +485 -0
  292. package/src/filiale/baiyin/pc/CheckSearchUser.vue +1067 -0
  293. package/src/filiale/baiyin/pc/DefectListNew.vue +597 -0
  294. package/src/filiale/baiyin/pc/DefectMainNew.vue +63 -0
  295. package/src/filiale/baiyin/pc/DefectPaperNew.vue +1052 -0
  296. package/src/filiale/baiyin/pc/PaperList.vue +790 -0
  297. package/src/filiale/baiyin/pc/PlanChooser.vue +167 -0
  298. package/src/filiale/baiyin/pc/PlanManage.vue +834 -0
  299. package/src/filiale/baiyin/pc/RightTreeSafe.vue +348 -0
  300. package/src/filiale/baiyin/pc/RoleSelector.vue +160 -0
  301. package/src/filiale/baiyin/pc/checkUserList.vue +771 -0
  302. package/src/filiale/baiyin/pc.js +21 -0
  303. package/src/filiale/bayan/android/CheckPlanDown.vue +249 -0
  304. package/src/filiale/bayan/android/SafecheckOrderV.vue +15 -3
  305. package/src/filiale/bayan/android/SafecheckUserInfo.vue +34 -6
  306. package/src/filiale/bayan/android.js +1 -0
  307. package/src/filiale/bayan/pc/CheckDetail.vue +205 -0
  308. package/src/filiale/bayan/pc/CheckPlan.vue +59 -0
  309. package/src/filiale/bayan/pc/CheckPlanAreaList.vue +565 -0
  310. package/src/filiale/bayan/pc/CheckSearchUser.vue +1110 -0
  311. package/src/filiale/bayan/pc/DefectListNew.vue +597 -0
  312. package/src/filiale/bayan/pc/DefectMainNew.vue +63 -0
  313. package/src/filiale/bayan/pc/DefectPaperNew.vue +1218 -0
  314. package/src/filiale/bayan/pc/DeviceChange.vue +1838 -0
  315. package/src/filiale/bayan/pc/HiddenSituation.vue +256 -0
  316. package/src/filiale/bayan/pc/NewCheckpaper.vue +31 -1
  317. package/src/filiale/bayan/pc/PaperList.vue +119 -12
  318. package/src/filiale/bayan/pc/PlanManage.vue +29 -8
  319. package/src/filiale/bayan/pc/SelectCheckPlan.vue +333 -0
  320. package/src/filiale/bayan/pc.js +7 -0
  321. package/src/filiale/dexin/android/SafecheckOrderV.vue +123 -24
  322. package/src/filiale/fugou/pc/CheckBookSearchUser.vue +4 -4
  323. package/src/filiale/jiaxian/android/SafecheckDevices.vue +1298 -0
  324. package/src/filiale/jiaxian/android.js +10 -0
  325. package/src/filiale/jiaxian/pc.js +12 -0
  326. package/src/filiale/liaoyuan/pc/checkPlanList.vue +373 -373
  327. package/src/filiale/liaoyuan/pc.js +18 -18
  328. package/src/filiale/qianneng/pc/PaperList.vue +31 -1
  329. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1270 -1268
  330. package/src/filiale/qingjian/android/SafecheckOrderV.vue +2844 -2779
  331. package/src/filiale/rongchuang/android/SafecheckOrderV.vue +5 -1
  332. package/src/filiale/siyang/android/PhoneRecordInfo.vue +214 -0
  333. package/src/filiale/siyang/android/SafecheckOrderV.vue +2796 -0
  334. package/src/filiale/siyang/android/SafecheckUserInfo.vue +789 -0
  335. package/src/filiale/siyang/android.js +11 -0
  336. package/src/filiale/siyang/pc/NewCheckpaper.vue +1938 -0
  337. package/src/filiale/siyang/pc/PaperDefectMain.vue +864 -0
  338. package/src/filiale/siyang/pc/PaperList.vue +834 -0
  339. package/src/filiale/siyang/pc/PlanManage.vue +839 -0
  340. package/src/filiale/siyang/pc/checkUserList.vue +786 -0
  341. package/src/filiale/siyang/pc.js +16 -0
  342. package/src/filiale/tianke/pc/checkScreen.vue +27 -21
  343. package/src/filiale/tongchuan/android/PhoneUpUserinfo.vue +60 -2
  344. package/src/filiale/tongchuan/android/SafecheckOrderV.vue +2 -3
  345. package/src/filiale/tongchuan/pc/NewCheckpaper.vue +1 -1
  346. package/src/filiale/weinan/android/SafecheckDevices.vue +2 -2
  347. package/src/filiale/weinan/android/SafecheckOrderV.vue +10 -0
  348. package/src/filiale/weinan/android/SafecheckUserInfo.vue +7 -2
  349. package/src/filiale/weinan/pc/DefectListNew.vue +617 -0
  350. package/src/filiale/weinan/pc/DefectMainNew.vue +1 -1
  351. package/src/filiale/weinan/pc.js +1 -0
  352. package/src/filiale/wenxi/android/CurrentCreate.vue +1 -1
  353. package/src/filiale/wenxi/android/PhoneUpUserinfo.vue +1 -1
  354. package/src/filiale/wenxi/android/SafecheckOrderV.vue +14 -0
  355. package/src/filiale/wenxi/android/SafecheckUserInfo.vue +85 -63
  356. package/src/filiale/wenxi/pc/NewCheckpaper.vue +1 -1
  357. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +6 -2
  358. package/src/filiale/yangchunboneng/android/DailyworkloadQuery.vue +2 -2
  359. package/src/filiale/yangchunboneng/android/NewCheckpaperAndroid.vue +1362 -1362
  360. package/src/filiale/yangchunboneng/android/PaperFeedback.vue +1731 -1731
  361. package/src/filiale/yangchunboneng/android/PhoneUpUserinfo.vue +1235 -1235
  362. package/src/filiale/yangchunboneng/android/SafecheckDevices.vue +1332 -1332
  363. package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2845 -2843
  364. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +887 -879
  365. package/src/filiale/yangchunboneng/android/safeHistoryLook.vue +2 -1
  366. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1192 -1192
  367. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +944 -849
  368. package/src/filiale/yongzhou/android/PaperFeedback.vue +1 -1
  369. package/src/filiale/yuansheng/android/AndroidDefectDeal.vue +652 -0
  370. package/src/filiale/yuansheng/android/SwitchValve.vue +322 -0
  371. package/src/filiale/yuansheng/android.js +2 -0
  372. package/src/main.js +33 -33
  373. package/src/plugins/LoadData.js +10 -10
  374. package/src/plugins/LoadParams.js +24 -24
  375. package/src/safecheck-android.js +6 -0
  376. package/src/safecheck.js +3 -0
  377. package/src/stores/wxconfig.js +10 -10
  378. package/src/utils/getNowDate.js +33 -33
  379. package/test/e2e/custom-assertions/elementCount.js +26 -26
  380. package/test/e2e/nightwatch.conf.js +40 -40
  381. package/test/e2e/runner.js +30 -30
  382. package/test/e2e/specs/test.js +13 -13
  383. package/test/unit/.eslintrc +5 -5
  384. package/test/unit/TestUtil.js +62 -62
  385. package/test/unit/context.html +20 -20
  386. package/test/unit/index.js +13 -13
@@ -0,0 +1,2731 @@
1
+ <template>
2
+ <!--<div class="app-botton" @click="back()">-->
3
+ <!--返回<span class="glyphicon glyphicon-menu-right"></span>-->
4
+ <!--</div>-->
5
+ <div id="savebut" class="no-close row android-repair-order" style="background-color: #f9f9f9">
6
+ <div class="col-sm-12 col-xs-12">
7
+ <ul class="nav nav-tabs" style="background:#ffffff;overflow-y: hidden">
8
+ <li v-for="row in tabs" v-if="$index < number+1 && $index < faultshow.number" :class="{active1: row.complete === componentName}"
9
+ @click="tabSelect(row,$index)">
10
+ <a :class="row.class" href="#"
11
+ style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun">
12
+ <span class="spanboder">{{ row.header }}</span>
13
+ <img :src="imgback(row.complete === componentName,row.header === header)" class="butt2"></a>
14
+ <p></p>
15
+ </li>
16
+ <div v-show="routeShow" class="col-sm-12 col-xs-12 repair-bg">
17
+ <route :reuse="false" name='repair'></route>
18
+ </div>
19
+ <li v-for="row in tabs" v-if="$index > number && $index < faultshow.number " :class="{active1: row.complete === componentName}"
20
+ @click="tabSelect(row,$index)">
21
+ <a :class="row.class" href="#"
22
+ style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun">
23
+ <span class="spanboder">{{ row.header }}</span>
24
+ <img :src="imgback(row.complete === componentName,row.header === header)" class="butt2"></a>
25
+ <p></p>
26
+ </li>
27
+ <div v-if="actionEnabled " class="col-sm-12 col-xs-12 repair-bg">
28
+ <div class="auto select-overspread form-horizontal repair-bg " style="padding-bottom:5px;">
29
+ <div class="bq-parent">
30
+ <blockquote class="blockquote">
31
+ <p>安检上传</p>
32
+ </blockquote>
33
+ </div>
34
+ <div class="panel panel-default auto repair-info-content">
35
+ <div class="panel-body ">
36
+ <div class="row auto">
37
+ <!--<div class="col-xs-12 col-sm-12 col-md-12" :style="timeSet(this.isneedDate)?'':'display:none'">-->
38
+ <!--<label>请输入超期原因:</label><br/>-->
39
+ <!--<textarea style="width: 100%;" v-model=""></textarea>-->
40
+ <!--</div>-->
41
+ <div class="col-xs-12 col-sm-12 col-md-12 flex-between" style="margin-top: 20px;">
42
+ <div v-if="!disableLocalCache" class="col-xs-3 col-sm-3 col-md-3">
43
+ <button class="col-sm-3 btn btn-primary" @click="save('finish')">
44
+ 本地缓存
45
+ </button>
46
+ </div>
47
+ <!-- <div class="col-xs-3 col-sm-3 col-md-3" v-if="item.f_user_type == '非民用'">-->
48
+ <!-- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="openDeviceModel">-->
49
+ <!-- 设备-->
50
+ <!-- </button>-->
51
+ <!-- </div>-->
52
+ <div class="col-xs-3 col-sm-3 col-md-3">
53
+ <button :disabled="uploadDisabled" class="col-sm-3 btn btn-primary" name="button" type="button"
54
+ @click="uploadCheckPaper">
55
+ 上传
56
+ </button>
57
+ </div>
58
+ <div v-if="show_torepair">
59
+ <button class="col-sm-3 btn btn-primary" name="button" type="button" @click="showmod">
60
+ 转维修
61
+ </button>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ </ul>
70
+ </div>
71
+ <modal :backdrop="false" :show.sync="showModal2" style="font-size: 15px">
72
+ <div slot="modal-header" class="modal-header upuserinfo_sel">
73
+ <h4 class="modal-title">
74
+ 转维修
75
+ </h4>
76
+ </div>
77
+ <div slot="modal-body" class="modal-body">
78
+ <div class="row">
79
+ <ol style="border: 1px solid green;padding: 15px 0 15px 20px">
80
+ <li v-for="row in repairDefect.data">{{ row }}</li>
81
+ </ol>
82
+ </div>
83
+ <div class="row" style="margin-top: 10px">
84
+ <label class="font_normal_body">派发类型</label>
85
+ <v-select v-model="selectData.dispatchType" :options='dispatchTypeOptions' :value-single="true"
86
+ :value.sync="selectData.dispatchType" close-on-select
87
+ placeholder='派发类型'>
88
+ </v-select>
89
+ </div>
90
+ <div v-if="selectData.dispatchType=='派发给维修员'" class="row" style="margin-top: 10px">
91
+ <label class="font_normal_body">维&ensp;修&ensp;员</label>
92
+ <v-select
93
+ :options='repairers'
94
+ :value-single="true"
95
+ :value.sync="selectData.f_repairman"
96
+ close-on-select
97
+ placeholder='请选择维修员'></v-select>
98
+ </div>
99
+ <div v-if="selectData.dispatchType=='派发给站点'" class="row" style="margin-top: 10px">
100
+ <label class="font_normal_body">站&ensp;&ensp;&ensp;&ensp;点</label>
101
+ <right-tree
102
+ :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
103
+ islist
104
+ @re-res="getSiteRes"></right-tree>
105
+ </div>
106
+ <div class="row" style="margin-top: 10px">
107
+ <label class="font_normal_body">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
108
+ <div class="btn-group" style="width:60%">
109
+ <textarea v-model="selectData.f_remarks" style="width:100%;height: 100px"></textarea>
110
+ </div>
111
+ </div>
112
+ </div>
113
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
114
+ <button class="col-sm-3 btn btn-primary" name="button" type="button" @click="rectification">转维修</button>
115
+ <button class="col-sm-3 btn btn-primary" name="button" type="button" @click="cancel1">取消</button>
116
+ </div>
117
+ </modal>
118
+ <modal :backdrop="false" :show.sync="device.show">
119
+ <div slot="modal-header" class="modal-header upuserinfo_sel">
120
+ <h4 class="modal-title">
121
+ 安检设备
122
+ </h4>
123
+ </div>
124
+ <div slot="modal-body" class="modal-body">
125
+ <div v-for="row in device.model" class="row"
126
+ style="border:2px solid #A2C2EB; border-top:10px solid #A2C2EB; margin-bottom: 10px; padding: 5px">
127
+ <div class="row" style="display: flex; align-items: center; margin-bottom: 5px">
128
+ <div class="col-xs-4"
129
+ style="display: flex; justify-content: flex-end; padding-right: 10px; font-weight: bolder">
130
+ 设备品牌:
131
+ </div>
132
+ <div class="col-xs-8">
133
+ <input v-model="row.f_brand" class="form-control rightipt" type="text"/>
134
+ </div>
135
+ </div>
136
+ <div class="row" style="display: flex; align-items: center; margin-bottom: 5px">
137
+ <div class="col-xs-4"
138
+ style="display: flex; justify-content: flex-end; padding-right: 10px; font-weight: bolder">
139
+ 设备类型:
140
+ </div>
141
+ <div class="col-xs-8">
142
+ <v-select v-model="row.f_devices_type"
143
+ :options="device.devicesTypes"
144
+ :value.sync="row.f_devices_type"
145
+ close-on-select
146
+ placeholder='请选择'
147
+ value-single width='100%'></v-select>
148
+ </div>
149
+ </div>
150
+ <div class="row" style="display: flex; align-items: center; margin-bottom: 5px">
151
+ <div class="col-xs-4"
152
+ style="display: flex; justify-content: flex-end; padding-right: 10px; font-weight: bolder">
153
+ 安装时间:
154
+ </div>
155
+ <div class="col-xs-8">
156
+ <datepicker v-model="row.f_install_date"
157
+ :disabled-days-of-Week="[]"
158
+ :format="'yyyy-MM-dd HH:mm:ss'"
159
+ :show-reset-button="reset"
160
+ :value.sync="row.f_install_date" readonly="readonly">
161
+ </datepicker>
162
+ </div>
163
+ </div>
164
+ <div class="row" style="display: flex; align-items: center; margin-bottom: 5px">
165
+ <div class="col-xs-4"
166
+ style="display: flex; justify-content: flex-end; padding-right: 10px; font-weight: bolder">
167
+ 设备数量:
168
+ </div>
169
+ <div class="col-xs-8">
170
+ <input v-model="row.f_devices_num" class="form-control rightipt" type="number"/>
171
+ </div>
172
+ </div>
173
+ <div style="display: flex;justify-content: center;margin-bottom: 3px">
174
+ <button class="btn btn-warning" @click="delDevice($index)">删除设备</button>
175
+ </div>
176
+ </div>
177
+ <div style="display: flex;justify-content: space-around;">
178
+ <button class="col-sm-3 btn btn-primary" @click="addDevice()">新增设备</button>
179
+ </div>
180
+ </div>
181
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
182
+ <button class="col-sm-3 btn btn-primary" name="button" type="button" @click="closeDeviceModal">关闭</button>
183
+ </div>
184
+ </modal>
185
+ </div>
186
+ </template>
187
+
188
+ <script>
189
+ // 户内维修
190
+ import Vue from 'vue'
191
+ import * as Util from '../../Util'
192
+ import {HttpResetClass} from 'vue-client'
193
+ import co from 'co'
194
+ import $ from "jquery";
195
+ import {isEmpty} from "../../Util";
196
+
197
+ let loadParamGem = async function (self) {
198
+ await self.$LoadParams.loadParam()
199
+ }
200
+
201
+ export default {
202
+ title: '安检单',
203
+ props: ['f_plan_id', 'item', 'role', 'parentPage', 'source', 'noVisit'],
204
+ data() {
205
+ return {
206
+ data: {
207
+ f_devices: [],
208
+ f_defect_content: '',
209
+ f_recording1_path: ''
210
+ },
211
+ imgsnum: this.$appdata.getSingleValue('安检总体照片数量') ? this.$appdata.getSingleValue('安检总体照片数量') : 1, // 安检整体照片默认必须拍1张
212
+ updateuserphone: false, //安检时是否更新用户电话
213
+ updatemetermodel: false, //安检时是否更新表型号
214
+ updatemeternumber: false, //安检时是否更新表号
215
+ beforephone: '',
216
+ isUpload: false,
217
+ show_torepair: false,
218
+ onlySave: true, //判断保存还是保存并上传
219
+ livedispose: '',
220
+ refuseinspection: '', // 拒捡拍照是否提示
221
+ notencountered: '', // 到访不遇拍照是否提示
222
+ startClick: false, //开始安检按钮是否可点击
223
+ isStrat: false, //是否开始安检
224
+ checkResult: {},//查询结果
225
+ newcheckResult: {},
226
+ repairDefect: {
227
+ result: '正常',
228
+ data: []
229
+ },
230
+ rowCodata: {},
231
+ repairers: [],
232
+ timer: null,
233
+ showModal: false,
234
+ showModal2: false,
235
+ pic_to_be_viewed: '',
236
+ showBack: true,
237
+ devices: [],
238
+ f_devices: [],
239
+ isToRepair: false,
240
+ clickBack: true, //是否点击返回按钮
241
+ isSafeCheckToRepair: false,//是否转维修
242
+ Url: this.$androidUtil.getProxyUrl(),
243
+ detail: {},
244
+ defectDevice: {},
245
+ user: {},
246
+ dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'}, {label: '派发给站点', value: '派发给站点'}],
247
+ selectData: {
248
+ dispatchType: '派发给维修员',
249
+ f_repairman: '',
250
+ f_remarks: '',
251
+ f_repairtype: '整改'
252
+ },
253
+ serverConfig: undefined,
254
+ model: { //转维修数据
255
+ // 一次派单
256
+ serviceacitivity: [{
257
+ f_service_acitivity_type: '派单'
258
+ }],
259
+ f_source: '安检',
260
+ f_service_id: '',
261
+ f_contact_phone: '',
262
+ f_meetunit: '',
263
+ f_phone: '',
264
+ f_user_name: '',
265
+ f_address: '',
266
+ f_repair_date: Util.toStandardTimeString(),
267
+ f_card_id: '',
268
+ // f_department: '', 站点选择
269
+ f_reciever: '',
270
+ f_remarks: '',
271
+ f_user_type: '',
272
+ f_area: '',
273
+ f_unit_name: '',
274
+ f_street: '',
275
+ f_residential_area: '',
276
+ f_building: '',
277
+ f_unit: '',
278
+ f_floor: '',
279
+ f_room: '',
280
+ aState: null,
281
+ f_repairtype: '',
282
+ f_repairitems: {},
283
+ },
284
+ repairitems: [],
285
+ meading: '转站点',
286
+ f_security_check_type_id: '',
287
+ config: [
288
+ {
289
+ "itemname": "燃气表",
290
+ "checkmust": true,
291
+ "index": 1,
292
+ "items": [
293
+ //"燃气表照片":{"index":1,"type":"picture","remark":"(拍摄清晰的表具编号、字轮数、剩余气量等)"},
294
+ {"itemname": "基表编号", "index": 1, "type": "string", "readonly": true},
295
+ {"itemname": "气表型号", "index": 2, "type": "string", "readonly": true},
296
+ {"itemname": "气表品牌", "index": 3, "type": "string", "readonly": true},
297
+ {"itemname": "进气方向", "index": 4, "type": "string", "readonly": true},
298
+ {"itemname": "上次表底", "index": 5, "type": "number", "readonly": true},
299
+ {"itemname": "本次表底", "index": 6, "type": "number", "readonly": false},
300
+ {"itemname": "表底差值", "index": 7, "type": "number", "readonly": true},
301
+ {"itemname": "燃气表照片", "index": 8, "type": "picture", "checkmust": false, unique: true, count: 3}
302
+ //显示屏数 --实际剩余气量
303
+ ]
304
+ }
305
+ ],
306
+ // 维修项
307
+ isneedDate: '',
308
+ routeShow: true,
309
+ number: 0,
310
+ shupingshow: false,
311
+ pipeline: {},
312
+ details: [],
313
+ ids: '',
314
+ savevalid: {
315
+ uservalid: false,
316
+ doorvalid: true,
317
+ changetable: false
318
+ },
319
+ doordetails: {},
320
+ devicedetails: {},
321
+ cookdetails: {},
322
+ componentName: 'safecheck-userinfo',
323
+ header: '客户信息',
324
+ tabs: [
325
+ // 参数全部设置成空,在ready时,等model处理好了,再添加
326
+ {
327
+ header: '客户信息', complete: 'safecheck-userinfo', class: 'repair-info-class', props: null
328
+ },
329
+ {
330
+ header: '拍照签名', complete: 'paper-feedback', class: 'outlay-class', props: null
331
+ }
332
+ ],
333
+ faultshow: {
334
+ number: 8
335
+ }, // 控制 故障汇总 在 菜单里显示与否,
336
+ saveType: '',
337
+ startTime: '',
338
+ // 测试时可将此值设为fase,将跳过校验
339
+ isNotTest: true,
340
+ sealSize: Number.parseFloat(this.$appdata.getSingleValue('铅封规模')),
341
+ // 非民安检设备
342
+ device: {
343
+ show: false,
344
+ model: [],
345
+ devicesTypes: this.$appdata.getParam('安检设备类型')
346
+ },
347
+ uploadDisabled: false
348
+ }
349
+ },
350
+ computed: {
351
+ actionEnabled: {
352
+ get() {
353
+ return this.role == 'inspect'
354
+ }
355
+ }
356
+ },
357
+ methods: {
358
+ delDevice(index) {
359
+ this.device.model.splice(index, 1)
360
+ },
361
+ addDevice() {
362
+ this.device.model.push({
363
+ f_brand: '',
364
+ f_devices_type: '',
365
+ f_install_date: '',
366
+ f_devices_num: '',
367
+ })
368
+ },
369
+ openDeviceModel() {
370
+ this.device.show = true
371
+ },
372
+ closeDeviceModal() {
373
+ this.device.show = false
374
+ console.log('this.device.model=', JSON.stringify(this.device.model))
375
+ },
376
+ showmod() {
377
+ // this.saveNoclick()
378
+ let errString = this.errorVerify()
379
+ if (errString && this.isNotTest) {
380
+ console.log(errString)
381
+ console.log('Vue.android', Vue.android)
382
+ console.log('this.isUpload', this.isUpload)
383
+ if (Vue.android) {
384
+ this.$showMessage(errString)
385
+ }
386
+ return
387
+ }
388
+ //清空转维修列表重新进行数据组织
389
+ this.repairDefect = {
390
+ result: '正常',
391
+ data: []
392
+ }
393
+ this.data.f_complete = '已完成'
394
+ this.$set('data.f_offsite_time', Util.toStandardTimeString())
395
+ this.assemblyCodata()
396
+ if (this.repairDefect.result == '正常') {
397
+ this.$showMessage("未发现有选择需要转维修的隐患,请检查填写的数据。如需转维修请在处理方式中选择 '转维修' !")
398
+ return
399
+ }
400
+ console.log("准备保存!")
401
+ this.disableTimer()
402
+ this.getEmp()
403
+ this.showModal2 = true
404
+ },
405
+ cancel1() {
406
+ this.showModal2 = false
407
+ this.selectData = {
408
+ dispatchType: '派发给维修员',
409
+ f_repairman: '',
410
+ f_remarks: '',
411
+ f_repairtype: '整改'
412
+ }
413
+ },
414
+ getSiteRes(obj) {
415
+ console.log('siteRes ---> ')
416
+ console.log(obj)
417
+ if (obj.resids[0]) {
418
+ this.selectData.f_meetunit = obj.res.join('.')
419
+ this.selectData.f_reciever = obj.resids.join('.')
420
+ this.selectData.f_outlets = obj.res[obj.res.length - 1]
421
+ } else {
422
+ this.selectData.f_meetunit = ''
423
+ this.selectData.f_reciever = ''
424
+ this.selectData.f_outlets = ''
425
+ }
426
+ },
427
+ rectification() {
428
+ if (this.selectData.dispatchType) {
429
+ if (this.selectData.dispatchType == '派发给站点') {
430
+ if (!this.selectData.f_reciever) {
431
+ this.$showMessage('请选择部门!')
432
+ return
433
+ }
434
+ } else {
435
+ if (!this.selectData.f_repairman) {
436
+ this.$showMessage('请选择维修员!')
437
+ return
438
+ }
439
+ }
440
+ } else {
441
+ this.$showMessage('请选择派发类型!')
442
+ return
443
+ }
444
+ //关闭录音
445
+ this.closely(false) // 保存本地,不删除录音文件暂停录音
446
+ let act = {}
447
+ let toRepair = ''
448
+ if (this.selectData.dispatchType == '派发给站点') {
449
+ act = {
450
+ f_meetunit: this.selectData.f_meetunit,
451
+ f_reciever: this.selectData.f_reciever,
452
+ f_service_acitivity_type: '派单'
453
+ }
454
+ toRepair = null
455
+ } else {
456
+ console.log('派发给维修员---------' + this.selectData.f_repairman)
457
+ act = {f_meetunit: '', f_reciever: this.selectData.f_repairman, f_service_acitivity_type: '派单'}
458
+ toRepair = '一级派单'
459
+ }
460
+ let repData = {
461
+ toRepair: toRepair,
462
+ activity: act,
463
+ deps: Vue.user.deps,
464
+ depids: Vue.user.depids,
465
+ f_remarks: this.selectData.f_remarks,
466
+ f_repairtype: this.selectData.f_repairtype,
467
+ f_attendant: Vue.user.name,
468
+ loginUser: {name: Vue.user.name, ename: Vue.user.id, id: Vue.user.id},
469
+ }
470
+ this.rowCodata.istoRepair = '转维修'
471
+ this.rowCodata.repData = repData
472
+ console.log("当前组装好的转维修数据--" + JSON.stringify(repData))
473
+ this.onlySave = false
474
+ this.save()
475
+ },
476
+ // 获取维修员
477
+ getEmp() {
478
+ this.repairers = []
479
+ let per = {
480
+ source: 'this.getRights().where(row.getType()==$user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))',
481
+ userid: `${Vue.user.id}`
482
+ }
483
+ let http = new HttpResetClass()
484
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: per}, {
485
+ resolveMsg: null,
486
+ rejectMsg: null
487
+ }).then((res) => {
488
+ res.data.forEach((user) => {
489
+ this.repairers.push({label: user.name, value: user.name})
490
+ })
491
+ })
492
+ },
493
+ closely(isdelete) {
494
+ try {
495
+ var startOrStopAudioClipStr;
496
+ if (isdelete === true) {
497
+ //tag
498
+ startOrStopAudioClipStr = HostApp.startOrStopAudioClip("----", '停止并删除录音') //停止并删除录音
499
+ } else {
500
+ //tag
501
+ startOrStopAudioClipStr = HostApp.startOrStopAudioClip("----", '停止录音') //停止录音
502
+ }
503
+ if (startOrStopAudioClipStr.code == 200) {
504
+ //tag
505
+ return true;
506
+ } else {
507
+ return false;
508
+ }
509
+ } catch (e) {
510
+ console.error("关闭录音方法异常")
511
+ console.error(e)
512
+ return false;
513
+ }
514
+ },
515
+ // 录音方法
516
+ record() {
517
+ //tag
518
+ if (this.role != 'inspect') {
519
+ if (this.data.f_recording1_path != '') {
520
+ window.location = "/rs/file" + this.data.f_recording1_path
521
+ }
522
+ } else {
523
+ //tag
524
+ let fileName
525
+ if (!this.data.f_recording1_path) {
526
+ fileName = Util.guid() + '.amr'
527
+ } else {
528
+ fileName = Util.getFileName(this.data.f_recording1_path)
529
+ }
530
+ //HostApp.__this__ = this
531
+ /*调用无限制录音模块*/
532
+ let startOrStopState = HostApp.startOrStopAudioClip(fileName, "开始录音")
533
+ //tag
534
+ if (startOrStopState.code == 200) {
535
+ this.data.f_recording1_path = "file:///storage/emulated/0/safecheck/" + fileName
536
+ //tag
537
+ return true;
538
+ } else {
539
+ return false;
540
+ }
541
+ }
542
+ },
543
+ saveNoclick() {
544
+ // 禁用点击事件
545
+ $("#savebut").addClass("noclickbut");
546
+ //tag
547
+
548
+ // 5秒后启用点击事件
549
+ setTimeout(function () {
550
+ $("#savebut").removeClass("noclickbut");
551
+ }, 5000);
552
+ },
553
+ timeSet(val) {
554
+ if (!val) {
555
+ return
556
+ }
557
+ let time = new Date(val).getTime()
558
+ let time2 = new Date().getTime()
559
+ if (time2 > time) {
560
+ return true
561
+ }
562
+ },
563
+ imgback(val, isheader) {
564
+ if (val && this.routeShow && isheader) {
565
+ return require('../../../assets/xiangxia1.png')
566
+ } else {
567
+ return require('../../../assets/xiangyou1.png')
568
+ }
569
+ },
570
+ changediv(val) {
571
+ //tag
572
+ return val
573
+ },
574
+ // 选择tab
575
+ tabSelect(item, number) {
576
+ if (this.data.f_entry_status == '到访不遇' || this.data.f_entry_status == '拒检') {
577
+ if (item.header == '燃气表' || item.header == '隐患排查' || item.header == '拍照签名') {
578
+ this.$showMessage(`当前状态为${this.data.f_entry_status},无法操作`)
579
+ return
580
+ }
581
+ }
582
+ this.header = item.header
583
+ // 处理关闭/显示 内容
584
+ if (this.number == number && !this.routeShow) {
585
+ this.routeShow = true
586
+ } else if (this.number == number && this.routeShow) {
587
+ this.routeShow = false
588
+ } else if (this.number != item.complete) {
589
+ this.routeShow = true
590
+ }
591
+ this.number = number
592
+ this.componentName = item.complete
593
+ //tag
594
+ if (item.complete == 'safecheck-devices-n') {
595
+ //tag
596
+ if (item.header != '燃气表' && this.data['device' + item.number].length == 0) {
597
+ this.data['device' + item.number].push({})
598
+ }
599
+ //tag
600
+ //tag)
601
+ let idx = this.data['device' + item.number].length - 1
602
+ let itemprops = {
603
+ config: this.config,
604
+ device: this.devices[item.number - 1],
605
+ idx: idx,
606
+ role: 'inspect',
607
+ userinfo: this.item
608
+ }
609
+ if (this.routeShow) {
610
+ this.$goto(item.complete, itemprops, 'repair')
611
+ }
612
+ } else {
613
+ //tag
614
+ if (this.routeShow) {
615
+ this.$goto(item.complete, {userinfo: this.data}, 'repair')
616
+ }
617
+ }
618
+ this.shupingshow = true
619
+ },
620
+ // 给组件添加参数
621
+ getImgPath() {
622
+ for (var i = 0; i < this.model.serviceacitivity[0].imgs.length; i++) {
623
+ this.ids += this.model.serviceacitivity[0].imgs[i].imgid + ','
624
+ }
625
+ this.ids = this.ids.substring(0, this.ids.length - 1)
626
+ if (this.ids) {
627
+ this.getImgGen();
628
+ }
629
+ },
630
+ getImgGen() {
631
+ let http = new HttpResetClass()
632
+ http.load('POST', 'rs/sql/tel_singleTable_OrderBy', {
633
+ data: {
634
+ items: '*',
635
+ tablename: 't_files',
636
+ condition: `id in (${this.ids})`,
637
+ orderitem: 'id'
638
+ }
639
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
640
+ for (let i = 0; i < res.data.length; i++) {
641
+ for (let j = 0; j < this.model.serviceacitivity[0].imgs.length; j++) {
642
+ if (res.data[i].id.toString() === this.model.serviceacitivity[0].imgs[j].imgid) {
643
+ this.model.serviceacitivity[0].imgs[j] = Object.assign({}, res.data[i], this.model.serviceacitivity[0].imgs[j])
644
+ }
645
+ }
646
+
647
+ }
648
+ })
649
+ },
650
+
651
+ sortDetails() {
652
+ for (let i = 0; i < this.details.length; i++) {
653
+ if (this.details[i].details.length) {
654
+ for (let j = 0; j < this.details[i].details.length; j++) {
655
+ if (this.details[i].details[j].f_type === 'a') {
656
+ this.doordetails = {details: this.details[i].details}
657
+ break
658
+ }
659
+ if (this.details[i].details[j].f_type === 'b') {
660
+ this.devicedetails = {details: this.details[i].details}
661
+ break
662
+ }
663
+ if (this.details[i].details[j].f_type === 'c') {
664
+ this.cookdetails = {details: this.details[i].details}
665
+ break
666
+ }
667
+ }
668
+ }
669
+ }
670
+ },
671
+ // 复制数据
672
+ back() {
673
+ let _this = this
674
+ if (this.issee) {
675
+ _this.$back()
676
+ return
677
+ }
678
+ this.$showMessage('所填写内容将不可恢复!', ['confirm', 'cancel']).then((res) => {
679
+ if (res === 'confirm') {
680
+ this.closely()
681
+ _this.$back()
682
+ }
683
+ })
684
+ },
685
+ confirm() {
686
+ this.$dispatch('confirm')
687
+ },
688
+ tick() {
689
+ this.timer = null
690
+ this.data.f_offsite_time = Util.toStandardTimeString()
691
+ this.timer = window.setTimeout(this.tick, 1000)
692
+ },
693
+ getRepairState() {
694
+ let repaired = true
695
+ this.data.f_defects.forEach((defect) => {
696
+ repaired = repaired & (defect.f_ratification == '已处理')
697
+ })
698
+ return repaired
699
+ },
700
+ verifyRepairDefects() {
701
+ this.data.f_repair_date = Util.toStandardTimeString()
702
+ this.data.f_repaired = this.getRepairState() ? '已修' : '在修'
703
+ },
704
+ errorVerify() {
705
+ // if (!this.data.f_seal_uid){
706
+ // return '该用户未施封,请先在客户信息中点击去施封!'
707
+ // }
708
+ let hasError = this.verifyState()
709
+ if (hasError)
710
+ return hasError
711
+
712
+ if (this.data.f_entry_status != '入户')
713
+ return null
714
+ hasError = this.verifyUser()
715
+ if (hasError)
716
+ return hasError
717
+ hasError = this.verifyDevices()
718
+ if (hasError)
719
+ return hasError
720
+ hasError = this.verifyFeedback()
721
+ if (hasError)
722
+ return hasError
723
+ // let time = this.$appdata.getSingleValue('安检倒计时')
724
+ // if (time){
725
+ // time = Number.parseInt(time)
726
+ // const time2 = Util.computedTimeInterval(this.startTime, Util.toStandardTimeString(), 'm')
727
+ // console.log('time2=', time2)
728
+ // console.log('time=', time)
729
+ // if (this.isNotTest && time2 < time){
730
+ // return `安检时间不能小于${time}分钟!`
731
+ // }
732
+ // }
733
+ },
734
+ verifyState() {
735
+ if (Vue.android && this.data.f_entry_status == '未使用天然气' && this.data.f_nongasuser_path == Vue.nopic)
736
+ return '未使用天然气则必须拍照'
737
+ if (Vue.android && this.data.f_entry_status == '到访不遇' && (this.data.f_noanswer_path == Vue.nopic || this.data.f_noanswer_path == ''))
738
+ return '到访不遇必须拍照'
739
+ if (Vue.android && this.data.f_entry_status == '拒检' && this.refuseinspection && (this.data.f_rejectcheck_path == Vue.nopic || this.data.f_rejectcheck_path == ''))
740
+ return '拒捡必须拍照'
741
+ },
742
+ verifyUser() {
743
+ //tag
744
+ //tag
745
+ //tag)
746
+ let prefix = '用户基本信息:'
747
+ if (Util.required(this.data.f_user_name))
748
+ return prefix + '用户名必须输入'
749
+ // if(!(/^(\d{11})|(0[0-9]{2,3}-[0-9]{8})$/.test(this.data.f_user_phone))) {
750
+ // return '请输入正确的电话号码'
751
+ // }
752
+ // if(Util.required(this.data.f_residential_area))
753
+ // return prefix + '小区名称必须输入'
754
+ if (Util.required(this.data.f_address))
755
+ return prefix + '地址必须输入'
756
+ },
757
+ verifyDevices() {
758
+ for (let dev in this.config) {
759
+ if (this.config[dev].checkmust == true) {
760
+ let error = true
761
+ for (let device in this.data) {
762
+ if (device.startsWith("device")) {
763
+ for (let item in this.data[device]) {
764
+ if (this.data[device].length != 0 && this.data[device][item].f_device_type == this.config[dev].itemname) {
765
+ error = false
766
+ }
767
+ }
768
+ }
769
+ }
770
+ if (error) {
771
+ return "请检查" + this.config[dev].itemname
772
+ }
773
+ }
774
+ }
775
+
776
+ for (var dev in this.config) {
777
+ for (var device in this.data) {
778
+ if (device.startsWith("device")) {
779
+ for (let item in this.data[device]) {
780
+ //检查每一条安检结果
781
+ if (this.data[device].length != 0 && this.data[device][item].f_device_type == this.config[dev].itemname) {
782
+ for (let i in this.data[device][item].f_items) {
783
+ for (let it in this.config[dev].items) {
784
+ if (this.config[dev].items[it].itemname == this.data[device][item].f_items[i].f_item_name) {
785
+ let check = false
786
+ if (!this.data[device][item].f_items[i].f_item_value) {
787
+ check = true
788
+ } else if (Array.isArray(this.data[device][item].f_items[i].f_item_value)) {
789
+ if (this.data[device][item].f_items[i].f_item_value.length == 0) {
790
+ check = true
791
+ }
792
+ }
793
+ if (this.config[dev].items[it].type == 'picture' && this.config[dev].items[it].checkmust == true && !this.data[device][item].f_items[i].f_path) {
794
+ return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
795
+ }
796
+ if (this.config[dev].items[it].type != 'picture' && this.config[dev].items[it].checkmust == true && check) {
797
+ return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
798
+ }
799
+ }
800
+ }
801
+ //检查安检下拉结果
802
+ if (this.data[device][item].f_items[i].type == 'selector' || this.data[device][item].f_items[i].type == 'radio') {
803
+ if (this.data[device][item].f_items[i].f_is_defect == true && this.data[device][item].f_items[i].f_path == Vue.nopic) {
804
+ return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + this.data[device][item].f_items[i].f_item_value + "选中必须拍照"
805
+ }
806
+ if (this.data[device][item].f_items[i].f_is_defect == true && this.data[device][item].f_items[i].f_deal_dispose == '现场整改' && isEmpty(this.data[device][item].f_items[i].f_repair_path)) {
807
+ return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + this.data[device][item].f_items[i].f_item_value + "选中现场整改必须拍照"
808
+ }
809
+ }
810
+ }
811
+ }
812
+ }
813
+ }
814
+ }
815
+ }
816
+ },
817
+ verifyFeedback() {
818
+ let prefix = '拍照签名:'
819
+ //tag)
820
+ if (Vue.android && (!this.data.f_overall_imgs || this.data.f_overall_imgs.length < this.imgsnum) && this.data.f_entry_status == '入户')
821
+ return prefix + `必须有${this.imgsnum}安检总体照片`
822
+ if (Vue.android && (!this.data.f_sign_path || this.data.f_sign_path.length == 0) && this.data.f_entry_status == '入户')
823
+ return prefix + '必须有用户签名'
824
+ if (Vue.android && this.data.f_defect_notified && this.data.f_notified_path == Vue.nopic)
825
+ return prefix + '下发安检通知书则必须给通知书拍照'
826
+ if (Vue.android && this.data.f_blacklist && this.data.f_blocking_cause == '')
827
+ return prefix + '请填写拉黑原因'
828
+ if (!this.data.f_client_evaluation && this.data.f_entry_status == '入户')
829
+ return prefix + '请选择服务评价'
830
+ // if(!this.data.f_phone_newest && this.data.f_entry_status == '入户')
831
+ // return prefix + '请填写用户联系方式'
832
+ },
833
+ getAllDefect() {
834
+ let checkResults = {
835
+ result: '正常',
836
+ data: []
837
+ }
838
+ let value = ''
839
+ let codata = JSON.parse(JSON.stringify(this.data))
840
+ //tag)
841
+ //tag)
842
+ codata.f_devices = []
843
+ this.f_devices = []
844
+ for (let device in codata) {
845
+ let f_device_type
846
+ if (device.startsWith("device")) {
847
+ //tag)
848
+ let hasOther = ''
849
+ let otherValue = null
850
+ for (let item in codata[device]) {
851
+ if (typeof codata[device][item] == 'function') {
852
+ continue
853
+ }
854
+ codata[device][item].f_create_time = Util.toStandardTimeString()
855
+ if (codata[device].length > 1) {
856
+ let j = Number.parseInt(item) + 1
857
+ f_device_type = `${codata[device][item].f_device_type}${j}`
858
+ } else {
859
+ f_device_type = codata[device][item].f_device_type
860
+ }
861
+ //tag
862
+ //tag
863
+ //tag)
864
+ //tag)
865
+ if (item == 'sum' || item == 'removeEmpty') {
866
+ continue
867
+ }
868
+ for (let i = 0; i < codata[device][item].f_items.length; i++) {
869
+ //tag
870
+ if (i == 'sum' || i == 'removeEmpty') {
871
+ continue
872
+ }
873
+ //tag)
874
+ var items = codata[device][item].f_items[i]
875
+ items.f_create_time = Util.toStandardTimeString()
876
+ //tag)
877
+ items.f_item_lists = []
878
+
879
+ if (items.type == 'selector') {
880
+ items.selected = []
881
+ } else if (items.type == 'inputSelector') {
882
+ items.selected = ''
883
+ }
884
+ //遍历配置项 将所选隐患项的配置信息放入保存的数据中
885
+ let f_is_defect //是否是隐患
886
+ let f_defect_level //是否是隐患
887
+ let f_item_name = items.f_item_name
888
+ let f_item_value
889
+ let f_is_eliminate //隐患是否消除
890
+ let f_meternumber = ''
891
+ let f_user_defects = [] // 用户所有隐患
892
+ //tag
893
+ //tag
894
+ if (items.type == 'selector' || items.type == 'checkbox' || items.type == 'radio') {
895
+ for (let i in items.f_item_value) {
896
+ if (typeof items.f_item_value[i] == 'function') {
897
+ continue
898
+ }
899
+ // let configItems = this.config[codata[device][item].f_device_type].items[f_item_name]
900
+ let configItems = ''
901
+ this.config.forEach(e => {
902
+ if (e.itemname == f_device_type)
903
+ e.items.forEach(item => {
904
+ if (item.itemname == f_item_name) {
905
+ configItems = item
906
+ }
907
+ })
908
+ })
909
+ items.f_defect_level = configItems.level
910
+ //tag)
911
+ for (let k in configItems.options) {
912
+ if (typeof configItems.options[k] == 'function') {
913
+ continue
914
+ }
915
+ //tag)
916
+ if (items.f_item_value[i] === configItems.options[k].data) {
917
+ f_is_defect = configItems.options[k].isdefect
918
+ f_item_value = items.f_item_value[i]
919
+ f_defect_level = configItems.level
920
+ if (f_is_defect) {
921
+ if (checkResults.result !== '有隐患') {
922
+ checkResults.result = '有隐患'
923
+ }
924
+ console.log('items' + items)
925
+ if (items.f_deal_dispose == '报修') {
926
+ console.log("检测到需要转维修++++++++++++")
927
+ this.repairDefect.result = '未处理'
928
+ this.repairDefect.data.push(`${f_item_name} : ${f_item_value}`)
929
+ }
930
+ if (!this.checkResult.hasOwnProperty(f_device_type + '-' + f_item_name)) {
931
+ //tag
932
+ this.checkResult[f_device_type + '-' + f_item_name] = []
933
+ }
934
+
935
+ //tag
936
+ this.checkResult[f_device_type + '-' + f_item_name].push(f_item_value)
937
+
938
+ }
939
+
940
+ let f_selected = f_item_value
941
+ if (!items.f_selected) {
942
+ items.f_selected = []
943
+ items.f_selected.push(f_item_value)
944
+ } else {
945
+ items.f_selected.push(f_item_value)
946
+ }
947
+ }
948
+ }
949
+ }
950
+ //
951
+ items.f_selected = JSON.stringify(items.f_selected);
952
+ items.f_item_value = items.f_item_value ? items.f_item_value.toString() : undefined
953
+ } else {
954
+ // let configItems = this.config[codata[device][item].f_device_type].items[items.f_item_name]
955
+ let configItems = ''
956
+ this.config.forEach(e => {
957
+ if (e.itemname == f_device_type)
958
+ e.items.forEach(item => {
959
+ if (item.itemname == f_item_name) {
960
+ configItems = item
961
+ }
962
+ })
963
+ })
964
+
965
+ f_is_defect = items.f_is_defect
966
+ f_defect_level = configItems.level
967
+ f_item_value = items.f_item_value
968
+ items.f_defect_level = f_defect_level
969
+ let items_list = {
970
+ f_is_defect: f_is_defect,
971
+ f_item_value: f_item_value,
972
+ f_defect_level: f_defect_level,
973
+ f_create_time: Util.toStandardTimeString()
974
+ }
975
+ if (f_is_defect && f_item_value) {
976
+ items.f_is_defect = true
977
+ if (checkResults.result !== '有隐患') {
978
+ checkResults.result = '有隐患'
979
+ }
980
+ if (!this.checkResult.hasOwnProperty(items.f_item_name)) {
981
+ //tag
982
+ this.checkResult[items.f_item_name] = []
983
+ }
984
+
985
+ //tag
986
+ this.checkResult[items.f_item_name].push(f_item_value)
987
+
988
+ }
989
+ //tag)
990
+ //tag)
991
+ if (!items.f_item_lists) {
992
+ //tag
993
+ items.f_item_lists = []
994
+ if (JSON.stringify(items_list) != '{}') {
995
+ //tag
996
+ items.f_item_lists.push(items_list)
997
+ }
998
+ } else {
999
+ // items.f_item_lists[0].f_item_value = f_item_value
1000
+ if (JSON.stringify(items_list) != '{}') {
1001
+ //tag
1002
+ //tag)
1003
+ //tag)
1004
+ //tag
1005
+ items.f_item_lists.push(items_list)
1006
+ }
1007
+ }
1008
+ }
1009
+ if (hasOther !== '' && otherValue !== null) {
1010
+ //tag
1011
+ this.checkResult[hasOther].push(otherValue)
1012
+ hasOther = ''
1013
+ otherValue = null
1014
+ }
1015
+ // items.f_item_value = ''
1016
+ }
1017
+ //tag)
1018
+ this.f_devices.push(codata[device][item])
1019
+ }
1020
+ }
1021
+ }
1022
+ if (this.checkResult) {
1023
+ for (let key in this.checkResult) {
1024
+ if (typeof this.checkResult[key] == 'function') {
1025
+ continue
1026
+ }
1027
+ // 上次安检结果数据组织
1028
+ //tag
1029
+ //tag
1030
+ let temp = {}
1031
+ temp[key] = this.checkResult[key].join(',')
1032
+ checkResults.data.push(temp)
1033
+ // this.newcheckResult[key] = this.checkResult[key]
1034
+ // checkResults.data.push(this.newcheckResult)
1035
+ //tag)
1036
+ // this.newcheckResult = {}
1037
+ }
1038
+ this.checkResult = {}
1039
+ }
1040
+ if (checkResults.data.length > 0) {
1041
+ let msg = ''
1042
+ for (let a = 0; a < checkResults.data.length; a++) {
1043
+ for (let datumKey in checkResults.data[a]) {
1044
+ msg += datumKey + ':' + checkResults.data[a][datumKey] + ';'
1045
+ }
1046
+ }
1047
+ this.data.f_defect_text = msg
1048
+ codata.f_defect_text = msg
1049
+ }
1050
+ codata.f_defect_content = JSON.stringify(checkResults)
1051
+ this.data.f_defect_content = JSON.stringify(checkResults)
1052
+ //tag
1053
+ codata.f_security_check_type_id = this.f_security_check_type_id
1054
+ return codata
1055
+ },
1056
+ async uploadCheckPaper() {
1057
+ // console.log("====")
1058
+ // console.log('this.data=', JSON.stringify(this.data))
1059
+ // let res = await new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
1060
+ // data: {
1061
+ // items: 'f_offsite_time, f_checker_name',
1062
+ // tablename: 't_check_paper',
1063
+ // orderitem: 'f_offsite_time desc',
1064
+ // condition: `f_userinfoid = '${this.data.f_userinfoid}' and f_offsite_time > to_char('${Util.toStandardDateString()} 00:00:00','yyyy-mm-dd hh24:mi:ss')`
1065
+ // }})
1066
+ // let continueUpload = true
1067
+ // if (res.data.length > 0){
1068
+ // const paper = res.data[0]
1069
+ // res = await this.$showMessage(`该用户今日已安检,安检时间为:${paper.f_offsite_time},安检员为:${paper.f_checker_name},是否继续上传?`, ['confirm', 'cancel'])
1070
+ // if (res === 'cancel') {
1071
+ // continueUpload = false
1072
+ // }
1073
+ // }
1074
+ // if (!continueUpload){
1075
+ // return
1076
+ // }
1077
+ this.saveNoclick()
1078
+ this.closely(false) // 保存本地,不删除录音文件停止录音
1079
+ let errString = this.errorVerify()
1080
+ if (errString && this.isNotTest) {
1081
+ if (Vue.android) {
1082
+ this.$showMessage(errString)
1083
+ }
1084
+ return
1085
+ } else {
1086
+ this.$set('data.f_offsite_time', Util.toStandardTimeString())
1087
+ this.$set('data.f_upload_time', Util.toStandardTimeString())
1088
+ this.$set('data.f_upload_date', Util.toStandardTimeString())
1089
+ //tag
1090
+ this.data.f_complete = '已完成'
1091
+ this.disableTimer()
1092
+ }
1093
+ //tag
1094
+ this.onlySave = false
1095
+ this.assemblyCodata()
1096
+ /*try {
1097
+ if (JSON.parse(this.rowCodata.f_defect_content).result == '有隐患'){
1098
+ if(!this.data.f_advise_deal && this.data.f_entry_status == '入户'){
1099
+ return this.$showMessage('拍照签名:请选择建议处理方式')
1100
+ }
1101
+ }
1102
+ }catch (e){}*/
1103
+ if (this.repairDefect.result != '正常') {
1104
+ return this.$showMessage('有隐患的处理方式为转维修,请点击转维修')
1105
+ }
1106
+ this.save()
1107
+ },
1108
+ //将数据组装提出
1109
+ assemblyCodata() {
1110
+ let codata = this.getAllDefect()
1111
+ console.log(`codata类型 开始组装codeta数据-->${typeof codata}`)
1112
+ console.log(`codata内容-->${JSON.stringify(codata)}`)
1113
+ for (let key in codata) {
1114
+ if (key.startsWith("device")) {
1115
+ console.log('this.data.' + key + JSON.stringify(codata[key]))
1116
+ codata[key] = []
1117
+ }
1118
+ }
1119
+ codata.f_devices = this.f_devices
1120
+ this.rowCodata = codata
1121
+ },
1122
+ sealScan() {
1123
+ HostApp.__this__ = this
1124
+ HostApp.readNfc({
1125
+ 'callback': 'javascript:HostApp.__this__.sealScanCallback()',
1126
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1127
+ // 执行回调方法传入key为backresult
1128
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1129
+ 'backresult': 1
1130
+ })
1131
+ },
1132
+ sealScanCallback() {
1133
+ console.log('sealScanCallback=========')
1134
+ let result = HostApp.getNfcUUID()
1135
+ console.log('result=', result)
1136
+ if (result.code == 200) {
1137
+ const sealUID = result.data
1138
+ if (sealUID != this.data.f_seal_uid) {
1139
+ this.$showMessage("该铅封与该用户绑定的铅封不一致!")
1140
+ return
1141
+ }
1142
+ this.data.f_complete = '已完成'
1143
+ this.$set('data.f_offsite_time', Util.toStandardTimeString())
1144
+ this.disableTimer()
1145
+ this.save2(this.saveType)
1146
+ } else {
1147
+ this.$showMessage("未识别到铅封信息,请重新尝试!")
1148
+
1149
+ }
1150
+ },
1151
+ async save(type) {
1152
+ //禁用事件
1153
+ this.saveNoclick()
1154
+ //tag
1155
+ //tag
1156
+ if (type == 'temp') {
1157
+ this.data.f_complete = '未完成'
1158
+ // 关闭录音方法
1159
+ this.closely(true) //临时保存,删除录音文件并暂停录音
1160
+ this.disableTimer()
1161
+ } else {
1162
+ // 关闭录音方法
1163
+ this.closely(false) // 保存本地,不删除录音文件暂停录音
1164
+ let errString = this.errorVerify()
1165
+ if (this.isNotTest && errString) {
1166
+ //tag
1167
+ //tag
1168
+ //tag
1169
+ if (Vue.android) {
1170
+ this.$showMessage(errString)
1171
+ }
1172
+ return
1173
+ }
1174
+ }
1175
+ this.save2(type)
1176
+ },
1177
+ save2(type) {
1178
+ if (this.data.f_blacklist != '是') {
1179
+ delete this.data.f_blocking_cause
1180
+ }
1181
+ if (this.data.f_entry_status == '入户') {
1182
+ this.data.f_rejectchecks_path = []
1183
+ this.data.f_rejectcheck_path = null
1184
+ this.data.f_rejectcheck1_path = null
1185
+ this.data.f_rejectcheck2_path = null
1186
+ this.data.f_noanswers_path = []
1187
+ this.data.f_noanswer_path = null
1188
+ this.data.f_noanswer1_path = null
1189
+ this.data.f_noanswer2_path = null
1190
+ } else if (this.data.f_entry_status == '到访不遇') {
1191
+ this.data.f_rejectchecks_path = []
1192
+ this.data.f_rejectcheck_path = null
1193
+ this.data.f_rejectcheck1_path = null
1194
+ this.data.f_rejectcheck2_path = null
1195
+ } else if (this.data.f_entry_status == '拒检') {
1196
+ this.data.f_noanswers_path = []
1197
+ this.data.f_noanswer_path = null
1198
+ this.data.f_noanswer1_path = null
1199
+ this.data.f_noanswer2_path = null
1200
+ }
1201
+ if (type == 'temp' || type == 'finish') {
1202
+ this.assemblyCodata()
1203
+ }
1204
+ // try {
1205
+ let codata = this.rowCodata
1206
+ //tag
1207
+ //tag}`)
1208
+ for (let key in codata) {
1209
+ if (key.startsWith("device")) {
1210
+ //tag)
1211
+ codata[key] = []
1212
+ }
1213
+ }
1214
+ try {
1215
+ let posaddress = HostApp.getGpsDetailAddress(); //获取当前地址信息
1216
+ console.log("---------地址:" + JSON.stringify(posaddress))
1217
+ codata.f_longitude = posaddress.longitude
1218
+ codata.f_latitude = posaddress.latitude
1219
+ } catch (e) {
1220
+ console.error('安检上传时调用android端获取地址信息错误')
1221
+ }
1222
+ if (Vue.android) {
1223
+ //tag
1224
+ let value = this.$androidUtil.path({
1225
+ alias: 'getUserinfomation',
1226
+ data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan = '无计划安检'"}
1227
+ })
1228
+ if (this.item.f_no_checkplan == '无计划安检' && this.item.f_no_checkplan != '打回') {
1229
+ let isStart = true
1230
+ codata.f_devices = this.f_devices
1231
+ if (this.rowCodata && this.rowCodata.istoRepair == '转维修') {
1232
+ this.rowCodata = Object.assign({}, this.rowCodata, codata)
1233
+ } else {
1234
+ this.rowCodata = codata
1235
+ }
1236
+ let param = {
1237
+ f_check_item_id: this.data.f_check_item_id,
1238
+ f_checker_id: this.data.f_checker_id,
1239
+ f_upload_state: '未传',
1240
+ row: this.rowCodata
1241
+ }
1242
+ console.log('无计划 param=', JSON.stringify(param))
1243
+ //tag)
1244
+ let paramStr = JSON.stringify(param)
1245
+ // 多长截断一次
1246
+ let subLength = 800
1247
+ for (let i = 0; i < paramStr.length; i += subLength) {
1248
+ HostApp.param_cache(paramStr.substr(i, subLength))
1249
+ }
1250
+ HostApp.__this__ = this
1251
+ this.uploadDisabled = true
1252
+ HostApp.syncLogic({
1253
+ 'logic': 'SafeSaveNoPaper',
1254
+ 'callback': 'javascript:HostApp.__this__.saveCallBack()',
1255
+ 'backresult': 1
1256
+ })
1257
+ } else {
1258
+ let isStart = true
1259
+ let res
1260
+ codata.f_devices = this.f_devices
1261
+ if (this.rowCodata && this.rowCodata.istoRepair == '转维修') {
1262
+ this.rowCodata = Object.assign({}, this.rowCodata, codata)
1263
+ } else {
1264
+ this.rowCodata = codata
1265
+ }
1266
+ let param = {
1267
+ f_check_item_id: this.data.f_check_item_id,
1268
+ f_checker_id: this.data.f_checker_id,
1269
+ // row: codata
1270
+ row: this.rowCodata
1271
+ }
1272
+ console.log('有计划 param=', JSON.stringify(param))
1273
+ let paramStr = JSON.stringify(param)
1274
+ // 多长截断一次
1275
+ let subLength = 800
1276
+ for (let i = 0; i < paramStr.length; i += subLength) {
1277
+ HostApp.param_cache(paramStr.substr(i, subLength))
1278
+ }
1279
+ HostApp.__this__ = this
1280
+ this.uploadDisabled = true
1281
+ HostApp.syncLogic({
1282
+ // logic别名,key必须为logic
1283
+ 'logic': '保存安检单信息',
1284
+ // 回调执行方法名,key必须为callback
1285
+ 'callback': 'javascript:HostApp.__this__.saveCallBack()',
1286
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1287
+ // 执行回调方法传入key为backresult
1288
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1289
+ 'backresult': 1
1290
+ })
1291
+ }
1292
+
1293
+ } else {
1294
+ //tag
1295
+ let value = this.$androidUtil.path({
1296
+ alias: 'getUserinfomation',
1297
+ data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan = '无计划安检'"}
1298
+ })
1299
+ if (this.rowCodata && this.rowCodata.istoRepair == '转维修') {
1300
+ this.rowCodata = Object.assign({}, this.rowCodata, codata)
1301
+ } else {
1302
+ this.rowCodata = codata
1303
+ }
1304
+ if (this.item.f_no_checkplan == '无计划安检' && value.data.length == 0 && this.item.f_no_checkplan != '打回') {
1305
+ this.$androidUtil.bzLogic('SafeSaveNoPaper', {
1306
+ f_check_item_id: this.data.f_check_item_id,
1307
+ f_checker_id: this.data.f_checker_id,
1308
+ f_upload_state: '未传',
1309
+ // row: codata
1310
+ row: this.rowCodata
1311
+ }).then((res) => {
1312
+ if (res.data.code == 200) {
1313
+ //保存devices
1314
+ this.$androidUtil.bzLogic('getPaperInfo', {
1315
+ f_check_item_id: this.data.f_check_item_id
1316
+ }).then((res) => {
1317
+ //tag
1318
+ if (res.data.code == 200) {
1319
+
1320
+ let f_paper_id = res.data.data[0].id
1321
+ for (let device of this.f_devices) {
1322
+ device.f_paper_id = f_paper_id
1323
+ //tag
1324
+ this.$androidUtil.bzLogic('saveDevice', {
1325
+ row: device
1326
+ }).then((ret) => {
1327
+ //tag
1328
+ if (ret.code != 200) {
1329
+ // if(this.isUpload){
1330
+ // this.isUpload = false
1331
+ // }
1332
+ //TODO 失败后处理
1333
+ this.$showMessage("保存失败!")
1334
+ return false
1335
+ }
1336
+ })
1337
+ }
1338
+ }
1339
+ })
1340
+ // this.$showAlert('保存成功!', 'success', 2000)
1341
+ this.$showMessage('保存成功!')
1342
+ return true
1343
+ } else {
1344
+ // if(this.isUpload){
1345
+ // this.isUpload = false
1346
+ // }
1347
+ this.$showMessage("保存失败!")
1348
+ return false
1349
+ }
1350
+ })
1351
+ } else {
1352
+ this.$androidUtil.bzLogic('保存安检单信息', {
1353
+ f_check_item_id: this.data.f_check_item_id,
1354
+ f_checker_id: this.data.f_checker_id,
1355
+ row: this.rowCodata
1356
+ }).then((res) => {
1357
+ //tag
1358
+ if (res.data.code == 200) {
1359
+ //保存devices
1360
+ this.$androidUtil.bzLogic('getPaperInfo', {
1361
+ f_check_item_id: this.data.f_check_item_id
1362
+ }).then((res) => {
1363
+ //tag
1364
+ if (res.data.code == 200) {
1365
+
1366
+ let f_paper_id = res.data.data[0].id
1367
+ for (let device of this.f_devices) {
1368
+ device.f_paper_id = f_paper_id
1369
+ //tag
1370
+ this.$androidUtil.bzLogic('saveDevice', {
1371
+ row: device
1372
+ }).then((ret) => {
1373
+ //tag
1374
+ if (ret.code != 200) {
1375
+ // if(this.isUpload){
1376
+ // this.isUpload = false
1377
+ // }
1378
+ //TODO 失败后处理
1379
+ this.$showMessage("保存失败!")
1380
+ return false
1381
+ }
1382
+ })
1383
+ }
1384
+ }
1385
+ })
1386
+ // this.$showAlert('保存成功!', 'success', 2000)
1387
+ this.$showMessage('保存成功!')
1388
+ return true
1389
+ } else {
1390
+ // if(this.isUpload){
1391
+ // this.isUpload = false
1392
+ // }
1393
+ this.$showMessage("保存失败!")
1394
+ return false
1395
+ }
1396
+ })
1397
+ }
1398
+ }
1399
+ },
1400
+ runSyncLogic(logic, callback, backresult) {
1401
+ HostApp.runSyncLogic({
1402
+ // logic别名,key必须为logic
1403
+ 'logic': logic,
1404
+ // 回调执行方法名,key必须为callback
1405
+ 'callback': callback,
1406
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1407
+ // 执行回调方法传入key为backresult
1408
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1409
+ 'backresult': backresult
1410
+ })
1411
+ },
1412
+ logicWithHint(logic, data, callback, backresult) {
1413
+ HostApp.logicWithHint({
1414
+ // logic别名,key必须为logic
1415
+ 'logic': logic,
1416
+ // 回调执行方法名,key必须为callback
1417
+ 'callback': callback,
1418
+ // logic执行需要的业务参数
1419
+ 'data': data,
1420
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1421
+ // 执行回调方法传入key为backresult
1422
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1423
+ 'backresult': backresult
1424
+ })
1425
+ },
1426
+ saveCallBack(jo) {
1427
+ this.uploadDisabled = false
1428
+ if (jo.state == 'ok') {
1429
+ let res = JSON.parse(jo.result)
1430
+ if (res.code == 200) {
1431
+ if (!this.onlySave) {
1432
+ let codata = this.getAllDefect()
1433
+ try {
1434
+ let posaddress = HostApp.getGpsDetailAddress(); //获取当前地址信息
1435
+ console.log("---------地址:" + JSON.stringify(posaddress))
1436
+ codata.f_longitude = posaddress.longitude
1437
+ codata.f_latitude = posaddress.latitude
1438
+ } catch (e) {
1439
+ console.error('安检上传时调用android端获取地址信息错误')
1440
+ }
1441
+ //获取微信推送内容
1442
+ let haslivedispose = this.$androidUtil.bzLogic('getLiveDispose', {
1443
+ f_check_item_id: this.data.f_check_item_id
1444
+ })
1445
+ //如果是转维修上传,则不做校验,上传完成后自动转维修
1446
+ if (!this.isToRepair) {
1447
+ if (haslivedispose.data.length > 0 && (this.livedispose == 'true' || this.livedispose == true)) {
1448
+ if (!this.isSafeCheckToRepair) {
1449
+
1450
+ }
1451
+ }
1452
+ }
1453
+ for (let key in codata) {
1454
+ if (key.startsWith("device")) {
1455
+ codata[key] = []
1456
+ }
1457
+ }
1458
+ codata.f_devices = this.f_devices
1459
+ if (this.rowCodata && this.rowCodata.istoRepair == '转维修') {
1460
+ this.rowCodata = Object.assign({}, this.rowCodata, codata)
1461
+ } else {
1462
+ this.rowCodata = codata
1463
+ }
1464
+ // 非民用安检设备
1465
+ const safecheckDevices = []
1466
+ for (const item of this.device.model) {
1467
+ let f = false
1468
+ for (const itemElement in item) {
1469
+ if (item[itemElement]) {
1470
+ f = true
1471
+ break
1472
+ }
1473
+ }
1474
+ if (f) {
1475
+ safecheckDevices.push(item)
1476
+ }
1477
+ }
1478
+ this.rowCodata.planId = this.item.planID
1479
+ let param = {
1480
+ f_check_item_id: this.data.f_check_item_id,
1481
+ f_checker_id: this.data.f_checker_id,
1482
+ // row: codata
1483
+ row: this.rowCodata,
1484
+ safecheckDevices: safecheckDevices
1485
+ }
1486
+
1487
+ //tag)
1488
+ let paramStr = JSON.stringify(param)
1489
+ console.log('paramStr=', paramStr)
1490
+ // 多长截断一次
1491
+ let subLength = 800
1492
+ for (let i = 0; i < paramStr.length; i += subLength) {
1493
+ HostApp.param_cache(paramStr.substr(i, subLength))
1494
+ }
1495
+ HostApp.__this__ = this
1496
+ this.uploadDisabled = true
1497
+ HostApp.syncLogic({
1498
+ // logic别名,key必须为logic
1499
+ 'logic': '上传安检信息',
1500
+ // 回调执行方法名,key必须为callback
1501
+ 'callback': 'javascript:HostApp.__this__.uploadCallBack()',
1502
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1503
+ // 执行回调方法传入key为backresult
1504
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1505
+ 'backresult': 1
1506
+ })
1507
+ } else {
1508
+ this.$showMessage('保存成功!')
1509
+ if (this.clickBack) {
1510
+ this.isStrat = false
1511
+ this.$dispatch('confirm')
1512
+ //this.$back()
1513
+ }
1514
+ }
1515
+ } else {
1516
+ this.$showMessage('保存失败!')
1517
+
1518
+ }
1519
+ } else {
1520
+ this.$showMessage('服务器内部错误,保存失败!')
1521
+
1522
+ }
1523
+ },
1524
+ uploadCallBack(jo) {
1525
+ this.uploadDisabled = false
1526
+ //获取微信推送路径
1527
+ let url = ""
1528
+ // if(Vue.config.safecheck != undefined) {
1529
+ // if (Vue.config.safecheck.ApproveConfig != undefined) {
1530
+ // if (Vue.config.safecheck.ApproveConfig.weixinurl != undefined) {
1531
+ // url = Vue.config.safecheck.ApproveConfig.weixinurl
1532
+ // }
1533
+ // }
1534
+ // }
1535
+ //tag)
1536
+ //tag)
1537
+ if (jo.state == 'ok') {
1538
+ let res = JSON.parse(jo.result)
1539
+ //tag)
1540
+ //tag)
1541
+ if (res.code == 200) {
1542
+ this.$set('data.f_paper_id', res.id)
1543
+ this.isStrat = false
1544
+ if (url != "") {
1545
+ this.$resetpost(`${url}`, {data: WxResult})
1546
+ }
1547
+ //tag
1548
+ if (this.isToRepair) {
1549
+ for (let device in this.data) {
1550
+ if (device.startsWith("device")) {
1551
+ this.data[device] = []
1552
+ if (res.data.length > 0) {
1553
+ for (let i in res.data[0].f_devices) {
1554
+ if (this.data[device].length > 0) {
1555
+ if (this.data[device][0].f_device_type == res.data[0].f_devices[i].f_device_type) {
1556
+ this.data[device].push(res.data[0].f_devices[i])
1557
+ res.data[0].f_devices.splice(i, 1)
1558
+ }
1559
+ } else {
1560
+ this.data[device].push(res.data[0].f_devices[i])
1561
+ res.data[0].f_devices.splice(i, 1)
1562
+ }
1563
+ }
1564
+ }
1565
+ }
1566
+ }
1567
+ this.todo()
1568
+ } else {
1569
+ this.$showMessage('上传成功!')
1570
+ //tag
1571
+ this.$dispatch('confirm')
1572
+ // this.$back()
1573
+ }
1574
+ } else if (res.code == 309) {
1575
+ this.$showMessage('该安检单已作废!')
1576
+ //tag
1577
+ this.$dispatch('confirm')
1578
+ } else if (res.code == 710) {
1579
+ this.$showMessage('上传照片失败,请检查网络是否正常!' + res.msg)
1580
+ return
1581
+ } else if (res.code == 711) {
1582
+ this.$showMessage('该安检单已被管理员调整,请联系管理员!')
1583
+ return
1584
+ } else if (res.code == 712) {
1585
+ this.$showMessage('网络异常,请重新上传,多次上传失败请联系管理员!')
1586
+ return
1587
+ } else {
1588
+ this.$showMessage('上传失败!')
1589
+ }
1590
+ } else {
1591
+ this.$showMessage('网络异常,上传失败!')
1592
+ }
1593
+ this.onlySave = true
1594
+ },
1595
+ safecheckToRepairCallBack(jo) {
1596
+ //获取微信推送路径
1597
+ if (jo.state == 'ok') {
1598
+ let res = JSON.parse(jo.result)
1599
+ //tag)
1600
+ if (res.code == 200) {
1601
+ //tag
1602
+ if (res.data.code == 200) {
1603
+ this.$showMessage('上传并转维修成功!')
1604
+ } else {
1605
+ this.$showMessage('上传并转维修成功,回写安检单失败!')
1606
+ }
1607
+ this.$dispatch('confirm')
1608
+ // this.$back()
1609
+ } else {
1610
+ this.$showMessage('上传失败!')
1611
+ this.onlySave = true
1612
+ }
1613
+ } else {
1614
+ this.$showMessage('网络异常,上传失败!')
1615
+ this.onlySave = true
1616
+ }
1617
+ },
1618
+ todo() {
1619
+ let gen = getRepairParam(this)
1620
+ co(gen)
1621
+ },
1622
+ undo() {
1623
+ this.showCheckToRepair = !this.showCheckToRepair
1624
+ this.model.serviceacitivity[0].f_reciever = ''
1625
+ this.model.serviceacitivity[0].f_meetunit = ''
1626
+ this.model.f_repairtype = ''
1627
+ this.meading = '转站点'
1628
+ },
1629
+ disableTimer() {
1630
+ if (this.timer) {
1631
+ window.clearTimeout(this.timer)
1632
+ this.timer = null
1633
+ }
1634
+ },
1635
+ loaded(paper) {
1636
+ if (!paper.hasOwnProperty('id')) {
1637
+ this.$showMessage("该安检单在手机上已经不存在,可能是卸载过程序。可以进入重新安检,或返回安检计划。")
1638
+ this.init()
1639
+ } else {
1640
+ Util.booleanFilter(paper)
1641
+ HostApp.__this__.$set('data', paper)
1642
+ HostApp.__this__.$goto('safecheck-userinfo', {}, 'paper-router')
1643
+ // 如果打回重检则重新计时
1644
+ //tag
1645
+ if (HostApp.__this__.role == 'inspect'
1646
+ && HostApp.__this__.data.f_approved
1647
+ && HostApp.__this__.data.f_approved == '打回') {
1648
+ //tag
1649
+ HostApp.__this__.data.f_onsite_time = Util.toStandardTimeString()
1650
+ HostApp.__this__.tick()
1651
+ }
1652
+ }
1653
+ HostApp.__callback__ = null
1654
+ HostApp.__this__ = null
1655
+ },
1656
+ S4() {
1657
+ return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
1658
+ },
1659
+ extend(initalObj, finalObj) {
1660
+ initalObj.forEach(item2 => {
1661
+ const item1 = finalObj.find(item => item.itemname === item2.itemname);
1662
+
1663
+ if (!item1) {
1664
+ finalObj.push(item2);
1665
+ } else {
1666
+ // 对 item2 的 items 进行逆序遍历
1667
+ item2.items.slice().forEach(subItem2 => {
1668
+ const subItem1Index = item1.items.findIndex(subItem => subItem.itemname === subItem2.itemname);
1669
+
1670
+ if (subItem1Index > -1) {
1671
+ // 如果找到匹配的 subItem1,用 subItem2 替换它
1672
+ item1.items[subItem1Index] = subItem2;
1673
+ } else {
1674
+ // 如果没有找到,将 subItem2 插入到 item1.items 的前面
1675
+ item1.items.push(subItem2);
1676
+ }
1677
+ });
1678
+ }
1679
+ });
1680
+
1681
+ return finalObj;
1682
+ },
1683
+
1684
+
1685
+ removeNestedItem(arr, itemname1, itemname2) {
1686
+ // 创建一个新数组以避免修改原始数组
1687
+ const newArr = arr.map(item => {
1688
+ // 复制每个项目以避免直接修改它们
1689
+ const newItem = {...item};
1690
+
1691
+ // 检查外层itemname是否匹配
1692
+ if (newItem.itemname === itemname1 && Array.isArray(newItem.items)) {
1693
+ // 过滤掉匹配的内层itemname
1694
+ newItem.items = newItem.items.filter(subItem => subItem.itemname !== itemname2);
1695
+ }
1696
+ return newItem;
1697
+ });
1698
+ return newArr;
1699
+ },
1700
+
1701
+ removeByCollectionType(arr, collectionType) {
1702
+ // 创建一个新数组以避免修改原始数组
1703
+ const newArr = arr.map(item => {
1704
+ // 复制每个项目以避免直接修改它们
1705
+ const newItem = {...item};
1706
+
1707
+ // 检查外层itemname是否匹配
1708
+ if (newItem.itemname === '燃气表' && Array.isArray(newItem.items)) {
1709
+ // 过滤掉匹配的内层itemname
1710
+ newItem.items = newItem.items.filter(subItem => !subItem.unique || subItem.collectionType == collectionType);
1711
+ }
1712
+ return newItem;
1713
+ });
1714
+ return newArr;
1715
+ },
1716
+ // async isoverDate(){
1717
+ // let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/androidGetuserinfo`, {data:{
1718
+ // condition:"f_plan_item_id='"+this.item.id+"'"
1719
+ // }
1720
+ // })
1721
+ // this.isneedDate=res.data[0]["f_subscribe_date"]
1722
+ // },
1723
+ async putDevices() {
1724
+ //tag)
1725
+ //tag)
1726
+ this.$set('data.approve', "true")
1727
+ this.$set('data.writeback', "false")
1728
+ // if (Vue.config.safecheck != undefined) {
1729
+ // if (Vue.config.safecheck.ApproveConfig != undefined) {
1730
+ // if (Vue.config.safecheck.ApproveConfig.approve != undefined) {
1731
+ // this.$set('data.approve', Vue.config.safecheck.ApproveConfig.approve)
1732
+ // }
1733
+ // if (Vue.config.safecheck.ApproveConfig.writeback != undefined) {
1734
+ // this.$set('data.writeback', Vue.config.safecheck.ApproveConfig.writeback)
1735
+ // }
1736
+ // if (Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
1737
+ // this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
1738
+ // }
1739
+ // if (Vue.config.safecheck.ApproveConfig.showtorepair) {
1740
+ // this.show_torepair = Vue.config.safecheck.ApproveConfig.showtorepair
1741
+ // }
1742
+ // if (Vue.config.safecheck.ApproveConfig.notencountered != undefined){
1743
+ // this.notencountered = Vue.config.safecheck.ApproveConfig.notencountered
1744
+ // }
1745
+ // if (Vue.config.safecheck.ApproveConfig.refuseinspection != undefined){
1746
+ // this.refuseinspection = Vue.config.safecheck.ApproveConfig.refuseinspection
1747
+ // }
1748
+ // }
1749
+
1750
+ console.log('this.itemccc', JSON.stringify(this.item))
1751
+ if (this.item.f_security_check_type_id && this.item.f_security_check_type_id != null) {
1752
+ try {
1753
+ await this.getSecurityCheckType(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/getSecurityCheckTypeHistoryById`, {id: this.item.f_security_check_type_id})
1754
+ this.f_security_check_type_id = this.serverConfig.data.id
1755
+ } catch (e) {
1756
+ return this.$showMessage('获取配置文件失败,请返回后重新进入!多次失败请联系管理员')
1757
+ }
1758
+ this.config = this.extend(JSON.parse(this.serverConfig.data.f_json), this.config)
1759
+ this.initConfig()
1760
+ } else {
1761
+ try {
1762
+ await this.getSecurityCheckType(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/getSecurityCheckTypeByType`, {
1763
+ f_safecheck_type: this.item.f_safecheck_type || '年度普检',
1764
+ f_user_type: this.item.f_user_type,
1765
+ f_orgid: Vue.user.orgid
1766
+ })
1767
+ this.f_security_check_type_id = this.serverConfig.data[0].id
1768
+ } catch (e) {
1769
+ return this.$showMessage('获取配置文件失败,请返回后重新进入!多次失败请联系管理员')
1770
+ }
1771
+ console.log('this.config1=', JSON.stringify(this.config))
1772
+ this.config = this.extend(JSON.parse(this.serverConfig.data[0].f_json), this.config)
1773
+ console.log('this.config2=', JSON.stringify(this.config))
1774
+ this.initConfig()
1775
+ console.log('this.config3=', JSON.stringify(this.config))
1776
+ if (this.item.f_user_type == '非民用') {
1777
+ let res = await new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/safe_singleTable_OrderBy`, {
1778
+ data: {
1779
+ items: '*',
1780
+ tablename: 't_devices',
1781
+ orderitem: 'f_input_date desc',
1782
+ condition: `f_userinfo_id = '${this.item.f_userinfoid}'`
1783
+ }
1784
+ }, {resolveMsg: null, rejectMsg: null})
1785
+ for (let i = 0; i < res.data.length; i++) {
1786
+ this.device.model.push({
1787
+ f_brand: res.data[i].f_brand,
1788
+ f_devices_type: res.data[i].f_devices_type,
1789
+ f_install_date: res.data[i].f_input_date,
1790
+ f_devices_num: res.data[i].f_devices_num,
1791
+ })
1792
+ }
1793
+ }
1794
+ }
1795
+ // }
1796
+ },
1797
+ async getSecurityCheckType(url, data) {
1798
+ let res = await new HttpResetClass().http('POST', url,
1799
+ data,
1800
+ {resolveMsg: null, rejectMsg: '网络异常'})
1801
+ if (typeof res === 'object') {
1802
+ this.serverConfig = res
1803
+ } else {
1804
+ this.serverConfig = JSON.parse(res)
1805
+ }
1806
+ },
1807
+ initConfig() {
1808
+ for (let i in this.config) {
1809
+ this.tabs.splice(1, 0, null)
1810
+ }
1811
+ for (let i in this.config) {
1812
+ //取得安检项索引值
1813
+ let n = parseInt(i) + 1
1814
+ //tag
1815
+ this.devices[n - 1] = {device: parseInt(i), n: n, checkmust: this.config[i].checkmust}
1816
+ this.$set('data.' + 'device' + n, [])
1817
+ this.tabs[n] = {
1818
+ header: this.config[i].itemname,
1819
+ complete: 'safecheck-devices-n',
1820
+ class: 'repair-details-class',
1821
+ number: n
1822
+ }
1823
+
1824
+ if (this.config[i].quantity && this.config[i].quantity > 0) {
1825
+
1826
+ let items = []
1827
+ for (let it in this.config[i].items) {
1828
+ //赋值下拉选项
1829
+ if (this.config[i].items[it].type == 'selector') {
1830
+ for (let op in this.config[i].items[it].options) {
1831
+ if (this.config[i].items[it].options[op].isdefault == true) {
1832
+ items.push({
1833
+ f_defect_level: this.config[i].items[it].level,
1834
+ f_is_defect: this.config[i].items[it].options[op].isdefect,
1835
+ f_item_name: this.config[i].items[it].itemname,
1836
+ f_item_value: this.config[i].items[it].options[op].data,
1837
+ f_path: "",
1838
+ type: "selector"
1839
+ })
1840
+ }
1841
+ }
1842
+ }
1843
+ }
1844
+ for (let q = 0; q < this.config[i].quantity; q++) {
1845
+ this.data['device' + n].push(
1846
+ {
1847
+ f_device_type: this.config[i].itemname, f_items: items
1848
+ }
1849
+ )
1850
+ }
1851
+ }
1852
+ n = n + 1
1853
+ }
1854
+ this.faultshow.number = this.tabs.length
1855
+ },
1856
+
1857
+ init() {
1858
+ //tag
1859
+ // this.data.f_noplan_item_id = this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()
1860
+ this.data.ename = Vue.user.ename
1861
+ this.data.f_outlets = Vue.user.f_parentname
1862
+ this.data.f_meetunit = Vue.user.orgpathnames
1863
+ this.data.orgpathstr = Vue.user.orgpathstr
1864
+ this.data.f_check_item_id = this.item.id
1865
+ this.data.f_check_plan_id = this.f_plan_id
1866
+ this.data.f_checker_id = Vue.user.id
1867
+ this.data.f_checker_name = Vue.user.name
1868
+ this.data.f_check_type = this.item.f_user_type
1869
+ this.data.f_safecheck_type = this.item.f_safecheck_type
1870
+ //this.data.f_exceed_reason = ''//存放送气超期原因
1871
+ //tag
1872
+ this.data.f_subcompany = this.item.f_subcompany
1873
+ this.data.f_approved = this.item.f_approvedf_read_instructions
1874
+ this.data.f_repair_approved = this.item.f_repair_approved
1875
+ this.data.f_no_checkplan = this.item.f_no_checkplan
1876
+ this.data.f_approved = this.item.f_approved
1877
+ this.data.f_filialeid = this.item.f_filialeid
1878
+ this.data.f_orgstr = this.item.f_orgstr
1879
+ this.data.version = this.item.version
1880
+ this.data.f_check_version = this.item.f_check_version
1881
+ this.$set('data.f_meters', this.item.f_plan_meters)
1882
+ this.$set('data.f_userinfo_code', this.item.f_userinfo_code)
1883
+ // 安检状态
1884
+ if (this.noVisit) {
1885
+ this.$set('data.f_entry_status', '到访不遇')
1886
+ } else {
1887
+ this.$set('data.f_entry_status', '入户')
1888
+ }
1889
+ this.$set('data.f_usegas', '已使用')
1890
+ this.$set('data.f_state', this.item.f_state)
1891
+ this.$set('data.f_source', this.source ? this.source : '安检')
1892
+ //tag
1893
+ // 用户信息
1894
+ this.$set('data.f_user_name', this.item.f_user_name)
1895
+ this.$set('data.f_user_phone', this.item.f_user_phone)
1896
+ this.$set('data.f_userinfoid', this.item.f_userinfoid)
1897
+ this.$set('data.f_address', this.item.f_address)
1898
+ this.$set('data.f_card_id', this.item.f_card_id)
1899
+ this.$set('data.f_slice_area', this.item.f_slice_area)
1900
+ this.$set('data.f_street', this.item.f_street)
1901
+ this.$set('data.f_room', this.item.f_room)
1902
+ this.$set('data.f_building', this.item.f_building)
1903
+ this.$set('data.f_unit', this.item.f_unit)
1904
+ //tag
1905
+ this.$set('data.f_floor', this.item.f_floor)
1906
+ this.$set('data.f_residential_area', this.item.f_residential_area)
1907
+ this.$set('data.f_idnumber', this.item.f_idnumber)
1908
+ this.$set('data.f_comments', this.item.f_comments)
1909
+ this.$set('data.f_userproperties', this.item.f_userproperties)
1910
+ this.$set('data.f_client_evaluation', '满意')
1911
+ this.$set('data.f_userfiles_id', this.item.f_plan_meters[0].f_userfiles_id)
1912
+ this.$set('data.f_seal_uid', this.item.f_seal_uid)
1913
+ this.$set('data.f_rated_traffic', this.item.f_rated_traffic)
1914
+
1915
+ // this.$set('data.f_user_inhome_time', this.item.f_user_inhome_time)
1916
+ // this.$set('data.f_user_check_time', this.item.f_user_check_time)
1917
+ // this.$set('data.f_user_spare_phone', this.item.f_user_spare_phone)
1918
+ // this.$set('data.f_user_family_remarks', this.item.f_user_family_remarks)
1919
+ // this.$set('data.f_user_equipment_remarks', this.item.f_user_equipment_remarks)
1920
+ // 处置方式
1921
+ //tag
1922
+ this.$set('data.f_gas_guidelines', true)
1923
+ this.$set('data.f_safety_warning', true)
1924
+ this.$set('data.f_gas_manual', true)
1925
+ this.$set('data.f_no_gas_device', false)
1926
+ this.$set('data.f_close_valve', false)
1927
+ this.$set('data.f_unload_battery', false)
1928
+ //tag
1929
+ if (this.data.f_check_item_id == '' && this.item.f_no_checkplan == '无计划安检') {
1930
+ this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
1931
+ }
1932
+ //tag
1933
+ if (this.item.f_plan_meters) {
1934
+ for (let de in this.devices) {
1935
+ if (typeof this.devices[de] == 'function') {
1936
+ continue
1937
+ }
1938
+ this.$set('data.device' + this.devices[de].n, [])
1939
+ for (let i = 0; i < this.item.f_plan_meters.length; i++) {
1940
+ if (this.item.f_plan_meters[i].f_meter_type) {
1941
+ this.data.f_meter_type = this.item.f_plan_meters[i].f_meter_type
1942
+ //tag)
1943
+ if (this.config[this.devices[de].device].itemname == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('机表') > 0) {
1944
+ this.data['device' + this.devices[de].n].push({
1945
+ f_device_type: "燃气表",
1946
+ f_items: [
1947
+ {
1948
+ f_defect_level: null,
1949
+ f_device_id: "",
1950
+ f_is_defect: "",
1951
+ f_item_name: "基表编号",
1952
+ f_item_value: this.item.f_plan_meters[i].f_meter_no,
1953
+ f_path: "",
1954
+ type: "number"
1955
+ },
1956
+ {
1957
+ f_defect_level: null,
1958
+ f_device_id: "",
1959
+ f_is_defect: "",
1960
+ f_item_name: "气表型号",
1961
+ f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
1962
+ f_path: "",
1963
+ type: "string"
1964
+ },
1965
+ {
1966
+ f_defect_level: null,
1967
+ f_device_id: "",
1968
+ f_is_defect: "",
1969
+ f_item_name: "气表品牌",
1970
+ f_item_value: this.item.f_plan_meters[i].f_aliasname,
1971
+ f_path: "",
1972
+ type: "string"
1973
+ },
1974
+ {
1975
+ f_defect_level: null,
1976
+ f_device_id: "",
1977
+ f_is_defect: "",
1978
+ f_item_name: "进气方向",
1979
+ f_item_value: this.item.f_plan_meters[i].f_flow_direction,
1980
+ f_path: "",
1981
+ type: "string"
1982
+ },
1983
+ {
1984
+ f_defect_level: null,
1985
+ f_device_id: "",
1986
+ f_is_defect: "",
1987
+ f_item_name: "上次表底",
1988
+ f_item_value: this.item.f_plan_meters[i].f_prior_reading ? this.item.f_plan_meters[i].f_prior_reading : 0,
1989
+ f_path: "",
1990
+ type: "number"
1991
+ },
1992
+ {
1993
+ f_defect_level: null,
1994
+ f_device_id: "",
1995
+ f_is_defect: "",
1996
+ f_item_name: "本次表底",
1997
+ f_item_value: "",
1998
+ f_path: "",
1999
+ type: "number"
2000
+ },
2001
+ {
2002
+ f_defect_level: null,
2003
+ f_device_id: "",
2004
+ f_is_defect: "",
2005
+ f_item_name: "表底差值",
2006
+ f_item_value: "",
2007
+ f_path: "",
2008
+ type: "number"
2009
+ }
2010
+ ]
2011
+ })
2012
+ } else if (this.config[this.devices[de].device].itemname == "燃气表") {
2013
+ // delete this.config['燃气表']['items']['表底数']
2014
+ this.data['device' + this.devices[de].n].push({
2015
+ f_device_type: "燃气表",
2016
+ f_items: [
2017
+ {
2018
+ f_defect_level: null,
2019
+ f_device_id: "",
2020
+ f_is_defect: "",
2021
+ f_item_name: "基表编号",
2022
+ f_item_value: this.item.f_plan_meters[i].f_meter_no,
2023
+ f_path: "",
2024
+ type: "number"
2025
+ },
2026
+ {
2027
+ f_defect_level: null,
2028
+ f_device_id: "",
2029
+ f_is_defect: "",
2030
+ f_item_name: "气表型号",
2031
+ f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
2032
+ f_path: "",
2033
+ type: "string"
2034
+ },
2035
+ {
2036
+ f_defect_level: null,
2037
+ f_device_id: "",
2038
+ f_is_defect: "",
2039
+ f_item_name: "气表品牌",
2040
+ f_item_value: this.item.f_plan_meters[i].f_aliasname,
2041
+ f_path: "",
2042
+ type: "string"
2043
+ },
2044
+ {
2045
+ f_defect_level: null,
2046
+ f_device_id: "",
2047
+ f_is_defect: "",
2048
+ f_item_name: "进气方向",
2049
+ f_item_value: this.item.f_plan_meters[i].f_flow_direction,
2050
+ f_path: "",
2051
+ type: "string"
2052
+ },
2053
+ {
2054
+ f_defect_level: null,
2055
+ f_device_id: "",
2056
+ f_is_defect: "",
2057
+ f_item_name: "上次表底",
2058
+ f_item_value: this.item.f_plan_meters[i].f_prior_reading ? this.item.f_plan_meters[i].f_prior_reading : 0,
2059
+ f_path: "",
2060
+ type: "number"
2061
+ },
2062
+ {
2063
+ f_defect_level: null,
2064
+ f_device_id: "",
2065
+ f_is_defect: "",
2066
+ f_item_name: "本次表底",
2067
+ f_item_value: "",
2068
+ f_path: "",
2069
+ type: "number"
2070
+ },
2071
+ {
2072
+ f_defect_level: null,
2073
+ f_device_id: "",
2074
+ f_is_defect: "",
2075
+ f_item_name: "表底差值",
2076
+ f_item_value: "",
2077
+ f_path: "",
2078
+ type: "number"
2079
+ }
2080
+ ]
2081
+ })
2082
+ }
2083
+ /*if (this.config[this.devices[de].device].itemname == "燃气表" && this.item.f_plan_meters[i].f_collection_type) {
2084
+ this.data['device' + this.devices[de].n].forEach(device => {
2085
+ //tag)
2086
+ //tag)
2087
+ /!*
2088
+ "累购气量":{"index":8,"type":"number","readonly":true},
2089
+ "累购金额":{"index":8,"type":"number","readonly":true},
2090
+ "字轮读数":{"index":9,"type":"number","checkmust": true},
2091
+ "已用金额":{"index":9,"type":"number","checkmust": true},
2092
+ "剩余气量":{"index":10,"type":"number","checkmust": true},
2093
+ "剩余金额":{"index":10,"type":"number","checkmust": true},
2094
+ "气量异常差值":{"index":11,"type":"number","readonly": true},
2095
+ "金额异常差值":{"index":11,"type":"number","readonly": true}
2096
+ *!/
2097
+ /!*if (this.item.f_plan_meters[i].f_collection_type == '按金额') {
2098
+ if (!this.data.f_collection_type) {
2099
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
2100
+ // delete this.config['燃气表']['items']['累购气量']
2101
+ // delete this.config['燃气表']['items']['已用气量']
2102
+ // delete this.config['燃气表']['items']['剩余气量']
2103
+ // delete this.config['燃气表']['items']['气量异常差值']
2104
+ this.config = this.removeByCollectionType(this.config, this.data.f_collection_type)
2105
+ // this.config = this.removeNestedItem(this.config, '燃气表', '累购气量')
2106
+ // this.config = this.removeNestedItem(this.config, '燃气表', '已用气量')
2107
+ // this.config = this.removeNestedItem(this.config, '燃气表', '剩余气量')
2108
+ // this.config = this.removeNestedItem(this.config, '燃气表', '气量异常差值')
2109
+ device.f_items.push(
2110
+ {
2111
+ f_defect_level: null,
2112
+ f_device_id: "",
2113
+ f_is_defect: "",
2114
+ f_item_name: "初始表底",
2115
+ isshow: false,
2116
+ f_item_value: '',
2117
+ f_path: "",
2118
+ type: "number"
2119
+ },
2120
+ {
2121
+ f_defect_level: null,
2122
+ f_device_id: "",
2123
+ f_is_defect: "",
2124
+ f_item_name: "累购金额",
2125
+ f_item_value: this.item.f_plan_meters[i].f_total_fee,
2126
+ f_path: "",
2127
+ type: "number"
2128
+ },
2129
+ {
2130
+ f_defect_level: null,
2131
+ f_device_id: "",
2132
+ f_is_defect: "",
2133
+ f_item_name: "已用金额",
2134
+ f_item_value: null,
2135
+ f_path: "",
2136
+ type: "number"
2137
+ },
2138
+ {
2139
+ f_defect_level: null,
2140
+ f_device_id: "",
2141
+ f_is_defect: "",
2142
+ f_item_name: "剩余金额",
2143
+ f_item_value: null,
2144
+ f_path: "",
2145
+ type: "number"
2146
+ },
2147
+ {
2148
+ f_defect_level: null,
2149
+ f_device_id: "",
2150
+ f_is_defect: "",
2151
+ f_item_name: "气量异常差值",
2152
+ f_item_value: null,
2153
+ f_path: "",
2154
+ type: "number"
2155
+ },
2156
+ {
2157
+ f_defect_level: null,
2158
+ f_device_id: "",
2159
+ f_is_defect: "",
2160
+ f_item_name: "系统表底数",
2161
+ f_item_value: this.item.f_plan_meters[i].f_metergasnums,
2162
+ f_path: "",
2163
+ type: "number"
2164
+ },
2165
+ {
2166
+ f_defect_level: null,
2167
+ f_device_id: "",
2168
+ f_is_defect: "",
2169
+ f_item_name: "最后通讯时间",
2170
+ f_item_value: this.item.f_plan_meters[i].f_insert_date,
2171
+ f_path: "",
2172
+ type: "string"
2173
+ },
2174
+ {
2175
+ f_defect_level: null,
2176
+ f_device_id: "",
2177
+ f_is_defect: "",
2178
+ f_item_name: "系统剩余金额",
2179
+ f_item_value: this.item.f_plan_meters[i].f_balance_amount,
2180
+ f_path: "",
2181
+ type: "number"
2182
+ },
2183
+ {
2184
+ f_defect_level: null,
2185
+ f_device_id: "",
2186
+ f_is_defect: "",
2187
+ f_item_name: "已用气量",
2188
+ f_item_value: this.item.f_plan_meters[i].f_meter_base,
2189
+ f_path: "",
2190
+ type: "number"
2191
+ },
2192
+ )
2193
+ //tag)
2194
+ }
2195
+ } else
2196
+ if (this.item.f_plan_meters[i].f_collection_type == '按气量') {
2197
+ if (!this.data.f_collection_type) {
2198
+ console.log('this.config,按气量', this.config)
2199
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
2200
+ this.config = this.removeByCollectionType(this.config, this.data.f_collection_type)
2201
+ // this.config = this.removeNestedItem(this.config, '燃气表', '累购金额')
2202
+ // this.config = this.removeNestedItem(this.config, '燃气表', '已用金额')
2203
+ // this.config = this.removeNestedItem(this.config, '燃气表', '剩余金额')
2204
+ // this.config = this.removeNestedItem(this.config, '燃气表', '金额异常差值')
2205
+ device.f_items.push(
2206
+ {
2207
+ f_defect_level: null,
2208
+ f_device_id: "",
2209
+ f_is_defect: "",
2210
+ f_item_name: "初始表底",
2211
+ isshow: true,
2212
+ f_item_value: this.item.f_plan_meters[i].f_initial_base,
2213
+ f_path: "",
2214
+ type: "number"
2215
+ },
2216
+ {
2217
+ f_defect_level: null,
2218
+ f_device_id: "",
2219
+ f_is_defect: "",
2220
+ f_item_name: "累购气量",
2221
+ f_item_value: this.item.f_plan_meters[i].f_total_gas,
2222
+ f_path: "",
2223
+ type: "number"
2224
+ },
2225
+ {
2226
+ f_defect_level: null,
2227
+ f_device_id: "",
2228
+ f_is_defect: "",
2229
+ f_item_name: "已用气量",
2230
+ f_item_value: this.item.f_plan_meters[i].f_meter_base,
2231
+ f_path: "",
2232
+ type: "number"
2233
+ },
2234
+ {
2235
+ f_defect_level: null,
2236
+ f_device_id: "",
2237
+ f_is_defect: "",
2238
+ f_item_name: "剩余气量",
2239
+ f_item_value: "",
2240
+ f_path: "",
2241
+ type: "number"
2242
+ },
2243
+ {
2244
+ f_defect_level: null,
2245
+ f_device_id: "",
2246
+ f_is_defect: "",
2247
+ f_item_name: "气量异常差值",
2248
+ f_item_value: null,
2249
+ f_path: "",
2250
+ type: "number"
2251
+ }
2252
+ )
2253
+ //tag)
2254
+ }
2255
+ }
2256
+ })
2257
+ }
2258
+ else if(this.config[this.devices[de].device].itemname == "燃气表"){
2259
+ //tag
2260
+ this.data['device' + this.devices[de].n].forEach(device => {
2261
+ //tag)
2262
+ if (!this.data.f_collection_type) {
2263
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
2264
+ // delete this.config['燃气表']['items']['累购金额']
2265
+ // delete this.config['燃气表']['items']['已用金额']
2266
+ // delete this.config['燃气表']['items']['剩余金额']
2267
+ // delete this.config['燃气表']['items']['金额异常差值']
2268
+ // this.config = this.removeNestedItem(this.config, '燃气表', '累购金额')
2269
+ // this.config = this.removeNestedItem(this.config, '燃气表', '已用金额')
2270
+ // this.config = this.removeNestedItem(this.config, '燃气表', '剩余金额')
2271
+ // this.config = this.removeNestedItem(this.config, '燃气表', '金额异常差值')
2272
+ this.config = this.removeByCollectionType(this.config, this.data.f_collection_type)
2273
+ device.f_items.push(
2274
+ {
2275
+ f_defect_level: null,
2276
+ f_device_id: "",
2277
+ f_is_defect: "",
2278
+ f_item_name: "初始表底",
2279
+ isshow: true,
2280
+ f_item_value: this.item.f_plan_meters[i].f_initial_base,
2281
+ f_path: "",
2282
+ type: "number"
2283
+ },
2284
+ {
2285
+ f_defect_level: null,
2286
+ f_device_id: "",
2287
+ f_is_defect: "",
2288
+ f_item_name: "累购气量",
2289
+ f_item_value: this.item.f_plan_meters[i].f_total_gas,
2290
+ f_path: "",
2291
+ type: "number"
2292
+ },
2293
+ {
2294
+ f_defect_level: null,
2295
+ f_device_id: "",
2296
+ f_is_defect: "",
2297
+ f_item_name: "已用气量",
2298
+ f_item_value: this.item.f_plan_meters[i].f_meter_base,
2299
+ f_path: "",
2300
+ type: "number"
2301
+ },
2302
+ {
2303
+ f_defect_level: null,
2304
+ f_device_id: "",
2305
+ f_is_defect: "",
2306
+ f_item_name: "剩余气量",
2307
+ f_item_value: '',
2308
+ f_path: "",
2309
+ type: "number"
2310
+ },
2311
+ {
2312
+ f_defect_level: null,
2313
+ f_device_id: "",
2314
+ f_is_defect: "",
2315
+ f_item_name: "气量异常差值",
2316
+ isshow:false,
2317
+ f_item_value: null,
2318
+ f_path: "",
2319
+ type: "number"
2320
+ }
2321
+ )
2322
+ //tag)
2323
+ }
2324
+ })
2325
+ }*/
2326
+ }
2327
+ }
2328
+ }
2329
+ }
2330
+ var pardate = {
2331
+ _this: this,
2332
+ tittle: '安检详情',
2333
+ safe: true
2334
+ }
2335
+ // this.$dispatch('gotoson',pardate)
2336
+ //tag
2337
+ this.$goto('safecheck-userinfo', {userinfo: this.data, noVisit: this.noVisit}, 'repair')
2338
+ },
2339
+ sealBindBack(sealUID) {
2340
+ if (sealUID) {
2341
+ this.$set('data.f_seal_uid', sealUID)
2342
+ }
2343
+ }
2344
+ },
2345
+ watch: {
2346
+ 'row'() {
2347
+ //tag
2348
+ this.copy()
2349
+ }
2350
+ },
2351
+ async ready() {
2352
+ this.startTime = Util.toStandardTimeString()
2353
+ //送气超期功能
2354
+ await this.putDevices()
2355
+ console.log('this.configssss', JSON.stringify(this.config))
2356
+ //如果已检,则提取安检单
2357
+ if (this.item.f_state != '未检') {
2358
+ if (this.role == 'inspect' || this.role == 'androidview') {
2359
+ HostApp.__callback__ = this.loaded
2360
+ HostApp.__this__ = this
2361
+ let that = this
2362
+ let value = {}
2363
+ //tag
2364
+ if (this.role == 'inspect') {
2365
+ //tag
2366
+ if (this.item.f_no_checkplan == '无计划安检') {
2367
+ value = this.$androidUtil.path({
2368
+ alias: 'getUserinfomation',
2369
+ data: {condition: "f_check_item_id = '" + this.item.id + "' and f_no_checkplan = '无计划安检'"}
2370
+ })
2371
+ } else {
2372
+ value = this.$androidUtil.bzLogic('FetchCheckPaper', {id: this.item.id})
2373
+ }
2374
+ } else {
2375
+ value = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data: {condition: `id = '${this.item.f_paper_id}'`}})
2376
+ }
2377
+ Util.replaceFalse(value)
2378
+ //tag)
2379
+ if (value.data.length != 0) {
2380
+ that.$set('data', value.data[0])
2381
+ //tag)
2382
+ // if (this.data.f_collection_type == '按气量') {
2383
+ // this.config = this.removeNestedItem(this.config, '燃气表', '累购金额')
2384
+ // this.config = this.removeNestedItem(this.config, '燃气表', '已用金额')
2385
+ // this.config = this.removeNestedItem(this.config, '燃气表', '剩余金额')
2386
+ // this.config = this.removeNestedItem(this.config, '燃气表', '金额异常差值')
2387
+ // } else if (this.data.f_collection_type == '按金额') {
2388
+ // this.config = this.removeNestedItem(this.config, '燃气表', '累购气量')
2389
+ // this.config = this.removeNestedItem(this.config, '燃气表', '已用气量')
2390
+ // this.config = this.removeNestedItem(this.config, '燃气表', '剩余气量')
2391
+ // this.config = this.removeNestedItem(this.config, '燃气表', '气量异常差值')
2392
+ // }
2393
+ this.config = this.removeByCollectionType(this.config, this.data.f_collection_type)
2394
+ if (value.data[0].f_devices) {
2395
+ for (let da in that.devices) {
2396
+ if (typeof that.devices[da] == 'function') {
2397
+ continue
2398
+ }
2399
+ that.$set('data.device' + that.devices[da].n, [])
2400
+ }
2401
+ value.data[0].f_devices.forEach((item) => {
2402
+ //tag)
2403
+ for (let i in item.f_items) {
2404
+ if (typeof item.f_items[i] == 'function') {
2405
+ continue
2406
+ }
2407
+ // item.f_device_type 燃气表
2408
+ // 拿到 that.config 中 燃气表哪一项
2409
+
2410
+ // for (let de in that.config[item.f_device_type].items) {
2411
+ let items = this.config.find(obj => obj.itemname === item.f_device_type).items;
2412
+ for (let de in items) {
2413
+ if (typeof items[de] == 'function') {
2414
+ continue
2415
+ }
2416
+ if (item.f_items[i].f_item_name == items[de].itemname) {
2417
+ if (items[de].type == 'selector' || items[de].type == 'checkbox') {
2418
+ item.f_items[i].f_item_value = []
2419
+ }
2420
+ }
2421
+ }
2422
+ if (item.f_items[i].f_item_value instanceof Array) {
2423
+ item.f_items[i].f_item_value = JSON.parse(item.f_items[i].f_selected)
2424
+ }
2425
+ }
2426
+ for (let de in that.devices) {
2427
+ if (typeof that.devices[de] == 'function') {
2428
+ continue
2429
+ }
2430
+ // if (that.devices[de].device == item.f_device_type) {
2431
+ if (this.config[that.devices[de].device].itemname == item.f_device_type) {
2432
+ that.data['device' + that.devices[de].n].push({
2433
+ f_device_type: item.f_device_type,
2434
+ f_items: item.f_items
2435
+ })
2436
+ //tag)
2437
+ }
2438
+ }
2439
+ })
2440
+ if (this.role == 'androidview') {
2441
+ Util.androidRatifyPics(that.data, this.$androidUtil.getProxyUrl())
2442
+ Util.androidRatifyPics(that.picture, this.$androidUtil.getProxyUrl())
2443
+ Util.booleanFilter(that.data)
2444
+ }
2445
+ //tag)
2446
+ }
2447
+ } else {
2448
+ //tag
2449
+ this.init()
2450
+ }
2451
+ let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
2452
+ if (isRecodr) {
2453
+ if (isRecodr == 'true') {
2454
+ // this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
2455
+ // 初始化录音
2456
+ let resse = this.record()
2457
+ }
2458
+ }
2459
+ this.$set('data.f_seal_uid', this.item.f_seal_uid)
2460
+ this.$set('data.f_rated_traffic', this.item.f_rated_traffic)
2461
+ //tag
2462
+ var pardate = {
2463
+ _this: this,
2464
+ tittle: '安检详情',
2465
+ safe: true
2466
+ }
2467
+ // this.$dispatch('gotoson',pardate)getImgPath
2468
+ this.$goto('safecheck-userinfo', {userinfo: this.data, noVisit: this.noVisit}, 'repair')
2469
+ } else {
2470
+ let that = this
2471
+ let id
2472
+ if (this.role == 'view') {
2473
+ id = this.item.id
2474
+ }
2475
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data: {condition: `id = '${id}'`}}).then((respanse) => {
2476
+ if (respanse.data.length != 0) {
2477
+ that.data = Object.assign(that.data, respanse.data[0])
2478
+ if (respanse.data[0].f_devices) {
2479
+ for (let da in that.devices) {
2480
+ that.$set('data.device' + that.devices[da].n, [])
2481
+ }
2482
+ respanse.data[0].f_devices.forEach((item) => {
2483
+ for (let de in that.devices) {
2484
+ if (that.devices[de].device == item.f_device_type) {
2485
+ that.data['device' + that.devices[de].n].push({
2486
+ f_device_type: item.f_device_type,
2487
+ f_items: item.f_items
2488
+ })
2489
+ }
2490
+ }
2491
+ })
2492
+ }
2493
+ Util.replaceFalse(that.data)
2494
+ Util.booleanFilter(that.data)
2495
+ if (this.role == 'view') {
2496
+ Util.ratifyPics(that.data)
2497
+ } else {
2498
+ Util.androidRatifyPics(that.data, this.$androidUtil.getProxyUrl())
2499
+ }
2500
+ //tag
2501
+ } else {
2502
+ alert("该安检单可能已不在本地!")
2503
+ this.init()
2504
+ }
2505
+ this.$set('data.f_seal_uid', this.item.f_seal_uid)
2506
+ this.$set('data.f_rated_traffic', this.item.f_rated_traffic)
2507
+ var pardate = {
2508
+ _this: this,
2509
+ tittle: '安检详情',
2510
+ safe: true
2511
+ }
2512
+ // this.$dispatch('gotoson',pardate)
2513
+ this.$goto('safecheck-userinfo', {userinfo: this.data, noVisit: this.noVisit}, 'paper-router')
2514
+ }
2515
+ ).catch(
2516
+ (respanse) => {
2517
+ alert('查找安检单失败')
2518
+ })
2519
+ }
2520
+ } else {
2521
+ let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
2522
+ if (isRecodr) {
2523
+ if (isRecodr == 'true') {
2524
+ // this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
2525
+ // 初始化录音
2526
+ let resse = this.record()
2527
+ }
2528
+ }
2529
+ this.init()
2530
+ console.log('this.configaaa', this.config)
2531
+ // if (!this.data.f_seal_uid){
2532
+ // this.$showMessage("该用户未施封,请先在客户信息中点击去施封,施封后才能上传安检单!")
2533
+ // }
2534
+ }
2535
+ },
2536
+ components: {
2537
+ // 'door-service': DoorService,
2538
+ // 'repair-info': RepairInfo,
2539
+ // 'repair-user-info': RepairUserInfo,
2540
+ // 'outlay': Outlay,
2541
+ // 'fault-all': FaultAll,
2542
+ // 'repair-details':RepairDetails
2543
+ // 'pipeline': Pipeline,
2544
+ // 'device-service': DeviceService,
2545
+ // 'trouble-removal': TroubleRemoval,
2546
+ // 'cooking-utensils': CookingUtensils,
2547
+ // 'repair-matter-info': RepairMatterInfo,
2548
+ // 'first-gas-check': FirstGasCheck,
2549
+ // 'tel-change-matter': TelChangeMatter/
2550
+ },
2551
+ events: {
2552
+ 'tijiao': function () {
2553
+ // 事件回调内的 `this` 自动绑定到注册它的实例上
2554
+ this.confirm()
2555
+ },
2556
+ 'toSealBind': function () {
2557
+ console.log("bind====")
2558
+ new HttpResetClass().load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getSealInfo`, {
2559
+ data: {
2560
+ condition: `ui.f_userinfo_id = ${this.data.f_userinfoid}`
2561
+ }
2562
+ }, {resolveMsg: null, rejectMsg: '网络异常'}).then((res) => {
2563
+ console.log('res=', JSON.stringify(res))
2564
+ if (res.data.length) {
2565
+ var pardate = {
2566
+ _this: this,
2567
+ title: '铅封绑定',
2568
+ safe: true
2569
+ }
2570
+ this.$dispatch('gotoson', pardate)
2571
+ this.$goto('seal-bind', {row: res.data[0]}, 'self', this.sealBindBack)
2572
+ } else {
2573
+ this.$showMessage("未查询到该用户信息!")
2574
+ }
2575
+ })
2576
+ }
2577
+ }
2578
+ }
2579
+ </script>
2580
+ <style lang="less">
2581
+ @import "../../../bootstrap/less/variables.less";
2582
+
2583
+ .noclickbut {
2584
+ pointer-events: none;
2585
+ }
2586
+
2587
+ .tab-befor-img (@url) {
2588
+ content: '';
2589
+ background-image: url("@{url}");
2590
+ background-size: 20px;
2591
+ display: inline-block;
2592
+ margin-right: 8px;
2593
+ margin-top: 0.3em;
2594
+ height: 1.3em;
2595
+ width: 1.3em;
2596
+ vertical-align: -35%;
2597
+ }
2598
+
2599
+ @media screen and (min-width: 768px) {
2600
+ .android-repair-order > div > ul a {
2601
+ font-size: @font-size-h2;
2602
+ margin: 0.3em 0;
2603
+ }
2604
+ }
2605
+
2606
+ .repair-details-class {
2607
+ &::before {
2608
+ .tab-befor-img("../../../assets/huneiweixiu1.png");
2609
+ }
2610
+ }
2611
+
2612
+ .repair-info-class {
2613
+ &::before {
2614
+ .tab-befor-img("../../../assets/baoxiuxinxi1.png");
2615
+ }
2616
+ }
2617
+
2618
+ .repair-user-info-class {
2619
+ &::before {
2620
+ .tab-befor-img("../../../assets/jibenxinxi1.png")
2621
+ }
2622
+ }
2623
+
2624
+ .door-service-class {
2625
+ &::before {
2626
+ .tab-befor-img("../../../assets/huneiweixiu1.png")
2627
+ }
2628
+ }
2629
+
2630
+ .pipeline-class {
2631
+ &::before {
2632
+ .tab-befor-img("../../../assets/guandao1.png")
2633
+ }
2634
+ }
2635
+
2636
+ .device-service-class {
2637
+ &::before {
2638
+ .tab-befor-img("../../../assets/shebeiweixiu1.png")
2639
+ }
2640
+ }
2641
+
2642
+ .trouble-removal-class {
2643
+ &::before {
2644
+ .tab-befor-img("../../../assets/shiguchuli.png")
2645
+ }
2646
+ }
2647
+
2648
+ .cooking-utensils-class {
2649
+ &::before {
2650
+ .tab-befor-img("../../../assets/zaoju1.png")
2651
+ }
2652
+ }
2653
+
2654
+ .outlay-class {
2655
+ &::before {
2656
+ .tab-befor-img("../../../assets/feiyong1.png")
2657
+ }
2658
+ }
2659
+
2660
+ .fault-all-class {
2661
+ &::before {
2662
+ .tab-befor-img("../../../assets/guzhanghuizong1.png")
2663
+ }
2664
+ }
2665
+
2666
+ .photo-write-class {
2667
+ &::before {
2668
+ .tab-befor-img("../../../assets/zaoju.png")
2669
+ }
2670
+ }
2671
+
2672
+ .delay-apply-class {
2673
+ &::before {
2674
+ .tab-befor-img("../../../assets/yonghubaoxiu.png")
2675
+ }
2676
+ }
2677
+
2678
+ .repair-back-class {
2679
+ &::before {
2680
+ .tab-befor-img("../../../assets/fanhui.png")
2681
+ }
2682
+ }
2683
+
2684
+ .butt2 {
2685
+ display: inline;
2686
+ float: right;
2687
+ width: 10px;
2688
+ text-align: center;
2689
+ align-items: center;
2690
+ position: absolute;
2691
+ top: 50%;
2692
+
2693
+ left: 90%;
2694
+ transform: translate(-50%, -50%);
2695
+ }
2696
+
2697
+ .linesty {
2698
+ display: inline-block;
2699
+ height: 1px;
2700
+ width: 100%;
2701
+ background: #d0d0d0;
2702
+ overflow: hidden;
2703
+ vertical-align: middle;
2704
+ }
2705
+
2706
+ .spanboder {
2707
+ border-bottom: 2px solid #499edf;
2708
+ padding-bottom: 8px
2709
+ }
2710
+
2711
+ .app-botton {
2712
+ position: fixed;
2713
+ background: #87b2dd;
2714
+ right: 8px;
2715
+ color: #FFF;
2716
+ padding: 8px;
2717
+ text-align: center;
2718
+ font-size: 1.2em;
2719
+ z-index: 10;
2720
+ opacity: 0.5;
2721
+ bottom: 50px;
2722
+ margin-top: -10px;
2723
+ height: 40px;
2724
+ }
2725
+
2726
+ .android-repair-order > div > ul a {
2727
+ font-size: 12px;
2728
+ color: #333333;
2729
+ padding: 13px 16px;
2730
+ }
2731
+ </style>