super-pages 0.0.2-up → 0.0.4-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 (50) 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 +2488 -2559
  5. package/lib/super-pages.umd.cjs +14 -14
  6. package/package.json +3 -6
  7. package/packages/index.js +30 -30
  8. package/packages/super-page/index.js +9 -9
  9. package/packages/super-page/src/button-group.vue +294 -294
  10. package/packages/super-page/src/chart-page.vue +215 -215
  11. package/packages/super-page/src/chart-query-page.vue +163 -163
  12. package/packages/super-page/src/export-form-report-dialog.vue +145 -145
  13. package/packages/super-page/src/form-head.vue +74 -74
  14. package/packages/super-page/src/form-page.vue +107 -107
  15. package/packages/super-page/src/group-tag.vue +21 -21
  16. package/packages/super-page/src/list-page.vue +1454 -1454
  17. package/packages/super-page/src/list-toolbar-dynamic-source.vue +89 -89
  18. package/packages/super-page/src/list-toolbar-page.vue +377 -377
  19. package/packages/super-page/src/my-button-base.vue +438 -438
  20. package/packages/super-page/src/my-button.vue +196 -196
  21. package/packages/super-page/src/page-custom-component.vue +56 -56
  22. package/packages/super-page/src/remove-signer-dialog.vue +103 -103
  23. package/packages/super-page/src/sub-tab-page.vue +79 -79
  24. package/packages/super-page/src/super-page-component.vue +86 -86
  25. package/packages/super-page/src/super-page.vue +162 -162
  26. package/packages/super-page/src/tab-page.vue +154 -154
  27. package/packages/super-page/src/task-informition-dialog.vue +82 -82
  28. package/packages/super-page/src/util/ListButtonEvent.js +896 -896
  29. package/packages/super-page/src/util/api.js +37 -37
  30. package/packages/super-page/src/util/callEvents.js +62 -62
  31. package/packages/super-page/src/util/chartButtonEvent.js +60 -60
  32. package/packages/super-page/src/util/common-util.js +102 -102
  33. package/packages/super-page/src/util/commonButtonEvent.js +70 -70
  34. package/packages/super-page/src/util/eventBus.js +2 -2
  35. package/packages/super-page/src/util/formButtonEvent.js +509 -509
  36. package/packages/super-page/src/util/store.js +3 -3
  37. package/packages/super-page/src/util/super-page.js +29 -29
  38. package/packages/super-page/src/util/workflowButtonEvent.js +1729 -1729
  39. package/packages/super-page/src/widget-col-page.vue +339 -339
  40. package/packages/super-page/src/widget-page.vue +703 -703
  41. package/packages/super-page/src/widget-sub-tab-pane-page.vue +115 -115
  42. package/packages/super-page/src/widget-tab-pane-page.vue +135 -135
  43. package/packages/super-page/src/workflow-button-group.vue +561 -561
  44. package/packages/super-page-dialog/index.js +9 -9
  45. package/packages/super-page-dialog/src/super-page-dialog.vue +200 -200
  46. package/packages/utils/gogocodeTransfer.js +59 -59
  47. package/src/i18n/langs/cn.js +65 -65
  48. package/src/i18n/langs/en.js +68 -68
  49. package/src/utils/common-util.js +9 -9
  50. package/vite.config.js +36 -36
