resolver-egretimp-plus 0.0.21 → 0.0.29
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/dist/h5/index.js +1 -1
- package/dist/theme/element/index.css +1 -1
- package/dist/theme/element/src/components/form.scss +4 -0
- package/dist/web/index.js +1 -1
- package/package.json +3 -1
- package/scripts/webpack.config.js +3 -1
- package/src/api/builtIn.js +3 -1
- package/src/components/helper/button.js +2 -4
- package/src/components/helper/resolver.js +29 -0
- package/src/components/icons/question-filled.vue +3 -2
- package/src/components/loading/loading.vue +3 -5
- package/src/components/packages-H5/CmiButton.vue +5 -2
- package/src/components/packages-H5/CmiCell.vue +10 -7
- package/src/components/packages-web/ElButton.vue +3 -1
- package/src/enums/index.js +10 -3
- package/src/hooks/pageConfig.js +49 -71
- package/src/index.jsx +52 -2
- package/src/resolver-H5.vue +18 -2
- package/src/resolver-common.vue +45 -0
- package/src/resolver-web.vue +17 -2
- package/src/theme/element/components/form.scss +4 -0
- package/src/utils/cipher.js +141 -0
- package/src/utils/render.jsx +6 -11
- package/src/utils/request.js +98 -8
- package/src/components/helper/button-H5.js +0 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resolver-egretimp-plus",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"description": "交付体验渲染",
|
|
5
5
|
"main": "./dist/web/index.js",
|
|
6
6
|
"module": "./dist/web/index.js",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"babel-loader": "^9.1.3",
|
|
29
29
|
"consola": "^3.2.3",
|
|
30
30
|
"core-js-pure": "^3.38.1",
|
|
31
|
+
"crypto-js": "^4.2.0",
|
|
31
32
|
"css-loader": "^7.1.2",
|
|
32
33
|
"dayjs": "^1.11.13",
|
|
33
34
|
"element-plus": "^2.7.6",
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
"lodash-es": "^4.17.21",
|
|
41
42
|
"mini-css-extract-plugin": "^2.9.0",
|
|
42
43
|
"node-sass": "^9.0.0",
|
|
44
|
+
"qs": "^6.13.0",
|
|
43
45
|
"sass": "1.77.6",
|
|
44
46
|
"sass-loader": "^14.2.1",
|
|
45
47
|
"vue-loader": "^17.4.2",
|
|
@@ -71,7 +71,9 @@ module.exports = {
|
|
|
71
71
|
},
|
|
72
72
|
externals: {
|
|
73
73
|
vue: 'vue',
|
|
74
|
-
'cmid
|
|
74
|
+
'cmid': 'cmid',
|
|
75
|
+
'cmid/lib/toast': 'cmid/lib/toast',
|
|
76
|
+
'cmid/lib/fullloading': 'cmid/lib/fullloading',
|
|
75
77
|
'element-plus': 'element-plus',
|
|
76
78
|
'vue-router': 'vue-router',
|
|
77
79
|
'element-plus/es/hooks/index.mjs': 'element-plus/es/hooks/index.mjs',
|
package/src/api/builtIn.js
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export const QUERY_PAGE_CONFIG_DATA = '/sa-lcp/api/v1/pageConfig/queryPageConfigData'
|
|
2
|
-
export const LCP_LOGIN = '/sa-lcp/login'
|
|
2
|
+
export const LCP_LOGIN = '/sa-lcp/login'
|
|
3
|
+
export const GET_SYS_PARAM_CACHE = '/sa-lcp/api/v1/sysparam/getSysParamCache'
|
|
4
|
+
export const REFRESH_TOKEN = '/sa-lcp/changePwd/refreshToken'
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export async function dispatchClickEvents ({serviceList = [], axiosInstance, reqData}) {
|
|
1
|
+
export async function dispatchClickEvents ({serviceList = [], axiosInstance, reqData, messageInstance}) {
|
|
4
2
|
for (let i = 0; i < serviceList.length; i++) {
|
|
5
3
|
const service = serviceList[i]
|
|
6
4
|
const url = service.serviceCode
|
|
@@ -10,7 +8,7 @@ export async function dispatchClickEvents ({serviceList = [], axiosInstance, re
|
|
|
10
8
|
data: reqData
|
|
11
9
|
}))
|
|
12
10
|
if (!ret?.data?.success) {
|
|
13
|
-
|
|
11
|
+
messageInstance?.value?.error(ret?.data?.resultMessage || '')
|
|
14
12
|
await Promise.reject()
|
|
15
13
|
}
|
|
16
14
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export async function executeLoadServices(services = [], { axiosInstance, messageInstance, reqData, respCb }) {
|
|
2
|
+
const loadServices = services.filter(ser => ser.eventType == '1')
|
|
3
|
+
for (let i = 0; i < loadServices.length; i++) {
|
|
4
|
+
const service = loadServices[i]
|
|
5
|
+
const url = service.serviceCode
|
|
6
|
+
const ret = await (axiosInstance.value && axiosInstance.value({
|
|
7
|
+
url,
|
|
8
|
+
method: "post",
|
|
9
|
+
data: reqData
|
|
10
|
+
}))
|
|
11
|
+
// const ret = await (new Promise((res) => {
|
|
12
|
+
// setTimeout(() => {
|
|
13
|
+
// res({
|
|
14
|
+
// data: {
|
|
15
|
+
// success: true,
|
|
16
|
+
// result: {
|
|
17
|
+
// studentId: 121212
|
|
18
|
+
// }
|
|
19
|
+
// }
|
|
20
|
+
// })
|
|
21
|
+
// }, 3000);
|
|
22
|
+
// }))
|
|
23
|
+
if (!ret?.data?.success) {
|
|
24
|
+
messageInstance?.value?.error(ret?.data?.resultMessage || '')
|
|
25
|
+
await Promise.reject()
|
|
26
|
+
}
|
|
27
|
+
respCb && respCb(ret?.data?.result)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"/></svg>
|
|
3
|
+
<!-- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
3
4
|
<path
|
|
4
5
|
fill="currentColor"
|
|
5
6
|
d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784 49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.97 51.97 0 0 0-15.488-38.016 55.94 55.94 0 0 0-39.424-14.784"
|
|
6
7
|
/>
|
|
7
|
-
</svg>
|
|
8
|
+
</svg> -->
|
|
8
9
|
</template>
|
|
9
10
|
<script setup>
|
|
10
11
|
defineOptions({
|
|
@@ -5,21 +5,19 @@
|
|
|
5
5
|
<span></span>
|
|
6
6
|
<span></span>
|
|
7
7
|
<span></span>
|
|
8
|
-
<div class="word" style="display: block">{{ worldTip }}</div>
|
|
8
|
+
<!-- <div class="word" style="display: block">{{ worldTip }}</div> -->
|
|
9
9
|
</div>
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
12
|
</template>
|
|
13
13
|
<script>
|
|
14
14
|
/* eslint-disable */
|
|
15
|
-
import { useLocaleStoreWithOut } from '@/stores/modules/locale'
|
|
16
15
|
import { computed } from 'vue'
|
|
17
16
|
export default {
|
|
18
17
|
name: 'CmiLoading',
|
|
19
|
-
setup() {
|
|
20
|
-
const localeStore = useLocaleStoreWithOut()
|
|
18
|
+
setup(props) {
|
|
21
19
|
const lang = computed(() => {
|
|
22
|
-
return
|
|
20
|
+
return props.lang
|
|
23
21
|
})
|
|
24
22
|
return {
|
|
25
23
|
lang
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { defineProps, inject, getCurrentInstance, computed, useAttrs } from 'vue'
|
|
3
3
|
import { commonPropsType } from '../../utils/index.js'
|
|
4
4
|
import { useRoute } from 'vue-router'
|
|
5
|
-
import { dispatchClickEvents } from '../helper/button
|
|
5
|
+
import { dispatchClickEvents } from '../helper/button.js';
|
|
6
6
|
|
|
7
7
|
const appContext = getCurrentInstance()?.appContext
|
|
8
8
|
|
|
@@ -41,6 +41,7 @@ const label = computed(() => {
|
|
|
41
41
|
const route = useRoute()
|
|
42
42
|
const buttonActions = inject('buttonActions', {})
|
|
43
43
|
|
|
44
|
+
const messageInstance = inject('_messageInstance')
|
|
44
45
|
const dynamicMapComp = inject('dynamicMapComp')
|
|
45
46
|
const hireRelatMapRules = inject('hireRelatMapRules')
|
|
46
47
|
const components = inject('components')
|
|
@@ -71,7 +72,9 @@ const buttonAction = () => {
|
|
|
71
72
|
if (PageServiceMapVOList?.length) {
|
|
72
73
|
dispatchClickEvents({
|
|
73
74
|
serviceList: PageServiceMapVOList,
|
|
74
|
-
axiosInstance: _axiosInstance
|
|
75
|
+
axiosInstance: _axiosInstance,
|
|
76
|
+
reqData: rootValue?.value,
|
|
77
|
+
messageInstance
|
|
75
78
|
})
|
|
76
79
|
}
|
|
77
80
|
}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed, defineProps, inject, useAttrs } from 'vue'
|
|
3
|
-
import { commonPropsType } from '../../utils/index.js'
|
|
3
|
+
import { commonPropsType, hasOwn } from '../../utils/index.js'
|
|
4
4
|
|
|
5
5
|
const lang = inject('lang')
|
|
6
6
|
const modelValue = defineModel()
|
|
7
7
|
const props = defineProps({
|
|
8
8
|
...commonPropsType,
|
|
9
9
|
})
|
|
10
|
+
|
|
10
11
|
const calcProps = computed(() => {
|
|
11
12
|
return {
|
|
12
13
|
title: lang?.value?.indexOf('zh') > -1 ? props.config?.metaNameZh : props.config?.metaNameEn,
|
|
13
14
|
desc: modelValue.value || props.config?.desc,
|
|
14
15
|
content: props.config?.content,
|
|
15
|
-
to: props.config?.
|
|
16
|
+
to: props.config?.toHref,
|
|
16
17
|
islink: props.config?.islink === '1',
|
|
17
18
|
icon: props.config?.icon,
|
|
18
|
-
selfadaption: props.config
|
|
19
|
+
selfadaption: hasOwn(props.config, 'selfadaption') ? props.config.selfadaption === '1' : true,
|
|
19
20
|
noborder: props.noborder === '1',
|
|
20
21
|
}
|
|
21
22
|
})
|
|
@@ -27,8 +28,10 @@ const onChange = (e) => {
|
|
|
27
28
|
</script>
|
|
28
29
|
|
|
29
30
|
<template>
|
|
30
|
-
<cmi-cell
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
<cmi-cell-group>
|
|
32
|
+
<cmi-cell
|
|
33
|
+
:value="modelValue" v-bind="{ ...attrs, ...calcProps}"
|
|
34
|
+
@change="onChange"
|
|
35
|
+
></cmi-cell>
|
|
36
|
+
</cmi-cell-group>
|
|
34
37
|
</template>
|
|
@@ -53,6 +53,7 @@ const label = computed(() => {
|
|
|
53
53
|
const route = useRoute()
|
|
54
54
|
const buttonActions = inject('buttonActions', {})
|
|
55
55
|
|
|
56
|
+
const messageInstance = inject('_messageInstance')
|
|
56
57
|
const dynamicMapComp = inject('dynamicMapComp')
|
|
57
58
|
const hireRelatMapRules = inject('hireRelatMapRules')
|
|
58
59
|
const components = inject('components')
|
|
@@ -83,7 +84,8 @@ const buttonAction = () => {
|
|
|
83
84
|
dispatchClickEvents({
|
|
84
85
|
serviceList: PageServiceMapVOList,
|
|
85
86
|
axiosInstance: _axiosInstance,
|
|
86
|
-
reqData: rootValue?.value
|
|
87
|
+
reqData: rootValue?.value,
|
|
88
|
+
messageInstance
|
|
87
89
|
})
|
|
88
90
|
}
|
|
89
91
|
}
|
package/src/enums/index.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export const
|
|
1
|
+
import { LCP_LOGIN } from "../api/builtIn"
|
|
2
|
+
|
|
3
|
+
export const USER_NAME = 'lcpsupport'
|
|
4
|
+
export const PASSWORD = '8ik,*IK<'
|
|
5
|
+
export const USER_TYPE = '1'
|
|
6
|
+
export const AUTH_CODE = '9887'
|
|
7
|
+
|
|
8
|
+
export const NOT_AUTH_APIS = [
|
|
9
|
+
LCP_LOGIN
|
|
10
|
+
]
|
package/src/hooks/pageConfig.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { parsePageConfig } from "../utils"
|
|
2
2
|
import { ref } from 'vue'
|
|
3
|
+
import { buildInRequest } from "../utils/request"
|
|
4
|
+
import { GET_SYS_PARAM_CACHE, QUERY_PAGE_CONFIG_DATA } from "../api/builtIn"
|
|
3
5
|
|
|
4
6
|
export function usePageConfig() {
|
|
5
7
|
const pageConfigRef = ref(null)
|
|
@@ -19,74 +21,50 @@ export function usePageConfig() {
|
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
// },
|
|
70
|
-
// {
|
|
71
|
-
// id: 3,
|
|
72
|
-
// label: 'Level one 3',
|
|
73
|
-
// children: [
|
|
74
|
-
// {
|
|
75
|
-
// id: 7,
|
|
76
|
-
// label: 'Level two 3-1',
|
|
77
|
-
// },
|
|
78
|
-
// {
|
|
79
|
-
// id: 8,
|
|
80
|
-
// label: 'Level two 3-2',
|
|
81
|
-
// },
|
|
82
|
-
// ],
|
|
83
|
-
// },
|
|
84
|
-
// ]
|
|
85
|
-
// })
|
|
86
|
-
// return {
|
|
87
|
-
// pageConfig,
|
|
88
|
-
// getPageConfig,
|
|
89
|
-
// getSelects,
|
|
90
|
-
// selects
|
|
91
|
-
// }
|
|
92
|
-
// }
|
|
24
|
+
export function useBuildInData(messageTipInstance, loadingInstance) {
|
|
25
|
+
const pageConfig = ref(null)
|
|
26
|
+
function getPageConfig(reqData) {
|
|
27
|
+
if (loadingInstance.start && typeof loadingInstance.start === 'function') {
|
|
28
|
+
loadingInstance.start()
|
|
29
|
+
} else if (loadingInstance.show && typeof loadingInstance.show === 'function') {
|
|
30
|
+
loadingInstance.show()
|
|
31
|
+
}
|
|
32
|
+
buildInRequest(QUERY_PAGE_CONFIG_DATA, reqData).then(ret => {
|
|
33
|
+
if (ret.data.success) {
|
|
34
|
+
pageConfig.value = ret.data.result
|
|
35
|
+
getSelects(ret.data.result?.pmBusinessIdentityVO?.tenantId)
|
|
36
|
+
return
|
|
37
|
+
}
|
|
38
|
+
messageTipInstance?.error(ret.data.resultMessage)
|
|
39
|
+
}).catch(() => {
|
|
40
|
+
if (loadingInstance.finish && typeof loadingInstance.finish === 'function') {
|
|
41
|
+
loadingInstance.finish()
|
|
42
|
+
} else if (loadingInstance.hide && typeof loadingInstance.hide === 'function') {
|
|
43
|
+
loadingInstance.hide()
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
const selects = ref({})
|
|
48
|
+
function getSelects(tenantId) {
|
|
49
|
+
buildInRequest(GET_SYS_PARAM_CACHE, {
|
|
50
|
+
tenantId
|
|
51
|
+
}).then(ret => {
|
|
52
|
+
if (ret.data.success) {
|
|
53
|
+
selects.value = JSON.parse(ret.data.result || '{}')
|
|
54
|
+
return
|
|
55
|
+
}
|
|
56
|
+
messageTipInstance?.error(ret.data.resultMessage)
|
|
57
|
+
}).finally(() => {
|
|
58
|
+
if (loadingInstance.finish && typeof loadingInstance.finish === 'function') {
|
|
59
|
+
loadingInstance.finish()
|
|
60
|
+
} else if (loadingInstance.hide && typeof loadingInstance.hide === 'function') {
|
|
61
|
+
loadingInstance.hide()
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
pageConfig,
|
|
67
|
+
getPageConfig,
|
|
68
|
+
selects
|
|
69
|
+
}
|
|
70
|
+
}
|
package/src/index.jsx
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { provide, toRef, watch, computed, ref, defineExpose, reactive, getCurrentInstance } from "vue"
|
|
2
2
|
import Renderer from './renderer.jsx'
|
|
3
3
|
// import './style/index.scss'
|
|
4
|
-
import { usePageConfig } from './hooks/pageConfig'
|
|
4
|
+
import { useBuildInData, usePageConfig } from './hooks/pageConfig'
|
|
5
5
|
import { toValidate } from './utils/valid.js'
|
|
6
6
|
import { MODE } from "./utils/const.js"
|
|
7
7
|
import { generateRequester } from "./utils/request.js"
|
|
8
|
+
import { executeLoadServices } from "./components/helper/resolver.js"
|
|
8
9
|
export default {
|
|
9
10
|
name: 'Resolver',
|
|
10
11
|
props: {
|
|
@@ -72,9 +73,22 @@ export default {
|
|
|
72
73
|
getNativeComps: {
|
|
73
74
|
type: Function,
|
|
74
75
|
default: () => ({composeComponents: {}})
|
|
76
|
+
},
|
|
77
|
+
loadingInstance: {
|
|
78
|
+
type: Object,
|
|
79
|
+
default: () => null
|
|
80
|
+
},
|
|
81
|
+
messageInstance: {
|
|
82
|
+
type: Object,
|
|
83
|
+
default: () => null
|
|
84
|
+
},
|
|
85
|
+
loadEvnetsReq: {
|
|
86
|
+
type: Object,
|
|
87
|
+
default: () => ({})
|
|
75
88
|
}
|
|
76
89
|
},
|
|
77
90
|
setup(props, { emit, attrs, expose }) {
|
|
91
|
+
let nativeDataLoad = ref(false)
|
|
78
92
|
let axiosInstance = ref(props.axiosInstance)
|
|
79
93
|
watch(() => {
|
|
80
94
|
return props.axiosConfig
|
|
@@ -87,14 +101,50 @@ export default {
|
|
|
87
101
|
}, {
|
|
88
102
|
immediate: true
|
|
89
103
|
})
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
const dataLoad = computed(() => {
|
|
107
|
+
return props.dataLoad || nativeDataLoad.value
|
|
108
|
+
})
|
|
90
109
|
const instance = getCurrentInstance()
|
|
91
110
|
const { initPageConfig, pageConfigRef, mapCompRef, hireRelatMapRulesRef } = usePageConfig()
|
|
111
|
+
|
|
92
112
|
initPageConfig(props.config, props.lang, props.polyfillConfigs, instance, props.isH5)
|
|
113
|
+
// 触发加载事件执行
|
|
114
|
+
executeLoadServices(
|
|
115
|
+
props.config?.pmPageServiceMapVOList || [],
|
|
116
|
+
{
|
|
117
|
+
messageInstance: toRef(props, 'messageInstance'),
|
|
118
|
+
axiosInstance,
|
|
119
|
+
reqData: props.loadEvnetsReq,
|
|
120
|
+
respCb: (result) => {
|
|
121
|
+
nativeDataLoad.value = true
|
|
122
|
+
emit('update:modelValue', result)
|
|
123
|
+
emit('loadEvnetsCompleted', result)
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
)
|
|
93
127
|
|
|
94
128
|
watch(toRef(props, 'config'), () => {
|
|
95
129
|
initPageConfig(props.config, props.lang, props.polyfillConfigs, instance, props.isH5)
|
|
130
|
+
executeLoadServices(
|
|
131
|
+
props.config?.pmPageServiceMapVOList || [],
|
|
132
|
+
{
|
|
133
|
+
messageInstance: toRef(props, 'messageInstance'),
|
|
134
|
+
axiosInstance,
|
|
135
|
+
reqData: props.loadEvnetsReq,
|
|
136
|
+
respCb: (result) => {
|
|
137
|
+
debugger
|
|
138
|
+
nativeDataLoad.value = true
|
|
139
|
+
emit('update:modelValue', result)
|
|
140
|
+
emit('loadEvnetsCompleted', result)
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
)
|
|
96
144
|
})
|
|
97
145
|
|
|
146
|
+
provide('_messageInstance', toRef(props, 'messageInstance'))
|
|
147
|
+
provide('_loadingInstance', toRef(props, 'loadingInstance'))
|
|
98
148
|
provide('_getNativeComps', props.getNativeComps)
|
|
99
149
|
provide('pageConfig', pageConfigRef)
|
|
100
150
|
const dynamicMapComp = reactive({})
|
|
@@ -108,7 +158,7 @@ export default {
|
|
|
108
158
|
provide('selects', toRef(props, 'selects'))
|
|
109
159
|
provide('rootValue', toRef(props, 'modelValue')) // 绑定进入的跟数据
|
|
110
160
|
provide('lang', toRef(props, 'lang'))
|
|
111
|
-
provide('dataLoad',
|
|
161
|
+
provide('dataLoad', dataLoad) // 是否可以开始执行规则初始化
|
|
112
162
|
provide('dialogComponents', props.dialogComponents) // 是否可以开始执行规则初始化
|
|
113
163
|
provide('_isH5', toRef(props, 'isH5')) // 是否是H5配置
|
|
114
164
|
|
package/src/resolver-H5.vue
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import getNativeComps from './components/patchComponents-H5.js'
|
|
3
3
|
import { useAttrs } from 'vue';
|
|
4
|
-
import Resolver from './
|
|
4
|
+
import Resolver from './resolver-common.vue'
|
|
5
|
+
import CmiToast from "cmid/lib/toast"
|
|
6
|
+
import CmiFullLoading from "cmid/lib/fullloading"
|
|
7
|
+
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
loadingInstance: {
|
|
10
|
+
type: [Object, Function],
|
|
11
|
+
default: () => CmiFullLoading
|
|
12
|
+
// default: () => null
|
|
13
|
+
},
|
|
14
|
+
messageInstance: {
|
|
15
|
+
type: [Object, Function],
|
|
16
|
+
default: () => CmiToast
|
|
17
|
+
// default: () => null
|
|
18
|
+
},
|
|
19
|
+
})
|
|
5
20
|
|
|
6
21
|
defineOptions({
|
|
7
22
|
inheritAttrs: false
|
|
8
23
|
})
|
|
9
24
|
const attrs = useAttrs()
|
|
25
|
+
|
|
10
26
|
</script>
|
|
11
27
|
<template>
|
|
12
|
-
<Resolver v-bind="attrs" :getNativeComps="getNativeComps"></Resolver>
|
|
28
|
+
<Resolver v-bind="attrs" :isH5="true" :getNativeComps="getNativeComps" :messageInstance="props.messageInstance" :loadingInstance="props.loadingInstance"></Resolver>
|
|
13
29
|
</template>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, useAttrs } from 'vue';
|
|
3
|
+
import Resolver from './index.jsx'
|
|
4
|
+
import { useBuildInData } from './hooks/pageConfig';
|
|
5
|
+
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
busiIdentityId: String,
|
|
8
|
+
selects: {
|
|
9
|
+
type: Object,
|
|
10
|
+
default: () => ({})
|
|
11
|
+
},
|
|
12
|
+
getNativeComps: {
|
|
13
|
+
type: Function,
|
|
14
|
+
default: () => ({composeComponents: {}})
|
|
15
|
+
},
|
|
16
|
+
loadingInstance: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: () => null
|
|
19
|
+
},
|
|
20
|
+
messageInstance: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default: () => null
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
defineOptions({
|
|
26
|
+
inheritAttrs: false
|
|
27
|
+
})
|
|
28
|
+
const attrs = useAttrs()
|
|
29
|
+
|
|
30
|
+
const { getPageConfig, pageConfig, selects } = useBuildInData(props.messageInstance, props.loadingInstance)
|
|
31
|
+
getPageConfig({
|
|
32
|
+
busiIdentityId: props.busiIdentityId,
|
|
33
|
+
queryPageMeta: '1',
|
|
34
|
+
queryPageService: '1',
|
|
35
|
+
})
|
|
36
|
+
const allSelects = computed(() => {
|
|
37
|
+
return {
|
|
38
|
+
...props.selects,
|
|
39
|
+
...selects.value
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
</script>
|
|
43
|
+
<template>
|
|
44
|
+
<Resolver v-bind="attrs" :loadingInstance="props.loadingInstance" :messageInstance="props.messageInstance" :getNativeComps="props.getNativeComps" :config="pageConfig || null" :selects="allSelects"></Resolver>
|
|
45
|
+
</template>
|
package/src/resolver-web.vue
CHANGED
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import getNativeComps from './components/patchComponents-web'
|
|
3
|
+
import { ElMessage } from "element-plus"
|
|
4
|
+
import { loadingInstance } from './components/loading'
|
|
3
5
|
import { useAttrs } from 'vue';
|
|
4
|
-
import Resolver from './
|
|
6
|
+
import Resolver from './resolver-common.vue'
|
|
7
|
+
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
loadingInstance: {
|
|
10
|
+
type: [Object, Function],
|
|
11
|
+
default: () => loadingInstance
|
|
12
|
+
// default: () => null
|
|
13
|
+
},
|
|
14
|
+
messageInstance: {
|
|
15
|
+
type: [Object, Function],
|
|
16
|
+
default: () => ElMessage
|
|
17
|
+
},
|
|
18
|
+
})
|
|
5
19
|
|
|
6
20
|
defineOptions({
|
|
7
21
|
inheritAttrs: false
|
|
8
22
|
})
|
|
9
23
|
const attrs = useAttrs()
|
|
24
|
+
|
|
10
25
|
</script>
|
|
11
26
|
<template>
|
|
12
|
-
<Resolver v-bind="attrs" :getNativeComps="getNativeComps"></Resolver>
|
|
27
|
+
<Resolver v-bind="attrs" :getNativeComps="getNativeComps" :messageInstance="props.messageInstance" :loadingInstance="props.loadingInstance"></Resolver>
|
|
13
28
|
</template>
|