super-pages 0.7.57 → 0.7.58

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 (44) hide show
  1. package/lib/super-pages.css +1 -1
  2. package/lib/super-pages.umd.min.js +5 -5
  3. package/package.json +2 -2
  4. package/packages/index.js +33 -0
  5. package/packages/super-page/index.js +9 -0
  6. package/packages/super-page/src/button-group.vue +272 -0
  7. package/packages/super-page/src/chart-page.vue +173 -0
  8. package/packages/super-page/src/chart-query-page.vue +113 -0
  9. package/packages/super-page/src/common-form-page.vue +547 -0
  10. package/packages/super-page/src/export-form-report-dialog.vue +84 -0
  11. package/packages/super-page/src/form-head.vue +67 -0
  12. package/packages/super-page/src/form-page.vue +107 -0
  13. package/packages/super-page/src/group-tag.vue +29 -0
  14. package/packages/super-page/src/list-page.vue +1023 -0
  15. package/packages/super-page/src/list-toolbar-page.vue +257 -0
  16. package/packages/super-page/src/my-button-base.vue +367 -0
  17. package/packages/super-page/src/my-button.vue +185 -0
  18. package/packages/super-page/src/page-custom-component.vue +64 -0
  19. package/packages/super-page/src/remove-signer-dialog.vue +107 -0
  20. package/packages/super-page/src/sub-tab-page.vue +88 -0
  21. package/packages/super-page/src/super-page-component.vue +78 -0
  22. package/packages/super-page/src/super-page.vue +134 -0
  23. package/packages/super-page/src/tab-page.vue +152 -0
  24. package/packages/super-page/src/task-informition-dialog.vue +88 -0
  25. package/packages/super-page/src/util/ListButtonEvent.js +608 -0
  26. package/packages/super-page/src/util/api.js +32 -0
  27. package/packages/super-page/src/util/callEvents.js +52 -0
  28. package/packages/super-page/src/util/chartButtonEvent.js +60 -0
  29. package/packages/super-page/src/util/common-util.js +100 -0
  30. package/packages/super-page/src/util/commonButtonEvent.js +55 -0
  31. package/packages/super-page/src/util/eventBus.js +2 -0
  32. package/packages/super-page/src/util/formButtonEvent.js +262 -0
  33. package/packages/super-page/src/util/store.js +3 -0
  34. package/packages/super-page/src/util/super-page.js +19 -0
  35. package/packages/super-page/src/util/util.js +976 -0
  36. package/packages/super-page/src/util/workflowButtonEvent.js +1037 -0
  37. package/packages/super-page/src/widget-col-page.vue +339 -0
  38. package/packages/super-page/src/widget-page.vue +596 -0
  39. package/packages/super-page/src/widget-sub-tab-pane-page.vue +105 -0
  40. package/packages/super-page/src/widget-tab-pane-page.vue +125 -0
  41. package/packages/super-page/src/workflow-button-group.vue +487 -0
  42. package/packages/super-page/src/workflow-form-page.vue +1119 -0
  43. package/packages/super-page-dialog/index.js +9 -0
  44. package/packages/super-page-dialog/src/super-page-dialog.vue +173 -0