@@ -1,163 +1,163 @@
1
- <template>
2
- <div>
3
- <!-- <button-group
4
- v-if="colSetting.options.buttonGroup"
5
- :button-groups="colSetting.options.buttonGroup"
6
- :permission-prefix="permissionPrefix"
7
- :additional-param-map="additionalParamMap"
8
- :button-area-custom-component-arr="colSetting.options.buttonAreaCustomComponentArr"
9
- position="chart"
10
- :page-code="pageCode"
11
- @click="clickListButton"
12
- /> -->
13
- <chart-query
14
- :ref="'chartQueryRef' + colSetting.baseSetting.componentCode"
15
- :query-code="queryCode"
16
- :is-initial-query="isInitialQuery"
17
- :default-open="defaultOpen"
18
- :is-page-info="isPageInfo"
19
- :options="options"
20
- @search="search"
21
- @initSearch="initSearch"
22
- @reset="resetForm"
23
- @export="exportChart"
24
- />
25
- </div>
26
- </template>
27
-
28
- <script>
29
- import eventBus from './util/eventBus'
30
- import { getStoreInfo } from './util/common-util'
31
- import Util from './util/util'
32
- export default {
33
- name: 'ChartQueryPage',
34
- props: {
35
- queryCode: {
36
- type: String,
37
- default: null,
38
- },
39
- // 页面编码
40
- pageCode: {
41
- type: String,
42
- default: null,
43
- },
44
- colSetting: {
45
- type: Object,
46
- default: null,
47
- },
48
- // 是否需要立即查询
49
- isInitialQuery: {
50
- type: Boolean,
51
- default: false,
52
- },
53
- },
54
- // isPageInfo 是否预览,页面管理注入
55
- inject: {
56
- isPageInfo: { value: 'isPageInfo', default: false },
57
- },
58
- data() {
59
- let beanName
60
- if (this.chartQuerySetting) {
61
- beanName = this.chartQuerySetting.baseSetting.beanName
62
- }
63
- const options = {}
64
- options.formEvents = this.packageFormEvents()
65
- options.chartEvents = this.packageChartEvents()
66
- return {
67
- additionalParamMap: null, // 跳转页面的附加参数
68
- beanName,
69
- options,
70
- defaultOpen: false,
71
- }
72
- },
73
- created() {
74
- let additionalParamMap = getStoreInfo(this.pageCode, '_pathQuery')
75
- console.log('图表页面---pathQuery=', additionalParamMap)
76
- if (!additionalParamMap) {
77
- additionalParamMap = {}
78
- }
79
- const additionalParamMapNew = getStoreInfo(
80
- this.pageCode,
81
- 'additionalParamMap'
82
- )
83
- console.log('图表页面---additionalParamMapNew=', additionalParamMapNew)
84
- if (additionalParamMapNew) {
85
- Object.assign(additionalParamMap, additionalParamMapNew)
86
- }
87
- this.additionalParamMap = additionalParamMap
88
- this.options.additionalParamMap = additionalParamMap
89
- },
90
- mounted() {
91
- const that = this
92
- // 刷新指定页签的图表数据
93
- eventBus.$on(that.pageCode + '-refresh-tab', (tabCode) => {
94
- const refName =
95
- 'chartQueryRef' + that.colSetting.baseSetting.componentCode
96
- if (that.$refs[refName]) {
97
- that.$refs[refName].getSearchParams().then((searchForm) => {
98
- that.search(searchForm)
99
- })
100
- }
101
- })
102
- },
103
- beforeUnmount() {
104
- eventBus.$off(this.pageCode + '-refresh-tab')
105
- },
106
- methods: {
107
- ...Util,
108
- // 图表查询组件统计按钮
109
- search(searchParam) {
110
- $emit(
111
- eventBus,
112
- this.queryCode + '-clickChartSearchButton',
113
- searchParam,
114
- false
115
- )
116
- },
117
- resetForm(searchParam) {
118
- // 重置查询表单
119
- $emit(eventBus, this.queryCode + '-clickChartResetButton', searchParam)
120
- },
121
- // 导出报告
122
- exportChart() {
123
- $emit(this, 'export', this.beanName)
124
- },
125
- // 进入页面初始化查询数据
126
- initSearch(searchParam) {
127
- const that = this
128
- setTimeout(function () {
129
- $emit(
130
- eventBus,
131
- that.queryCode + '-clickChartSearchButton',
132
- searchParam,
133
- true
134
- )
135
- }, 500)
136
- },
137
- packageChartEvents() {
138
- const allChartEvents = {}
139
- let chartEvents = []
140
- const pageEvents = getStoreInfo(this.pageCode, '_pageEvents')
141
- if (pageEvents) {
142
- chartEvents = pageEvents.chartEvents
143
- if (this.queryCode && chartEvents) {
144
- Object.keys(chartEvents).forEach((key) => {
145
- const formViewCodeKey = key.substring(0, key.indexOf('__'))
146
- if (this.queryCode === formViewCodeKey) {
147
- // 表示是当前表单的事件,封装到事件对象中
148
- const event = key.substring(key.indexOf('__') + '__'.length)
149
- allChartEvents[event] = chartEvents[key]
150
- }
151
- })
152
- }
153
- const customEvents = pageEvents.customEvents
154
- if (customEvents) {
155
- allChartEvents.customEvents = customEvents
156
- }
157
- }
158
- return allChartEvents
159
- },
160
- },
161
- emits: [, 'export'],
162
- }
163
- </script>
1
+ <template>
2
+ <div>
3
+ <!-- <button-group
4
+ v-if="colSetting.options.buttonGroup"
5
+ :button-groups="colSetting.options.buttonGroup"
6
+ :permission-prefix="permissionPrefix"
7
+ :additional-param-map="additionalParamMap"
8
+ :button-area-custom-component-arr="colSetting.options.buttonAreaCustomComponentArr"
9
+ position="chart"
10
+ :page-code="pageCode"
11
+ @click="clickListButton"
12
+ /> -->
13
+ <chart-query
14
+ :ref="'chartQueryRef' + colSetting.baseSetting.componentCode"
15
+ :query-code="queryCode"
16
+ :is-initial-query="isInitialQuery"
17
+ :default-open="defaultOpen"
18
+ :is-page-info="isPageInfo"
19
+ :options="options"
20
+ @search="search"
21
+ @initSearch="initSearch"
22
+ @reset="resetForm"
23
+ @export="exportChart"
24
+ />
25
+ </div>
26
+ </template>
27
+
28
+ <script>
29
+ import eventBus from './util/eventBus'
30
+ import { getStoreInfo } from './util/common-util'
31
+ import Util from './util/util'
32
+ export default {
33
+ name: 'ChartQueryPage',
34
+ props: {
35
+ queryCode: {
36
+ type: String,
37
+ default: null,
38
+ },
39
+ // 页面编码
40
+ pageCode: {
41
+ type: String,
42
+ default: null,
43
+ },
44
+ colSetting: {
45
+ type: Object,
46
+ default: null,
47
+ },
48
+ // 是否需要立即查询
49
+ isInitialQuery: {
50
+ type: Boolean,
51
+ default: false,
52
+ },
53
+ },
54
+ // isPageInfo 是否预览,页面管理注入
55
+ inject: {
56
+ isPageInfo: { value: 'isPageInfo', default: false },
57
+ },
58
+ data() {
59
+ let beanName
60
+ if (this.chartQuerySetting) {
61
+ beanName = this.chartQuerySetting.baseSetting.beanName
62
+ }
63
+ const options = {}
64
+ options.formEvents = this.packageFormEvents()
65
+ options.chartEvents = this.packageChartEvents()
66
+ return {
67
+ additionalParamMap: null, // 跳转页面的附加参数
68
+ beanName,
69
+ options,
70
+ defaultOpen: false,
71
+ }
72
+ },
73
+ created() {
74
+ let additionalParamMap = getStoreInfo(this.pageCode, '_pathQuery')
75
+ console.log('图表页面---pathQuery=', additionalParamMap)
76
+ if (!additionalParamMap) {
77
+ additionalParamMap = {}
78
+ }
79
+ const additionalParamMapNew = getStoreInfo(
80
+ this.pageCode,
81
+ 'additionalParamMap'
82
+ )
83
+ console.log('图表页面---additionalParamMapNew=', additionalParamMapNew)
84
+ if (additionalParamMapNew) {
85
+ Object.assign(additionalParamMap, additionalParamMapNew)
86
+ }
87
+ this.additionalParamMap = additionalParamMap
88
+ this.options.additionalParamMap = additionalParamMap
89
+ },
90
+ mounted() {
91
+ const that = this
92
+ // 刷新指定页签的图表数据
93
+ eventBus.$on(that.pageCode + '-refresh-tab', (tabCode) => {
94
+ const refName =
95
+ 'chartQueryRef' + that.colSetting.baseSetting.componentCode
96
+ if (that.$refs[refName]) {
97
+ that.$refs[refName].getSearchParams().then((searchForm) => {
98
+ that.search(searchForm)
99
+ })
100
+ }
101
+ })
102
+ },
103
+ beforeUnmount() {
104
+ eventBus.$off(this.pageCode + '-refresh-tab')
105
+ },
106
+ methods: {
107
+ ...Util,
108
+ // 图表查询组件统计按钮
109
+ search(searchParam) {
110
+ $emit(
111
+ eventBus,
112
+ this.queryCode + '-clickChartSearchButton',
113
+ searchParam,
114
+ false
115
+ )
116
+ },
117
+ resetForm(searchParam) {
118
+ // 重置查询表单
119
+ $emit(eventBus, this.queryCode + '-clickChartResetButton', searchParam)
120
+ },
121
+ // 导出报告
122
+ exportChart() {
123
+ $emit(this, 'export', this.beanName)
124
+ },
125
+ // 进入页面初始化查询数据
126
+ initSearch(searchParam) {
127
+ const that = this
128
+ setTimeout(function () {
129
+ $emit(
130
+ eventBus,
131
+ that.queryCode + '-clickChartSearchButton',
132
+ searchParam,
133
+ true
134
+ )
135
+ }, 500)
136
+ },
137
+ packageChartEvents() {
138
+ const allChartEvents = {}
139
+ let chartEvents = []
140
+ const pageEvents = getStoreInfo(this.pageCode, '_pageEvents')
141
+ if (pageEvents) {
142
+ chartEvents = pageEvents.chartEvents
143
+ if (this.queryCode && chartEvents) {
144
+ Object.keys(chartEvents).forEach((key) => {
145
+ const formViewCodeKey = key.substring(0, key.indexOf('__'))
146
+ if (this.queryCode === formViewCodeKey) {
147
+ // 表示是当前表单的事件,封装到事件对象中
148
+ const event = key.substring(key.indexOf('__') + '__'.length)
149
+ allChartEvents[event] = chartEvents[key]
150
+ }
151
+ })
152
+ }
153
+ const customEvents = pageEvents.customEvents
154
+ if (customEvents) {
155
+ allChartEvents.customEvents = customEvents
156
+ }
157
+ }
158
+ return allChartEvents
159
+ },
160
+ },
161
+ emits: [, 'export'],
162
+ }
163
+ </script>
@@ -1,145 +1,145 @@
1
- <template>
2
- <el-dialog
3
- :show-close="true"
4
- :append-to-body="true"
5
- :title="$t('superPage.selectTemplate')"
6
- model-value
7
- @close="closeExportForm"
8
- >
9
- <el-table :data="templateFiles" style="width: 100%">
10
- <el-table-column
11
- :label="$t('superPage.temlpate')"
12
- prop="templateShowPath"
13
- >
14
- <template v-slot="scope">
15
- {{ formatTemplateShowPath(scope.row.templateShowPath) }}
16
- </template>
17
- </el-table-column>
18
- <el-table-column
19
- :label="$t('superPage.operating')"
20
- width="200"
21
- fixed="right"
22
- >
23
- <template v-slot="scope">
24
- <el-button type="text" size="small" @click="exportForm(scope.row)">
25
- {{ $t('superPage.export') }}
26
- </el-button>
27
- <!-- <el-button
28
- type="text"
29
- size="small"
30
- @click="previewExportForm(scope.row)"
31
- >
32
- {{ $t('superPage.preview') }}
33
- </el-button> -->
34
- </template>
35
- </el-table-column>
36
- </el-table>
37
- </el-dialog>
38
- </template>
39
-
40
- <script>
41
- import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
42
- import { packageTemplateFiles } from './util/common-util'
43
- export default {
44
- name: 'ExportFormReportDialog',
45
- props: {
46
- button: {
47
- type: [Array, Object],
48
- default: () => {
49
- return null
50
- },
51
- },
52
- entity: {
53
- type: Object,
54
- default: null,
55
- },
56
- },
57
- data() {
58
- let templateFiles = []
59
- if (this.button.templateFiles && this.button.templateFiles.length > 0) {
60
- templateFiles = packageTemplateFiles(this.button.templateFiles)
61
- } else if (this.button.templateUUID && this.button.templateShowPath) {
62
- templateFiles.push({
63
- templateUUID: this.button.templateUUID,
64
- templateShowPath: this.button.templateShowPath,
65
- })
66
- }
67
- return {
68
- templateFiles,
69
- fields: [],
70
- prefix: '${',
71
- suffix: '}',
72
- }
73
- },
74
- created() {},
75
- methods: {
76
- getFileds(templateShowPath) {
77
- console.log('templateShowPath', templateShowPath)
78
- let field
79
- let formatStr
80
- let newValue = templateShowPath
81
- const prefixIndex = newValue.indexOf(this.prefix)
82
- const suffixIndex = newValue.indexOf(this.suffix)
83
- console.log('prefixIndex', prefixIndex)
84
- console.log('suffixIndex', suffixIndex)
85
- if (prefixIndex !== -1 && suffixIndex !== -1) {
86
- if (prefixIndex > suffixIndex) {
87
- newValue =
88
- newValue.substring(0, suffixIndex) +
89
- newValue.substring(suffixIndex + this.suffix.length)
90
- console.log('non replacement value === newValue', newValue)
91
- } else {
92
- field = newValue.substring(
93
- prefixIndex + this.prefix.length,
94
- suffixIndex
95
- )
96
- formatStr = newValue.substring(
97
- prefixIndex,
98
- suffixIndex + this.suffix.length
99
- )
100
- console.log('field', field)
101
- console.log('formatStr', formatStr)
102
- this.fields.push(field)
103
- console.log('fields', this.fields)
104
- newValue = newValue.replace(formatStr, '')
105
- console.log('newValue', newValue)
106
- }
107
- return this.getFileds(newValue)
108
- }
109
- return this.fields
110
- },
111
- formatTemplateShowPath(templateShowPath) {
112
- const fields = this.getFileds(templateShowPath)
113
- console.log('fields', fields)
114
-
115
- fields.forEach((field) => {
116
- const formatStr = this.prefix + field + this.suffix
117
- let formatValue
118
- if (
119
- templateShowPath.indexOf(formatStr) !== -1 &&
120
- this.entity.hasOwnProperty(field)
121
- ) {
122
- formatValue = this.entity[field] ? this.entity[field] : ''
123
- templateShowPath = templateShowPath.replace(formatStr, formatValue)
124
- }
125
- })
126
- return templateShowPath
127
- },
128
- exportForm(row) {
129
- if (row['templateShowPath']) {
130
- row['templateShowPath'] = this.formatTemplateShowPath(
131
- row['templateShowPath']
132
- )
133
- }
134
- $emit(this, 'before-export-form-report', row)
135
- },
136
- previewExportForm(row) {
137
- $emit(this, 'preview-export-form-report', row)
138
- },
139
- closeExportForm() {
140
- $emit(this, 'close')
141
- },
142
- },
143
- emits: ['before-export-form-report', 'preview-export-form-report', 'close'],
144
- }
145
- </script>
1
+ <template>
2
+ <el-dialog
3
+ :show-close="true"
4
+ :append-to-body="true"
5
+ :title="$t('superPage.selectTemplate')"
6
+ model-value
7
+ @close="closeExportForm"
8
+ >
9
+ <el-table :data="templateFiles" style="width: 100%">
10
+ <el-table-column
11
+ :label="$t('superPage.temlpate')"
12
+ prop="templateShowPath"
13
+ >
14
+ <template v-slot="scope">
15
+ {{ formatTemplateShowPath(scope.row.templateShowPath) }}
16
+ </template>
17
+ </el-table-column>
18
+ <el-table-column
19
+ :label="$t('superPage.operating')"
20
+ width="200"
21
+ fixed="right"
22
+ >
23
+ <template v-slot="scope">
24
+ <el-button type="text" size="small" @click="exportForm(scope.row)">
25
+ {{ $t('superPage.export') }}
26
+ </el-button>
27
+ <!-- <el-button
28
+ type="text"
29
+ size="small"
30
+ @click="previewExportForm(scope.row)"
31
+ >
32
+ {{ $t('superPage.preview') }}
33
+ </el-button> -->
34
+ </template>
35
+ </el-table-column>
36
+ </el-table>
37
+ </el-dialog>
38
+ </template>
39
+
40
+ <script>
41
+ import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
42
+ import { packageTemplateFiles } from './util/common-util'
43
+ export default {
44
+ name: 'ExportFormReportDialog',
45
+ props: {
46
+ button: {
47
+ type: [Array, Object],
48
+ default: () => {
49
+ return null
50
+ },
51
+ },
52
+ entity: {
53
+ type: Object,
54
+ default: null,
55
+ },
56
+ },
57
+ data() {
58
+ let templateFiles = []
59
+ if (this.button.templateFiles && this.button.templateFiles.length > 0) {
60
+ templateFiles = packageTemplateFiles(this.button.templateFiles)
61
+ } else if (this.button.templateUUID && this.button.templateShowPath) {
62
+ templateFiles.push({
63
+ templateUUID: this.button.templateUUID,
64
+ templateShowPath: this.button.templateShowPath,
65
+ })
66
+ }
67
+ return {
68
+ templateFiles,
69
+ fields: [],
70
+ prefix: '${',
71
+ suffix: '}',
72
+ }
73
+ },
74
+ created() {},
75
+ methods: {
76
+ getFileds(templateShowPath) {
77
+ console.log('templateShowPath', templateShowPath)
78
+ let field
79
+ let formatStr
80
+ let newValue = templateShowPath
81
+ const prefixIndex = newValue.indexOf(this.prefix)
82
+ const suffixIndex = newValue.indexOf(this.suffix)
83
+ console.log('prefixIndex', prefixIndex)
84
+ console.log('suffixIndex', suffixIndex)
85
+ if (prefixIndex !== -1 && suffixIndex !== -1) {
86
+ if (prefixIndex > suffixIndex) {
87
+ newValue =
88
+ newValue.substring(0, suffixIndex) +
89
+ newValue.substring(suffixIndex + this.suffix.length)
90
+ console.log('non replacement value === newValue', newValue)
91
+ } else {
92
+ field = newValue.substring(
93
+ prefixIndex + this.prefix.length,
94
+ suffixIndex
95
+ )
96
+ formatStr = newValue.substring(
97
+ prefixIndex,
98
+ suffixIndex + this.suffix.length
99
+ )
100
+ console.log('field', field)
101
+ console.log('formatStr', formatStr)
102
+ this.fields.push(field)
103
+ console.log('fields', this.fields)
104
+ newValue = newValue.replace(formatStr, '')
105
+ console.log('newValue', newValue)
106
+ }
107
+ return this.getFileds(newValue)
108
+ }
109
+ return this.fields
110
+ },
111
+ formatTemplateShowPath(templateShowPath) {
112
+ const fields = this.getFileds(templateShowPath)
113
+ console.log('fields', fields)
114
+
115
+ fields.forEach((field) => {
116
+ const formatStr = this.prefix + field + this.suffix
117
+ let formatValue
118
+ if (
119
+ templateShowPath.indexOf(formatStr) !== -1 &&
120
+ this.entity.hasOwnProperty(field)
121
+ ) {
122
+ formatValue = this.entity[field] ? this.entity[field] : ''
123
+ templateShowPath = templateShowPath.replace(formatStr, formatValue)
124
+ }
125
+ })
126
+ return templateShowPath
127
+ },
128
+ exportForm(row) {
129
+ if (row['templateShowPath']) {
130
+ row['templateShowPath'] = this.formatTemplateShowPath(
131
+ row['templateShowPath']
132
+ )
133
+ }
134
+ $emit(this, 'before-export-form-report', row)
135
+ },
136
+ previewExportForm(row) {
137
+ $emit(this, 'preview-export-form-report', row)
138
+ },
139
+ closeExportForm() {
140
+ $emit(this, 'close')
141
+ },
142
+ },
143
+ emits: ['before-export-form-report', 'preview-export-form-report', 'close'],
144
+ }
145
+ </script>