agilebuilder-ui 1.0.75 → 1.0.76
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/lib/super-ui.css +1 -1
- package/lib/super-ui.js +48226 -45726
- package/lib/super-ui.umd.cjs +110 -113
- package/package.json +4 -4
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-app.vue +233 -393
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +6 -6
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-component.vue +0 -13
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-input.vue +32 -1
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload.vue +31 -19
- package/packages/fs-upload-new/src/fs-button-upload.vue +2 -1
- package/packages/fs-upload-new/src/fs-upload-new.vue +65 -0
- package/packages/super-grid/src/custom-formatter.js +1 -0
- package/packages/super-grid/src/super-grid.vue +2 -2
- package/src/api/sso-service.js +4 -1
- package/src/store/modules/user.js +2 -0
- package/src/utils/jump-page-utils.js +7 -1
- package/src/views/layout/EmptyLayout.vue +43 -0
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
multiple="multiple"
|
|
26
26
|
:capture="'environment'"
|
|
27
27
|
name="file"
|
|
28
|
-
:accept="
|
|
28
|
+
:accept="myAccept"
|
|
29
29
|
style="display: none"
|
|
30
30
|
@change="uploadFiles"
|
|
31
31
|
/>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
:capture="'environment'"
|
|
37
37
|
name="file"
|
|
38
38
|
style="display: none"
|
|
39
|
-
:accept="
|
|
39
|
+
:accept="myAccept"
|
|
40
40
|
@change="uploadFiles"
|
|
41
41
|
/>
|
|
42
42
|
</template>
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
type="file"
|
|
48
48
|
multiple="multiple"
|
|
49
49
|
name="file"
|
|
50
|
-
:accept="
|
|
50
|
+
:accept="myAccept"
|
|
51
51
|
style="display: none"
|
|
52
52
|
@change="uploadFiles"
|
|
53
53
|
/>
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
type="file"
|
|
58
58
|
name="file"
|
|
59
59
|
style="display: none"
|
|
60
|
-
:accept="
|
|
60
|
+
:accept="myAccept"
|
|
61
61
|
@change="uploadFiles"
|
|
62
62
|
/>
|
|
63
63
|
</template>
|
|
@@ -264,7 +264,7 @@ function removeFile(param) {
|
|
|
264
264
|
emits('remove', { rmFiles: [file], serverFiles: fileListResult.value, index: param.index })
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
-
function pickBrowserFiles(
|
|
267
|
+
function pickBrowserFiles() {
|
|
268
268
|
if (props.openCameraOrChoosePhoto && props.openCameraOrChoosePhoto === 'openCamera') {
|
|
269
269
|
// 只打开相机
|
|
270
270
|
myAccept.value = 'image/*'
|
|
@@ -324,7 +324,7 @@ async function uploadBrowserFile() {
|
|
|
324
324
|
if (props.beforeUpload && typeof props.beforeUpload === 'function') {
|
|
325
325
|
const isMobile = true
|
|
326
326
|
// eslint-disable-next-line no-useless-call
|
|
327
|
-
isCanUpload = props.beforeUpload({fileObj,
|
|
327
|
+
isCanUpload = props.beforeUpload({fileObj, files:selectFiles, isMobile, pageContext: props.pageContext, configureObj: props.configure})
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
}
|
|
@@ -80,19 +80,6 @@ let baseURL = props.baseURL
|
|
|
80
80
|
|
|
81
81
|
const baseAPI = window.$vueApp.config.globalProperties.baseAPI
|
|
82
82
|
|
|
83
|
-
// const handleRemove = (file: Object) => {
|
|
84
|
-
// console.log(file)
|
|
85
|
-
// }
|
|
86
|
-
|
|
87
|
-
// const handlePictureCardPreview = (file: Object) => {
|
|
88
|
-
// dialogImageUrl.value = file.url!
|
|
89
|
-
// dialogVisible.value = true
|
|
90
|
-
|
|
91
|
-
// }
|
|
92
|
-
|
|
93
|
-
// const handleDownload = (file: Object) => {
|
|
94
|
-
// console.log(file)
|
|
95
|
-
// }
|
|
96
83
|
const fileListResult = ref(props.fileList)
|
|
97
84
|
console.log('file-upload-component---fileListResult=', fileListResult.value)
|
|
98
85
|
function changeFileList(fileList: any) {
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
@close="annexUploadFlag=false"
|
|
22
22
|
>
|
|
23
23
|
<FileUploadMobile
|
|
24
|
+
ref="fileUploadRef"
|
|
24
25
|
:disabled="disabled"
|
|
25
26
|
:fileInfo="fileInfo"
|
|
26
27
|
:systemCode="systemCode"
|
|
@@ -40,6 +41,11 @@
|
|
|
40
41
|
:pageContext="pageContext"
|
|
41
42
|
:configure="configure"
|
|
42
43
|
:openFsUpload="openFsUpload"
|
|
44
|
+
:componentId="componentId"
|
|
45
|
+
:componentName="componentName"
|
|
46
|
+
:listCode="listCode"
|
|
47
|
+
:options="options"
|
|
48
|
+
:openCameraOrChoosePhoto="openCameraOrChoosePhoto"
|
|
43
49
|
@uploadend="uploadendMobile"
|
|
44
50
|
@remove="removeMobileFile"
|
|
45
51
|
/>
|
|
@@ -186,7 +192,7 @@ const openAnnexUpload = ()=>{
|
|
|
186
192
|
|
|
187
193
|
function uploadendMobile(fileList) {
|
|
188
194
|
const fileServerPaths = Array.from(props.fileList,({serverPath})=>serverPath)
|
|
189
|
-
|
|
195
|
+
console.log('uploadendMobile---props.fileList=', JSON.stringify(props.fileList),'fileServerPaths=',fileServerPaths, 'fileList=', JSON.stringify(fileList))
|
|
190
196
|
fileList.forEach(file=>{
|
|
191
197
|
// 如果已经存在就不要重复添加到fileList中了
|
|
192
198
|
if(fileServerPaths.indexOf(file.serverPath) < 0){
|
|
@@ -196,7 +202,9 @@ function uploadendMobile(fileList) {
|
|
|
196
202
|
})
|
|
197
203
|
}
|
|
198
204
|
})
|
|
205
|
+
console.log('uploadendMobile2222---props.fileList=', JSON.stringify(props.fileList),'fileServerPaths=',fileServerPaths, 'fileList=', JSON.stringify(fileList))
|
|
199
206
|
fileNames.value =props.fileList.map((item: any) => item.showName).join(',')
|
|
207
|
+
console.log('uploadendMobile3333---fileNames.value=', fileNames.value)
|
|
200
208
|
props.onSuccess()
|
|
201
209
|
}
|
|
202
210
|
|
|
@@ -215,6 +223,29 @@ function removeMobileFile(param) {
|
|
|
215
223
|
props.onRemove()
|
|
216
224
|
}
|
|
217
225
|
|
|
226
|
+
const userAgent = ref(null)
|
|
227
|
+
const fileUploadRef = ref(null)
|
|
228
|
+
const userAgentOrg = navigator.userAgent
|
|
229
|
+
if (userAgentOrg.indexOf(' uni-app ') > 0) {
|
|
230
|
+
// 表示uni-app中访问的
|
|
231
|
+
userAgent.value = 'app'
|
|
232
|
+
} else {
|
|
233
|
+
// 表示手机浏览器访问的
|
|
234
|
+
userAgent.value = 'browser'
|
|
235
|
+
}
|
|
236
|
+
// 移动端选择文件结束
|
|
237
|
+
function pickFileDone(data) {
|
|
238
|
+
if (userAgent.value === 'app') {
|
|
239
|
+
fileUploadRef.value.pickFileDone(data)
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
// 移动端上传文件结束
|
|
243
|
+
function uploadFileDone(data) {
|
|
244
|
+
if (userAgent.value === 'app') {
|
|
245
|
+
fileUploadRef.value.uploadFileDone(data)
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
defineExpose({pickFileDone,uploadFileDone})
|
|
218
249
|
</script>
|
|
219
250
|
|
|
220
251
|
<style lang="scss" scoped></style>
|
|
@@ -1,30 +1,41 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
|
|
3
|
+
<file-upload-app
|
|
4
4
|
v-if="userAgent === 'app'"
|
|
5
5
|
ref="fileUploadRef"
|
|
6
|
-
:file-
|
|
7
|
-
:system-code="systemCode"
|
|
6
|
+
:file-list="fileList"
|
|
8
7
|
:multiple="multiple"
|
|
9
8
|
:disabled="disabled"
|
|
10
|
-
:
|
|
11
|
-
:
|
|
12
|
-
:
|
|
9
|
+
:fileInfo="fileInfo"
|
|
10
|
+
:systemCode="systemCode"
|
|
11
|
+
:accept="accept"
|
|
12
|
+
:limit="limit"
|
|
13
|
+
:limitFileSize="limitFileSize"
|
|
14
|
+
:placeholder="placeholder"
|
|
15
|
+
:action="action"
|
|
16
|
+
:headers="headers"
|
|
17
|
+
:beforeUpload="beforeUpload"
|
|
18
|
+
:onSuccess="onSuccess"
|
|
19
|
+
:beforeRemove="beforeRemove"
|
|
20
|
+
:onRemove="onRemove"
|
|
21
|
+
:beforeDownload="beforeDownload"
|
|
22
|
+
:pageContext="pageContext"
|
|
23
|
+
:configure="configure"
|
|
24
|
+
:openFsUpload="openFsUpload"
|
|
25
|
+
:componentId="componentId"
|
|
26
|
+
:componentName="componentName"
|
|
27
|
+
:listCode="listCode"
|
|
13
28
|
:options="options"
|
|
14
|
-
:
|
|
29
|
+
:openCameraOrChoosePhoto="openCameraOrChoosePhoto"
|
|
15
30
|
@uploadend="uploadedFile"
|
|
16
31
|
@remove="removeFile"
|
|
17
|
-
|
|
18
|
-
@close="$emit('close')"
|
|
19
|
-
/> -->
|
|
20
|
-
<!-- v-if="userAgent === 'browser'" -->
|
|
32
|
+
/>
|
|
21
33
|
<file-upload-browser
|
|
34
|
+
v-else-if="userAgent === 'browser'"
|
|
22
35
|
ref="fileUploadRef"
|
|
23
36
|
:file-list="fileList"
|
|
24
37
|
:multiple="multiple"
|
|
25
38
|
:disabled="disabled"
|
|
26
|
-
:open-camera-or-choose-photo="openCameraOrChoosePhoto"
|
|
27
|
-
:options="options"
|
|
28
39
|
:fileInfo="fileInfo"
|
|
29
40
|
:systemCode="systemCode"
|
|
30
41
|
:accept="accept"
|
|
@@ -41,7 +52,11 @@
|
|
|
41
52
|
:pageContext="pageContext"
|
|
42
53
|
:configure="configure"
|
|
43
54
|
:openFsUpload="openFsUpload"
|
|
44
|
-
|
|
55
|
+
:componentId="componentId"
|
|
56
|
+
:componentName="componentName"
|
|
57
|
+
:listCode="listCode"
|
|
58
|
+
:options="options"
|
|
59
|
+
:openCameraOrChoosePhoto="openCameraOrChoosePhoto"
|
|
45
60
|
@uploadend="uploadedFile"
|
|
46
61
|
@remove="removeFile"
|
|
47
62
|
/>
|
|
@@ -51,7 +66,7 @@
|
|
|
51
66
|
import { ref, defineEmits } from 'vue'
|
|
52
67
|
import { ElMessage } from 'element-plus'
|
|
53
68
|
import { useI18n } from 'vue-i18n'
|
|
54
|
-
|
|
69
|
+
import FileUploadApp from './file-upload-app.vue'
|
|
55
70
|
import FileUploadBrowser from './file-upload-browser.vue'
|
|
56
71
|
import apis from './api.js'
|
|
57
72
|
|
|
@@ -223,10 +238,6 @@ function removeFile({ rmFiles, serverFiles, newFiles }) {
|
|
|
223
238
|
emits('remove', { rmFiles, serverFiles, newFiles })
|
|
224
239
|
}
|
|
225
240
|
}
|
|
226
|
-
// 选择文件之后的事件
|
|
227
|
-
function pickupFiles(files) {
|
|
228
|
-
emits('pickup-file', files)
|
|
229
|
-
}
|
|
230
241
|
// 移动端选择文件结束
|
|
231
242
|
function pickFileDone(data) {
|
|
232
243
|
if (userAgent.value === 'app') {
|
|
@@ -244,6 +255,7 @@ function clearTempFile() {
|
|
|
244
255
|
fileUploadRef.value.clearQueenFile()
|
|
245
256
|
}
|
|
246
257
|
}
|
|
258
|
+
defineExpose({pickFileDone,uploadFileDone})
|
|
247
259
|
</script>
|
|
248
260
|
|
|
249
261
|
<style lang="scss" scoped></style>
|
|
@@ -122,7 +122,8 @@ if (!props.headers || !props.headers['Authorization']) {
|
|
|
122
122
|
props.headers.Authorization = getToken()
|
|
123
123
|
}
|
|
124
124
|
const handleBeforeUpload = (file: File) => {
|
|
125
|
-
|
|
125
|
+
const isMobile = false
|
|
126
|
+
return props.beforeUpload({fileObj: file, files:[file], isMobile, pageContext: props.pageContext, configureObj: props.configure})
|
|
126
127
|
}
|
|
127
128
|
const onSuccess = (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => {
|
|
128
129
|
// eslint-disable-next-line vue/no-mutating-props
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
/>
|
|
57
57
|
<FileUploadInputMobile
|
|
58
58
|
v-else-if="isMobile && displayType === 'input'"
|
|
59
|
+
ref="fileUploadRef"
|
|
59
60
|
:disabled="disabled"
|
|
60
61
|
:fileInfo="fileInfo"
|
|
61
62
|
:systemCode="systemCode"
|
|
@@ -75,8 +76,14 @@
|
|
|
75
76
|
:pageContext="pageContext"
|
|
76
77
|
:configure="configure"
|
|
77
78
|
:openFsUpload="openFsUpload"
|
|
79
|
+
:componentId="componentId"
|
|
80
|
+
:componentName="componentName"
|
|
81
|
+
:listCode="listCode"
|
|
82
|
+
:options="options"
|
|
83
|
+
:openCameraOrChoosePhoto="openCameraOrChoosePhoto"
|
|
78
84
|
/>
|
|
79
85
|
<FileUploadMobile v-else-if="isMobile"
|
|
86
|
+
ref="fileUploadRef"
|
|
80
87
|
:disabled="disabled"
|
|
81
88
|
:fileInfo="fileInfo"
|
|
82
89
|
:systemCode="systemCode"
|
|
@@ -96,6 +103,11 @@
|
|
|
96
103
|
:pageContext="pageContext"
|
|
97
104
|
:configure="configure"
|
|
98
105
|
:openFsUpload="openFsUpload"
|
|
106
|
+
:componentId="componentId"
|
|
107
|
+
:componentName="componentName"
|
|
108
|
+
:listCode="listCode"
|
|
109
|
+
:options="options"
|
|
110
|
+
:openCameraOrChoosePhoto="openCameraOrChoosePhoto"
|
|
99
111
|
@uploadend="uploadendMobile"
|
|
100
112
|
@remove="removeMobileFile"
|
|
101
113
|
/>
|
|
@@ -193,6 +205,34 @@ const props = defineProps({
|
|
|
193
205
|
configure: {
|
|
194
206
|
type: Object,
|
|
195
207
|
default: () => ({})
|
|
208
|
+
},
|
|
209
|
+
// 组件id,在表单或列表中应该唯一,一般传字段名即可
|
|
210
|
+
componentId: {
|
|
211
|
+
type: String,
|
|
212
|
+
default: function () {
|
|
213
|
+
return 'file-upload'
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
// 组件名称,一般是字段label
|
|
217
|
+
componentName: {
|
|
218
|
+
type: String,
|
|
219
|
+
default: function () {
|
|
220
|
+
return 'file-upload'
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
options: {
|
|
224
|
+
type: Object,
|
|
225
|
+
default: null
|
|
226
|
+
},
|
|
227
|
+
// 列表编码
|
|
228
|
+
listCode: {
|
|
229
|
+
type: String,
|
|
230
|
+
default: null
|
|
231
|
+
},
|
|
232
|
+
// 打开相机和相册选项,默认是都可以打开
|
|
233
|
+
openCameraOrChoosePhoto: {
|
|
234
|
+
type: String,
|
|
235
|
+
default: 'openCameraAndChoosePhoto'
|
|
196
236
|
}
|
|
197
237
|
})
|
|
198
238
|
const isMobile = ref(isMobileBrowser())
|
|
@@ -259,4 +299,29 @@ function removeMobileFile(param) {
|
|
|
259
299
|
}
|
|
260
300
|
props.onRemove()
|
|
261
301
|
}
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
const userAgent = ref(null)
|
|
305
|
+
const fileUploadRef = ref(null)
|
|
306
|
+
const userAgentOrg = navigator.userAgent
|
|
307
|
+
if (userAgentOrg.indexOf(' uni-app ') > 0) {
|
|
308
|
+
// 表示uni-app中访问的
|
|
309
|
+
userAgent.value = 'app'
|
|
310
|
+
} else {
|
|
311
|
+
// 表示手机浏览器访问的
|
|
312
|
+
userAgent.value = 'browser'
|
|
313
|
+
}
|
|
314
|
+
// 移动端选择文件结束
|
|
315
|
+
function pickFileDone(data) {
|
|
316
|
+
if (userAgent.value === 'app') {
|
|
317
|
+
fileUploadRef.value.pickFileDone(data)
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
// 移动端上传文件结束
|
|
321
|
+
function uploadFileDone(data) {
|
|
322
|
+
if (userAgent.value === 'app') {
|
|
323
|
+
fileUploadRef.value.uploadFileDone(data)
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
defineExpose({pickFileDone,uploadFileDone})
|
|
262
327
|
</script>
|
|
@@ -2965,14 +2965,14 @@ export default {
|
|
|
2965
2965
|
const popPageSetting = openPageParams
|
|
2966
2966
|
if(this.pageContext){
|
|
2967
2967
|
// 新页面设计组件中弹框或刷新区域时
|
|
2968
|
-
|
|
2968
|
+
const isMobile = this.isMobile
|
|
2969
|
+
if (jumpMode === 'popup' || jumpMode === 'refresh' || (isMobile && jumpMode === 'newTab')) {
|
|
2969
2970
|
// 弹出页面
|
|
2970
2971
|
const gridParams = store.get(this.code)
|
|
2971
2972
|
this.jumpPageSetting = popPageSetting
|
|
2972
2973
|
const isSubTableShowPage = gridParams.isSubTableShowPage
|
|
2973
2974
|
// 每页显示多少条
|
|
2974
2975
|
const pageSize = gridParams.pagination && gridParams.pagination.pageSize
|
|
2975
|
-
const isMobile = this.isMobile
|
|
2976
2976
|
const row = popPageSetting.row
|
|
2977
2977
|
const eventParams = {
|
|
2978
2978
|
position: popPageSetting._position,
|
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)
|
|
@@ -658,8 +658,14 @@ function jumpWithSuperPage(
|
|
|
658
658
|
const popPageSetting = {
|
|
659
659
|
_path: path,
|
|
660
660
|
pageCode: pageCode,
|
|
661
|
-
customSystem: system.code
|
|
661
|
+
customSystem: system.code,
|
|
662
|
+
jumpMode: jumpMode
|
|
662
663
|
}
|
|
664
|
+
console.log(
|
|
665
|
+
'----jumpWithSuperPage---',
|
|
666
|
+
isMobile,
|
|
667
|
+
popPageSetting
|
|
668
|
+
)
|
|
663
669
|
if(!isMobile){
|
|
664
670
|
// 不是移动端时直接open打开pc新页签
|
|
665
671
|
window.open(path)
|
|
@@ -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>
|