safecheck-client 4.0.0-99 → 4.0.1-10

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