safecheck-client 3.0.39-54 → 3.0.39-56

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