safecheck-client 3.0.34-5 → 3.0.34-50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (378) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/android.html +18 -18
  4. package/config/dev.env.js +6 -6
  5. package/config/index.js +38 -38
  6. package/config/prod.env.js +3 -3
  7. package/config/test.env.js +6 -6
  8. package/docs/AppBase.md +22 -22
  9. package/docs/Busy.md +14 -14
  10. package/docs/CriteriaPaged.md +47 -47
  11. package/docs/DataGrid.md +54 -54
  12. package/docs/DataModel.md +22 -22
  13. package/docs/Dynamic.md +42 -42
  14. package/docs/FormPrint.md +18 -18
  15. package/docs/GetParams.md +11 -11
  16. package/docs/GridTree.md +47 -47
  17. package/docs/HttpBusy.md +13 -13
  18. package/docs/HttpStore.md +29 -29
  19. package/docs/MessageBox.md +28 -28
  20. package/docs/PagedList.md +29 -29
  21. package/docs/Pager.md +21 -21
  22. package/docs/PrintFile.md +38 -38
  23. package/docs/Project.md +23 -23
  24. package/docs/Route.md +105 -105
  25. package/docs/SafetyCheck/AdjustPlan.md +13 -13
  26. package/docs/SafetyCheck/CheckerPlan.md +12 -12
  27. package/docs/Task.md +46 -46
  28. package/docs/TreeList.md +28 -28
  29. package/docs/TreeMixin.md +18 -18
  30. package/docs/all.md +10 -10
  31. package/docs/list.md +42 -42
  32. package/docs/partial.md +75 -75
  33. package/docs/selector.md +82 -82
  34. package/docs/tree.md +40 -40
  35. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/Snippets.md +28 -28
  36. 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
  37. 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
  38. 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
  39. package/docs//347/225/214/351/235/242/345/210/266/344/275/234/350/247/204/350/214/203.md +54 -54
  40. package/examples/AddressList/App.vue +13 -13
  41. package/examples/AddressList/index.html +11 -11
  42. package/examples/DispatchList/App.vue +10 -10
  43. package/examples/DispatchList/BaseTree.vue +13 -13
  44. package/examples/DispatchList/Init.vue +22 -22
  45. package/examples/DispatchList/Test.vue +20 -20
  46. package/examples/DispatchList/index.html +11 -11
  47. package/examples/DispatchList/main.js +18 -18
  48. package/home.html +16 -16
  49. package/package.json +1 -1
  50. package/publish.bat +7 -7
  51. package/release.bat +5 -5
  52. package/src/App-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.vue +55 -0
  53. package/src/Widget.vue +13 -13
  54. package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  55. package/src/android-bootstrap/less/.csscomb.json +304 -304
  56. package/src/android-bootstrap/less/.csslintrc +19 -19
  57. package/src/android-bootstrap/less/alerts.less +73 -73
  58. package/src/android-bootstrap/less/badges.less +66 -66
  59. package/src/android-bootstrap/less/bootstrap.less +56 -56
  60. package/src/android-bootstrap/less/breadcrumbs.less +26 -26
  61. package/src/android-bootstrap/less/button-groups.less +247 -247
  62. package/src/android-bootstrap/less/buttons.less +173 -173
  63. package/src/android-bootstrap/less/carousel.less +269 -269
  64. package/src/android-bootstrap/less/close.less +34 -34
  65. package/src/android-bootstrap/less/code.less +69 -69
  66. package/src/android-bootstrap/less/component-animations.less +33 -33
  67. package/src/android-bootstrap/less/grid.less +84 -84
  68. package/src/android-bootstrap/less/input-groups.less +167 -167
  69. package/src/android-bootstrap/less/jumbotron.less +52 -52
  70. package/src/android-bootstrap/less/labels.less +64 -64
  71. package/src/android-bootstrap/less/list-group.less +141 -141
  72. package/src/android-bootstrap/less/media.less +66 -66
  73. package/src/android-bootstrap/less/mixins/alerts.less +14 -14
  74. package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
  75. package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
  76. package/src/android-bootstrap/less/mixins/buttons.less +69 -69
  77. package/src/android-bootstrap/less/mixins/center-block.less +7 -7
  78. package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
  79. package/src/android-bootstrap/less/mixins/forms.less +90 -90
  80. package/src/android-bootstrap/less/mixins/gradients.less +59 -59
  81. package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
  82. package/src/android-bootstrap/less/mixins/grid.less +122 -122
  83. package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
  84. package/src/android-bootstrap/less/mixins/image.less +33 -33
  85. package/src/android-bootstrap/less/mixins/labels.less +12 -12
  86. package/src/android-bootstrap/less/mixins/list-group.less +30 -30
  87. package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
  88. package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
  89. package/src/android-bootstrap/less/mixins/opacity.less +8 -8
  90. package/src/android-bootstrap/less/mixins/pagination.less +24 -24
  91. package/src/android-bootstrap/less/mixins/panels.less +24 -24
  92. package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
  93. package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
  94. package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
  95. package/src/android-bootstrap/less/mixins/resize.less +6 -6
  96. package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
  97. package/src/android-bootstrap/less/mixins/size.less +10 -10
  98. package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
  99. package/src/android-bootstrap/less/mixins/table-row.less +44 -44
  100. package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
  101. package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
  102. package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
  103. package/src/android-bootstrap/less/mixins.less +40 -40
  104. package/src/android-bootstrap/less/modals.less +151 -151
  105. package/src/android-bootstrap/less/navbar.less +660 -660
  106. package/src/android-bootstrap/less/navs.less +290 -290
  107. package/src/android-bootstrap/less/normalize.less +424 -424
  108. package/src/android-bootstrap/less/pager.less +76 -76
  109. package/src/android-bootstrap/less/pagination.less +89 -89
  110. package/src/android-bootstrap/less/panels.less +274 -274
  111. package/src/android-bootstrap/less/popovers.less +131 -131
  112. package/src/android-bootstrap/less/print.less +101 -101
  113. package/src/android-bootstrap/less/progress-bars.less +87 -87
  114. package/src/android-bootstrap/less/responsive-embed.less +35 -35
  115. package/src/android-bootstrap/less/responsive-utilities.less +194 -194
  116. package/src/android-bootstrap/less/scaffolding.less +161 -161
  117. package/src/android-bootstrap/less/tables.less +262 -262
  118. package/src/android-bootstrap/less/theme.less +291 -291
  119. package/src/android-bootstrap/less/thumbnails.less +36 -36
  120. package/src/android-bootstrap/less/tooltip.less +102 -102
  121. package/src/android-bootstrap/less/type.less +303 -303
  122. package/src/android-bootstrap/less/utilities.less +55 -55
  123. package/src/android-bootstrap/less/variables.less +896 -896
  124. package/src/android-bootstrap/less/wells.less +29 -29
  125. package/src/androidTest.js +20 -20
  126. package/src/assets/123.png +0 -0
  127. package/src/assets/f8632d3c8c4c1cb68e99da754cab1a7.png +0 -0
  128. package/src/bootstrap/less/.csscomb.json +304 -304
  129. package/src/bootstrap/less/.csslintrc +19 -19
  130. package/src/bootstrap/less/alerts.less +73 -73
  131. package/src/bootstrap/less/badges.less +66 -66
  132. package/src/bootstrap/less/breadcrumbs.less +26 -26
  133. package/src/bootstrap/less/button-groups.less +247 -247
  134. package/src/bootstrap/less/buttons.less +172 -172
  135. package/src/bootstrap/less/carousel.less +269 -269
  136. package/src/bootstrap/less/close.less +34 -34
  137. package/src/bootstrap/less/code.less +69 -69
  138. package/src/bootstrap/less/component-animations.less +33 -33
  139. package/src/bootstrap/less/dropdowns.less +216 -216
  140. package/src/bootstrap/less/forms.less +626 -626
  141. package/src/bootstrap/less/grid.less +84 -84
  142. package/src/bootstrap/less/input-groups.less +167 -167
  143. package/src/bootstrap/less/jumbotron.less +52 -52
  144. package/src/bootstrap/less/labels.less +64 -64
  145. package/src/bootstrap/less/list-group.less +141 -141
  146. package/src/bootstrap/less/media.less +66 -66
  147. package/src/bootstrap/less/mixins/alerts.less +14 -14
  148. package/src/bootstrap/less/mixins/background-variant.less +9 -9
  149. package/src/bootstrap/less/mixins/border-radius.less +18 -18
  150. package/src/bootstrap/less/mixins/buttons.less +69 -69
  151. package/src/bootstrap/less/mixins/center-block.less +7 -7
  152. package/src/bootstrap/less/mixins/clearfix.less +22 -22
  153. package/src/bootstrap/less/mixins/forms.less +90 -90
  154. package/src/bootstrap/less/mixins/gradients.less +59 -59
  155. package/src/bootstrap/less/mixins/grid-framework.less +92 -92
  156. package/src/bootstrap/less/mixins/grid.less +122 -122
  157. package/src/bootstrap/less/mixins/hide-text.less +21 -21
  158. package/src/bootstrap/less/mixins/image.less +33 -33
  159. package/src/bootstrap/less/mixins/labels.less +12 -12
  160. package/src/bootstrap/less/mixins/list-group.less +30 -30
  161. package/src/bootstrap/less/mixins/nav-divider.less +10 -10
  162. package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
  163. package/src/bootstrap/less/mixins/opacity.less +8 -8
  164. package/src/bootstrap/less/mixins/pagination.less +24 -24
  165. package/src/bootstrap/less/mixins/panels.less +24 -24
  166. package/src/bootstrap/less/mixins/progress-bar.less +10 -10
  167. package/src/bootstrap/less/mixins/reset-filter.less +8 -8
  168. package/src/bootstrap/less/mixins/reset-text.less +18 -18
  169. package/src/bootstrap/less/mixins/resize.less +6 -6
  170. package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
  171. package/src/bootstrap/less/mixins/size.less +10 -10
  172. package/src/bootstrap/less/mixins/tab-focus.less +9 -9
  173. package/src/bootstrap/less/mixins/table-row.less +44 -44
  174. package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
  175. package/src/bootstrap/less/mixins/text-overflow.less +8 -8
  176. package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
  177. package/src/bootstrap/less/mixins.less +40 -40
  178. package/src/bootstrap/less/modals.less +151 -151
  179. package/src/bootstrap/less/navbar.less +660 -660
  180. package/src/bootstrap/less/normalize.less +424 -424
  181. package/src/bootstrap/less/pager.less +76 -76
  182. package/src/bootstrap/less/pagination.less +89 -89
  183. package/src/bootstrap/less/panels.less +275 -275
  184. package/src/bootstrap/less/popovers.less +131 -131
  185. package/src/bootstrap/less/print.less +101 -101
  186. package/src/bootstrap/less/progress-bars.less +87 -87
  187. package/src/bootstrap/less/responsive-embed.less +35 -35
  188. package/src/bootstrap/less/responsive-utilities.less +194 -194
  189. package/src/bootstrap/less/scaffolding.less +161 -161
  190. package/src/bootstrap/less/theme.less +291 -291
  191. package/src/bootstrap/less/thumbnails.less +36 -36
  192. package/src/bootstrap/less/tooltip.less +102 -102
  193. package/src/bootstrap/less/type.less +303 -303
  194. package/src/bootstrap/less/utilities.less +55 -55
  195. package/src/bootstrap/less/wells.less +29 -29
  196. package/src/components/FileUpload.vue +696 -696
  197. package/src/components/Hello.vue +39 -39
  198. package/src/components/LeftTree.vue +27 -27
  199. package/src/components/LoadData.vue +62 -0
  200. package/src/components/android/AddGas.vue +147 -147
  201. package/src/components/android/AddressList.vue +61 -61
  202. package/src/components/android/AndroidDefectDeal.vue +1 -0
  203. package/src/components/android/AreaPlan.vue +566 -572
  204. package/src/components/android/AttendanceTally.vue +116 -116
  205. package/src/components/android/Blank.vue +10 -10
  206. package/src/components/android/CheckPlanSelect.vue +704 -0
  207. package/src/components/android/CheckUnplanPage.vue +56 -56
  208. package/src/components/android/Checker.vue +12 -12
  209. package/src/components/android/CheckerAnnual.vue +81 -81
  210. package/src/components/android/CheckerAvarta.vue +82 -82
  211. package/src/components/android/CheckerMonthly.vue +84 -84
  212. package/src/components/android/EquipmentInspection.vue +348 -348
  213. package/src/components/android/FootprintMap.vue +120 -120
  214. package/src/components/android/HiddentroubleInvestigation.vue +192 -192
  215. package/src/components/android/LcheckUnplan.vue +108 -108
  216. package/src/components/android/MasterMain.vue +77 -77
  217. package/src/components/android/Menu.vue +132 -132
  218. package/src/components/android/NavBottom.vue +157 -157
  219. package/src/components/android/PaperAlarm.vue +85 -85
  220. package/src/components/android/PaperDeviceNoncivil.vue +214 -214
  221. package/src/components/android/PaperFeedback.vue +1 -1
  222. package/src/components/android/PaperFeedbackTemp.vue +1 -1
  223. package/src/components/android/PlumberAnnual.vue +83 -83
  224. package/src/components/android/PlumberAnnualDetail.vue +65 -65
  225. package/src/components/android/PlumberMonthly.vue +84 -84
  226. package/src/components/android/PostMap.vue +83 -83
  227. package/src/components/android/QRCode/QRCodeBinding.vue +294 -0
  228. package/src/components/android/QRCode/QRCodePage.vue +212 -0
  229. package/src/components/android/QueryCheckHistory.vue +122 -122
  230. package/src/components/android/QueryCheckHistoryItem.vue +62 -62
  231. package/src/components/android/RepairMain.vue +60 -60
  232. package/src/components/android/Repairman.vue +12 -12
  233. package/src/components/android/SafecheckDevices.vue +1298 -1298
  234. package/src/components/android/SafecheckDevicesTemp.vue +1 -1
  235. package/src/components/android/SafecheckOrderV.vue +2809 -2809
  236. package/src/components/android/StationMaster.vue +12 -12
  237. package/src/components/android/SwitchValve.vue +323 -323
  238. package/src/components/android/examples/SafeListExamples.vue +96 -0
  239. package/src/components/android/examples/UserExamples.vue +126 -0
  240. package/src/components/android/userinfo/SafecheckUserInfo.vue +1 -1
  241. package/src/components/checkerphonestate/Checker.vue +32 -32
  242. package/src/components/checkerphonestate/CheckerState.vue +97 -97
  243. package/src/components/defects/AddDefectModal.vue +120 -120
  244. package/src/components/defects/AddDevice.vue +95 -95
  245. package/src/components/defects/DefectModal.vue +101 -101
  246. package/src/components/defects/DevicesAndItem.vue +39 -39
  247. package/src/components/defects/DevicesSeting.vue +106 -106
  248. package/src/components/issueplan/IssuePlanMain.vue +23 -23
  249. package/src/components/metterfiles/AddUserfiles.vue +246 -246
  250. package/src/components/metterfiles/MetterFiles.vue +104 -104
  251. package/src/components/notice/NoticeForm.vue +100 -100
  252. package/src/components/notice/NoticeIssue.vue +20 -20
  253. package/src/components/notice/NoticeQuery.vue +76 -76
  254. package/src/components/paper/PicViewer.vue +18 -18
  255. package/src/components/paper/RepairVerifyForm.vue +76 -76
  256. package/src/components/phonestate/DailyTraffic.vue +57 -57
  257. package/src/components/phonestate/LastKnownState.vue +74 -74
  258. package/src/components/phonestate/MonthlyTraffic.vue +66 -66
  259. package/src/components/phonestate/MonthlyTrafficRouter.vue +15 -15
  260. package/src/components/phonestate/PostMap.vue +82 -82
  261. package/src/components/querycheckpaper/PaperItem.vue +59 -59
  262. package/src/components/rongcheng/AddPlanItem.vue +4 -0
  263. package/src/components/rongcheng/AspiratedUserInfo.vue +1 -1
  264. package/src/components/rongcheng/CheckSearchUser.vue +40 -14
  265. package/src/components/rongcheng/PaperStatem.vue +6 -1
  266. package/src/components/rongcheng/PhoneDevicesInfo.vue +16 -1
  267. package/src/components/rongcheng/SafecheckOrderV.vue +12 -3
  268. package/src/components/rongcheng/SafecheckOrderVCli.vue +9 -0
  269. package/src/components/task/RepairAnnual.vue +79 -79
  270. package/src/components/task/RepairAnnualDetail.vue +49 -49
  271. package/src/components/task/RepairMonthly.vue +91 -91
  272. package/src/components/task/TaskAnnual.vue +77 -77
  273. package/src/components/task/TaskAnnualDetail.vue +47 -47
  274. package/src/components/task/TaskMonthly.vue +89 -89
  275. package/src/components/userfile/MeterFile.vue +145 -145
  276. package/src/components/userfile/MeterModify.vue +46 -46
  277. package/src/components/userfile/UserfileChange.vue +277 -277
  278. package/src/components/userfileaudit/MeterAuditFile.vue +129 -129
  279. package/src/filiale/baiyin/android/SafecheckOrderV.vue +2798 -0
  280. package/src/filiale/baiyin/android.js +1 -0
  281. package/src/filiale/baiyin/pc/checkUserList.vue +771 -771
  282. package/src/filiale/baiyin/pc.js +21 -21
  283. package/src/filiale/bayan/android/PaperFeedback.vue +1 -1
  284. package/src/filiale/bayan/android/SafecheckDevices.vue +1 -1
  285. package/src/filiale/bayan/android/SafecheckOrderV.vue +52 -29
  286. package/src/filiale/bayan/android/SafecheckUserInfo.vue +1 -1
  287. package/src/filiale/dexin/android/SafecheckDevices.vue +1 -1
  288. package/src/filiale/fugou/pc/CheckBookSearchUser.vue +35 -15
  289. package/src/filiale/hanzhong/android/PaperFeedback.vue +1 -1
  290. package/src/filiale/hanzhong/android/SafecheckDevices.vue +1 -1
  291. package/src/filiale/hanzhong/android/SafecheckUserInfo.vue +1 -1
  292. package/src/filiale/huaran/android/SafecheckOrderV.vue +2803 -0
  293. package/src/filiale/huaran/android.js +12 -0
  294. package/src/filiale/huaran/pc/CheckBook.vue +313 -0
  295. package/src/filiale/huaran/pc/CheckBookAll.vue +69 -0
  296. package/src/filiale/huaran/pc/CheckBookArea.vue +170 -0
  297. package/src/filiale/huaran/pc/CheckBookCompany.vue +166 -0
  298. package/src/filiale/huaran/pc/CheckBookDetails.vue +196 -0
  299. package/src/filiale/huaran/pc/CheckBookEntry.vue +61 -0
  300. package/src/filiale/huaran/pc/CheckBookList.vue +386 -0
  301. package/src/filiale/huaran/pc/CheckBookSearchArea.vue +564 -0
  302. package/src/filiale/huaran/pc/CheckBookSearchUnit.vue +229 -0
  303. package/src/filiale/huaran/pc/CheckBookSearchUser.vue +604 -0
  304. package/src/filiale/huaran/pc/CheckBookUser.vue +112 -0
  305. package/src/filiale/huaran/pc/PaperList.vue +822 -0
  306. package/src/filiale/huaran/pc/PlanManage.vue +887 -0
  307. package/src/filiale/huaran/pc/checkPlanList.vue +419 -0
  308. package/src/filiale/huaran/pc/checkUserList.vue +867 -0
  309. package/src/filiale/huaran/pc.js +27 -0
  310. package/src/filiale/jiaxian/android/AddPlanItem.vue +447 -0
  311. package/src/filiale/jiaxian/android/PhoneUpUserinfo.vue +1229 -0
  312. package/src/filiale/jiaxian/android/SafecheckDevices.vue +4 -4
  313. package/src/filiale/jiaxian/android/SafecheckOrderV.vue +2811 -0
  314. package/src/filiale/jiaxian/android/SafecheckUserInfo.vue +784 -0
  315. package/src/filiale/jiaxian/android.js +4 -0
  316. package/src/filiale/jingyang/android/PaperFeedback.vue +1 -1
  317. package/src/filiale/jingyang/android/SafecheckUserInfo.vue +1 -1
  318. package/src/filiale/kelai/pc/CheckPlanAreaList.vue +15 -7
  319. package/src/filiale/pingxiang/android/PaperFeedback.vue +1 -1
  320. package/src/filiale/qingjian/android/SafecheckDevices.vue +1 -1
  321. package/src/filiale/qingjian/android/SafecheckUserInfo.vue +1 -1
  322. package/src/filiale/ruihua/android/SafecheckOrderV.vue +2747 -0
  323. package/src/filiale/ruihua/android/SafecheckUserInfo.vue +804 -0
  324. package/src/filiale/ruihua/android.js +11 -0
  325. package/src/filiale/shiquan/android/SafecheckDevices.vue +1 -1
  326. package/src/filiale/siyang/android/SafecheckUserInfo.vue +1 -1
  327. package/src/filiale/siyang/pc/CheckBookSearchArea.vue +645 -0
  328. package/src/filiale/siyang/pc/CheckPlanAreaList.vue +512 -0
  329. package/src/filiale/siyang/pc/CheckSearchUser.vue +982 -0
  330. package/src/filiale/siyang/pc/HiddenSituation.vue +167 -0
  331. package/src/filiale/siyang/pc/checkPlanList.vue +367 -0
  332. package/src/filiale/siyang/pc/checkUserList.vue +22 -18
  333. package/src/filiale/siyang/pc.js +21 -16
  334. package/src/filiale/tongchuan/android/Select.vue +421 -0
  335. package/src/filiale/tongchuan/android.js +1 -0
  336. package/src/filiale/tongchuan/pc/PaperDefectMain.vue +1 -1
  337. package/src/filiale/tongchuan/utils/EventListener.js +29 -0
  338. package/src/filiale/tongchuan/utils/coerceBoolean.js +7 -0
  339. package/src/filiale/weinan/android/SafecheckDevices.vue +1 -1
  340. package/src/filiale/weinan/android/SafecheckOrderV.vue +1 -1
  341. package/src/filiale/weinan/pc/CheckBookSearchUserList.vue +57 -59
  342. package/src/filiale/weinan/pc/DefectListNew.vue +617 -617
  343. package/src/filiale/weinan/pc/DefectMainNew.vue +63 -63
  344. package/src/filiale/weinan/pc/DefectPaperNew.vue +31 -0
  345. package/src/filiale/weinan/pc/DeviceChange.vue +1088 -0
  346. package/src/filiale/weinan/pc/checkUserList.vue +34 -113
  347. package/src/filiale/weinan/pc.js +47 -46
  348. package/src/filiale/wuan/android/SafecheckOrderV.vue +1 -0
  349. package/src/filiale/wuan/android/SafecheckUserInfo.vue +4 -0
  350. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +1192 -1200
  351. package/src/filiale/yangchunboneng/android/DailyworkloadQuery.vue +472 -480
  352. package/src/filiale/yangchunboneng/android/PaperFeedback.vue +1 -1
  353. package/src/filiale/yangchunboneng/android/SafecheckDevices.vue +1332 -1332
  354. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +1 -1
  355. package/src/filiale/yangchunboneng/android/safeHistoryLook.vue +473 -481
  356. package/src/filiale/yangchunboneng/pc/CheckBookSearchUser.vue +9 -7
  357. package/src/filiale/yongzhou/android/PaperFeedback.vue +1 -1
  358. package/src/filiale/yongzhou/android/SafecheckDevices.vue +1 -1
  359. package/src/filiale/yongzhou/android/SafecheckUserInfo.vue +1 -1
  360. package/src/filiale/yuansheng/android/SafecheckDevices.vue +11 -1
  361. package/src/filiale/yuansheng/pc/NewCheckpaper.vue +10 -2
  362. package/src/filiale/yunchengminsheng/android/PaperFeedback.vue +1 -1
  363. package/src/filiale/yunchengminsheng/android/SafecheckDevices.vue +1 -1
  364. package/src/filiale/yunchengminsheng/android/SafecheckUserInfo.vue +1 -1
  365. package/src/main-/345/215/225/351/241/265/351/235/242/346/211/223/345/214/205/347/224/250.js +24 -0
  366. package/src/plugins/LoadData.js +10 -10
  367. package/src/plugins/LoadParams.js +24 -24
  368. package/src/safecheck-android.js +301 -296
  369. package/src/stores/wxconfig.js +10 -10
  370. package/src/utils/getNowDate.js +33 -33
  371. package/test/e2e/custom-assertions/elementCount.js +26 -26
  372. package/test/e2e/nightwatch.conf.js +40 -40
  373. package/test/e2e/runner.js +30 -30
  374. package/test/e2e/specs/test.js +13 -13
  375. package/test/unit/.eslintrc +5 -5
  376. package/test/unit/TestUtil.js +62 -62
  377. package/test/unit/context.html +20 -20
  378. package/test/unit/index.js +13 -13
