agilebuilder-ui 1.0.72 → 1.0.73
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.
package/package.json
CHANGED
package/src/api/sso-service.js
CHANGED
|
@@ -220,7 +220,7 @@ function getDevPlatformPermissions(roleCodes) {
|
|
|
220
220
|
|
|
221
221
|
|
|
222
222
|
function getCurrentUserMobilePermissions (loginName) {
|
|
223
|
-
return request.get(
|
|
223
|
+
return request.get(window.$vueApp.config.globalProperties.baseAPI + '/sso/current-users/mobile-permissions?loginName=' + encodeURI(loginName) + '&_t=' + new Date().getTime())
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
export default {
|
|
@@ -1,3 +1,46 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<router-view />
|
|
3
3
|
</template>
|
|
4
|
+
<script>
|
|
5
|
+
import eventBus from '../../../src/utils/eventBus'
|
|
6
|
+
export default {
|
|
7
|
+
created(){
|
|
8
|
+
window.addEventListener('message', this.receiveMessage, false)
|
|
9
|
+
},
|
|
10
|
+
destroyed () {
|
|
11
|
+
window.removeEventListener('message', this.receiveMessage, false)
|
|
12
|
+
},
|
|
13
|
+
methods: {
|
|
14
|
+
receiveMessage (event) {
|
|
15
|
+
const result = event.data
|
|
16
|
+
console.log('receiveMessage-----result111=', result)
|
|
17
|
+
if (result && typeof result === 'string') {
|
|
18
|
+
console.log('receiveMessage-----result2222=', result)
|
|
19
|
+
// console.log('接收手机端传过来的信息--receiveMessage===', result)
|
|
20
|
+
try {
|
|
21
|
+
const data = JSON.parse(result)
|
|
22
|
+
// console.log('接收手机端传过来的信息--data=', data)
|
|
23
|
+
const type = data.type // 'pickFileDone' 选择文件完成,'uploadFileDone' 上传文件完成
|
|
24
|
+
console.log('receiveMessage-----result3333=', type, 'data.files=', data.files)
|
|
25
|
+
// console.log('接收手机端传过来的信息--type=', type)
|
|
26
|
+
if (type && type === 'onResize') {
|
|
27
|
+
// 横竖屏切换时重新计算高度
|
|
28
|
+
eventBus.$emit('onResize')
|
|
29
|
+
} else if (type && type === 'pickFileDone') {
|
|
30
|
+
// 选择文件完成
|
|
31
|
+
console.log('receiveMessage-----result4444=', type)
|
|
32
|
+
// fileNames:[{name:'xx',base64Path:'xxx'},{name:'xxx',base64Path:'xxxxx'}]
|
|
33
|
+
eventBus.$emit('pickFileDone', data)
|
|
34
|
+
} else if (type && type === 'uploadFileDone') {
|
|
35
|
+
eventBus.$emit('uploadFileDone', data)
|
|
36
|
+
} else if (type && type === 'scan') {
|
|
37
|
+
eventBus.$emit('scan', data)
|
|
38
|
+
}
|
|
39
|
+
} catch (error) {
|
|
40
|
+
console.log(error)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
import { Sidebar, AppMain, Breadcrumb } from './components'
|
|
18
18
|
import ResizeMixin from './mixin/ResizeHandler'
|
|
19
19
|
import { isShowMenuRoute } from '../../../src/utils/common-util'
|
|
20
|
+
import eventBus from '../../../src/utils/eventBus'
|
|
20
21
|
|
|
21
22
|
export default {
|
|
22
23
|
name: 'Layout',
|
|
@@ -49,10 +50,46 @@ export default {
|
|
|
49
50
|
}
|
|
50
51
|
},
|
|
51
52
|
},
|
|
53
|
+
created(){
|
|
54
|
+
window.addEventListener('message', this.receiveMessage, false)
|
|
55
|
+
},
|
|
56
|
+
destroyed () {
|
|
57
|
+
window.removeEventListener('message', this.receiveMessage, false)
|
|
58
|
+
},
|
|
52
59
|
methods: {
|
|
53
60
|
handleClickOutside() {
|
|
54
61
|
this.$store.dispatch('closeSidebar', { withoutAnimation: false })
|
|
55
62
|
},
|
|
63
|
+
receiveMessage (event) {
|
|
64
|
+
const result = event.data
|
|
65
|
+
console.log('receiveMessage-----result111=', result)
|
|
66
|
+
if (result && typeof result === 'string') {
|
|
67
|
+
console.log('receiveMessage-----result2222=', result)
|
|
68
|
+
// console.log('接收手机端传过来的信息--receiveMessage===', result)
|
|
69
|
+
try {
|
|
70
|
+
const data = JSON.parse(result)
|
|
71
|
+
// console.log('接收手机端传过来的信息--data=', data)
|
|
72
|
+
const type = data.type // 'pickFileDone' 选择文件完成,'uploadFileDone' 上传文件完成
|
|
73
|
+
console.log('receiveMessage-----result3333=', type, 'data.files=', data.files)
|
|
74
|
+
// console.log('接收手机端传过来的信息--type=', type)
|
|
75
|
+
if (type && type === 'onResize') {
|
|
76
|
+
// 横竖屏切换时重新计算高度
|
|
77
|
+
eventBus.$emit('onResize')
|
|
78
|
+
} else if (type && type === 'pickFileDone') {
|
|
79
|
+
// 选择文件完成
|
|
80
|
+
console.log('receiveMessage-----result4444=', type)
|
|
81
|
+
// fileNames:[{name:'xx',base64Path:'xxx'},{name:'xxx',base64Path:'xxxxx'}]
|
|
82
|
+
eventBus.$emit('pickFileDone', data)
|
|
83
|
+
} else if (type && type === 'uploadFileDone') {
|
|
84
|
+
eventBus.$emit('uploadFileDone', data)
|
|
85
|
+
} else if (type && type === 'scan') {
|
|
86
|
+
eventBus.$emit('scan', data)
|
|
87
|
+
}
|
|
88
|
+
} catch (error) {
|
|
89
|
+
console.log(error)
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
56
93
|
},
|
|
57
94
|
}
|
|
58
95
|
</script>
|