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