adtec-core-package 2.4.2 → 2.4.3
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
CHANGED
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
style="border-radius: var(--el-border-radius-base); background: #ffffff"
|
|
10
10
|
v-loading="loading"
|
|
11
11
|
>
|
|
12
|
-
<el-title
|
|
12
|
+
<el-title
|
|
13
|
+
v-if="showTitle"
|
|
14
|
+
title="流程详情"
|
|
15
|
+
level="1"
|
|
16
|
+
style="padding-left: 8px; border-bottom: var(--border)"
|
|
17
|
+
>
|
|
13
18
|
</el-title>
|
|
14
19
|
<el-flex height="100px" v-if="showDescriptions">
|
|
15
20
|
<el-descriptions
|
|
@@ -24,29 +29,35 @@
|
|
|
24
29
|
<span>{{ data?.procDefName }}</span>
|
|
25
30
|
</el-descriptions-item>
|
|
26
31
|
<el-descriptions-item width="25%" label-width="25%" label="流程发起人">{{
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
data?.startUserName
|
|
33
|
+
}}</el-descriptions-item>
|
|
29
34
|
<el-descriptions-item label-width="25%" width="25%" label="流程创建时间">{{
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
data?.procStartTime
|
|
36
|
+
}}</el-descriptions-item>
|
|
32
37
|
<el-descriptions-item label-width="25%" width="25%" label="流程结束时间">{{
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
data?.procEndTime
|
|
39
|
+
}}</el-descriptions-item>
|
|
35
40
|
</el-descriptions>
|
|
36
41
|
</el-flex>
|
|
37
42
|
<el-flex>
|
|
38
43
|
<el-tabs v-model="activeName" style="width: 100%; height: 100%; padding: 0 8px 8px">
|
|
39
44
|
<el-tab-pane label="审批记录" name="0" style="height: 100%">
|
|
40
45
|
<template #label>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
<span style="display: flex; align-items: center">
|
|
47
|
+
<el-icons model-value="adtec-ar" style="margin-right: 5px" />
|
|
48
|
+
<span>审批记录</span>
|
|
49
|
+
</span>
|
|
45
50
|
</template>
|
|
46
51
|
<div v-show="isEmpty" class="el-table__empty-block">
|
|
47
52
|
<span class="el-table__empty-text">暂无数据</span>
|
|
48
53
|
</div>
|
|
49
|
-
<process-instance-step
|
|
54
|
+
<process-instance-step
|
|
55
|
+
@view-detail="viewDetail"
|
|
56
|
+
:source="source"
|
|
57
|
+
v-show="!isEmpty"
|
|
58
|
+
style="padding-top: 10px"
|
|
59
|
+
ref="stepRef"
|
|
60
|
+
></process-instance-step>
|
|
50
61
|
</el-tab-pane>
|
|
51
62
|
<el-tab-pane label="流程步骤" name="1" style="height: 100%">
|
|
52
63
|
<template #label>
|
|
@@ -86,7 +97,7 @@ const props = withDefaults(
|
|
|
86
97
|
businessId: undefined,
|
|
87
98
|
showTitle: false,
|
|
88
99
|
showDescriptions: false,
|
|
89
|
-
source: ''
|
|
100
|
+
source: '',
|
|
90
101
|
},
|
|
91
102
|
)
|
|
92
103
|
const emit = defineEmits(['viewDetail'])
|
|
@@ -102,7 +113,7 @@ const open = async () => {
|
|
|
102
113
|
data.value = props.task
|
|
103
114
|
loading.value = true
|
|
104
115
|
bpmnRef.value?.init(props.task.procDefKey, props.task.procInsId)
|
|
105
|
-
stepRef.value?.init(props.task.procDefKey,props.task.procInsId)
|
|
116
|
+
stepRef.value?.init(props.task.procDefKey, props.task.procInsId)
|
|
106
117
|
} catch (err: any) {
|
|
107
118
|
frameworkUtils.messageError(err)
|
|
108
119
|
} finally {
|
|
@@ -115,7 +126,7 @@ const open = async () => {
|
|
|
115
126
|
data.value = await workflowInstApi.getWfTaskByBusinessId(props.businessId)
|
|
116
127
|
if (data.value.procDefKey && data.value.procInsId) {
|
|
117
128
|
bpmnRef.value?.init(data.value.procDefKey, data.value.procInsId)
|
|
118
|
-
stepRef.value?.init(data.value.procDefKey,data.value.procInsId)
|
|
129
|
+
stepRef.value?.init(data.value.procDefKey, data.value.procInsId)
|
|
119
130
|
} else {
|
|
120
131
|
ElMessage.warning('流程信息缺失!')
|
|
121
132
|
}
|
|
@@ -134,16 +145,13 @@ const viewDetail = (task: IWfTaskVo) => {
|
|
|
134
145
|
emit('viewDetail', task)
|
|
135
146
|
}
|
|
136
147
|
watch(
|
|
137
|
-
[
|
|
138
|
-
() => props.task?.procInsId,
|
|
139
|
-
() => props.businessId
|
|
140
|
-
],
|
|
148
|
+
[() => props.task?.procInsId, () => props.businessId],
|
|
141
149
|
([newProcInsId, newBusinessId]) => {
|
|
142
150
|
if (newProcInsId || newBusinessId) {
|
|
143
|
-
open()
|
|
151
|
+
open()
|
|
144
152
|
}
|
|
145
153
|
},
|
|
146
|
-
{ immediate: true } // 若不需要在组件挂载时立即触发,可以设置为 false
|
|
147
|
-
)
|
|
154
|
+
{ immediate: true }, // 若不需要在组件挂载时立即触发,可以设置为 false
|
|
155
|
+
)
|
|
148
156
|
</script>
|
|
149
157
|
<style scoped lang="scss"></style>
|
|
@@ -100,7 +100,7 @@ const open = async () => {
|
|
|
100
100
|
data.value = props.task
|
|
101
101
|
loading.value = true
|
|
102
102
|
bpmnRef.value?.init(props.task.procDefKey, props.task.procInsId)
|
|
103
|
-
stepRef.value?.init(props.task.procDefKey,props.task.procInsId)
|
|
103
|
+
stepRef.value?.init(props.task.procDefKey, props.task.procInsId)
|
|
104
104
|
} catch (err: any) {
|
|
105
105
|
frameworkUtils.messageError(err)
|
|
106
106
|
} finally {
|
|
@@ -25,8 +25,8 @@ const props = withDefaults(
|
|
|
25
25
|
}>(),
|
|
26
26
|
{
|
|
27
27
|
procInstId: '',
|
|
28
|
-
source: ''
|
|
29
|
-
}
|
|
28
|
+
source: ''
|
|
29
|
+
}
|
|
30
30
|
)
|
|
31
31
|
const emit = defineEmits(['viewDetail'])
|
|
32
32
|
const loading = ref<boolean>(false)
|
|
@@ -60,7 +60,7 @@ const init = async (procDefId: string, procInstId: string) => {
|
|
|
60
60
|
.getUpLoadFilesByBussinessIds(
|
|
61
61
|
wfProcessInstVo.value.hisTasks
|
|
62
62
|
.filter((item) => item.comment !== '***' && item.taskDefKey !== 'tech_approval')
|
|
63
|
-
.map((item) => item.taskId)
|
|
63
|
+
.map((item) => item.taskId)
|
|
64
64
|
)
|
|
65
65
|
.then((res) => {
|
|
66
66
|
taskFiles.value = res
|
|
@@ -81,24 +81,28 @@ const init = async (procDefId: string, procInstId: string) => {
|
|
|
81
81
|
if (taskGroup.value.length) {
|
|
82
82
|
// 判断taskGroup.value中的专家预审的位置index
|
|
83
83
|
const expertPretrialIndex = taskGroup.value.findIndex(
|
|
84
|
-
(item) => item.taskName === '专家预审'
|
|
84
|
+
(item) => item.taskName === '专家预审'
|
|
85
85
|
)
|
|
86
86
|
if (expertPretrialIndex !== -1) {
|
|
87
|
+
debugger
|
|
87
88
|
//判断是否是最后一个节点
|
|
88
|
-
if (expertPretrialIndex < taskGroup.value.length - 1) {
|
|
89
|
+
if (expertPretrialIndex < taskGroup.value.length - 1 || wfProcessInstVo.value?.activeTasks?.length === 0) {
|
|
89
90
|
//拿到专家预审节点
|
|
90
91
|
const expertPretrialTask = taskGroup.value[expertPretrialIndex]
|
|
91
92
|
//获取保存的评论
|
|
92
93
|
techComment.value = await workflowcommentApi.getComment(
|
|
93
94
|
expertPretrialTask.tasks[0].businessId,
|
|
94
|
-
expertPretrialTask.tasks[0].taskId
|
|
95
|
+
expertPretrialTask.tasks[0].taskId
|
|
95
96
|
)
|
|
96
97
|
// 拼接expertPretrialTask 的 tasks里面的所有 comment
|
|
97
|
-
|
|
98
|
+
let allComment = expertPretrialTask.tasks
|
|
98
99
|
.map((task) => task.comment)
|
|
99
100
|
.filter((comment) => comment)
|
|
100
101
|
.join('\n')
|
|
101
|
-
|
|
102
|
+
if (!(userInfo.getUserInfo.roleCodes?.includes('PMRole') ||
|
|
103
|
+
userInfo.getUserInfo.roleCodes?.includes('TMRole'))) {
|
|
104
|
+
allComment = undefined
|
|
105
|
+
}
|
|
102
106
|
//此时说明预审已经完成,在其后增加一个新数组
|
|
103
107
|
taskGroup.value.splice(expertPretrialIndex + 1, 0, {
|
|
104
108
|
taskName: '科技管理室汇总',
|
|
@@ -111,12 +115,12 @@ const init = async (procDefId: string, procInstId: string) => {
|
|
|
111
115
|
parentExecutionId: expertPretrialTask.parentExecutionId,
|
|
112
116
|
businessId: expertPretrialTask.tasks[0].businessId,
|
|
113
117
|
createTime: expertPretrialTask.createTime,
|
|
114
|
-
finishTime: expertPretrialTask.finishTime,
|
|
118
|
+
finishTime: techComment.value?.techComment ? expertPretrialTask.finishTime : undefined,
|
|
115
119
|
assigneeName: '科技管理员',
|
|
116
120
|
comment: techComment.value?.techComment || allComment,
|
|
117
|
-
commentList: [{ type: 1 }]
|
|
118
|
-
}
|
|
119
|
-
]
|
|
121
|
+
commentList: [{ type: techComment.value?.techComment ? 1 : 0 }]
|
|
122
|
+
}
|
|
123
|
+
]
|
|
120
124
|
})
|
|
121
125
|
}
|
|
122
126
|
}
|
|
@@ -134,7 +138,7 @@ const setTaskGroup = (tasks: IWfTaskVo[]) => {
|
|
|
134
138
|
for (const hisTask of tasks) {
|
|
135
139
|
const exist = taskGroup.value.find(
|
|
136
140
|
(x) =>
|
|
137
|
-
x.taskDefKey === hisTask.taskDefKey && x.parentExecutionId === hisTask.parentExecutionId
|
|
141
|
+
x.taskDefKey === hisTask.taskDefKey && x.parentExecutionId === hisTask.parentExecutionId
|
|
138
142
|
)
|
|
139
143
|
if (exist) {
|
|
140
144
|
if (hisTask.finishTime && hisTask.finishTime > exist.finishTime) {
|
|
@@ -160,14 +164,14 @@ const setTaskGroup = (tasks: IWfTaskVo[]) => {
|
|
|
160
164
|
parentExecutionId: hisTask.parentExecutionId || '',
|
|
161
165
|
finishTime: hisTask.finishTime || '',
|
|
162
166
|
createTime: hisTask.createTime || '',
|
|
163
|
-
tasks: [hisTask]
|
|
167
|
+
tasks: [hisTask]
|
|
164
168
|
})
|
|
165
169
|
}
|
|
166
170
|
}
|
|
167
171
|
if (taskGroup.value.length > 0) {
|
|
168
172
|
taskGroup.value.sort((a, b) => {
|
|
169
173
|
const n1 = (a.finishTime ? a.finishTime : '9999').localeCompare(
|
|
170
|
-
b.finishTime ? b.finishTime : '9999'
|
|
174
|
+
b.finishTime ? b.finishTime : '9999'
|
|
171
175
|
)
|
|
172
176
|
if (n1 == 0) {
|
|
173
177
|
return a.createTime.localeCompare(b.createTime)
|
|
@@ -189,7 +193,7 @@ const getStatus = (task: IWfTaskVo) => {
|
|
|
189
193
|
if (task.commentList && task.commentList.length > 0) {
|
|
190
194
|
return ['待办', '已办', '已办', '终止', '委派', '转办', '终止', '撤回'][
|
|
191
195
|
Number(task.commentList[task.commentList.length - 1].type)
|
|
192
|
-
|
|
196
|
+
]
|
|
193
197
|
}
|
|
194
198
|
return ''
|
|
195
199
|
}
|
|
@@ -201,7 +205,7 @@ const saveComment = async (taskInfo: IWfTaskVo) => {
|
|
|
201
205
|
const confirm = await ElMessageBox.confirm('您确定保存数据?', '提示', {
|
|
202
206
|
confirmButtonText: '确定',
|
|
203
207
|
cancelButtonText: '取消',
|
|
204
|
-
type: 'warning'
|
|
208
|
+
type: 'warning'
|
|
205
209
|
})
|
|
206
210
|
if (!confirm) {
|
|
207
211
|
return
|
|
@@ -211,7 +215,7 @@ const saveComment = async (taskInfo: IWfTaskVo) => {
|
|
|
211
215
|
techComment.value = await workflowcommentApi.addOrEditComment({
|
|
212
216
|
...techComment.value,
|
|
213
217
|
...taskInfo,
|
|
214
|
-
...{ techComment: taskInfo.comment }
|
|
218
|
+
...{ techComment: taskInfo.comment }
|
|
215
219
|
})
|
|
216
220
|
ElMessage.success('保存成功')
|
|
217
221
|
} catch (err) {
|
|
@@ -221,7 +225,7 @@ const saveComment = async (taskInfo: IWfTaskVo) => {
|
|
|
221
225
|
}
|
|
222
226
|
}
|
|
223
227
|
defineExpose({
|
|
224
|
-
init
|
|
228
|
+
init
|
|
225
229
|
})
|
|
226
230
|
</script>
|
|
227
231
|
|
|
@@ -260,7 +264,8 @@ defineExpose({
|
|
|
260
264
|
:style="{ width: task.taskDefKey === 'tech_approval' ? '100%' : '31%' }"
|
|
261
265
|
>
|
|
262
266
|
<el-flex height="30px" align="center" justify="space-between">
|
|
263
|
-
<
|
|
267
|
+
<el-auto-tool-tip :content="task.taskName">
|
|
268
|
+
</el-auto-tool-tip>
|
|
264
269
|
<div style="display: inline-flex; align-items: center; gap: 8px">
|
|
265
270
|
<el-icon-btn
|
|
266
271
|
v-if="
|
|
@@ -273,7 +278,7 @@ defineExpose({
|
|
|
273
278
|
@click="saveComment(task)"
|
|
274
279
|
/>
|
|
275
280
|
<el-tag :type="task.finishTime ? 'success' : 'primary'" size="small"
|
|
276
|
-
|
|
281
|
+
>{{ getStatus(task) }}
|
|
277
282
|
</el-tag>
|
|
278
283
|
</div>
|
|
279
284
|
</el-flex>
|
|
@@ -303,7 +308,6 @@ defineExpose({
|
|
|
303
308
|
tip="查看详情"
|
|
304
309
|
v-if="
|
|
305
310
|
task.taskName === '专家预审' &&
|
|
306
|
-
source === 'showDetail' &&
|
|
307
311
|
task.comment &&
|
|
308
312
|
task.comment !== '***'
|
|
309
313
|
"
|
|
@@ -324,8 +328,8 @@ defineExpose({
|
|
|
324
328
|
</el-flex>
|
|
325
329
|
|
|
326
330
|
<span style="display: block; color: #909399" v-if="task.comment">{{
|
|
327
|
-
|
|
328
|
-
|
|
331
|
+
task.finishTime?.substring(0, 19)
|
|
332
|
+
}}</span>
|
|
329
333
|
</el-flex>
|
|
330
334
|
</el-flex>
|
|
331
335
|
</template>
|