super-pages 0.0.22-up → 0.0.23-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.
Files changed (32) hide show
  1. package/README.md +7 -7
  2. package/index.html +13 -13
  3. package/lib/super-pages.css +1 -1
  4. package/lib/super-pages.js +679 -580
  5. package/lib/super-pages.umd.cjs +12 -6
  6. package/package.json +5 -5
  7. package/packages/index.js +30 -30
  8. package/packages/super-page/index.js +9 -9
  9. package/packages/super-page/src/common-form-page.vue +3 -2
  10. package/packages/super-page/src/form-head.vue +74 -74
  11. package/packages/super-page/src/group-tag.vue +21 -21
  12. package/packages/super-page/src/list-toolbar-dynamic-source.vue +9 -3
  13. package/packages/super-page/src/list-toolbar-page.vue +2 -0
  14. package/packages/super-page/src/my-button-base.vue +3 -2
  15. package/packages/super-page/src/remove-signer-dialog.vue +103 -103
  16. package/packages/super-page/src/sub-tab-page.vue +79 -79
  17. package/packages/super-page/src/task-informition-dialog.vue +82 -82
  18. package/packages/super-page/src/util/ListButtonEvent.js +6 -6
  19. package/packages/super-page/src/util/api.js +37 -37
  20. package/packages/super-page/src/util/callEvents.js +62 -62
  21. package/packages/super-page/src/util/commonButtonEvent.js +70 -70
  22. package/packages/super-page/src/util/formButtonEvent.js +3 -3
  23. package/packages/super-page/src/util/store.js +3 -3
  24. package/packages/super-page/src/util/super-page.js +29 -29
  25. package/packages/super-page/src/util/util.js +6 -6
  26. package/packages/super-page/src/util/workflowButtonEvent.js +2 -2
  27. package/packages/super-page/src/widget-sub-tab-pane-page.vue +115 -115
  28. package/packages/super-page/src/widget-tab-pane-page.vue +135 -135
  29. package/packages/super-page-dialog/index.js +9 -9
  30. package/packages/utils/gogocodeTransfer.js +59 -59
  31. package/src/utils/common-util.js +9 -9
  32. package/vite.config.js +36 -36
