super-pages 0.0.1-up → 0.0.3-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 +2383 -2297
- package/lib/super-pages.umd.cjs +18 -18
- package/package.json +28 -25
- package/packages/index.js +30 -30
- package/packages/super-page/index.js +9 -9
- package/packages/super-page/src/button-group.vue +294 -294
- package/packages/super-page/src/chart-page.vue +215 -215
- package/packages/super-page/src/chart-query-page.vue +163 -163
- package/packages/super-page/src/common-form-page.vue +594 -594
- package/packages/super-page/src/export-form-report-dialog.vue +145 -145
- package/packages/super-page/src/form-head.vue +74 -74
- package/packages/super-page/src/form-page.vue +107 -107
- package/packages/super-page/src/group-tag.vue +21 -21
- package/packages/super-page/src/list-page.vue +1454 -1454
- 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 +438 -438
- package/packages/super-page/src/my-button.vue +196 -196
- package/packages/super-page/src/page-custom-component.vue +56 -56
- 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/super-page-component.vue +86 -86
- package/packages/super-page/src/super-page.vue +162 -162
- package/packages/super-page/src/tab-page.vue +154 -154
- package/packages/super-page/src/task-informition-dialog.vue +82 -82
- package/packages/super-page/src/util/ListButtonEvent.js +896 -896
- 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/chartButtonEvent.js +60 -60
- package/packages/super-page/src/util/common-util.js +102 -102
- package/packages/super-page/src/util/commonButtonEvent.js +70 -70
- package/packages/super-page/src/util/eventBus.js +2 -2
- package/packages/super-page/src/util/formButtonEvent.js +509 -509
- 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 +1491 -1489
- package/packages/super-page/src/util/workflowButtonEvent.js +1729 -1729
- package/packages/super-page/src/widget-col-page.vue +339 -339
- package/packages/super-page/src/widget-page.vue +703 -703
- 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 +561 -561
- package/packages/super-page/src/workflow-form-page.vue +1310 -1310
- package/packages/super-page-dialog/index.js +9 -9
- package/packages/super-page-dialog/src/super-page-dialog.vue +200 -200
- package/packages/utils/gogocodeTransfer.js +59 -59
- package/src/i18n/i18n.js +16 -19
- package/src/i18n/langs/cn.js +65 -65
- package/src/i18n/langs/en.js +68 -68
- package/src/utils/common-util.js +9 -9
- package/vite.config.js +36 -36
|
@@ -1,145 +1,145 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
:show-close="true"
|
|
4
|
-
:append-to-body="true"
|
|
5
|
-
:title="$t('superPage.selectTemplate')"
|
|
6
|
-
model-value
|
|
7
|
-
@close="closeExportForm"
|
|
8
|
-
>
|
|
9
|
-
<el-table :data="templateFiles" style="width: 100%">
|
|
10
|
-
<el-table-column
|
|
11
|
-
:label="$t('superPage.temlpate')"
|
|
12
|
-
prop="templateShowPath"
|
|
13
|
-
>
|
|
14
|
-
<template v-slot="scope">
|
|
15
|
-
{{ formatTemplateShowPath(scope.row.templateShowPath) }}
|
|
16
|
-
</template>
|
|
17
|
-
</el-table-column>
|
|
18
|
-
<el-table-column
|
|
19
|
-
:label="$t('superPage.operating')"
|
|
20
|
-
width="200"
|
|
21
|
-
fixed="right"
|
|
22
|
-
>
|
|
23
|
-
<template v-slot="scope">
|
|
24
|
-
<el-button type="text" size="small" @click="exportForm(scope.row)">
|
|
25
|
-
{{ $t('superPage.export') }}
|
|
26
|
-
</el-button>
|
|
27
|
-
<!-- <el-button
|
|
28
|
-
type="text"
|
|
29
|
-
size="small"
|
|
30
|
-
@click="previewExportForm(scope.row)"
|
|
31
|
-
>
|
|
32
|
-
{{ $t('superPage.preview') }}
|
|
33
|
-
</el-button> -->
|
|
34
|
-
</template>
|
|
35
|
-
</el-table-column>
|
|
36
|
-
</el-table>
|
|
37
|
-
</el-dialog>
|
|
38
|
-
</template>
|
|
39
|
-
|
|
40
|
-
<script>
|
|
41
|
-
import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
|
|
42
|
-
import { packageTemplateFiles } from './util/common-util'
|
|
43
|
-
export default {
|
|
44
|
-
name: 'ExportFormReportDialog',
|
|
45
|
-
props: {
|
|
46
|
-
button: {
|
|
47
|
-
type: [Array, Object],
|
|
48
|
-
default: () => {
|
|
49
|
-
return null
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
entity: {
|
|
53
|
-
type: Object,
|
|
54
|
-
default: null,
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
data() {
|
|
58
|
-
let templateFiles = []
|
|
59
|
-
if (this.button.templateFiles && this.button.templateFiles.length > 0) {
|
|
60
|
-
templateFiles = packageTemplateFiles(this.button.templateFiles)
|
|
61
|
-
} else if (this.button.templateUUID && this.button.templateShowPath) {
|
|
62
|
-
templateFiles.push({
|
|
63
|
-
templateUUID: this.button.templateUUID,
|
|
64
|
-
templateShowPath: this.button.templateShowPath,
|
|
65
|
-
})
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
templateFiles,
|
|
69
|
-
fields: [],
|
|
70
|
-
prefix: '${',
|
|
71
|
-
suffix: '}',
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
created() {},
|
|
75
|
-
methods: {
|
|
76
|
-
getFileds(templateShowPath) {
|
|
77
|
-
console.log('templateShowPath', templateShowPath)
|
|
78
|
-
let field
|
|
79
|
-
let formatStr
|
|
80
|
-
let newValue = templateShowPath
|
|
81
|
-
const prefixIndex = newValue.indexOf(this.prefix)
|
|
82
|
-
const suffixIndex = newValue.indexOf(this.suffix)
|
|
83
|
-
console.log('prefixIndex', prefixIndex)
|
|
84
|
-
console.log('suffixIndex', suffixIndex)
|
|
85
|
-
if (prefixIndex !== -1 && suffixIndex !== -1) {
|
|
86
|
-
if (prefixIndex > suffixIndex) {
|
|
87
|
-
newValue =
|
|
88
|
-
newValue.substring(0, suffixIndex) +
|
|
89
|
-
newValue.substring(suffixIndex + this.suffix.length)
|
|
90
|
-
console.log('non replacement value === newValue', newValue)
|
|
91
|
-
} else {
|
|
92
|
-
field = newValue.substring(
|
|
93
|
-
prefixIndex + this.prefix.length,
|
|
94
|
-
suffixIndex
|
|
95
|
-
)
|
|
96
|
-
formatStr = newValue.substring(
|
|
97
|
-
prefixIndex,
|
|
98
|
-
suffixIndex + this.suffix.length
|
|
99
|
-
)
|
|
100
|
-
console.log('field', field)
|
|
101
|
-
console.log('formatStr', formatStr)
|
|
102
|
-
this.fields.push(field)
|
|
103
|
-
console.log('fields', this.fields)
|
|
104
|
-
newValue = newValue.replace(formatStr, '')
|
|
105
|
-
console.log('newValue', newValue)
|
|
106
|
-
}
|
|
107
|
-
return this.getFileds(newValue)
|
|
108
|
-
}
|
|
109
|
-
return this.fields
|
|
110
|
-
},
|
|
111
|
-
formatTemplateShowPath(templateShowPath) {
|
|
112
|
-
const fields = this.getFileds(templateShowPath)
|
|
113
|
-
console.log('fields', fields)
|
|
114
|
-
|
|
115
|
-
fields.forEach((field) => {
|
|
116
|
-
const formatStr = this.prefix + field + this.suffix
|
|
117
|
-
let formatValue
|
|
118
|
-
if (
|
|
119
|
-
templateShowPath.indexOf(formatStr) !== -1 &&
|
|
120
|
-
this.entity.hasOwnProperty(field)
|
|
121
|
-
) {
|
|
122
|
-
formatValue = this.entity[field] ? this.entity[field] : ''
|
|
123
|
-
templateShowPath = templateShowPath.replace(formatStr, formatValue)
|
|
124
|
-
}
|
|
125
|
-
})
|
|
126
|
-
return templateShowPath
|
|
127
|
-
},
|
|
128
|
-
exportForm(row) {
|
|
129
|
-
if (row['templateShowPath']) {
|
|
130
|
-
row['templateShowPath'] = this.formatTemplateShowPath(
|
|
131
|
-
row['templateShowPath']
|
|
132
|
-
)
|
|
133
|
-
}
|
|
134
|
-
$emit(this, 'before-export-form-report', row)
|
|
135
|
-
},
|
|
136
|
-
previewExportForm(row) {
|
|
137
|
-
$emit(this, 'preview-export-form-report', row)
|
|
138
|
-
},
|
|
139
|
-
closeExportForm() {
|
|
140
|
-
$emit(this, 'close')
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
emits: ['before-export-form-report', 'preview-export-form-report', 'close'],
|
|
144
|
-
}
|
|
145
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
:show-close="true"
|
|
4
|
+
:append-to-body="true"
|
|
5
|
+
:title="$t('superPage.selectTemplate')"
|
|
6
|
+
model-value
|
|
7
|
+
@close="closeExportForm"
|
|
8
|
+
>
|
|
9
|
+
<el-table :data="templateFiles" style="width: 100%">
|
|
10
|
+
<el-table-column
|
|
11
|
+
:label="$t('superPage.temlpate')"
|
|
12
|
+
prop="templateShowPath"
|
|
13
|
+
>
|
|
14
|
+
<template v-slot="scope">
|
|
15
|
+
{{ formatTemplateShowPath(scope.row.templateShowPath) }}
|
|
16
|
+
</template>
|
|
17
|
+
</el-table-column>
|
|
18
|
+
<el-table-column
|
|
19
|
+
:label="$t('superPage.operating')"
|
|
20
|
+
width="200"
|
|
21
|
+
fixed="right"
|
|
22
|
+
>
|
|
23
|
+
<template v-slot="scope">
|
|
24
|
+
<el-button type="text" size="small" @click="exportForm(scope.row)">
|
|
25
|
+
{{ $t('superPage.export') }}
|
|
26
|
+
</el-button>
|
|
27
|
+
<!-- <el-button
|
|
28
|
+
type="text"
|
|
29
|
+
size="small"
|
|
30
|
+
@click="previewExportForm(scope.row)"
|
|
31
|
+
>
|
|
32
|
+
{{ $t('superPage.preview') }}
|
|
33
|
+
</el-button> -->
|
|
34
|
+
</template>
|
|
35
|
+
</el-table-column>
|
|
36
|
+
</el-table>
|
|
37
|
+
</el-dialog>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script>
|
|
41
|
+
import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
|
|
42
|
+
import { packageTemplateFiles } from './util/common-util'
|
|
43
|
+
export default {
|
|
44
|
+
name: 'ExportFormReportDialog',
|
|
45
|
+
props: {
|
|
46
|
+
button: {
|
|
47
|
+
type: [Array, Object],
|
|
48
|
+
default: () => {
|
|
49
|
+
return null
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
entity: {
|
|
53
|
+
type: Object,
|
|
54
|
+
default: null,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
data() {
|
|
58
|
+
let templateFiles = []
|
|
59
|
+
if (this.button.templateFiles && this.button.templateFiles.length > 0) {
|
|
60
|
+
templateFiles = packageTemplateFiles(this.button.templateFiles)
|
|
61
|
+
} else if (this.button.templateUUID && this.button.templateShowPath) {
|
|
62
|
+
templateFiles.push({
|
|
63
|
+
templateUUID: this.button.templateUUID,
|
|
64
|
+
templateShowPath: this.button.templateShowPath,
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
templateFiles,
|
|
69
|
+
fields: [],
|
|
70
|
+
prefix: '${',
|
|
71
|
+
suffix: '}',
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
created() {},
|
|
75
|
+
methods: {
|
|
76
|
+
getFileds(templateShowPath) {
|
|
77
|
+
console.log('templateShowPath', templateShowPath)
|
|
78
|
+
let field
|
|
79
|
+
let formatStr
|
|
80
|
+
let newValue = templateShowPath
|
|
81
|
+
const prefixIndex = newValue.indexOf(this.prefix)
|
|
82
|
+
const suffixIndex = newValue.indexOf(this.suffix)
|
|
83
|
+
console.log('prefixIndex', prefixIndex)
|
|
84
|
+
console.log('suffixIndex', suffixIndex)
|
|
85
|
+
if (prefixIndex !== -1 && suffixIndex !== -1) {
|
|
86
|
+
if (prefixIndex > suffixIndex) {
|
|
87
|
+
newValue =
|
|
88
|
+
newValue.substring(0, suffixIndex) +
|
|
89
|
+
newValue.substring(suffixIndex + this.suffix.length)
|
|
90
|
+
console.log('non replacement value === newValue', newValue)
|
|
91
|
+
} else {
|
|
92
|
+
field = newValue.substring(
|
|
93
|
+
prefixIndex + this.prefix.length,
|
|
94
|
+
suffixIndex
|
|
95
|
+
)
|
|
96
|
+
formatStr = newValue.substring(
|
|
97
|
+
prefixIndex,
|
|
98
|
+
suffixIndex + this.suffix.length
|
|
99
|
+
)
|
|
100
|
+
console.log('field', field)
|
|
101
|
+
console.log('formatStr', formatStr)
|
|
102
|
+
this.fields.push(field)
|
|
103
|
+
console.log('fields', this.fields)
|
|
104
|
+
newValue = newValue.replace(formatStr, '')
|
|
105
|
+
console.log('newValue', newValue)
|
|
106
|
+
}
|
|
107
|
+
return this.getFileds(newValue)
|
|
108
|
+
}
|
|
109
|
+
return this.fields
|
|
110
|
+
},
|
|
111
|
+
formatTemplateShowPath(templateShowPath) {
|
|
112
|
+
const fields = this.getFileds(templateShowPath)
|
|
113
|
+
console.log('fields', fields)
|
|
114
|
+
|
|
115
|
+
fields.forEach((field) => {
|
|
116
|
+
const formatStr = this.prefix + field + this.suffix
|
|
117
|
+
let formatValue
|
|
118
|
+
if (
|
|
119
|
+
templateShowPath.indexOf(formatStr) !== -1 &&
|
|
120
|
+
this.entity.hasOwnProperty(field)
|
|
121
|
+
) {
|
|
122
|
+
formatValue = this.entity[field] ? this.entity[field] : ''
|
|
123
|
+
templateShowPath = templateShowPath.replace(formatStr, formatValue)
|
|
124
|
+
}
|
|
125
|
+
})
|
|
126
|
+
return templateShowPath
|
|
127
|
+
},
|
|
128
|
+
exportForm(row) {
|
|
129
|
+
if (row['templateShowPath']) {
|
|
130
|
+
row['templateShowPath'] = this.formatTemplateShowPath(
|
|
131
|
+
row['templateShowPath']
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
$emit(this, 'before-export-form-report', row)
|
|
135
|
+
},
|
|
136
|
+
previewExportForm(row) {
|
|
137
|
+
$emit(this, 'preview-export-form-report', row)
|
|
138
|
+
},
|
|
139
|
+
closeExportForm() {
|
|
140
|
+
$emit(this, 'close')
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
emits: ['before-export-form-report', 'preview-export-form-report', 'close'],
|
|
144
|
+
}
|
|
145
|
+
</script>
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
:style="{ marginTop: formButtonPosition === 'topLeft' ? '72px' : '' }"
|
|
4
|
-
class="formHead"
|
|
5
|
-
>
|
|
6
|
-
<div
|
|
7
|
-
v-if="formTitle && formTitle !== '' && formTitle !== null"
|
|
8
|
-
class="formTitle"
|
|
9
|
-
>
|
|
10
|
-
{{ formTitle }}
|
|
11
|
-
</div>
|
|
12
|
-
<span
|
|
13
|
-
v-if="formNo"
|
|
14
|
-
style="
|
|
15
|
-
font-size: 18px;
|
|
16
|
-
white-space: nowrap;
|
|
17
|
-
display: block;
|
|
18
|
-
text-align: right;
|
|
19
|
-
"
|
|
20
|
-
>{{
|
|
21
|
-
formNoLabel && formNoLabel !== null && formNoLabel.trim() !== ''
|
|
22
|
-
? formNoLabel + ':'
|
|
23
|
-
: $t('superPage.formNo')
|
|
24
|
-
}}{{ formNo }}</span
|
|
25
|
-
>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script>
|
|
30
|
-
export default {
|
|
31
|
-
name: 'FormHead',
|
|
32
|
-
components: {},
|
|
33
|
-
props: {
|
|
34
|
-
// 表单标题
|
|
35
|
-
formTitle: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: null,
|
|
38
|
-
},
|
|
39
|
-
// 表单编码规则解析获得的表单编码
|
|
40
|
-
formNo: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: null,
|
|
43
|
-
},
|
|
44
|
-
formNoLabel: {
|
|
45
|
-
type: String,
|
|
46
|
-
default: null,
|
|
47
|
-
},
|
|
48
|
-
formButtonPosition: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: null,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
}
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<style lang="scss" scoped>
|
|
57
|
-
.formTitle {
|
|
58
|
-
color: #333;
|
|
59
|
-
padding: 0;
|
|
60
|
-
border: 0;
|
|
61
|
-
display: block;
|
|
62
|
-
margin-left: 40%;
|
|
63
|
-
margin-bottom: 20px;
|
|
64
|
-
font-weight: 700;
|
|
65
|
-
font-size: 24px;
|
|
66
|
-
}
|
|
67
|
-
.formHead {
|
|
68
|
-
color: #333;
|
|
69
|
-
padding: 10px;
|
|
70
|
-
border: 0;
|
|
71
|
-
display: block;
|
|
72
|
-
width: 100%;
|
|
73
|
-
}
|
|
74
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:style="{ marginTop: formButtonPosition === 'topLeft' ? '72px' : '' }"
|
|
4
|
+
class="formHead"
|
|
5
|
+
>
|
|
6
|
+
<div
|
|
7
|
+
v-if="formTitle && formTitle !== '' && formTitle !== null"
|
|
8
|
+
class="formTitle"
|
|
9
|
+
>
|
|
10
|
+
{{ formTitle }}
|
|
11
|
+
</div>
|
|
12
|
+
<span
|
|
13
|
+
v-if="formNo"
|
|
14
|
+
style="
|
|
15
|
+
font-size: 18px;
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
display: block;
|
|
18
|
+
text-align: right;
|
|
19
|
+
"
|
|
20
|
+
>{{
|
|
21
|
+
formNoLabel && formNoLabel !== null && formNoLabel.trim() !== ''
|
|
22
|
+
? formNoLabel + ':'
|
|
23
|
+
: $t('superPage.formNo')
|
|
24
|
+
}}{{ formNo }}</span
|
|
25
|
+
>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script>
|
|
30
|
+
export default {
|
|
31
|
+
name: 'FormHead',
|
|
32
|
+
components: {},
|
|
33
|
+
props: {
|
|
34
|
+
// 表单标题
|
|
35
|
+
formTitle: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: null,
|
|
38
|
+
},
|
|
39
|
+
// 表单编码规则解析获得的表单编码
|
|
40
|
+
formNo: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: null,
|
|
43
|
+
},
|
|
44
|
+
formNoLabel: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: null,
|
|
47
|
+
},
|
|
48
|
+
formButtonPosition: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: null,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<style lang="scss" scoped>
|
|
57
|
+
.formTitle {
|
|
58
|
+
color: #333;
|
|
59
|
+
padding: 0;
|
|
60
|
+
border: 0;
|
|
61
|
+
display: block;
|
|
62
|
+
margin-left: 40%;
|
|
63
|
+
margin-bottom: 20px;
|
|
64
|
+
font-weight: 700;
|
|
65
|
+
font-size: 24px;
|
|
66
|
+
}
|
|
67
|
+
.formHead {
|
|
68
|
+
color: #333;
|
|
69
|
+
padding: 10px;
|
|
70
|
+
border: 0;
|
|
71
|
+
display: block;
|
|
72
|
+
width: 100%;
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<workflow-form-page
|
|
4
|
-
v-if="isWorkflowForm"
|
|
5
|
-
ref="workflowFormPage"
|
|
6
|
-
:col-setting="colSetting"
|
|
7
|
-
:data-id="dataId"
|
|
8
|
-
:task-id="taskId"
|
|
9
|
-
:tab-code="tabCode"
|
|
10
|
-
:email-template-code="emailTemplateCode"
|
|
11
|
-
:page-code="pageCode"
|
|
12
|
-
/>
|
|
13
|
-
<common-form-page
|
|
14
|
-
v-else
|
|
15
|
-
ref="formPage"
|
|
16
|
-
:col-setting="colSetting"
|
|
17
|
-
:data-id="dataId"
|
|
18
|
-
:page-code="pageCode"
|
|
19
|
-
:tab-code="tabCode"
|
|
20
|
-
@update-value="updateSetValues"
|
|
21
|
-
/>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<script>
|
|
26
|
-
import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
|
|
27
|
-
import CommonFormPage from './common-form-page'
|
|
28
|
-
import WorkflowFormPage from './workflow-form-page'
|
|
29
|
-
export default {
|
|
30
|
-
name: 'FormPage',
|
|
31
|
-
components: {
|
|
32
|
-
CommonFormPage,
|
|
33
|
-
WorkflowFormPage,
|
|
34
|
-
},
|
|
35
|
-
props: {
|
|
36
|
-
colSetting: {
|
|
37
|
-
type: Object,
|
|
38
|
-
default: null,
|
|
39
|
-
},
|
|
40
|
-
// 表单页面修改记录时记录id
|
|
41
|
-
dataId: {
|
|
42
|
-
type: Number,
|
|
43
|
-
default: null,
|
|
44
|
-
},
|
|
45
|
-
// 流程表单页面办理任务时任务id
|
|
46
|
-
taskId: {
|
|
47
|
-
type: Number,
|
|
48
|
-
default: null,
|
|
49
|
-
},
|
|
50
|
-
// 页面编码
|
|
51
|
-
pageCode: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: null,
|
|
54
|
-
},
|
|
55
|
-
// 页签编码
|
|
56
|
-
tabCode: {
|
|
57
|
-
type: String,
|
|
58
|
-
default: null,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
data() {
|
|
62
|
-
return {
|
|
63
|
-
isWorkflowForm: false, // 是否是流程表单
|
|
64
|
-
emailTemplateCode: '', // 流程办理发送邮件对应的模板
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
created() {
|
|
68
|
-
this.getProcessInfo()
|
|
69
|
-
},
|
|
70
|
-
methods: {
|
|
71
|
-
updateSetValues(soureModel, sourceTableName, targetRowIndex) {
|
|
72
|
-
$emit(this, 'update-value', soureModel, sourceTableName, targetRowIndex)
|
|
73
|
-
},
|
|
74
|
-
fnProhibitToEdit(entity) {
|
|
75
|
-
if (this.isWorkflowForm) {
|
|
76
|
-
console.log('this.$refs.formPage', this.$refs.workflowFormPage)
|
|
77
|
-
if (this.$refs.workflowFormPage) {
|
|
78
|
-
return this.$refs.workflowFormPage.fnProhibitToEdit(entity)
|
|
79
|
-
}
|
|
80
|
-
} else {
|
|
81
|
-
console.log('this.$refs.formPage', this.$refs.formPage)
|
|
82
|
-
if (this.$refs.formPage) {
|
|
83
|
-
return this.$refs.formPage.fnProhibitToEdit(entity)
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
// 获得“工作流程按钮组”对应的流程编码
|
|
88
|
-
getProcessInfo() {
|
|
89
|
-
const buttonGroups = this.colSetting.options.buttonGroup
|
|
90
|
-
if (buttonGroups && buttonGroups.length > 0) {
|
|
91
|
-
for (let i = 0; i < buttonGroups.length; i++) {
|
|
92
|
-
const button = buttonGroups[i]
|
|
93
|
-
if (button.code && button.code === 'workflowButton') {
|
|
94
|
-
// 流程按钮组
|
|
95
|
-
// 获得流程办理发送邮件对应的模板
|
|
96
|
-
this.emailTemplateCode = button.emailTemplateCode
|
|
97
|
-
this.isWorkflowForm = true
|
|
98
|
-
return
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
this.isWorkflowForm = false
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
emits: ['update-value'],
|
|
106
|
-
}
|
|
107
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<workflow-form-page
|
|
4
|
+
v-if="isWorkflowForm"
|
|
5
|
+
ref="workflowFormPage"
|
|
6
|
+
:col-setting="colSetting"
|
|
7
|
+
:data-id="dataId"
|
|
8
|
+
:task-id="taskId"
|
|
9
|
+
:tab-code="tabCode"
|
|
10
|
+
:email-template-code="emailTemplateCode"
|
|
11
|
+
:page-code="pageCode"
|
|
12
|
+
/>
|
|
13
|
+
<common-form-page
|
|
14
|
+
v-else
|
|
15
|
+
ref="formPage"
|
|
16
|
+
:col-setting="colSetting"
|
|
17
|
+
:data-id="dataId"
|
|
18
|
+
:page-code="pageCode"
|
|
19
|
+
:tab-code="tabCode"
|
|
20
|
+
@update-value="updateSetValues"
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
|
|
27
|
+
import CommonFormPage from './common-form-page'
|
|
28
|
+
import WorkflowFormPage from './workflow-form-page'
|
|
29
|
+
export default {
|
|
30
|
+
name: 'FormPage',
|
|
31
|
+
components: {
|
|
32
|
+
CommonFormPage,
|
|
33
|
+
WorkflowFormPage,
|
|
34
|
+
},
|
|
35
|
+
props: {
|
|
36
|
+
colSetting: {
|
|
37
|
+
type: Object,
|
|
38
|
+
default: null,
|
|
39
|
+
},
|
|
40
|
+
// 表单页面修改记录时记录id
|
|
41
|
+
dataId: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: null,
|
|
44
|
+
},
|
|
45
|
+
// 流程表单页面办理任务时任务id
|
|
46
|
+
taskId: {
|
|
47
|
+
type: Number,
|
|
48
|
+
default: null,
|
|
49
|
+
},
|
|
50
|
+
// 页面编码
|
|
51
|
+
pageCode: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: null,
|
|
54
|
+
},
|
|
55
|
+
// 页签编码
|
|
56
|
+
tabCode: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: null,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
data() {
|
|
62
|
+
return {
|
|
63
|
+
isWorkflowForm: false, // 是否是流程表单
|
|
64
|
+
emailTemplateCode: '', // 流程办理发送邮件对应的模板
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
created() {
|
|
68
|
+
this.getProcessInfo()
|
|
69
|
+
},
|
|
70
|
+
methods: {
|
|
71
|
+
updateSetValues(soureModel, sourceTableName, targetRowIndex) {
|
|
72
|
+
$emit(this, 'update-value', soureModel, sourceTableName, targetRowIndex)
|
|
73
|
+
},
|
|
74
|
+
fnProhibitToEdit(entity) {
|
|
75
|
+
if (this.isWorkflowForm) {
|
|
76
|
+
console.log('this.$refs.formPage', this.$refs.workflowFormPage)
|
|
77
|
+
if (this.$refs.workflowFormPage) {
|
|
78
|
+
return this.$refs.workflowFormPage.fnProhibitToEdit(entity)
|
|
79
|
+
}
|
|
80
|
+
} else {
|
|
81
|
+
console.log('this.$refs.formPage', this.$refs.formPage)
|
|
82
|
+
if (this.$refs.formPage) {
|
|
83
|
+
return this.$refs.formPage.fnProhibitToEdit(entity)
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
// 获得“工作流程按钮组”对应的流程编码
|
|
88
|
+
getProcessInfo() {
|
|
89
|
+
const buttonGroups = this.colSetting.options.buttonGroup
|
|
90
|
+
if (buttonGroups && buttonGroups.length > 0) {
|
|
91
|
+
for (let i = 0; i < buttonGroups.length; i++) {
|
|
92
|
+
const button = buttonGroups[i]
|
|
93
|
+
if (button.code && button.code === 'workflowButton') {
|
|
94
|
+
// 流程按钮组
|
|
95
|
+
// 获得流程办理发送邮件对应的模板
|
|
96
|
+
this.emailTemplateCode = button.emailTemplateCode
|
|
97
|
+
this.isWorkflowForm = true
|
|
98
|
+
return
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
this.isWorkflowForm = false
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
emits: ['update-value'],
|
|
106
|
+
}
|
|
107
|
+
</script>
|