agilebuilder-ui 1.0.72 → 1.0.74-tmp1
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
|
@@ -61,6 +61,7 @@ function logout() {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
function getCurrentUserPermissionsBySystem(loginName, systemCode) {
|
|
64
|
+
console.log('getCurrentUserPermissionsBySystem----loginName=', loginName, isMobileBrowser())
|
|
64
65
|
if(isMobileBrowser()){
|
|
65
66
|
return getCurrentUserMobilePermissions(loginName)
|
|
66
67
|
} else {
|
|
@@ -220,7 +221,9 @@ function getDevPlatformPermissions(roleCodes) {
|
|
|
220
221
|
|
|
221
222
|
|
|
222
223
|
function getCurrentUserMobilePermissions (loginName) {
|
|
223
|
-
|
|
224
|
+
|
|
225
|
+
console.log('getCurrentUserMobilePermissions----loginName=', loginName, 'window.$vueApp.config.globalProperties.baseAPI=', window.$vueApp.config.globalProperties.baseAPI)
|
|
226
|
+
return request.get(window.$vueApp.config.globalProperties.baseAPI + '/sso/current-users/mobile-permissions?loginName=' + encodeURI(loginName) + '&_t=' + new Date().getTime())
|
|
224
227
|
}
|
|
225
228
|
|
|
226
229
|
export default {
|
|
@@ -81,6 +81,7 @@ const user = {
|
|
|
81
81
|
},
|
|
82
82
|
// 登录
|
|
83
83
|
loginWithValidateCode({ commit }, userInfo) {
|
|
84
|
+
console.log('loginWithValidateCode----userInfo=', userInfo)
|
|
84
85
|
const username = userInfo.username.trim()
|
|
85
86
|
return new Promise((resolve, reject) => {
|
|
86
87
|
ssoService
|
|
@@ -92,6 +93,7 @@ const user = {
|
|
|
92
93
|
userInfo.imageCodeKey
|
|
93
94
|
)
|
|
94
95
|
.then((data) => {
|
|
96
|
+
console.log('loginWithValidateCode2222----data=', data)
|
|
95
97
|
// const data = response.data
|
|
96
98
|
setToken(data.jwt)
|
|
97
99
|
setLanguage(data.language)
|
|
@@ -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>
|