@@ -1,79 +1,79 @@
1
- <template>
2
- <div>
3
- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
4
- <el-tab-pane
5
- v-for="tab in colSetting.options.tabContent"
6
- :key="tab.code"
7
- :label="tab.label"
8
- :name="tab.code"
9
- >
10
- <widget-sub-tab-pane-page
11
- :page-code="pageCode"
12
- :data-id="dataId"
13
- :one-tab-content="tab.list ? tab.list : []"
14
- :workflow-id="workflowId"
15
- :task-id="taskId"
16
- @update-value="updateValues"
17
- />
18
- </el-tab-pane>
19
- </el-tabs>
20
- </div>
21
- </template>
22
-
23
- <script>
24
- import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
25
- import WidgetSubTabPanePage from './widget-sub-tab-pane-page'
26
- import util from './util/util'
27
- import eventBus from './util/eventBus'
28
- export default {
29
- name: 'SubTabPage',
30
- components: {
31
- WidgetSubTabPanePage,
32
- },
33
- props: {
34
- // 页面编码
35
- pageCode: {
36
- type: String,
37
- default: null,
38
- },
39
- // 表单页面修改记录id
40
- dataId: {
41
- type: Number,
42
- default: null,
43
- },
44
- // 流程表单页面办理任务时任务id
45
- taskId: {
46
- type: Number,
47
- default: null,
48
- },
49
- colSetting: {
50
- type: Object,
51
- default: null,
52
- },
53
- },
54
- data() {
55
- let activeName = ''
56
- const tabContent = this.colSetting.options.tabContent
57
- if (tabContent && tabContent.length > 0) {
58
- activeName = tabContent[0].code
59
- }
60
- return {
61
- activeName,
62
- workflowId: null, // 流程实例id,第1个子页签是流转历史时需要该参数
63
- }
64
- },
65
- created() {},
66
- mounted() {},
67
- methods: {
68
- handleClick(tab, event) {
69
- // 先清空实例id,为了更新显示流转历史
70
- this.workflowId = util.getWorkflowId(this.pageCode)
71
- $emit(eventBus, 'refreshHistory')
72
- },
73
- updateValues(sourceModel, sourceTableName, targetRowIndex) {
74
- $emit(this, 'update-value', sourceModel, sourceTableName, targetRowIndex)
75
- },
76
- },
77
- emits: ['update-value', 'refreshHistory'],
78
- }
79
- </script>
1
+ <template>
2
+ <div>
3
+ <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
4
+ <el-tab-pane
5
+ v-for="tab in colSetting.options.tabContent"
6
+ :key="tab.code"
7
+ :label="tab.label"
8
+ :name="tab.code"
9
+ >
10
+ <widget-sub-tab-pane-page
11
+ :page-code="pageCode"
12
+ :data-id="dataId"
13
+ :one-tab-content="tab.list ? tab.list : []"
14
+ :workflow-id="workflowId"
15
+ :task-id="taskId"
16
+ @update-value="updateValues"
17
+ />
18
+ </el-tab-pane>
19
+ </el-tabs>
20
+ </div>
21
+ </template>
22
+
23
+ <script>
24
+ import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
25
+ import WidgetSubTabPanePage from './widget-sub-tab-pane-page'
26
+ import util from './util/util'
27
+ import eventBus from './util/eventBus'
28
+ export default {
29
+ name: 'SubTabPage',
30
+ components: {
31
+ WidgetSubTabPanePage,
32
+ },
33
+ props: {
34
+ // 页面编码
35
+ pageCode: {
36
+ type: String,
37
+ default: null,
38
+ },
39
+ // 表单页面修改记录id
40
+ dataId: {
41
+ type: Number,
42
+ default: null,
43
+ },
44
+ // 流程表单页面办理任务时任务id
45
+ taskId: {
46
+ type: Number,
47
+ default: null,
48
+ },
49
+ colSetting: {
50
+ type: Object,
51
+ default: null,
52
+ },
53
+ },
54
+ data() {
55
+ let activeName = ''
56
+ const tabContent = this.colSetting.options.tabContent
57
+ if (tabContent && tabContent.length > 0) {
58
+ activeName = tabContent[0].code
59
+ }
60
+ return {
61
+ activeName,
62
+ workflowId: null, // 流程实例id,第1个子页签是流转历史时需要该参数
63
+ }
64
+ },
65
+ created() {},
66
+ mounted() {},
67
+ methods: {
68
+ handleClick(tab, event) {
69
+ // 先清空实例id,为了更新显示流转历史
70
+ this.workflowId = util.getWorkflowId(this.pageCode)
71
+ $emit(eventBus, 'refreshHistory')
72
+ },
73
+ updateValues(sourceModel, sourceTableName, targetRowIndex) {
74
+ $emit(this, 'update-value', sourceModel, sourceTableName, targetRowIndex)
75
+ },
76
+ },
77
+ emits: ['update-value', 'refreshHistory'],
78
+ }
79
+ </script>
@@ -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>
@@ -62,7 +62,7 @@ const buttonEvents = {
62
62
  if (this.additionalParamMap) {
63
63
  param.additionalParamMap = this.additionalParamMap
64
64
  }
65
- if (button.jumpPage) {
65
+ if (button.jumpPage && button.jumpPage.jumpPageUrl) {
66
66
  let entity
67
67
  let dataId
68
68
  if (ids && ids.length > 0) {
@@ -416,7 +416,7 @@ const buttonEvents = {
416
416
  path = baseUrl + '/dsc/commons/' + tableName
417
417
  }
418
418
  path = this.getRealRestApiPath(path, system)
419
- const isPermission = button.isPermission === undefined || button.isPermission === 'true'
419
+ const isPermission = button.isPermission === undefined || button.isPermission === 'true' || button.isPermission
420
420
  const param = {
421
421
  ids: ids,
422
422
  functionCode: button.functionCode,
@@ -553,7 +553,7 @@ const buttonEvents = {
553
553
  param += '&tableName=' + tableName
554
554
  }
555
555
  if (button) {
556
- const isPermission = button.isPermission === undefined || button.isPermission === 'true'
556
+ const isPermission = button.isPermission === undefined || button.isPermission === 'true' || button.isPermission
557
557
  param += '&isPermission=' + isPermission
558
558
  }
559
559
  const baseUrl = this.getBaseUrl(system)
@@ -651,8 +651,8 @@ const buttonEvents = {
651
651
  JSON.stringify(this.additionalParamMap)
652
652
  )
653
653
  }
654
- const isPermission = button.isPermission === undefined || button.isPermission === 'true'
655
- param.append('isPermission', isPermission)
654
+ const isPermission = button.isPermission === undefined || button.isPermission === 'true' || button.isPermission
655
+ param.append('isPermission', isPermission + '')
656
656
 
657
657
  let path = restfulApiPath
658
658
  if (system.standard === false && !path) {
@@ -781,7 +781,7 @@ const buttonEvents = {
781
781
  }
782
782
  )
783
783
  .then(() => {
784
- const isPermission = button.isPermission === undefined || button.isPermission === 'true'
784
+ const isPermission = button.isPermission === undefined || button.isPermission === 'true' || button.isPermission
785
785
  const param = {
786
786
  ids: ids,
787
787
  formNoRuleCode,
@@ -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