safecheck-client 3.0.39-82 → 3.0.39-83

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 (275) 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 +26 -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/FileUpload.vue +696 -696
  188. package/src/components/Hello.vue +39 -39
  189. package/src/components/LeftTree.vue +27 -27
  190. package/src/components/android/AttendanceTally.vue +116 -116
  191. package/src/components/android/Blank.vue +10 -10
  192. package/src/components/android/CheckUnplanPage.vue +56 -56
  193. package/src/components/android/Checker.vue +12 -12
  194. package/src/components/android/CheckerAnnual.vue +81 -81
  195. package/src/components/android/CheckerAvarta.vue +82 -82
  196. package/src/components/android/EquipmentInspection.vue +348 -348
  197. package/src/components/android/FootprintMap.vue +120 -120
  198. package/src/components/android/HiddentroubleInvestigation.vue +192 -192
  199. package/src/components/android/MasterMain.vue +77 -77
  200. package/src/components/android/Menu.vue +132 -132
  201. package/src/components/android/PaperAlarm.vue +85 -85
  202. package/src/components/android/PaperDeviceNoncivil.vue +214 -214
  203. package/src/components/android/PlumberAnnual.vue +83 -83
  204. package/src/components/android/PlumberAnnualDetail.vue +65 -65
  205. package/src/components/android/PlumberMonthly.vue +84 -84
  206. package/src/components/android/PostMap.vue +83 -83
  207. package/src/components/android/QueryCheckHistory.vue +122 -122
  208. package/src/components/android/QueryCheckHistoryItem.vue +62 -62
  209. package/src/components/android/RepairMain.vue +60 -60
  210. package/src/components/android/Repairman.vue +12 -12
  211. package/src/components/android/StationMaster.vue +12 -12
  212. package/src/components/android/rejectInspecCheck.vue +322 -322
  213. package/src/components/defects/DefectModal.vue +101 -101
  214. package/src/components/defects/DevicesAndItem.vue +39 -39
  215. package/src/components/issueplan/IssuePlanMain.vue +23 -23
  216. package/src/components/notice/NoticeForm.vue +100 -100
  217. package/src/components/notice/NoticeIssue.vue +20 -20
  218. package/src/components/paper/PicViewer.vue +18 -18
  219. package/src/components/pc/NewCheckpaperTemp.vue +1308 -1308
  220. package/src/components/pc/RoleSelector.vue +172 -172
  221. package/src/components/phonestate/MonthlyTraffic.vue +66 -66
  222. package/src/components/phonestate/MonthlyTrafficRouter.vue +15 -15
  223. package/src/components/phonestate/PostMap.vue +82 -82
  224. package/src/components/querycheckpaper/PaperItem.vue +59 -59
  225. package/src/components/rongcheng/AddPlanItem.vue +344 -344
  226. package/src/components/rongcheng/CheckCurrentCreate.vue +1081 -1081
  227. package/src/components/rongcheng/PaperDefectMain.vue +828 -828
  228. package/src/components/userfile/MeterFile.vue +145 -145
  229. package/src/components/userfile/MeterModify.vue +46 -46
  230. package/src/components/userfileaudit/MeterAuditFile.vue +129 -129
  231. package/src/filiale/BFshiye/android/AndroidDefectDeal.vue +652 -652
  232. package/src/filiale/BFshiye/pc/DefectListNew.vue +637 -637
  233. package/src/filiale/BFshiye/pc/checkUserList.vue +772 -772
  234. package/src/filiale/BFshiye/pc.js +17 -17
  235. package/src/filiale/baiyin/android/SafecheckUserInfo.vue +775 -775
  236. package/src/filiale/baiyin/android.js +12 -12
  237. package/src/filiale/dexin/android/SafecheckDevicesTemp.vue +1419 -1419
  238. package/src/filiale/dexin/android/SafecheckOrderVTemp.vue +1256 -1256
  239. package/src/filiale/dexin/pc/PaperList.vue +857 -857
  240. package/src/filiale/qingjian/android/PhoneUpUserinfo.vue +1357 -1357
  241. package/src/filiale/qingjian/android/SafecheckUserInfo.vue +823 -823
  242. package/src/filiale/qingjian/pc/NewCheckpaper.vue +1919 -1919
  243. package/src/filiale/rongchuang/android/PhoneUpUserinfo.vue +1262 -1262
  244. package/src/filiale/rongchuang/pc/checkPlanList.vue +398 -398
  245. package/src/filiale/rongchuang/pc.js +18 -18
  246. package/src/filiale/shanxian/pc/NewCheckpaper.vue +1526 -1526
  247. package/src/filiale/siyang/android/PhoneInsurancePurchaseDetail.vue +532 -532
  248. package/src/filiale/wensu/android/SafecheckOrderV.vue +2444 -2444
  249. package/src/filiale/wensu/android/SafecheckUserInfo.vue +712 -712
  250. package/src/filiale/wensu/pc/CheckSearchUser.vue +1251 -1251
  251. package/src/filiale/yangchunboneng/android/CurrentCreate.vue +1191 -1191
  252. package/src/filiale/yangchunboneng/android/SafecheckUserInfo.vue +913 -913
  253. package/src/filiale/yangchunboneng/android.js +21 -21
  254. package/src/filiale/yangchunboneng/pc/CheckBookList.vue +353 -353
  255. package/src/filiale/yangchunboneng/pc/CheckSearchUser.vue +1197 -1197
  256. package/src/filiale/yangchunboneng/pc/HiddenSituation.vue +171 -171
  257. package/src/filiale/yangchunboneng/pc/PaperDefectMain.vue +1112 -1112
  258. package/src/filiale/yangchunboneng/pc/PaperList.vue +757 -757
  259. package/src/filiale/yangchunboneng/pc/SelectCheckPlan.vue +331 -331
  260. package/src/filiale/yangchunboneng/pc.js +29 -29
  261. package/src/main.js +33 -33
  262. package/src/plugins/LoadData.js +10 -10
  263. package/src/plugins/LoadParams.js +24 -24
  264. package/src/rongcheng.js +319 -319
  265. package/src/stores/wxconfig.js +10 -10
  266. package/src/utils/getNowDate.js +33 -33
  267. package/test/e2e/custom-assertions/elementCount.js +26 -26
  268. package/test/e2e/nightwatch.conf.js +40 -40
  269. package/test/e2e/runner.js +30 -30
  270. package/test/e2e/specs/test.js +13 -13
  271. package/test/unit/.eslintrc +5 -5
  272. package/test/unit/TestUtil.js +62 -62
  273. package/test/unit/context.html +20 -20
  274. package/test/unit/index.js +13 -13
  275. package/yarn-error.log +140 -0