@@ -0,0 +1,185 @@
1
+ <template>
2
+ <span v-if="isVisible">
3
+ <workflow-button-group
4
+ v-if="button.code==='workflowButton'"
5
+ :permission-prefix="permissionPrefix"
6
+ :workflow-button-component="workflowButtonComponent"
7
+ :is-task-input="isTaskInput"
8
+ :table-name="tableName"
9
+ :button="button"
10
+ :button-groups="buttonGroups"
11
+ :page-code="pageCode"
12
+ :get-form-data="getFormData"
13
+ :my-form-data-fun="formDataFun"
14
+ :form-button-position="formButtonPosition"
15
+ @refresh="refreshEmit"
16
+ @click="commonButtonClick"
17
+ @workflowClick="workflowButtonClick"
18
+ @prohibi-edit="fnProhibitToEdit"
19
+ @refreshFrom="refreshFrom"
20
+ />
21
+ <my-button-base
22
+ v-else
23
+ :search-form-info="searchFormInfo"
24
+ :button="button"
25
+ :permission-prefix="permissionPrefix"
26
+ :disabled="disabled"
27
+ :position="position"
28
+ :table-name="tableName"
29
+ :page-code="pageCode"
30
+ :get-form-data="getFormData"
31
+ :selections="selections"
32
+ :my-form-data-fun="formDataFun"
33
+ :get-system-ref="getSystemRef"
34
+ is-visible="true"
35
+ @refresh="refreshEmit"
36
+ @click="commonButtonClick"
37
+ @workflowClick="workflowButtonClick"
38
+ @prohibi-edit="fnProhibitToEdit"
39
+ @refreshFrom="refreshFrom"
40
+ />
41
+ </span>
42
+ </template>
43
+ <script>
44
+ import Util from './util/util'
45
+ import myButtonBase from './my-button-base'
46
+ import workflowButtonGroup from './workflow-button-group'
47
+ import { getStoreInfo } from './util/common-util'
48
+ export default {
49
+ name: 'MyButton',
50
+ components: {
51
+ myButtonBase,
52
+ workflowButtonGroup
53
+ },
54
+ props: {
55
+ button: {
56
+ type: Object,
57
+ default: null
58
+ },
59
+ // 资源编码前缀,例如:系统编码.页面编码.列表组件编码 或 系统编码.页面编码.表单组件编码 或 系统编码.页面编码.按钮组组件编码
60
+ permissionPrefix: {
61
+ type: String,
62
+ default: null
63
+ },
64
+ // 流程按钮组信息
65
+ workflowButtonComponent: {
66
+ type: Object,
67
+ default: null
68
+ },
69
+ // 按钮所在位置,list列表或form表单内
70
+ position: {
71
+ type: String,
72
+ default: null
73
+ },
74
+ // 是否在任务办理页面(待办事宜中打开的),控制返回、关闭按钮
75
+ isTaskInput: {
76
+ type: Boolean,
77
+ default: false
78
+ },
79
+ // 数据表名称
80
+ tableName: {
81
+ type: String,
82
+ default: null
83
+ },
84
+ // 流程表单页面才需要传该设置
85
+ buttonGroups: {
86
+ type: Array,
87
+ default: null
88
+ },
89
+ // 列表行编辑时编辑的记录下标,行编辑按钮使用
90
+ rowIndex: {
91
+ type: Number,
92
+ default: null
93
+ },
94
+ // 页面编码
95
+ pageCode: {
96
+ type: String,
97
+ default: null
98
+ },
99
+ // 获取页面数据的方法
100
+ getFormData: {
101
+ type: Function,
102
+ default: null
103
+ },
104
+ // 列表选中的记录集合
105
+ selections: {
106
+ type: Array,
107
+ default: null
108
+ },
109
+ // 表单对象方法
110
+ formDataFun: {
111
+ type: Function,
112
+ default: function () {}
113
+ },
114
+ // 列表刷新方法
115
+ getSystemRef: {
116
+ type: Function,
117
+ default: function () {}
118
+ },
119
+ searchFormInfo: {
120
+ type: Object,
121
+ default: () => {
122
+ return { data: {} }
123
+ }
124
+ },
125
+ formButtonPosition: {
126
+ type: String,
127
+ default: null
128
+ },
129
+ disabled: {
130
+ type: Boolean,
131
+ default: false
132
+ }
133
+ },
134
+ data () {
135
+ let permission = this.permissionPrefix + '.' + this.button.code
136
+ const isDevMode = getStoreInfo(this.pageCode, '_pageDevMode')
137
+
138
+ const isPreview = getStoreInfo(this.pageCode, '_pagePreview')
139
+ if ((isDevMode && isDevMode === true) || (isPreview && isPreview === true)) {
140
+ // 开发模式 或 预览时按钮不受控制
141
+ permission = 'true'
142
+ }
143
+ const displayConditions = this.button.buttonDisplayConditionsList
144
+ let isVisible = false
145
+ if (!displayConditions || displayConditions === 0) {
146
+ // 如果没有配置按钮显示条件,则默认为显示
147
+ isVisible = true
148
+ }
149
+ const isView = this.isViewDetail(this.position)
150
+ return {
151
+ permission, // 按钮的资源编码
152
+ isVisible, // 是否显示按钮
153
+ displayConditions, // 按钮显示条件
154
+ isPreview, // 预览时导入按钮不操作
155
+ isView, // 是否是查看页面
156
+ additionalParamMap: null // 跳转页面的附加参数
157
+ }
158
+ },
159
+ created () {
160
+ const additionalParamMap = getStoreInfo(this.pageCode, 'additionalParamMap')
161
+ if (additionalParamMap) {
162
+ this.additionalParamMap = additionalParamMap
163
+ }
164
+ // 解析按钮是否显示
165
+ if (!this.displayConditions || this.displayConditions.length === 0) {
166
+ this.isVisible = true
167
+ } else if (this.position === 'form' || this.position === 'workflowForm') {
168
+ this.isButtonVisible(this.displayConditions, this.tableName, this.additionalParamMap).then(result => {
169
+ this.isVisible = result
170
+ })
171
+ }
172
+ },
173
+ methods: {
174
+ ...Util,
175
+ fnProhibitToEdit (data) {
176
+ this.$emit('prohibi-edit', data)
177
+ }
178
+ }
179
+
180
+ }
181
+ </script>
182
+
183
+ <style lang="scss" scoped>
184
+
185
+ </style>
@@ -0,0 +1,64 @@
1
+ <template>
2
+ <span>
3
+ <span
4
+ v-for="(customComponent) in buttonAreaCustomComponentArr"
5
+ :key="customComponent.code"
6
+ >
7
+ <component
8
+ :is="customComponent.code"
9
+ :ref="customComponent.code+ '_Component'"
10
+ :refresh-list="getSystemRef"
11
+ @refresh-tab="refreshTab"
12
+ />
13
+ </span>
14
+ </span>
15
+ </template>
16
+
17
+ <script>
18
+ import { getStoreInfo } from './util/common-util'
19
+ import eventBus from './util/util'
20
+ export default {
21
+ name: 'PageCustomComponent',
22
+ components: {
23
+
24
+ },
25
+ props: {
26
+ // 页面编码
27
+ pageCode: {
28
+ type: String,
29
+ default: null
30
+ },
31
+ // 工具栏
32
+ buttonAreaCustomComponentArr: {
33
+ type: Array,
34
+ default: null
35
+ }
36
+ },
37
+ data () {
38
+ return {
39
+ }
40
+ },
41
+ created () {
42
+ },
43
+ mounted () {
44
+ },
45
+ beforeDestroy () {
46
+ },
47
+ methods: {
48
+ getSystemRef (refKey, operation) {
49
+ this.$emit('getSystemRef', refKey, operation)
50
+ },
51
+ // 刷新页签内容:列表数据或表单数据
52
+ refreshTab (tabCode, entity) {
53
+ if (tabCode === undefined || tabCode === null) {
54
+ tabCode = getStoreInfo(this.pageCode, '_activeTab')
55
+ }
56
+ eventBus.$emit(this.pageCode + '-refresh-tab', tabCode, entity)
57
+ }
58
+ }
59
+ }
60
+ </script>
61
+
62
+ <style lang="scss" scoped>
63
+
64
+ </style>
@@ -0,0 +1,107 @@
1
+ <template>
2
+ <div>
3
+ <el-dialog
4
+ visible
5
+ :title="$t('superPage.selectRemoveUsers')"
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="canRemoveTasks"
17
+ border
18
+ style="width: 100%"
19
+ @select="select"
20
+ >
21
+ <el-table-column
22
+ type="selection"
23
+ width="55"
24
+ />
25
+ <el-table-column
26
+ prop="transactorName"
27
+ :label="$t('superPage.transactorName')"
28
+ width="180"
29
+ />
30
+ <el-table-column
31
+ prop="transactor"
32
+ :label="$t('superPage.transactor')"
33
+ width="180"
34
+ />
35
+ <el-table-column
36
+ prop="trustorName"
37
+ :label="$t('superPage.trustorName')"
38
+ width="180"
39
+ />
40
+ </el-table>
41
+ <template v-slot:footer>
42
+ <div
43
+ class="dialog-footer"
44
+ >
45
+ <el-button
46
+ type="primary"
47
+ @click="selectRemoveUsers"
48
+ >
49
+ {{ $t('superPageMessage.sure') }}
50
+ </el-button>
51
+ <el-button @click="$emit('close')">
52
+ {{ $t('superPageMessage.cancel') }}
53
+ </el-button>
54
+ </div>
55
+ </template>
56
+ </el-dialog>
57
+ </div>
58
+ </template>
59
+ <script>
60
+ export default {
61
+ name: 'RemoveSignerDialog',
62
+ components: {
63
+ },
64
+ props: {
65
+ taskId: {
66
+ type: Number,
67
+ default: null
68
+ },
69
+ // 当前环节所有待办任务集合
70
+ activeTasks: {
71
+ type: Array,
72
+ default: null
73
+ }
74
+ },
75
+ data () {
76
+ const canRemoveTasks = this.getCanRemoveTasks()
77
+ return {
78
+ selections: [],
79
+ canRemoveTasks // 除当前任务外,所有任务都可移除
80
+ }
81
+ },
82
+ methods: {
83
+ select (selection) {
84
+ this.selections = selection
85
+ },
86
+ selectRemoveUsers () {
87
+ if (this.selections.length === 0) {
88
+ this.$message({
89
+ showClose: true,
90
+ type: 'warning',
91
+ message: this.$t('superPageMessage.pleaseSelectRemoverUsers')
92
+ })
93
+ return
94
+ }
95
+ this.$emit('result', this.selections)
96
+ },
97
+ // 获得可减签的任务集合。除当前任务外,所有任务都可移除
98
+ getCanRemoveTasks () {
99
+ if (this.activeTasks && this.taskId) {
100
+ // 过滤掉当前任务
101
+ return this.activeTasks.filter(task => this.taskId !== task.id ? task.id : task.ID ? task.ID : null)
102
+ }
103
+ return []
104
+ }
105
+ }
106
+ }
107
+ </script>
@@ -0,0 +1,88 @@
1
+ <template>
2
+ <div>
3
+ <el-tabs
4
+ v-model="activeName"
5
+ type="card"
6
+ @tab-click="handleClick"
7
+ >
8
+ <el-tab-pane
9
+ v-for="tab in colSetting.options.tabContent"
10
+ :key="tab.code"
11
+ :label="tab.label"
12
+ :name="tab.code"
13
+ >
14
+ <widget-sub-tab-pane-page
15
+ :page-code="pageCode"
16
+ :data-id="dataId"
17
+ :one-tab-content="tab.list?tab.list:[]"
18
+ :workflow-id="workflowId"
19
+ :task-id="taskId"
20
+ @update-value="updateValues"
21
+ />
22
+ </el-tab-pane>
23
+ </el-tabs>
24
+ </div>
25
+ </template>
26
+
27
+ <script>
28
+ import WidgetSubTabPanePage from './widget-sub-tab-pane-page'
29
+ import util from './util/util'
30
+ import eventBus from './util/eventBus'
31
+ export default {
32
+ name: 'SubTabPage',
33
+ components: {
34
+ WidgetSubTabPanePage
35
+ },
36
+ props: {
37
+ // 页面编码
38
+ pageCode: {
39
+ type: String,
40
+ default: null
41
+ },
42
+ // 表单页面修改记录id
43
+ dataId: {
44
+ type: Number,
45
+ default: null
46
+ },
47
+ // 流程表单页面办理任务时任务id
48
+ taskId: {
49
+ type: Number,
50
+ default: null
51
+ },
52
+ colSetting: {
53
+ type: Object,
54
+ default: null
55
+ }
56
+ },
57
+ data () {
58
+ let activeName = ''
59
+ const tabContent = this.colSetting.options.tabContent
60
+ if (tabContent && tabContent.length > 0) {
61
+ activeName = tabContent[0].code
62
+ }
63
+ return {
64
+ activeName,
65
+ workflowId: null // 流程实例id,第1个子页签是流转历史时需要该参数
66
+ }
67
+ },
68
+ created () {
69
+
70
+ },
71
+ mounted () {
72
+ },
73
+ methods: {
74
+ handleClick (tab, event) {
75
+ // 先清空实例id,为了更新显示流转历史
76
+ this.workflowId = util.getWorkflowId(this.pageCode)
77
+ eventBus.$emit('refreshHistory')
78
+ },
79
+ updateValues (sourceModel, sourceTableName, targetRowIndex) {
80
+ this.$emit('update-value', sourceModel, sourceTableName, targetRowIndex)
81
+ }
82
+ }
83
+ }
84
+ </script>
85
+
86
+ <style lang="scss" scoped>
87
+
88
+ </style>
@@ -0,0 +1,78 @@
1
+ <template>
2
+ <div
3
+ class="app-container no-margin "
4
+ >
5
+ <widget-page
6
+ :page-code="code"
7
+ :data-id="dataId"
8
+ :task-id="taskId"
9
+ :page-setting="pageSetting"
10
+ @update-value="updateValues"
11
+ />
12
+ </div>
13
+ </template>
14
+
15
+ <script>
16
+ import WidgetPage from './widget-page'
17
+ import { setStoreInfo } from './util/common-util'
18
+ export default {
19
+ name: 'SuperPageComponent',
20
+ components: {
21
+ WidgetPage
22
+ },
23
+ props: {
24
+ // 页面编码
25
+ code: {
26
+ type: String,
27
+ default: null
28
+ },
29
+ // 表单页面修改记录时记录id
30
+ dataId: {
31
+ type: Number,
32
+ default: null
33
+ },
34
+ // 流程表单页面办理任务时任务id
35
+ taskId: {
36
+ type: Number,
37
+ default: null
38
+ },
39
+ // 页面布局信息
40
+ pageSetting: {
41
+ type: Object,
42
+ default: null
43
+ },
44
+ // 是否是预览
45
+ preview: {
46
+ type: Boolean,
47
+ default: false
48
+ },
49
+ // 是否是dsc系统中调用该组件。影响列表组件和表单组件数据显示
50
+ isDsc: {
51
+ type: Boolean,
52
+ default: null
53
+ },
54
+ // 弹框高度
55
+ height: {
56
+ type: String,
57
+ default: null
58
+ }
59
+ },
60
+ created () {
61
+ setStoreInfo(this.code, '_pageCode', this.code)
62
+ setStoreInfo(this.code, '_pagePreview', this.preview)
63
+ setStoreInfo(this.code, '_pageIsDsc', this.isDsc)
64
+ setStoreInfo(this.code, '_pageHeight', this.height)
65
+ console.log('super-page-component--this.isDsc=', this.isDsc, 'this.code=', this.code, 'this.height=', this.height)
66
+ },
67
+ methods: {
68
+ updateValues (sourceModel, sourceTableName, targetRowIndex) {
69
+ console.log('update-value33---', sourceModel, sourceTableName, targetRowIndex)
70
+ this.$emit('update-value', sourceModel, sourceTableName, targetRowIndex)
71
+ }
72
+ }
73
+ }
74
+ </script>
75
+
76
+ <style lang="scss" scoped>
77
+
78
+ </style>
@@ -0,0 +1,134 @@
1
+ <template>
2
+ <div>
3
+ <super-page-component
4
+ :code="code"
5
+ :data-id="dataId"
6
+ :task-id="taskId"
7
+ :page-setting="pageSetting"
8
+ :preview="preview"
9
+ :class="code"
10
+ :is-dsc="isDsc"
11
+ @update-value="updateValues"
12
+ />
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ import SuperPageComponent from './super-page-component'
18
+ import store from './util/store'
19
+ import { getPageParam } from './util/common-util'// getStoreInfo,
20
+ export default {
21
+ name: 'SuperPage',
22
+ components: {
23
+ SuperPageComponent
24
+ },
25
+ props: {
26
+ // 页面编码
27
+ code: {
28
+ type: String,
29
+ default: null
30
+ },
31
+ // 表单页面修改记录时记录id
32
+ dataId: {
33
+ type: Number,
34
+ default: null
35
+ },
36
+ // 流程表单页面办理任务时任务id
37
+ taskId: {
38
+ type: Number,
39
+ default: null
40
+ },
41
+ // 页面布局信息
42
+ pageSetting: {
43
+ type: Object,
44
+ default: null
45
+ },
46
+ // 是否是预览,预览时页面各元素不受权限控制,且按钮等元素不可以操作,只能看页面样子
47
+ preview: {
48
+ type: Boolean,
49
+ default: false
50
+ },
51
+ // 是否是dsc系统中调用该组件。影响列表组件和表单组件数据显示
52
+ isDsc: {
53
+ type: Boolean,
54
+ default: false
55
+ },
56
+ // 是否是开发模式
57
+ devMode: {
58
+ type: Boolean,
59
+ default: false
60
+ },
61
+ // 页面跳转方式:newTab或refresh
62
+ jumpMode: {
63
+ type: String,
64
+ default: null
65
+ },
66
+ // 打开页面的按钮编码,例如:查看详情按钮viewDetail
67
+ buttonCode: {
68
+ type: String,
69
+ default: null
70
+ },
71
+ pathQuery: {
72
+ type: Object,
73
+ default: null
74
+ }
75
+ },
76
+ data () {
77
+ return {
78
+ isShowDialog: false, // 是否弹框显示页面
79
+ pageComponent: null, // 弹框时源列表组件或表单组件
80
+ pageType: null, // 弹框时源页面类型:表单、列表
81
+ jumpPageCode: null
82
+ }
83
+ },
84
+ created () {
85
+ store.set(this.code, getPageParam(this.devMode, this.jumpMode, this.buttonCode, this.pathQuery))
86
+ const pageSettingStoreInfo = store.get(this.code)
87
+ if (this.pathQuery) {
88
+ // 在页面的路由参数中获得sessionStorage动态参数存储的key
89
+ const paramStoreId = this.pathQuery.paramStoreId
90
+ if (paramStoreId) {
91
+ const additionalParamMapJson = sessionStorage.getItem(paramStoreId)
92
+ sessionStorage.removeItem(paramStoreId)
93
+ if (additionalParamMapJson) {
94
+ // 缓存页面动态参数
95
+ pageSettingStoreInfo.additionalParamMap = JSON.parse(additionalParamMapJson)
96
+ store.set(this.code, pageSettingStoreInfo)
97
+ console.log('已获取到附加参数', JSON.parse(additionalParamMapJson))
98
+ }
99
+ }
100
+ }
101
+ },
102
+ methods: {
103
+ // 调用关闭弹框回调方法
104
+ callCloseDialog (closeDialogEvent, pageValue, soureForm, formData) {
105
+ if (closeDialogEvent) {
106
+ const params = {
107
+ pageValue,
108
+ formData,
109
+ soureComponent: this.pageComponent
110
+ }
111
+ closeDialogEvent.call(this, params)
112
+ }
113
+ },
114
+ getPageComponent (pageComponent, pageType) {
115
+ this.pageComponent = pageComponent
116
+ this.pageType = pageType
117
+ },
118
+ updateValues (sourceModel, sourceTableName, targetRowIndex) {
119
+ console.log('update-value444-super-page-', sourceModel, sourceTableName, targetRowIndex)
120
+ this.$emit('update-value', sourceModel, sourceTableName, targetRowIndex)
121
+ }
122
+
123
+ }
124
+ }
125
+ </script>
126
+
127
+ <style>
128
+ .el-date-editor.el-input,.el-date-editor.el-input__input,.el-date-editor.el-input__inner {
129
+ width: 100%;
130
+ }
131
+ .el-date-editor--daterange.el-input,.el-date-editor--daterange.el-input__inner,.el-date-editor--timerange.el-input,.el-date-editor--timerange.el-input__inner {
132
+ width: 100%;
133
+ }
134
+ </style>