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,70 +1,70 @@
1
- const buttonEvents = {
2
- // 按钮组件的操作
3
- clickButtonEvent(buttonSetting, system) {
4
- const jsContent = buttonSetting.options.jsContent
5
- if (
6
- typeof jsContent !== 'undefined' &&
7
- jsContent !== null &&
8
- jsContent !== ''
9
- ) {
10
- // 将js文本转换为函数,并运行
11
- // eslint-disable-next-line no-eval
12
- const buttonFun = eval('(' + jsContent + ')')
13
- // 运行方法
14
- const request = buttonFun(this, system)
15
- if (request) {
16
- request.then((data) => {
17
- this.$message({
18
- showClose: true,
19
- type: 'success',
20
- message: this.$t('superPageMessage.successfulOperation'),
21
- })
22
- })
23
- }
24
- } else {
25
- if (buttonSetting.options.operationType === 'inner') {
26
- // 内置操作时
27
- this.jumpToPage(
28
- buttonSetting.options.jumpPage,
29
- system,
30
- null,
31
- null,
32
- this.additionalParamMap,
33
- null,
34
- null,
35
- this.pageCode
36
- )
37
- } else if (buttonSetting.options.operationType === 'custom') {
38
- // 自定义操作时
39
- const path = this.getRealRestApiPath(
40
- buttonSetting.options.restfulApiPat,
41
- system
42
- )
43
- const config = { url: path }
44
- const apiMethod = buttonSetting.options.restfulApiMethod
45
- if (apiMethod) {
46
- config.method = apiMethod
47
- }
48
- const params = buttonSetting.options.restfulApiParameters
49
- if (params) {
50
- config.data = params
51
- }
52
- if (buttonSetting.options.logSetting) {
53
- config.logSettingText = buttonSetting.options.logSetting
54
- }
55
- if (!config.systemCode) {
56
- config.systemCode = system.code
57
- }
58
- this.$http.request(config).then((data) => {
59
- // console.log('clickButtonEvent', data)
60
- this.$message({
61
- showClose: true,
62
- type: 'success',
63
- message: this.$t('superPageMessage.successfulOperation'),
64
- })
65
- })
66
- }
67
- }
68
- },
69
- }
70
- export default buttonEvents
1
+ const buttonEvents = {
2
+ // 按钮组件的操作
3
+ clickButtonEvent(buttonSetting, system) {
4
+ const jsContent = buttonSetting.options.jsContent
5
+ if (
6
+ typeof jsContent !== 'undefined' &&
7
+ jsContent !== null &&
8
+ jsContent !== ''
9
+ ) {
10
+ // 将js文本转换为函数,并运行
11
+ // eslint-disable-next-line no-eval
12
+ const buttonFun = eval('(' + jsContent + ')')
13
+ // 运行方法
14
+ const request = buttonFun(this, system)
15
+ if (request) {
16
+ request.then((data) => {
17
+ this.$message({
18
+ showClose: true,
19
+ type: 'success',
20
+ message: this.$t('superPageMessage.successfulOperation'),
21
+ })
22
+ })
23
+ }
24
+ } else {
25
+ if (buttonSetting.options.operationType === 'inner') {
26
+ // 内置操作时
27
+ this.jumpToPage(
28
+ buttonSetting.options.jumpPage,
29
+ system,
30
+ null,
31
+ null,
32
+ this.additionalParamMap,
33
+ null,
34
+ null,
35
+ this.pageCode
36
+ )
37
+ } else if (buttonSetting.options.operationType === 'custom') {
38
+ // 自定义操作时
39
+ const path = this.getRealRestApiPath(
40
+ buttonSetting.options.restfulApiPat,
41
+ system
42
+ )
43
+ const config = { url: path }
44
+ const apiMethod = buttonSetting.options.restfulApiMethod
45
+ if (apiMethod) {
46
+ config.method = apiMethod
47
+ }
48
+ const params = buttonSetting.options.restfulApiParameters
49
+ if (params) {
50
+ config.data = params
51
+ }
52
+ if (buttonSetting.options.logSetting) {
53
+ config.logSettingText = buttonSetting.options.logSetting
54
+ }
55
+ if (!config.systemCode) {
56
+ config.systemCode = system.code
57
+ }
58
+ this.$http.request(config).then((data) => {
59
+ // console.log('clickButtonEvent', data)
60
+ this.$message({
61
+ showClose: true,
62
+ type: 'success',
63
+ message: this.$t('superPageMessage.successfulOperation'),
64
+ })
65
+ })
66
+ }
67
+ }
68
+ },
69
+ }
70
+ export default buttonEvents
@@ -58,7 +58,7 @@ const buttonEvents = {
58
58
  if (needDeleteFileUuidS) {
59
59
  param.needDeleteFileUuid = needDeleteFileUuidS
60
60
  }
61
- if (button.jumpPage) {
61
+ if (button.jumpPage && button.jumpPage.jumpPageUrl) {
62
62
  let dataId
63
63
  if (formData) {
64
64
  dataId = formData.id || formData.ID
@@ -323,7 +323,7 @@ const buttonEvents = {
323
323
  }
324
324
  )
325
325
  .then(() => {
326
- const isPermission = button.isPermission === undefined || button.isPermission === 'true'
326
+ const isPermission = button.isPermission === undefined || button.isPermission === 'true' || button.isPermission
327
327
  const param = {
328
328
  entity: formData,
329
329
  tableName: tableName,
@@ -507,7 +507,7 @@ const buttonEvents = {
507
507
  param += '&tableName=' + tableName
508
508
  }
509
509
  if (button) {
510
- const isPermission = button.isPermission === undefined || button.isPermission === 'true'
510
+ const isPermission = button.isPermission === undefined || button.isPermission === 'true' || button.isPermission
511
511
  param += '&isPermission=' + isPermission
512
512
  }
513
513
  // filePath格式如:用户定义的文件名~~服务器上磁盘中存储的文件路径及文件名。例如:user-info.xls~~iMatrix/b03dr45f5h4g.xls
@@ -1,3 +1,3 @@
1
- // 用于存放表单数据、是否是预览状态、系统信息
2
- const store = new Map()
3
- export default store
1
+ // 用于存放表单数据、是否是预览状态、系统信息
2
+ const store = new Map()
3
+ export default store
@@ -1,29 +1,29 @@
1
- import * as Vue from 'vue'
2
- const superPageService = {
3
- getPageSetting(code) {
4
- return this.$http.get(
5
- window.$vueApp.config.globalProperties.baseAPI +
6
- '/component/super-pages/' +
7
- code
8
- )
9
- },
10
- getSystemWatermark(code) {
11
- return this.$http.get(
12
- window.$vueApp.config.globalProperties.baseAPI +
13
- '/component/super-pages/getWatermark/' +
14
- code
15
- )
16
- },
17
- getPageSettingTest() {
18
- // return this.$http.get('http://localhost:8080/test/list-page.json')
19
- // return this.$http.get('http://localhost:8080/test/form-page.json')
20
- // return this.$http.get('http://localhost:8080/test/workflow-form-page.json')
21
- // return this.$http.get('http://localhost:8080/test/chart-page.json')
22
- // return this.$http.get('http://localhost:8080/test/tab-page.json')
23
- // return this.$http.get('http://localhost:8080/test/workflow-history-page.json')
24
- return this.$http.get(
25
- 'http://localhost:8080/test/other-component-page.json'
26
- )
27
- },
28
- }
29
- export default superPageService
1
+ import * as Vue from 'vue'
2
+ const superPageService = {
3
+ getPageSetting(code) {
4
+ return this.$http.get(
5
+ window.$vueApp.config.globalProperties.baseAPI +
6
+ '/component/super-pages/' +
7
+ code
8
+ )
9
+ },
10
+ getSystemWatermark(code) {
11
+ return this.$http.get(
12
+ window.$vueApp.config.globalProperties.baseAPI +
13
+ '/component/super-pages/getWatermark/' +
14
+ code
15
+ )
16
+ },
17
+ getPageSettingTest() {
18
+ // return this.$http.get('http://localhost:8080/test/list-page.json')
19
+ // return this.$http.get('http://localhost:8080/test/form-page.json')
20
+ // return this.$http.get('http://localhost:8080/test/workflow-form-page.json')
21
+ // return this.$http.get('http://localhost:8080/test/chart-page.json')
22
+ // return this.$http.get('http://localhost:8080/test/tab-page.json')
23
+ // return this.$http.get('http://localhost:8080/test/workflow-history-page.json')
24
+ return this.$http.get(
25
+ 'http://localhost:8080/test/other-component-page.json'
26
+ )
27
+ },
28
+ }
29
+ export default superPageService
@@ -183,7 +183,7 @@ const Util = {
183
183
  // if (additionalParamMap) {
184
184
  // pageSettingEntity.additionalParamMap = additionalParamMap
185
185
  // }
186
- // const path = Vue.prototype.baseAPI + '/component/super-pages/can-executes'
186
+ // const path = window.$vueApp.config.globalProperties.baseAPI + '/component/super-pages/can-executes'
187
187
  // this.$http.post(path, pageSettingEntity).then((result) => {
188
188
  // if(result){
189
189
  // const canExecute = result.canExecute
@@ -454,7 +454,7 @@ const Util = {
454
454
  isPermission
455
455
  ) {
456
456
  // 自定义系统时,封装CommonEntity
457
- isPermission = isPermission === undefined || isPermission === 'true'
457
+ isPermission = isPermission === undefined || isPermission === 'true' || isPermission
458
458
  const param = {
459
459
  entity: formData,
460
460
  formViewCode: formViewCode,
@@ -576,7 +576,7 @@ const Util = {
576
576
  if (this.$refs.superForm) {
577
577
  // 通过getViewModels获得处理了下拉框、复选框的值之后的表单数据,用于导出报告使用
578
578
  this.$refs.superForm.getViewModels().then(async (viewModels) => {
579
- const isPermission = button.isPermission === undefined || button.isPermission === 'true'
579
+ const isPermission = button.isPermission === undefined || button.isPermission === 'true' || button.isPermission
580
580
  const param = {
581
581
  entity: viewModels,
582
582
  fileName: templateUUID, // uuid
@@ -624,7 +624,7 @@ const Util = {
624
624
  if (result) {
625
625
  if (button.code === 'exportPDF') {
626
626
  this.exportFormPdf(fileName, myJsContent, system, param)
627
- } else {
627
+ } else {
628
628
  this.exportFormReportSuccess(
629
629
  templateUUID,
630
630
  fileName,
@@ -640,7 +640,7 @@ const Util = {
640
640
  tableName,
641
641
  param
642
642
  )
643
- }
643
+ }
644
644
 
645
645
  }
646
646
  })
@@ -781,7 +781,7 @@ const Util = {
781
781
  return str.toLowerCase().replace(/( |^)[a-z]/g, (L) => L.toUpperCase()) // 执行代码
782
782
  },
783
783
  getBaseUrl(system) {
784
- // Vue.prototype.baseURL 应该是自定义扩展系统的后台访问路径
784
+ // window.$vueApp.config.globalProperties.baseURL 应该是自定义扩展系统的后台访问路径
785
785
  let baseUrl = window.$vueApp.config.globalProperties.baseURL
786
786
  if (system) {
787
787
  baseUrl = getSystemBackendUrl(system.backendUrl)
@@ -53,7 +53,7 @@ const buttonEvents = {
53
53
  if (needDeleteFileUuid) {
54
54
  param.needDeleteFileUuid = needDeleteFileUuid
55
55
  }
56
- if (button.jumpPage) {
56
+ if (button.jumpPage && button.jumpPage.jumpPageUrl) {
57
57
  let dataId
58
58
  if (model) {
59
59
  dataId = model.id || model.ID
@@ -1739,7 +1739,7 @@ const buttonEvents = {
1739
1739
  encodeURI(templateShowPath)
1740
1740
  }
1741
1741
  if (button) {
1742
- const isPermission = button.isPermission === undefined || button.isPermission === 'true'
1742
+ const isPermission = button.isPermission === undefined || button.isPermission === 'true' || button.isPermission
1743
1743
  param += '&isPermission=' + isPermission
1744
1744
  }
1745
1745
  const baseUrl = this.getBaseUrl(system)
@@ -1,115 +1,115 @@
1
- <template>
2
- <div>
3
- <template
4
- v-if="
5
- pageSettingList &&
6
- pageSettingList !== null &&
7
- pageSettingList.length > 0
8
- "
9
- >
10
- <el-row v-for="(row, rowIndex) in pageSettingList" :key="rowIndex">
11
- <template v-for="(col, colIndex) in row.colList" :key="colIndex">
12
- <el-col
13
- :span="
14
- col.options && col.options.colWidth ? col.options.colWidth : 24
15
- "
16
- :class="{
17
- placeholder:
18
- col.baseSetting.type === 'placeholder' ||
19
- col.baseSetting.type === 'enter',
20
- }"
21
- >
22
- <widget-col-page
23
- :col="col"
24
- :data-id="dataId"
25
- :workflow-id="workflowId"
26
- :task-id="taskId"
27
- :page-code="pageCode"
28
- :field-permissions="fieldPermissions"
29
- :chart-query-setting="chartQuerySetting"
30
- @update-value="updateValues"
31
- @prohibi-edit="fnProhibitToEdit"
32
- @export="exportReport"
33
- />
34
- </el-col>
35
- </template>
36
- </el-row>
37
- </template>
38
- </div>
39
- </template>
40
-
41
- <script>
42
- import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
43
- import WidgetColPage from './widget-col-page'
44
- import { getStoreInfo } from './util/common-util'
45
- export default {
46
- name: 'WidgetSubTabPage',
47
- components: {
48
- WidgetColPage,
49
- },
50
- props: {
51
- // 页面编码
52
- pageCode: {
53
- type: String,
54
- default: null,
55
- },
56
- // 表单页面修改记录时记录id
57
- dataId: {
58
- type: Number,
59
- default: null,
60
- },
61
- // 流程表单页面办理任务时任务id
62
- taskId: {
63
- type: Number,
64
- default: null,
65
- },
66
- // 1个页签的内容配置
67
- oneTabContent: {
68
- type: Array,
69
- default: null,
70
- },
71
- // 流程实例id
72
- workflowId: {
73
- type: Number,
74
- default: null,
75
- },
76
- // 图表查询组件配置col
77
- chartQuerySetting: {
78
- type: Object,
79
- default: null,
80
- },
81
- },
82
- data() {
83
- const system = getStoreInfo(this.pageCode, '_systemInfo')
84
- return {
85
- pageSettingList: [],
86
- system,
87
- fieldPermissions: {},
88
- }
89
- },
90
- created() {
91
- if (this.oneTabContent) {
92
- // 表示是页签页面
93
- this.pageSettingList = this.oneTabContent
94
- }
95
- },
96
- methods: {
97
- updateValues(sourceModel, sourceTableName, targetRowIndex) {
98
- $emit(this, 'update-value', sourceModel, sourceTableName, targetRowIndex)
99
- },
100
- fnProhibitToEdit(entity) {
101
- this.fieldPermissions = entity
102
- },
103
- // chartQuery组件,导出报告
104
- exportReport(beanName) {
105
- // 向父页面传递
106
- $emit(this, 'export', beanName)
107
- },
108
- },
109
- emits: ['update-value', 'export'],
110
- }
111
- </script>
112
-
113
- <style lang="scss" scoped>
114
- @import '../../../src/styles/index';
115
- </style>
1
+ <template>
2
+ <div>
3
+ <template
4
+ v-if="
5
+ pageSettingList &&
6
+ pageSettingList !== null &&
7
+ pageSettingList.length > 0
8
+ "
9
+ >
10
+ <el-row v-for="(row, rowIndex) in pageSettingList" :key="rowIndex">
11
+ <template v-for="(col, colIndex) in row.colList" :key="colIndex">
12
+ <el-col
13
+ :span="
14
+ col.options && col.options.colWidth ? col.options.colWidth : 24
15
+ "
16
+ :class="{
17
+ placeholder:
18
+ col.baseSetting.type === 'placeholder' ||
19
+ col.baseSetting.type === 'enter',
20
+ }"
21
+ >
22
+ <widget-col-page
23
+ :col="col"
24
+ :data-id="dataId"
25
+ :workflow-id="workflowId"
26
+ :task-id="taskId"
27
+ :page-code="pageCode"
28
+ :field-permissions="fieldPermissions"
29
+ :chart-query-setting="chartQuerySetting"
30
+ @update-value="updateValues"
31
+ @prohibi-edit="fnProhibitToEdit"
32
+ @export="exportReport"
33
+ />
34
+ </el-col>
35
+ </template>
36
+ </el-row>
37
+ </template>
38
+ </div>
39
+ </template>
40
+
41
+ <script>
42
+ import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
43
+ import WidgetColPage from './widget-col-page'
44
+ import { getStoreInfo } from './util/common-util'
45
+ export default {
46
+ name: 'WidgetSubTabPage',
47
+ components: {
48
+ WidgetColPage,
49
+ },
50
+ props: {
51
+ // 页面编码
52
+ pageCode: {
53
+ type: String,
54
+ default: null,
55
+ },
56
+ // 表单页面修改记录时记录id
57
+ dataId: {
58
+ type: Number,
59
+ default: null,
60
+ },
61
+ // 流程表单页面办理任务时任务id
62
+ taskId: {
63
+ type: Number,
64
+ default: null,
65
+ },
66
+ // 1个页签的内容配置
67
+ oneTabContent: {
68
+ type: Array,
69
+ default: null,
70
+ },
71
+ // 流程实例id
72
+ workflowId: {
73
+ type: Number,
74
+ default: null,
75
+ },
76
+ // 图表查询组件配置col
77
+ chartQuerySetting: {
78
+ type: Object,
79
+ default: null,
80
+ },
81
+ },
82
+ data() {
83
+ const system = getStoreInfo(this.pageCode, '_systemInfo')
84
+ return {
85
+ pageSettingList: [],
86
+ system,
87
+ fieldPermissions: {},
88
+ }
89
+ },
90
+ created() {
91
+ if (this.oneTabContent) {
92
+ // 表示是页签页面
93
+ this.pageSettingList = this.oneTabContent
94
+ }
95
+ },
96
+ methods: {
97
+ updateValues(sourceModel, sourceTableName, targetRowIndex) {
98
+ $emit(this, 'update-value', sourceModel, sourceTableName, targetRowIndex)
99
+ },
100
+ fnProhibitToEdit(entity) {
101
+ this.fieldPermissions = entity
102
+ },
103
+ // chartQuery组件,导出报告
104
+ exportReport(beanName) {
105
+ // 向父页面传递
106
+ $emit(this, 'export', beanName)
107
+ },
108
+ },
109
+ emits: ['update-value', 'export'],
110
+ }
111
+ </script>
112
+
113
+ <style lang="scss" scoped>
114
+ @import '../../../src/styles/index';
115
+ </style>