super-pages 0.0.4-up → 0.0.5-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 +1375 -1285
  5. package/lib/super-pages.umd.cjs +13 -13
  6. package/package.json +6 -3
  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 +1453 -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 +8 -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,215 +1,215 @@
1
- <template>
2
- <div>
3
- <button-group
4
- v-if="chartQuerySetting && chartQuerySetting.options.buttonGroup"
5
- :button-groups="chartQuerySetting.options.buttonGroup"
6
- :permission-prefix="permissionPrefix"
7
- :additional-param-map="additionalParamMap"
8
- :button-area-custom-component-arr="
9
- chartQuerySetting.options.buttonAreaCustomComponentArr
10
- "
11
- position="chart"
12
- :page-code="pageCode"
13
- @click="clickListButton"
14
- />
15
- <super-chart
16
- ref="superChart"
17
- :code="chartViewCode"
18
- :is-initial-query="isInitialQuery"
19
- :is-custom="isNeedCustomStyle"
20
- :options="chartOptions"
21
- :query="query"
22
- :is-tab-chart-view="isTabChartView"
23
- />
24
- </div>
25
- </template>
26
-
27
- <script>
28
- import ButtonGroup from './button-group'
29
- import eventBus from './util/eventBus'
30
- import { getStoreInfo, setStoreInfo } from './util/common-util'
31
- import * as Vue from 'vue'
32
- import Util from './util/util'
33
- import chartButtonEvent from './util/chartButtonEvent'
34
- export default {
35
- name: 'ChartViewPage',
36
- components: {
37
- ButtonGroup,
38
- },
39
- props: {
40
- chartViewCode: {
41
- type: String,
42
- default: null,
43
- },
44
- // 页面编码
45
- pageCode: {
46
- type: String,
47
- default: null,
48
- },
49
- // 是否需要立即查询
50
- isInitialQuery: {
51
- type: Boolean,
52
- default: true,
53
- },
54
- // 是否需要设置自定义样式
55
- isNeedCustomStyle: {
56
- type: Boolean,
57
- default: false,
58
- },
59
- // 是否需要导出
60
- isNeedExport: {
61
- type: Boolean,
62
- default: true,
63
- },
64
- // 图表查询组件配置col
65
- chartQuerySetting: {
66
- type: Object,
67
- default: null,
68
- },
69
- // 是否是tab图表页面
70
- isTabChartView: {
71
- type: Boolean,
72
- default: false,
73
- },
74
- },
75
- data() {
76
- let additionalParamMap = getStoreInfo(this.pageCode, '_pathQuery')
77
- console.log('图表页面---pathQuery=', additionalParamMap)
78
- if (!additionalParamMap) {
79
- additionalParamMap = {}
80
- }
81
- const additionalParamMapNew = getStoreInfo(
82
- this.pageCode,
83
- 'additionalParamMap'
84
- )
85
- console.log('图表页面---additionalParamMapNew=', additionalParamMapNew)
86
- if (additionalParamMapNew) {
87
- Object.assign(additionalParamMap, additionalParamMapNew)
88
- }
89
- let isPreview = getStoreInfo(this.pageCode, '_pagePreview')
90
- if (isPreview === undefined) {
91
- // 开发模式 或 预览时按钮不受控制
92
- isPreview = false
93
- }
94
- let beanName
95
- let componentCode
96
- if (this.chartQuerySetting) {
97
- beanName = this.chartQuerySetting.baseSetting.beanName
98
- componentCode = this.chartQuerySetting.baseSetting.componentCode
99
- }
100
- const system = getStoreInfo(this.pageCode, '_systemInfo')
101
- let permissionPrefix
102
- if (system) {
103
- permissionPrefix = system.code + '.' + this.pageCode + '.' + componentCode
104
- }
105
- return {
106
- isPreview, // 是否是预览页面
107
- query: null,
108
- chartQueryCode: null, // 统计图对应的查询组件编码
109
- additionalParamMap,
110
- permissionPrefix,
111
- beanName,
112
- componentCode,
113
- chartOptions: {
114
- additionalParamMap,
115
- },
116
- }
117
- },
118
- created() {
119
- const that = this
120
- // 关闭弹框事件回调使用
121
- eventBus.$on(this.pageCode + '_close-dialog-get-entity', () => {
122
- $emit(eventBus, that.pageCode + '_close-super-dialog')
123
- })
124
- },
125
- mounted() {
126
- this.addRef()
127
- this.getChartQueryCodeByChart(this.chartViewCode).then((queryCode) => {
128
- const that = this
129
- that.chartQueryCode = queryCode
130
- // 响应点击统计按钮
131
- eventBus.$on(
132
- that.chartQueryCode + '-clickChartSearchButton',
133
- (searchParam, isInitSearch) => {
134
- console.log('准备传递数据', searchParam)
135
- if (that.isPreview) {
136
- // 预览时,统计按钮不生效
137
- return
138
- }
139
- if (isInitSearch && this.isInitialQuery === false) {
140
- // 当是初始化触发且禁止初始化时,不查询
141
- return
142
- }
143
- // 表示是指定的查询组件点击的“统计”按钮
144
- if (!searchParam) {
145
- that.query = null
146
- return
147
- }
148
- // 如果是Promise需要返回再赋值
149
- if (
150
- searchParam &&
151
- Object.prototype.toString.call(searchParam) === '[object Promise]'
152
- ) {
153
- searchParam.then((res) => {
154
- that.query = res
155
- })
156
- } else {
157
- that.query = searchParam
158
- }
159
- }
160
- )
161
- // 响应点击重置按钮
162
- eventBus.$on(
163
- that.chartQueryCode + '-clickChartResetButton',
164
- (searchParam) => {
165
- if (that.isPreview) {
166
- // 预览时,重置按钮不生效
167
- return
168
- }
169
- // 表示是指定的查询组件点击的“重置”按钮
170
- if (searchParam) {
171
- that.query = searchParam
172
- } else {
173
- that.query = null
174
- }
175
- }
176
- )
177
- })
178
- },
179
- beforeUnmount() {
180
- eventBus.$off(this.chartQueryCode + '-clickChartSearchButton')
181
- eventBus.$off(this.chartQueryCode + '-clickChartResetButton')
182
- eventBus.$off(this.pageCode + '_close-dialog-get-entity')
183
- },
184
- methods: {
185
- ...Util,
186
- ...chartButtonEvent,
187
- getChartQueryCodeByChart(code) {
188
- return this.$http.get(
189
- window.$vueApp.config.globalProperties.baseAPI +
190
- '/component/chart-query-codes/charts/' +
191
- code
192
- )
193
- },
194
- // 缓存添加ref对象,方便后期使用
195
- addRef() {
196
- if (this.isNeedExport) {
197
- let chartRefList = getStoreInfo(this.pageCode, 'chartRefList')
198
- if (!chartRefList) {
199
- chartRefList = []
200
- }
201
- chartRefList.push({
202
- code: this.chartViewCode,
203
- refData: this.$refs.superChart,
204
- })
205
- setStoreInfo(this.pageCode, 'chartRefList', chartRefList)
206
- }
207
- },
208
- // 导出报告
209
- exportChart() {
210
- $emit(this, 'export', this.beanName)
211
- },
212
- },
213
- emits: ['export'],
214
- }
215
- </script>
1
+ <template>
2
+ <div>
3
+ <button-group
4
+ v-if="chartQuerySetting && chartQuerySetting.options.buttonGroup"
5
+ :button-groups="chartQuerySetting.options.buttonGroup"
6
+ :permission-prefix="permissionPrefix"
7
+ :additional-param-map="additionalParamMap"
8
+ :button-area-custom-component-arr="
9
+ chartQuerySetting.options.buttonAreaCustomComponentArr
10
+ "
11
+ position="chart"
12
+ :page-code="pageCode"
13
+ @click="clickListButton"
14
+ />
15
+ <super-chart
16
+ ref="superChart"
17
+ :code="chartViewCode"
18
+ :is-initial-query="isInitialQuery"
19
+ :is-custom="isNeedCustomStyle"
20
+ :options="chartOptions"
21
+ :query="query"
22
+ :is-tab-chart-view="isTabChartView"
23
+ />
24
+ </div>
25
+ </template>
26
+
27
+ <script>
28
+ import ButtonGroup from './button-group'
29
+ import eventBus from './util/eventBus'
30
+ import { getStoreInfo, setStoreInfo } from './util/common-util'
31
+ import * as Vue from 'vue'
32
+ import Util from './util/util'
33
+ import chartButtonEvent from './util/chartButtonEvent'
34
+ export default {
35
+ name: 'ChartViewPage',
36
+ components: {
37
+ ButtonGroup,
38
+ },
39
+ props: {
40
+ chartViewCode: {
41
+ type: String,
42
+ default: null,
43
+ },
44
+ // 页面编码
45
+ pageCode: {
46
+ type: String,
47
+ default: null,
48
+ },
49
+ // 是否需要立即查询
50
+ isInitialQuery: {
51
+ type: Boolean,
52
+ default: true,
53
+ },
54
+ // 是否需要设置自定义样式
55
+ isNeedCustomStyle: {
56
+ type: Boolean,
57
+ default: false,
58
+ },
59
+ // 是否需要导出
60
+ isNeedExport: {
61
+ type: Boolean,
62
+ default: true,
63
+ },
64
+ // 图表查询组件配置col
65
+ chartQuerySetting: {
66
+ type: Object,
67
+ default: null,
68
+ },
69
+ // 是否是tab图表页面
70
+ isTabChartView: {
71
+ type: Boolean,
72
+ default: false,
73
+ },
74
+ },
75
+ data() {
76
+ let additionalParamMap = getStoreInfo(this.pageCode, '_pathQuery')
77
+ console.log('图表页面---pathQuery=', additionalParamMap)
78
+ if (!additionalParamMap) {
79
+ additionalParamMap = {}
80
+ }
81
+ const additionalParamMapNew = getStoreInfo(
82
+ this.pageCode,
83
+ 'additionalParamMap'
84
+ )
85
+ console.log('图表页面---additionalParamMapNew=', additionalParamMapNew)
86
+ if (additionalParamMapNew) {
87
+ Object.assign(additionalParamMap, additionalParamMapNew)
88
+ }
89
+ let isPreview = getStoreInfo(this.pageCode, '_pagePreview')
90
+ if (isPreview === undefined) {
91
+ // 开发模式 或 预览时按钮不受控制
92
+ isPreview = false
93
+ }
94
+ let beanName
95
+ let componentCode
96
+ if (this.chartQuerySetting) {
97
+ beanName = this.chartQuerySetting.baseSetting.beanName
98
+ componentCode = this.chartQuerySetting.baseSetting.componentCode
99
+ }
100
+ const system = getStoreInfo(this.pageCode, '_systemInfo')
101
+ let permissionPrefix
102
+ if (system) {
103
+ permissionPrefix = system.code + '.' + this.pageCode + '.' + componentCode
104
+ }
105
+ return {
106
+ isPreview, // 是否是预览页面
107
+ query: null,
108
+ chartQueryCode: null, // 统计图对应的查询组件编码
109
+ additionalParamMap,
110
+ permissionPrefix,
111
+ beanName,
112
+ componentCode,
113
+ chartOptions: {
114
+ additionalParamMap,
115
+ },
116
+ }
117
+ },
118
+ created() {
119
+ const that = this
120
+ // 关闭弹框事件回调使用
121
+ eventBus.$on(this.pageCode + '_close-dialog-get-entity', () => {
122
+ $emit(eventBus, that.pageCode + '_close-super-dialog')
123
+ })
124
+ },
125
+ mounted() {
126
+ this.addRef()
127
+ this.getChartQueryCodeByChart(this.chartViewCode).then((queryCode) => {
128
+ const that = this
129
+ that.chartQueryCode = queryCode
130
+ // 响应点击统计按钮
131
+ eventBus.$on(
132
+ that.chartQueryCode + '-clickChartSearchButton',
133
+ (searchParam, isInitSearch) => {
134
+ console.log('准备传递数据', searchParam)
135
+ if (that.isPreview) {
136
+ // 预览时,统计按钮不生效
137
+ return
138
+ }
139
+ if (isInitSearch && this.isInitialQuery === false) {
140
+ // 当是初始化触发且禁止初始化时,不查询
141
+ return
142
+ }
143
+ // 表示是指定的查询组件点击的“统计”按钮
144
+ if (!searchParam) {
145
+ that.query = null
146
+ return
147
+ }
148
+ // 如果是Promise需要返回再赋值
149
+ if (
150
+ searchParam &&
151
+ Object.prototype.toString.call(searchParam) === '[object Promise]'
152
+ ) {
153
+ searchParam.then((res) => {
154
+ that.query = res
155
+ })
156
+ } else {
157
+ that.query = searchParam
158
+ }
159
+ }
160
+ )
161
+ // 响应点击重置按钮
162
+ eventBus.$on(
163
+ that.chartQueryCode + '-clickChartResetButton',
164
+ (searchParam) => {
165
+ if (that.isPreview) {
166
+ // 预览时,重置按钮不生效
167
+ return
168
+ }
169
+ // 表示是指定的查询组件点击的“重置”按钮
170
+ if (searchParam) {
171
+ that.query = searchParam
172
+ } else {
173
+ that.query = null
174
+ }
175
+ }
176
+ )
177
+ })
178
+ },
179
+ beforeUnmount() {
180
+ eventBus.$off(this.chartQueryCode + '-clickChartSearchButton')
181
+ eventBus.$off(this.chartQueryCode + '-clickChartResetButton')
182
+ eventBus.$off(this.pageCode + '_close-dialog-get-entity')
183
+ },
184
+ methods: {
185
+ ...Util,
186
+ ...chartButtonEvent,
187
+ getChartQueryCodeByChart(code) {
188
+ return this.$http.get(
189
+ window.$vueApp.config.globalProperties.baseAPI +
190
+ '/component/chart-query-codes/charts/' +
191
+ code
192
+ )
193
+ },
194
+ // 缓存添加ref对象,方便后期使用
195
+ addRef() {
196
+ if (this.isNeedExport) {
197
+ let chartRefList = getStoreInfo(this.pageCode, 'chartRefList')
198
+ if (!chartRefList) {
199
+ chartRefList = []
200
+ }
201
+ chartRefList.push({
202
+ code: this.chartViewCode,
203
+ refData: this.$refs.superChart,
204
+ })
205
+ setStoreInfo(this.pageCode, 'chartRefList', chartRefList)
206
+ }
207
+ },
208
+ // 导出报告
209
+ exportChart() {
210
+ $emit(this, 'export', this.beanName)
211
+ },
212
+ },
213
+ emits: ['export'],
214
+ }
215
+ </script>