apply-clients 7.1.36-yuchuan-67 → 7.1.36-yuchuan-69

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 (29) hide show
  1. package/build/dev-server.js +3 -6
  2. package/package.json +1 -1
  3. package/src/components/android/AppServiceView.vue +603 -603
  4. package/src/components/android/Process/AppServiceControl.vue +1434 -1434
  5. package/src/components/android/Process/Processes/AppInstallationDetails.vue +1029 -1029
  6. package/src/components/android/Process/Processes/newAppInstallationDetails.vue +671 -671
  7. package/src/components/android/SealBind.vue +405 -405
  8. package/src/components/product/ApplyGaiXianCharge/ApplyGaiXianChargeList.vue +211 -211
  9. package/src/components/product/ApplyGuanXian/GuanXianExplorationSelect.vue +325 -325
  10. package/src/components/product/Function/Service/FunctionServiceControl.vue +581 -581
  11. package/src/components/product/Ignition/IgnitionListManage.vue +604 -604
  12. package/src/components/product/List/OldShowDevices.vue +272 -272
  13. package/src/components/product/List/ShowAllActivity.vue +540 -540
  14. package/src/components/product/Print/BuildOrder/buildOrderList.vue +446 -446
  15. package/src/components/product/Process/ExplorationSelect.vue +593 -593
  16. package/src/components/product/Process/NewExplorationSelect.vue +587 -587
  17. package/src/components/product/Process/Processes/InstallationDetails.vue +1166 -1166
  18. package/src/components/product/Process/Processes/Print/printCharge.vue +250 -250
  19. package/src/components/product/Process/Processes/Print/printGaiXianCharge.vue +244 -244
  20. package/src/components/product/Process/Processes/newInstallationDetails.vue +683 -683
  21. package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
  22. package/src/components/product/Process/Service/ServiceControl.vue +2230 -2222
  23. package/src/components/product/ServiceView.vue +650 -650
  24. package/src/components/product/Supervisory/ExportExcel.vue +359 -359
  25. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +592 -592
  26. package/src/components/product/Supervisory/SupervisoryList.vue +585 -585
  27. package/src/components/product/Supervisory/YiBanSupervisoryList.vue +543 -543
  28. package/src/components/product/VueUtils/ApplyUpload.vue +302 -302
  29. package/src/components/product/VueUtils/HighMeter.vue +208 -208
