adtec-core-package 2.9.7 → 2.9.8
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 +1 -1
- package/src/api/workflow/workflowCommentApi.ts +5 -2
- package/src/components/upload/FileView.vue +22 -18
- package/src/components/workflow/components/AddOrMinusMultiDialog.vue +17 -2
- package/src/components/workflow/components/CheckDialog.vue +3 -0
- package/src/components/workflow/components/ProcessInstanceStep.vue +17 -2
package/package.json
CHANGED
|
@@ -17,7 +17,10 @@ export default {
|
|
|
17
17
|
addOrEditComment(tpReviewBatch: ITpReviewBatch) {
|
|
18
18
|
return request.post<ITpReviewBatch>('/api/tm/tpApplyCheck/updateBatchInfo', tpReviewBatch)
|
|
19
19
|
},
|
|
20
|
-
getBatchInfo(tpApplyId: string) {
|
|
21
|
-
return request.get<ITpReviewBatch>('/api/tm/tpApplyCheck/getBatchInfo', { tpApplyId })
|
|
20
|
+
getBatchInfo(tpApplyId: string, batchPrefer: 'max' | 'min' = 'max') {
|
|
21
|
+
return request.get<ITpReviewBatch>('/api/tm/tpApplyCheck/getBatchInfo', { tpApplyId, batchPrefer })
|
|
22
|
+
},
|
|
23
|
+
getBatchInfoByTaskId(taskId: string) {
|
|
24
|
+
return request.get<ITpReviewBatch>('/api/tm/tpApplyCheck/getBatchInfoByTaskId', { taskId })
|
|
22
25
|
},
|
|
23
26
|
}
|
|
@@ -115,27 +115,31 @@ const title = useVModel(props, 'title', emit)
|
|
|
115
115
|
const fileId = useVModel(props, 'fileId', emit)
|
|
116
116
|
const url = useVModel(props, 'url', emit)
|
|
117
117
|
const edit = useVModel(props, 'edit', emit)
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
return '
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return '
|
|
118
|
+
|
|
119
|
+
const resolveFileExt = (type?: string, name?: string, fileUrl?: string) => {
|
|
120
|
+
const normalizedType = (type || '').toLowerCase().replace(/^\./, '')
|
|
121
|
+
if (normalizedType) {
|
|
122
|
+
return normalizedType === 'doc' ? 'docx' : normalizedType
|
|
123
|
+
}
|
|
124
|
+
const fromName = (name || '').match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase()
|
|
125
|
+
if (fromName) {
|
|
126
|
+
return fromName === 'doc' ? 'docx' : fromName
|
|
127
127
|
}
|
|
128
|
+
const urlStr = (fileUrl || '').toLowerCase()
|
|
129
|
+
if (urlStr.includes('.docx') || urlStr.includes('.doc')) return 'docx'
|
|
130
|
+
if (urlStr.includes('.pdf')) return 'pdf'
|
|
131
|
+
if (urlStr.includes('.xlsx') || urlStr.includes('.xls')) return 'xlsx'
|
|
132
|
+
if (urlStr.includes('.pptx') || urlStr.includes('.ppt')) return 'pptx'
|
|
133
|
+
return ''
|
|
128
134
|
}
|
|
135
|
+
|
|
136
|
+
const getFileType = () => resolveFileExt(undefined, title.value, url.value)
|
|
129
137
|
const getDocumentType = () => {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
return 'cell'
|
|
136
|
-
} else if ((url.value + '').indexOf('.pptx') !== -1 || (url.value + '').indexOf('.pptx') !== -1) {
|
|
137
|
-
return 'slide'
|
|
138
|
-
}
|
|
138
|
+
const ext = getFileType()
|
|
139
|
+
if (ext === 'docx' || ext === 'doc') return 'word'
|
|
140
|
+
if (ext === 'pdf') return 'pdf'
|
|
141
|
+
if (ext === 'xlsx' || ext === 'xls') return 'cell'
|
|
142
|
+
if (ext === 'pptx' || ext === 'ppt') return 'slide'
|
|
139
143
|
}
|
|
140
144
|
const download= async ()=>{
|
|
141
145
|
try{
|
|
@@ -54,6 +54,7 @@ import { ElMessage } from 'element-plus'
|
|
|
54
54
|
import { userInfoStore } from '../../../stores/userInfoStore'
|
|
55
55
|
import type { ISysUserInfo } from '../../../interface/ISysUserInfo'
|
|
56
56
|
import frameworkUtils from '../../../utils/FrameworkUtils.ts'
|
|
57
|
+
const emit = defineEmits<{ success: [] }>()
|
|
57
58
|
const userInfo = userInfoStore()
|
|
58
59
|
const data = ref<IWfTaskUsersVo>({
|
|
59
60
|
assignee: [],
|
|
@@ -81,6 +82,11 @@ const open = async (taskId: string, type: string) => {
|
|
|
81
82
|
data.value = { ...(await workflowInstApi.getTaskCandidate(taskId)), assignee: [] }
|
|
82
83
|
//设置当前的审批人
|
|
83
84
|
defaultAssignee.value = data.value.candidate?.map((e:ISysUserInfo) => e.id!) || []
|
|
85
|
+
if (type === 'minusMulti' && defaultAssignee.value.length <= 1) {
|
|
86
|
+
ElMessage.warning('至少需保留一名审核人,当前仅剩一名审核人,无法减签')
|
|
87
|
+
dialogVisible.value = false
|
|
88
|
+
return
|
|
89
|
+
}
|
|
84
90
|
data.value.assignee = [...defaultAssignee.value]
|
|
85
91
|
} catch (err: any) {
|
|
86
92
|
frameworkUtils.messageError(err)
|
|
@@ -122,18 +128,26 @@ const disableFunc = (val: string) => {
|
|
|
122
128
|
}
|
|
123
129
|
}
|
|
124
130
|
const save = async () => {
|
|
125
|
-
if (data.value.candidate?.length == 0
|
|
131
|
+
if (data.value.candidate?.length == 0) {
|
|
126
132
|
ElMessage.warning('请指定执行人!')
|
|
127
133
|
return
|
|
128
134
|
}
|
|
129
135
|
//加签逻辑判断
|
|
130
136
|
if (dialogType.value === 'addMulti') {
|
|
137
|
+
if (data.value.assignee.length == 0) {
|
|
138
|
+
ElMessage.warning('请指定执行人!')
|
|
139
|
+
return
|
|
140
|
+
}
|
|
131
141
|
if (data.value.assignee.length <= defaultAssignee.value.length) {
|
|
132
142
|
ElMessage.warning('加签必须选择非原审批人!')
|
|
133
143
|
return
|
|
134
144
|
}
|
|
135
145
|
} else if (dialogType.value === 'minusMulti') {
|
|
136
|
-
|
|
146
|
+
//减签逻辑判断:至少保留一名审核人
|
|
147
|
+
if (data.value.assignee.length < 1) {
|
|
148
|
+
ElMessage.warning('至少需保留一名审核人')
|
|
149
|
+
return
|
|
150
|
+
}
|
|
137
151
|
if (data.value.assignee.length >= defaultAssignee.value.length) {
|
|
138
152
|
ElMessage.warning('减签必须取消选中原审批人!')
|
|
139
153
|
return
|
|
@@ -145,6 +159,7 @@ const save = async () => {
|
|
|
145
159
|
await workflowInstApi.addOrMinusAssignee(data.value)
|
|
146
160
|
ElMessage.success('操作成功')
|
|
147
161
|
dialogVisible.value = false
|
|
162
|
+
emit('success')
|
|
148
163
|
} catch (err: any) {
|
|
149
164
|
frameworkUtils.messageError(err)
|
|
150
165
|
} finally {
|
|
@@ -201,6 +201,9 @@ const open = async (
|
|
|
201
201
|
//转办
|
|
202
202
|
dialogLabel.value = '转办原因'
|
|
203
203
|
dialogTitle.value = '转办审批'
|
|
204
|
+
// 每次打开转办弹窗清空原因与转办人,避免复用 taskVo 上次的审批/转办意见
|
|
205
|
+
task.value.comment = ''
|
|
206
|
+
transferUser.value = { id: '', userName: '' }
|
|
204
207
|
}
|
|
205
208
|
loading.value = false
|
|
206
209
|
}
|
|
@@ -220,13 +220,28 @@ const getStatus = (task: IWfTaskVo) => {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
const compParam = ref()
|
|
223
|
+
const resolveReviewBatch = async (task: IWfTaskVo) => {
|
|
224
|
+
if (task.taskId) {
|
|
225
|
+
const byTask = await workflowcommentApi.getBatchInfoByTaskId(task.taskId)
|
|
226
|
+
if (byTask?.revMeetingId) {
|
|
227
|
+
return byTask
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
const batchPrefer = task.taskName === '专家会审(答辩)' ? 'max' : 'min'
|
|
231
|
+
return workflowcommentApi.getBatchInfo(task.businessId ?? '', batchPrefer)
|
|
232
|
+
}
|
|
223
233
|
const viewDetail = async (task: IWfTaskVo) => {
|
|
224
234
|
if (task.taskName === '专家评审' || task.taskName === '专家会审(答辩)') {
|
|
225
|
-
|
|
226
|
-
|
|
235
|
+
const batchInfo = await resolveReviewBatch(task)
|
|
236
|
+
if (!batchInfo?.revMeetingId) {
|
|
237
|
+
ElMessage.warning('暂无评审详情')
|
|
238
|
+
return
|
|
239
|
+
}
|
|
227
240
|
const taskInfo = {
|
|
228
241
|
businessId: batchInfo.revMeetingId + '_' + (task.businessId ?? ''),
|
|
229
242
|
nodeTag: 'TECPM:/src/views/meetingHost/componets/comp.viewResult.vue',
|
|
243
|
+
nodeParam: batchInfo.reviewType ?? '10',
|
|
244
|
+
taskName: task.taskName,
|
|
230
245
|
}
|
|
231
246
|
await showTodoDialog(ref(taskInfo as IWfTaskVo), compParam)
|
|
232
247
|
} else {
|