adtec-core-package 2.0.8 → 2.1.0
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/package.json +3 -1
- package/src/components/workflow/TaskOperation.vue +1 -1
- package/src/components/workflow/components/CheckDialog.vue +27 -11
- package/src/components/workflow/components/SelectAssigneeDialog.vue +1 -0
- package/src/config/VxeTableConfig.ts +44 -46
- package/src/interface/ISortList.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adtec-core-package",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"@types/echarts": "^5.0.0",
|
|
19
19
|
"@vueuse/components": "^13.0.0",
|
|
20
20
|
"@vueuse/core": "^13.0.0",
|
|
21
|
+
"@vxe-ui/plugin-export-pdf": "4.2.4",
|
|
21
22
|
"@vxe-ui/plugin-export-xlsx": "4.2.1",
|
|
22
23
|
"@vxe-ui/plugin-render-element": "4.0.10",
|
|
23
24
|
"aieditor": "^1.3.4",
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
"element-plus": "2.8.7",
|
|
28
29
|
"exceljs": "4.4.0",
|
|
29
30
|
"jsencrypt": "^3.3.2",
|
|
31
|
+
"jspdf": "2.5.2",
|
|
30
32
|
"linq-to-ts": "^1.3.0",
|
|
31
33
|
"pinia": "^2.3.0",
|
|
32
34
|
"pinia-plugin-store": "^2.2.9",
|
|
@@ -73,6 +73,13 @@
|
|
|
73
73
|
</el-card>
|
|
74
74
|
</el-flex>
|
|
75
75
|
</el-form-item>
|
|
76
|
+
<el-form-item v-if="showSelPersons" label="下一步审核人" required>
|
|
77
|
+
<el-select v-model="task.variables.nextChecker" multiple placeholder="请选择下一步审核人"
|
|
78
|
+
:disabled="task.variables.persons?.length === 1">
|
|
79
|
+
<el-option v-for="item in task.variables.persons" :key="item.code" :label="item.name" :value="item.code">
|
|
80
|
+
</el-option>
|
|
81
|
+
</el-select>
|
|
82
|
+
</el-form-item>
|
|
76
83
|
<el-form-item v-if="dialogType !== 'transfer'" label="附件" style="margin-bottom: 0">
|
|
77
84
|
</el-form-item>
|
|
78
85
|
</el-form>
|
|
@@ -100,21 +107,22 @@
|
|
|
100
107
|
</el-dialog>
|
|
101
108
|
</template>
|
|
102
109
|
<script setup lang="ts">
|
|
103
|
-
import {
|
|
110
|
+
import {Search} from '@element-plus/icons-vue'
|
|
104
111
|
import UserTag from '../../../components/bpmntree/components/UserSelector/UserTag.vue'
|
|
105
|
-
import {
|
|
106
|
-
import type {
|
|
107
|
-
import type {
|
|
108
|
-
import type {
|
|
112
|
+
import {ref, computed} from 'vue'
|
|
113
|
+
import type {IWfTaskVo} from '../../../interface/workflow/IWfTaskVo'
|
|
114
|
+
import type {ISysUserInfo} from '../../../interface/ISysUserInfo'
|
|
115
|
+
import type {IWfReturnNodeVo} from '../../../interface/workflow/IWfReturnNodeVo'
|
|
109
116
|
import workflowInstApi from '../../../api/workflow/workflowInstApi'
|
|
110
|
-
import {
|
|
117
|
+
import {ElMessage} from 'element-plus'
|
|
111
118
|
import UserSelect from '../../../components/business/userSelect.vue'
|
|
112
119
|
import ElUploads from '../../../components/upload/ElUploads.vue'
|
|
113
|
-
import {
|
|
114
|
-
import type {
|
|
120
|
+
import {userInfoStore} from '../../../stores/userInfoStore'
|
|
121
|
+
import type {ISysUploadFiles} from '../../../interface/ISysUploadFiles'
|
|
115
122
|
import documentApi from '../../../api/DocumentApi'
|
|
116
123
|
import frameworkUtils from '../../../utils/FrameworkUtils.ts'
|
|
117
|
-
import type {
|
|
124
|
+
import type {ITaskOperate} from '@/hooks/userWorkflowHooks.ts'
|
|
125
|
+
|
|
118
126
|
const emit = defineEmits(['success', 'openAssignee'])
|
|
119
127
|
const dialogVisible = ref(false)
|
|
120
128
|
const loading = ref(false)
|
|
@@ -123,11 +131,14 @@ const dialogLabel = ref('')
|
|
|
123
131
|
const dialogType = ref('')
|
|
124
132
|
const task = ref()
|
|
125
133
|
const taskFiles = ref<ISysUploadFiles[]>([])
|
|
126
|
-
const transferUser = ref<ISysUserInfo>({
|
|
134
|
+
const transferUser = ref<ISysUserInfo>({id: '', userName: ''})
|
|
127
135
|
const returnData = ref<IWfReturnNodeVo[]>([])
|
|
128
136
|
const selectActivity = ref<string>('')
|
|
129
137
|
const taskOperate = ref<ITaskOperate>()
|
|
130
138
|
const readonly = ref(false)
|
|
139
|
+
const showSelPersons = computed(() => {
|
|
140
|
+
return task.value.variables?.persons?.length > 0
|
|
141
|
+
})
|
|
131
142
|
const open = async (taskVo: IWfTaskVo, type: string, params: ITaskOperate, commentReadonly: boolean) => {
|
|
132
143
|
if (commentReadonly) {
|
|
133
144
|
readonly.value = true
|
|
@@ -208,12 +219,16 @@ const handleComplete = async () => {
|
|
|
208
219
|
ElMessage.warning('请填写审批意见!')
|
|
209
220
|
return
|
|
210
221
|
}
|
|
222
|
+
if (showSelPersons.value && !task.value.variables.nextChecker?.length) {
|
|
223
|
+
ElMessage.warning('请选择下一步审核人!')
|
|
224
|
+
return
|
|
225
|
+
}
|
|
211
226
|
//同意
|
|
212
227
|
const askVo = {
|
|
213
228
|
taskId: task.value.taskId,
|
|
214
229
|
userId: userInfoStore().getUserInfo.id,
|
|
215
230
|
comment: task.value.comment,
|
|
216
|
-
|
|
231
|
+
variables: task.value.variables
|
|
217
232
|
}
|
|
218
233
|
//若自定义了同意函数,则调用自定义函数
|
|
219
234
|
if (taskOperate.value?.completeFunction) {
|
|
@@ -322,6 +337,7 @@ defineExpose({
|
|
|
322
337
|
.el-card__body {
|
|
323
338
|
padding: 5px;
|
|
324
339
|
}
|
|
340
|
+
|
|
325
341
|
.el-upload-dragger {
|
|
326
342
|
padding: 5px;
|
|
327
343
|
//height: 120px;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from 'vxe-table'
|
|
4
|
-
import {
|
|
5
|
-
VxeUI
|
|
6
|
-
} from 'vxe-pc-ui'
|
|
1
|
+
import { VxeGrid } from 'vxe-table'
|
|
2
|
+
import { VxeUI } from 'vxe-pc-ui'
|
|
7
3
|
|
|
8
4
|
import VxeUIPluginRenderElement from '@vxe-ui/plugin-render-element'
|
|
9
5
|
import '@vxe-ui/plugin-render-element/dist/style.css'
|
|
@@ -11,20 +7,23 @@ import VxeUIPluginExportXLSX from '@vxe-ui/plugin-export-xlsx'
|
|
|
11
7
|
import ExcelJS from 'exceljs'
|
|
12
8
|
import 'vxe-pc-ui/lib/style.css'
|
|
13
9
|
import '../css/vxeTableUI/all.scss'
|
|
10
|
+
import VxeUIPluginExportPDF from '@vxe-ui/plugin-export-pdf'
|
|
11
|
+
import { jsPDF } from 'jspdf'
|
|
14
12
|
// 导入默认的语言
|
|
15
13
|
import zhCN from 'vxe-table/lib/locale/lang/zh-CN'
|
|
16
14
|
|
|
17
15
|
/**
|
|
18
16
|
* 局部初始化 vxe-table 插件与配置
|
|
19
17
|
*/
|
|
20
|
-
export function initVxeTableInPage(enableExcel: boolean = false) {
|
|
18
|
+
export function initVxeTableInPage(enableExcel: boolean = false, enablePdf: boolean = false) {
|
|
21
19
|
// 设置语言
|
|
22
20
|
VxeUI.setI18n('zh-CN', zhCN)
|
|
23
21
|
VxeUI.setLanguage('zh-CN')
|
|
24
22
|
|
|
25
23
|
// 局部注册插件
|
|
26
24
|
VxeUI.use(VxeUIPluginRenderElement)
|
|
27
|
-
VxeUI.use(VxeUIPluginExportXLSX, { ExcelJS })
|
|
25
|
+
if (enableExcel) VxeUI.use(VxeUIPluginExportXLSX, { ExcelJS })
|
|
26
|
+
if (enablePdf) VxeUI.use(VxeUIPluginExportPDF, { jsPDF })
|
|
28
27
|
|
|
29
28
|
// 设置表格配置(可复制你在 VxeTableConfig.ts 中的配置)
|
|
30
29
|
VxeUI.setConfig({
|
|
@@ -38,25 +37,25 @@ export function initVxeTableInPage(enableExcel: boolean = false) {
|
|
|
38
37
|
showFooterOverflow: true,
|
|
39
38
|
cellConfig: {},
|
|
40
39
|
headerCellConfig: {
|
|
41
|
-
height: 41
|
|
40
|
+
height: 41,
|
|
42
41
|
},
|
|
43
42
|
resizeConfig: {
|
|
44
|
-
refreshDelay: 20
|
|
43
|
+
refreshDelay: 20,
|
|
45
44
|
},
|
|
46
45
|
resizableConfig: {
|
|
47
46
|
dragMode: 'auto',
|
|
48
47
|
showDragTip: false,
|
|
49
48
|
isSyncAutoHeight: true,
|
|
50
49
|
isSyncAutoWidth: true,
|
|
51
|
-
minHeight: 18
|
|
50
|
+
minHeight: 18,
|
|
52
51
|
},
|
|
53
52
|
columnDragConfig: {
|
|
54
53
|
showIcon: true,
|
|
55
54
|
showGuidesStatus: false,
|
|
56
|
-
showDragTip: false
|
|
55
|
+
showDragTip: false,
|
|
57
56
|
},
|
|
58
57
|
checkboxConfig: {
|
|
59
|
-
showHeader:true,
|
|
58
|
+
showHeader: true,
|
|
60
59
|
// trigger: 'default',
|
|
61
60
|
strict: true,
|
|
62
61
|
highlight: false,
|
|
@@ -68,7 +67,7 @@ export function initVxeTableInPage(enableExcel: boolean = false) {
|
|
|
68
67
|
autoPos: true,
|
|
69
68
|
message: 'inline',
|
|
70
69
|
msgMode: 'single',
|
|
71
|
-
theme: 'beautify'
|
|
70
|
+
theme: 'beautify',
|
|
72
71
|
},
|
|
73
72
|
columnConfig: {
|
|
74
73
|
maxFixedSize: 4,
|
|
@@ -76,13 +75,13 @@ export function initVxeTableInPage(enableExcel: boolean = false) {
|
|
|
76
75
|
},
|
|
77
76
|
tooltipConfig: {
|
|
78
77
|
enterable: true,
|
|
79
|
-
theme: 'light'
|
|
78
|
+
theme: 'light',
|
|
80
79
|
},
|
|
81
80
|
rowConfig: {
|
|
82
81
|
isCurrent: true,
|
|
83
82
|
},
|
|
84
83
|
footerCellConfig: {
|
|
85
|
-
height: 'unset'
|
|
84
|
+
height: 'unset',
|
|
86
85
|
},
|
|
87
86
|
// menuConfig: {
|
|
88
87
|
// visibleMethod () {}
|
|
@@ -102,14 +101,14 @@ export function initVxeTableInPage(enableExcel: boolean = false) {
|
|
|
102
101
|
mask: true,
|
|
103
102
|
lockView: true,
|
|
104
103
|
resize: true,
|
|
105
|
-
escClosable: true
|
|
104
|
+
escClosable: true,
|
|
106
105
|
},
|
|
107
106
|
drawerOptions: {
|
|
108
107
|
mask: true,
|
|
109
108
|
lockView: true,
|
|
110
109
|
escClosable: true,
|
|
111
|
-
resize: true
|
|
112
|
-
}
|
|
110
|
+
resize: true,
|
|
111
|
+
},
|
|
113
112
|
},
|
|
114
113
|
sortConfig: {
|
|
115
114
|
// remote: false,
|
|
@@ -119,14 +118,14 @@ export function initVxeTableInPage(enableExcel: boolean = false) {
|
|
|
119
118
|
showIcon: true,
|
|
120
119
|
allowClear: true,
|
|
121
120
|
allowBtn: true,
|
|
122
|
-
iconLayout: 'vertical'
|
|
121
|
+
iconLayout: 'vertical',
|
|
123
122
|
},
|
|
124
123
|
filterConfig: {
|
|
125
124
|
// remote: false,
|
|
126
125
|
// filterMethod: null,
|
|
127
126
|
// destroyOnClose: false,
|
|
128
127
|
// isEvery: false,
|
|
129
|
-
showIcon: true
|
|
128
|
+
showIcon: true,
|
|
130
129
|
},
|
|
131
130
|
treeConfig: {
|
|
132
131
|
rowField: 'id',
|
|
@@ -138,41 +137,41 @@ export function initVxeTableInPage(enableExcel: boolean = false) {
|
|
|
138
137
|
transform: true,
|
|
139
138
|
iconOpen: 'vxe-icon-square-minus',
|
|
140
139
|
iconClose: 'vxe-icon-square-plus',
|
|
141
|
-
showIcon: true
|
|
140
|
+
showIcon: true,
|
|
142
141
|
},
|
|
143
142
|
expandConfig: {
|
|
144
143
|
// trigger: 'default',
|
|
145
144
|
showIcon: true,
|
|
146
|
-
mode: 'fixed'
|
|
145
|
+
mode: 'fixed',
|
|
147
146
|
},
|
|
148
147
|
editConfig: {
|
|
149
148
|
// mode: 'cell',
|
|
150
149
|
showIcon: true,
|
|
151
150
|
showAsterisk: true,
|
|
152
|
-
autoFocus: true
|
|
151
|
+
autoFocus: true,
|
|
153
152
|
},
|
|
154
153
|
importConfig: {
|
|
155
154
|
_typeMaps: {
|
|
156
155
|
csv: 1,
|
|
157
156
|
html: 1,
|
|
158
157
|
xml: 1,
|
|
159
|
-
txt: 1
|
|
160
|
-
}
|
|
158
|
+
txt: 1,
|
|
159
|
+
},
|
|
161
160
|
},
|
|
162
161
|
exportConfig: {
|
|
163
162
|
_typeMaps: {
|
|
164
163
|
csv: 1,
|
|
165
164
|
html: 1,
|
|
166
165
|
xml: 1,
|
|
167
|
-
txt: 1
|
|
168
|
-
}
|
|
166
|
+
txt: 1,
|
|
167
|
+
},
|
|
169
168
|
},
|
|
170
169
|
printConfig: {},
|
|
171
170
|
mouseConfig: {
|
|
172
|
-
extension: true
|
|
171
|
+
extension: true,
|
|
173
172
|
},
|
|
174
173
|
keyboardConfig: {
|
|
175
|
-
isEsc: true
|
|
174
|
+
isEsc: true,
|
|
176
175
|
},
|
|
177
176
|
areaConfig: {
|
|
178
177
|
autoClear: true,
|
|
@@ -182,44 +181,44 @@ export function initVxeTableInPage(enableExcel: boolean = false) {
|
|
|
182
181
|
top: true,
|
|
183
182
|
left: true,
|
|
184
183
|
bottom: true,
|
|
185
|
-
right: true
|
|
186
|
-
}
|
|
184
|
+
right: true,
|
|
185
|
+
},
|
|
187
186
|
},
|
|
188
187
|
clipConfig: {
|
|
189
188
|
isCopy: true,
|
|
190
189
|
isCut: true,
|
|
191
|
-
isPaste: true
|
|
190
|
+
isPaste: true,
|
|
192
191
|
},
|
|
193
192
|
fnrConfig: {
|
|
194
193
|
isFind: true,
|
|
195
|
-
isReplace: true
|
|
194
|
+
isReplace: true,
|
|
196
195
|
},
|
|
197
196
|
virtualXConfig: {
|
|
198
197
|
enabled: true,
|
|
199
198
|
gt: 60,
|
|
200
199
|
preSize: 0,
|
|
201
|
-
oSize: 1
|
|
200
|
+
oSize: 1,
|
|
202
201
|
},
|
|
203
202
|
virtualYConfig: {
|
|
204
203
|
enabled: true,
|
|
205
204
|
gt: 100,
|
|
206
205
|
preSize: 1,
|
|
207
|
-
oSize: 2
|
|
206
|
+
oSize: 2,
|
|
208
207
|
},
|
|
209
208
|
scrollbarConfig: {
|
|
210
209
|
// width: 0,
|
|
211
210
|
// height: 0
|
|
212
|
-
}
|
|
211
|
+
},
|
|
213
212
|
},
|
|
214
213
|
grid: {
|
|
215
214
|
formConfig: {
|
|
216
|
-
enabled: true
|
|
215
|
+
enabled: true,
|
|
217
216
|
},
|
|
218
217
|
pagerConfig: {
|
|
219
|
-
enabled: true
|
|
218
|
+
enabled: true,
|
|
220
219
|
},
|
|
221
220
|
toolbarConfig: {
|
|
222
|
-
enabled: true
|
|
221
|
+
enabled: true,
|
|
223
222
|
},
|
|
224
223
|
columnConfig: {
|
|
225
224
|
maxFixedSize: 4,
|
|
@@ -234,16 +233,15 @@ export function initVxeTableInPage(enableExcel: boolean = false) {
|
|
|
234
233
|
list: null,
|
|
235
234
|
result: 'result',
|
|
236
235
|
total: 'page.total',
|
|
237
|
-
message: 'message'
|
|
238
|
-
}
|
|
239
|
-
}
|
|
236
|
+
message: 'message',
|
|
237
|
+
},
|
|
238
|
+
},
|
|
240
239
|
},
|
|
241
|
-
toolbar: {
|
|
242
|
-
}
|
|
240
|
+
toolbar: {},
|
|
243
241
|
})
|
|
244
242
|
}
|
|
245
243
|
|
|
246
244
|
// 导出组件供子应用局部注册
|
|
247
245
|
export const components = {
|
|
248
|
-
VxeGrid
|
|
246
|
+
VxeGrid,
|
|
249
247
|
}
|