super-pages 0.0.1-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 (57) hide show
  1. package/README.md +7 -0
  2. package/index.html +13 -0
  3. package/lib/super-pages.css +1 -0
  4. package/lib/super-pages.js +16016 -0
  5. package/lib/super-pages.umd.cjs +35 -0
  6. package/lib/vite.svg +1 -0
  7. package/package.json +25 -0
  8. package/packages/index.js +30 -0
  9. package/packages/super-page/index.js +9 -0
  10. package/packages/super-page/src/button-group.vue +294 -0
  11. package/packages/super-page/src/chart-page.vue +215 -0
  12. package/packages/super-page/src/chart-query-page.vue +163 -0
  13. package/packages/super-page/src/common-form-page.vue +594 -0
  14. package/packages/super-page/src/export-form-report-dialog.vue +145 -0
  15. package/packages/super-page/src/form-head.vue +74 -0
  16. package/packages/super-page/src/form-page.vue +107 -0
  17. package/packages/super-page/src/group-tag.vue +21 -0
  18. package/packages/super-page/src/list-page.vue +1454 -0
  19. package/packages/super-page/src/list-toolbar-dynamic-source.vue +89 -0
  20. package/packages/super-page/src/list-toolbar-page.vue +377 -0
  21. package/packages/super-page/src/my-button-base.vue +438 -0
  22. package/packages/super-page/src/my-button.vue +196 -0
  23. package/packages/super-page/src/page-custom-component.vue +56 -0
  24. package/packages/super-page/src/remove-signer-dialog.vue +103 -0
  25. package/packages/super-page/src/sub-tab-page.vue +79 -0
  26. package/packages/super-page/src/super-page-component.vue +86 -0
  27. package/packages/super-page/src/super-page.vue +162 -0
  28. package/packages/super-page/src/tab-page.vue +154 -0
  29. package/packages/super-page/src/task-informition-dialog.vue +82 -0
  30. package/packages/super-page/src/util/ListButtonEvent.js +896 -0
  31. package/packages/super-page/src/util/api.js +37 -0
  32. package/packages/super-page/src/util/callEvents.js +62 -0
  33. package/packages/super-page/src/util/chartButtonEvent.js +60 -0
  34. package/packages/super-page/src/util/common-util.js +102 -0
  35. package/packages/super-page/src/util/commonButtonEvent.js +70 -0
  36. package/packages/super-page/src/util/eventBus.js +2 -0
  37. package/packages/super-page/src/util/formButtonEvent.js +509 -0
  38. package/packages/super-page/src/util/store.js +3 -0
  39. package/packages/super-page/src/util/super-page.js +29 -0
  40. package/packages/super-page/src/util/util.js +1489 -0
  41. package/packages/super-page/src/util/workflowButtonEvent.js +1729 -0
  42. package/packages/super-page/src/widget-col-page.vue +339 -0
  43. package/packages/super-page/src/widget-page.vue +703 -0
  44. package/packages/super-page/src/widget-sub-tab-pane-page.vue +115 -0
  45. package/packages/super-page/src/widget-tab-pane-page.vue +135 -0
  46. package/packages/super-page/src/workflow-button-group.vue +561 -0
  47. package/packages/super-page/src/workflow-form-page.vue +1310 -0
  48. package/packages/super-page-dialog/index.js +9 -0
  49. package/packages/super-page-dialog/src/super-page-dialog.vue +200 -0
  50. package/packages/utils/gogocodeTransfer.js +59 -0
  51. package/public/vite.svg +1 -0
  52. package/src/i18n/i18n.js +19 -0
  53. package/src/i18n/langs/cn.js +65 -0
  54. package/src/i18n/langs/en.js +68 -0
  55. package/src/styles/index.scss +4 -0
  56. package/src/utils/common-util.js +9 -0
  57. package/vite.config.js +36 -0
@@ -0,0 +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>