safecheck-client 4.0.1-13 → 4.0.1-15

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