@@ -1,1256 +1,1256 @@
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">
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 flex-between" style="margin-top: 20px;">
33
- <div class="col-xs-3 col-sm-3 col-md-3">
34
- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="uploadCheckPaper">
35
- 上传
36
- </button>
37
- </div>
38
- </div>
39
- </div>
40
- </div>
41
- </div>
42
- </div>
43
- </div>
44
- </ul>
45
- </div>
46
- </div>
47
- </template>
48
-
49
- <script>
50
- import Vue from 'vue'
51
- import * as Util from '../../Util'
52
- import { HttpResetClass } from 'vue-client'
53
- import co from 'co'
54
- import $ from "jquery";
55
- let loadParamGem = async function (self) {
56
- await self.$LoadParams.loadParam()
57
- }
58
-
59
- export default {
60
- title: '安检单',
61
- props: ['f_plan_id', 'item', 'role','parentPage','source'],
62
- // props: ['f_plan_id', 'role'],
63
- data() {
64
- return {
65
- data: {
66
- f_noanswer_path:'',
67
- f_nongasuser_path:'',
68
- f_devices: [],
69
- f_defect_content:'',
70
- f_recording1_path:'',
71
- f_visit_number:'',
72
- f_remark:''
73
- },
74
- imgsnum:this.$appdata.getSingleValue('安检总体照片数量') ? this.$appdata.getSingleValue('安检总体照片数量'):1, // 安检整体照片默认必须拍1张
75
- updateuserphone:false, //安检时是否更新用户电话
76
- updatemetermodel:false, //安检时是否更新表型号
77
- updatemeternumber:false, //安检时是否更新表号
78
- beforephone:'',
79
- isUpload:false,
80
- show_torepair: false,
81
- onlySave:true, //判断保存还是保存并上传
82
- livedispose:'',
83
- refuseinspection:'', // 拒捡拍照是否提示
84
- notencountered:'', // 到访不遇拍照是否提示
85
- startClick:false, //开始安检按钮是否可点击
86
- isStrat: false, //是否开始安检
87
- checkResult:{},//查询结果
88
- newcheckResult:{},
89
- repairDefect : {
90
- result: '正常',
91
- data: []
92
- },
93
- rowCodata:{},
94
- repairers: [],
95
- timer: null,
96
- showModal: false,
97
- showModal2:false,
98
- pic_to_be_viewed: '',
99
- showBack:true,
100
- devices: [],
101
- f_devices : [],
102
- isToRepair:false,
103
- clickBack:true, //是否点击返回按钮
104
- isSafeCheckToRepair:false,//是否转维修
105
- Url:this.$androidUtil.getProxyUrl(),
106
- detail:{},
107
- defectDevice:{},
108
- user:{},
109
- is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
110
- dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'},{label: '派发给站点', value: '派发给站点'}],
111
- selectData:{
112
- dispatchType:'派发给维修员',
113
- f_repairman:'',
114
- f_remarks:'',
115
- f_repairtype:'整改'
116
- },
117
- model: { //转维修数据
118
- // 一次派单
119
- serviceacitivity: [{
120
- f_service_acitivity_type: '派单'
121
- }],
122
- f_source:'安检',
123
- f_service_id: '',
124
- f_contact_phone: '',
125
- f_meetunit: '',
126
- f_phone: '',
127
- f_user_name: '',
128
- f_address: '',
129
- f_repair_date: Util.toStandardTimeString(),
130
- f_card_id: '',
131
- // f_department: '', 站点选择
132
- f_reciever:'',
133
- f_remarks: '',
134
- f_user_type: '',
135
- f_area: '',
136
- f_unit_name:'',
137
- f_street: '',
138
- f_residential_area: '',
139
- f_building: '',
140
- f_unit: '',
141
- f_floor: '',
142
- f_room: '',
143
- aState: null,
144
- f_repairtype: '',
145
- f_repairitems:{},
146
- },
147
- repairitems:[],
148
- selecData:[],
149
- meading:'转站点',
150
- config: {
151
- "信息填写":{
152
- "checkmust":true,
153
- "index":1,
154
- "items":{
155
- "地址信息":{"index":1,"type":"string","readonly":false,"checkmust": true},
156
- "入户状态":{"index":2,"multiple":false,"type":"selector","options":[{"data":"入户","isdefault":true},{"data":"到访不遇"},{"data":"拒检"},{"data":"入户未点"}],"checkmust":true},
157
- "到访不遇/拒检照片":{"index":3,"type":"picture","readonly":false,"checkmust": false,"isshow":false},
158
- "气表品牌":{"index":4,"type":"string","readonly":false,"checkmust": true},
159
- "表号":{"index":5,"type":"string","readonly":false,"checkmust": true},
160
- "用户姓名":{"index":6,"type":"string","readonly":false,"checkmust": false},
161
- "用户电话":{"index":7,"type":"string","readonly":false,"checkmust": false},
162
- "表具照片":{"index":8,"type":"picture","readonly":false,"checkmust": true},
163
- "安装日期":{"index":9,"type":"date","readonly":false,"checkmust": true},
164
- "左右表":{"index":10,"multiple":false,"type":"selector","options":[{"data":"左表"},{"data":"右表"}],"checkmust":true},
165
- "检验时间":{"index":11,"type":"date","readonly":false,"checkmust": true}
166
- }
167
- },
168
- "其他隐患":{
169
- "checkmust":true,
170
- "index":2,
171
- "items":{
172
- "有无其他隐患":{"index":1,"multiple":false,"type":"radio","options":[{"data":"无隐患","isdefault":true},{"data":"有其他隐患","isdefault":false,"isdefect":true}],"checkmust":true}
173
- }
174
- },
175
- "点火":{
176
- "checkmust":true,
177
- "index":3,
178
- "items":{
179
- "检查类型":{"index":1,"multiple":false,"type":"selector","options":[{"data":"普通检查","isdefault":true},{"data":"点火检查"}],"checkmust":true},
180
- "点火类型":{"index":2,"multiple":false,"type":"selector","options":[{"data":"正常点火"},{"data":"点火条件不符未点"}],"checkmust":false,"isshow":false},
181
- "证件号码":{"index":3,"type":"string","checkmust":false,"isshow":false},
182
- "用户用气类型":{"index":4,"multiple":false,"type":"selector","options":this.selecData,"checkmust":false,"isshow":false},
183
- }
184
- }
185
- },
186
- isneedDate:'',
187
- routeShow:true,
188
- number:0,
189
- shupingshow:false,
190
- pipeline: {},
191
- details: [],
192
- ids: '',
193
- savevalid: {
194
- uservalid: false,
195
- doorvalid: true,
196
- changetable: false
197
- },
198
- doordetails: {},
199
- devicedetails: {},
200
- cookdetails: {},
201
- componentName: 'safecheck-devices-temp',
202
- header:'客户信息',
203
- tabs: [],
204
- faultshow:{
205
- number : 8
206
- } // 控制 故障汇总 在 菜单里显示与否,
207
- }
208
- },
209
- computed: {
210
- actionEnabled: {
211
- get() {
212
- return this.role == 'inspect'
213
- }
214
- }
215
- },
216
- methods: {
217
- showmod(){
218
- // this.saveNoclick()
219
- let errString = this.errorVerify()
220
- if (errString) {
221
- console.log(errString)
222
- console.log('Vue.android',Vue.android)
223
- console.log('this.isUpload',this.isUpload)
224
- if (Vue.android){
225
- this.$showMessage(errString)
226
- }
227
- return
228
- }
229
- //清空转维修列表重新进行数据组织
230
- this.repairDefect = {
231
- result: '正常',
232
- data: []
233
- }
234
- this.data.f_complete = '已完成'
235
- this.$set('data.f_offsite_time', Util.toStandardTimeString())
236
- this.assemblyCodata()
237
- if(this.repairDefect.result=='正常'){
238
- this.$showMessage("未发现有选择需要转维修的隐患,请检查填写的数据。如需转维修请在处理方式中选择 '转维修' !")
239
- return
240
- }
241
- console.log("准备保存!")
242
- this.disableTimer()
243
- this.getEmp()
244
- this.showModal2=true
245
- },
246
- cancel1(){
247
- this.showModal2=false
248
- this.selectData={
249
- dispatchType:'派发给维修员',
250
- f_repairman:'',
251
- f_remarks:'',
252
- f_repairtype:'整改'
253
- }
254
- },
255
- getSiteRes(obj) {
256
- console.log('siteRes ---> ')
257
- console.log(obj)
258
- if(obj.resids[0]){
259
- this.selectData.f_meetunit = obj.res.join('.')
260
- this.selectData.f_reciever = obj.resids.join('.')
261
- this.selectData.f_outlets = obj.res[obj.res.length - 1]
262
- }else {
263
- this.selectData.f_meetunit = ''
264
- this.selectData.f_reciever = ''
265
- this.selectData.f_outlets = ''
266
- }
267
- },
268
- rectification(){
269
- if(this.selectData.dispatchType){
270
- if(this.selectData.dispatchType=='派发给站点'){
271
- if(!this.selectData.f_reciever){
272
- this.$showMessage('请选择部门!')
273
- return
274
- }
275
- }else{
276
- if(!this.selectData.f_repairman){
277
- this.$showMessage('请选择维修员!')
278
- return
279
- }
280
- }
281
- }else {
282
- this.$showMessage('请选择派发类型!')
283
- return
284
- }
285
- /*if(!this.selectData.f_repairtype){
286
- this.$showMessage('请选择报修类型!')
287
- return
288
- }*/
289
- //关闭录音
290
- this.closely(false) // 保存本地,不删除录音文件暂停录音
291
- let act={}
292
- let toRepair=''
293
- if(this.selectData.dispatchType=='派发给站点'){
294
- act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
295
- toRepair=null
296
- }else{
297
- console.log('派发给维修员---------'+this.selectData.f_repairman)
298
- act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
299
- toRepair='一级派单'
300
- }
301
- let repData={
302
- toRepair:toRepair,
303
- activity:act,
304
- deps:Vue.user.deps,
305
- depids:Vue.user.depids,
306
- f_remarks:this.selectData.f_remarks,
307
- f_repairtype:this.selectData.f_repairtype,
308
- f_attendant: Vue.user.name,
309
- loginUser:{name:Vue.user.name,ename:Vue.user.id,id:Vue.user.id},
310
- }
311
- this.rowCodata.istoRepair='转维修'
312
- this.rowCodata.repData=repData
313
- console.log("当前组装好的转维修数据--"+JSON.stringify(repData))
314
- this.onlySave = false
315
- this.save()
316
- },
317
- // 获取维修员
318
- getEmp() {
319
- this.repairers=[]
320
- let per = {source: 'this.getRights().where(row.getType()==$user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${Vue.user.id}`}
321
- let http = new HttpResetClass()
322
- http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: per}, {resolveMsg: null, rejectMsg: null}).then((res) => {
323
- res.data.forEach((user)=>{
324
- this.repairers.push({label:user.name, value: user.name})
325
- })
326
- })
327
- },
328
- closely(isdelete){
329
- try {
330
- var startOrStopAudioClipStr;
331
- if (isdelete===true) {
332
- //tag
333
- startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止并删除录音') //停止并删除录音
334
- }else {
335
- //tag
336
- startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止录音') //停止录音
337
- }
338
- if (startOrStopAudioClipStr.code == 200) {
339
- //tag
340
- return true;
341
- }else {
342
- return false;
343
- }
344
- } catch (e) {
345
- console.error("关闭录音方法异常")
346
- console.error(e)
347
- return false;
348
- }
349
- },
350
- // 录音方法
351
- record() {
352
- //tag
353
- let fileName
354
- if (!this.data.f_recording1_path) {
355
- fileName = Util.guid() + '.amr'
356
- } else {
357
- fileName = Util.getFileName(this.data.f_recording1_path)
358
- }
359
- //HostApp.__this__ = this
360
- /*调用无限制录音模块*/
361
- let startOrStopState = HostApp.startOrStopAudioClip(fileName,"开始录音")
362
- //tag
363
- if (startOrStopState.code == 200) {
364
- this.data.f_recording1_path = "file:///storage/emulated/0/safecheck/" + fileName
365
- //tag
366
- return true;
367
- }else {
368
- return false;
369
- }
370
-
371
- },
372
- saveNoclick() {
373
- // 禁用点击事件
374
- $("#savebut").addClass("noclickbut");
375
- //tag
376
-
377
- // 5秒后启用点击事件
378
- setTimeout(function(){
379
- $("#savebut").removeClass("noclickbut");
380
- },5000);
381
- },
382
- timeSet(val){
383
- if (!val){
384
- return
385
- }
386
- let time =new Date(val).getTime()
387
- let time2=new Date().getTime()
388
- if (time2>time) {
389
- return true
390
- }
391
- },
392
- imgback(val,isheader){
393
- if(val && this.routeShow && isheader){
394
- return require('../../../assets/xiangxia1.png')
395
- }else{
396
- return require('../../../assets/xiangyou1.png')
397
- }
398
- },
399
- changediv(val){
400
- //tag
401
- return val
402
- },
403
- // 选择tab
404
- tabSelect (item,number) {
405
- this.header = item.header
406
- if(this.number == number && !this.routeShow ){
407
- this.routeShow = true
408
- }else if(this.number == number && this.routeShow){
409
- this.routeShow = false
410
- }else if(this.number != item.complete){
411
- this.routeShow = true
412
- }
413
- this.number = number
414
- this.componentName = item.complete
415
- if(item.complete == 'safecheck-devices-temp'){
416
- if(this.data['device'+item.number].length == 0){
417
- this.data['device' + item.number].push({})
418
- }
419
- let idx=this.data['device' + item.number].length - 1
420
- let itemprops = {
421
- config:this.config,
422
- device:this.devices[item.number-1],
423
- idx:idx,
424
- role:'inspect'
425
- }
426
- if(this.routeShow){
427
- this.$goto(item.complete, itemprops, 'repair')
428
- }
429
- }else{
430
- if(this.routeShow){
431
- this.$goto(item.complete, {userinfo:this.data}, 'repair')
432
- }
433
- }
434
- this.shupingshow = true
435
- },
436
- sortDetails(){
437
- for (let i = 0; i < this.details.length; i++) {
438
- if (this.details[i].details.length) {
439
- for (let j = 0; j < this.details[i].details.length; j++) {
440
- if (this.details[i].details[j].f_type === 'a') {
441
- this.doordetails = {details: this.details[i].details}
442
- break
443
- }
444
- if (this.details[i].details[j].f_type === 'b') {
445
- this.devicedetails = {details: this.details[i].details}
446
- break
447
- }
448
- if (this.details[i].details[j].f_type === 'c') {
449
- this.cookdetails = {details: this.details[i].details}
450
- break
451
- }
452
- }
453
- }
454
- }
455
- },
456
- // 复制数据
457
- back () {
458
- let _this = this
459
- if(this.issee){
460
- _this.$back()
461
- return
462
- }
463
- this.$showMessage('所填写内容将不可恢复!', ['confirm', 'cancel']).then((res) => {
464
- if (res === 'confirm') {
465
- this.closely()
466
- _this.$back()
467
- }
468
- })
469
- },
470
- confirm(){
471
- this.$dispatch('confirm')
472
- },
473
- tick() {
474
- this.timer = null
475
- this.data.f_offsite_time = Util.toStandardTimeString()
476
- this.timer = window.setTimeout(this.tick, 1000)
477
- },
478
- getRepairState() {
479
- let repaired = true
480
- this.data.f_defects.forEach((defect) => {
481
- repaired = repaired & (defect.f_ratification == '已处理')
482
- })
483
- return repaired
484
- },
485
- verifyRepairDefects() {
486
- this.data.f_repair_date = Util.toStandardTimeString()
487
- this.data.f_repaired = this.getRepairState() ? '已修' : '在修'
488
- },
489
- errorVerify() {
490
- if(this.data.f_entry_status){
491
- if(['到访不遇', '拒检'].includes(this.data.f_entry_status)) {
492
- if(!this.data.f_noanswer_path && !this.data.f_nongasuser_path){
493
- return "到访不遇/拒检照片未拍摄"
494
- }
495
- return
496
- }
497
- }else{
498
- return "入户状态未选择"
499
- }
500
- for (let dev in this.config) {
501
- if (this.config[dev].checkmust == true) {
502
- let error = true
503
- for(let device in this.data) {
504
- if (device.startsWith("device")) {
505
- for (let item in this.data[device]) {
506
- if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
507
- error = false
508
- }
509
- }
510
- }
511
- }
512
- if (error) {
513
- return "请检查" + dev
514
- }
515
- }
516
- }
517
-
518
- for (let dev in this.config) {
519
- for(let device in this.data) {
520
- if (device.startsWith("device")) {
521
- for (let item in this.data[device]) {
522
- //检查每一条安检结果
523
- if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
524
- for (let i in this.data[device][item].f_items) {
525
- for (let it in this.config[dev].items) {
526
- if (it == this.data[device][item].f_items[i].f_item_name) {
527
- let check=false
528
- if (!this.data[device][item].f_items[i].f_item_value){
529
- check=true
530
- }else if (Array.isArray(this.data[device][item].f_items[i].f_item_value)){
531
- if (this.data[device][item].f_items[i].f_item_value.length==0){
532
- check=true
533
- }
534
- }
535
-
536
- if(this.config[dev].items[it].type=='picture' && this.config[dev].items[it].checkmust == true && !this.data[device][item].f_items[i].f_path){
537
- return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
538
- }
539
- if (this.config[dev].items[it].type !='picture' && this.config[dev].items[it].checkmust == true && check) {
540
- return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
541
- }
542
- }
543
- }
544
- //检查安检下拉结果
545
- if (this.data[device][item].f_items[i].type == 'selector' || this.data[device][item].f_items[i].type == 'radio') {
546
- if (this.data[device][item].f_items[i].f_is_defect == true && this.data[device][item].f_items[i].f_path == Vue.nopic) {
547
- 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 + "选中必须拍照"
548
- }
549
- }
550
- }
551
- }
552
- }
553
- }
554
- }
555
- }
556
- },
557
- getAllDefect() {
558
- let checkResults = {
559
- result: '正常',
560
- data: []
561
- }
562
- let value = ''
563
- let codata = JSON.parse(JSON.stringify(this.data))
564
- codata.f_devices = []
565
- this.f_devices = []
566
- for (let device in codata) {
567
- let f_device_type
568
- if (device.startsWith("device")) {
569
- //tag)
570
- let hasOther = ''
571
- let otherValue = null
572
- for (let item in codata[device]) {
573
- if(typeof codata[device][item]=='function'){
574
- continue
575
- }
576
- codata[device][item].f_create_time = Util.toStandardTimeString()
577
- if (codata[device].length > 1) {
578
- let j = Number.parseInt(item) + 1
579
- f_device_type = `${codata[device][item].f_device_type}${j}`
580
- } else {
581
- f_device_type = codata[device][item].f_device_type
582
- }
583
- //tag
584
- //tag
585
- //tag)
586
- //tag)
587
- if(item == 'sum' || item == 'removeEmpty'){
588
- continue
589
- }
590
- for (let i = 0; i < codata[device][item].f_items.length ; i++) {
591
- //tag
592
- if(i == 'sum' || i == 'removeEmpty'){
593
- continue
594
- }
595
- //tag)
596
- var items = codata[device][item].f_items[i]
597
- items.f_create_time = Util.toStandardTimeString()
598
- //tag)
599
- items.f_item_lists = []
600
- //tag)
601
- // //tag)
602
- // //tag} name => ${JSON.stringify(items.f_item_name)} value => ${JSON.stringify(items.f_item_value)}`)
603
- // console.log(`f_is_defect => ${this.config[codata[device][item]
604
- // .f_device_type]
605
- // .items[items.f_item_name]
606
- // .options
607
- // .find((option)=>option.data === items.f_item_value)
608
- // .map((option)=>option.f_is_defect)}`)
609
- // if (items.f_is_defect && (items.f_is_defect == true || items.f_is_defect == 'true')) {
610
- // //tag
611
- // checkResults.result = '有隐患'
612
- // //tag)
613
- // //tag)
614
- // // this.$set('checkResult.' + items.f_item_name, items.f_item_value)
615
- // this.checkResult[items.f_item_name] = items.f_item_value
616
- // //tag)
617
- // // this.$set('checkResultsss.' + items.f_item_name, `${f_device_type}${items.f_item_value}`)
618
- // // //tag)
619
- // }
620
- if (items.type == 'selector') {
621
- items.selected = []
622
- } else if (items.type == 'inputSelector') {
623
- items.selected = ''
624
- }
625
- //遍历配置项 将所选隐患项的配置信息放入保存的数据中
626
- let f_is_defect //是否是隐患
627
- let f_defect_level //是否是隐患
628
- let f_item_name = items.f_item_name
629
- let f_item_value
630
- let f_is_eliminate //隐患是否消除
631
- let f_meternumber = ''
632
- let f_user_defects = [] // 用户所有隐患
633
- //tag
634
- //tag
635
- if (items.type == 'selector' || items.type == 'checkbox' || items.type == 'radio') {
636
- for (let i in items.f_item_value) {
637
- if(typeof items.f_item_value[i]=='function'){
638
- continue
639
- }
640
- let configItems = this.config[codata[device][item].f_device_type].items[f_item_name]
641
- //tag)
642
- for (let k in configItems.options) {
643
- if(typeof configItems.options[k]=='function'){
644
- continue
645
- }
646
- //tag)
647
- if (items.f_item_value[i] === configItems.options[k].data) {
648
-
649
- f_is_defect = configItems.options[k].isdefect
650
- f_item_value = items.f_item_value[i]
651
- f_defect_level = configItems.options[k].level
652
-
653
- //tag
654
- //tag
655
- //tag
656
-
657
- if (f_is_defect) {
658
- if (checkResults.result !== '有隐患') {
659
- checkResults.result = '有隐患'
660
- }
661
- console.log('items'+items)
662
- if(items.f_deal_dispose=='报修'){
663
- console.log("检测到需要转维修++++++++++++")
664
- this.repairDefect.result='未处理'
665
- this.repairDefect.data.push(`${f_item_name} : ${f_item_value}`)
666
- }
667
- if (!this.checkResult.hasOwnProperty(f_device_type+'-'+f_item_name)) {
668
- //tag
669
- this.checkResult[f_device_type+'-'+f_item_name] = []
670
- }
671
-
672
- //tag
673
- this.checkResult[f_device_type+'-'+f_item_name].push(f_item_value)
674
-
675
- }
676
-
677
- let items_list = {
678
- f_is_defect: f_is_defect,
679
- f_item_value: f_item_value,
680
- f_defect_level: f_defect_level,
681
- f_is_eliminate: null,
682
- f_create_time: Util.toStandardTimeString()
683
- }
684
- if (!items.f_item_lists) {
685
- //tag
686
- items.f_item_lists = []
687
- //tag)
688
- if (JSON.stringify(items_list) !== '{}') {
689
- //tag
690
- items.f_item_lists.push(items_list)
691
- }
692
- } else {
693
- //tag)
694
- if (JSON.stringify(items_list) !== '{}') {
695
- //tag
696
- items.f_item_lists.push(items_list)
697
- }
698
- }
699
- }
700
- }
701
- }
702
- } else {
703
- let configItems = this.config[codata[device][item].f_device_type].items[items.f_item_name]
704
- f_is_defect = items.f_is_defect
705
- f_defect_level = items.level
706
- f_item_value = items.f_item_value
707
- let items_list = {
708
- f_is_defect: f_is_defect,
709
- f_item_value: f_item_value,
710
- f_defect_level: f_defect_level,
711
- f_create_time: Util.toStandardTimeString()
712
- }
713
- if (f_is_defect && f_item_value) {
714
- items.f_is_defect = true
715
- if (checkResults.result !== '有隐患') {
716
- checkResults.result = '有隐患'
717
- }
718
- if (!this.checkResult.hasOwnProperty(items.f_item_name)) {
719
- //tag
720
- this.checkResult[items.f_item_name] = []
721
- }
722
-
723
- //tag
724
- this.checkResult[items.f_item_name].push(f_item_value)
725
-
726
- }
727
- //tag)
728
- //tag)
729
- if (!items.f_item_lists) {
730
- //tag
731
- items.f_item_lists = []
732
- if (JSON.stringify(items_list) != '{}') {
733
- //tag
734
- items.f_item_lists.push(items_list)
735
- }
736
- } else {
737
- // items.f_item_lists[0].f_item_value = f_item_value
738
- if (JSON.stringify(items_list) != '{}') {
739
- //tag
740
- //tag)
741
- //tag)
742
- //tag
743
- items.f_item_lists.push(items_list)
744
- }
745
- }
746
- }
747
- if (hasOther !== '' && otherValue !== null) {
748
- //tag
749
- this.checkResult[hasOther].push(otherValue)
750
- hasOther = ''
751
- otherValue = null
752
- }
753
- items.f_item_value = ''
754
- }
755
- //tag)
756
- this.f_devices.push(codata[device][item])
757
- }
758
- }
759
- }
760
- if (this.checkResult) {
761
- for (let key in this.checkResult) {
762
- if(typeof this.checkResult[key]=='function'){
763
- continue
764
- }
765
- // 上次安检结果数据组织
766
- //tag
767
- //tag
768
- let temp = {}
769
- temp[key] = this.checkResult[key].join(',')
770
- checkResults.data.push(temp)
771
- // this.newcheckResult[key] = this.checkResult[key]
772
- // checkResults.data.push(this.newcheckResult)
773
- //tag)
774
- // this.newcheckResult = {}
775
- }
776
- this.checkResult = {}
777
- }
778
- if (checkResults.data.length > 0) {
779
- let msg = ''
780
- for (let a = 0; a < checkResults.data.length; a++) {
781
- for (let datumKey in checkResults.data[a]) {
782
- msg += datumKey + ':' + checkResults.data[a][datumKey] + ';'
783
- }
784
- }
785
- this.data.f_defect_text = msg
786
- codata.f_defect_text = msg
787
- }
788
- codata.f_defect_content = JSON.stringify(checkResults)
789
- this.data.f_defect_content = JSON.stringify(checkResults)
790
- //tag
791
- return codata
792
- },
793
- uploadCheckPaper(){
794
- this.saveNoclick()
795
- this.closely(false) // 保存本地,不删除录音文件停止录音
796
- let errString = this.errorVerify()
797
- if (errString) {
798
- this.disableTimer()
799
- this.$showMessage(errString)
800
- return
801
- } else {
802
- this.$set('data.f_offsite_time', Util.toStandardTimeString())
803
- this.$set('data.f_upload_time', Util.toStandardTimeString())
804
- this.$set('data.f_upload_date', Util.toStandardTimeString())
805
- this.data.f_complete = '已完成'
806
- this.disableTimer()
807
- }
808
- this.onlySave = false
809
- this.assemblyCodata()
810
- let res = this.save()
811
- },
812
- //将数据组装提出
813
- assemblyCodata(){
814
- let codata = this.getAllDefect()
815
- console.log(`codata类型 开始组装codeta数据-->${typeof codata}`)
816
- console.log(`codata内容-->${JSON.stringify(codata)}`)
817
- for (let key in codata) {
818
- if (key.startsWith("device")) {
819
- console.log('this.data.' + key + JSON.stringify(codata[key]))
820
- codata[key] = []
821
- }
822
- }
823
- codata.f_devices = this.f_devices
824
- this.rowCodata=codata
825
- },
826
- save() {
827
- let codata = this.getAllDefect()
828
- for (let key in codata){
829
- if(key.startsWith("device")){
830
- codata[key] = []
831
- }
832
- }
833
- codata.f_devices = this.f_devices
834
- this.rowCodata = codata
835
- let param = {
836
- f_check_item_id: this.data.f_check_item_id,
837
- f_checker_id: this.data.f_checker_id,
838
- // row: codata
839
- row: this.rowCodata
840
- }
841
- //tag)
842
- let paramStr = JSON.stringify(param)
843
- // 多长截断一次
844
- let subLength = 800
845
- for (let i = 0; i < paramStr.length; i += subLength) {
846
- HostApp.param_cache(paramStr.substr(i, subLength))
847
- }
848
- HostApp.__this__ = this
849
- HostApp.syncLogic({
850
- // logic别名,key必须为logic
851
- 'logic': '上传安检信息',
852
- // 回调执行方法名,key必须为callback
853
- 'callback': 'javascript:HostApp.__this__.uploadCallBack()',
854
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
855
- // 执行回调方法传入key为backresult
856
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
857
- 'backresult': 1
858
- })
859
- },
860
- runSyncLogic(logic,callback,backresult){
861
- HostApp.runSyncLogic({
862
- 'logic': logic,
863
- 'callback': callback,
864
- 'backresult':backresult
865
- })
866
- },
867
- logicWithHint(logic,data,callback,backresult){
868
- HostApp.logicWithHint({
869
- 'logic': logic,
870
- 'callback': callback,
871
- 'data': data,
872
- 'backresult':backresult
873
- })
874
- },
875
- uploadCallBack(jo){
876
- let url = ""
877
- if(Vue.config.safecheck != undefined) {
878
- if (Vue.config.safecheck.ApproveConfig != undefined) {
879
- if (Vue.config.safecheck.ApproveConfig.weixinurl != undefined) {
880
- url = Vue.config.safecheck.ApproveConfig.weixinurl
881
- }
882
- }
883
- }
884
- if(jo.state == 'ok'){
885
- let res = JSON.parse(jo.result)
886
- //tag)
887
- //tag)
888
- if(res.code == 200){
889
- this.$set('data.f_paper_id', res.id)
890
- this.isStrat=false
891
- if(url != ""){
892
- this.$resetpost(`${url}`,{data:WxResult})
893
- }
894
- if(this.isToRepair){
895
- for (let device in this.data){
896
- if(device.startsWith("device")){
897
- this.data[device] = []
898
- if(res.data.length > 0){
899
- for(let i in res.data[0].f_devices){
900
- if(this.data[device].length > 0){
901
- if(this.data[device][0].f_device_type == res.data[0].f_devices[i].f_device_type){
902
- this.data[device].push(res.data[0].f_devices[i])
903
- res.data[0].f_devices.splice(i,1)
904
- }
905
- }else{
906
- this.data[device].push(res.data[0].f_devices[i])
907
- res.data[0].f_devices.splice(i,1)
908
- }
909
- }
910
- }
911
- }
912
- }
913
- this.todo()
914
- }else{
915
- this.$showMessage('上传成功!')
916
- //tag
917
- this.$dispatch('confirm')
918
- // this.$back()
919
- }
920
- }else if(res.code == 309){
921
- this.$showMessage('该安检单已作废!')
922
- //tag
923
- this.$dispatch('confirm')
924
- }else if(res.code == 710){
925
- this.$showMessage('上传照片失败,请检查网络是否正常!'+res.msg)
926
- return
927
- }else if(res.code == 711){
928
- this.$showMessage('该安检单已被管理员调整,请联系管理员!')
929
- return
930
- }else if(res.code == 712){
931
- this.$showMessage('网络异常,请重新上传,多次上传失败请联系管理员!')
932
- return
933
- }
934
- else{
935
- this.$showMessage('上传失败!')
936
- }
937
- }else {
938
- this.$showMessage('网络异常,上传失败!')
939
- }
940
- this.onlySave = true
941
- },
942
- safecheckToRepairCallBack(jo){
943
- //获取微信推送路径
944
- if(jo.state == 'ok'){
945
- let res = JSON.parse(jo.result)
946
- //tag)
947
- if(res.code == 200){
948
- //tag
949
- if(res.data.code == 200){
950
- this.$showMessage('上传并转维修成功!')
951
- }else{
952
- this.$showMessage('上传并转维修成功,回写安检单失败!')
953
- }
954
- this.$dispatch('confirm')
955
- // this.$back()
956
- }else{
957
- this.$showMessage('上传失败!')
958
- this.onlySave = true
959
- }
960
- }else{
961
- this.$showMessage('网络异常,上传失败!')
962
- this.onlySave = true
963
- }
964
- },
965
- todo(){
966
- let gen = getRepairParam(this)
967
- co(gen)
968
- },
969
- undo(){
970
- this.showCheckToRepair = !this.showCheckToRepair
971
- this.model.serviceacitivity[0].f_reciever = ''
972
- this.model.serviceacitivity[0].f_meetunit = ''
973
- this.model.f_repairtype = ''
974
- this.meading = '转站点'
975
- },
976
- disableTimer() {
977
- if(this.timer) {
978
- window.clearTimeout(this.timer)
979
- this.timer = null
980
- }
981
- },
982
- S4() {
983
- return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
984
- },
985
- extend(initalObj, finalObj) {
986
- var obj = finalObj || {};
987
- for (var i in initalObj) {
988
- var prop = initalObj[i];
989
-
990
- // 避免相互引用对象导致死循环,如initalObj.a = initalObj的情况
991
- if (prop === obj) {
992
- continue;
993
- }
994
-
995
- if (typeof prop === 'object') {
996
- if (obj[i]) {
997
- this.extend(obj[i], prop)
998
- } else {
999
- obj[i] = prop;
1000
- }
1001
- }
1002
- }
1003
- return obj;
1004
- },
1005
- init () {
1006
- this.data.isupdateplanitem = this.$appdata.getSingleValue('在线安检回更有计划') ? this.$appdata.getSingleValue('在线安检回更有计划') : 'false'
1007
- this.data.f_SafeToRepair_id = ''
1008
- this.data.ename = Vue.user.ename
1009
- this.data.f_outlets = Vue.user.f_parentname
1010
- this.data.f_meetunit = Vue.user.orgpathnames
1011
- this.data.orgpathstr = Vue.user.orgpathstr
1012
- this.data.f_check_item_id = ''
1013
- this.data.f_check_plan_id = this.f_plan_id
1014
- this.data.f_checker_id = Vue.user.id
1015
- this.data.f_checker_name = Vue.user.name
1016
- this.data.f_check_type = ''
1017
- this.data.f_safecheck_type = ''
1018
- this.data.f_subcompany = ''
1019
- this.data.f_approved = ''
1020
- this.data.f_repair_approved = ''
1021
- this.data.f_no_checkplan = '无计划安检'
1022
- this.data.f_approved = ''
1023
- this.data.f_filialeid = Vue.user.orgid
1024
- this.data.f_orgstr = ''
1025
- this.data.version = ''
1026
- this.data.f_check_version=''
1027
- this.$set('data.f_meters', '')
1028
- this.$set('data.f_userinfo_code', '')
1029
- this.$set('data.f_entry_status', '入户')
1030
- this.$set('data.f_safe_type', '已挂表未办卡安检')
1031
- this.$set('data.f_usegas', '未使用')
1032
- this.$set('data.f_state','')
1033
- this.$set('data.f_source', this.source?this.source:'安检')
1034
- this.$set('data.f_other_checker_name', '')
1035
- this.$set('data.f_user_name', '')
1036
- this.$set('data.f_onsite_time', Util.toStandardTimeString())
1037
- this.$set('data.f_rent_phone', '')
1038
- this.$set('data.f_user_phone', '')
1039
- this.$set('data.f_userinfoid', '')
1040
- this.$set('data.f_address', '')
1041
- this.$set('data.f_card_id', '')
1042
- this.$set('data.f_slice_area', '')
1043
- this.$set('data.f_recheck_id', '')
1044
- this.$set('rowCodata.f_recheck_id', '')
1045
- this.$set('data.f_street','')
1046
- this.$set('data.f_room', '')
1047
- this.$set('data.f_building', '')
1048
- this.$set('data.f_unit', '')
1049
- this.$set('data.f_floor', '')
1050
- this.$set('data.f_residential_area' , '')
1051
- this.$set('data.f_idnumber', '')
1052
- this.$set('data.f_comments', '')
1053
- this.$set('data.f_userproperties', '')
1054
- this.$set('data.f_client_evaluation', '满意')
1055
- this.$set('data.f_userfiles_id', '')
1056
- this.$set('data.f_valve_state', '')
1057
- this.$set('data.f_off_valve_reason', '')
1058
- this.$set('data.f_gas_guidelines', true)
1059
- this.$set('data.f_safety_warning', true)
1060
- this.$set('data.f_gas_manual', true)
1061
- this.$set('data.f_no_gas_device', false)
1062
- this.$set('data.f_close_valve', false)
1063
- this.$set('data.f_unload_battery', false)
1064
- this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
1065
- }
1066
- },
1067
- watch: {
1068
- 'row' () {
1069
- //tag
1070
- this.copy()
1071
- }
1072
- },
1073
- ready () {
1074
- HostApp.startOrStopAudioClip("----",'停止并删除录音')
1075
- //获取用户用气类型
1076
- let useType=this.$appdata.getParam('用户用气类型')
1077
- if(useType){
1078
- for (let i = 0; i < useType.length; i++) {
1079
- var obj={data:useType[i].value}
1080
- this.selecData.push(obj)
1081
- }
1082
- }
1083
- this.config['点火'].items['用户用气类型'].options = this.selecData
1084
- this.tab=[]
1085
- for (let i in this.config) {
1086
- let n = this.config[i].index
1087
- this.devices[n - 1] = {device: i, n: n, checkmust: this.config[i].checkmust}
1088
- this.$set('data.' + 'device' + n, [])
1089
- this.tabs[n-1] = {
1090
- header: i,
1091
- complete: 'safecheck-devices-temp',
1092
- class: 'repair-details-class',
1093
- number: n
1094
- }
1095
- }
1096
- this.tabs.push({
1097
- header: '拍照签名',complete:'paper-feedback-temp', class: 'outlay-class', props: null
1098
- })
1099
- this.faultshow.number = this.tabs.length
1100
- this.init()
1101
- this.$showMessage("为了保证服务质量,将会被全程录音!")
1102
- let resse = this.record()
1103
- this.tabSelect({
1104
- "header": "信息填写",
1105
- "complete": "safecheck-devices-temp",
1106
- "class": "repair-details-class",
1107
- "number": 1
1108
- },0)
1109
- },
1110
- events: {
1111
- 'tijiao': function () {
1112
- this.confirm()
1113
- }
1114
- }
1115
- }
1116
- </script>
1117
- <style lang="less">
1118
- @import "../../../../src/bootstrap/less/variables.less";
1119
- .noclickbut {
1120
- pointer-events: none;
1121
- }
1122
- .tab-befor-img (@url) {
1123
- content: '';
1124
- background-image: url("@{url}");
1125
- background-size: 20px;
1126
- display: inline-block;
1127
- margin-right: 8px;
1128
- margin-top: 0.3em;
1129
- height: 1.3em;
1130
- width: 1.3em;
1131
- vertical-align: -35%;
1132
- }
1133
-
1134
- @media screen and (min-width: 768px) {
1135
- .android-repair-order > div > ul a {
1136
- font-size: @font-size-h2;
1137
- margin: 0.3em 0;
1138
- }
1139
- }
1140
- .repair-details-class{
1141
- &::before {
1142
- .tab-befor-img("../../../assets/huneiweixiu1.png");
1143
- }
1144
- }
1145
- .repair-info-class {
1146
- &::before {
1147
- .tab-befor-img("../../../assets/baoxiuxinxi1.png");
1148
- }
1149
- }
1150
- .repair-user-info-class {
1151
- &::before {
1152
- .tab-befor-img("../../../assets/jibenxinxi1.png")
1153
- }
1154
- }
1155
-
1156
- .door-service-class {
1157
- &::before {
1158
- .tab-befor-img("../../../assets/huneiweixiu1.png")
1159
- }
1160
- }
1161
-
1162
- .pipeline-class {
1163
- &::before {
1164
- .tab-befor-img("../../../assets/guandao1.png")
1165
- }
1166
- }
1167
-
1168
- .device-service-class {
1169
- &::before {
1170
- .tab-befor-img("../../../assets/shebeiweixiu1.png")
1171
- }
1172
- }
1173
-
1174
- .trouble-removal-class {
1175
- &::before {
1176
- .tab-befor-img("../../../assets/shiguchuli.png")
1177
- }
1178
- }
1179
-
1180
- .cooking-utensils-class {
1181
- &::before {
1182
- .tab-befor-img("../../../assets/zaoju1.png")
1183
- }
1184
- }
1185
-
1186
- .outlay-class {
1187
- &::before {
1188
- .tab-befor-img("../../../assets/feiyong1.png")
1189
- }
1190
- }
1191
-
1192
- .fault-all-class {
1193
- &::before {
1194
- .tab-befor-img("../../../assets/guzhanghuizong1.png")
1195
- }
1196
- }
1197
- .photo-write-class {
1198
- &::before {
1199
- .tab-befor-img("../../../assets/zaoju.png")
1200
- }
1201
- }
1202
- .delay-apply-class {
1203
- &::before {
1204
- .tab-befor-img("../../../assets/yonghubaoxiu.png")
1205
- }
1206
- }
1207
-
1208
- .repair-back-class {
1209
- &::before {
1210
- .tab-befor-img("../../../assets/fanhui.png")
1211
- }
1212
- }
1213
- .butt2 {
1214
- display: inline;
1215
- float: right;
1216
- width: 10px;
1217
- text-align: center;
1218
- align-items:center;
1219
- position: absolute;
1220
- top:50%;
1221
-
1222
- left:90%;
1223
- transform: translate(-50%,-50%);
1224
- }
1225
- .linesty{
1226
- display: inline-block;
1227
- height:1px;
1228
- width:100%;
1229
- background:#d0d0d0;
1230
- overflow:hidden;
1231
- vertical-align: middle;
1232
- }
1233
- .spanboder{
1234
- border-bottom:2px solid #499edf;
1235
- padding-bottom: 8px
1236
- }
1237
- .app-botton {
1238
- position:fixed;
1239
- background: #87b2dd;
1240
- right:8px;
1241
- color: #FFF;
1242
- padding: 8px;
1243
- text-align: center;
1244
- font-size: 1.2em;
1245
- z-index: 10;
1246
- opacity:0.5;
1247
- bottom: 50px;
1248
- margin-top: -10px;
1249
- height: 40px;
1250
- }
1251
- .android-repair-order > div > ul a {
1252
- font-size: 12px;
1253
- color: #333333;
1254
- padding: 13px 16px;
1255
- }
1256
- </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">
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 flex-between" style="margin-top: 20px;">
33
+ <div class="col-xs-3 col-sm-3 col-md-3">
34
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="uploadCheckPaper">
35
+ 上传
36
+ </button>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </ul>
45
+ </div>
46
+ </div>
47
+ </template>
48
+
49
+ <script>
50
+ import Vue from 'vue'
51
+ import * as Util from '../../Util'
52
+ import { HttpResetClass } from 'vue-client'
53
+ import co from 'co'
54
+ import $ from "jquery";
55
+ let loadParamGem = async function (self) {
56
+ await self.$LoadParams.loadParam()
57
+ }
58
+
59
+ export default {
60
+ title: '安检单',
61
+ props: ['f_plan_id', 'item', 'role','parentPage','source'],
62
+ // props: ['f_plan_id', 'role'],
63
+ data() {
64
+ return {
65
+ data: {
66
+ f_noanswer_path:'',
67
+ f_nongasuser_path:'',
68
+ f_devices: [],
69
+ f_defect_content:'',
70
+ f_recording1_path:'',
71
+ f_visit_number:'',
72
+ f_remark:''
73
+ },
74
+ imgsnum:this.$appdata.getSingleValue('安检总体照片数量') ? this.$appdata.getSingleValue('安检总体照片数量'):1, // 安检整体照片默认必须拍1张
75
+ updateuserphone:false, //安检时是否更新用户电话
76
+ updatemetermodel:false, //安检时是否更新表型号
77
+ updatemeternumber:false, //安检时是否更新表号
78
+ beforephone:'',
79
+ isUpload:false,
80
+ show_torepair: false,
81
+ onlySave:true, //判断保存还是保存并上传
82
+ livedispose:'',
83
+ refuseinspection:'', // 拒捡拍照是否提示
84
+ notencountered:'', // 到访不遇拍照是否提示
85
+ startClick:false, //开始安检按钮是否可点击
86
+ isStrat: false, //是否开始安检
87
+ checkResult:{},//查询结果
88
+ newcheckResult:{},
89
+ repairDefect : {
90
+ result: '正常',
91
+ data: []
92
+ },
93
+ rowCodata:{},
94
+ repairers: [],
95
+ timer: null,
96
+ showModal: false,
97
+ showModal2:false,
98
+ pic_to_be_viewed: '',
99
+ showBack:true,
100
+ devices: [],
101
+ f_devices : [],
102
+ isToRepair:false,
103
+ clickBack:true, //是否点击返回按钮
104
+ isSafeCheckToRepair:false,//是否转维修
105
+ Url:this.$androidUtil.getProxyUrl(),
106
+ detail:{},
107
+ defectDevice:{},
108
+ user:{},
109
+ is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
110
+ dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'},{label: '派发给站点', value: '派发给站点'}],
111
+ selectData:{
112
+ dispatchType:'派发给维修员',
113
+ f_repairman:'',
114
+ f_remarks:'',
115
+ f_repairtype:'整改'
116
+ },
117
+ model: { //转维修数据
118
+ // 一次派单
119
+ serviceacitivity: [{
120
+ f_service_acitivity_type: '派单'
121
+ }],
122
+ f_source:'安检',
123
+ f_service_id: '',
124
+ f_contact_phone: '',
125
+ f_meetunit: '',
126
+ f_phone: '',
127
+ f_user_name: '',
128
+ f_address: '',
129
+ f_repair_date: Util.toStandardTimeString(),
130
+ f_card_id: '',
131
+ // f_department: '', 站点选择
132
+ f_reciever:'',
133
+ f_remarks: '',
134
+ f_user_type: '',
135
+ f_area: '',
136
+ f_unit_name:'',
137
+ f_street: '',
138
+ f_residential_area: '',
139
+ f_building: '',
140
+ f_unit: '',
141
+ f_floor: '',
142
+ f_room: '',
143
+ aState: null,
144
+ f_repairtype: '',
145
+ f_repairitems:{},
146
+ },
147
+ repairitems:[],
148
+ selecData:[],
149
+ meading:'转站点',
150
+ config: {
151
+ "信息填写":{
152
+ "checkmust":true,
153
+ "index":1,
154
+ "items":{
155
+ "地址信息":{"index":1,"type":"string","readonly":false,"checkmust": true},
156
+ "入户状态":{"index":2,"multiple":false,"type":"selector","options":[{"data":"入户","isdefault":true},{"data":"到访不遇"},{"data":"拒检"},{"data":"入户未点"}],"checkmust":true},
157
+ "到访不遇/拒检照片":{"index":3,"type":"picture","readonly":false,"checkmust": false,"isshow":false},
158
+ "气表品牌":{"index":4,"type":"string","readonly":false,"checkmust": true},
159
+ "表号":{"index":5,"type":"string","readonly":false,"checkmust": true},
160
+ "用户姓名":{"index":6,"type":"string","readonly":false,"checkmust": false},
161
+ "用户电话":{"index":7,"type":"string","readonly":false,"checkmust": false},
162
+ "表具照片":{"index":8,"type":"picture","readonly":false,"checkmust": true},
163
+ "安装日期":{"index":9,"type":"date","readonly":false,"checkmust": true},
164
+ "左右表":{"index":10,"multiple":false,"type":"selector","options":[{"data":"左表"},{"data":"右表"}],"checkmust":true},
165
+ "检验时间":{"index":11,"type":"date","readonly":false,"checkmust": true}
166
+ }
167
+ },
168
+ "其他隐患":{
169
+ "checkmust":true,
170
+ "index":2,
171
+ "items":{
172
+ "有无其他隐患":{"index":1,"multiple":false,"type":"radio","options":[{"data":"无隐患","isdefault":true},{"data":"有其他隐患","isdefault":false,"isdefect":true}],"checkmust":true}
173
+ }
174
+ },
175
+ "点火":{
176
+ "checkmust":true,
177
+ "index":3,
178
+ "items":{
179
+ "检查类型":{"index":1,"multiple":false,"type":"selector","options":[{"data":"普通检查","isdefault":true},{"data":"点火检查"}],"checkmust":true},
180
+ "点火类型":{"index":2,"multiple":false,"type":"selector","options":[{"data":"正常点火"},{"data":"点火条件不符未点"}],"checkmust":false,"isshow":false},
181
+ "证件号码":{"index":3,"type":"string","checkmust":false,"isshow":false},
182
+ "用户用气类型":{"index":4,"multiple":false,"type":"selector","options":this.selecData,"checkmust":false,"isshow":false},
183
+ }
184
+ }
185
+ },
186
+ isneedDate:'',
187
+ routeShow:true,
188
+ number:0,
189
+ shupingshow:false,
190
+ pipeline: {},
191
+ details: [],
192
+ ids: '',
193
+ savevalid: {
194
+ uservalid: false,
195
+ doorvalid: true,
196
+ changetable: false
197
+ },
198
+ doordetails: {},
199
+ devicedetails: {},
200
+ cookdetails: {},
201
+ componentName: 'safecheck-devices-temp',
202
+ header:'客户信息',
203
+ tabs: [],
204
+ faultshow:{
205
+ number : 8
206
+ } // 控制 故障汇总 在 菜单里显示与否,
207
+ }
208
+ },
209
+ computed: {
210
+ actionEnabled: {
211
+ get() {
212
+ return this.role == 'inspect'
213
+ }
214
+ }
215
+ },
216
+ methods: {
217
+ showmod(){
218
+ // this.saveNoclick()
219
+ let errString = this.errorVerify()
220
+ if (errString) {
221
+ console.log(errString)
222
+ console.log('Vue.android',Vue.android)
223
+ console.log('this.isUpload',this.isUpload)
224
+ if (Vue.android){
225
+ this.$showMessage(errString)
226
+ }
227
+ return
228
+ }
229
+ //清空转维修列表重新进行数据组织
230
+ this.repairDefect = {
231
+ result: '正常',
232
+ data: []
233
+ }
234
+ this.data.f_complete = '已完成'
235
+ this.$set('data.f_offsite_time', Util.toStandardTimeString())
236
+ this.assemblyCodata()
237
+ if(this.repairDefect.result=='正常'){
238
+ this.$showMessage("未发现有选择需要转维修的隐患,请检查填写的数据。如需转维修请在处理方式中选择 '转维修' !")
239
+ return
240
+ }
241
+ console.log("准备保存!")
242
+ this.disableTimer()
243
+ this.getEmp()
244
+ this.showModal2=true
245
+ },
246
+ cancel1(){
247
+ this.showModal2=false
248
+ this.selectData={
249
+ dispatchType:'派发给维修员',
250
+ f_repairman:'',
251
+ f_remarks:'',
252
+ f_repairtype:'整改'
253
+ }
254
+ },
255
+ getSiteRes(obj) {
256
+ console.log('siteRes ---> ')
257
+ console.log(obj)
258
+ if(obj.resids[0]){
259
+ this.selectData.f_meetunit = obj.res.join('.')
260
+ this.selectData.f_reciever = obj.resids.join('.')
261
+ this.selectData.f_outlets = obj.res[obj.res.length - 1]
262
+ }else {
263
+ this.selectData.f_meetunit = ''
264
+ this.selectData.f_reciever = ''
265
+ this.selectData.f_outlets = ''
266
+ }
267
+ },
268
+ rectification(){
269
+ if(this.selectData.dispatchType){
270
+ if(this.selectData.dispatchType=='派发给站点'){
271
+ if(!this.selectData.f_reciever){
272
+ this.$showMessage('请选择部门!')
273
+ return
274
+ }
275
+ }else{
276
+ if(!this.selectData.f_repairman){
277
+ this.$showMessage('请选择维修员!')
278
+ return
279
+ }
280
+ }
281
+ }else {
282
+ this.$showMessage('请选择派发类型!')
283
+ return
284
+ }
285
+ /*if(!this.selectData.f_repairtype){
286
+ this.$showMessage('请选择报修类型!')
287
+ return
288
+ }*/
289
+ //关闭录音
290
+ this.closely(false) // 保存本地,不删除录音文件暂停录音
291
+ let act={}
292
+ let toRepair=''
293
+ if(this.selectData.dispatchType=='派发给站点'){
294
+ act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
295
+ toRepair=null
296
+ }else{
297
+ console.log('派发给维修员---------'+this.selectData.f_repairman)
298
+ act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
299
+ toRepair='一级派单'
300
+ }
301
+ let repData={
302
+ toRepair:toRepair,
303
+ activity:act,
304
+ deps:Vue.user.deps,
305
+ depids:Vue.user.depids,
306
+ f_remarks:this.selectData.f_remarks,
307
+ f_repairtype:this.selectData.f_repairtype,
308
+ f_attendant: Vue.user.name,
309
+ loginUser:{name:Vue.user.name,ename:Vue.user.id,id:Vue.user.id},
310
+ }
311
+ this.rowCodata.istoRepair='转维修'
312
+ this.rowCodata.repData=repData
313
+ console.log("当前组装好的转维修数据--"+JSON.stringify(repData))
314
+ this.onlySave = false
315
+ this.save()
316
+ },
317
+ // 获取维修员
318
+ getEmp() {
319
+ this.repairers=[]
320
+ let per = {source: 'this.getRights().where(row.getType()==$user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${Vue.user.id}`}
321
+ let http = new HttpResetClass()
322
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: per}, {resolveMsg: null, rejectMsg: null}).then((res) => {
323
+ res.data.forEach((user)=>{
324
+ this.repairers.push({label:user.name, value: user.name})
325
+ })
326
+ })
327
+ },
328
+ closely(isdelete){
329
+ try {
330
+ var startOrStopAudioClipStr;
331
+ if (isdelete===true) {
332
+ //tag
333
+ startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止并删除录音') //停止并删除录音
334
+ }else {
335
+ //tag
336
+ startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止录音') //停止录音
337
+ }
338
+ if (startOrStopAudioClipStr.code == 200) {
339
+ //tag
340
+ return true;
341
+ }else {
342
+ return false;
343
+ }
344
+ } catch (e) {
345
+ console.error("关闭录音方法异常")
346
+ console.error(e)
347
+ return false;
348
+ }
349
+ },
350
+ // 录音方法
351
+ record() {
352
+ //tag
353
+ let fileName
354
+ if (!this.data.f_recording1_path) {
355
+ fileName = Util.guid() + '.amr'
356
+ } else {
357
+ fileName = Util.getFileName(this.data.f_recording1_path)
358
+ }
359
+ //HostApp.__this__ = this
360
+ /*调用无限制录音模块*/
361
+ let startOrStopState = HostApp.startOrStopAudioClip(fileName,"开始录音")
362
+ //tag
363
+ if (startOrStopState.code == 200) {
364
+ this.data.f_recording1_path = "file:///storage/emulated/0/safecheck/" + fileName
365
+ //tag
366
+ return true;
367
+ }else {
368
+ return false;
369
+ }
370
+
371
+ },
372
+ saveNoclick() {
373
+ // 禁用点击事件
374
+ $("#savebut").addClass("noclickbut");
375
+ //tag
376
+
377
+ // 5秒后启用点击事件
378
+ setTimeout(function(){
379
+ $("#savebut").removeClass("noclickbut");
380
+ },5000);
381
+ },
382
+ timeSet(val){
383
+ if (!val){
384
+ return
385
+ }
386
+ let time =new Date(val).getTime()
387
+ let time2=new Date().getTime()
388
+ if (time2>time) {
389
+ return true
390
+ }
391
+ },
392
+ imgback(val,isheader){
393
+ if(val && this.routeShow && isheader){
394
+ return require('../../../assets/xiangxia1.png')
395
+ }else{
396
+ return require('../../../assets/xiangyou1.png')
397
+ }
398
+ },
399
+ changediv(val){
400
+ //tag
401
+ return val
402
+ },
403
+ // 选择tab
404
+ tabSelect (item,number) {
405
+ this.header = item.header
406
+ if(this.number == number && !this.routeShow ){
407
+ this.routeShow = true
408
+ }else if(this.number == number && this.routeShow){
409
+ this.routeShow = false
410
+ }else if(this.number != item.complete){
411
+ this.routeShow = true
412
+ }
413
+ this.number = number
414
+ this.componentName = item.complete
415
+ if(item.complete == 'safecheck-devices-temp'){
416
+ if(this.data['device'+item.number].length == 0){
417
+ this.data['device' + item.number].push({})
418
+ }
419
+ let idx=this.data['device' + item.number].length - 1
420
+ let itemprops = {
421
+ config:this.config,
422
+ device:this.devices[item.number-1],
423
+ idx:idx,
424
+ role:'inspect'
425
+ }
426
+ if(this.routeShow){
427
+ this.$goto(item.complete, itemprops, 'repair')
428
+ }
429
+ }else{
430
+ if(this.routeShow){
431
+ this.$goto(item.complete, {userinfo:this.data}, 'repair')
432
+ }
433
+ }
434
+ this.shupingshow = true
435
+ },
436
+ sortDetails(){
437
+ for (let i = 0; i < this.details.length; i++) {
438
+ if (this.details[i].details.length) {
439
+ for (let j = 0; j < this.details[i].details.length; j++) {
440
+ if (this.details[i].details[j].f_type === 'a') {
441
+ this.doordetails = {details: this.details[i].details}
442
+ break
443
+ }
444
+ if (this.details[i].details[j].f_type === 'b') {
445
+ this.devicedetails = {details: this.details[i].details}
446
+ break
447
+ }
448
+ if (this.details[i].details[j].f_type === 'c') {
449
+ this.cookdetails = {details: this.details[i].details}
450
+ break
451
+ }
452
+ }
453
+ }
454
+ }
455
+ },
456
+ // 复制数据
457
+ back () {
458
+ let _this = this
459
+ if(this.issee){
460
+ _this.$back()
461
+ return
462
+ }
463
+ this.$showMessage('所填写内容将不可恢复!', ['confirm', 'cancel']).then((res) => {
464
+ if (res === 'confirm') {
465
+ this.closely()
466
+ _this.$back()
467
+ }
468
+ })
469
+ },
470
+ confirm(){
471
+ this.$dispatch('confirm')
472
+ },
473
+ tick() {
474
+ this.timer = null
475
+ this.data.f_offsite_time = Util.toStandardTimeString()
476
+ this.timer = window.setTimeout(this.tick, 1000)
477
+ },
478
+ getRepairState() {
479
+ let repaired = true
480
+ this.data.f_defects.forEach((defect) => {
481
+ repaired = repaired & (defect.f_ratification == '已处理')
482
+ })
483
+ return repaired
484
+ },
485
+ verifyRepairDefects() {
486
+ this.data.f_repair_date = Util.toStandardTimeString()
487
+ this.data.f_repaired = this.getRepairState() ? '已修' : '在修'
488
+ },
489
+ errorVerify() {
490
+ if(this.data.f_entry_status){
491
+ if(['到访不遇', '拒检'].includes(this.data.f_entry_status)) {
492
+ if(!this.data.f_noanswer_path && !this.data.f_nongasuser_path){
493
+ return "到访不遇/拒检照片未拍摄"
494
+ }
495
+ return
496
+ }
497
+ }else{
498
+ return "入户状态未选择"
499
+ }
500
+ for (let dev in this.config) {
501
+ if (this.config[dev].checkmust == true) {
502
+ let error = true
503
+ for(let device in this.data) {
504
+ if (device.startsWith("device")) {
505
+ for (let item in this.data[device]) {
506
+ if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
507
+ error = false
508
+ }
509
+ }
510
+ }
511
+ }
512
+ if (error) {
513
+ return "请检查" + dev
514
+ }
515
+ }
516
+ }
517
+
518
+ for (let dev in this.config) {
519
+ for(let device in this.data) {
520
+ if (device.startsWith("device")) {
521
+ for (let item in this.data[device]) {
522
+ //检查每一条安检结果
523
+ if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
524
+ for (let i in this.data[device][item].f_items) {
525
+ for (let it in this.config[dev].items) {
526
+ if (it == this.data[device][item].f_items[i].f_item_name) {
527
+ let check=false
528
+ if (!this.data[device][item].f_items[i].f_item_value){
529
+ check=true
530
+ }else if (Array.isArray(this.data[device][item].f_items[i].f_item_value)){
531
+ if (this.data[device][item].f_items[i].f_item_value.length==0){
532
+ check=true
533
+ }
534
+ }
535
+
536
+ if(this.config[dev].items[it].type=='picture' && this.config[dev].items[it].checkmust == true && !this.data[device][item].f_items[i].f_path){
537
+ return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
538
+ }
539
+ if (this.config[dev].items[it].type !='picture' && this.config[dev].items[it].checkmust == true && check) {
540
+ return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
541
+ }
542
+ }
543
+ }
544
+ //检查安检下拉结果
545
+ if (this.data[device][item].f_items[i].type == 'selector' || this.data[device][item].f_items[i].type == 'radio') {
546
+ if (this.data[device][item].f_items[i].f_is_defect == true && this.data[device][item].f_items[i].f_path == Vue.nopic) {
547
+ 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 + "选中必须拍照"
548
+ }
549
+ }
550
+ }
551
+ }
552
+ }
553
+ }
554
+ }
555
+ }
556
+ },
557
+ getAllDefect() {
558
+ let checkResults = {
559
+ result: '正常',
560
+ data: []
561
+ }
562
+ let value = ''
563
+ let codata = JSON.parse(JSON.stringify(this.data))
564
+ codata.f_devices = []
565
+ this.f_devices = []
566
+ for (let device in codata) {
567
+ let f_device_type
568
+ if (device.startsWith("device")) {
569
+ //tag)
570
+ let hasOther = ''
571
+ let otherValue = null
572
+ for (let item in codata[device]) {
573
+ if(typeof codata[device][item]=='function'){
574
+ continue
575
+ }
576
+ codata[device][item].f_create_time = Util.toStandardTimeString()
577
+ if (codata[device].length > 1) {
578
+ let j = Number.parseInt(item) + 1
579
+ f_device_type = `${codata[device][item].f_device_type}${j}`
580
+ } else {
581
+ f_device_type = codata[device][item].f_device_type
582
+ }
583
+ //tag
584
+ //tag
585
+ //tag)
586
+ //tag)
587
+ if(item == 'sum' || item == 'removeEmpty'){
588
+ continue
589
+ }
590
+ for (let i = 0; i < codata[device][item].f_items.length ; i++) {
591
+ //tag
592
+ if(i == 'sum' || i == 'removeEmpty'){
593
+ continue
594
+ }
595
+ //tag)
596
+ var items = codata[device][item].f_items[i]
597
+ items.f_create_time = Util.toStandardTimeString()
598
+ //tag)
599
+ items.f_item_lists = []
600
+ //tag)
601
+ // //tag)
602
+ // //tag} name => ${JSON.stringify(items.f_item_name)} value => ${JSON.stringify(items.f_item_value)}`)
603
+ // console.log(`f_is_defect => ${this.config[codata[device][item]
604
+ // .f_device_type]
605
+ // .items[items.f_item_name]
606
+ // .options
607
+ // .find((option)=>option.data === items.f_item_value)
608
+ // .map((option)=>option.f_is_defect)}`)
609
+ // if (items.f_is_defect && (items.f_is_defect == true || items.f_is_defect == 'true')) {
610
+ // //tag
611
+ // checkResults.result = '有隐患'
612
+ // //tag)
613
+ // //tag)
614
+ // // this.$set('checkResult.' + items.f_item_name, items.f_item_value)
615
+ // this.checkResult[items.f_item_name] = items.f_item_value
616
+ // //tag)
617
+ // // this.$set('checkResultsss.' + items.f_item_name, `${f_device_type}${items.f_item_value}`)
618
+ // // //tag)
619
+ // }
620
+ if (items.type == 'selector') {
621
+ items.selected = []
622
+ } else if (items.type == 'inputSelector') {
623
+ items.selected = ''
624
+ }
625
+ //遍历配置项 将所选隐患项的配置信息放入保存的数据中
626
+ let f_is_defect //是否是隐患
627
+ let f_defect_level //是否是隐患
628
+ let f_item_name = items.f_item_name
629
+ let f_item_value
630
+ let f_is_eliminate //隐患是否消除
631
+ let f_meternumber = ''
632
+ let f_user_defects = [] // 用户所有隐患
633
+ //tag
634
+ //tag
635
+ if (items.type == 'selector' || items.type == 'checkbox' || items.type == 'radio') {
636
+ for (let i in items.f_item_value) {
637
+ if(typeof items.f_item_value[i]=='function'){
638
+ continue
639
+ }
640
+ let configItems = this.config[codata[device][item].f_device_type].items[f_item_name]
641
+ //tag)
642
+ for (let k in configItems.options) {
643
+ if(typeof configItems.options[k]=='function'){
644
+ continue
645
+ }
646
+ //tag)
647
+ if (items.f_item_value[i] === configItems.options[k].data) {
648
+
649
+ f_is_defect = configItems.options[k].isdefect
650
+ f_item_value = items.f_item_value[i]
651
+ f_defect_level = configItems.options[k].level
652
+
653
+ //tag
654
+ //tag
655
+ //tag
656
+
657
+ if (f_is_defect) {
658
+ if (checkResults.result !== '有隐患') {
659
+ checkResults.result = '有隐患'
660
+ }
661
+ console.log('items'+items)
662
+ if(items.f_deal_dispose=='报修'){
663
+ console.log("检测到需要转维修++++++++++++")
664
+ this.repairDefect.result='未处理'
665
+ this.repairDefect.data.push(`${f_item_name} : ${f_item_value}`)
666
+ }
667
+ if (!this.checkResult.hasOwnProperty(f_device_type+'-'+f_item_name)) {
668
+ //tag
669
+ this.checkResult[f_device_type+'-'+f_item_name] = []
670
+ }
671
+
672
+ //tag
673
+ this.checkResult[f_device_type+'-'+f_item_name].push(f_item_value)
674
+
675
+ }
676
+
677
+ let items_list = {
678
+ f_is_defect: f_is_defect,
679
+ f_item_value: f_item_value,
680
+ f_defect_level: f_defect_level,
681
+ f_is_eliminate: null,
682
+ f_create_time: Util.toStandardTimeString()
683
+ }
684
+ if (!items.f_item_lists) {
685
+ //tag
686
+ items.f_item_lists = []
687
+ //tag)
688
+ if (JSON.stringify(items_list) !== '{}') {
689
+ //tag
690
+ items.f_item_lists.push(items_list)
691
+ }
692
+ } else {
693
+ //tag)
694
+ if (JSON.stringify(items_list) !== '{}') {
695
+ //tag
696
+ items.f_item_lists.push(items_list)
697
+ }
698
+ }
699
+ }
700
+ }
701
+ }
702
+ } else {
703
+ let configItems = this.config[codata[device][item].f_device_type].items[items.f_item_name]
704
+ f_is_defect = items.f_is_defect
705
+ f_defect_level = items.level
706
+ f_item_value = items.f_item_value
707
+ let items_list = {
708
+ f_is_defect: f_is_defect,
709
+ f_item_value: f_item_value,
710
+ f_defect_level: f_defect_level,
711
+ f_create_time: Util.toStandardTimeString()
712
+ }
713
+ if (f_is_defect && f_item_value) {
714
+ items.f_is_defect = true
715
+ if (checkResults.result !== '有隐患') {
716
+ checkResults.result = '有隐患'
717
+ }
718
+ if (!this.checkResult.hasOwnProperty(items.f_item_name)) {
719
+ //tag
720
+ this.checkResult[items.f_item_name] = []
721
+ }
722
+
723
+ //tag
724
+ this.checkResult[items.f_item_name].push(f_item_value)
725
+
726
+ }
727
+ //tag)
728
+ //tag)
729
+ if (!items.f_item_lists) {
730
+ //tag
731
+ items.f_item_lists = []
732
+ if (JSON.stringify(items_list) != '{}') {
733
+ //tag
734
+ items.f_item_lists.push(items_list)
735
+ }
736
+ } else {
737
+ // items.f_item_lists[0].f_item_value = f_item_value
738
+ if (JSON.stringify(items_list) != '{}') {
739
+ //tag
740
+ //tag)
741
+ //tag)
742
+ //tag
743
+ items.f_item_lists.push(items_list)
744
+ }
745
+ }
746
+ }
747
+ if (hasOther !== '' && otherValue !== null) {
748
+ //tag
749
+ this.checkResult[hasOther].push(otherValue)
750
+ hasOther = ''
751
+ otherValue = null
752
+ }
753
+ items.f_item_value = ''
754
+ }
755
+ //tag)
756
+ this.f_devices.push(codata[device][item])
757
+ }
758
+ }
759
+ }
760
+ if (this.checkResult) {
761
+ for (let key in this.checkResult) {
762
+ if(typeof this.checkResult[key]=='function'){
763
+ continue
764
+ }
765
+ // 上次安检结果数据组织
766
+ //tag
767
+ //tag
768
+ let temp = {}
769
+ temp[key] = this.checkResult[key].join(',')
770
+ checkResults.data.push(temp)
771
+ // this.newcheckResult[key] = this.checkResult[key]
772
+ // checkResults.data.push(this.newcheckResult)
773
+ //tag)
774
+ // this.newcheckResult = {}
775
+ }
776
+ this.checkResult = {}
777
+ }
778
+ if (checkResults.data.length > 0) {
779
+ let msg = ''
780
+ for (let a = 0; a < checkResults.data.length; a++) {
781
+ for (let datumKey in checkResults.data[a]) {
782
+ msg += datumKey + ':' + checkResults.data[a][datumKey] + ';'
783
+ }
784
+ }
785
+ this.data.f_defect_text = msg
786
+ codata.f_defect_text = msg
787
+ }
788
+ codata.f_defect_content = JSON.stringify(checkResults)
789
+ this.data.f_defect_content = JSON.stringify(checkResults)
790
+ //tag
791
+ return codata
792
+ },
793
+ uploadCheckPaper(){
794
+ this.saveNoclick()
795
+ this.closely(false) // 保存本地,不删除录音文件停止录音
796
+ let errString = this.errorVerify()
797
+ if (errString) {
798
+ this.disableTimer()
799
+ this.$showMessage(errString)
800
+ return
801
+ } else {
802
+ this.$set('data.f_offsite_time', Util.toStandardTimeString())
803
+ this.$set('data.f_upload_time', Util.toStandardTimeString())
804
+ this.$set('data.f_upload_date', Util.toStandardTimeString())
805
+ this.data.f_complete = '已完成'
806
+ this.disableTimer()
807
+ }
808
+ this.onlySave = false
809
+ this.assemblyCodata()
810
+ let res = this.save()
811
+ },
812
+ //将数据组装提出
813
+ assemblyCodata(){
814
+ let codata = this.getAllDefect()
815
+ console.log(`codata类型 开始组装codeta数据-->${typeof codata}`)
816
+ console.log(`codata内容-->${JSON.stringify(codata)}`)
817
+ for (let key in codata) {
818
+ if (key.startsWith("device")) {
819
+ console.log('this.data.' + key + JSON.stringify(codata[key]))
820
+ codata[key] = []
821
+ }
822
+ }
823
+ codata.f_devices = this.f_devices
824
+ this.rowCodata=codata
825
+ },
826
+ save() {
827
+ let codata = this.getAllDefect()
828
+ for (let key in codata){
829
+ if(key.startsWith("device")){
830
+ codata[key] = []
831
+ }
832
+ }
833
+ codata.f_devices = this.f_devices
834
+ this.rowCodata = codata
835
+ let param = {
836
+ f_check_item_id: this.data.f_check_item_id,
837
+ f_checker_id: this.data.f_checker_id,
838
+ // row: codata
839
+ row: this.rowCodata
840
+ }
841
+ //tag)
842
+ let paramStr = JSON.stringify(param)
843
+ // 多长截断一次
844
+ let subLength = 800
845
+ for (let i = 0; i < paramStr.length; i += subLength) {
846
+ HostApp.param_cache(paramStr.substr(i, subLength))
847
+ }
848
+ HostApp.__this__ = this
849
+ HostApp.syncLogic({
850
+ // logic别名,key必须为logic
851
+ 'logic': '上传安检信息',
852
+ // 回调执行方法名,key必须为callback
853
+ 'callback': 'javascript:HostApp.__this__.uploadCallBack()',
854
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
855
+ // 执行回调方法传入key为backresult
856
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
857
+ 'backresult': 1
858
+ })
859
+ },
860
+ runSyncLogic(logic,callback,backresult){
861
+ HostApp.runSyncLogic({
862
+ 'logic': logic,
863
+ 'callback': callback,
864
+ 'backresult':backresult
865
+ })
866
+ },
867
+ logicWithHint(logic,data,callback,backresult){
868
+ HostApp.logicWithHint({
869
+ 'logic': logic,
870
+ 'callback': callback,
871
+ 'data': data,
872
+ 'backresult':backresult
873
+ })
874
+ },
875
+ uploadCallBack(jo){
876
+ let url = ""
877
+ if(Vue.config.safecheck != undefined) {
878
+ if (Vue.config.safecheck.ApproveConfig != undefined) {
879
+ if (Vue.config.safecheck.ApproveConfig.weixinurl != undefined) {
880
+ url = Vue.config.safecheck.ApproveConfig.weixinurl
881
+ }
882
+ }
883
+ }
884
+ if(jo.state == 'ok'){
885
+ let res = JSON.parse(jo.result)
886
+ //tag)
887
+ //tag)
888
+ if(res.code == 200){
889
+ this.$set('data.f_paper_id', res.id)
890
+ this.isStrat=false
891
+ if(url != ""){
892
+ this.$resetpost(`${url}`,{data:WxResult})
893
+ }
894
+ if(this.isToRepair){
895
+ for (let device in this.data){
896
+ if(device.startsWith("device")){
897
+ this.data[device] = []
898
+ if(res.data.length > 0){
899
+ for(let i in res.data[0].f_devices){
900
+ if(this.data[device].length > 0){
901
+ if(this.data[device][0].f_device_type == res.data[0].f_devices[i].f_device_type){
902
+ this.data[device].push(res.data[0].f_devices[i])
903
+ res.data[0].f_devices.splice(i,1)
904
+ }
905
+ }else{
906
+ this.data[device].push(res.data[0].f_devices[i])
907
+ res.data[0].f_devices.splice(i,1)
908
+ }
909
+ }
910
+ }
911
+ }
912
+ }
913
+ this.todo()
914
+ }else{
915
+ this.$showMessage('上传成功!')
916
+ //tag
917
+ this.$dispatch('confirm')
918
+ // this.$back()
919
+ }
920
+ }else if(res.code == 309){
921
+ this.$showMessage('该安检单已作废!')
922
+ //tag
923
+ this.$dispatch('confirm')
924
+ }else if(res.code == 710){
925
+ this.$showMessage('上传照片失败,请检查网络是否正常!'+res.msg)
926
+ return
927
+ }else if(res.code == 711){
928
+ this.$showMessage('该安检单已被管理员调整,请联系管理员!')
929
+ return
930
+ }else if(res.code == 712){
931
+ this.$showMessage('网络异常,请重新上传,多次上传失败请联系管理员!')
932
+ return
933
+ }
934
+ else{
935
+ this.$showMessage('上传失败!')
936
+ }
937
+ }else {
938
+ this.$showMessage('网络异常,上传失败!')
939
+ }
940
+ this.onlySave = true
941
+ },
942
+ safecheckToRepairCallBack(jo){
943
+ //获取微信推送路径
944
+ if(jo.state == 'ok'){
945
+ let res = JSON.parse(jo.result)
946
+ //tag)
947
+ if(res.code == 200){
948
+ //tag
949
+ if(res.data.code == 200){
950
+ this.$showMessage('上传并转维修成功!')
951
+ }else{
952
+ this.$showMessage('上传并转维修成功,回写安检单失败!')
953
+ }
954
+ this.$dispatch('confirm')
955
+ // this.$back()
956
+ }else{
957
+ this.$showMessage('上传失败!')
958
+ this.onlySave = true
959
+ }
960
+ }else{
961
+ this.$showMessage('网络异常,上传失败!')
962
+ this.onlySave = true
963
+ }
964
+ },
965
+ todo(){
966
+ let gen = getRepairParam(this)
967
+ co(gen)
968
+ },
969
+ undo(){
970
+ this.showCheckToRepair = !this.showCheckToRepair
971
+ this.model.serviceacitivity[0].f_reciever = ''
972
+ this.model.serviceacitivity[0].f_meetunit = ''
973
+ this.model.f_repairtype = ''
974
+ this.meading = '转站点'
975
+ },
976
+ disableTimer() {
977
+ if(this.timer) {
978
+ window.clearTimeout(this.timer)
979
+ this.timer = null
980
+ }
981
+ },
982
+ S4() {
983
+ return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
984
+ },
985
+ extend(initalObj, finalObj) {
986
+ var obj = finalObj || {};
987
+ for (var i in initalObj) {
988
+ var prop = initalObj[i];
989
+
990
+ // 避免相互引用对象导致死循环,如initalObj.a = initalObj的情况
991
+ if (prop === obj) {
992
+ continue;
993
+ }
994
+
995
+ if (typeof prop === 'object') {
996
+ if (obj[i]) {
997
+ this.extend(obj[i], prop)
998
+ } else {
999
+ obj[i] = prop;
1000
+ }
1001
+ }
1002
+ }
1003
+ return obj;
1004
+ },
1005
+ init () {
1006
+ this.data.isupdateplanitem = this.$appdata.getSingleValue('在线安检回更有计划') ? this.$appdata.getSingleValue('在线安检回更有计划') : 'false'
1007
+ this.data.f_SafeToRepair_id = ''
1008
+ this.data.ename = Vue.user.ename
1009
+ this.data.f_outlets = Vue.user.f_parentname
1010
+ this.data.f_meetunit = Vue.user.orgpathnames
1011
+ this.data.orgpathstr = Vue.user.orgpathstr
1012
+ this.data.f_check_item_id = ''
1013
+ this.data.f_check_plan_id = this.f_plan_id
1014
+ this.data.f_checker_id = Vue.user.id
1015
+ this.data.f_checker_name = Vue.user.name
1016
+ this.data.f_check_type = ''
1017
+ this.data.f_safecheck_type = ''
1018
+ this.data.f_subcompany = ''
1019
+ this.data.f_approved = ''
1020
+ this.data.f_repair_approved = ''
1021
+ this.data.f_no_checkplan = '无计划安检'
1022
+ this.data.f_approved = ''
1023
+ this.data.f_filialeid = Vue.user.orgid
1024
+ this.data.f_orgstr = ''
1025
+ this.data.version = ''
1026
+ this.data.f_check_version=''
1027
+ this.$set('data.f_meters', '')
1028
+ this.$set('data.f_userinfo_code', '')
1029
+ this.$set('data.f_entry_status', '入户')
1030
+ this.$set('data.f_safe_type', '已挂表未办卡安检')
1031
+ this.$set('data.f_usegas', '未使用')
1032
+ this.$set('data.f_state','')
1033
+ this.$set('data.f_source', this.source?this.source:'安检')
1034
+ this.$set('data.f_other_checker_name', '')
1035
+ this.$set('data.f_user_name', '')
1036
+ this.$set('data.f_onsite_time', Util.toStandardTimeString())
1037
+ this.$set('data.f_rent_phone', '')
1038
+ this.$set('data.f_user_phone', '')
1039
+ this.$set('data.f_userinfoid', '')
1040
+ this.$set('data.f_address', '')
1041
+ this.$set('data.f_card_id', '')
1042
+ this.$set('data.f_slice_area', '')
1043
+ this.$set('data.f_recheck_id', '')
1044
+ this.$set('rowCodata.f_recheck_id', '')
1045
+ this.$set('data.f_street','')
1046
+ this.$set('data.f_room', '')
1047
+ this.$set('data.f_building', '')
1048
+ this.$set('data.f_unit', '')
1049
+ this.$set('data.f_floor', '')
1050
+ this.$set('data.f_residential_area' , '')
1051
+ this.$set('data.f_idnumber', '')
1052
+ this.$set('data.f_comments', '')
1053
+ this.$set('data.f_userproperties', '')
1054
+ this.$set('data.f_client_evaluation', '满意')
1055
+ this.$set('data.f_userfiles_id', '')
1056
+ this.$set('data.f_valve_state', '')
1057
+ this.$set('data.f_off_valve_reason', '')
1058
+ this.$set('data.f_gas_guidelines', true)
1059
+ this.$set('data.f_safety_warning', true)
1060
+ this.$set('data.f_gas_manual', true)
1061
+ this.$set('data.f_no_gas_device', false)
1062
+ this.$set('data.f_close_valve', false)
1063
+ this.$set('data.f_unload_battery', false)
1064
+ this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
1065
+ }
1066
+ },
1067
+ watch: {
1068
+ 'row' () {
1069
+ //tag
1070
+ this.copy()
1071
+ }
1072
+ },
1073
+ ready () {
1074
+ HostApp.startOrStopAudioClip("----",'停止并删除录音')
1075
+ //获取用户用气类型
1076
+ let useType=this.$appdata.getParam('用户用气类型')
1077
+ if(useType){
1078
+ for (let i = 0; i < useType.length; i++) {
1079
+ var obj={data:useType[i].value}
1080
+ this.selecData.push(obj)
1081
+ }
1082
+ }
1083
+ this.config['点火'].items['用户用气类型'].options = this.selecData
1084
+ this.tab=[]
1085
+ for (let i in this.config) {
1086
+ let n = this.config[i].index
1087
+ this.devices[n - 1] = {device: i, n: n, checkmust: this.config[i].checkmust}
1088
+ this.$set('data.' + 'device' + n, [])
1089
+ this.tabs[n-1] = {
1090
+ header: i,
1091
+ complete: 'safecheck-devices-temp',
1092
+ class: 'repair-details-class',
1093
+ number: n
1094
+ }
1095
+ }
1096
+ this.tabs.push({
1097
+ header: '拍照签名',complete:'paper-feedback-temp', class: 'outlay-class', props: null
1098
+ })
1099
+ this.faultshow.number = this.tabs.length
1100
+ this.init()
1101
+ this.$showMessage("为了保证服务质量,将会被全程录音!")
1102
+ let resse = this.record()
1103
+ this.tabSelect({
1104
+ "header": "信息填写",
1105
+ "complete": "safecheck-devices-temp",
1106
+ "class": "repair-details-class",
1107
+ "number": 1
1108
+ },0)
1109
+ },
1110
+ events: {
1111
+ 'tijiao': function () {
1112
+ this.confirm()
1113
+ }
1114
+ }
1115
+ }
1116
+ </script>
1117
+ <style lang="less">
1118
+ @import "../../../../src/bootstrap/less/variables.less";
1119
+ .noclickbut {
1120
+ pointer-events: none;
1121
+ }
1122
+ .tab-befor-img (@url) {
1123
+ content: '';
1124
+ background-image: url("@{url}");
1125
+ background-size: 20px;
1126
+ display: inline-block;
1127
+ margin-right: 8px;
1128
+ margin-top: 0.3em;
1129
+ height: 1.3em;
1130
+ width: 1.3em;
1131
+ vertical-align: -35%;
1132
+ }
1133
+
1134
+ @media screen and (min-width: 768px) {
1135
+ .android-repair-order > div > ul a {
1136
+ font-size: @font-size-h2;
1137
+ margin: 0.3em 0;
1138
+ }
1139
+ }
1140
+ .repair-details-class{
1141
+ &::before {
1142
+ .tab-befor-img("../../../assets/huneiweixiu1.png");
1143
+ }
1144
+ }
1145
+ .repair-info-class {
1146
+ &::before {
1147
+ .tab-befor-img("../../../assets/baoxiuxinxi1.png");
1148
+ }
1149
+ }
1150
+ .repair-user-info-class {
1151
+ &::before {
1152
+ .tab-befor-img("../../../assets/jibenxinxi1.png")
1153
+ }
1154
+ }
1155
+
1156
+ .door-service-class {
1157
+ &::before {
1158
+ .tab-befor-img("../../../assets/huneiweixiu1.png")
1159
+ }
1160
+ }
1161
+
1162
+ .pipeline-class {
1163
+ &::before {
1164
+ .tab-befor-img("../../../assets/guandao1.png")
1165
+ }
1166
+ }
1167
+
1168
+ .device-service-class {
1169
+ &::before {
1170
+ .tab-befor-img("../../../assets/shebeiweixiu1.png")
1171
+ }
1172
+ }
1173
+
1174
+ .trouble-removal-class {
1175
+ &::before {
1176
+ .tab-befor-img("../../../assets/shiguchuli.png")
1177
+ }
1178
+ }
1179
+
1180
+ .cooking-utensils-class {
1181
+ &::before {
1182
+ .tab-befor-img("../../../assets/zaoju1.png")
1183
+ }
1184
+ }
1185
+
1186
+ .outlay-class {
1187
+ &::before {
1188
+ .tab-befor-img("../../../assets/feiyong1.png")
1189
+ }
1190
+ }
1191
+
1192
+ .fault-all-class {
1193
+ &::before {
1194
+ .tab-befor-img("../../../assets/guzhanghuizong1.png")
1195
+ }
1196
+ }
1197
+ .photo-write-class {
1198
+ &::before {
1199
+ .tab-befor-img("../../../assets/zaoju.png")
1200
+ }
1201
+ }
1202
+ .delay-apply-class {
1203
+ &::before {
1204
+ .tab-befor-img("../../../assets/yonghubaoxiu.png")
1205
+ }
1206
+ }
1207
+
1208
+ .repair-back-class {
1209
+ &::before {
1210
+ .tab-befor-img("../../../assets/fanhui.png")
1211
+ }
1212
+ }
1213
+ .butt2 {
1214
+ display: inline;
1215
+ float: right;
1216
+ width: 10px;
1217
+ text-align: center;
1218
+ align-items:center;
1219
+ position: absolute;
1220
+ top:50%;
1221
+
1222
+ left:90%;
1223
+ transform: translate(-50%,-50%);
1224
+ }
1225
+ .linesty{
1226
+ display: inline-block;
1227
+ height:1px;
1228
+ width:100%;
1229
+ background:#d0d0d0;
1230
+ overflow:hidden;
1231
+ vertical-align: middle;
1232
+ }
1233
+ .spanboder{
1234
+ border-bottom:2px solid #499edf;
1235
+ padding-bottom: 8px
1236
+ }
1237
+ .app-botton {
1238
+ position:fixed;
1239
+ background: #87b2dd;
1240
+ right:8px;
1241
+ color: #FFF;
1242
+ padding: 8px;
1243
+ text-align: center;
1244
+ font-size: 1.2em;
1245
+ z-index: 10;
1246
+ opacity:0.5;
1247
+ bottom: 50px;
1248
+ margin-top: -10px;
1249
+ height: 40px;
1250
+ }
1251
+ .android-repair-order > div > ul a {
1252
+ font-size: 12px;
1253
+ color: #333333;
1254
+ padding: 13px 16px;
1255
+ }
1256
+ </style>