@@ -1,405 +1,405 @@
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: 40 px;">
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: 0,
117
- timer: null,
118
- latitude: '',
119
- f_qr_code: '',
120
- causeOption: []
121
- }
122
- },
123
- ready () {
124
- if (Vue.user.rolestr.includes('新安检员')) {
125
- this.causeOption = [{label: '安检施封', value: '安检施封'}]
126
- this.cause = '安检施封'
127
- } else if (Vue.user.rolestr.includes('通气组安检')) {
128
- this.causeOption = [{label: '通气施封', value: '通气施封'}]
129
- this.cause = '通气施封'
130
- } else if (Vue.user.rolestr.includes('新维修员')) {
131
- this.causeOption = [{label: '换表施封', value: '换表施封'}, {label: '维修施封', value: '维修施封'}]
132
- } else {
133
- this.causeOption = this.$appdata.getParam('施封原因')
134
- }
135
- this.getLocation()
136
- if (this.longitude === 0 && !this.timer) {
137
- let that = this
138
- this.timer = setInterval(()=>{
139
- that.getLocation()
140
- }, 3000)
141
- }
142
- },
143
- computed: {
144
-
145
- },
146
- methods:{
147
- codeScan() {
148
- console.log('codeScan=========')
149
- HostApp.__this__ = this
150
- HostApp.scanQRCode({callback:"javascript:HostApp.__this__.codeScanCallback()"})
151
- },
152
- codeScanCallback() {
153
- console.log('codeScanCallback=========')
154
- let result = HostApp.getQRCode()
155
- console.log('result=', result)
156
- if (result.code == 200){
157
- this.f_qr_code = result.data
158
- }else {
159
- this.$showMessage("未识别到二维码信息,请重新尝试!")
160
- }
161
- },
162
- generateUUID() {
163
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
164
- var r = (Math.random() * 16) | 0,
165
- v = c == 'x' ? r : (r & 0x3) | 0x8;
166
- return v.toString(16);
167
- });
168
- },
169
- getLocation() {
170
- const location = HostApp.getDetailAddress()
171
- this.address = location.data
172
- const longitude = HostApp.getPreference('longitude')
173
- this.longitude = longitude.data
174
- const latitude = HostApp.getPreference('latitude')
175
- this.latitude = latitude.data
176
- // 获取到位置后清理定时器
177
- if (this.longitude !== 0 && this.timer) {
178
- clearInterval(this.timer)
179
- this.timer = null
180
- }
181
- console.log('this.address=', this.address)
182
- console.log('this.longitude=', this.longitude)
183
- console.log('this.latitude=', this.latitude)
184
- },
185
- bind() {
186
- if (!this.sealUID) {
187
- this.$showMessage("铅封编号不能为空!")
188
- return
189
- }
190
- if (!this.f_qr_code) {
191
- this.$showMessage("二维码编号不能为空!")
192
- return
193
- }
194
- if (!this.imgs.length) {
195
- this.$showMessage("请拍摄铅封照片!")
196
- return
197
- }
198
- if (!this.cause) {
199
- this.$showMessage("请选择施封原因!")
200
- return
201
- }
202
- //this.getLocation()
203
- if (this.longitude == 0){
204
- this.$showMessage("位置获取失败,请开启定位后进行施封!")
205
- return
206
- }
207
- const param = {
208
- seal: {
209
- f_uid: this.sealUID,
210
- f_qr_code: this.f_qr_code,
211
- f_userinfo_id: this.row.f_userinfo_id,
212
- f_filiale: this.row.f_filiale,
213
- f_filiale_id: this.row.f_filiale_id,
214
- f_user_id: this.row.f_user_id,
215
- f_address: this.address,
216
- f_longitude: this.longitude,
217
- f_latitude: this.latitude,
218
- f_operate_name: Vue.user.name,
219
- f_operate_id: Vue.user.id,
220
- f_operate_date: Util.toStandardTimeString(),
221
- f_state: '有效'
222
- },
223
- operateList: {
224
- f_cause: this.cause,
225
- f_operate_date: Util.toStandardTimeString(),
226
- f_creation_date: Util.toStandardTimeString(),
227
- f_creation_name: Vue.user.name,
228
- f_creation_name_id: Vue.user.id
229
- },
230
- files: [],
231
- imgs: [],
232
- f_devices_no: this.generateUUID()
233
- }
234
- for (const img of this.imgs) {
235
- const i1 = img.lastIndexOf('?')
236
- const i2 = img.lastIndexOf('/')
237
- const key = img.substring(i2+1, i1)
238
- const filename = img.substring(0, i1)
239
- param.files.push({
240
- f_img_url: key,
241
- f_operate_date: Util.toStandardTimeString(),
242
- f_operator: Vue.user.name,
243
- f_operatorid: Vue.user.id
244
- })
245
- param.imgs.push({
246
- key: key,
247
- filename: filename
248
- })
249
- }
250
- //tag)
251
- let paramStr = JSON.stringify(param)
252
- console.log('paramStr=', paramStr)
253
- // 多长截断一次
254
- let subLength = 800
255
- for (let i = 0; i < paramStr.length; i += subLength) {
256
- HostApp.param_cache(paramStr.substr(i, subLength))
257
- }
258
- HostApp.__this__ = this
259
- HostApp.syncLogic({
260
- 'logic': 'sealBind',
261
- 'callback': 'javascript:HostApp.__this__.sealBindBack()',
262
- 'backresult': 1
263
- })
264
- },
265
- sealBindBack(jo) {
266
- if(jo.state == 'ok') {
267
- let res = JSON.parse(jo.result)
268
- if (res.code == 200 && res.data.code == 200) {
269
- this.$showMessage('施封成功!')
270
- this.$back(this.sealUID)
271
- return
272
- }
273
- this.$showMessage(res.data.msg)
274
- return
275
- }
276
- this.$showMessage('网络异常!')
277
- },
278
- scan() {
279
- HostApp.__this__ = this
280
- HostApp.readNfc({
281
- 'callback': 'javascript:HostApp.__this__.scanCallback()',
282
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
283
- // 执行回调方法传入key为backresult
284
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
285
- 'backresult': 1
286
- })
287
- },
288
- scanCallback() {
289
- console.log('scanCallback=========')
290
- const result = HostApp.getNfcUUID()
291
- console.log('result=', result)
292
- if (result.code == 200){
293
- this.sealUID = result.data
294
- }else {
295
- this.$showMessage("未识别到铅封信息,请重新尝试!")
296
- return
297
- }
298
- },
299
- takePic() {
300
- HostApp.__callback__ = this.cameraCallBack
301
- HostApp.__this__ = this
302
-
303
- let fileName = `${Util.guid()}.jpg`
304
- HostApp._open_a_page({
305
- type: 'boomerang',
306
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
307
- param: {
308
- file: fileName,
309
- requestCode: 111,
310
- callback: 'javascript:HostApp.__callback__("%s");',
311
- 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
312
- }
313
- })
314
- },
315
- cameraCallBack(fileName) {
316
- // if (prop == 'f_overall_path') {
317
- // let f_overall_path = fileName + '?' + Math.random()
318
- // HostApp.__this__.paper.f_overall_imgs.push({
319
- // f_overall_path: f_overall_path
320
- // })
321
- // } else {
322
- // HostApp.__this__.paper[prop] = fileName + '?' + Math.random()
323
- // }
324
- this.imgs.push(fileName + '?' + Math.random())
325
- HostApp.__callback__ = null
326
- HostApp.__this__ = null
327
- },
328
- delfile(fileName, index) {
329
- if (fileName == Vue.nopic)
330
- return
331
- else {
332
- this.imgs.splice(index, 1)
333
- HostApp.delfile(fileName)
334
- }
335
- }
336
- },
337
- // 添加组件销毁前清理定时器
338
- beforeDestroy() {
339
- if (this.timer) {
340
- clearInterval(this.timer)
341
- this.timer = null
342
- }
343
- }
344
- }
345
- </script>
346
- <style scoped>
347
- .app-row {
348
- background-color: white;
349
- padding: 10px 10px 0 10px;
350
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
351
- }
352
- .search_input {
353
- border: 0;
354
- outline: none;
355
- }
356
- .font{
357
- font: 15px PingFang-SC-Medium;
358
- color: #666666;
359
- }
360
- .input-font{
361
- font: 15px PingFang-SC-Medium;
362
- color: #333333;
363
- }
364
- .btn-font{
365
- font:600 16px PingFang-SC-Bold;
366
- color: #499EDF;
367
- }
368
- .btn-color{
369
- background-color: #FFFFFF;
370
- border-radius: 10px ;
371
- border: 1px solid #499EDF;
372
- }
373
- .app-text {
374
- font-size: 12px;
375
- }
376
- .panel-self{
377
- border-radius: 10px;
378
- border:1px solid #499EDF;
379
- background-color: #F8F8F8;
380
- }
381
- .yybtn-color{
382
- border-radius: 4px ;
383
- border: 1px solid #499EDF;
384
- }
385
- .qxbtn-color{
386
- background-color: #FFFFFF;
387
- border-radius: 4px ;
388
- border: 1px solid #499EDF;
389
- }
390
- .btn-photo{
391
- border: 0;
392
- border-radius: 7px;
393
- background-color: #7dc1f4;
394
- font: 15px PingFang-SC-Bold;
395
- height: 20%;
396
- }
397
- .div-photo{
398
- width: auto;
399
- height: auto;
400
- /* margin-top: 10px; */
401
- position: absolute;
402
- bottom: 10px;
403
- right: 10px;
404
- }
405
- </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: 40 px;">
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: 0,
117
+ timer: null,
118
+ latitude: '',
119
+ f_qr_code: '',
120
+ causeOption: []
121
+ }
122
+ },
123
+ ready () {
124
+ if (Vue.user.rolestr.includes('新安检员')) {
125
+ this.causeOption = [{label: '安检施封', value: '安检施封'}]
126
+ this.cause = '安检施封'
127
+ } else if (Vue.user.rolestr.includes('通气组安检')) {
128
+ this.causeOption = [{label: '通气施封', value: '通气施封'}]
129
+ this.cause = '通气施封'
130
+ } else if (Vue.user.rolestr.includes('新维修员')) {
131
+ this.causeOption = [{label: '换表施封', value: '换表施封'}, {label: '维修施封', value: '维修施封'}]
132
+ } else {
133
+ this.causeOption = this.$appdata.getParam('施封原因')
134
+ }
135
+ this.getLocation()
136
+ if (this.longitude === 0 && !this.timer) {
137
+ let that = this
138
+ this.timer = setInterval(()=>{
139
+ that.getLocation()
140
+ }, 3000)
141
+ }
142
+ },
143
+ computed: {
144
+
145
+ },
146
+ methods:{
147
+ codeScan() {
148
+ console.log('codeScan=========')
149
+ HostApp.__this__ = this
150
+ HostApp.scanQRCode({callback:"javascript:HostApp.__this__.codeScanCallback()"})
151
+ },
152
+ codeScanCallback() {
153
+ console.log('codeScanCallback=========')
154
+ let result = HostApp.getQRCode()
155
+ console.log('result=', result)
156
+ if (result.code == 200){
157
+ this.f_qr_code = result.data
158
+ }else {
159
+ this.$showMessage("未识别到二维码信息,请重新尝试!")
160
+ }
161
+ },
162
+ generateUUID() {
163
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
164
+ var r = (Math.random() * 16) | 0,
165
+ v = c == 'x' ? r : (r & 0x3) | 0x8;
166
+ return v.toString(16);
167
+ });
168
+ },
169
+ getLocation() {
170
+ const location = HostApp.getDetailAddress()
171
+ this.address = location.data
172
+ const longitude = HostApp.getPreference('longitude')
173
+ this.longitude = longitude.data
174
+ const latitude = HostApp.getPreference('latitude')
175
+ this.latitude = latitude.data
176
+ // 获取到位置后清理定时器
177
+ if (this.longitude !== 0 && this.timer) {
178
+ clearInterval(this.timer)
179
+ this.timer = null
180
+ }
181
+ console.log('this.address=', this.address)
182
+ console.log('this.longitude=', this.longitude)
183
+ console.log('this.latitude=', this.latitude)
184
+ },
185
+ bind() {
186
+ if (!this.sealUID) {
187
+ this.$showMessage("铅封编号不能为空!")
188
+ return
189
+ }
190
+ if (!this.f_qr_code) {
191
+ this.$showMessage("二维码编号不能为空!")
192
+ return
193
+ }
194
+ if (!this.imgs.length) {
195
+ this.$showMessage("请拍摄铅封照片!")
196
+ return
197
+ }
198
+ if (!this.cause) {
199
+ this.$showMessage("请选择施封原因!")
200
+ return
201
+ }
202
+ //this.getLocation()
203
+ if (this.longitude == 0){
204
+ this.$showMessage("位置获取失败,请开启定位后进行施封!")
205
+ return
206
+ }
207
+ const param = {
208
+ seal: {
209
+ f_uid: this.sealUID,
210
+ f_qr_code: this.f_qr_code,
211
+ f_userinfo_id: this.row.f_userinfo_id,
212
+ f_filiale: this.row.f_filiale,
213
+ f_filiale_id: this.row.f_filiale_id,
214
+ f_user_id: this.row.f_user_id,
215
+ f_address: this.address,
216
+ f_longitude: this.longitude,
217
+ f_latitude: this.latitude,
218
+ f_operate_name: Vue.user.name,
219
+ f_operate_id: Vue.user.id,
220
+ f_operate_date: Util.toStandardTimeString(),
221
+ f_state: '有效'
222
+ },
223
+ operateList: {
224
+ f_cause: this.cause,
225
+ f_operate_date: Util.toStandardTimeString(),
226
+ f_creation_date: Util.toStandardTimeString(),
227
+ f_creation_name: Vue.user.name,
228
+ f_creation_name_id: Vue.user.id
229
+ },
230
+ files: [],
231
+ imgs: [],
232
+ f_devices_no: this.generateUUID()
233
+ }
234
+ for (const img of this.imgs) {
235
+ const i1 = img.lastIndexOf('?')
236
+ const i2 = img.lastIndexOf('/')
237
+ const key = img.substring(i2+1, i1)
238
+ const filename = img.substring(0, i1)
239
+ param.files.push({
240
+ f_img_url: key,
241
+ f_operate_date: Util.toStandardTimeString(),
242
+ f_operator: Vue.user.name,
243
+ f_operatorid: Vue.user.id
244
+ })
245
+ param.imgs.push({
246
+ key: key,
247
+ filename: filename
248
+ })
249
+ }
250
+ //tag)
251
+ let paramStr = JSON.stringify(param)
252
+ console.log('paramStr=', paramStr)
253
+ // 多长截断一次
254
+ let subLength = 800
255
+ for (let i = 0; i < paramStr.length; i += subLength) {
256
+ HostApp.param_cache(paramStr.substr(i, subLength))
257
+ }
258
+ HostApp.__this__ = this
259
+ HostApp.syncLogic({
260
+ 'logic': 'sealBind',
261
+ 'callback': 'javascript:HostApp.__this__.sealBindBack()',
262
+ 'backresult': 1
263
+ })
264
+ },
265
+ sealBindBack(jo) {
266
+ if(jo.state == 'ok') {
267
+ let res = JSON.parse(jo.result)
268
+ if (res.code == 200 && res.data.code == 200) {
269
+ this.$showMessage('施封成功!')
270
+ this.$back(this.sealUID)
271
+ return
272
+ }
273
+ this.$showMessage(res.data.msg)
274
+ return
275
+ }
276
+ this.$showMessage('网络异常!')
277
+ },
278
+ scan() {
279
+ HostApp.__this__ = this
280
+ HostApp.readNfc({
281
+ 'callback': 'javascript:HostApp.__this__.scanCallback()',
282
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
283
+ // 执行回调方法传入key为backresult
284
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
285
+ 'backresult': 1
286
+ })
287
+ },
288
+ scanCallback() {
289
+ console.log('scanCallback=========')
290
+ const result = HostApp.getNfcUUID()
291
+ console.log('result=', result)
292
+ if (result.code == 200){
293
+ this.sealUID = result.data
294
+ }else {
295
+ this.$showMessage("未识别到铅封信息,请重新尝试!")
296
+ return
297
+ }
298
+ },
299
+ takePic() {
300
+ HostApp.__callback__ = this.cameraCallBack
301
+ HostApp.__this__ = this
302
+
303
+ let fileName = `${Util.guid()}.jpg`
304
+ HostApp._open_a_page({
305
+ type: 'boomerang',
306
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
307
+ param: {
308
+ file: fileName,
309
+ requestCode: 111,
310
+ callback: 'javascript:HostApp.__callback__("%s");',
311
+ 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
312
+ }
313
+ })
314
+ },
315
+ cameraCallBack(fileName) {
316
+ // if (prop == 'f_overall_path') {
317
+ // let f_overall_path = fileName + '?' + Math.random()
318
+ // HostApp.__this__.paper.f_overall_imgs.push({
319
+ // f_overall_path: f_overall_path
320
+ // })
321
+ // } else {
322
+ // HostApp.__this__.paper[prop] = fileName + '?' + Math.random()
323
+ // }
324
+ this.imgs.push(fileName + '?' + Math.random())
325
+ HostApp.__callback__ = null
326
+ HostApp.__this__ = null
327
+ },
328
+ delfile(fileName, index) {
329
+ if (fileName == Vue.nopic)
330
+ return
331
+ else {
332
+ this.imgs.splice(index, 1)
333
+ HostApp.delfile(fileName)
334
+ }
335
+ }
336
+ },
337
+ // 添加组件销毁前清理定时器
338
+ beforeDestroy() {
339
+ if (this.timer) {
340
+ clearInterval(this.timer)
341
+ this.timer = null
342
+ }
343
+ }
344
+ }
345
+ </script>
346
+ <style scoped>
347
+ .app-row {
348
+ background-color: white;
349
+ padding: 10px 10px 0 10px;
350
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
351
+ }
352
+ .search_input {
353
+ border: 0;
354
+ outline: none;
355
+ }
356
+ .font{
357
+ font: 15px PingFang-SC-Medium;
358
+ color: #666666;
359
+ }
360
+ .input-font{
361
+ font: 15px PingFang-SC-Medium;
362
+ color: #333333;
363
+ }
364
+ .btn-font{
365
+ font:600 16px PingFang-SC-Bold;
366
+ color: #499EDF;
367
+ }
368
+ .btn-color{
369
+ background-color: #FFFFFF;
370
+ border-radius: 10px ;
371
+ border: 1px solid #499EDF;
372
+ }
373
+ .app-text {
374
+ font-size: 12px;
375
+ }
376
+ .panel-self{
377
+ border-radius: 10px;
378
+ border:1px solid #499EDF;
379
+ background-color: #F8F8F8;
380
+ }
381
+ .yybtn-color{
382
+ border-radius: 4px ;
383
+ border: 1px solid #499EDF;
384
+ }
385
+ .qxbtn-color{
386
+ background-color: #FFFFFF;
387
+ border-radius: 4px ;
388
+ border: 1px solid #499EDF;
389
+ }
390
+ .btn-photo{
391
+ border: 0;
392
+ border-radius: 7px;
393
+ background-color: #7dc1f4;
394
+ font: 15px PingFang-SC-Bold;
395
+ height: 20%;
396
+ }
397
+ .div-photo{
398
+ width: auto;
399
+ height: auto;
400
+ /* margin-top: 10px; */
401
+ position: absolute;
402
+ bottom: 10px;
403
+ right: 10px;
404
+ }
405
+ </style>