@@ -0,0 +1,2798 @@
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 '../../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 (!this.data.f_user_phone){
683
+ return '请输入正确的电话号码'
684
+ }
685
+ if(!(/^\d{11}$/.test(this.data.f_user_phone.trim()))) {
686
+ return '请输入正确的电话号码'
687
+ }
688
+ // if(Util.required(this.data.f_residential_area))
689
+ // return prefix + '小区名称必须输入'
690
+ // if(Util.required(this.data.f_address))
691
+ // return prefix + '地址必须输入'
692
+ },
693
+ verifyDevices() {
694
+ for (let dev in this.config) {
695
+ if (this.config[dev].checkmust == true) {
696
+ let error = true
697
+ for(let device in this.data) {
698
+ if (device.startsWith("device")) {
699
+ for (let item in this.data[device]) {
700
+ if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
701
+ error = false
702
+ }
703
+ }
704
+ }
705
+ }
706
+ if (error) {
707
+ return "请检查" + dev
708
+ }
709
+ }
710
+ }
711
+
712
+ for (let dev in this.config) {
713
+ for(let device in this.data) {
714
+ if (device.startsWith("device")) {
715
+ for (let item in this.data[device]) {
716
+ //检查每一条安检结果
717
+ if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
718
+ for (let i in this.data[device][item].f_items) {
719
+ for (let it in this.config[dev].items) {
720
+ if (it == this.data[device][item].f_items[i].f_item_name) {
721
+ let check=false
722
+ if (!this.data[device][item].f_items[i].f_item_value){
723
+ check=true
724
+ }else if (Array.isArray(this.data[device][item].f_items[i].f_item_value)){
725
+ if (this.data[device][item].f_items[i].f_item_value.length==0){
726
+ check=true
727
+ }
728
+ }
729
+
730
+ if(this.config[dev].items[it].type=='picture' && this.config[dev].items[it].checkmust == true && !this.data[device][item].f_items[i].f_path){
731
+ return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
732
+ }
733
+ if (this.config[dev].items[it].type !='picture' && this.config[dev].items[it].checkmust == true && check) {
734
+ return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
735
+ }
736
+ }
737
+ }
738
+ //检查安检下拉结果
739
+ if (this.data[device][item].f_items[i].type == 'selector' || this.data[device][item].f_items[i].type == 'radio') {
740
+ if (this.data[device][item].f_items[i].f_is_defect == true && this.data[device][item].f_items[i].f_path == Vue.nopic) {
741
+ 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 + "选中必须拍照"
742
+ }
743
+ }
744
+ }
745
+ }
746
+ }
747
+ }
748
+ }
749
+ }
750
+ },
751
+ verifyFeedback() {
752
+ let prefix = '拍照签名:'
753
+ //tag)
754
+ if(Vue.android && (!this.data.f_overall_imgs || this.data.f_overall_imgs.length < this.imgsnum) && this.data.f_entry_status == '入户')
755
+ return prefix + `必须有${this.imgsnum}安检总体照片`
756
+ if(Vue.android && (!this.data.f_sign_path || this.data.f_sign_path.length == 0) && this.data.f_entry_status == '入户')
757
+ return prefix + '必须有用户签名'
758
+ if(Vue.android && this.data.f_defect_notified && this.data.f_notified_path == Vue.nopic)
759
+ return prefix + '下发安检通知书则必须给通知书拍照'
760
+ if(Vue.android && this.data.f_blacklist && this.data.f_blocking_cause=='')
761
+ return prefix + '请填写拉黑原因'
762
+ if(!this.data.f_client_evaluation && this.data.f_entry_status == '入户')
763
+ return prefix + '请选择服务评价'
764
+ },
765
+ getAllDefect() {
766
+ let checkResults = {
767
+ result: '正常',
768
+ data: []
769
+ }
770
+ let value = ''
771
+ let codata = JSON.parse(JSON.stringify(this.data))
772
+ //tag)
773
+ //tag)
774
+ codata.f_devices = []
775
+ this.f_devices = []
776
+ for (let device in codata) {
777
+ let f_device_type
778
+ if (device.startsWith("device")) {
779
+ //tag)
780
+ let hasOther = ''
781
+ let otherValue = null
782
+ for (let item in codata[device]) {
783
+ if(typeof codata[device][item]=='function'){
784
+ continue
785
+ }
786
+ codata[device][item].f_create_time = Util.toStandardTimeString()
787
+ if (codata[device].length > 1) {
788
+ let j = Number.parseInt(item) + 1
789
+ f_device_type = `${codata[device][item].f_device_type}${j}`
790
+ } else {
791
+ f_device_type = codata[device][item].f_device_type
792
+ }
793
+ //tag
794
+ //tag
795
+ //tag)
796
+ //tag)
797
+ if(item == 'sum' || item == 'removeEmpty'){
798
+ continue
799
+ }
800
+ for (let i = 0; i < codata[device][item].f_items.length ; i++) {
801
+ //tag
802
+ if(i == 'sum' || i == 'removeEmpty'){
803
+ continue
804
+ }
805
+ //tag)
806
+ var items = codata[device][item].f_items[i]
807
+ items.f_create_time = Util.toStandardTimeString()
808
+ //tag)
809
+ items.f_item_lists = []
810
+ //tag)
811
+ // //tag)
812
+ // //tag} name => ${JSON.stringify(items.f_item_name)} value => ${JSON.stringify(items.f_item_value)}`)
813
+ // console.log(`f_is_defect => ${this.config[codata[device][item]
814
+ // .f_device_type]
815
+ // .items[items.f_item_name]
816
+ // .options
817
+ // .find((option)=>option.data === items.f_item_value)
818
+ // .map((option)=>option.f_is_defect)}`)
819
+ // if (items.f_is_defect && (items.f_is_defect == true || items.f_is_defect == 'true')) {
820
+ // //tag
821
+ // checkResults.result = '有隐患'
822
+ // //tag)
823
+ // //tag)
824
+ // // this.$set('checkResult.' + items.f_item_name, items.f_item_value)
825
+ // this.checkResult[items.f_item_name] = items.f_item_value
826
+ // //tag)
827
+ // // this.$set('checkResultsss.' + items.f_item_name, `${f_device_type}${items.f_item_value}`)
828
+ // // //tag)
829
+ // }
830
+ if (items.type == 'selector') {
831
+ items.selected = []
832
+ } else if (items.type == 'inputSelector') {
833
+ items.selected = ''
834
+ }
835
+ //遍历配置项 将所选隐患项的配置信息放入保存的数据中
836
+ let f_is_defect //是否是隐患
837
+ let f_defect_level //是否是隐患
838
+ let f_item_name = items.f_item_name
839
+ let f_item_value
840
+ let f_is_eliminate //隐患是否消除
841
+ let f_meternumber = ''
842
+ let f_user_defects = [] // 用户所有隐患
843
+ //tag
844
+ //tag
845
+ if (items.type == 'selector' || items.type == 'checkbox' || items.type == 'radio') {
846
+ for (let i in items.f_item_value) {
847
+ if(typeof items.f_item_value[i]=='function'){
848
+ continue
849
+ }
850
+ let configItems = this.config[codata[device][item].f_device_type].items[f_item_name]
851
+ //tag)
852
+ for (let k in configItems.options) {
853
+ if(typeof configItems.options[k]=='function'){
854
+ continue
855
+ }
856
+ //tag)
857
+ if (items.f_item_value[i] === configItems.options[k].data) {
858
+
859
+ f_is_defect = configItems.options[k].isdefect
860
+ f_item_value = items.f_item_value[i]
861
+ f_defect_level = configItems.options[k].level
862
+
863
+ //tag
864
+ //tag
865
+ //tag
866
+
867
+ if (f_is_defect) {
868
+ if (checkResults.result !== '有隐患') {
869
+ checkResults.result = '有隐患'
870
+ }
871
+ console.log('items'+items)
872
+ if(items.f_deal_dispose=='报修'){
873
+ console.log("检测到需要转维修++++++++++++")
874
+ this.repairDefect.result='未处理'
875
+ this.repairDefect.data.push(`${f_item_name} : ${f_item_value}`)
876
+ }
877
+ if (!this.checkResult.hasOwnProperty(f_device_type+'-'+f_item_name)) {
878
+ //tag
879
+ this.checkResult[f_device_type+'-'+f_item_name] = []
880
+ }
881
+
882
+ //tag
883
+ this.checkResult[f_device_type+'-'+f_item_name].push(f_item_value)
884
+
885
+ }
886
+
887
+ let items_list = {
888
+ f_is_defect: f_is_defect,
889
+ f_item_value: f_item_value,
890
+ f_defect_level: f_defect_level,
891
+ f_is_eliminate: null,
892
+ f_create_time: Util.toStandardTimeString()
893
+ }
894
+ if (!items.f_item_lists) {
895
+ //tag
896
+ items.f_item_lists = []
897
+ //tag)
898
+ if (JSON.stringify(items_list) !== '{}') {
899
+ //tag
900
+ items.f_item_lists.push(items_list)
901
+ }
902
+ } else {
903
+ //tag)
904
+ if (JSON.stringify(items_list) !== '{}') {
905
+ //tag
906
+ items.f_item_lists.push(items_list)
907
+ }
908
+ }
909
+ }
910
+ }
911
+ }
912
+ } else {
913
+ let configItems = this.config[codata[device][item].f_device_type].items[items.f_item_name]
914
+ f_is_defect = items.f_is_defect
915
+ f_defect_level = items.level
916
+ f_item_value = items.f_item_value
917
+ let items_list = {
918
+ f_is_defect: f_is_defect,
919
+ f_item_value: f_item_value,
920
+ f_defect_level: f_defect_level,
921
+ f_create_time: Util.toStandardTimeString()
922
+ }
923
+ if (f_is_defect && f_item_value) {
924
+ items.f_is_defect = true
925
+ if (checkResults.result !== '有隐患') {
926
+ checkResults.result = '有隐患'
927
+ }
928
+ if (!this.checkResult.hasOwnProperty(items.f_item_name)) {
929
+ //tag
930
+ this.checkResult[items.f_item_name] = []
931
+ }
932
+
933
+ //tag
934
+ this.checkResult[items.f_item_name].push(f_item_value)
935
+
936
+ }
937
+ //tag)
938
+ //tag)
939
+ if (!items.f_item_lists) {
940
+ //tag
941
+ items.f_item_lists = []
942
+ if (JSON.stringify(items_list) != '{}') {
943
+ //tag
944
+ items.f_item_lists.push(items_list)
945
+ }
946
+ } else {
947
+ // items.f_item_lists[0].f_item_value = f_item_value
948
+ if (JSON.stringify(items_list) != '{}') {
949
+ //tag
950
+ //tag)
951
+ //tag)
952
+ //tag
953
+ items.f_item_lists.push(items_list)
954
+ }
955
+ }
956
+ }
957
+ if (hasOther !== '' && otherValue !== null) {
958
+ //tag
959
+ this.checkResult[hasOther].push(otherValue)
960
+ hasOther = ''
961
+ otherValue = null
962
+ }
963
+ items.f_item_value = ''
964
+ }
965
+ //tag)
966
+ this.f_devices.push(codata[device][item])
967
+ }
968
+ }
969
+ }
970
+ if (this.checkResult) {
971
+ for (let key in this.checkResult) {
972
+ if(typeof this.checkResult[key]=='function'){
973
+ continue
974
+ }
975
+ // 上次安检结果数据组织
976
+ //tag
977
+ //tag
978
+ let temp = {}
979
+ temp[key] = this.checkResult[key].join(',')
980
+ checkResults.data.push(temp)
981
+ // this.newcheckResult[key] = this.checkResult[key]
982
+ // checkResults.data.push(this.newcheckResult)
983
+ //tag)
984
+ // this.newcheckResult = {}
985
+ }
986
+ this.checkResult = {}
987
+ }
988
+ if (checkResults.data.length > 0) {
989
+ let msg = ''
990
+ for (let a = 0; a < checkResults.data.length; a++) {
991
+ for (let datumKey in checkResults.data[a]) {
992
+ msg += datumKey + ':' + checkResults.data[a][datumKey] + ';'
993
+ }
994
+ }
995
+ this.data.f_defect_text = msg
996
+ codata.f_defect_text = msg
997
+ }
998
+ codata.f_defect_content = JSON.stringify(checkResults)
999
+ this.data.f_defect_content = JSON.stringify(checkResults)
1000
+ //tag
1001
+ return codata
1002
+ },
1003
+ uploadCheckPaper(){
1004
+ this.saveNoclick()
1005
+ this.closely(false) // 保存本地,不删除录音文件停止录音
1006
+ let errString = this.errorVerify()
1007
+ if (errString) {
1008
+ if (Vue.android){
1009
+ this.$showMessage(errString)
1010
+ }
1011
+ return
1012
+ } else {
1013
+ this.$set('data.f_offsite_time', Util.toStandardTimeString())
1014
+ this.$set('data.f_upload_time', Util.toStandardTimeString())
1015
+ this.$set('data.f_upload_date', Util.toStandardTimeString())
1016
+ //tag
1017
+ this.data.f_complete = '已完成'
1018
+ this.disableTimer()
1019
+ }
1020
+ //tag
1021
+ this.onlySave = false
1022
+ this.assemblyCodata()
1023
+ if (this.repairDefect.result != '正常') {
1024
+ return this.$showMessage('有隐患的处理方式为转维修,请点击转维修')
1025
+ }
1026
+ let res = this.save()
1027
+ // if(res) {
1028
+ // try {
1029
+ // let codata = this.getAllDefect()
1030
+ // //获取微信推送内容
1031
+ // let WxResult = this.getWeixin(codata)
1032
+ // let haslivedispose = this.$androidUtil.bzLogic('getLiveDispose', {
1033
+ // f_check_item_id: this.data.f_check_item_id
1034
+ // })
1035
+ // //如果是转维修上传,则不做校验,上传完成后自动转维修
1036
+ // //tag
1037
+ // //tag
1038
+ // if(!this.isToRepair){
1039
+ // if(haslivedispose.data.length > 0 && (this.livedispose == 'true' || this.livedispose == true)){
1040
+ // //tag
1041
+ // //tag
1042
+ // if(!this.isSafeCheckToRepair){
1043
+ // this.$showMessage('有未处理的隐患,请前往拍照上传中将安检转为维修单!')
1044
+ // return
1045
+ // }
1046
+ // }
1047
+ // }
1048
+ // //tag
1049
+ // for (let key in codata){
1050
+ // if(key.startsWith("device")){
1051
+ // codata[key] = []
1052
+ // }
1053
+ // }
1054
+ // //tag}`)
1055
+ //
1056
+ // //tag
1057
+ // let isStart = true
1058
+ // let res
1059
+ // for (let i in this.f_devices){
1060
+ // res = HostApp.organizeJSON({isStart:isStart,isDevice:true,device:this.f_devices[i]})
1061
+ // if(res.code == 200){
1062
+ // isStart = false
1063
+ // }else{
1064
+ // this.$showMessage("保存失败!")
1065
+ // }
1066
+ // }
1067
+ // let result = HostApp.organizeJSON({
1068
+ // isStart:false,
1069
+ // isJSON:true,
1070
+ // jsonstr:{
1071
+ // f_check_item_id: this.data.f_check_item_id,
1072
+ // f_checker_id: this.data.f_checker_id,
1073
+ // row: codata
1074
+ // }
1075
+ // })
1076
+ // if(result.code == 200){
1077
+ // HostApp.__this__ = this
1078
+ // this.runSyncLogic('上传安检信息','javascript:HostApp.__this__.uploadCallBack()',1)
1079
+ // }
1080
+ //
1081
+ //
1082
+ // // let response = this.$androidUtil.bzLogic('上传安检信息', {
1083
+ // // f_check_item_id: this.data.f_check_item_id,
1084
+ // // f_checker_id: this.data.f_checker_id,
1085
+ // // row: codata
1086
+ // // })
1087
+ // // if (response.code == 200) {
1088
+ // // //tag
1089
+ // // //tag)
1090
+ // // let f_paper_id
1091
+ // // if(response.data != '' && response.data != null){
1092
+ // // f_paper_id = JSON.parse(response.data).id
1093
+ // // }
1094
+ // // this.$set('data.f_paper_id', f_paper_id)
1095
+ // // //tag
1096
+ // // //tag)
1097
+ // // //tag
1098
+ // // //tag)
1099
+ // // for (let device in this.data){
1100
+ // // //tag
1101
+ // // //tag)
1102
+ // // if(device.startsWith("device")){
1103
+ // // for(let devices of this.data[device]) {
1104
+ // // devices.f_paper_id = f_paper_id
1105
+ // // let ret = this.$androidUtil.bzLogic('UpCheckPaperDevices', {
1106
+ // // row: devices
1107
+ // // })
1108
+ // // //tag}`)
1109
+ // // if(ret.code == 200){
1110
+ // // //tag
1111
+ // // devices.f_device_id = JSON.parse(ret.data.f_device_id).id
1112
+ // // }
1113
+ // // //tag
1114
+ // // //tag)
1115
+ // // if (ret.code != 200) {
1116
+ // // //TODO 失败后处理
1117
+ // // // this.isUpload = false
1118
+ // // this.$showMessage("上传失败!")
1119
+ // // return false
1120
+ // // }
1121
+ // // }
1122
+ // // }
1123
+ // // }
1124
+ // // // for (let device of this.f_devices) {
1125
+ // // // device.f_paper_id = f_paper_id
1126
+ // // // //tag
1127
+ // // // //tag)
1128
+ // // // let ret = this.$androidUtil.bzLogic('UpCheckPaperDevices', {
1129
+ // // // row: device
1130
+ // // // })
1131
+ // // // //tag
1132
+ // // // if (ret.code != 200) {
1133
+ // // // //TODO 失败后处理
1134
+ // // // HostApp.alert("上传失败!")
1135
+ // // // return false
1136
+ // // // }
1137
+ // // // }
1138
+ // // let result = this.$androidUtil.bzLogic('FinishUpload',
1139
+ // // {
1140
+ // // f_check_item_id: this.data.f_check_item_id,
1141
+ // // f_userinfo_id: codata.f_userinfoid,
1142
+ // // f_last_check_result: codata.f_defect_content
1143
+ // // })
1144
+ // // if(result.code == 200){
1145
+ // // // this.$showAlert('上传成功!', 'success', 2000)
1146
+ // // this.$showMessage('上传成功!')
1147
+ // // this.isStrat=false
1148
+ // // if(url != "" ){
1149
+ // // this.$resetpost(`${url}`,{data:WxResult})
1150
+ // // }
1151
+ // // return true
1152
+ // // }else{
1153
+ // // // this.isUpload = false
1154
+ // // this.$showMessage("上传失败!")
1155
+ // // return false
1156
+ // // }
1157
+ // // }else{
1158
+ // // // this.isUpload = false
1159
+ // // this.$showMessage("上传失败!")
1160
+ // // return false
1161
+ // // }
1162
+ // }catch (e) {
1163
+ // //tag)
1164
+ // // this.isUpload = false
1165
+ // this.$showMessage("上传失败!")
1166
+ // }
1167
+ // }
1168
+ },
1169
+ //将数据组装提出
1170
+ assemblyCodata(){
1171
+ let codata = this.getAllDefect()
1172
+ console.log(`codata类型 开始组装codeta数据-->${typeof codata}`)
1173
+ console.log(`codata内容-->${JSON.stringify(codata)}`)
1174
+ for (let key in codata) {
1175
+ if (key.startsWith("device")) {
1176
+ console.log('this.data.' + key + JSON.stringify(codata[key]))
1177
+ codata[key] = []
1178
+ }
1179
+ }
1180
+ codata.f_devices = this.f_devices
1181
+ this.rowCodata=codata
1182
+ },
1183
+ save(type) {
1184
+ if (type == 'temp' || type == 'finish') {
1185
+ this.assemblyCodata()
1186
+ }
1187
+ //禁用事件
1188
+ this.saveNoclick()
1189
+ //tag
1190
+ //tag
1191
+ if(type == 'temp'){
1192
+ this.data.f_complete = '未完成'
1193
+ this.rowCodata.f_complete = '未完成'
1194
+ // 关闭录音方法
1195
+ this.closely(true) //临时保存,删除录音文件并暂停录音
1196
+ this.disableTimer()
1197
+ }else {
1198
+ // 关闭录音方法
1199
+ this.closely(false) // 保存本地,不删除录音文件暂停录音
1200
+ let errString = this.errorVerify()
1201
+ if (errString) {
1202
+ //tag
1203
+ //tag
1204
+ //tag
1205
+ if (Vue.android){
1206
+ this.$showMessage(errString)
1207
+ }
1208
+ return
1209
+ } else {
1210
+ this.data.f_complete = '已完成'
1211
+ this.rowCodata.f_complete = '已完成'
1212
+ this.$set('data.f_offsite_time', Util.toStandardTimeString())
1213
+ this.$set('rowCodata.f_offsite_time', Util.toStandardTimeString())
1214
+ this.disableTimer()
1215
+ }
1216
+ }
1217
+ //tag
1218
+ if(this.data.f_blacklist!='是'){
1219
+ delete this.data.f_blocking_cause
1220
+ }
1221
+ if (this.data.f_entry_status == '入户') {
1222
+ this.data.f_rejectchecks_path = []
1223
+ this.data.f_rejectcheck_path = null
1224
+ this.data.f_rejectcheck1_path = null
1225
+ this.data.f_rejectcheck2_path = null
1226
+ this.data.f_noanswers_path=[]
1227
+ this.data.f_noanswer_path = null
1228
+ this.data.f_noanswer1_path = null
1229
+ this.data.f_noanswer2_path = null
1230
+ }else if (this.data.f_entry_status == '到访不遇') {
1231
+ this.data.f_rejectchecks_path = []
1232
+ this.data.f_rejectcheck_path = null
1233
+ this.data.f_rejectcheck1_path = null
1234
+ this.data.f_rejectcheck2_path = null
1235
+ }else if (this.data.f_entry_status == '拒检') {
1236
+ this.data.f_noanswers_path=[]
1237
+ this.data.f_noanswer_path = null
1238
+ this.data.f_noanswer1_path = null
1239
+ this.data.f_noanswer2_path = null
1240
+ }
1241
+ // try {
1242
+ let codata = this.rowCodata
1243
+ //tag
1244
+ //tag}`)
1245
+ for (let key in codata) {
1246
+ if (key.startsWith("device")) {
1247
+ //tag)
1248
+ codata[key] = []
1249
+ }
1250
+ }
1251
+ codata.f_complete = this.data.f_complete
1252
+ //tag}`)
1253
+ //tag}`)
1254
+ //tag
1255
+ if (Vue.android) {
1256
+ //tag
1257
+ let value = this.$androidUtil.path({
1258
+ alias: 'getUserinfomation',
1259
+ data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')"}
1260
+ })
1261
+ //tag)
1262
+ if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && this.item.f_no_checkplan != '打回') {
1263
+ // let result = this.$androidUtil.bzLogic('SafeSaveNoPaper', {
1264
+ // f_check_item_id: this.data.f_check_item_id,
1265
+ // f_checker_id: this.data.f_checker_id,
1266
+ // f_upload_state:'未传',
1267
+ // row: codata
1268
+ // })
1269
+ //tag
1270
+ let isStart = true
1271
+ // let res
1272
+ // for (let i in this.f_devices) {
1273
+ // res = HostApp.organizeJSON({isStart: isStart, isDevice: true, device: this.f_devices[i]})
1274
+ // if (res.code == 200) {
1275
+ // isStart = false
1276
+ // } else {
1277
+ // this.$showMessage("保存失败!")
1278
+ // }
1279
+ // }
1280
+ // let result = HostApp.organizeJSON({
1281
+ // isStart: false,
1282
+ // isJSON: true,
1283
+ // jsonstr: {
1284
+ // f_check_item_id: this.data.f_check_item_id,
1285
+ // f_checker_id: this.data.f_checker_id,
1286
+ // f_upload_state: '未传',
1287
+ // row: codata
1288
+ // }
1289
+ // })
1290
+ codata.f_devices = this.f_devices
1291
+ if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1292
+ this.rowCodata = Object.assign({},this.rowCodata,codata)
1293
+ } else {
1294
+ this.rowCodata = codata
1295
+ }
1296
+ let param = {
1297
+ f_check_item_id: this.data.f_check_item_id,
1298
+ f_checker_id: this.data.f_checker_id,
1299
+ f_upload_state: '未传',
1300
+ // row: codata
1301
+ row: this.rowCodata
1302
+ }
1303
+ //tag)
1304
+ let paramStr = JSON.stringify(param)
1305
+ // 多长截断一次
1306
+ let subLength = 800
1307
+ for (let i = 0; i < paramStr.length; i += subLength) {
1308
+ HostApp.param_cache(paramStr.slice(i, i + subLength))
1309
+ }
1310
+ HostApp.__this__ = this
1311
+ HostApp.syncLogic({
1312
+ // logic别名,key必须为logic
1313
+ 'logic': 'SafeSaveNoPaper',
1314
+ // 回调执行方法名,key必须为callback
1315
+ 'callback': 'javascript:HostApp.__this__.saveCallBack()',
1316
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1317
+ // 执行回调方法传入key为backresult
1318
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1319
+ 'backresult': 1
1320
+ })
1321
+ } else {
1322
+ // console.log("dddddddd")
1323
+ //tag
1324
+ let isStart = true
1325
+ let res
1326
+ //tag)
1327
+ // for (let i in this.f_devices) {
1328
+ // //tag)
1329
+ // for (let j = 0; j < this.f_devices[i].f_items.length; j++) {
1330
+ // //tag)
1331
+ // }
1332
+ // res = HostApp.organizeJSON({isStart: isStart, isDevice: true, device: this.f_devices[i]})
1333
+ // //tag)
1334
+ // if (res.code == 200) {
1335
+ // isStart = false
1336
+ // } else {
1337
+ // this.$showMessage("保存失败!")
1338
+ // }
1339
+ // }
1340
+ //tag)
1341
+ //tag)
1342
+ //tag)
1343
+ // let result = HostApp.organizeJSON({
1344
+ // isStart: false,
1345
+ // isJSON: true,
1346
+ // jsonstr: {
1347
+ // f_check_item_id: this.data.f_check_item_id,
1348
+ // f_checker_id: this.data.f_checker_id,
1349
+ // row: codata
1350
+ // }
1351
+ // })
1352
+ codata.f_devices = this.f_devices
1353
+ if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1354
+ this.rowCodata = Object.assign({},this.rowCodata,codata)
1355
+ } else {
1356
+ this.rowCodata = codata
1357
+ }
1358
+ let param = {
1359
+ f_check_item_id: this.data.f_check_item_id,
1360
+ f_checker_id: this.data.f_checker_id,
1361
+ // row: codata
1362
+ row: this.rowCodata
1363
+ }
1364
+ //tag)
1365
+ // console.log("ni"+JSON.stringify(param))
1366
+ let paramStr = JSON.stringify(param)
1367
+ // 多长截断一次
1368
+ let subLength = 800
1369
+ for (let i = 0; i < paramStr.length; i += subLength) {
1370
+ HostApp.param_cache(paramStr.slice(i, i + subLength))
1371
+ }
1372
+ HostApp.__this__ = this
1373
+ HostApp.syncLogic({
1374
+ // logic别名,key必须为logic
1375
+ 'logic': '保存安检单信息',
1376
+ // 回调执行方法名,key必须为callback
1377
+ 'callback': 'javascript:HostApp.__this__.saveCallBack()',
1378
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1379
+ // 执行回调方法传入key为backresult
1380
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1381
+ 'backresult': 1
1382
+ })
1383
+ }
1384
+
1385
+ } else {
1386
+ //tag
1387
+ let value = this.$androidUtil.path({
1388
+ alias: 'getUserinfomation',
1389
+ data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')"}
1390
+ })
1391
+ if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1392
+ this.rowCodata = Object.assign({},this.rowCodata,codata)
1393
+ } else {
1394
+ this.rowCodata = codata
1395
+ }
1396
+ if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && value.data.length == 0 && this.item.f_no_checkplan != '打回') {
1397
+ this.$androidUtil.bzLogic('SafeSaveNoPaper', {
1398
+ f_check_item_id: this.data.f_check_item_id,
1399
+ f_checker_id: this.data.f_checker_id,
1400
+ f_upload_state: '未传',
1401
+ // row: codata
1402
+ row: this.rowCodata
1403
+ }).then((res) => {
1404
+ if (res.data.code == 200) {
1405
+ //保存devices
1406
+ this.$androidUtil.bzLogic('getPaperInfo', {
1407
+ f_check_item_id: this.data.f_check_item_id
1408
+ }).then((res) => {
1409
+ //tag
1410
+ if (res.data.code == 200) {
1411
+
1412
+ let f_paper_id = res.data.data[0].id
1413
+ for (let device of this.f_devices) {
1414
+ device.f_paper_id = f_paper_id
1415
+ //tag
1416
+ this.$androidUtil.bzLogic('saveDevice', {
1417
+ row: device
1418
+ }).then((ret) => {
1419
+ //tag
1420
+ if (ret.code != 200) {
1421
+ // if(this.isUpload){
1422
+ // this.isUpload = false
1423
+ // }
1424
+ //TODO 失败后处理
1425
+ this.$showMessage("保存失败!")
1426
+ return false
1427
+ }
1428
+ })
1429
+ }
1430
+ }
1431
+ })
1432
+ // this.$showAlert('保存成功!', 'success', 2000)
1433
+ this.$showMessage('保存成功!')
1434
+ return true
1435
+ } else {
1436
+ // if(this.isUpload){
1437
+ // this.isUpload = false
1438
+ // }
1439
+ this.$showMessage("保存失败!")
1440
+ return false
1441
+ }
1442
+ })
1443
+ }
1444
+ else {
1445
+ this.$androidUtil.bzLogic('保存安检单信息', {
1446
+ f_check_item_id: this.data.f_check_item_id,
1447
+ f_checker_id: this.data.f_checker_id,
1448
+ row: this.rowCodata
1449
+ }).then((res) => {
1450
+ //tag
1451
+ if (res.data.code == 200) {
1452
+ //保存devices
1453
+ this.$androidUtil.bzLogic('getPaperInfo', {
1454
+ f_check_item_id: this.data.f_check_item_id
1455
+ }).then((res) => {
1456
+ //tag
1457
+ if (res.data.code == 200) {
1458
+
1459
+ let f_paper_id = res.data.data[0].id
1460
+ for (let device of this.f_devices) {
1461
+ device.f_paper_id = f_paper_id
1462
+ //tag
1463
+ this.$androidUtil.bzLogic('saveDevice', {
1464
+ row: device
1465
+ }).then((ret) => {
1466
+ //tag
1467
+ if (ret.code != 200) {
1468
+ // if(this.isUpload){
1469
+ // this.isUpload = false
1470
+ // }
1471
+ //TODO 失败后处理
1472
+ this.$showMessage("保存失败!")
1473
+ return false
1474
+ }
1475
+ })
1476
+ }
1477
+ }
1478
+ })
1479
+ // this.$showAlert('保存成功!', 'success', 2000)
1480
+ this.$showMessage('保存成功!')
1481
+ return true
1482
+ } else {
1483
+ // if(this.isUpload){
1484
+ // this.isUpload = false
1485
+ // }
1486
+ this.$showMessage("保存失败!")
1487
+ return false
1488
+ }
1489
+ })
1490
+ }
1491
+ }
1492
+ // }catch (e) {
1493
+ // //tag)
1494
+ // // this.isUpload = false
1495
+ // this.$showMessage("保存失败!")
1496
+ // }
1497
+ },
1498
+ runSyncLogic(logic,callback,backresult){
1499
+ HostApp.runSyncLogic({
1500
+ // logic别名,key必须为logic
1501
+ 'logic': logic,
1502
+ // 回调执行方法名,key必须为callback
1503
+ 'callback': callback,
1504
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1505
+ // 执行回调方法传入key为backresult
1506
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1507
+ 'backresult':backresult
1508
+ })
1509
+ },
1510
+ logicWithHint(logic,data,callback,backresult){
1511
+ HostApp.logicWithHint({
1512
+ // logic别名,key必须为logic
1513
+ 'logic': logic,
1514
+ // 回调执行方法名,key必须为callback
1515
+ 'callback': callback,
1516
+ // logic执行需要的业务参数
1517
+ 'data': data,
1518
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1519
+ // 执行回调方法传入key为backresult
1520
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1521
+ 'backresult':backresult
1522
+ })
1523
+ },
1524
+ saveCallBack(jo){
1525
+ //tag)
1526
+ // console.log("jjjj"+JSON.stringify(jo))
1527
+ if(jo.state == 'ok'){
1528
+ let res = JSON.parse(jo.result)
1529
+ //tag)
1530
+ if(res.code == 200){
1531
+ //tag
1532
+ if(!this.onlySave){
1533
+ let codata = this.getAllDefect()
1534
+ //获取微信推送内容
1535
+ // let WxResult = this.getWeixin(codata)
1536
+ let haslivedispose = this.$androidUtil.bzLogic('getLiveDispose', {
1537
+ f_check_item_id: this.data.f_check_item_id
1538
+ })
1539
+ //如果是转维修上传,则不做校验,上传完成后自动转维修
1540
+ //tag
1541
+ //tag
1542
+ if(!this.isToRepair){
1543
+ if(haslivedispose.data.length > 0 && (this.livedispose == 'true' || this.livedispose == true)){
1544
+ //tag
1545
+ //tag
1546
+ if(!this.isSafeCheckToRepair){
1547
+
1548
+ }
1549
+ }
1550
+ }
1551
+ //tag
1552
+ for (let key in codata){
1553
+ if(key.startsWith("device")){
1554
+ codata[key] = []
1555
+ }
1556
+ }
1557
+ //tag}`)
1558
+
1559
+ //tag
1560
+ // let isStart = true
1561
+ // let res
1562
+ // for (let i in this.f_devices){
1563
+ // res = HostApp.organizeJSON({isStart:isStart,isDevice:true,device:this.f_devices[i]})
1564
+ // if(res.code == 200){
1565
+ // isStart = false
1566
+ // }else{
1567
+ // this.$showMessage("上传失败!")
1568
+ // return
1569
+ // }
1570
+ // }
1571
+ // let result = HostApp.organizeJSON({
1572
+ // isStart:false,
1573
+ // isJSON:true,
1574
+ // jsonstr:{
1575
+ // f_check_item_id: this.data.f_check_item_id,
1576
+ // f_checker_id: this.data.f_checker_id,
1577
+ // row: codata
1578
+ // }
1579
+ // })
1580
+ codata.f_devices = this.f_devices
1581
+ if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1582
+ this.rowCodata = Object.assign({},this.rowCodata,codata)
1583
+ } else {
1584
+ this.rowCodata = codata
1585
+ }
1586
+ let param = {
1587
+ f_check_item_id: this.data.f_check_item_id,
1588
+ f_checker_id: this.data.f_checker_id,
1589
+ // row: codata
1590
+ row: this.rowCodata
1591
+ }
1592
+ //tag)
1593
+ let paramStr = JSON.stringify(param)
1594
+ // 多长截断一次
1595
+ let subLength = 800
1596
+ for (let i = 0; i < paramStr.length; i += subLength) {
1597
+ HostApp.param_cache(paramStr.slice(i, i + subLength))
1598
+ }
1599
+ HostApp.__this__ = this
1600
+ HostApp.syncLogic({
1601
+ // logic别名,key必须为logic
1602
+ 'logic': '上传安检信息',
1603
+ // 回调执行方法名,key必须为callback
1604
+ 'callback': 'javascript:HostApp.__this__.uploadCallBack()',
1605
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1606
+ // 执行回调方法传入key为backresult
1607
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1608
+ 'backresult': 1
1609
+ })
1610
+ }else{
1611
+ this.$showMessage('保存成功!')
1612
+ if(this.clickBack){
1613
+ this.isStrat = false
1614
+ this.$dispatch('confirm')
1615
+ //this.$back()
1616
+ }
1617
+ }
1618
+ }else{
1619
+ this.$showMessage('保存失败!')
1620
+ return
1621
+ }
1622
+ }else{
1623
+ this.$showMessage('服务器内部错误,保存失败!')
1624
+ return
1625
+ }
1626
+ },
1627
+ uploadCallBack(jo){
1628
+ //获取微信推送路径
1629
+ let url = ""
1630
+ if(Vue.config.safecheck != undefined) {
1631
+ if (Vue.config.safecheck.ApproveConfig != undefined) {
1632
+ if (Vue.config.safecheck.ApproveConfig.weixinurl != undefined) {
1633
+ url = Vue.config.safecheck.ApproveConfig.weixinurl
1634
+ }
1635
+ }
1636
+ }
1637
+ //tag)
1638
+ //tag)
1639
+ if(jo.state == 'ok'){
1640
+ let res = JSON.parse(jo.result)
1641
+ //tag)
1642
+ //tag)
1643
+ if(res.code == 200){
1644
+ this.$set('data.f_paper_id', res.id)
1645
+ this.isStrat=false
1646
+ if(url != ""){
1647
+ this.$resetpost(`${url}`,{data:WxResult})
1648
+ }
1649
+ // 预约安检回更预约安检单
1650
+ if(this.data.isupdateplanitem == 'true' && this.data.f_SafeToRepair_id){
1651
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/ReturnSafeService`, {data:{
1652
+ f_paper_id:this.data.f_paper_id,
1653
+ f_service_id:this.data.f_SafeToRepair_id
1654
+ }
1655
+ }).then((ret) => {
1656
+ if(ret.data && ret.data.code == 200){
1657
+ console.log('预约安检回更成功')
1658
+ }
1659
+ })
1660
+ }
1661
+ //tag
1662
+ if(this.isToRepair){
1663
+ for (let device in this.data){
1664
+ if(device.startsWith("device")){
1665
+ this.data[device] = []
1666
+ if(res.data.length > 0){
1667
+ for(let i in res.data[0].f_devices){
1668
+ if(this.data[device].length > 0){
1669
+ if(this.data[device][0].f_device_type == res.data[0].f_devices[i].f_device_type){
1670
+ this.data[device].push(res.data[0].f_devices[i])
1671
+ res.data[0].f_devices.splice(i,1)
1672
+ }
1673
+ }else{
1674
+ this.data[device].push(res.data[0].f_devices[i])
1675
+ res.data[0].f_devices.splice(i,1)
1676
+ }
1677
+ }
1678
+ }
1679
+ }
1680
+ }
1681
+ this.todo()
1682
+ }else{
1683
+ this.$showMessage('上传成功!')
1684
+ //tag
1685
+ this.$dispatch('confirm')
1686
+ // this.$back()
1687
+ }
1688
+ }else if(res.code == 309){
1689
+ this.$showMessage('该安检单已作废!')
1690
+ //tag
1691
+ this.$dispatch('confirm')
1692
+ }else if(res.code == 710){
1693
+ this.$showMessage('上传照片失败,请检查网络是否正常!'+res.msg)
1694
+ this.onlySave = true
1695
+ return
1696
+ }else if(res.code == 711){
1697
+ this.$showMessage('该安检单已被管理员调整,请联系管理员!')
1698
+ this.onlySave = true
1699
+ return
1700
+ }else if(res.code == 712){
1701
+ this.$showMessage('网络异常,请缓存后重新尝试上传,多次上传失败请联系管理员!')
1702
+ this.onlySave = true
1703
+ return
1704
+ }
1705
+ else{
1706
+ this.$showMessage('上传失败!')
1707
+ }
1708
+ }else {
1709
+ this.$showMessage('网络异常,上传失败!')
1710
+ }
1711
+ this.onlySave = true
1712
+ },
1713
+ safecheckToRepairCallBack(jo){
1714
+ //获取微信推送路径
1715
+ if(jo.state == 'ok'){
1716
+ let res = JSON.parse(jo.result)
1717
+ //tag)
1718
+ if(res.code == 200){
1719
+ //tag
1720
+ if(res.data.code == 200){
1721
+ this.$showMessage('上传并转维修成功!')
1722
+ }else{
1723
+ this.$showMessage('上传并转维修成功,回写安检单失败!')
1724
+ }
1725
+ this.$dispatch('confirm')
1726
+ // this.$back()
1727
+ }else{
1728
+ this.$showMessage('上传失败!')
1729
+ this.onlySave = true
1730
+ }
1731
+ }else{
1732
+ this.$showMessage('网络异常,上传失败!')
1733
+ this.onlySave = true
1734
+ }
1735
+ },
1736
+ todo(){
1737
+ let gen = getRepairParam(this)
1738
+ co(gen)
1739
+ },
1740
+ undo(){
1741
+ this.showCheckToRepair = !this.showCheckToRepair
1742
+ this.model.serviceacitivity[0].f_reciever = ''
1743
+ this.model.serviceacitivity[0].f_meetunit = ''
1744
+ this.model.f_repairtype = ''
1745
+ this.meading = '转站点'
1746
+ },
1747
+ disableTimer() {
1748
+ if(this.timer) {
1749
+ window.clearTimeout(this.timer)
1750
+ this.timer = null
1751
+ }
1752
+ },
1753
+ loaded(paper) {
1754
+ if(!paper.hasOwnProperty('id')) {
1755
+ this.$showMessage("该安检单在手机上已经不存在,可能是卸载过程序。可以进入重新安检,或返回安检计划。")
1756
+ this.init()
1757
+ } else {
1758
+ Util.booleanFilter(paper)
1759
+ HostApp.__this__.$set('data', paper)
1760
+ HostApp.__this__.$goto('safecheck-userinfo', {}, 'paper-router')
1761
+ // 如果打回重检则重新计时
1762
+ //tag
1763
+ if(HostApp.__this__.role == 'inspect'
1764
+ && HostApp.__this__.data.f_approved
1765
+ && HostApp.__this__.data.f_approved == '打回') {
1766
+ //tag
1767
+ HostApp.__this__.data.f_onsite_time = Util.toStandardTimeString()
1768
+ HostApp.__this__.tick()
1769
+ }
1770
+ }
1771
+ HostApp.__callback__ = null
1772
+ HostApp.__this__ = null
1773
+ },
1774
+ S4() {
1775
+ return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
1776
+ },
1777
+ extend(initalObj, finalObj) {
1778
+ var obj = finalObj || {};
1779
+ for (var i in initalObj) {
1780
+ var prop = initalObj[i];
1781
+
1782
+ // 避免相互引用对象导致死循环,如initalObj.a = initalObj的情况
1783
+ if (prop === obj) {
1784
+ continue;
1785
+ }
1786
+
1787
+ if (typeof prop === 'object') {
1788
+ if (obj[i]) {
1789
+ this.extend(obj[i], prop)
1790
+ } else {
1791
+ obj[i] = prop;
1792
+ }
1793
+ }
1794
+ }
1795
+ return obj;
1796
+ },
1797
+ // async isoverDate(){
1798
+ // let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/androidGetuserinfo`, {data:{
1799
+ // condition:"f_plan_item_id='"+this.item.id+"'"
1800
+ // }
1801
+ // })
1802
+ // this.isneedDate=res.data[0]["f_subscribe_date"]
1803
+ // },
1804
+ putDevices() {
1805
+ //tag)
1806
+ //tag)
1807
+ this.$set('data.approve', "true")
1808
+ this.$set('data.writeback', "false")
1809
+ if (Vue.config.safecheck != undefined) {
1810
+ if (Vue.config.safecheck.ApproveConfig != undefined) {
1811
+ if (Vue.config.safecheck.ApproveConfig.approve != undefined) {
1812
+ this.$set('data.approve', Vue.config.safecheck.ApproveConfig.approve)
1813
+ }
1814
+ if (Vue.config.safecheck.ApproveConfig.writeback != undefined) {
1815
+ this.$set('data.writeback', Vue.config.safecheck.ApproveConfig.writeback)
1816
+ }
1817
+ if (Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
1818
+ this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
1819
+ }
1820
+ if (Vue.config.safecheck.ApproveConfig.showtorepair) {
1821
+ this.show_torepair = Vue.config.safecheck.ApproveConfig.showtorepair
1822
+ }
1823
+ if (Vue.config.safecheck.ApproveConfig.notencountered != undefined){
1824
+ this.notencountered = Vue.config.safecheck.ApproveConfig.notencountered
1825
+ }
1826
+ if (Vue.config.safecheck.ApproveConfig.refuseinspection != undefined){
1827
+ this.refuseinspection = Vue.config.safecheck.ApproveConfig.refuseinspection
1828
+ }
1829
+ }
1830
+ //tag
1831
+ //tag)
1832
+ //tag)
1833
+ //tag
1834
+ if(this.item.f_user_type == '非民用'){
1835
+ // 非民用
1836
+ if (Vue.config.safecheck.DevicesSetConfig != undefined){
1837
+ if(this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
1838
+ this.config = this.extend(this.config, Vue.config.safecheck.DevicesSetConfig)
1839
+ }else{
1840
+ //tag
1841
+ //tag
1842
+ //tag
1843
+ this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type]])
1844
+ }
1845
+ //this.config = this.extend(this.config, Vue.config.safecheck.DevicesSetConfig)
1846
+ }
1847
+
1848
+ }else{
1849
+ // 民用户
1850
+ if (Vue.config.safecheck.DevicesConfig != undefined){
1851
+ if(this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
1852
+ this.config = this.extend(this.config, Vue.config.safecheck.DevicesConfig)
1853
+ }else{
1854
+ //tag
1855
+ //tag
1856
+ //tag
1857
+ 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:'民用']])
1858
+ }
1859
+ // this.config = this.extend(this.config, Vue.config.safecheck.DevicesConfig)
1860
+ }
1861
+ }
1862
+
1863
+ }
1864
+ //tag)
1865
+ // 预留设备项位置
1866
+ for (let i in this.config) {
1867
+ this.tabs.splice(1,0,null)
1868
+ }
1869
+ //遍历安检项配置
1870
+ for (let i in this.config) {
1871
+ //取得安检项索引值
1872
+ let n = this.config[i].index
1873
+ //tag
1874
+ this.devices[n - 1] = {device: i, n: n, checkmust: this.config[i].checkmust}
1875
+ this.$set('data.' + 'device' + n, [])
1876
+ //tag
1877
+ // this.tabs.splice(2 + n - 1, 0,
1878
+ // {
1879
+ // header:i,
1880
+ // complete:'safecheck-devices',
1881
+ // class:'repair-details-class',
1882
+ // number:n
1883
+ // })
1884
+ this.tabs[n] = {
1885
+ header: i,
1886
+ complete: 'safecheck-devices',
1887
+ class: 'repair-details-class',
1888
+ number: n
1889
+ }
1890
+
1891
+ if(this.config[i].quantity && this.config[i].quantity >0){
1892
+ let items = []
1893
+ for (let it in this.config[i].items) {
1894
+ //赋值下拉选项
1895
+ if (this.config[i].items[it].type == 'selector') {
1896
+ for (let op in this.config[i].items[it].options) {
1897
+ if (this.config[i].items[it].options[op].isdefault == true) {
1898
+ items.push({
1899
+ f_defect_level: this.config[i].items[it].options[op].level,
1900
+ f_is_defect: this.config[i].items[it].options[op].isdefect,
1901
+ f_item_name: it,
1902
+ f_item_value: this.config[i].items[it].options[op].data,
1903
+ f_path: "",
1904
+ type: "selector"
1905
+ })
1906
+ }
1907
+ }
1908
+ }
1909
+ }
1910
+ for(let q =0;q<this.config[i].quantity;q++) {
1911
+ this.data['device' + n].push(
1912
+ {f_device_type: i, f_items:items}
1913
+ )
1914
+ }
1915
+ }
1916
+ // this.data['device' + n].push(
1917
+ // {f_device_type: i, f_items: items}
1918
+ // )
1919
+ n = n + 1
1920
+ }
1921
+ //tag
1922
+ this.faultshow.number = this.tabs.length
1923
+ },
1924
+ init () {
1925
+ //tag
1926
+ // this.data.f_noplan_item_id = this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()+""+this.S4()
1927
+ // 无计划安检是否回更待办计划
1928
+ this.data.isupdateplanitem = this.$appdata.getSingleValue('在线安检回更有计划') ? this.$appdata.getSingleValue('在线安检回更有计划') : 'false'
1929
+ // 预约安检单工单编号
1930
+ this.data.f_SafeToRepair_id = this.item.f_service_id
1931
+ this.data.ename = Vue.user.ename
1932
+ this.data.f_outlets = Vue.user.f_parentname
1933
+ this.data.f_meetunit = Vue.user.orgpathnames
1934
+ this.data.orgpathstr = Vue.user.orgpathstr
1935
+ this.data.f_check_item_id = this.item.id
1936
+ this.data.f_check_plan_id = this.f_plan_id
1937
+ this.data.f_checker_id = Vue.user.id
1938
+ this.data.f_checker_name = Vue.user.name
1939
+ this.data.f_check_type = this.item.f_user_type
1940
+ this.data.f_safecheck_type = this.item.f_safecheck_type
1941
+ //this.data.f_exceed_reason = ''//存放送气超期原因
1942
+ //tag
1943
+ this.data.f_subcompany = this.item.f_subcompany
1944
+ this.data.f_approved = this.item.f_approvedf_read_instructions
1945
+ this.data.f_repair_approved = this.item.f_repair_approved
1946
+ this.data.f_no_checkplan = this.item.f_no_checkplan
1947
+ this.data.f_approved = this.item.f_approved
1948
+ this.data.f_filialeid = this.item.f_filialeid || Vue.user.orgid
1949
+ this.data.f_orgstr = this.item.f_orgstr
1950
+ this.data.version = this.item.version
1951
+ this.data.f_check_version=this.item.f_check_version
1952
+ this.$set('data.f_meters', this.item.f_plan_meters)
1953
+ this.$set('data.f_userinfo_code', this.item.f_userinfo_code)
1954
+ // 安检状态
1955
+ this.$set('data.f_entry_status', '入户')
1956
+ this.$set('data.f_safe_type', '年度安检')
1957
+ this.$set('data.f_usegas', '已使用')
1958
+ this.$set('data.f_state',this.item.f_state)
1959
+ this.$set('data.f_source', this.source?this.source:'安检')
1960
+ this.$set('data.f_other_checker_name', '')
1961
+ //tag
1962
+ // 用户信息
1963
+ this.$set('data.f_user_name', this.item.f_user_name)
1964
+ this.$set('data.f_rent_phone', this.item.f_rent_phone)
1965
+ this.$set('data.f_user_phone', this.item.f_user_phone || this.item.f_plan_meters[0].f_user_phone)
1966
+ this.$set('data.f_userinfoid', this.item.f_userinfoid)
1967
+ this.$set('data.f_address', this.item.f_address)
1968
+ this.$set('data.f_card_id', this.item.f_card_id)
1969
+ this.$set('data.f_slice_area', this.item.f_slice_area)
1970
+ this.$set('data.f_recheck_id', this.item.id)
1971
+ this.$set('rowCodata.f_recheck_id', this.item.id)
1972
+ this.$set('data.f_street', this.item.f_street)
1973
+ this.$set('data.f_room', this.item.f_room)
1974
+ this.$set('data.f_building', this.item.f_building)
1975
+ this.$set('data.f_unit', this.item.f_unit)
1976
+ //tag
1977
+ this.$set('data.f_floor', this.item.f_floor)
1978
+ this.$set('data.f_residential_area' , this.item.f_residential_area)
1979
+ this.$set('data.f_idnumber', this.item.f_idnumber)
1980
+ this.$set('data.f_comments', this.item.f_comments)
1981
+ this.$set('data.f_userproperties', this.item.f_userproperties)
1982
+ this.$set('data.f_client_evaluation', '满意')
1983
+ this.$set('data.f_userfiles_id', this.item.f_plan_meters[0].f_userfiles_id)
1984
+ this.$set('data.f_valve_state', this.item.f_plan_meters[0].f_valve_state)
1985
+ this.$set('data.f_off_valve_reason', this.item.f_plan_meters[0].f_off_valve_reason)
1986
+ // this.$set('data.f_user_inhome_time', this.item.f_user_inhome_time)
1987
+ // this.$set('data.f_user_check_time', this.item.f_user_check_time)
1988
+ // this.$set('data.f_user_spare_phone', this.item.f_user_spare_phone)
1989
+ // this.$set('data.f_user_family_remarks', this.item.f_user_family_remarks)
1990
+ // this.$set('data.f_user_equipment_remarks', this.item.f_user_equipment_remarks)
1991
+ // 处置方式
1992
+ //tag
1993
+ this.$set('data.f_gas_guidelines', true)
1994
+ this.$set('data.f_safety_warning', true)
1995
+ this.$set('data.f_gas_manual', true)
1996
+ this.$set('data.f_no_gas_device', false)
1997
+ this.$set('data.f_close_valve', false)
1998
+ this.$set('data.f_unload_battery', false)
1999
+ //tag
2000
+ if (this.data.f_check_item_id == '' && this.item.f_no_checkplan == '无计划安检' ) {
2001
+ this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
2002
+ }
2003
+ if(this.item.f_no_checkplan == '复检'){
2004
+ this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
2005
+ }
2006
+ //tag
2007
+ if(this.item.f_plan_meters) {
2008
+ for (let de in this.devices) {
2009
+ if(typeof this.devices[de]=='function'){
2010
+ continue
2011
+ }
2012
+ this.$set('data.device' + this.devices[de].n, [])
2013
+ for (let i = 0; i < this.item.f_plan_meters.length; i++) {
2014
+ if (this.item.f_plan_meters[i].f_meter_type) {
2015
+ this.data.f_meter_type=this.item.f_plan_meters[i].f_meter_type
2016
+ //tag)
2017
+ if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('机表') >= 0) {
2018
+ this.data['device' + this.devices[de].n].push({
2019
+ f_device_type: "燃气表",
2020
+ f_items: [
2021
+ {
2022
+ f_defect_level: null,
2023
+ f_device_id: "",
2024
+ f_is_defect: "",
2025
+ f_item_name: "基表编号",
2026
+ f_item_value: this.item.f_plan_meters[i].f_meter_no,
2027
+ f_path: "",
2028
+ type: "number"
2029
+ },
2030
+ {
2031
+ f_defect_level: null,
2032
+ f_device_id: "",
2033
+ f_is_defect: "",
2034
+ f_item_name: "气表型号",
2035
+ f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
2036
+ f_path: "",
2037
+ type: "string"
2038
+ },
2039
+ {
2040
+ f_defect_level: null,
2041
+ f_device_id: "",
2042
+ f_is_defect: "",
2043
+ f_item_name: "气表品牌",
2044
+ f_item_value: this.item.f_plan_meters[i].f_aliasname,
2045
+ f_path: "",
2046
+ type: "string"
2047
+ },
2048
+ {
2049
+ f_defect_level: null,
2050
+ f_device_id: "",
2051
+ f_is_defect: "",
2052
+ f_item_name: "进气方向",
2053
+ f_item_value: this.item.f_plan_meters[i].f_flow_direction,
2054
+ f_path: "",
2055
+ type: "string"
2056
+ },
2057
+ {
2058
+ f_defect_level: null,
2059
+ f_device_id: "",
2060
+ f_is_defect: "",
2061
+ f_item_name: "上期表读数",
2062
+ f_item_value: this.item.f_plan_meters[i].f_prior_reading,
2063
+ f_path: "",
2064
+ type: "number"
2065
+ },
2066
+ {
2067
+ f_defect_level: null,
2068
+ f_device_id: "",
2069
+ f_is_defect: "",
2070
+ f_item_name: "表封号",
2071
+ f_item_value: this.item.f_plan_meters[i].f_metertitles,
2072
+ f_path: "",
2073
+ type: "string"
2074
+ }
2075
+ ]
2076
+ })
2077
+ }
2078
+ else if (this.devices[de].device == "燃气表") {
2079
+ // delete this.config['燃气表']['items']['表底数']
2080
+ this.data['device' + this.devices[de].n].push({
2081
+ f_device_type: "燃气表",
2082
+ f_items: [
2083
+ {
2084
+ f_defect_level: null,
2085
+ f_device_id: "",
2086
+ f_is_defect: "",
2087
+ f_item_name: "基表编号",
2088
+ f_item_value: this.item.f_plan_meters[i].f_meter_no,
2089
+ f_path: "",
2090
+ type: "number"
2091
+ },
2092
+ {
2093
+ f_defect_level: null,
2094
+ f_device_id: "",
2095
+ f_is_defect: "",
2096
+ f_item_name: "气表型号",
2097
+ f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
2098
+ f_path: "",
2099
+ type: "string"
2100
+ },
2101
+ {
2102
+ f_defect_level: null,
2103
+ f_device_id: "",
2104
+ f_is_defect: "",
2105
+ f_item_name: "气表品牌",
2106
+ f_item_value: this.item.f_plan_meters[i].f_aliasname,
2107
+ f_path: "",
2108
+ type: "string"
2109
+ },
2110
+ {
2111
+ f_defect_level: null,
2112
+ f_device_id: "",
2113
+ f_is_defect: "",
2114
+ f_item_name: "进气方向",
2115
+ f_item_value: this.item.f_plan_meters[i].f_flow_direction,
2116
+ f_path: "",
2117
+ type: "string"
2118
+ },
2119
+ {
2120
+ f_defect_level: null,
2121
+ f_device_id: "",
2122
+ f_is_defect: "",
2123
+ f_item_name: "上期表读数",
2124
+ f_item_value: this.item.f_plan_meters[i].f_prior_reading,
2125
+ f_path: "",
2126
+ type: "number"
2127
+ },
2128
+ {
2129
+ f_defect_level: null,
2130
+ f_device_id: "",
2131
+ f_is_defect: "",
2132
+ f_item_name: "表封号",
2133
+ f_item_value: this.item.f_plan_meters[i].f_metertitles,
2134
+ f_path: "",
2135
+ type: "string"
2136
+ }
2137
+ ]
2138
+ })
2139
+ }
2140
+ if(this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('物联网表') >= 0){
2141
+ //tag
2142
+ this.data['device' + this.devices[de].n].forEach(device => {
2143
+ //tag)
2144
+ if (!this.data.f_collection_type) {
2145
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
2146
+ delete this.config['燃气表']['items']['累购气量']
2147
+ delete this.config['燃气表']['items']['已用金额']
2148
+ delete this.config['燃气表']['items']['剩余气量']
2149
+ delete this.config['燃气表']['items']['气量异常差值']
2150
+ delete this.config['燃气表']['items']['金额异常差值']
2151
+ device.f_items.push(
2152
+ {
2153
+ f_defect_level: null,
2154
+ f_device_id: "",
2155
+ f_is_defect: "",
2156
+ f_item_name: "初始表底",
2157
+ isshow: true,
2158
+ f_item_value: this.item.f_plan_meters[i].f_initial_base,
2159
+ f_path: "",
2160
+ type: "number"
2161
+ },
2162
+ {
2163
+ f_defect_level: null,
2164
+ f_device_id: "",
2165
+ f_is_defect: "",
2166
+ f_item_name: "累购金额",
2167
+ f_item_value: this.item.f_plan_meters[i].f_total_fee,
2168
+ f_path: "",
2169
+ type: "number"
2170
+ },
2171
+ {
2172
+ f_defect_level: null,
2173
+ f_device_id: "",
2174
+ f_is_defect: "",
2175
+ f_item_name: "已用气量",
2176
+ f_item_value: this.item.f_plan_meters[i].f_meter_base,
2177
+ f_path: "",
2178
+ type: "number"
2179
+ },
2180
+ {
2181
+ f_defect_level: null,
2182
+ f_device_id: "",
2183
+ f_is_defect: "",
2184
+ f_item_name: "剩余金额",
2185
+ f_item_value: '',
2186
+ f_path: "",
2187
+ type: "number"
2188
+ },
2189
+ {
2190
+ f_defect_level: null,
2191
+ f_device_id: "",
2192
+ f_is_defect: "",
2193
+ f_item_name: "系统余额",
2194
+ f_item_value: this.item.f_plan_meters[i].f_balance_amount,
2195
+ f_path: "",
2196
+ type: "number"
2197
+ }
2198
+ )
2199
+ //tag)
2200
+ }
2201
+ })
2202
+ } else if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_collection_type) {
2203
+ this.data['device' + this.devices[de].n].forEach(device => {
2204
+ //tag)
2205
+ //tag)
2206
+ /*
2207
+ "累购气量":{"index":8,"type":"number","readonly":true},
2208
+ "累购金额":{"index":8,"type":"number","readonly":true},
2209
+ "字轮读数":{"index":9,"type":"number","checkmust": true},
2210
+ "已用金额":{"index":9,"type":"number","checkmust": true},
2211
+ "剩余气量":{"index":10,"type":"number","checkmust": true},
2212
+ "剩余金额":{"index":10,"type":"number","checkmust": true},
2213
+ "气量异常差值":{"index":11,"type":"number","readonly": true},
2214
+ "金额异常差值":{"index":11,"type":"number","readonly": true}
2215
+ */
2216
+ if (this.item.f_plan_meters[i].f_collection_type == '按金额') {
2217
+ if (!this.data.f_collection_type) {
2218
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
2219
+ delete this.config['燃气表']['items']['累购气量']
2220
+ delete this.config['燃气表']['items']['已用气量']
2221
+ delete this.config['燃气表']['items']['剩余气量']
2222
+ delete this.config['燃气表']['items']['气量异常差值']
2223
+ delete this.config['燃气表']['items']['系统余额']
2224
+ device.f_items.push(
2225
+ {
2226
+ f_defect_level: null,
2227
+ f_device_id: "",
2228
+ f_is_defect: "",
2229
+ f_item_name: "初始表底",
2230
+ isshow: false,
2231
+ f_item_value: '',
2232
+ f_path: "",
2233
+ type: "number"
2234
+ },
2235
+ {
2236
+ f_defect_level: null,
2237
+ f_device_id: "",
2238
+ f_is_defect: "",
2239
+ f_item_name: "累购金额",
2240
+ f_item_value: this.item.f_plan_meters[i].f_total_fee,
2241
+ f_path: "",
2242
+ type: "number"
2243
+ },
2244
+ {
2245
+ f_defect_level: null,
2246
+ f_device_id: "",
2247
+ f_is_defect: "",
2248
+ f_item_name: "已用金额",
2249
+ f_item_value: null,
2250
+ f_path: "",
2251
+ type: "number"
2252
+ },
2253
+ {
2254
+ f_defect_level: null,
2255
+ f_device_id: "",
2256
+ f_is_defect: "",
2257
+ f_item_name: "剩余金额",
2258
+ f_item_value: null,
2259
+ f_path: "",
2260
+ type: "number"
2261
+ },
2262
+ {
2263
+ f_defect_level: null,
2264
+ f_device_id: "",
2265
+ f_is_defect: "",
2266
+ f_item_name: "金额异常差值",
2267
+ f_item_value: null,
2268
+ f_path: "",
2269
+ type: "number"
2270
+ }
2271
+ )
2272
+ //tag)
2273
+ }
2274
+ } else
2275
+ if (this.item.f_plan_meters[i].f_collection_type == '按气量') {
2276
+ if (!this.data.f_collection_type) {
2277
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
2278
+ delete this.config['燃气表']['items']['累购金额']
2279
+ delete this.config['燃气表']['items']['已用金额']
2280
+ delete this.config['燃气表']['items']['剩余金额']
2281
+ delete this.config['燃气表']['items']['金额异常差值']
2282
+ delete this.config['燃气表']['items']['系统余额']
2283
+ device.f_items.push(
2284
+ {
2285
+ f_defect_level: null,
2286
+ f_device_id: "",
2287
+ f_is_defect: "",
2288
+ f_item_name: "初始表底",
2289
+ isshow: true,
2290
+ f_item_value: this.item.f_plan_meters[i].f_initial_base,
2291
+ f_path: "",
2292
+ type: "number"
2293
+ },
2294
+ {
2295
+ f_defect_level: null,
2296
+ f_device_id: "",
2297
+ f_is_defect: "",
2298
+ f_item_name: "累购气量",
2299
+ f_item_value: this.item.f_plan_meters[i].f_total_gas,
2300
+ f_path: "",
2301
+ type: "number"
2302
+ },
2303
+ {
2304
+ f_defect_level: null,
2305
+ f_device_id: "",
2306
+ f_is_defect: "",
2307
+ f_item_name: "已用气量",
2308
+ f_item_value: this.item.f_plan_meters[i].f_meter_base,
2309
+ f_path: "",
2310
+ type: "number"
2311
+ },
2312
+ {
2313
+ f_defect_level: null,
2314
+ f_device_id: "",
2315
+ f_is_defect: "",
2316
+ f_item_name: "剩余气量",
2317
+ f_item_value: "",
2318
+ f_path: "",
2319
+ type: "number"
2320
+ },
2321
+ {
2322
+ f_defect_level: null,
2323
+ f_device_id: "",
2324
+ f_is_defect: "",
2325
+ f_item_name: "气量异常差值",
2326
+ f_item_value: null,
2327
+ f_path: "",
2328
+ type: "number"
2329
+ }
2330
+ )
2331
+ //tag)
2332
+ }
2333
+ }
2334
+ })
2335
+ } else if(this.devices[de].device == "燃气表"){
2336
+ //tag
2337
+ this.data['device' + this.devices[de].n].forEach(device => {
2338
+ //tag)
2339
+ if (!this.data.f_collection_type) {
2340
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
2341
+ delete this.config['燃气表']['items']['累购金额']
2342
+ delete this.config['燃气表']['items']['已用金额']
2343
+ delete this.config['燃气表']['items']['剩余金额']
2344
+ delete this.config['燃气表']['items']['金额异常差值']
2345
+ delete this.config['燃气表']['items']['系统余额']
2346
+ device.f_items.push(
2347
+ {
2348
+ f_defect_level: null,
2349
+ f_device_id: "",
2350
+ f_is_defect: "",
2351
+ f_item_name: "初始表底",
2352
+ isshow: true,
2353
+ f_item_value: this.item.f_plan_meters[i].f_initial_base,
2354
+ f_path: "",
2355
+ type: "number"
2356
+ },
2357
+ {
2358
+ f_defect_level: null,
2359
+ f_device_id: "",
2360
+ f_is_defect: "",
2361
+ f_item_name: "累购气量",
2362
+ f_item_value: this.item.f_plan_meters[i].f_total_gas,
2363
+ f_path: "",
2364
+ type: "number"
2365
+ },
2366
+ {
2367
+ f_defect_level: null,
2368
+ f_device_id: "",
2369
+ f_is_defect: "",
2370
+ f_item_name: "已用气量",
2371
+ f_item_value: this.item.f_plan_meters[i].f_meter_base,
2372
+ f_path: "",
2373
+ type: "number"
2374
+ },
2375
+ {
2376
+ f_defect_level: null,
2377
+ f_device_id: "",
2378
+ f_is_defect: "",
2379
+ f_item_name: "剩余气量",
2380
+ f_item_value: '',
2381
+ f_path: "",
2382
+ type: "number"
2383
+ },
2384
+ {
2385
+ f_defect_level: null,
2386
+ f_device_id: "",
2387
+ f_is_defect: "",
2388
+ f_item_name: "气量异常差值",
2389
+ isshow:false,
2390
+ f_item_value: null,
2391
+ f_path: "",
2392
+ type: "number"
2393
+ }
2394
+ )
2395
+ //tag)
2396
+ }
2397
+ })
2398
+ }
2399
+ }
2400
+ }
2401
+ }
2402
+ }
2403
+ var pardate = {
2404
+ _this:this,
2405
+ tittle:'安检详情',
2406
+ safe:true
2407
+ }
2408
+ // this.$dispatch('gotoson',pardate)
2409
+ //tag
2410
+ this.$goto('safecheck-userinfo', {userinfo:this.data}, 'repair')
2411
+ }
2412
+ },
2413
+ watch: {
2414
+ 'row' () {
2415
+ //tag
2416
+ this.copy()
2417
+ }
2418
+ },
2419
+ async ready () {
2420
+ //送气超期功能
2421
+ //await this.isoverDate()
2422
+ this.putDevices()
2423
+ //如果已检,则提取安检单
2424
+ if (this.item.f_state != '未检') {
2425
+ if (this.role == 'inspect' || this.role == 'androidview') {
2426
+ HostApp.__callback__ = this.loaded
2427
+ HostApp.__this__ = this
2428
+ let that = this
2429
+ let value = {}
2430
+ //tag
2431
+ if (this.role == 'inspect') {
2432
+ //tag
2433
+ if (this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') {
2434
+ value = this.$androidUtil.path({
2435
+ alias: 'getUserinfomation',
2436
+ data: {condition: "f_check_item_id = '" + this.item.id + "' and f_no_checkplan in ('无计划安检','复检')"}
2437
+ })
2438
+ } else {
2439
+ value = this.$androidUtil.bzLogic('FetchCheckPaper', {id: this.item.id})
2440
+ }
2441
+ } else {
2442
+ value = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data: {condition: `id = '${this.item.f_paper_id}'`}})
2443
+ }
2444
+ Util.replaceFalse(value)
2445
+ //tag)
2446
+ if (value.data.length != 0) {
2447
+ that.$set('data', value.data[0])
2448
+ //tag)
2449
+ if (this.data.f_collection_type == '按气量') {
2450
+ delete this.config['燃气表']['items']['累购金额']
2451
+ delete this.config['燃气表']['items']['已用金额']
2452
+ delete this.config['燃气表']['items']['剩余金额']
2453
+ delete this.config['燃气表']['items']['金额异常差值']
2454
+ delete this.config['燃气表']['items']['系统余额']
2455
+ } else if (this.data.f_collection_type == '按金额') {
2456
+ delete this.config['燃气表']['items']['累购气量']
2457
+ delete this.config['燃气表']['items']['已用气量']
2458
+ delete this.config['燃气表']['items']['剩余气量']
2459
+ delete this.config['燃气表']['items']['气量异常差值']
2460
+ delete this.config['燃气表']['items']['系统余额']
2461
+ }
2462
+ //tag)
2463
+ if (value.data[0].f_devices) {
2464
+ for (let da in that.devices) {
2465
+ if(typeof that.devices[da]=='function'){
2466
+ continue
2467
+ }
2468
+ that.$set('data.device' + that.devices[da].n, [])
2469
+ }
2470
+ value.data[0].f_devices.forEach((item) => {
2471
+ //tag)
2472
+ for (let i in item.f_items) {
2473
+ if(typeof item.f_items[i]=='function'){
2474
+ continue
2475
+ }
2476
+ // if (item.f_items[i].f_path != '' && item.f_items[i].f_path != null) {
2477
+ // this.picture.push({f_path: item.f_items[i].f_path, name: item.f_items[i].f_item_name})
2478
+ // }
2479
+ for (let de in that.config[item.f_device_type].items) {
2480
+ if(typeof that.config[item.f_device_type].items[de]=='function'){
2481
+ continue
2482
+ }
2483
+ if (item.f_items[i].f_item_name == de) {
2484
+ if (that.config[item.f_device_type].items[de].type == 'selector' || that.config[item.f_device_type].items[de].type == 'checkbox') {
2485
+ item.f_items[i].f_item_value = []
2486
+ } else {
2487
+ item.f_items[i].f_item_value = ''
2488
+ }
2489
+ }
2490
+ }
2491
+ //tag)
2492
+
2493
+ // if (item.f_items[i].f_item_name=='累购气量'){
2494
+ // item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_total_gas
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_total_fee
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_meter_no
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_aliasname
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_flow_direction
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_diaphgram_size
2505
+ // }else if (item.f_items[i].f_item_name=='表箱号'){
2506
+ // item.f_items[i].f_item_value=this.item.f_plan_meters[0].f_metertitles
2507
+ // }
2508
+ // else{
2509
+ for (let j in item.f_items[i].f_item_lists) {
2510
+ if(typeof item.f_items[i].f_item_lists[j]=='function'){
2511
+ continue
2512
+ }
2513
+ //tag)
2514
+ if (item.f_items[i].f_item_value instanceof Array) {
2515
+ item.f_items[i].f_item_value.push(item.f_items[i].f_item_lists[j].f_item_value)
2516
+ } else {
2517
+ item.f_items[i].f_item_value = item.f_items[i].f_item_lists[j].f_item_value
2518
+ }
2519
+ }
2520
+ // }
2521
+
2522
+ }
2523
+ for (let de in that.devices) {
2524
+ if(typeof that.devices[de]=='function'){
2525
+ continue
2526
+ }
2527
+ if (that.devices[de].device == item.f_device_type) {
2528
+ that.data['device' + that.devices[de].n].push({
2529
+ f_device_type: item.f_device_type,
2530
+ f_items: item.f_items
2531
+ })
2532
+ //tag)
2533
+ }
2534
+ }
2535
+ })
2536
+ if (this.role == 'androidview') {
2537
+ Util.androidRatifyPics(that.data, this.$androidUtil.getProxyUrl())
2538
+ Util.androidRatifyPics(that.picture, this.$androidUtil.getProxyUrl())
2539
+ Util.booleanFilter(that.data)
2540
+ }
2541
+ //tag)
2542
+ }
2543
+ } else {
2544
+ //tag
2545
+ this.init()
2546
+ }
2547
+ if(this.parentPage && this.parentPage=='CurrentCreate'){
2548
+ //tag
2549
+ let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
2550
+ if (isRecodr) {
2551
+ if (isRecodr=='true') {
2552
+ this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
2553
+ // 初始化录音
2554
+ let resse = this.record()
2555
+ }
2556
+ }
2557
+ }
2558
+ //tag
2559
+ var pardate = {
2560
+ _this:this,
2561
+ tittle:'安检详情',
2562
+ safe:true
2563
+ }
2564
+ // this.$dispatch('gotoson',pardate)getImgPath
2565
+ this.$goto('safecheck-userinfo', {userinfo:this.data}, 'repair')
2566
+ } else {
2567
+ let that = this
2568
+ let id
2569
+ if (this.role == 'view') {
2570
+ id = this.item.id
2571
+ }
2572
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data:{condition:`id = '${id}'`}}).then((respanse)=> {
2573
+ if (respanse.data.length != 0) {
2574
+ that.data = Object.assign(that.data,respanse.data[0])
2575
+ if(respanse.data[0].f_devices) {
2576
+ for (let da in that.devices) {
2577
+ that.$set('data.device' + that.devices[da].n, [])
2578
+ }
2579
+ respanse.data[0].f_devices.forEach((item) => {
2580
+ for (let de in that.devices) {
2581
+ if (that.devices[de].device == item.f_device_type) {
2582
+ that.data['device' + that.devices[de].n].push({
2583
+ f_device_type: item.f_device_type,
2584
+ f_items: item.f_items
2585
+ })
2586
+ }
2587
+ }
2588
+ })
2589
+ }
2590
+ Util.replaceFalse(that.data)
2591
+ Util.booleanFilter(that.data)
2592
+ if(this.role == 'view'){
2593
+ Util.ratifyPics(that.data)
2594
+ }else{
2595
+ Util.androidRatifyPics(that.data,this.$androidUtil.getProxyUrl())
2596
+ }
2597
+ //tag
2598
+ } else {
2599
+ alert("该安检单可能已不在本地!")
2600
+ this.init()
2601
+ }
2602
+ var pardate = {
2603
+ _this:this,
2604
+ tittle:'安检详情',
2605
+ safe:true
2606
+ }
2607
+ // this.$dispatch('gotoson',pardate)
2608
+ this.$goto('safecheck-userinfo', {userinfo:this.data}, 'paper-router')
2609
+ }
2610
+ ).catch(
2611
+ (respanse) => {
2612
+ alert('查找安检单失败')
2613
+ })
2614
+ }
2615
+ }else{
2616
+ if(this.parentPage && this.parentPage=='CurrentCreate'){
2617
+ //tag
2618
+ let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
2619
+ if (isRecodr) {
2620
+ if (isRecodr=='true') {
2621
+ // this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
2622
+ // 初始化录音
2623
+ let resse = this.record()
2624
+ }
2625
+ }
2626
+ }
2627
+ this.init()
2628
+ }
2629
+ // tbs合并数组
2630
+ // if( this.model.serviceacitivity[0].servicerepair.length > 0){
2631
+ // for(let i = 0;i < this.model.serviceacitivity[0].servicerepair.length;i++ ){
2632
+ //
2633
+ // }
2634
+ // }
2635
+ },
2636
+ components: {
2637
+ // 'door-service': DoorService,
2638
+ // 'repair-info': RepairInfo,
2639
+ // 'repair-user-info': RepairUserInfo,
2640
+ // 'outlay': Outlay,
2641
+ // 'fault-all': FaultAll,
2642
+ // 'repair-details':RepairDetails
2643
+ // 'pipeline': Pipeline,
2644
+ // 'device-service': DeviceService,
2645
+ // 'trouble-removal': TroubleRemoval,
2646
+ // 'cooking-utensils': CookingUtensils,
2647
+ // 'repair-matter-info': RepairMatterInfo,
2648
+ // 'first-gas-check': FirstGasCheck,
2649
+ // 'tel-change-matter': TelChangeMatter/
2650
+ },
2651
+ events: {
2652
+ 'tijiao': function () {
2653
+ // 事件回调内的 `this` 自动绑定到注册它的实例上
2654
+ this.confirm()
2655
+ }
2656
+ }
2657
+ }
2658
+ </script>
2659
+ <style lang="less">
2660
+ @import "../../../../src/bootstrap/less/variables.less";
2661
+ .noclickbut {
2662
+ pointer-events: none;
2663
+ }
2664
+ .tab-befor-img (@url) {
2665
+ content: '';
2666
+ background-image: url("@{url}");
2667
+ background-size: 20px;
2668
+ display: inline-block;
2669
+ margin-right: 8px;
2670
+ margin-top: 0.3em;
2671
+ height: 1.3em;
2672
+ width: 1.3em;
2673
+ vertical-align: -35%;
2674
+ }
2675
+
2676
+ @media screen and (min-width: 768px) {
2677
+ .android-repair-order > div > ul a {
2678
+ font-size: @font-size-h2;
2679
+ margin: 0.3em 0;
2680
+ }
2681
+ }
2682
+ .repair-details-class{
2683
+ &::before {
2684
+ .tab-befor-img("../../../assets/huneiweixiu1.png");
2685
+ }
2686
+ }
2687
+ .repair-info-class {
2688
+ &::before {
2689
+ .tab-befor-img("../../../assets/baoxiuxinxi1.png");
2690
+ }
2691
+ }
2692
+ .repair-user-info-class {
2693
+ &::before {
2694
+ .tab-befor-img("../../../assets/jibenxinxi1.png")
2695
+ }
2696
+ }
2697
+
2698
+ .door-service-class {
2699
+ &::before {
2700
+ .tab-befor-img("../../../assets/huneiweixiu1.png")
2701
+ }
2702
+ }
2703
+
2704
+ .pipeline-class {
2705
+ &::before {
2706
+ .tab-befor-img("../../../assets/guandao1.png")
2707
+ }
2708
+ }
2709
+
2710
+ .device-service-class {
2711
+ &::before {
2712
+ .tab-befor-img("../../../assets/shebeiweixiu1.png")
2713
+ }
2714
+ }
2715
+
2716
+ .trouble-removal-class {
2717
+ &::before {
2718
+ .tab-befor-img("../../../assets/shiguchuli.png")
2719
+ }
2720
+ }
2721
+
2722
+ .cooking-utensils-class {
2723
+ &::before {
2724
+ .tab-befor-img("../../../assets/zaoju1.png")
2725
+ }
2726
+ }
2727
+
2728
+ .outlay-class {
2729
+ &::before {
2730
+ .tab-befor-img("../../../assets/feiyong1.png")
2731
+ }
2732
+ }
2733
+
2734
+ .fault-all-class {
2735
+ &::before {
2736
+ .tab-befor-img("../../../assets/guzhanghuizong1.png")
2737
+ }
2738
+ }
2739
+ .photo-write-class {
2740
+ &::before {
2741
+ .tab-befor-img("../../../assets/zaoju.png")
2742
+ }
2743
+ }
2744
+ .delay-apply-class {
2745
+ &::before {
2746
+ .tab-befor-img("../../../assets/yonghubaoxiu.png")
2747
+ }
2748
+ }
2749
+
2750
+ .repair-back-class {
2751
+ &::before {
2752
+ .tab-befor-img("../../../assets/fanhui.png")
2753
+ }
2754
+ }
2755
+ .butt2 {
2756
+ display: inline;
2757
+ float: right;
2758
+ width: 10px;
2759
+ text-align: center;
2760
+ align-items:center;
2761
+ position: absolute;
2762
+ top:50%;
2763
+
2764
+ left:90%;
2765
+ transform: translate(-50%,-50%);
2766
+ }
2767
+ .linesty{
2768
+ display: inline-block;
2769
+ height:1px;
2770
+ width:100%;
2771
+ background:#d0d0d0;
2772
+ overflow:hidden;
2773
+ vertical-align: middle;
2774
+ }
2775
+ .spanboder{
2776
+ border-bottom:2px solid #499edf;
2777
+ padding-bottom: 8px
2778
+ }
2779
+ .app-botton {
2780
+ position:fixed;
2781
+ background: #87b2dd;
2782
+ right:8px;
2783
+ color: #FFF;
2784
+ padding: 8px;
2785
+ text-align: center;
2786
+ font-size: 1.2em;
2787
+ z-index: 10;
2788
+ opacity:0.5;
2789
+ bottom: 50px;
2790
+ margin-top: -10px;
2791
+ height: 40px;
2792
+ }
2793
+ .android-repair-order > div > ul a {
2794
+ font-size: 12px;
2795
+ color: #333333;
2796
+ padding: 13px 16px;
2797
+ }
2798
+ </style>