adtec-core-package 2.6.2 → 2.6.4

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adtec-core-package",
3
- "version": "2.6.2",
3
+ "version": "2.6.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -17,4 +17,7 @@ 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 })
22
+ },
20
23
  }
@@ -69,4 +69,7 @@ export default {
69
69
  getProcessTaskList(processInstId: string) {
70
70
  return request.get<IWfProcessInstVo>('/api/workflow/workbench/process/' + processInstId)
71
71
  },
72
+ getWfProcessInstByBusinessId(businessId: string) {
73
+ return request.get<IWfTaskVo>(baseUrl + '/getUserTaskInfo', { businessId })
74
+ },
72
75
  }
@@ -11,14 +11,15 @@
11
11
  params?.cancelBtnText ?? '取消'
12
12
  }}
13
13
  </el-button>
14
- <el-button v-if="showProcessBtn && task?.taskId" type="info" :loading="butLoading || taskLoading" @click="processShow = true">
14
+ <el-button v-if="showProcessBtn && task?.procInsId" type="info" :loading="butLoading || taskLoading"
15
+ @click="processShow = true">
15
16
  流程详情
16
17
  </el-button>
17
18
  <template v-if="isAssignee">
18
19
  <el-button type="primary" :loading="butLoading || taskLoading" @click="openDialog('assignee')">指定执行人
19
20
  </el-button>
20
21
  </template>
21
- <template v-if="!isAssignee && task?.taskId && task?.operations">
22
+ <template v-if="!isAssignee && task?.taskId && task?.operations && showOperationsBtn">
22
23
  <el-button :loading="butLoading || taskLoading" v-if="params?.saveBtnText" type="primary"
