super-pages 0.0.18-up → 0.0.21-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.
- package/README.md +7 -7
- package/index.html +13 -13
- package/lib/super-pages.css +1 -1
- package/lib/super-pages.js +2164 -2056
- package/lib/super-pages.umd.cjs +5 -5
- package/package.json +2 -2
- package/packages/index.js +30 -30
- package/packages/super-page/index.js +9 -9
- package/packages/super-page/src/button-group.vue +2 -1
- package/packages/super-page/src/common-form-page.vue +2 -1
- package/packages/super-page/src/export-form-report-dialog.vue +15 -17
- package/packages/super-page/src/form-head.vue +74 -74
- package/packages/super-page/src/group-tag.vue +21 -21
- package/packages/super-page/src/list-page.vue +2 -1
- package/packages/super-page/src/list-toolbar-dynamic-source.vue +89 -89
- package/packages/super-page/src/list-toolbar-page.vue +377 -377
- package/packages/super-page/src/my-button-base.vue +7 -2
- package/packages/super-page/src/my-button.vue +3 -1
- package/packages/super-page/src/remove-signer-dialog.vue +103 -103
- package/packages/super-page/src/sub-tab-page.vue +79 -79
- package/packages/super-page/src/task-informition-dialog.vue +82 -82
- package/packages/super-page/src/util/api.js +37 -37
- package/packages/super-page/src/util/callEvents.js +62 -62
- package/packages/super-page/src/util/common-util.js +5 -10
- package/packages/super-page/src/util/commonButtonEvent.js +70 -70
- package/packages/super-page/src/util/store.js +3 -3
- package/packages/super-page/src/util/super-page.js +29 -29
- package/packages/super-page/src/util/util.js +95 -36
- package/packages/super-page/src/util/workflowButtonEvent.js +16 -0
- package/packages/super-page/src/widget-col-page.vue +8 -3
- package/packages/super-page/src/widget-sub-tab-pane-page.vue +115 -115
- package/packages/super-page/src/widget-tab-pane-page.vue +135 -135
- package/packages/super-page/src/workflow-button-group.vue +15 -8
- package/packages/super-page/src/workflow-form-page.vue +15 -7
- package/packages/super-page-dialog/index.js +9 -9
- package/packages/utils/gogocodeTransfer.js +59 -59
- package/src/utils/common-util.js +9 -9
- package/vite.config.js +36 -36
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
const callFormEvents = {
|
|
2
|
-
// 调用点击前回调方法,返回true表示继续执行,否则false表示不执行点击事件
|
|
3
|
-
// buttonEventPrefix: 表单编码/列表编码__按钮编码
|
|
4
|
-
callBeforeClickButton(events, buttonEventPrefix, params) {
|
|
5
|
-
let result = true
|
|
6
|
-
if (events) {
|
|
7
|
-
const beforeClick = events[buttonEventPrefix + '__beforeClick']
|
|
8
|
-
if (beforeClick) {
|
|
9
|
-
result = beforeClick.call(this, params)
|
|
10
|
-
if (result === undefined) {
|
|
11
|
-
result = true
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return result
|
|
16
|
-
},
|
|
17
|
-
// 调用点击后回调方法
|
|
18
|
-
// buttonEventPrefix: 表单编码/列表编码__按钮编码
|
|
19
|
-
callAfterClickButton(events, buttonEventPrefix, params) {
|
|
20
|
-
if (events) {
|
|
21
|
-
const afterClick = events[buttonEventPrefix + '__afterClick']
|
|
22
|
-
if (afterClick) {
|
|
23
|
-
afterClick.call(this, params)
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
// 调用表单组件元素的事件
|
|
28
|
-
callFormItemEvent(formOptions, eventName, formData, eventParams) {
|
|
29
|
-
if (!eventName) {
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
if (formOptions && formOptions.customEvents) {
|
|
33
|
-
const formItemEventFun = this.getEventFunction(
|
|
34
|
-
formOptions,
|
|
35
|
-
'customEvents',
|
|
36
|
-
eventName
|
|
37
|
-
)
|
|
38
|
-
if (formItemEventFun) {
|
|
39
|
-
const params = {
|
|
40
|
-
params: formOptions.additionalParamMap,
|
|
41
|
-
additionalParamMap: formOptions.additionalParamMap,
|
|
42
|
-
entity: formData,
|
|
43
|
-
}
|
|
44
|
-
if (eventParams) {
|
|
45
|
-
params.eventParams = eventParams
|
|
46
|
-
}
|
|
47
|
-
return formItemEventFun.call(this, params)
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
getEventFunction(formOptions, eventType, eventName) {
|
|
52
|
-
if (
|
|
53
|
-
formOptions &&
|
|
54
|
-
formOptions[eventType] &&
|
|
55
|
-
formOptions[eventType][eventName] &&
|
|
56
|
-
typeof formOptions[eventType][eventName] === 'function'
|
|
57
|
-
) {
|
|
58
|
-
return formOptions[eventType][eventName]
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
}
|
|
62
|
-
export default callFormEvents
|
|
1
|
+
const callFormEvents = {
|
|
2
|
+
// 调用点击前回调方法,返回true表示继续执行,否则false表示不执行点击事件
|
|
3
|
+
// buttonEventPrefix: 表单编码/列表编码__按钮编码
|
|
4
|
+
callBeforeClickButton(events, buttonEventPrefix, params) {
|
|
5
|
+
let result = true
|
|
6
|
+
if (events) {
|
|
7
|
+
const beforeClick = events[buttonEventPrefix + '__beforeClick']
|
|
8
|
+
if (beforeClick) {
|
|
9
|
+
result = beforeClick.call(this, params)
|
|
10
|
+
if (result === undefined) {
|
|
11
|
+
result = true
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return result
|
|
16
|
+
},
|
|
17
|
+
// 调用点击后回调方法
|
|
18
|
+
// buttonEventPrefix: 表单编码/列表编码__按钮编码
|
|
19
|
+
callAfterClickButton(events, buttonEventPrefix, params) {
|
|
20
|
+
if (events) {
|
|
21
|
+
const afterClick = events[buttonEventPrefix + '__afterClick']
|
|
22
|
+
if (afterClick) {
|
|
23
|
+
afterClick.call(this, params)
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
// 调用表单组件元素的事件
|
|
28
|
+
callFormItemEvent(formOptions, eventName, formData, eventParams) {
|
|
29
|
+
if (!eventName) {
|
|
30
|
+
return
|
|
31
|
+
}
|
|
32
|
+
if (formOptions && formOptions.customEvents) {
|
|
33
|
+
const formItemEventFun = this.getEventFunction(
|
|
34
|
+
formOptions,
|
|
35
|
+
'customEvents',
|
|
36
|
+
eventName
|
|
37
|
+
)
|
|
38
|
+
if (formItemEventFun) {
|
|
39
|
+
const params = {
|
|
40
|
+
params: formOptions.additionalParamMap,
|
|
41
|
+
additionalParamMap: formOptions.additionalParamMap,
|
|
42
|
+
entity: formData,
|
|
43
|
+
}
|
|
44
|
+
if (eventParams) {
|
|
45
|
+
params.eventParams = eventParams
|
|
46
|
+
}
|
|
47
|
+
return formItemEventFun.call(this, params)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
getEventFunction(formOptions, eventType, eventName) {
|
|
52
|
+
if (
|
|
53
|
+
formOptions &&
|
|
54
|
+
formOptions[eventType] &&
|
|
55
|
+
formOptions[eventType][eventName] &&
|
|
56
|
+
typeof formOptions[eventType][eventName] === 'function'
|
|
57
|
+
) {
|
|
58
|
+
return formOptions[eventType][eventName]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
export default callFormEvents
|
|
@@ -64,7 +64,7 @@ export function isShouldAddBorder(pageSettingList) {
|
|
|
64
64
|
return false
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
export function packageTemplateFiles(templateFiles) {
|
|
67
|
+
export function packageTemplateFiles (templateFiles) {
|
|
68
68
|
if (!templateFiles) {
|
|
69
69
|
return templateFiles
|
|
70
70
|
}
|
|
@@ -74,22 +74,17 @@ export function packageTemplateFiles(templateFiles) {
|
|
|
74
74
|
let templateFilesResult = []
|
|
75
75
|
let fileCodes = []
|
|
76
76
|
const fileSeperate = '~-~-'
|
|
77
|
-
templateFiles.forEach(
|
|
77
|
+
templateFiles.forEach(template => {
|
|
78
78
|
let showName = template.templateShowPath
|
|
79
79
|
if (showName.indexOf(fileSeperate) > 0) {
|
|
80
80
|
// 表示是多语言模板
|
|
81
81
|
const fileCode = showName.substring(0, showName.indexOf(fileSeperate))
|
|
82
|
-
const fileLanguage = showName.substring(
|
|
83
|
-
|
|
84
|
-
showName.lastIndexOf(fileSeperate)
|
|
85
|
-
)
|
|
86
|
-
const fileName = showName.substring(
|
|
87
|
-
showName.lastIndexOf(fileSeperate) + fileSeperate.length
|
|
88
|
-
)
|
|
82
|
+
const fileLanguage = showName.substring(showName.indexOf(fileSeperate) + fileSeperate.length, showName.lastIndexOf(fileSeperate))
|
|
83
|
+
const fileName = showName.substring(showName.lastIndexOf(fileSeperate) + fileSeperate.length)
|
|
89
84
|
if (currentLocale === fileLanguage && fileCodes.indexOf(fileCode) < 0) {
|
|
90
85
|
templateFilesResult.push({
|
|
91
86
|
templateUUID: template.templateUUID,
|
|
92
|
-
templateShowPath: fileName
|
|
87
|
+
templateShowPath: fileName
|
|
93
88
|
})
|
|
94
89
|
fileCodes.push(fileCode)
|
|
95
90
|
}
|
|
@@ -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
|
|
@@ -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
|
|
@@ -621,40 +621,49 @@ const Util = {
|
|
|
621
621
|
}
|
|
622
622
|
if (isPromise(beforeClickResult)) {
|
|
623
623
|
beforeClickResult.then((result) => {
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
624
|
+
if (result) {
|
|
625
|
+
if (button.code === 'exportPDF') {
|
|
626
|
+
this.exportFormPdf(fileName, myJsContent, system, param)
|
|
627
|
+
} else {
|
|
628
|
+
this.exportFormReportSuccess(
|
|
629
|
+
templateUUID,
|
|
630
|
+
fileName,
|
|
631
|
+
myJsContent,
|
|
632
|
+
entityName,
|
|
633
|
+
system,
|
|
634
|
+
logSettingText,
|
|
635
|
+
taskMap,
|
|
636
|
+
additionalParamMap,
|
|
637
|
+
isWorkflowForm,
|
|
638
|
+
beanName,
|
|
639
|
+
button,
|
|
640
|
+
tableName,
|
|
641
|
+
param
|
|
642
|
+
)
|
|
643
|
+
}
|
|
644
|
+
|
|
640
645
|
}
|
|
641
646
|
})
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
647
|
+
} else {
|
|
648
|
+
if (button.code === 'exportPDF') {
|
|
649
|
+
this.exportFormPdf(fileName, myJsContent, system, param)
|
|
650
|
+
} else {
|
|
651
|
+
this.exportFormReportSuccess(
|
|
652
|
+
templateUUID,
|
|
653
|
+
fileName,
|
|
654
|
+
myJsContent,
|
|
655
|
+
entityName,
|
|
656
|
+
system,
|
|
657
|
+
logSettingText,
|
|
658
|
+
taskMap,
|
|
659
|
+
additionalParamMap,
|
|
660
|
+
isWorkflowForm,
|
|
661
|
+
beanName,
|
|
662
|
+
button,
|
|
663
|
+
tableName,
|
|
664
|
+
param
|
|
665
|
+
)
|
|
666
|
+
}
|
|
658
667
|
}
|
|
659
668
|
})
|
|
660
669
|
}
|
|
@@ -723,6 +732,48 @@ const Util = {
|
|
|
723
732
|
entity: this.formData,
|
|
724
733
|
}
|
|
725
734
|
)
|
|
735
|
+
})
|
|
736
|
+
},
|
|
737
|
+
// 导出报告按钮实现
|
|
738
|
+
exportFormPdf (fileName, myJsContent, system, param) {
|
|
739
|
+
let request
|
|
740
|
+
if (myJsContent) {
|
|
741
|
+
// 将js文本转换为函数,并运行
|
|
742
|
+
// eslint-disable-next-line no-eval
|
|
743
|
+
const buttonFun = eval('(' + myJsContent + ')')
|
|
744
|
+
// 运行方法
|
|
745
|
+
request = buttonFun(this, param)
|
|
746
|
+
} else {
|
|
747
|
+
const baseUrl = this.getBaseUrl(system)
|
|
748
|
+
const path = baseUrl + '/dsc/commons/export-pdf'
|
|
749
|
+
axios.defaults.headers.common.Authorization = getToken()
|
|
750
|
+
request = axios.post(
|
|
751
|
+
path,
|
|
752
|
+
param, {
|
|
753
|
+
responseType: 'blob'
|
|
754
|
+
}, {
|
|
755
|
+
headers: {
|
|
756
|
+
'content-type': 'application/x-www-form-urlencoded'
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
)
|
|
760
|
+
}
|
|
761
|
+
request.then((response) => {
|
|
762
|
+
const blob = new Blob([response.data])
|
|
763
|
+
const elink = document.createElement('a')
|
|
764
|
+
elink.download = fileName.substring(0, fileName.lastIndexOf('.')) + '.pdf'
|
|
765
|
+
elink.style.display = 'none'
|
|
766
|
+
elink.target = '_blank'
|
|
767
|
+
elink.href = URL.createObjectURL(blob)
|
|
768
|
+
document.body.appendChild(elink)
|
|
769
|
+
elink.click()
|
|
770
|
+
URL.revokeObjectURL(elink.href) // 释放URL对象
|
|
771
|
+
document.body.removeChild(elink)
|
|
772
|
+
// 调用afterClick回调事件
|
|
773
|
+
this.callAfterClickButton(this.formEvents, this.formViewCode + '__exportForm', {
|
|
774
|
+
params: this.additionalParamMap,
|
|
775
|
+
entity: this.formData
|
|
776
|
+
})
|
|
726
777
|
})
|
|
727
778
|
},
|
|
728
779
|
// 首字母大写
|
|
@@ -753,7 +804,7 @@ const Util = {
|
|
|
753
804
|
$emit(this, 'click', button)
|
|
754
805
|
},
|
|
755
806
|
// 流程页面中按钮点击事件
|
|
756
|
-
workflowButtonClick(event, param, eventSetting, button, completeTaskParam) {
|
|
807
|
+
workflowButtonClick(event, param, eventSetting, button, completeTaskParam, clickParam) {
|
|
757
808
|
$emit(
|
|
758
809
|
this,
|
|
759
810
|
'workflowClick',
|
|
@@ -761,7 +812,8 @@ const Util = {
|
|
|
761
812
|
param,
|
|
762
813
|
eventSetting,
|
|
763
814
|
button,
|
|
764
|
-
|
|
815
|
+
completeTaskParam,
|
|
816
|
+
clickParam
|
|
765
817
|
)
|
|
766
818
|
},
|
|
767
819
|
// 是否是查看详情页面
|
|
@@ -1040,7 +1092,8 @@ const Util = {
|
|
|
1040
1092
|
return
|
|
1041
1093
|
}
|
|
1042
1094
|
const jumpInfoObj = JSON.parse(jumpInfo)
|
|
1043
|
-
|
|
1095
|
+
const jumpMode = jumpInfoObj.jumpMode
|
|
1096
|
+
jumpInfoObj.successOperation = successOperation
|
|
1044
1097
|
if (jumpMode === 'popup') {
|
|
1045
1098
|
// 弹框Dialog
|
|
1046
1099
|
// 弹框所属的页面
|
|
@@ -1522,6 +1575,12 @@ const Util = {
|
|
|
1522
1575
|
tabCode = getStoreInfo(this.pageCode, '_activeTab')
|
|
1523
1576
|
}
|
|
1524
1577
|
$emit(eventBus, this.pageCode + '-refresh-tab', { tabCode:tabCode, entity:entity })
|
|
1525
|
-
|
|
1578
|
+
},
|
|
1579
|
+
// 流程页面中按钮点击事件
|
|
1580
|
+
getPageParam (key, callback) {
|
|
1581
|
+
this.$emit('getPageParam', key, val => {
|
|
1582
|
+
callback(this[key])
|
|
1583
|
+
})
|
|
1584
|
+
}
|
|
1526
1585
|
}
|
|
1527
1586
|
export default Util
|
|
@@ -1228,6 +1228,22 @@ const buttonEvents = {
|
|
|
1228
1228
|
.catch((e) => {
|
|
1229
1229
|
this.showTaskInformitions = false
|
|
1230
1230
|
})
|
|
1231
|
+
},
|
|
1232
|
+
// 自定义退回某环节
|
|
1233
|
+
customReturnTaskTo (model, selectTaskNode) {
|
|
1234
|
+
this.returnTaskTo(
|
|
1235
|
+
this.system,
|
|
1236
|
+
this.tableName,
|
|
1237
|
+
model,
|
|
1238
|
+
selectTaskNode,
|
|
1239
|
+
this.formViewCode,
|
|
1240
|
+
this.formViewVersion,
|
|
1241
|
+
this.entityName,
|
|
1242
|
+
this.myJsContent,
|
|
1243
|
+
this.successOperation,
|
|
1244
|
+
this.isNeedValueMapping,
|
|
1245
|
+
this.beanName
|
|
1246
|
+
)
|
|
1231
1247
|
},
|
|
1232
1248
|
// 退回到某环节,只能退回到已办理过的环节
|
|
1233
1249
|
returnTaskTo(
|
|
@@ -68,19 +68,23 @@
|
|
|
68
68
|
v-if="col.baseSetting.type === 'workflowHistoryList'"
|
|
69
69
|
ref="historyList"
|
|
70
70
|
:workflow-id="workflowId"
|
|
71
|
-
:
|
|
71
|
+
:style="{maxHeight:maxHeight+'px'}"
|
|
72
72
|
/>
|
|
73
73
|
<workflow-history
|
|
74
74
|
v-else-if="col.baseSetting.type === 'workflowHistoryGraph'"
|
|
75
75
|
:id="workflowId"
|
|
76
76
|
ref="historyGraph"
|
|
77
|
+
:style="{maxHeight:maxHeight+'px'}"
|
|
77
78
|
/>
|
|
78
79
|
</template>
|
|
79
80
|
<template v-else>
|
|
80
81
|
{{ $t('superPage.unSubmitProcess') }}
|
|
81
82
|
</template>
|
|
82
83
|
</template>
|
|
83
|
-
<div
|
|
84
|
+
<div
|
|
85
|
+
v-else-if="col.baseSetting.type === 'label'"
|
|
86
|
+
:id="col.baseSetting.componentCode"
|
|
87
|
+
>
|
|
84
88
|
{{ col.baseSetting.label }}
|
|
85
89
|
</div>
|
|
86
90
|
<div
|
|
@@ -195,7 +199,8 @@ export default {
|
|
|
195
199
|
permission,
|
|
196
200
|
permissionPrefix,
|
|
197
201
|
additionalParamMap: null, // 解析好的附加参数
|
|
198
|
-
|
|
202
|
+
isTabChartView, // 是否是图表tab页签页面,如果是,图表显示时不需要使用card显示。
|
|
203
|
+
maxHeight: window.innerHeight - 120,
|
|
199
204
|
}
|
|
200
205
|
},
|
|
201
206
|
computed: {
|