adtec-core-package 2.6.3 → 2.6.5

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.3",
3
+ "version": "2.6.5",
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
  }
@@ -6,73 +6,78 @@
6
6
  <div ref="taskFlexRef">
7
7
  <el-flex align="center" justify="flex-end">
8
8
  <slot name="left"></slot>
9
- <el-button :loading="butLoading || taskLoading" v-if="params?.cancelBtnText !== ''"
10
- @click="params?.cancelFunction">{{
11
- params?.cancelBtnText ?? '取消'
12
- }}
9
+ <el-button
10
+ :loading="butLoading || taskLoading"
11
+ v-if="params?.cancelBtnText !== ''"
12
+ @click="params?.cancelFunction"
13
+ >{{ params?.cancelBtnText ?? '取消' }}
13
14
  </el-button>
14
- <el-button v-if="showProcessBtn && task?.procInsId" type="info" :loading="butLoading || taskLoading"
15
- @click="processShow = true">
15
+ <el-button
16
+ v-if="showProcessBtn && task?.procInsId"
17
+ type="info"
18
+ :loading="butLoading || taskLoading"
19
+ @click="processShow = true"
20
+ >
16
21
  流程详情
17
22
  </el-button>
18
23
  <template v-if="isAssignee">
19
- <el-button type="primary" :loading="butLoading || taskLoading" @click="openDialog('assignee')">指定执行人
24
+ <el-button
25
+ type="primary"
26
+ :loading="butLoading || taskLoading"
27
+ @click="openDialog('assignee')"
28
+ >指定执行人
20
29
  </el-button>
21
30
  </template>
22
31
  <template v-if="!isAssignee && task?.taskId && task?.operations && showOperationsBtn">
23
- <el-button :loading="butLoading || taskLoading" v-if="params?.saveBtnText" type="primary"
24
- @click="params?.saveFunction">{{
25
- params?.saveBtnText
26
- }}
32
+ <el-button
33
+ :loading="butLoading || taskLoading"
34
+ v-if="params?.saveBtnText"
35
+ type="primary"
36
+ @click="params?.saveFunction"
37
+ >{{ params?.saveBtnText }}
27
38
  </el-button>
28
39
  <el-button
29
40
  v-if="task?.operations.indexOf('addMulti') > -1"
30
41
  type="warning"
31
42
  :loading="butLoading || taskLoading"
32
43
  @click="openDialog('addMulti')"
33
- >加签
34
- </el-button
35
- >
44
+ >加签
45
+ </el-button>
36
46
  <el-button
37
47
  v-if="task?.operations.indexOf('minusMulti') > -1"
38
48
  type="danger"
39
49
  :loading="butLoading || taskLoading"
40
50
  @click="openDialog('minusMulti')"
41
- >减签
42
- </el-button
43
- >
51
+ >减签
52
+ </el-button>
44
53
  <el-button
45
54
  :loading="butLoading || taskLoading"
46
55
  v-if="task?.operations.indexOf('refuse') > -1 && params?.refuseBtnText !== ''"
47
56
  type="danger"
48
57
  @click="openDialog('refuse')"
49
- >{{ params?.refuseBtnText ?? '终止' }}
50
- </el-button
51
- >
58
+ >{{ params?.refuseBtnText ?? '终止' }}
59
+ </el-button>
52
60
  <el-button
53
61
  :loading="butLoading || taskLoading"
54
62
  v-if="task?.operations.indexOf('transfer') > -1 && params?.transferBtnText !== ''"
55
63
  type="warning"
56
64
  @click="openDialog('transfer')"
57
- >{{ params?.transferBtnText ?? '转办' }}
58
- </el-button
59
- >
65
+ >{{ params?.transferBtnText ?? '转办' }}
66
+ </el-button>
60
67
  <el-button
61
68
  :loading="butLoading || taskLoading"
62
69
  v-if="task?.operations.indexOf('back') > -1 && params?.backBtnText !== ''"
63
70
  type="danger"
64
71
  @click="openDialog('back')"
65
- >{{ params?.backBtnText ?? '退回' }}
66
- </el-button
67
- >
72
+ >{{ params?.backBtnText ?? '退回' }}
73
+ </el-button>
68
74
  <el-button
69
75
  :loading="butLoading || taskLoading"
70
76
  v-if="task?.operations.indexOf('complete') > -1 && params?.completeBtnText !== ''"
71
77
  type="primary"
72
78
  @click="openDialog('complete')"
73
- >{{ params?.completeBtnText ?? '同意' }}
74
- </el-button
75
- >
79
+ >{{ params?.completeBtnText ?? '同意' }}
80
+ </el-button>
76
81
  </template>
77
82
  <slot name="right"></slot>
78
83
  <select-assignee-dialog
@@ -89,9 +94,7 @@
89
94
  @success="operSuccess"
90
95
  ></check-dialog>
91
96
  <add-or-minus-multi-dialog ref="addOrMinusMultiRef"></add-or-minus-multi-dialog>
92
- <Teleport to="body">
93
- <process-detail-dialog v-model="processShow" :task="task"></process-detail-dialog>
94
- </Teleport>
97
+ <process-detail-dialog v-model="processShow" :task="task"></process-detail-dialog>
95
98
  </el-flex>
96
99
  </div>
97
100
  </template>
@@ -162,7 +165,7 @@ const openDialog = async (type: string) => {
162
165
  userId: userInfoStore().getUserInfo.id,
163
166
  comment: '同意。',
164
167
  procInsId: task.value.procInsId,
165
- procDefKey: task.value.procDefKey
168
+ procDefKey: task.value.procDefKey,
166
169
  })
167
170
  if (res === false) return
168
171
  if (res?.readonly) {
@@ -203,7 +206,7 @@ const operSuccess = (taskVo: IWfTaskVo) => {
203
206
  // 向上定义递归查找函数
204
207
  const findParentWithClass = (
205
208
  element: HTMLElement | null,
206
- targetClass: string
209
+ targetClass: string,
207
210
  ): HTMLElement | null => {
208
211
  if (!element) {
209
212
  return null
@@ -79,7 +79,7 @@ import frameworkUtils from '../../../utils/FrameworkUtils.ts'
79
79
  const props = withDefaults(
80
80
  defineProps<{
81
81
  modelValue: boolean
82
- businessId: string
82
+ businessId?: string
83
83
  task: IWfTaskVo
84
84
  }>(),
85
85
  {
@@ -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
+ }