apply-clients 7.1.36-yuchuan-50 → 7.1.36-yuchuan-53

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 (67) hide show
  1. package/android.html +27 -27
  2. package/package.json +1 -1
  3. package/src/apply.js +163 -163
  4. package/src/applyAndroid.js +98 -98
  5. package/src/components/android/AppSign.vue +232 -232
  6. package/src/components/android/Ignition/VentilationIgnition.vue +441 -408
  7. package/src/components/android/Ignition/VentilationIgnitionHandle.vue +472 -472
  8. package/src/components/android/Process/AppExplorationUser.vue +454 -454
  9. package/src/components/android/Process/AppServiceControl.vue +1434 -1434
  10. package/src/components/android/Process/Processes/AppInstallationDetails.vue +1026 -1026
  11. package/src/components/android/Process/Processes/newAppInstallationDetails.vue +671 -671
  12. package/src/components/android/SealBind.vue +390 -376
  13. package/src/components/android/SealManage.vue +278 -278
  14. package/src/components/android/Sign/AppSignTask.vue +183 -183
  15. package/src/components/android/Supervisory/AppProcessSupervisory.vue +344 -344
  16. package/src/components/android/Task/Build/BuildTsak.vue +117 -117
  17. package/src/components/android/Task/BuildIgnition/BuildIgnition.vue +114 -114
  18. package/src/components/android/Task/GuanXianJianShe/AppExplorationGuanXian.vue +317 -317
  19. package/src/components/android/Task/RepairFromSend/RepairFrom.vue +124 -124
  20. package/src/components/android/Task/RepairFromSend/RepairSend.vue +124 -124
  21. package/src/components/android/Task/ShiGongXinXi/AppShowBuildUser.vue +431 -431
  22. package/src/components/android/Task/Survey/SurveyTsak.vue +141 -141
  23. package/src/components/android/Task/yiban/AppShowDone.vue +442 -442
  24. package/src/components/android/newPackage/customerServiceManager.vue +218 -218
  25. package/src/components/android/newPackage/projectPrice.vue +218 -218
  26. package/src/components/product/ApplyCharge/ApplyChargeList.vue +1101 -1101
  27. package/src/components/product/ApplyGuanXian/GuanXianExplorationSelect.vue +325 -325
  28. package/src/components/product/ApplyGuanXian/GuanXianExplorationUser.vue +142 -142
  29. package/src/components/product/ApplyGuanXian/GuanXianSupervisoryhCart.vue +119 -119
  30. package/src/components/product/ApplyMap/AppMapLocation.vue +829 -829
  31. package/src/components/product/ApplyMap/ApplyMapInputSearch.vue +335 -335
  32. package/src/components/product/ChongZheng/ApplyChongZhengList.vue +417 -415
  33. package/src/components/product/Function/InstallFunction.vue +132 -132
  34. package/src/components/product/Function/InstallInfoSelect.vue +374 -374
  35. package/src/components/product/Ignition/IgnitionDispatch.vue +90 -90
  36. package/src/components/product/Ignition/IgnitionListManage.vue +604 -604
  37. package/src/components/product/Ignition/IgnitionRecord.vue +380 -380
  38. package/src/components/product/InsuranceApply/InsuranceReport.vue +188 -188
  39. package/src/components/product/List/OldShowDevices.vue +271 -271
  40. package/src/components/product/List/ShowAllActivity.vue +541 -541
  41. package/src/components/product/List/ShowDevices.vue +279 -279
  42. package/src/components/product/Print/BuildOrder/buildOrderList.vue +446 -446
  43. package/src/components/product/Process/ExplorationSelect.vue +593 -593
  44. package/src/components/product/Process/ExplorationUser.vue +154 -154
  45. package/src/components/product/Process/New1ExplorationUser.vue +196 -196
  46. package/src/components/product/Process/NewExplorationSelect.vue +587 -587
  47. package/src/components/product/Process/NewExplorationUser.vue +216 -216
  48. package/src/components/product/Process/Processes/Print/printCharge.vue +250 -250
  49. package/src/components/product/Process/Processes/Print/printGaiXianCharge.vue +244 -244
  50. package/src/components/product/Process/Processes/chargeManagement.vue +713 -713
  51. package/src/components/product/Process/Processes/selectApply.vue +250 -250
  52. package/src/components/product/Process/Processes/selectChaiChuUserinfo.vue +230 -230
  53. package/src/components/product/Process/Processes/selectOldUserinfo.vue +241 -241
  54. package/src/components/product/Process/Processes/selectUserinfo.vue +234 -234
  55. package/src/components/product/Process/Service/ServiceControl.vue +2223 -2223
  56. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  57. package/src/components/product/ServiceView.vue +644 -644
  58. package/src/components/product/Stop/StopApplyList.vue +224 -224
  59. package/src/components/product/Supervisory/NewSupervisoryhCart.vue +175 -175
  60. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +593 -593
  61. package/src/components/product/Supervisory/SupervisoryControl.vue +114 -114
  62. package/src/components/product/Supervisory/SupervisoryList.vue +586 -580
  63. package/src/components/product/Supervisory/SupervisoryhCart.vue +120 -120
  64. package/src/components/product/Supervisory/YiBanSupervisoryControl.vue +111 -111
  65. package/src/components/product/Supervisory/YiBanSupervisoryList.vue +539 -539
  66. package/src/components/product/VueUtils/ApplyUpload.vue +303 -303
  67. package/src/main.js +27 -27
