super-pages 0.0.23-up → 0.0.24-up

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.
@@ -1,82 +1,82 @@
1
- <template>
2
- <div>
3
- <el-dialog
4
- model-value
5
- :title="$t('superPage.selectNode')"
6
- :close-on-click-modal="false"
7
- append-to-body
8
- width="30%"
9
- max-height="400"
10
- @open="$emit('open')"
11
- @opend="$emit('opend')"
12
- @close="$emit('close')"
13
- @closed="$emit('closed')"
14
- >
15
- <el-table
16
- :data="taskInformitions"
17
- border
18
- style="width: 100%"
19
- @select="select"
20
- >
21
- <el-table-column type="selection" width="55" />
22
- <el-table-column
23
- prop="nodeName"
24
- :label="$t('superPage.nodeName')"
25
- width="180"
26
- />
27
- <el-table-column
28
- prop="nodeId"
29
- :label="$t('superPage.nodeId')"
30
- width="180"
31
- />
32
- </el-table>
33
- <template v-slot:footer>
34
- <div class="dialog-footer">
35
- <el-button type="primary" @click="selectNode">
36
- {{ $t('superPageMessage.sure') }}
37
- </el-button>
38
- <el-button @click="$emit('close')">
39
- {{ $t('superPageMessage.cancel') }}
40
- </el-button>
41
- </div>
42
- </template>
43
- </el-dialog>
44
- </div>
45
- </template>
46
-
47
- <script>
48
- import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
49
- export default {
50
- name: 'TaskInformitionDialog',
51
- components: {},
52
- props: {
53
- // 可退回的环节信息
54
- taskInformitions: {
55
- type: Array,
56
- default: null,
57
- },
58
- },
59
- data() {
60
- return {
61
- selections: [],
62
- }
63
- },
64
- methods: {
65
- select(selection) {
66
- this.selections = selection
67
- },
68
- selectNode() {
69
- if (this.selections.length === 0 || this.selections.length > 1) {
70
- this.$message({
71
- showClose: true,
72
- type: 'warning',
73
- message: this.$t('superPageMessage.pleaseSelectNode'),
74
- })
75
- return
76
- }
77
- $emit(this, 'result', this.selections[0])
78
- },
79
- },
80
- emits: ['open', 'opend', 'close', 'closed', 'result'],
81
- }
82
- </script>
1
+ <template>
2
+ <div>
3
+ <el-dialog
4
+ model-value
5
+ :title="$t('superPage.selectNode')"
6
+ :close-on-click-modal="false"
7
+ append-to-body
8
+ width="30%"
9
+ max-height="400"
10
+ @open="$emit('open')"
11
+ @opend="$emit('opend')"
12
+ @close="$emit('close')"
13
+ @closed="$emit('closed')"
14
+ >
15
+ <el-table
16
+ :data="taskInformitions"
17
+ border
18
+ style="width: 100%"
19
+ @select="select"
20
+ >
21
+ <el-table-column type="selection" width="55" />
22
+ <el-table-column
23
+ prop="nodeName"
24
+ :label="$t('superPage.nodeName')"
25
+ width="180"
26
+ />
27
+ <el-table-column
28
+ prop="nodeId"
29
+ :label="$t('superPage.nodeId')"
30
+ width="180"
31
+ />
32
+ </el-table>
33
+ <template v-slot:footer>
34
+ <div class="dialog-footer">
35
+ <el-button type="primary" @click="selectNode">
36
+ {{ $t('superPageMessage.sure') }}
37
+ </el-button>
38
+ <el-button @click="$emit('close')">
39
+ {{ $t('superPageMessage.cancel') }}
40
+ </el-button>
41
+ </div>
42
+ </template>
43
+ </el-dialog>
44
+ </div>
45
+ </template>
46
+
47
+ <script>
48
+ import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
49
+ export default {
50
+ name: 'TaskInformitionDialog',
51
+ components: {},
52
+ props: {
53
+ // 可退回的环节信息
54
+ taskInformitions: {
55
+ type: Array,
56
+ default: null,
57
+ },
58
+ },
59
+ data() {
60
+ return {
61
+ selections: [],
62
+ }
63
+ },
64
+ methods: {
65
+ select(selection) {
66
+ this.selections = selection
67
+ },
68
+ selectNode() {
69
+ if (this.selections.length === 0 || this.selections.length > 1) {
70
+ this.$message({
71
+ showClose: true,
72
+ type: 'warning',
73
+ message: this.$t('superPageMessage.pleaseSelectNode'),
74
+ })
75
+ return
76
+ }
77
+ $emit(this, 'result', this.selections[0])
78
+ },
79
+ },
80
+ emits: ['open', 'opend', 'close', 'closed', 'result'],
81
+ }
82
+ </script>
@@ -1,37 +1,37 @@
1
- const api = {
2
- // 刷新表单页面
3
- refreshForm(entity) {
4
- if (this.$refs.superForm && entity) {
5
- this.$refs.superForm.refresh(entity)
6
- }
7
- },
8
- // 刷新列表页面
9
- refreshList() {
10
- this.selections = []
11
- if (this.$refs.grid) {
12
- this.$refs.grid.refresh()
13
- }
14
- },
15
- // 刷新表单中子表数据
16
- refreshSubTable(ref, model) {
17
- if (this.$refs.superForm && ref && model) {
18
- this.$refs.superForm.refreshSubTable(ref, model)
19
- }
20
- },
21
- // 表单子表切换每页显示多少条记录时的事件处理
22
- changeSubTablePageSize({ pageSize, propName, isShowPageArea }) {
23
- console.log(
24
- '页面组件--流程表单页面--changeSubTablePageSize=',
25
- pageSize,
26
- propName,
27
- isShowPageArea
28
- )
29
- if (isShowPageArea && propName) {
30
- // 表示表单子表显示分页区域
31
- this.subTablePageInfo[propName] = {
32
- pageSize: pageSize,
33
- }
34
- }
35
- },
36
- }
37
- export default api
1
+ const api = {
2
+ // 刷新表单页面
3
+ refreshForm(entity) {
4
+ if (this.$refs.superForm && entity) {
5
+ this.$refs.superForm.refresh(entity)
6
+ }
7
+ },
8
+ // 刷新列表页面
9
+ refreshList() {
10
+ this.selections = []
11
+ if (this.$refs.grid) {
12
+ this.$refs.grid.refresh()
13
+ }
14
+ },
15
+ // 刷新表单中子表数据
16
+ refreshSubTable(ref, model) {
17
+ if (this.$refs.superForm && ref && model) {
18
+ this.$refs.superForm.refreshSubTable(ref, model)
19
+ }
20
+ },
21
+ // 表单子表切换每页显示多少条记录时的事件处理
22
+ changeSubTablePageSize({ pageSize, propName, isShowPageArea }) {
23
+ console.log(
24
+ '页面组件--流程表单页面--changeSubTablePageSize=',
25
+ pageSize,
26
+ propName,
27
+ isShowPageArea
28
+ )
29
+ if (isShowPageArea && propName) {
30
+ // 表示表单子表显示分页区域
31
+ this.subTablePageInfo[propName] = {
32
+ pageSize: pageSize,
33
+ }
34
+ }
35
+ },
36
+ }
37
+ export default api
@@ -1,62 +1,62 @@
1
- const callFormEvents = {
2
- // 调用点击前回调方法,返回true表示继续执行,否则false表示不执行点击事件
3
- // buttonEventPrefix: 表单编码/列表编码__按钮编码
4
- callBeforeClickButton(events, buttonEventPrefix, params) {
5
- let result = true
6
- if (events) {
7
- const beforeClick = events[buttonEventPrefix + '__beforeClick']
8
- if (beforeClick) {
9
- result = beforeClick.call(this, params)
10
- if (result === undefined) {
11
- result = true
12
- }
13
- }
14
- }
15
- return result
16
- },
17
- // 调用点击后回调方法
18
- // buttonEventPrefix: 表单编码/列表编码__按钮编码
19
- callAfterClickButton(events, buttonEventPrefix, params) {
20
- if (events) {
21
- const afterClick = events[buttonEventPrefix + '__afterClick']
22
- if (afterClick) {
23
- afterClick.call(this, params)
24
- }
25
- }
26
- },
27
- // 调用表单组件元素的事件
28
- callFormItemEvent(formOptions, eventName, formData, eventParams) {
29
- if (!eventName) {
30
- return
31
- }
32
- if (formOptions && formOptions.customEvents) {
33
- const formItemEventFun = this.getEventFunction(
34
- formOptions,
35
- 'customEvents',
36
- eventName
37
- )
38
- if (formItemEventFun) {
39
- const params = {
40
- params: formOptions.additionalParamMap,
41
- additionalParamMap: formOptions.additionalParamMap,
42
- entity: formData,
43
- }
44
- if (eventParams) {
45
- params.eventParams = eventParams
46
- }
47
- return formItemEventFun.call(this, params)
48
- }
49
- }
50
- },
51
- getEventFunction(formOptions, eventType, eventName) {
52
- if (
53
- formOptions &&
54
- formOptions[eventType] &&
55
- formOptions[eventType][eventName] &&
56
- typeof formOptions[eventType][eventName] === 'function'
57
- ) {
58
- return formOptions[eventType][eventName]
59
- }
60
- },
61
- }
62
- export default callFormEvents
1
+ const callFormEvents = {
2
+ // 调用点击前回调方法,返回true表示继续执行,否则false表示不执行点击事件
3
+ // buttonEventPrefix: 表单编码/列表编码__按钮编码
4
+ callBeforeClickButton(events, buttonEventPrefix, params) {
5
+ let result = true
6
+ if (events) {
7
+ const beforeClick = events[buttonEventPrefix + '__beforeClick']
8
+ if (beforeClick) {
9
+ result = beforeClick.call(this, params)
10
+ if (result === undefined) {
11
+ result = true
12
+ }
13
+ }
14
+ }
15
+ return result
16
+ },
17
+ // 调用点击后回调方法
18
+ // buttonEventPrefix: 表单编码/列表编码__按钮编码
19
+ callAfterClickButton(events, buttonEventPrefix, params) {
20
+ if (events) {
21
+ const afterClick = events[buttonEventPrefix + '__afterClick']
22
+ if (afterClick) {
23
+ afterClick.call(this, params)
24
+ }
25
+ }
26
+ },
27
+ // 调用表单组件元素的事件
28
+ callFormItemEvent(formOptions, eventName, formData, eventParams) {
29
+ if (!eventName) {
30
+ return
31
+ }
32
+ if (formOptions && formOptions.customEvents) {
33
+ const formItemEventFun = this.getEventFunction(
34
+ formOptions,
35
+ 'customEvents',
36
+ eventName
37
+ )
38
+ if (formItemEventFun) {
39
+ const params = {
40
+ params: formOptions.additionalParamMap,
41
+ additionalParamMap: formOptions.additionalParamMap,
42
+ entity: formData,
43
+ }
44
+ if (eventParams) {
45
+ params.eventParams = eventParams
46
+ }
47
+ return formItemEventFun.call(this, params)
48
+ }
49
+ }
50
+ },
51
+ getEventFunction(formOptions, eventType, eventName) {
52
+ if (
53
+ formOptions &&
54
+ formOptions[eventType] &&
55
+ formOptions[eventType][eventName] &&
56
+ typeof formOptions[eventType][eventName] === 'function'
57
+ ) {
58
+ return formOptions[eventType][eventName]
59
+ }
60
+ },
61
+ }
62
+ export default callFormEvents
@@ -1,70 +1,70 @@
1
- const buttonEvents = {
2
- // 按钮组件的操作
3
- clickButtonEvent(buttonSetting, system) {
4
- const jsContent = buttonSetting.options.jsContent
5
- if (
6
- typeof jsContent !== 'undefined' &&
7
- jsContent !== null &&
8
- jsContent !== ''
9
- ) {
10
- // 将js文本转换为函数,并运行
11
- // eslint-disable-next-line no-eval
12
- const buttonFun = eval('(' + jsContent + ')')
13
- // 运行方法
14
- const request = buttonFun(this, system)
15
- if (request) {
16
- request.then((data) => {
17
- this.$message({
18
- showClose: true,
19
- type: 'success',
20
- message: this.$t('superPageMessage.successfulOperation'),
21
- })
22
- })
23
- }
24
- } else {
25
- if (buttonSetting.options.operationType === 'inner') {
26
- // 内置操作时
27
- this.jumpToPage(
28
- buttonSetting.options.jumpPage,
29
- system,
30
- null,
31
- null,
32
- this.additionalParamMap,
33
- null,
34
- null,
35
- this.pageCode
36
- )
37
- } else if (buttonSetting.options.operationType === 'custom') {
38
- // 自定义操作时
39
- const path = this.getRealRestApiPath(
40
- buttonSetting.options.restfulApiPat,
41
- system
42
- )
43
- const config = { url: path }
44
- const apiMethod = buttonSetting.options.restfulApiMethod
45
- if (apiMethod) {
46
- config.method = apiMethod
47
- }
48
- const params = buttonSetting.options.restfulApiParameters
49
- if (params) {
50
- config.data = params
51
- }
52
- if (buttonSetting.options.logSetting) {
53
- config.logSettingText = buttonSetting.options.logSetting
54
- }
55
- if (!config.systemCode) {
56
- config.systemCode = system.code
57
- }
58
- this.$http.request(config).then((data) => {
59
- // console.log('clickButtonEvent', data)
60
- this.$message({
61
- showClose: true,
62
- type: 'success',
63
- message: this.$t('superPageMessage.successfulOperation'),
64
- })
65
- })
66
- }
67
- }
68
- },
69
- }
70
- export default buttonEvents
1
+ const buttonEvents = {
2
+ // 按钮组件的操作
3
+ clickButtonEvent(buttonSetting, system) {
4
+ const jsContent = buttonSetting.options.jsContent
5
+ if (
6
+ typeof jsContent !== 'undefined' &&
7
+ jsContent !== null &&
8
+ jsContent !== ''
9
+ ) {
10
+ // 将js文本转换为函数,并运行
11
+ // eslint-disable-next-line no-eval
12
+ const buttonFun = eval('(' + jsContent + ')')
13
+ // 运行方法
14
+ const request = buttonFun(this, system)
15
+ if (request) {
16
+ request.then((data) => {
17
+ this.$message({
18
+ showClose: true,
19
+ type: 'success',
20
+ message: this.$t('superPageMessage.successfulOperation'),
21
+ })
22
+ })
23
+ }
24
+ } else {
25
+ if (buttonSetting.options.operationType === 'inner') {
26
+ // 内置操作时
27
+ this.jumpToPage(
28
+ buttonSetting.options.jumpPage,
29
+ system,
30
+ null,
31
+ null,
32
+ this.additionalParamMap,
33
+ null,
34
+ null,
35
+ this.pageCode
36
+ )
37
+ } else if (buttonSetting.options.operationType === 'custom') {
38
+ // 自定义操作时
39
+ const path = this.getRealRestApiPath(
40
+ buttonSetting.options.restfulApiPat,
41
+ system
42
+ )
43
+ const config = { url: path }
44
+ const apiMethod = buttonSetting.options.restfulApiMethod
45
+ if (apiMethod) {
46
+ config.method = apiMethod
47
+ }
48
+ const params = buttonSetting.options.restfulApiParameters
49
+ if (params) {
50
+ config.data = params
51
+ }
52
+ if (buttonSetting.options.logSetting) {
53
+ config.logSettingText = buttonSetting.options.logSetting
54
+ }
55
+ if (!config.systemCode) {
56
+ config.systemCode = system.code
57
+ }
58
+ this.$http.request(config).then((data) => {
59
+ // console.log('clickButtonEvent', data)
60
+ this.$message({
61
+ showClose: true,
62
+ type: 'success',
63
+ message: this.$t('superPageMessage.successfulOperation'),
64
+ })
65
+ })
66
+ }
67
+ }
68
+ },
69
+ }
70
+ export default buttonEvents
@@ -1,3 +1,3 @@
1
- // 用于存放表单数据、是否是预览状态、系统信息
2
- const store = new Map()
3
- export default store
1
+ // 用于存放表单数据、是否是预览状态、系统信息
2
+ const store = new Map()
3
+ export default store
@@ -1,29 +1,29 @@
1
- import * as Vue from 'vue'
2
- const superPageService = {
3
- getPageSetting(code) {
4
- return this.$http.get(
5
- window.$vueApp.config.globalProperties.baseAPI +
6
- '/component/super-pages/' +
7
- code
8
- )
9
- },
10
- getSystemWatermark(code) {
11
- return this.$http.get(
12
- window.$vueApp.config.globalProperties.baseAPI +
13
- '/component/super-pages/getWatermark/' +
14
- code
15
- )
16
- },
17
- getPageSettingTest() {
18
- // return this.$http.get('http://localhost:8080/test/list-page.json')
19
- // return this.$http.get('http://localhost:8080/test/form-page.json')
20
- // return this.$http.get('http://localhost:8080/test/workflow-form-page.json')
21
- // return this.$http.get('http://localhost:8080/test/chart-page.json')
22
- // return this.$http.get('http://localhost:8080/test/tab-page.json')
23
- // return this.$http.get('http://localhost:8080/test/workflow-history-page.json')
24
- return this.$http.get(
25
- 'http://localhost:8080/test/other-component-page.json'
26
- )
27
- },
28
- }
29
- export default superPageService
1
+ import * as Vue from 'vue'
2
+ const superPageService = {
3
+ getPageSetting(code) {
4
+ return this.$http.get(
5
+ window.$vueApp.config.globalProperties.baseAPI +
6
+ '/component/super-pages/' +
7
+ code
8
+ )
9
+ },
10
+ getSystemWatermark(code) {
11
+ return this.$http.get(
12
+ window.$vueApp.config.globalProperties.baseAPI +
13
+ '/component/super-pages/getWatermark/' +
14
+ code
15
+ )
16
+ },
17
+ getPageSettingTest() {
18
+ // return this.$http.get('http://localhost:8080/test/list-page.json')
19
+ // return this.$http.get('http://localhost:8080/test/form-page.json')
20
+ // return this.$http.get('http://localhost:8080/test/workflow-form-page.json')
21
+ // return this.$http.get('http://localhost:8080/test/chart-page.json')
22
+ // return this.$http.get('http://localhost:8080/test/tab-page.json')
23
+ // return this.$http.get('http://localhost:8080/test/workflow-history-page.json')
24
+ return this.$http.get(
25
+ 'http://localhost:8080/test/other-component-page.json'
26
+ )
27
+ },
28
+ }
29
+ export default superPageService