vue2-client 1.8.327 → 1.8.329
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 +97 -97
- package/src/base-client/components/common/LowCodeComponent/LowCodeEditorModal.vue +108 -108
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeAddPageModal.vue +117 -117
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeCustomJSModal.vue +80 -80
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeEventEditorModal.vue +398 -398
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLifeCycleModal.vue +65 -65
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLogicCallbackModal.vue +64 -64
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeLogicParamModal.vue +73 -73
- package/src/base-client/components/common/LowCodeComponent/modal/lowCodeRunFunctionParamModal.vue +76 -76
- package/src/base-client/components/common/XDataCard/XDataCard.vue +357 -357
- package/src/base-client/components/common/XDescriptions/lowcodeEditorRegister.js +31 -31
- package/src/base-client/components/common/XReportSlot/index.md +48 -48
- package/src/base-client/components/common/XTable/XTable.vue +767 -719
- package/src/services/api/common.js +321 -307
- package/src/services/apiService.js +15 -14
- package/src/services/user.js +85 -71
- package/src/utils/request.js +353 -347
- package/vue.config.js +0 -6
package/package.json
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vue2-client",
|
|
3
|
-
"version": "1.8.
|
|
4
|
-
"private": false,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
|
|
7
|
-
"mac-serve": "vue-cli-service serve --no-eslint --mode mac",
|
|
8
|
-
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
|
|
9
|
-
"test:unit": "vue-cli-service test:unit",
|
|
10
|
-
"lint": "vue-cli-service lint",
|
|
11
|
-
"build:preview": "vue-cli-service build --mode preview",
|
|
12
|
-
"lint:nofix": "vue-cli-service lint --no-fix",
|
|
13
|
-
"test": "jest"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
17
|
-
"@antv/data-set": "^0.11.8",
|
|
18
|
-
"@antv/g2plot": "^2.4.31",
|
|
19
|
-
"@vue/babel-preset-jsx": "^1.4.0",
|
|
20
|
-
"animate.css": "^4.1.1",
|
|
21
|
-
"ant-design-vue": "^1.7.8",
|
|
22
|
-
"axios": "^0.27.2",
|
|
23
|
-
"clipboard": "^2.0.11",
|
|
24
|
-
"core-js": "^3.33.0",
|
|
25
|
-
"crypto-js": "^4.1.1",
|
|
26
|
-
"date-fns": "^2.29.3",
|
|
27
|
-
"default-passive-events": "^2.0.0",
|
|
28
|
-
"dotenv": "^16.3.1",
|
|
29
|
-
"echarts": "^5.5.0",
|
|
30
|
-
"enquire.js": "^2.1.6",
|
|
31
|
-
"file-saver": "^2.0.5",
|
|
32
|
-
"highlight.js": "^11.7.0",
|
|
33
|
-
"html2canvas": "^1.4.1",
|
|
34
|
-
"js-base64": "^3.7.5",
|
|
35
|
-
"js-cookie": "^2.2.1",
|
|
36
|
-
"jsencrypt": "^3.3.2",
|
|
37
|
-
"jspdf": "^2.5.1",
|
|
38
|
-
"lodash.clonedeep": "^4.5.0",
|
|
39
|
-
"lodash.get": "^4.4.2",
|
|
40
|
-
"lodash.debounce": "^4",
|
|
41
|
-
"mockjs": "^1.1.0",
|
|
42
|
-
"nprogress": "^0.2.0",
|
|
43
|
-
"qs": "^6.11.2",
|
|
44
|
-
"regenerator-runtime": "^0.14.0",
|
|
45
|
-
"videojs-contrib-hls": "^5.15.0",
|
|
46
|
-
"viser-vue": "^2.4.8",
|
|
47
|
-
"vue": "^2.7.14",
|
|
48
|
-
"vue-codemirror": "4.0.6",
|
|
49
|
-
"vue-i18n": "^8.28.2",
|
|
50
|
-
"vue-json-viewer": "^2.2.22",
|
|
51
|
-
"vue-router": "^3.6.5",
|
|
52
|
-
"vue-video-player": "^5.0.2",
|
|
53
|
-
"vue-virtual-scroller": "^1.1.2",
|
|
54
|
-
"vuedraggable": "^2.24.3",
|
|
55
|
-
"vue-draggable-resizable": "^2",
|
|
56
|
-
"vuex": "^3.6.2",
|
|
57
|
-
"xlsx": "0.18.5"
|
|
58
|
-
},
|
|
59
|
-
"devDependencies": {
|
|
60
|
-
"@ant-design/colors": "^7.0.0",
|
|
61
|
-
"@babel/core": "^7.22.20",
|
|
62
|
-
"@babel/eslint-parser": "^7.22.15",
|
|
63
|
-
"@babel/preset-env": "^7.22.20",
|
|
64
|
-
"@vue/cli-plugin-babel": "^5.0.8",
|
|
65
|
-
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
66
|
-
"@vue/cli-service": "^5.0.8",
|
|
67
|
-
"@vue/eslint-config-standard": "^8.0.1",
|
|
68
|
-
"@vue/test-utils": "^1.3.6",
|
|
69
|
-
"babel-jest": "^26.6.3",
|
|
70
|
-
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
71
|
-
"compression-webpack-plugin": "^10.0.0",
|
|
72
|
-
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
73
|
-
"deepmerge": "^4.3.1",
|
|
74
|
-
"eslint": "^8.51.0",
|
|
75
|
-
"eslint-plugin-vue": "^9.17.0",
|
|
76
|
-
"fast-deep-equal": "^3.1.3",
|
|
77
|
-
"ignore-loader": "^0.1.2",
|
|
78
|
-
"jest": "^26.6.3",
|
|
79
|
-
"jest-environment-jsdom": "^26.6.2",
|
|
80
|
-
"jest-transform-stub": "^2.0.0",
|
|
81
|
-
"less-loader": "^6.2.0",
|
|
82
|
-
"script-loader": "^0.7.2",
|
|
83
|
-
"style-resources-loader": "^1.5.0",
|
|
84
|
-
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
|
85
|
-
"vue-jest": "^4.0.1",
|
|
86
|
-
"vue-template-compiler": "^2.7.14",
|
|
87
|
-
"webpack": "^5.88.2",
|
|
88
|
-
"webpack-theme-color-replacer": "^1.4.7",
|
|
89
|
-
"whatwg-fetch": "^3.6.19"
|
|
90
|
-
},
|
|
91
|
-
"browserslist": [
|
|
92
|
-
"> 1%",
|
|
93
|
-
"last 2 versions",
|
|
94
|
-
"not dead",
|
|
95
|
-
"not ie 11"
|
|
96
|
-
]
|
|
97
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vue2-client",
|
|
3
|
+
"version": "1.8.329",
|
|
4
|
+
"private": false,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
|
|
7
|
+
"mac-serve": "vue-cli-service serve --no-eslint --mode mac",
|
|
8
|
+
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
|
|
9
|
+
"test:unit": "vue-cli-service test:unit",
|
|
10
|
+
"lint": "vue-cli-service lint",
|
|
11
|
+
"build:preview": "vue-cli-service build --mode preview",
|
|
12
|
+
"lint:nofix": "vue-cli-service lint --no-fix",
|
|
13
|
+
"test": "jest"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
17
|
+
"@antv/data-set": "^0.11.8",
|
|
18
|
+
"@antv/g2plot": "^2.4.31",
|
|
19
|
+
"@vue/babel-preset-jsx": "^1.4.0",
|
|
20
|
+
"animate.css": "^4.1.1",
|
|
21
|
+
"ant-design-vue": "^1.7.8",
|
|
22
|
+
"axios": "^0.27.2",
|
|
23
|
+
"clipboard": "^2.0.11",
|
|
24
|
+
"core-js": "^3.33.0",
|
|
25
|
+
"crypto-js": "^4.1.1",
|
|
26
|
+
"date-fns": "^2.29.3",
|
|
27
|
+
"default-passive-events": "^2.0.0",
|
|
28
|
+
"dotenv": "^16.3.1",
|
|
29
|
+
"echarts": "^5.5.0",
|
|
30
|
+
"enquire.js": "^2.1.6",
|
|
31
|
+
"file-saver": "^2.0.5",
|
|
32
|
+
"highlight.js": "^11.7.0",
|
|
33
|
+
"html2canvas": "^1.4.1",
|
|
34
|
+
"js-base64": "^3.7.5",
|
|
35
|
+
"js-cookie": "^2.2.1",
|
|
36
|
+
"jsencrypt": "^3.3.2",
|
|
37
|
+
"jspdf": "^2.5.1",
|
|
38
|
+
"lodash.clonedeep": "^4.5.0",
|
|
39
|
+
"lodash.get": "^4.4.2",
|
|
40
|
+
"lodash.debounce": "^4",
|
|
41
|
+
"mockjs": "^1.1.0",
|
|
42
|
+
"nprogress": "^0.2.0",
|
|
43
|
+
"qs": "^6.11.2",
|
|
44
|
+
"regenerator-runtime": "^0.14.0",
|
|
45
|
+
"videojs-contrib-hls": "^5.15.0",
|
|
46
|
+
"viser-vue": "^2.4.8",
|
|
47
|
+
"vue": "^2.7.14",
|
|
48
|
+
"vue-codemirror": "4.0.6",
|
|
49
|
+
"vue-i18n": "^8.28.2",
|
|
50
|
+
"vue-json-viewer": "^2.2.22",
|
|
51
|
+
"vue-router": "^3.6.5",
|
|
52
|
+
"vue-video-player": "^5.0.2",
|
|
53
|
+
"vue-virtual-scroller": "^1.1.2",
|
|
54
|
+
"vuedraggable": "^2.24.3",
|
|
55
|
+
"vue-draggable-resizable": "^2",
|
|
56
|
+
"vuex": "^3.6.2",
|
|
57
|
+
"xlsx": "0.18.5"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@ant-design/colors": "^7.0.0",
|
|
61
|
+
"@babel/core": "^7.22.20",
|
|
62
|
+
"@babel/eslint-parser": "^7.22.15",
|
|
63
|
+
"@babel/preset-env": "^7.22.20",
|
|
64
|
+
"@vue/cli-plugin-babel": "^5.0.8",
|
|
65
|
+
"@vue/cli-plugin-eslint": "^5.0.8",
|
|
66
|
+
"@vue/cli-service": "^5.0.8",
|
|
67
|
+
"@vue/eslint-config-standard": "^8.0.1",
|
|
68
|
+
"@vue/test-utils": "^1.3.6",
|
|
69
|
+
"babel-jest": "^26.6.3",
|
|
70
|
+
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
71
|
+
"compression-webpack-plugin": "^10.0.0",
|
|
72
|
+
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
73
|
+
"deepmerge": "^4.3.1",
|
|
74
|
+
"eslint": "^8.51.0",
|
|
75
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
76
|
+
"fast-deep-equal": "^3.1.3",
|
|
77
|
+
"ignore-loader": "^0.1.2",
|
|
78
|
+
"jest": "^26.6.3",
|
|
79
|
+
"jest-environment-jsdom": "^26.6.2",
|
|
80
|
+
"jest-transform-stub": "^2.0.0",
|
|
81
|
+
"less-loader": "^6.2.0",
|
|
82
|
+
"script-loader": "^0.7.2",
|
|
83
|
+
"style-resources-loader": "^1.5.0",
|
|
84
|
+
"vue-cli-plugin-style-resources-loader": "^0.1.5",
|
|
85
|
+
"vue-jest": "^4.0.1",
|
|
86
|
+
"vue-template-compiler": "^2.7.14",
|
|
87
|
+
"webpack": "^5.88.2",
|
|
88
|
+
"webpack-theme-color-replacer": "^1.4.7",
|
|
89
|
+
"whatwg-fetch": "^3.6.19"
|
|
90
|
+
},
|
|
91
|
+
"browserslist": [
|
|
92
|
+
"> 1%",
|
|
93
|
+
"last 2 versions",
|
|
94
|
+
"not dead",
|
|
95
|
+
"not ie 11"
|
|
96
|
+
]
|
|
97
|
+
}
|
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<!-- 事件编辑弹窗 -->
|
|
4
|
-
<LowCodeEventEditorModal
|
|
5
|
-
ref="eventEditor"
|
|
6
|
-
@changeOuterValue="changeOuterValue"
|
|
7
|
-
@refresh="refresh"
|
|
8
|
-
@openModal="changeModalVisible"
|
|
9
|
-
:event-editor-current="eventEditorCurrent"
|
|
10
|
-
:editor-properties-config="editorPropertiesConfig"/>
|
|
11
|
-
<!-- 增加页面弹窗 -->
|
|
12
|
-
<LowCodeAddPageModal
|
|
13
|
-
ref="addPage"
|
|
14
|
-
@refresh="refresh"/>
|
|
15
|
-
<!-- 生命周期函数弹窗 -->
|
|
16
|
-
<LowCodeLifeCycleModal ref="lifeCycle"/>
|
|
17
|
-
<!-- Logic回调弹窗 -->
|
|
18
|
-
<LowCodeLogicCallbackModal ref="logicCallBack"/>
|
|
19
|
-
<!-- Logic参数弹窗 -->
|
|
20
|
-
<LowCodeLogicParamModal ref="logicParam"/>
|
|
21
|
-
<!-- 自定义JS弹窗 -->
|
|
22
|
-
<LowCodeCustomJSModal ref="customJS"/>
|
|
23
|
-
<LowCodeRunFunctionParamModal ref="functionParam" />
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<script>
|
|
28
|
-
import LowCodeEventEditorModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeEventEditorModal.vue'
|
|
29
|
-
import LowCodeAddPageModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeAddPageModal.vue'
|
|
30
|
-
import LowCodeLifeCycleModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeLifeCycleModal.vue'
|
|
31
|
-
import LowCodeLogicCallbackModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeLogicCallbackModal.vue'
|
|
32
|
-
import LowCodeLogicParamModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeLogicParamModal.vue'
|
|
33
|
-
import LowCodeCustomJSModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeCustomJSModal.vue'
|
|
34
|
-
import LowCodeRunFunctionParamModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeRunFunctionParamModal.vue'
|
|
35
|
-
|
|
36
|
-
export default {
|
|
37
|
-
name: 'LowCodeEditorModal',
|
|
38
|
-
components: {
|
|
39
|
-
LowCodeLogicCallbackModal,
|
|
40
|
-
LowCodeLifeCycleModal,
|
|
41
|
-
LowCodeEventEditorModal,
|
|
42
|
-
LowCodeAddPageModal,
|
|
43
|
-
LowCodeLogicParamModal,
|
|
44
|
-
LowCodeCustomJSModal,
|
|
45
|
-
LowCodeRunFunctionParamModal
|
|
46
|
-
},
|
|
47
|
-
props: {
|
|
48
|
-
// 用于保存右侧编辑组件的属性
|
|
49
|
-
// eslint-disable-next-line vue/require-default-prop
|
|
50
|
-
editorPropertiesConfig: {
|
|
51
|
-
type: Object,
|
|
52
|
-
require: true
|
|
53
|
-
},
|
|
54
|
-
// 用于事件编辑的回显,在点击事件编辑按钮后,会将此变量赋值
|
|
55
|
-
eventEditorCurrent: {
|
|
56
|
-
type: Object,
|
|
57
|
-
default: undefined
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
inject: [
|
|
61
|
-
'componentsMap'
|
|
62
|
-
],
|
|
63
|
-
methods: {
|
|
64
|
-
// 打开弹框
|
|
65
|
-
changeModalVisible (modalName) {
|
|
66
|
-
switch (modalName) {
|
|
67
|
-
case 'eventEditor' :
|
|
68
|
-
this.$refs.eventEditor.changeVisible()
|
|
69
|
-
return
|
|
70
|
-
case 'addPage':
|
|
71
|
-
this.$refs.addPage.changeVisible()
|
|
72
|
-
return
|
|
73
|
-
case 'lifeCycle':
|
|
74
|
-
this.$refs.lifeCycle.changeVisible()
|
|
75
|
-
return
|
|
76
|
-
case 'logicCallBack':
|
|
77
|
-
this.$refs.logicCallBack.changeVisible()
|
|
78
|
-
return
|
|
79
|
-
case 'logicParam':
|
|
80
|
-
this.$refs.logicParam.changeVisible()
|
|
81
|
-
return
|
|
82
|
-
case 'customJS':
|
|
83
|
-
this.$refs.customJS.changeVisible()
|
|
84
|
-
return
|
|
85
|
-
case 'functionParam':
|
|
86
|
-
this.$refs.functionParam.changeVisible()
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
// 刷新组件
|
|
90
|
-
refresh (type) {
|
|
91
|
-
this.$emit('refresh', type)
|
|
92
|
-
},
|
|
93
|
-
// 修改外侧(编辑器)的值
|
|
94
|
-
changeOuterValue (key, value) {
|
|
95
|
-
this.$emit('changeOuterValue', key, value)
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
computed: {
|
|
99
|
-
config () {
|
|
100
|
-
return this.$store.state.lowCode.config
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
</script>
|
|
105
|
-
|
|
106
|
-
<style scoped lang="less">
|
|
107
|
-
|
|
108
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<!-- 事件编辑弹窗 -->
|
|
4
|
+
<LowCodeEventEditorModal
|
|
5
|
+
ref="eventEditor"
|
|
6
|
+
@changeOuterValue="changeOuterValue"
|
|
7
|
+
@refresh="refresh"
|
|
8
|
+
@openModal="changeModalVisible"
|
|
9
|
+
:event-editor-current="eventEditorCurrent"
|
|
10
|
+
:editor-properties-config="editorPropertiesConfig"/>
|
|
11
|
+
<!-- 增加页面弹窗 -->
|
|
12
|
+
<LowCodeAddPageModal
|
|
13
|
+
ref="addPage"
|
|
14
|
+
@refresh="refresh"/>
|
|
15
|
+
<!-- 生命周期函数弹窗 -->
|
|
16
|
+
<LowCodeLifeCycleModal ref="lifeCycle"/>
|
|
17
|
+
<!-- Logic回调弹窗 -->
|
|
18
|
+
<LowCodeLogicCallbackModal ref="logicCallBack"/>
|
|
19
|
+
<!-- Logic参数弹窗 -->
|
|
20
|
+
<LowCodeLogicParamModal ref="logicParam"/>
|
|
21
|
+
<!-- 自定义JS弹窗 -->
|
|
22
|
+
<LowCodeCustomJSModal ref="customJS"/>
|
|
23
|
+
<LowCodeRunFunctionParamModal ref="functionParam" />
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import LowCodeEventEditorModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeEventEditorModal.vue'
|
|
29
|
+
import LowCodeAddPageModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeAddPageModal.vue'
|
|
30
|
+
import LowCodeLifeCycleModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeLifeCycleModal.vue'
|
|
31
|
+
import LowCodeLogicCallbackModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeLogicCallbackModal.vue'
|
|
32
|
+
import LowCodeLogicParamModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeLogicParamModal.vue'
|
|
33
|
+
import LowCodeCustomJSModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeCustomJSModal.vue'
|
|
34
|
+
import LowCodeRunFunctionParamModal from '@vue2-client/base-client/components/common/LowCodeComponent/modal/lowCodeRunFunctionParamModal.vue'
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
name: 'LowCodeEditorModal',
|
|
38
|
+
components: {
|
|
39
|
+
LowCodeLogicCallbackModal,
|
|
40
|
+
LowCodeLifeCycleModal,
|
|
41
|
+
LowCodeEventEditorModal,
|
|
42
|
+
LowCodeAddPageModal,
|
|
43
|
+
LowCodeLogicParamModal,
|
|
44
|
+
LowCodeCustomJSModal,
|
|
45
|
+
LowCodeRunFunctionParamModal
|
|
46
|
+
},
|
|
47
|
+
props: {
|
|
48
|
+
// 用于保存右侧编辑组件的属性
|
|
49
|
+
// eslint-disable-next-line vue/require-default-prop
|
|
50
|
+
editorPropertiesConfig: {
|
|
51
|
+
type: Object,
|
|
52
|
+
require: true
|
|
53
|
+
},
|
|
54
|
+
// 用于事件编辑的回显,在点击事件编辑按钮后,会将此变量赋值
|
|
55
|
+
eventEditorCurrent: {
|
|
56
|
+
type: Object,
|
|
57
|
+
default: undefined
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
inject: [
|
|
61
|
+
'componentsMap'
|
|
62
|
+
],
|
|
63
|
+
methods: {
|
|
64
|
+
// 打开弹框
|
|
65
|
+
changeModalVisible (modalName) {
|
|
66
|
+
switch (modalName) {
|
|
67
|
+
case 'eventEditor' :
|
|
68
|
+
this.$refs.eventEditor.changeVisible()
|
|
69
|
+
return
|
|
70
|
+
case 'addPage':
|
|
71
|
+
this.$refs.addPage.changeVisible()
|
|
72
|
+
return
|
|
73
|
+
case 'lifeCycle':
|
|
74
|
+
this.$refs.lifeCycle.changeVisible()
|
|
75
|
+
return
|
|
76
|
+
case 'logicCallBack':
|
|
77
|
+
this.$refs.logicCallBack.changeVisible()
|
|
78
|
+
return
|
|
79
|
+
case 'logicParam':
|
|
80
|
+
this.$refs.logicParam.changeVisible()
|
|
81
|
+
return
|
|
82
|
+
case 'customJS':
|
|
83
|
+
this.$refs.customJS.changeVisible()
|
|
84
|
+
return
|
|
85
|
+
case 'functionParam':
|
|
86
|
+
this.$refs.functionParam.changeVisible()
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
// 刷新组件
|
|
90
|
+
refresh (type) {
|
|
91
|
+
this.$emit('refresh', type)
|
|
92
|
+
},
|
|
93
|
+
// 修改外侧(编辑器)的值
|
|
94
|
+
changeOuterValue (key, value) {
|
|
95
|
+
this.$emit('changeOuterValue', key, value)
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
computed: {
|
|
99
|
+
config () {
|
|
100
|
+
return this.$store.state.lowCode.config
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<style scoped lang="less">
|
|
107
|
+
|
|
108
|
+
</style>
|
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<!-- 新增页面容器弹框 -->
|
|
4
|
-
<a-modal
|
|
5
|
-
title="新增页面容器"
|
|
6
|
-
width="60%"
|
|
7
|
-
:z-index="1001"
|
|
8
|
-
:destroyOnClose="true"
|
|
9
|
-
@ok="handleAddPageContainerModalOk"
|
|
10
|
-
@cancel="() => { showPageContainerAddModal = false }"
|
|
11
|
-
:visible="showPageContainerAddModal">
|
|
12
|
-
<a-form :label-col="{ span: 7 }" :wrapper-col="{ span: 12 }">
|
|
13
|
-
<!-- 容器类型 -->
|
|
14
|
-
<a-form-item label="容器类型">
|
|
15
|
-
<a-select v-model="addComponentTemp.type" @change="pageContainerAddTypeChange">
|
|
16
|
-
<a-select-option value="page">
|
|
17
|
-
页面
|
|
18
|
-
</a-select-option>
|
|
19
|
-
<a-select-option value="modal">
|
|
20
|
-
弹框
|
|
21
|
-
</a-select-option>
|
|
22
|
-
<a-select-option value="draw">
|
|
23
|
-
抽屉
|
|
24
|
-
</a-select-option>
|
|
25
|
-
</a-select>
|
|
26
|
-
</a-form-item>
|
|
27
|
-
<!-- 标题 -->
|
|
28
|
-
<a-form-item label="标题">
|
|
29
|
-
<a-input v-model="addComponentTemp.title"/>
|
|
30
|
-
</a-form-item>
|
|
31
|
-
<template v-if="addComponentTemp.type !== 'page'">
|
|
32
|
-
<!-- 宽度 -->
|
|
33
|
-
<a-form-item label="宽度">
|
|
34
|
-
<a-input v-model="addComponentTemp.width"/>
|
|
35
|
-
</a-form-item>
|
|
36
|
-
</template>
|
|
37
|
-
</a-form>
|
|
38
|
-
</a-modal>
|
|
39
|
-
</div>
|
|
40
|
-
</template>
|
|
41
|
-
|
|
42
|
-
<script>
|
|
43
|
-
import codeMirror from '@vue2-client/components/CodeMirror/inedx.vue'
|
|
44
|
-
import * as lowcodeUtils from '@vue2-client/utils/lowcode/lowcodeUtils'
|
|
45
|
-
|
|
46
|
-
export default {
|
|
47
|
-
name: 'LowCodeAddPageModal',
|
|
48
|
-
components: {
|
|
49
|
-
codeMirror
|
|
50
|
-
},
|
|
51
|
-
props: {
|
|
52
|
-
},
|
|
53
|
-
inject: [
|
|
54
|
-
'componentsMap'
|
|
55
|
-
],
|
|
56
|
-
data () {
|
|
57
|
-
return {
|
|
58
|
-
// 控制弹框显隐
|
|
59
|
-
showPageContainerAddModal: false,
|
|
60
|
-
// 添加页面容器参数
|
|
61
|
-
addComponentTemp: { type: 'page' }
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
methods: {
|
|
65
|
-
changeVisible () {
|
|
66
|
-
this.addComponentTemp = { type: 'page' }
|
|
67
|
-
this.showPageContainerAddModal = !this.showPageContainerAddModal
|
|
68
|
-
},
|
|
69
|
-
// 添加页面容器弹框确认
|
|
70
|
-
handleAddPageContainerModalOk () {
|
|
71
|
-
const pageId = 'page_' + lowcodeUtils.nanoidWithoutSymbol(6)
|
|
72
|
-
const result = {
|
|
73
|
-
id: pageId,
|
|
74
|
-
type: this.addComponentTemp.type,
|
|
75
|
-
title: this.addComponentTemp.title,
|
|
76
|
-
width: this.addComponentTemp.width,
|
|
77
|
-
body: [
|
|
78
|
-
{
|
|
79
|
-
id: pageId + '_0',
|
|
80
|
-
config: {
|
|
81
|
-
align: 'top',
|
|
82
|
-
gutter: 0,
|
|
83
|
-
justify: 'start'
|
|
84
|
-
},
|
|
85
|
-
type: 'row',
|
|
86
|
-
body: [
|
|
87
|
-
lowcodeUtils.newContainer()
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
this.addComponentTemp = { type: 'page' }
|
|
93
|
-
this.config.page.push(result)
|
|
94
|
-
this.$store.commit('setConfig', this.config)
|
|
95
|
-
this.$emit('refresh', 'Organization')
|
|
96
|
-
this.changeVisible()
|
|
97
|
-
},
|
|
98
|
-
// 添加页面容器类型修改
|
|
99
|
-
pageContainerAddTypeChange (value) {
|
|
100
|
-
if (value !== 'page') {
|
|
101
|
-
this.addComponentTemp = { width: '70%', type: value }
|
|
102
|
-
} else {
|
|
103
|
-
this.addComponentTemp = { type: value }
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
computed: {
|
|
108
|
-
config () {
|
|
109
|
-
return this.$store.state.lowCode.config
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
</script>
|
|
114
|
-
|
|
115
|
-
<style scoped lang="less">
|
|
116
|
-
|
|
117
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<!-- 新增页面容器弹框 -->
|
|
4
|
+
<a-modal
|
|
5
|
+
title="新增页面容器"
|
|
6
|
+
width="60%"
|
|
7
|
+
:z-index="1001"
|
|
8
|
+
:destroyOnClose="true"
|
|
9
|
+
@ok="handleAddPageContainerModalOk"
|
|
10
|
+
@cancel="() => { showPageContainerAddModal = false }"
|
|
11
|
+
:visible="showPageContainerAddModal">
|
|
12
|
+
<a-form :label-col="{ span: 7 }" :wrapper-col="{ span: 12 }">
|
|
13
|
+
<!-- 容器类型 -->
|
|
14
|
+
<a-form-item label="容器类型">
|
|
15
|
+
<a-select v-model="addComponentTemp.type" @change="pageContainerAddTypeChange">
|
|
16
|
+
<a-select-option value="page">
|
|
17
|
+
页面
|
|
18
|
+
</a-select-option>
|
|
19
|
+
<a-select-option value="modal">
|
|
20
|
+
弹框
|
|
21
|
+
</a-select-option>
|
|
22
|
+
<a-select-option value="draw">
|
|
23
|
+
抽屉
|
|
24
|
+
</a-select-option>
|
|
25
|
+
</a-select>
|
|
26
|
+
</a-form-item>
|
|
27
|
+
<!-- 标题 -->
|
|
28
|
+
<a-form-item label="标题">
|
|
29
|
+
<a-input v-model="addComponentTemp.title"/>
|
|
30
|
+
</a-form-item>
|
|
31
|
+
<template v-if="addComponentTemp.type !== 'page'">
|
|
32
|
+
<!-- 宽度 -->
|
|
33
|
+
<a-form-item label="宽度">
|
|
34
|
+
<a-input v-model="addComponentTemp.width"/>
|
|
35
|
+
</a-form-item>
|
|
36
|
+
</template>
|
|
37
|
+
</a-form>
|
|
38
|
+
</a-modal>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script>
|
|
43
|
+
import codeMirror from '@vue2-client/components/CodeMirror/inedx.vue'
|
|
44
|
+
import * as lowcodeUtils from '@vue2-client/utils/lowcode/lowcodeUtils'
|
|
45
|
+
|
|
46
|
+
export default {
|
|
47
|
+
name: 'LowCodeAddPageModal',
|
|
48
|
+
components: {
|
|
49
|
+
codeMirror
|
|
50
|
+
},
|
|
51
|
+
props: {
|
|
52
|
+
},
|
|
53
|
+
inject: [
|
|
54
|
+
'componentsMap'
|
|
55
|
+
],
|
|
56
|
+
data () {
|
|
57
|
+
return {
|
|
58
|
+
// 控制弹框显隐
|
|
59
|
+
showPageContainerAddModal: false,
|
|
60
|
+
// 添加页面容器参数
|
|
61
|
+
addComponentTemp: { type: 'page' }
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
changeVisible () {
|
|
66
|
+
this.addComponentTemp = { type: 'page' }
|
|
67
|
+
this.showPageContainerAddModal = !this.showPageContainerAddModal
|
|
68
|
+
},
|
|
69
|
+
// 添加页面容器弹框确认
|
|
70
|
+
handleAddPageContainerModalOk () {
|
|
71
|
+
const pageId = 'page_' + lowcodeUtils.nanoidWithoutSymbol(6)
|
|
72
|
+
const result = {
|
|
73
|
+
id: pageId,
|
|
74
|
+
type: this.addComponentTemp.type,
|
|
75
|
+
title: this.addComponentTemp.title,
|
|
76
|
+
width: this.addComponentTemp.width,
|
|
77
|
+
body: [
|
|
78
|
+
{
|
|
79
|
+
id: pageId + '_0',
|
|
80
|
+
config: {
|
|
81
|
+
align: 'top',
|
|
82
|
+
gutter: 0,
|
|
83
|
+
justify: 'start'
|
|
84
|
+
},
|
|
85
|
+
type: 'row',
|
|
86
|
+
body: [
|
|
87
|
+
lowcodeUtils.newContainer()
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
this.addComponentTemp = { type: 'page' }
|
|
93
|
+
this.config.page.push(result)
|
|
94
|
+
this.$store.commit('setConfig', this.config)
|
|
95
|
+
this.$emit('refresh', 'Organization')
|
|
96
|
+
this.changeVisible()
|
|
97
|
+
},
|
|
98
|
+
// 添加页面容器类型修改
|
|
99
|
+
pageContainerAddTypeChange (value) {
|
|
100
|
+
if (value !== 'page') {
|
|
101
|
+
this.addComponentTemp = { width: '70%', type: value }
|
|
102
|
+
} else {
|
|
103
|
+
this.addComponentTemp = { type: value }
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
computed: {
|
|
108
|
+
config () {
|
|
109
|
+
return this.$store.state.lowCode.config
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
</script>
|
|
114
|
+
|
|
115
|
+
<style scoped lang="less">
|
|
116
|
+
|
|
117
|
+
</style>
|