@@ -1,376 +1,390 @@
1
- <template>
2
- <div class="auto">
3
- <div class="row app-row">
4
- <div class="col-xs-4">
5
- <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
6
- <label for="f_userinfoid" class="font text-left">用户编号:</label>
7
- </div>
8
- <div class="col-xs-8" >
9
- <input id="f_userinfoid" class="search_input input-font" readonly
10
- v-model=row.f_userinfo_id :value.sync="row.f_userinfo_id" />
11
- </div>
12
- </div>
13
- <div class="row app-row">
14
- <div class="col-xs-4">
15
- <img src="../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
16
- <label class="font text-left">用户姓名:</label>
17
- </div>
18
- <div class="col-xs-8" >
19
- <input class="search_input input-font" v-model=row.f_user_name :value.sync="row.f_user_name" readonly />
20
- </div>
21
- </div>
22
- <div class="row app-row">
23
- <div class="col-xs-4">
24
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
25
- <label class="font text-left">用户地址:</label>
26
- </div>
27
- <div class="col-xs-8" >
28
- <input class="search_input input-font" v-model=row.f_address :value.sync="row.f_address" readonly />
29
- </div>
30
- </div>
31
- <div class="row app-row">
32
- <div class="col-xs-4">
33
- <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
34
- <label class="font text-left">铅封编号:</label>
35
- </div>
36
- <div class="col-xs-5" >
37
- <input class="search_input input-font"
38
- v-model=sealUID :value.sync="sealUID" readonly />
39
- </div>
40
- <div class="col-xs-3">
41
- <button style="padding: 5px" type="button" class="btn btn-font btn-color" @click="scan()">NFC识别</button>
42
- </div>
43
- </div>
44
- <div class="row app-row">
45
- <div class="col-xs-4">
46
- <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
47
- <label class="font text-left">二维码编号:</label>
48
- </div>
49
- <div class="col-xs-5" >
50
- <input class="search_input input-font"
51
- v-model=f_qr_code :value.sync="f_qr_code" readonly />
52
- </div>
53
- <div class="col-xs-3">
54
- <button style="padding: 5px" type="button" class="btn btn-font btn-color" @click="codeScan()">扫描二维码</button>
55
- </div>
56
- </div>
57
- <div class="row app-row">
58
- <div class="form-group col-sm-12 col-xs-12 col-md-12 " :class="style__">
59
- <label class="text-left font">铅封照片:</label>
60
-
61
- <div class="auto" :class="style__">
62
- <div class="panel" style="padding: 10px 10px 5px 10px;">
63
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
64
- <div class="row" style="height: 240px;overflow: scroll;top: 1px" >
65
- <div class="col-xs-4 col-sm-3 col-md-2" style="margin-bottom: 35px" v-for="(index,img) in imgs">
66
- <img-self :src="img" alt="铅封照片" :width="140" :height="170"></img-self>
67
- <img src="../../assets/删除.png" @click="delfile(img,index)" style="width: 15px;margin-top: -80px" alt="">
68
- </div>
69
- </div>
70
- <div class="row text-right div-photo">
71
- <button type="button" name="button" class="btn btn-photo" @click="takePic()">拍照</button>
72
- </div>
73
- </div>
74
- </div>
75
- </div>
76
- </div>
77
- </div>
78
- <div class="row app-row">
79
- <div class="col-xs-4">
80
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
81
- <label class="font text-left">施封原因:</label>
82
- </div>
83
- <div class="col-xs-8" >
84
- <v-select
85
- v-model="cause"
86
- :value.sync="cause"
87
- :value-single="true"
88
- :options='causeOption'
89
- placeholder='请选择施封原因'
90
- width="100%"
91
- close-on-select></v-select>
92
- </div>
93
- </div>
94
- <div class="row text-center" style="margin-top: 40px;">
95
- <button style="font-size: 20px; padding: 8px 40px" type="button" name="button" class="col-sm-3 btn btn-primary" @click="bind">
96
- 施封
97
- </button>
98
- </div>
99
- </div>
100
- </template>
101
-
102
- <script>
103
- import {HttpResetClass, PagedList} from 'vue-client'
104
- import Vue from 'vue'
105
- import * as Util from '../Util'
106
-
107
- export default {
108
- title: '施封',
109
- props: ['row'],
110
- data () {
111
- return {
112
- sealUID: '',
113
- imgs: [],
114
- cause: '',
115
- address: '',
116
- longitude: '',
117
- latitude: '',
118
- f_qr_code: '',
119
- causeOption: this.$appdata.getParam('施封原因')
120
- }
121
- },
122
- ready () {
123
- console.log('this.row=', JSON.stringify(this.row))
124
- this.getLocation()
125
- },
126
- computed: {
127
-
128
- },
129
- methods:{
130
- codeScan() {
131
- console.log('codeScan=========')
132
- HostApp.__this__ = this
133
- HostApp.scanQRCode({callback:"javascript:HostApp.__this__.codeScanCallback()"})
134
- },
135
- codeScanCallback() {
136
- console.log('codeScanCallback=========')
137
- let result = HostApp.getQRCode()
138
- console.log('result=', result)
139
- if (result.code == 200){
140
- this.f_qr_code = result.data
141
- }else {
142
- this.$showMessage("未识别到二维码信息,请重新尝试!")
143
- }
144
- },
145
- generateUUID() {
146
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
147
- var r = (Math.random() * 16) | 0,
148
- v = c == 'x' ? r : (r & 0x3) | 0x8;
149
- return v.toString(16);
150
- });
151
- },
152
- getLocation() {
153
- const location = HostApp.getDetailAddress()
154
- this.address = location.data
155
- const longitude = HostApp.getPreference('longitude')
156
- this.longitude = longitude.data
157
- const latitude = HostApp.getPreference('latitude')
158
- this.latitude = latitude.data
159
- console.log('this.address=', this.address)
160
- console.log('this.longitude=', this.longitude)
161
- console.log('this.latitude=', this.latitude)
162
- },
163
- bind() {
164
- if (!this.sealUID) {
165
- this.$showMessage("铅封编号不能为空!")
166
- return
167
- }
168
- if (!this.f_qr_code) {
169
- this.$showMessage("二维码编号不能为空!")
170
- return
171
- }
172
- if (!this.imgs.length) {
173
- this.$showMessage("请拍摄铅封照片!")
174
- return
175
- }
176
- if (!this.cause) {
177
- this.$showMessage("请选择施封原因!")
178
- return
179
- }
180
- this.getLocation()
181
- if (this.longitude == 0){
182
- this.$showMessage("位置获取失败,请开启定位后进行施封!")
183
- return
184
- }
185
- const param = {
186
- seal: {
187
- f_uid: this.sealUID,
188
- f_qr_code: this.f_qr_code,
189
- f_userinfo_id: this.row.f_userinfo_id,
190
- f_filiale: this.row.f_filiale,
191
- f_filiale_id: this.row.f_filiale_id,
192
- f_user_id: this.row.f_user_id,
193
- f_address: this.address,
194
- f_longitude: this.longitude,
195
- f_latitude: this.latitude,
196
- f_operate_name: Vue.user.name,
197
- f_operate_id: Vue.user.id,
198
- f_operate_date: Util.toStandardTimeString(),
199
- f_state: '有效'
200
- },
201
- operateList: {
202
- f_cause: this.cause,
203
- f_operate_date: Util.toStandardTimeString(),
204
- f_creation_date: Util.toStandardTimeString(),
205
- f_creation_name: Vue.user.name,
206
- f_creation_name_id: Vue.user.id
207
- },
208
- files: [],
209
- imgs: [],
210
- f_devices_no: this.generateUUID()
211
- }
212
- for (const img of this.imgs) {
213
- const i1 = img.lastIndexOf('?')
214
- const i2 = img.lastIndexOf('/')
215
- const key = img.substring(i2+1, i1)
216
- const filename = img.substring(0, i1)
217
- param.files.push({
218
- f_img_url: key,
219
- f_operate_date: Util.toStandardTimeString(),
220
- f_operator: Vue.user.name,
221
- f_operatorid: Vue.user.id
222
- })
223
- param.imgs.push({
224
- key: key,
225
- filename: filename
226
- })
227
- }
228
- //tag)
229
- let paramStr = JSON.stringify(param)
230
- console.log('paramStr=', paramStr)
231
- // 多长截断一次
232
- let subLength = 800
233
- for (let i = 0; i < paramStr.length; i += subLength) {
234
- HostApp.param_cache(paramStr.substr(i, subLength))
235
- }
236
- HostApp.__this__ = this
237
- HostApp.syncLogic({
238
- 'logic': 'sealBind',
239
- 'callback': 'javascript:HostApp.__this__.sealBindBack()',
240
- 'backresult': 1
241
- })
242
- },
243
- sealBindBack(jo) {
244
- if(jo.state == 'ok') {
245
- let res = JSON.parse(jo.result)
246
- if (res.code == 200 && res.data.code == 200) {
247
- this.$showMessage('施封成功!')
248
- this.$back(this.sealUID)
249
- return
250
- }
251
- this.$showMessage(res.data.msg)
252
- return
253
- }
254
- this.$showMessage('网络异常!')
255
- },
256
- scan() {
257
- HostApp.__this__ = this
258
- HostApp.readNfc({
259
- 'callback': 'javascript:HostApp.__this__.scanCallback()',
260
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
261
- // 执行回调方法传入key为backresult
262
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
263
- 'backresult': 1
264
- })
265
- },
266
- scanCallback() {
267
- console.log('scanCallback=========')
268
- const result = HostApp.getNfcUUID()
269
- console.log('result=', result)
270
- if (result.code == 200){
271
- this.sealUID = result.data
272
- }else {
273
- this.$showMessage("未识别到铅封信息,请重新尝试!")
274
- return
275
- }
276
- },
277
- takePic() {
278
- HostApp.__callback__ = this.cameraCallBack
279
- HostApp.__this__ = this
280
-
281
- let fileName = `${Util.guid()}.jpg`
282
- HostApp._open_a_page({
283
- type: 'boomerang',
284
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
285
- param: {
286
- file: fileName,
287
- requestCode: 111,
288
- callback: 'javascript:HostApp.__callback__("%s");',
289
- watermark: '铅封照片\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name + '\t' + this.row.f_userinfo_id+ '\t' + this.row.f_user_name+ '\t' + this.row.f_address
290
- }
291
- })
292
- },
293
- cameraCallBack(fileName) {
294
- // if (prop == 'f_overall_path') {
295
- // let f_overall_path = fileName + '?' + Math.random()
296
- // HostApp.__this__.paper.f_overall_imgs.push({
297
- // f_overall_path: f_overall_path
298
- // })
299
- // } else {
300
- // HostApp.__this__.paper[prop] = fileName + '?' + Math.random()
301
- // }
302
- this.imgs.push(fileName + '?' + Math.random())
303
- HostApp.__callback__ = null
304
- HostApp.__this__ = null
305
- },
306
- delfile(fileName, index) {
307
- if (fileName == Vue.nopic)
308
- return
309
- else {
310
- this.imgs.splice(index, 1)
311
- HostApp.delfile(fileName)
312
- }
313
- }
314
- }
315
- }
316
- </script>
317
- <style scoped>
318
- .app-row {
319
- background-color: white;
320
- padding: 10px 10px 0 10px;
321
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
322
- }
323
- .search_input {
324
- border: 0;
325
- outline: none;
326
- }
327
- .font{
328
- font: 15px PingFang-SC-Medium;
329
- color: #666666;
330
- }
331
- .input-font{
332
- font: 15px PingFang-SC-Medium;
333
- color: #333333;
334
- }
335
- .btn-font{
336
- font:600 16px PingFang-SC-Bold;
337
- color: #499EDF;
338
- }
339
- .btn-color{
340
- background-color: #FFFFFF;
341
- border-radius: 10px ;
342
- border: 1px solid #499EDF;
343
- }
344
- .app-text {
345
- font-size: 12px;
346
- }
347
- .panel-self{
348
- border-radius: 10px;
349
- border:1px solid #499EDF;
350
- background-color: #F8F8F8;
351
- }
352
- .yybtn-color{
353
- border-radius: 4px ;
354
- border: 1px solid #499EDF;
355
- }
356
- .qxbtn-color{
357
- background-color: #FFFFFF;
358
- border-radius: 4px ;
359
- border: 1px solid #499EDF;
360
- }
361
- .btn-photo{
362
- border: 0;
363
- border-radius: 7px;
364
- background-color: #7dc1f4;
365
- font: 15px PingFang-SC-Bold;
366
- height: 20%;
367
- }
368
- .div-photo{
369
- width: auto;
370
- height: auto;
371
- /* margin-top: 10px; */
372
- position: absolute;
373
- bottom: 10px;
374
- right: 10px;
375
- }
376
- </style>
1
+ <template>
2
+ <div class="auto">
3
+ <div class="row app-row">
4
+ <div class="col-xs-4">
5
+ <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
6
+ <label for="f_userinfoid" class="font text-left">用户编号:</label>
7
+ </div>
8
+ <div class="col-xs-8" >
9
+ <input id="f_userinfoid" class="search_input input-font" readonly
10
+ v-model=row.f_userinfo_id :value.sync="row.f_userinfo_id" />
11
+ </div>
12
+ </div>
13
+ <div class="row app-row">
14
+ <div class="col-xs-4">
15
+ <img src="../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
16
+ <label class="font text-left">用户姓名:</label>
17
+ </div>
18
+ <div class="col-xs-8" >
19
+ <input class="search_input input-font" v-model=row.f_user_name :value.sync="row.f_user_name" readonly />
20
+ </div>
21
+ </div>
22
+ <div class="row app-row">
23
+ <div class="col-xs-4">
24
+ <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
25
+ <label class="font text-left">用户地址:</label>
26
+ </div>
27
+ <div class="col-xs-8" >
28
+ <input class="search_input input-font" v-model=row.f_address :value.sync="row.f_address" readonly />
29
+ </div>
30
+ </div>
31
+ <div class="row app-row">
32
+ <div class="col-xs-4">
33
+ <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
34
+ <label class="font text-left">铅封编号:</label>
35
+ </div>
36
+ <div class="col-xs-5" >
37
+ <input class="search_input input-font"
38
+ v-model=sealUID :value.sync="sealUID" readonly />
39
+ </div>
40
+ <div class="col-xs-3">
41
+ <button style="padding: 5px" type="button" class="btn btn-font btn-color" @click="scan()">NFC识别</button>
42
+ </div>
43
+ </div>
44
+ <div class="row app-row">
45
+ <div class="col-xs-4">
46
+ <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
47
+ <label class="font text-left">二维码编号:</label>
48
+ </div>
49
+ <div class="col-xs-5" >
50
+ <input class="search_input input-font"
51
+ v-model=f_qr_code :value.sync="f_qr_code" readonly />
52
+ </div>
53
+ <div class="col-xs-3">
54
+ <button style="padding: 5px" type="button" class="btn btn-font btn-color" @click="codeScan()">扫描二维码</button>
55
+ </div>
56
+ </div>
57
+ <div class="row app-row">
58
+ <div class="form-group col-sm-12 col-xs-12 col-md-12 " :class="style__">
59
+ <label class="text-left font">铅封照片:</label>
60
+
61
+ <div class="auto" :class="style__">
62
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
63
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
64
+ <div class="row" style="height: 240px;overflow: scroll;top: 1px" >
65
+ <div class="col-xs-4 col-sm-3 col-md-2" style="margin-bottom: 35px" v-for="(index,img) in imgs">
66
+ <img-self :src="img" alt="铅封照片" :width="140" :height="170"></img-self>
67
+ <img src="../../assets/删除.png" @click="delfile(img,index)" style="width: 15px;margin-top: -80px" alt="">
68
+ </div>
69
+ </div>
70
+ <div class="row text-right div-photo">
71
+ <button type="button" name="button" class="btn btn-photo" @click="takePic()">拍照</button>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ <div class="row app-row">
79
+ <div class="col-xs-4">
80
+ <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
81
+ <label class="font text-left">施封原因:</label>
82
+ </div>
83
+ <div class="col-xs-8" >
84
+ <v-select
85
+ v-model="cause"
86
+ :value.sync="cause"
87
+ :value-single="true"
88
+ :options='causeOption'
89
+ placeholder='请选择施封原因'
90
+ width="100%"
91
+ close-on-select></v-select>
92
+ </div>
93
+ </div>
94
+ <div class="row text-center" style="margin-top: 40px;">
95
+ <button style="font-size: 20px; padding: 8px 40px" type="button" name="button" class="col-sm-3 btn btn-primary" @click="bind">
96
+ 施封
97
+ </button>
98
+ </div>
99
+ </div>
100
+ </template>
101
+
102
+ <script>
103
+ import {HttpResetClass, PagedList} from 'vue-client'
104
+ import Vue from 'vue'
105
+ import * as Util from '../Util'
106
+
107
+ export default {
108
+ title: '施封',
109
+ props: ['row','source'],
110
+ data () {
111
+ return {
112
+ sealUID: '',
113
+ imgs: [],
114
+ cause: '',
115
+ address: '',
116
+ longitude: '',
117
+ latitude: '',
118
+ f_qr_code: '',
119
+ causeOption: this.$appdata.getParam('施封原因')
120
+ }
121
+ },
122
+ ready () {
123
+ console.log('this.row=', JSON.stringify(this.row))
124
+ this.getLocation()
125
+ },
126
+ computed: {
127
+
128
+ },
129
+ methods:{
130
+ codeScan() {
131
+ console.log('codeScan=========')
132
+ HostApp.__this__ = this
133
+ HostApp.scanQRCode({callback:"javascript:HostApp.__this__.codeScanCallback()"})
134
+ },
135
+ codeScanCallback() {
136
+ console.log('codeScanCallback=========')
137
+ let result = HostApp.getQRCode()
138
+ console.log('result=', result)
139
+ if (result.code == 200){
140
+ this.f_qr_code = result.data
141
+ }else {
142
+ this.$showMessage("未识别到二维码信息,请重新尝试!")
143
+ }
144
+ },
145
+ generateUUID() {
146
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
147
+ var r = (Math.random() * 16) | 0,
148
+ v = c == 'x' ? r : (r & 0x3) | 0x8;
149
+ return v.toString(16);
150
+ });
151
+ },
152
+ getLocation() {
153
+ const location = HostApp.getDetailAddress()
154
+ this.address = location.data
155
+ const longitude = HostApp.getPreference('longitude')
156
+ this.longitude = longitude.data
157
+ const latitude = HostApp.getPreference('latitude')
158
+ this.latitude = latitude.data
159
+ console.log('this.address=', this.address)
160
+ console.log('this.longitude=', this.longitude)
161
+ console.log('this.latitude=', this.latitude)
162
+ },
163
+ bind() {
164
+ if (!this.sealUID) {
165
+ this.$showMessage("铅封编号不能为空!")
166
+ return
167
+ }
168
+ if (!this.f_qr_code) {
169
+ this.$showMessage("二维码编号不能为空!")
170
+ return
171
+ }
172
+ if (!this.imgs.length) {
173
+ this.$showMessage("请拍摄铅封照片!")
174
+ return
175
+ }
176
+ if (!this.cause) {
177
+ this.$showMessage("请选择施封原因!")
178
+ return
179
+ }
180
+ this.getLocation()
181
+ if (this.longitude == 0){
182
+ this.$showMessage("位置获取失败,请开启定位后进行施封!")
183
+ return
184
+ }
185
+ const param = {
186
+ seal: {
187
+ f_uid: this.sealUID,
188
+ f_qr_code: this.f_qr_code,
189
+ f_userinfo_id: this.row.f_userinfo_id,
190
+ f_filiale: this.row.f_filiale,
191
+ f_filiale_id: this.row.f_filiale_id,
192
+ f_user_id: this.row.f_user_id,
193
+ f_address: this.address,
194
+ f_longitude: this.longitude,
195
+ f_latitude: this.latitude,
196
+ f_operate_name: Vue.user.name,
197
+ f_operate_id: Vue.user.id,
198
+ f_operate_date: Util.toStandardTimeString(),
199
+ f_state: '有效'
200
+ },
201
+ operateList: {
202
+ f_cause: this.cause,
203
+ f_operate_date: Util.toStandardTimeString(),
204
+ f_creation_date: Util.toStandardTimeString(),
205
+ f_creation_name: Vue.user.name,
206
+ f_creation_name_id: Vue.user.id
207
+ },
208
+ files: [],
209
+ imgs: [],
210
+ f_devices_no: this.generateUUID()
211
+ }
212
+ for (const img of this.imgs) {
213
+ const i1 = img.lastIndexOf('?')
214
+ const i2 = img.lastIndexOf('/')
215
+ const key = img.substring(i2+1, i1)
216
+ const filename = img.substring(0, i1)
217
+ param.files.push({
218
+ f_img_url: key,
219
+ f_operate_date: Util.toStandardTimeString(),
220
+ f_operator: Vue.user.name,
221
+ f_operatorid: Vue.user.id
222
+ })
223
+ param.imgs.push({
224
+ key: key,
225
+ filename: filename
226
+ })
227
+ }
228
+ //tag)
229
+ let paramStr = JSON.stringify(param)
230
+ console.log('paramStr=', paramStr)
231
+ // 多长截断一次
232
+ let subLength = 800
233
+ for (let i = 0; i < paramStr.length; i += subLength) {
234
+ HostApp.param_cache(paramStr.substr(i, subLength))
235
+ }
236
+ HostApp.__this__ = this
237
+ HostApp.syncLogic({
238
+ 'logic': 'sealBind',
239
+ 'callback': 'javascript:HostApp.__this__.sealBindBack()',
240
+ 'backresult': 1
241
+ })
242
+ },
243
+ sealBindBack(jo) {
244
+ let _this = this
245
+ let row =this.row
246
+ if(jo.state == 'ok') {
247
+ let res = JSON.parse(jo.result)
248
+ if (res.code == 200 && res.data.code == 200) {
249
+ this.$showMessage('施封成功!')
250
+ this.$back(this.sealUID)
251
+ if (this.source==='通气点火'){
252
+ //跳转到通气点火页面
253
+ this.$dispatch('gotoson', {
254
+ _this: _this,
255
+ title: '通气点火',
256
+ safe: true
257
+ })
258
+ row.defname = '通气点火'
259
+ row.f_apply_type = '通气点火'
260
+ console.log('----------------------++++++++++++++++++',row.f_process_id)
261
+ this.$goto('ventilation-ignition-handle', {selectdata:row}, 'self')
262
+ }
263
+ return
264
+ }
265
+ this.$showMessage(res.data.msg)
266
+ return
267
+ }
268
+ this.$showMessage('网络异常!')
269
+ },
270
+ scan() {
271
+ HostApp.__this__ = this
272
+ HostApp.readNfc({
273
+ 'callback': 'javascript:HostApp.__this__.scanCallback()',
274
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
275
+ // 执行回调方法传入key为backresult
276
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
277
+ 'backresult': 1
278
+ })
279
+ },
280
+ scanCallback() {
281
+ console.log('scanCallback=========')
282
+ const result = HostApp.getNfcUUID()
283
+ console.log('result=', result)
284
+ if (result.code == 200){
285
+ this.sealUID = result.data
286
+ }else {
287
+ this.$showMessage("未识别到铅封信息,请重新尝试!")
288
+ return
289
+ }
290
+ },
291
+ takePic() {
292
+ HostApp.__callback__ = this.cameraCallBack
293
+ HostApp.__this__ = this
294
+
295
+ let fileName = `${Util.guid()}.jpg`
296
+ HostApp._open_a_page({
297
+ type: 'boomerang',
298
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
299
+ param: {
300
+ file: fileName,
301
+ requestCode: 111,
302
+ callback: 'javascript:HostApp.__callback__("%s");',
303
+ watermark: '铅封照片\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name + '\t' + this.row.f_userinfo_id+ '\t' + this.row.f_user_name+ '\t' + this.row.f_address
304
+ }
305
+ })
306
+ },
307
+ cameraCallBack(fileName) {
308
+ // if (prop == 'f_overall_path') {
309
+ // let f_overall_path = fileName + '?' + Math.random()
310
+ // HostApp.__this__.paper.f_overall_imgs.push({
311
+ // f_overall_path: f_overall_path
312
+ // })
313
+ // } else {
314
+ // HostApp.__this__.paper[prop] = fileName + '?' + Math.random()
315
+ // }
316
+ this.imgs.push(fileName + '?' + Math.random())
317
+ HostApp.__callback__ = null
318
+ HostApp.__this__ = null
319
+ },
320
+ delfile(fileName, index) {
321
+ if (fileName == Vue.nopic)
322
+ return
323
+ else {
324
+ this.imgs.splice(index, 1)
325
+ HostApp.delfile(fileName)
326
+ }
327
+ }
328
+ }
329
+ }
330
+ </script>
331
+ <style scoped>
332
+ .app-row {
333
+ background-color: white;
334
+ padding: 10px 10px 0 10px;
335
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
336
+ }
337
+ .search_input {
338
+ border: 0;
339
+ outline: none;
340
+ }
341
+ .font{
342
+ font: 15px PingFang-SC-Medium;
343
+ color: #666666;
344
+ }
345
+ .input-font{
346
+ font: 15px PingFang-SC-Medium;
347
+ color: #333333;
348
+ }
349
+ .btn-font{
350
+ font:600 16px PingFang-SC-Bold;
351
+ color: #499EDF;
352
+ }
353
+ .btn-color{
354
+ background-color: #FFFFFF;
355
+ border-radius: 10px ;
356
+ border: 1px solid #499EDF;
357
+ }
358
+ .app-text {
359
+ font-size: 12px;
360
+ }
361
+ .panel-self{
362
+ border-radius: 10px;
363
+ border:1px solid #499EDF;
364
+ background-color: #F8F8F8;
365
+ }
366
+ .yybtn-color{
367
+ border-radius: 4px ;
368
+ border: 1px solid #499EDF;
369
+ }
370
+ .qxbtn-color{
371
+ background-color: #FFFFFF;
372
+ border-radius: 4px ;
373
+ border: 1px solid #499EDF;
374
+ }
375
+ .btn-photo{
376
+ border: 0;
377
+ border-radius: 7px;
378
+ background-color: #7dc1f4;
379
+ font: 15px PingFang-SC-Bold;
380
+ height: 20%;
381
+ }
382
+ .div-photo{
383
+ width: auto;
384
+ height: auto;
385
+ /* margin-top: 10px; */
386
+ position: absolute;
387
+ bottom: 10px;
388
+ right: 10px;
389
+ }
390
+ </style>