23
24
  @click="params?.saveFunction">{{
24
25
  params?.saveBtnText
@@ -112,10 +113,12 @@ const processShow = ref(false)
112
113
  const taskFlexRef = ref<HTMLElement | null>(null)
113
114
  const $props = defineProps({
114
115
  // modelValue: { type: Object, required: false },
115
- taskId: { type: String, required: true },
116
+ taskId: { type: String, required: false },
116
117
  showProcessBtn: { type: Boolean, required: false, default: false },
117
118
  butLoading: { type: Boolean, required: false, default: false },
118
- params: { type: Object as PropType<ITaskOperate>, required: false }
119
+ params: { type: Object as PropType<ITaskOperate>, required: false },
120
+ taskInfo: { type: Object as PropType<IWfTaskVo>, required: false },
121
+ showOperationsBtn: { type: Boolean, required: false, default: true },
119
122
  })
120
123
 
121
124
  const emit = defineEmits(['success'])
@@ -240,7 +243,13 @@ const loadEnd = () => {
240
243
  // loading.close()
241
244
  }
242
245
  const reloadTask = async () => {
243
- if ($props.taskId) {
246
+ if ($props.taskInfo) {
247
+ task.value = $props.taskInfo
248
+ if (task.value.finishTime) {
249
+ // ElMessage.info('该待办已完成!')
250
+ console.log('该待办已完成!')
251
+ }
252
+ } else if ($props.taskId) {
244
253
  try {
245
254
  loadStart()
246
255
  task.value = await workflowInstApi.getTaskInst($props.taskId)
@@ -16,7 +16,7 @@ import frameworkUtils from '../../../utils/FrameworkUtils.ts'
16
16
  import workflowApi from '../../../api/workflow/workflow'
17
17
  import type { SysWorkflowVerType } from '../../../interface/workflow/workflow'
18
18
  import { userInfoStore } from '../../../stores/userInfoStore'
19
-
19
+ import { showTodoDialog } from '../../../hooks/workflowTodo2'
20
20
  const userInfo = userInfoStore()
21
21
  const props = withDefaults(
22
22
  defineProps<{
@@ -82,9 +82,11 @@ const init = async (procDefId: string, procInstId: string) => {
82
82
  ) {
83
83
  //调整显示
84
84
  if (taskGroup.value.length) {
85
- const find = taskGroup.value.find(item => item.parentExecutionId === 'node_c9zht:2025-11-19 15:44:56')
85
+ const find = taskGroup.value.find(
86
+ (item) => item.parentExecutionId === 'node_c9zht:2025-11-19 15:44:56',
87
+ )
86
88
  if (find) {
87
- const task = find.tasks.filter(item => item.businessId === '1963833051911258114')
89
+ const task = find.tasks.filter((item) => item.businessId === '1963833051911258114')
88
90
  task[0].comment = ''
89
91
  task[0].finishTime = undefined
90
92
  find.tasks = task
@@ -217,8 +219,19 @@ const getStatus = (task: IWfTaskVo) => {
217
219
  return ''
218
220
  }
219
221
  }
220
- const viewDetail = (taskInfo: IWfTaskVo) => {
221
- emit('viewDetail', taskInfo)
222
+ const compParam = ref()
223
+ const viewDetail = async (task: IWfTaskVo) => {
224
+ if (task.taskName === '专家评审' || task.taskName === '专家会审(答辩)') {
225
+ //获取第二批次信息
226
+ const batchInfo = await workflowcommentApi.getBatchInfo(task.businessId ?? '')
227
+ const taskInfo = {
228
+ businessId: batchInfo.revMeetingId + '_' + (task.businessId ?? ''),
229
+ nodeTag: 'TECPM:/src/views/meetingHost/componets/comp.viewResult.vue',
230
+ }
231
+ await showTodoDialog(ref(taskInfo as IWfTaskVo), compParam)
232
+ } else {
233
+ await showTodoDialog(ref(task), compParam)
234
+ }
222
235
  }
223
236
  const saveComment = async (taskInfo: IWfTaskVo) => {
224
237
  const confirm = await ElMessageBox.confirm('您确定保存数据?', '提示', {
@@ -255,107 +268,106 @@ defineExpose({
255
268
  :key="item.parentExecutionId"
256
269
  :status="item.tasks.find((x) => !x.finishTime) ? 'finish' : 'success'"
257
270
  >
258
- <!-- <template #icon>-->
259
- <!-- <flow-icon :name="getIcon(item.tasks)" :size="20" />-->
260
- <!-- </template>-->
261
271
  <template #title>
262
272
  <span style="display: block">{{ item.taskName }}</span>
263
273
  </template>
264
274
  <template #description>
265
- <el-flex
266
- :vertical="false"
267
- style="max-width: 100%; min-width: 180px; min-height: 60px"
268
- justify="flex-start"
269
- >
270
- <!-- width="170px"-->
271
- <el-flex
272
- :vertical="true"
273
- v-for="task in item.tasks"
274
- :key="task.taskId"
275
- style="
276
- margin-bottom: 5px;
277
- padding: 5px;
278
- margin-right: 5px;
279
- border-radius: 8px;
280
- background: #f8f8f8;
281
- "
282
- :style="{
283
- width: task.taskDefKey === 'tech_approval' ? '100%' : '31%',
284
- border: task.taskId === taskId ? '1px solid var(--el-color-primary)' : '',
285
- }"
286
- >
287
- <el-flex height="30px" align="center" justify="space-between">
288
- <el-auto-tool-tip :content="task.assigneeName"></el-auto-tool-tip>
289
- <div style="display: inline-flex; align-items: center; gap: 8px">
290
- <el-icon-btn
291
- v-if="
292
- task.taskDefKey === 'tech_approval' &&
293
- (userInfo.getUserInfo.roleCodes?.includes('PMRole') ||
294
- userInfo.getUserInfo.roleCodes?.includes('TMRole'))
295
- "
296
- model-value="adtec-save"
297
- tip="保存"
298
- @click="saveComment(task)"
299
- />
300
- <el-tag :type="task.finishTime ? 'success' : 'primary'" size="small"
301
- >{{ getStatus(task) }}
302
- </el-tag>
303
- </div>
304
- </el-flex>
275
+ <div style="width: 100%">
276
+ <div style="display: flex; flex-wrap: wrap; gap: 8px; width: 100%">
305
277
  <div
278
+ v-for="task in item.tasks"
279
+ :key="task.taskId"
306
280
  style="
307
- display: flex;
308
- justify-items: center;
309
- align-items: center;
310
- justify-content: space-between;
311
- width: 100%;
281
+ flex: 1 1 calc(33.333% - 8px);
282
+ min-width: calc(33.333% - 8px);
283
+ margin-bottom: 5px;
284
+ padding: 5px;
285
+ border-radius: 8px;
286
+ background: #f8f8f8;
312
287
  "
288
+ :style="{
289
+ border: task.taskId === taskId ? '1px solid var(--el-color-primary)' : '',
290
+ flex:
291
+ task.taskDefKey === 'tech_approval' ? '1 1 100%' : '1 1 calc(33.333% - 8px)',
292
+ // 修正calc表达式:用模板字符串包裹,变量正确拼接
293
+ minWidth:
294
+ task.taskDefKey === 'tech_approval'
295
+ ? '100%'
296
+ : `calc((100% - 16px) / max(3, ${item.tasks.length}))`,
297
+ }"
313
298
  >
314
- <el-input
315
- v-if="
316
- ver?.version === 4 &&
317
- task.taskDefKey === 'tech_approval' &&
318
- (userInfo.getUserInfo.roleCodes?.includes('PMRole') ||
319
- userInfo.getUserInfo.roleCodes?.includes('TMRole'))
299
+ <!-- 内部内容保持不变 -->
300
+ <el-flex height="30px" align="center" justify="space-between">
301
+ <el-auto-tool-tip :content="task.assigneeName"></el-auto-tool-tip>
302
+ <div style="display: inline-flex; align-items: center; gap: 8px">
303
+ <el-icon-btn
304
+ v-if="
305
+ task.taskDefKey === 'tech_approval' &&
306
+ (userInfo.getUserInfo.roleCodes?.includes('PMRole') ||
307
+ userInfo.getUserInfo.roleCodes?.includes('TMRole'))
308
+ "
309
+ model-value="adtec-save"
310
+ tip="保存"
311
+ @click="saveComment(task)"
312
+ />
313
+ <el-tag :type="task.finishTime ? 'success' : 'primary'" size="small">
314
+ {{ getStatus(task) }}
315
+ </el-tag>
316
+ </div>
317
+ </el-flex>
318
+ <div
319
+ style="
320
+ display: flex;
321
+ align-items: center;
322
+ justify-content: space-between;
323
+ width: 100%;
320
324
  "
321
- v-model="task.comment"
322
- autosize
323
- clearable
324
- placeholder="请输入内容"
325
- type="textarea"
326
- ></el-input>
327
- <span v-else>{{ task.comment }}</span>
328
- <el-icon-btn
329
- tip="查看详情"
330
- v-if="
331
- source === 'showDetail' &&
332
- task.comment &&
333
- task.comment !== '***' &&
334
- (task.taskName === '专家预审' ||
335
- task.taskName === '专家会审(答辩)' ||
336
- task.taskName === '专家评审')
337
- "
338
- model-value="adtec-details"
339
- @click.stop="viewDetail(task)"
340
- style="font-size: 14px"
341
325
  >
342
- </el-icon-btn>
326
+ <el-input
327
+ v-if="
328
+ ver?.version === 4 &&
329
+ task.taskDefKey === 'tech_approval' &&
330
+ (userInfo.getUserInfo.roleCodes?.includes('PMRole') ||
331
+ userInfo.getUserInfo.roleCodes?.includes('TMRole'))
332
+ "
333
+ v-model="task.comment"
334
+ autosize
335
+ clearable
336
+ placeholder="请输入内容"
337
+ type="textarea"
338
+ style="width: 100%"
339
+ ></el-input>
340
+ <span v-else style="word-break: break-all">{{ task.comment }}</span>
341
+ <el-icon-btn
342
+ tip="查看详情"
343
+ v-if="
344
+ task.comment &&
345
+ task.comment !== '***' &&
346
+ (task.taskName === '专家预审' ||
347
+ task.taskName === '专家会审(答辩)' ||
348
+ task.taskName === '专家评审')
349
+ "
350
+ model-value="adtec-details"
351
+ @click.stop="viewDetail(task)"
352
+ style="font-size: 14px; margin-left: 8px"
353
+ >
354
+ </el-icon-btn>
355
+ </div>
356
+ <el-flex v-if="taskFiles.some((x) => x.businessId === task.taskId)" width="100%">
357
+ <el-uploads
358
+ :is-edlt="false"
359
+ :vertical="true"
360
+ :businessId="task.taskId"
361
+ :upload-files-list="taskFiles.filter((x) => x.businessId === task.taskId)"
362
+ style="width: 100%"
363
+ ></el-uploads>
364
+ </el-flex>
365
+ <span style="display: block; color: #909399; margin-top: 4px" v-if="task.comment">
366
+ {{ task.finishTime?.substring(0, 19) }}
367
+ </span>
343
368
  </div>
344
- <el-flex v-if="taskFiles.some((x) => x.businessId === task.taskId)" width="100%">
345
- <!-- <span style="font-size: 14px">附件:</span>-->
346
- <el-uploads
347
- :is-edlt="false"
348
- :vertical="true"
349
- :businessId="task.taskId"
350
- :upload-files-list="taskFiles.filter((x) => x.businessId === task.taskId)"
351
- ></el-uploads>
352
- </el-flex>
353
-
354
- <span style="display: block; color: #909399" v-if="task.comment">{{
355
- task.finishTime?.substring(0, 19)
356
- }}</span>
357
- </el-flex>
358
- </el-flex>
369
+ </div>
370
+ </div>
359
371
  </template>
360
372
  </el-step>
361
373
  </el-steps>
@@ -0,0 +1,76 @@
1
+ import type { Ref } from 'vue'
2
+ import WujieVue from 'wujie-vue3'
3
+ import { ElMessage } from 'element-plus'
4
+ import { type IWfTaskVo } from '../../src/interface/workflow/IWfTaskVo'
5
+ import { userInfoStore } from '../../src/stores/userInfoStore'
6
+ import frameworkUtil from '../../src/utils/FrameworkUtils'
7
+
8
+ /**
9
+ * 创建人:xux
10
+ * 说明:
11
+ * 创建时间: 2025/1/23 下午3:16
12
+ * 修改时间: 2025/1/23 下午3:16
13
+ */
14
+ export async function showTodoDialog(taskVo: Ref<IWfTaskVo>, params: any) {
15
+ if (taskVo.value && taskVo.value.nodeTag) {
16
+ const nodeTag =
17
+ taskVo.value.nodeTag.indexOf(':') > -1
18
+ ? taskVo.value.nodeTag.split(':')[1]
19
+ : taskVo.value.nodeTag
20
+ const ps = [
21
+ { code: 'businessId', value: taskVo.value?.businessId },
22
+ { code: 'taskId', value: taskVo.value?.taskId },
23
+ {
24
+ code: 'nodeTag',
25
+ value: taskVo.value.nodeTag,
26
+ },
27
+ ]
28
+ params.value = ps
29
+ if (taskVo.value?.nodeParam) {
30
+ ps.push({ code: 'nodeParam', value: taskVo.value?.nodeParam })
31
+ }
32
+ if (taskVo.value.nodeTag.indexOf(':') > -1) {
33
+ //子应用
34
+ //表单页面
35
+ if (taskVo.value.nodeTag.indexOf('/') > -1) {
36
+ //给子应用组件发送bus事件
37
+ WujieVue.bus.$emit(taskVo.value.nodeTag.split(':')[0] + 'WorkflowTodoBus', ps)
38
+ } else {
39
+ //菜单页面
40
+ const find = userInfoStore().getUserInfo.menuList.find((c) => c.code === nodeTag)
41
+ if (find) {
42
+ const key = nodeTag + (Math.random() * 100000).toFixed(0)
43
+ localStorage.setItem(key + '_message', JSON.stringify(taskVo.value))
44
+ setTimeout(() => {
45
+ localStorage.removeItem(key + '_message')
46
+ }, 1000 * 10)
47
+ let menu = frameworkUtil
48
+ .getOpenMenuInfoWujie()
49
+ .find((item: any) => item.id === taskVo.value.taskId)
50
+ if (!menu) {
51
+ menu = JSON.parse(JSON.stringify(find))
52
+ if (menu) {
53
+ menu.code = key
54
+ menu.name = taskVo.value.taskName ? taskVo.value.taskName : menu.name
55
+ menu.id = taskVo.value.taskId
56
+ ps.push({ code: 'menuCode', value: menu.code })
57
+ await WujieVue.bus.$emit('openMenu', menu, params)
58
+ }
59
+ } else {
60
+ await WujieVue.bus.$emit('openMenu', menu)
61
+ }
62
+ //给子应用组件发送bus事件
63
+ setTimeout(() => {
64
+ WujieVue.bus.$emit(taskVo.value?.nodeTag?.split(':')[0] + 'WorkflowTodoBus', ps)
65
+ }, 1000)
66
+ // await permissionHooks.openMenu(find)
67
+ // WujieVue.bus.$emit(taskVo.value.nodeTag.split(':')[0] + 'WorkflowTodoBus', ps)
68
+ } else {
69
+ ElMessage.error('未找到该菜单')
70
+ }
71
+ }
72
+ }
73
+ } else {
74
+ ElMessage.error('未设置待办处理界面!')
75
+ }
76
+ }