safecheck-client 4.0.2-65 → 4.0.2-66

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