adtec-core-package 2.3.9 → 2.4.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adtec-core-package",
3
- "version": "2.3.9",
3
+ "version": "2.4.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,20 +1,23 @@
1
- /**
2
- * 创建人:xux
3
- * 说明: 流程管理
4
- * 创建时间: 2024/10/9 上午9:16
5
- * 修改时间: 2024/10/9 上午9:16
6
- */
7
-
8
- import request from '../../utils/request'
9
- import { IWorkflowCommentVo } from 'adtec-core-package/src/interface/workflow/IWorkflowCommentVo'
10
-
11
- export default {
12
- // 查询流程版本
13
- getComment(businessId: string,taskId:string) {
14
- return request.get<IWorkflowCommentVo>('/api/tm/workFlowComment/getComment', { businessId,taskId })
15
- },
16
- // 添加流程版本
17
- addOrEditComment(data: IWorkflowCommentVo) {
18
- return request.post<IWorkflowCommentVo>('/api/tm/workFlowComment/addOrEditComment', data)
19
- },
20
- }
1
+ /**
2
+ * 创建人:xux
3
+ * 说明: 流程管理
4
+ * 创建时间: 2024/10/9 上午9:16
5
+ * 修改时间: 2024/10/9 上午9:16
6
+ */
7
+
8
+ import request from '../../utils/request'
9
+ import { IWorkflowCommentVo } from 'adtec-core-package/src/interface/workflow/IWorkflowCommentVo'
10
+
11
+ export default {
12
+ // 查询流程版本
13
+ getComment(businessId: string, taskId: string) {
14
+ return request.get<IWorkflowCommentVo>('/api/tm/workFlowComment/getComment', {
15
+ businessId,
16
+ taskId,
17
+ })
18
+ },
19
+ // 添加流程版本
20
+ addOrEditComment(data: IWorkflowCommentVo) {
21
+ return request.post<IWorkflowCommentVo>('/api/tm/workFlowComment/addOrEditComment', data)
22
+ },
23
+ }
@@ -6,57 +6,59 @@
6
6
  <div ref="taskFlexRef">
7
7
  <el-flex align="center" justify="flex-end" v-loading="taskLoading">
8
8
  <slot name="left"></slot>
9
- <el-button v-if="params?.cancelBtnText !== ''" @click="params?.cancelFunction">{{ params?.cancelBtnText ?? '取消' }}</el-button>
10
- <el-button v-if="showProcessBtn" type="info" @click="processShow = true">流程详情</el-button>
9
+ <el-button v-if="params?.cancelBtnText !== ''" @click="params?.cancelFunction">{{
10
+ params?.cancelBtnText ?? '取消'
11
+ }}</el-button>
12
+ <el-button v-if="showProcessBtn" type="info" @click="processShow = true">流程详情</el-button>
11
13
  <template v-if="isAssignee">
12
14
  <el-button type="primary" @click="openDialog('assignee')">指定执行人</el-button>
13
15
  </template>
14
16
  <template v-if="!isAssignee && task?.taskId && task?.operations">
15
- <el-button
16
- v-if="params?.saveBtnText"
17
- type="primary"
18
- @click="params?.saveFunction"
19
- >{{ params?.saveBtnText }}</el-button
20
- >
17
+ <el-button v-if="params?.saveBtnText" type="primary" @click="params?.saveFunction">{{
18
+ params?.saveBtnText
19
+ }}</el-button>
21
20
  <el-button
22
21
  v-if="task?.operations.indexOf('addMulti') > -1"
23
22
  type="warning"
24
23
  @click="openDialog('addMulti')"
25
- >加签</el-button
24
+ >加签</el-button
26
25
  >
27
26
  <el-button
28
27
  v-if="task?.operations.indexOf('minusMulti') > -1"
29
28
  type="danger"
30
29
  @click="openDialog('minusMulti')"
31
- >减签</el-button
30
+ >减签</el-button
32
31
  >
33
32
  <el-button
34
33
  v-if="task?.operations.indexOf('refuse') > -1 && params?.refuseBtnText !== ''"
35
34
  type="danger"
36
35
  @click="openDialog('refuse')"
37
- >{{ params?.refuseBtnText ?? '终止' }}</el-button
36
+ >{{ params?.refuseBtnText ?? '终止' }}</el-button
38
37
  >
39
38
  <el-button
40
39
  v-if="task?.operations.indexOf('transfer') > -1 && params?.transferBtnText !== ''"
41
40
  type="warning"
42
41
  @click="openDialog('transfer')"
43
- >{{ params?.transferBtnText ?? '转办' }}</el-button
42
+ >{{ params?.transferBtnText ?? '转办' }}</el-button
44
43
  >
45
44
  <el-button
46
45
  v-if="task?.operations.indexOf('back') > -1 && params?.backBtnText !== ''"
47
46
  type="danger"
48
47
  @click="openDialog('back')"
49
- >{{ params?.backBtnText ?? '退回' }}</el-button
48
+ >{{ params?.backBtnText ?? '退回' }}</el-button
50
49
  >
51
50
  <el-button
52
51
  v-if="task?.operations.indexOf('complete') > -1 && params?.completeBtnText !== ''"
53
52
  type="primary"
54
53
  @click="openDialog('complete')"
55
- >{{ params?.completeBtnText ?? '同意' }}</el-button
54
+ >{{ params?.completeBtnText ?? '同意' }}</el-button
56
55
  >
57
56
  </template>
58
57
  <slot name="right"></slot>
59
- <select-assignee-dialog ref="assigneeRef" @success="selectAssigneeSuccess"></select-assignee-dialog>
58
+ <select-assignee-dialog
59
+ ref="assigneeRef"
60
+ @success="selectAssigneeSuccess"
61
+ ></select-assignee-dialog>
60
62
  <select-return-activity-dialog
61
63
  ref="returnActivityRef"
62
64
  @success="reloadTask"
@@ -66,9 +68,7 @@
66
68
  @open-assignee="openAssignee"
67
69
  @success="operSuccess"
68
70
  ></check-dialog>
69
- <add-or-minus-multi-dialog
70
- ref="addOrMinusMultiRef"
71
- ></add-or-minus-multi-dialog>
71
+ <add-or-minus-multi-dialog ref="addOrMinusMultiRef"></add-or-minus-multi-dialog>
72
72
  <Teleport to="body">
73
73
  <process-detail-dialog v-model="processShow" :task="task"></process-detail-dialog>
74
74
  </Teleport>
@@ -76,10 +76,9 @@
76
76
  </div>
77
77
  </template>
78
78
  <script setup lang="ts">
79
- import { type PropType, ref, watch, watchEffect, onMounted, computed } from 'vue'
79
+ import { computed, onMounted, type PropType, ref, watch } from 'vue'
80
80
  import workflowInstApi from '../../api/workflow/workflowInstApi'
81
81
  import type { IWfTaskVo } from '../../interface/workflow/IWfTaskVo'
82
- import { ElMessage, ElLoading } from 'element-plus'
83
82
  import SelectAssigneeDialog from './components/SelectAssigneeDialog.vue'
84
83
  import SelectReturnActivityDialog from './components/SelectReturnActivityDialog.vue'
85
84
  import ProcessDetailDialog from './components/ProcessDetailDialog.vue'
@@ -89,8 +88,9 @@ import type { ITaskOperate } from '../../hooks/userWorkflowHooks'
89
88
  import frameworkUtils from '../../utils/FrameworkUtils.ts'
90
89
  import { userInfoStore } from '../../stores/userInfoStore.ts'
91
90
  import WujieVue from 'wujie-vue3'
91
+
92
92
  const processShow = ref(false)
93
- const taskFlexRef = ref<HTMLElement | null>(null);
93
+ const taskFlexRef = ref<HTMLElement | null>(null)
94
94
  const $props = defineProps({
95
95
  // modelValue: { type: Object, required: false },
96
96
  taskId: { type: String, required: true },
@@ -137,20 +137,24 @@ const openDialog = async (type: string) => {
137
137
  const res = await $props.params?.beforeCompleteFunction({
138
138
  taskId: task.value.taskId,
139
139
  userId: userInfoStore().getUserInfo.id,
140
- comment: '同意。'
140
+ comment: '同意。',
141
+ procInsId: task.value.procInsId,
142
+ procDefKey: task.value.procDefKey,
141
143
  })
142
144
  if (res === false) return
143
145
  if (res?.readonly) {
144
146
  commentReadonly = true
145
147
  }
146
- task.value = {...task.value,...res}
148
+ task.value = { ...task.value, ...res }
147
149
  } catch (err: any) {
148
150
  return
149
151
  }
150
152
  }
151
- if (type === 'addMulti' || type === 'minusMulti') { //加减签
153
+ if (type === 'addMulti' || type === 'minusMulti') {
154
+ //加减签
152
155
  addOrMinusMultiRef.value?.open(task.value.taskId, type)
153
- } else if (type === 'assignee') { //指定审批人
156
+ } else if (type === 'assignee') {
157
+ //指定审批人
154
158
  openAssignee(task.value.taskId)
155
159
  } else {
156
160
  checkRef.value?.open(task.value, type, $props?.params, commentReadonly)
@@ -174,28 +178,31 @@ const operSuccess = (taskVo: IWfTaskVo) => {
174
178
  }
175
179
 
176
180
  // 向上定义递归查找函数
177
- const findParentWithClass = (element: HTMLElement | null, targetClass: string): HTMLElement | null => {
181
+ const findParentWithClass = (
182
+ element: HTMLElement | null,
183
+ targetClass: string,
184
+ ): HTMLElement | null => {
178
185
  if (!element) {
179
- return null;
186
+ return null
180
187
  }
181
188
  if (element.classList?.contains(targetClass)) {
182
- return element;
189
+ return element
183
190
  }
184
- return findParentWithClass(element.parentElement, targetClass);
191
+ return findParentWithClass(element.parentElement, targetClass)
185
192
  }
186
193
  // 定义查找 todo-dialog-class 元素的方法
187
194
  const findTodoDialog = () => {
188
- const targetElement = findParentWithClass(taskFlexRef.value as HTMLElement, 'todo-dialog-class');
195
+ const targetElement = findParentWithClass(taskFlexRef.value as HTMLElement, 'todo-dialog-class')
189
196
  if (targetElement) {
190
- console.log('找到满足条件的元素:', targetElement);
197
+ console.log('找到满足条件的元素:', targetElement)
191
198
  } else {
192
- console.log('未找到满足条件的元素');
199
+ console.log('未找到满足条件的元素')
193
200
  }
194
201
  return targetElement
195
202
  }
196
203
  let parentDom: any
197
204
  onMounted(() => {
198
- parentDom = findTodoDialog();
205
+ parentDom = findTodoDialog()
199
206
  reloadTask()
200
207
  })
201
208
  let loading: any
@@ -236,6 +243,5 @@ watch(() => $props.taskId, reloadTask)
236
243
  // reloadTask()
237
244
  // }
238
245
  // })
239
-
240
246
  </script>
241
247
  <style scoped lang="scss"></style>
@@ -74,9 +74,18 @@
74
74
  </el-flex>
75
75
  </el-form-item>
76
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">
77
+ <el-select
78
+ v-model="task.variables.nextChecker"
79
+ :disabled="task.variables.persons?.length === 1"
80
+ multiple
81
+ placeholder="请选择下一步审核人"
82
+ >
83
+ <el-option
84
+ v-for="item in task.variables.persons"
85
+ :key="item.code"
86
+ :label="item.name"
87
+ :value="item.code"
88
+ >
80
89
  </el-option>
81
90
  </el-select>
82
91
  </el-form-item>
@@ -107,21 +116,21 @@
107
116
  </el-dialog>
108
117
  </template>
109
118
  <script setup lang="ts">
110
- import {Search} from '@element-plus/icons-vue'
119
+ import { Search } from '@element-plus/icons-vue'
111
120
  import UserTag from '../../../components/bpmntree/components/UserSelector/UserTag.vue'
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'
121
+ import { computed, ref } from 'vue'
122
+ import type { IWfTaskVo } from '../../../interface/workflow/IWfTaskVo'
123
+ import type { ISysUserInfo } from '../../../interface/ISysUserInfo'
124
+ import type { IWfReturnNodeVo } from '../../../interface/workflow/IWfReturnNodeVo'
116
125
  import workflowInstApi from '../../../api/workflow/workflowInstApi'
117
- import {ElMessage} from 'element-plus'
126
+ import { ElMessage } from 'element-plus'
118
127
  import UserSelect from '../../../components/business/userSelect.vue'
119
128
  import ElUploads from '../../../components/upload/ElUploads.vue'
120
- import {userInfoStore} from '../../../stores/userInfoStore'
121
- import type {ISysUploadFiles} from '../../../interface/ISysUploadFiles'
129
+ import { userInfoStore } from '../../../stores/userInfoStore'
130
+ import type { ISysUploadFiles } from '../../../interface/ISysUploadFiles'
122
131
  import documentApi from '../../../api/DocumentApi'
123
132
  import frameworkUtils from '../../../utils/FrameworkUtils.ts'
124
- import type {ITaskOperate} from '@/hooks/userWorkflowHooks.ts'
133
+ import type { ITaskOperate } from '@/hooks/userWorkflowHooks.ts'
125
134
 
126
135
  const emit = defineEmits(['success', 'openAssignee'])
127
136
  const dialogVisible = ref(false)
@@ -131,7 +140,7 @@ const dialogLabel = ref('')
131
140
  const dialogType = ref('')
132
141
  const task = ref()
133
142
  const taskFiles = ref<ISysUploadFiles[]>([])
134
- const transferUser = ref<ISysUserInfo>({id: '', userName: ''})
143
+ const transferUser = ref<ISysUserInfo>({ id: '', userName: '' })
135
144
  const returnData = ref<IWfReturnNodeVo[]>([])
136
145
  const selectActivity = ref<string>('')
137
146
  const taskOperate = ref<ITaskOperate>()
@@ -139,7 +148,12 @@ const readonly = ref(false)
139
148
  const showSelPersons = computed(() => {
140
149
  return task.value.variables?.persons?.length > 0
141
150
  })
142
- const open = async (taskVo: IWfTaskVo, type: string, params: ITaskOperate, commentReadonly: boolean) => {
151
+ const open = async (
152
+ taskVo: IWfTaskVo,
153
+ type: string,
154
+ params: ITaskOperate,
155
+ commentReadonly: boolean,
156
+ ) => {
143
157
  if (commentReadonly) {
144
158
  readonly.value = true
145
159
  } else {
@@ -228,7 +242,9 @@ const handleComplete = async () => {
228
242
  taskId: task.value.taskId,
229
243
  userId: userInfoStore().getUserInfo.id,
230
244
  comment: task.value.comment,
231
- variables: task.value.variables
245
+ procInsId: task.value.procInsId,
246
+ procDefKey: task.value.procDefKey,
247
+ variables: task.value.variables,
232
248
  }
233
249
  //若自定义了同意函数,则调用自定义函数
234
250
  if (taskOperate.value?.completeFunction) {
@@ -257,7 +273,7 @@ const handleComplete = async () => {
257
273
  taskId: task.value.taskId,
258
274
  userId: userInfoStore().getUserInfo.id,
259
275
  comment: task.value.comment,
260
- stopWorkflow: true //false,
276
+ stopWorkflow: true, //false,
261
277
  }
262
278
  //若自定义了终止函数,则调用自定义函数
263
279
  if (taskOperate.value?.refuseFunction) {
@@ -283,7 +299,8 @@ const handleComplete = async () => {
283
299
  userId: userInfoStore().getUserInfo.id,
284
300
  comment: task.value.comment,
285
301
  targetKey: selectActivity.value,
286
- isFirstActivity: returnData.value.find(x => x.taskKey === selectActivity.value)?.isFirstActivity
302
+ isFirstActivity: returnData.value.find((x) => x.taskKey === selectActivity.value)
303
+ ?.isFirstActivity,
287
304
  }
288
305
  if (taskOperate.value?.backFunction) {
289
306
  await taskOperate.value.backFunction(askVo)
@@ -102,7 +102,7 @@ const open = async () => {
102
102
  data.value = props.task
103
103
  loading.value = true
104
104
  bpmnRef.value?.init(props.task.procDefKey, props.task.procInsId)
105
- stepRef.value?.init(props.task.procInsId)
105
+ stepRef.value?.init(props.task.procDefKey,props.task.procInsId)
106
106
  } catch (err: any) {
107
107
  frameworkUtils.messageError(err)
108
108
  } finally {
@@ -115,7 +115,7 @@ const open = async () => {
115
115
  data.value = await workflowInstApi.getWfTaskByBusinessId(props.businessId)
116
116
  if (data.value.procDefKey && data.value.procInsId) {
117
117
  bpmnRef.value?.init(data.value.procDefKey, data.value.procInsId)
118
- stepRef.value?.init(data.value.procInsId)
118
+ stepRef.value?.init(data.value.procDefKey,data.value.procInsId)
119
119
  } else {
120
120
  ElMessage.warning('流程信息缺失!')
121
121
  }
@@ -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.procInsId)
103
+ stepRef.value?.init(props.task.procDefKey,props.task.procInsId)
104
104
  } catch (err: any) {
105
105
  frameworkUtils.messageError(err)
106
106
  } finally {
@@ -112,7 +112,7 @@ const open = async () => {
112
112
  data.value = await workflowInstApi.getWfTaskByBusinessId(props.businessId)
113
113
  if (data.value.procDefKey && data.value.procInsId) {
114
114
  bpmnRef.value?.init(data.value.procDefKey, data.value.procInsId)
115
- stepRef.value?.init(data.value.procInsId)
115
+ stepRef.value?.init(data.value.procDefKey, data.value.procInsId)
116
116
  } else {
117
117
  ElMessage.warning('流程信息缺失!')
118
118
  }
@@ -6,7 +6,7 @@
6
6
  import workbenchInstApi from '../../../api/workflow/workflowInstApi'
7
7
  import workflowcommentApi from '../../../api/workflow/workflowCommentApi'
8
8
  import type { IWorkflowCommentVo } from '../../../interface/workflow/IWorkflowCommentVo'
9
- import { ElMessage,ElMessageBox } from 'element-plus'
9
+ import { ElMessage, ElMessageBox } from 'element-plus'
10
10
  import { ref } from 'vue'
11
11
  import type { IWfProcessInstVo, IWfTaskVo } from '../../../interface/workflow/IWfTaskVo'
12
12
  import ElUploads from '../../../components/upload/ElUploads.vue'
@@ -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
@@ -73,47 +73,54 @@ const init = async (procDefId: string, procInstId: string) => {
73
73
  if (wfProcessInstVo.value?.activeTasks?.length) {
74
74
  setTaskGroup(wfProcessInstVo.value.activeTasks || [])
75
75
  }
76
- if (taskGroup.value.length && ver.value.workflowCode === 'CompanyProjectApplyWorkflow' && ver.value.version === 4) {
76
+ if (
77
+ taskGroup.value.length &&
78
+ ver.value.workflowCode === 'CompanyProjectApplyWorkflow' &&
79
+ ver.value.version === 4
80
+ ) {
77
81
  if (taskGroup.value.length) {
78
82
  // 判断taskGroup.value中的专家预审的位置index
79
- const expertPretrialIndex = taskGroup.value.findIndex(item => item.taskName === '专家预审')
83
+ const expertPretrialIndex = taskGroup.value.findIndex(
84
+ (item) => item.taskName === '专家预审',
85
+ )
80
86
  if (expertPretrialIndex !== -1) {
81
87
  //判断是否是最后一个节点
82
88
  if (expertPretrialIndex < taskGroup.value.length - 1) {
83
89
  //拿到专家预审节点
84
90
  const expertPretrialTask = taskGroup.value[expertPretrialIndex]
85
91
  //获取保存的评论
86
- techComment.value = await workflowcommentApi.getComment(expertPretrialTask.tasks[0].businessId, expertPretrialTask.tasks[0].taskId)
92
+ techComment.value = await workflowcommentApi.getComment(
93
+ expertPretrialTask.tasks[0].businessId,
94
+ expertPretrialTask.tasks[0].taskId,
95
+ )
87
96
  // 拼接expertPretrialTask 的 tasks里面的所有 comment
88
97
  const allComment = expertPretrialTask.tasks
89
- .map(task => task.comment)
90
- .filter(comment => comment)
98
+ .map((task) => task.comment)
99
+ .filter((comment) => comment)
91
100
  .join('\n')
92
101
 
93
102
  //此时说明预审已经完成,在其后增加一个新数组
94
103
  taskGroup.value.splice(expertPretrialIndex + 1, 0, {
95
- taskName: '科技管理室审批',
104
+ taskName: '科技管理室汇总',
96
105
  finishTime: expertPretrialTask.finishTime,
97
- tasks: [{
98
- taskId: expertPretrialTask.tasks[0].taskId,
99
- taskName: '科技管理室审批',
100
- taskDefKey: 'tech_approval',
101
- parentExecutionId: expertPretrialTask.parentExecutionId,
102
- businessId: expertPretrialTask.tasks[0].businessId,
103
- createTime: expertPretrialTask.createTime,
104
- finishTime: expertPretrialTask.finishTime,
105
- assigneeName: '科技管理员',
106
- comment: techComment.value?.techComment || allComment,
107
- commentList: [
108
- { type: 1 }
109
- ]
110
- }]
106
+ tasks: [
107
+ {
108
+ taskId: expertPretrialTask.tasks[0].taskId,
109
+ taskName: '科技管理室汇总',
110
+ taskDefKey: 'tech_approval',
111
+ parentExecutionId: expertPretrialTask.parentExecutionId,
112
+ businessId: expertPretrialTask.tasks[0].businessId,
113
+ createTime: expertPretrialTask.createTime,
114
+ finishTime: expertPretrialTask.finishTime,
115
+ assigneeName: '科技管理员',
116
+ comment: techComment.value?.techComment || allComment,
117
+ commentList: [{ type: 1 }],
118
+ },
119
+ ],
111
120
  })
112
121
  }
113
122
  }
114
123
  }
115
-
116
-
117
124
  }
118
125
  } catch (err: any) {
119
126
  taskGroup.value = []
@@ -127,7 +134,7 @@ const setTaskGroup = (tasks: IWfTaskVo[]) => {
127
134
  for (const hisTask of tasks) {
128
135
  const exist = taskGroup.value.find(
129
136
  (x) =>
130
- x.taskDefKey === hisTask.taskDefKey && x.parentExecutionId === hisTask.parentExecutionId
137
+ x.taskDefKey === hisTask.taskDefKey && x.parentExecutionId === hisTask.parentExecutionId,
131
138
  )
132
139
  if (exist) {
133
140
  if (hisTask.finishTime && hisTask.finishTime > exist.finishTime) {
@@ -153,14 +160,14 @@ const setTaskGroup = (tasks: IWfTaskVo[]) => {
153
160
  parentExecutionId: hisTask.parentExecutionId || '',
154
161
  finishTime: hisTask.finishTime || '',
155
162
  createTime: hisTask.createTime || '',
156
- tasks: [hisTask]
163
+ tasks: [hisTask],
157
164
  })
158
165
  }
159
166
  }
160
167
  if (taskGroup.value.length > 0) {
161
168
  taskGroup.value.sort((a, b) => {
162
169
  const n1 = (a.finishTime ? a.finishTime : '9999').localeCompare(
163
- b.finishTime ? b.finishTime : '9999'
170
+ b.finishTime ? b.finishTime : '9999',
164
171
  )
165
172
  if (n1 == 0) {
166
173
  return a.createTime.localeCompare(b.createTime)
@@ -182,7 +189,7 @@ const getStatus = (task: IWfTaskVo) => {
182
189
  if (task.commentList && task.commentList.length > 0) {
183
190
  return ['待办', '已办', '已办', '终止', '委派', '转办', '终止', '撤回'][
184
191
  Number(task.commentList[task.commentList.length - 1].type)
185
- ]
192
+ ]
186
193
  }
187
194
  return ''
188
195
  }
@@ -194,7 +201,7 @@ const saveComment = async (taskInfo: IWfTaskVo) => {
194
201
  const confirm = await ElMessageBox.confirm('您确定保存数据?', '提示', {
195
202
  confirmButtonText: '确定',
196
203
  cancelButtonText: '取消',
197
- type: 'warning'
204
+ type: 'warning',
198
205
  })
199
206
  if (!confirm) {
200
207
  return
@@ -202,7 +209,9 @@ const saveComment = async (taskInfo: IWfTaskVo) => {
202
209
  try {
203
210
  loading.value = true
204
211
  techComment.value = await workflowcommentApi.addOrEditComment({
205
- ...techComment.value, ...taskInfo, ...{ techComment: taskInfo.comment }
212
+ ...techComment.value,
213
+ ...taskInfo,
214
+ ...{ techComment: taskInfo.comment },
206
215
  })
207
216
  ElMessage.success('保存成功')
208
217
  } catch (err) {
@@ -210,10 +219,9 @@ const saveComment = async (taskInfo: IWfTaskVo) => {
210
219
  } finally {
211
220
  loading.value = false
212
221
  }
213
-
214
222
  }
215
223
  defineExpose({
216
- init
224
+ init,
217
225
  })
218
226
  </script>
219
227
 
@@ -249,20 +257,27 @@ defineExpose({
249
257
  border-radius: 8px;
250
258
  background: #f8f8f8;
251
259
  "
252
- :style="{width:task.taskDefKey === 'tech_approval' ? '100%' : '31%'}"
260
+ :style="{ width: task.taskDefKey === 'tech_approval' ? '100%' : '31%' }"
253
261
  >
254
262
  <el-flex height="30px" align="center" justify="space-between">
255
- <span class="ellipsis" style="font-size: 14px">{{ task.assigneeName }}</span>
256
- <div style="display: inline-flex;align-items: center;gap: 8px">
263
+ <el-auto-tool-tip :tooltip-content="task.assigneeName">
264
+ <span slot="content" class="ellipsis" style="font-size: 14px">{{
265
+ task.assigneeName
266
+ }}</span>
267
+ </el-auto-tool-tip>
268
+ <div style="display: inline-flex; align-items: center; gap: 8px">
257
269
  <el-icon-btn
258
- v-if="task.taskDefKey === 'tech_approval' && (userInfo.getUserInfo.roleCodes?.includes('PMRole') || userInfo.getUserInfo.roleCodes?.includes('TMRole')) "
259
- tip="保存"
270
+ v-if="
271
+ task.taskDefKey === 'tech_approval' &&
272
+ (userInfo.getUserInfo.roleCodes?.includes('PMRole') ||
273
+ userInfo.getUserInfo.roleCodes?.includes('TMRole'))
274
+ "
260
275
  model-value="adtec-save"
276
+ tip="保存"
261
277
  @click="saveComment(task)"
262
278
  />
263
- <el-tag size="small" :type="task.finishTime ? 'success' : 'primary'">{{
264
- getStatus(task)
265
- }}
279
+ <el-tag :type="task.finishTime ? 'success' : 'primary'" size="small"
280
+ >{{ getStatus(task) }}
266
281
  </el-tag>
267
282
  </div>
268
283
  </el-flex>
@@ -276,17 +291,26 @@ defineExpose({
276
291
  "
277
292
  >
278
293
  <el-input
279
- v-if="task.taskDefKey === 'tech_approval' && (userInfo.getUserInfo.roleCodes?.includes('PMRole') || userInfo.getUserInfo.roleCodes?.includes('TMRole'))"
280
- type="textarea"
281
- placeholder="请输入内容"
282
- autosize
294
+ v-if="
295
+ task.taskDefKey === 'tech_approval' &&
296
+ (userInfo.getUserInfo.roleCodes?.includes('PMRole') ||
297
+ userInfo.getUserInfo.roleCodes?.includes('TMRole'))
298
+ "
283
299
  v-model="task.comment"
300
+ autosize
284
301
  clearable
302
+ placeholder="请输入内容"
303
+ type="textarea"
285
304
  ></el-input>
286
305
  <span v-else>{{ task.comment }}</span>
287
306
  <el-icon-btn
288
307
  tip="查看详情"
289
- v-if="task.taskName === '专家预审' && source === 'showDetail' && task.comment && task.comment !== '***'"
308
+ v-if="
309
+ task.taskName === '专家预审' &&
310
+ source === 'showDetail' &&
311
+ task.comment &&
312
+ task.comment !== '***'
313
+ "
290
314
  model-value="adtec-details"
291
315
  @click.stop="viewDetail(task)"
292
316
  style="font-size: 14px"
@@ -304,8 +328,8 @@ defineExpose({
304
328
  </el-flex>
305
329
 
306
330
  <span style="display: block; color: #909399" v-if="task.comment">{{
307
- task.finishTime?.substring(0, 19)
308
- }}</span>
331
+ task.finishTime?.substring(0, 19)
332
+ }}</span>
309
333
  </el-flex>
310
334
  </el-flex>
311
335
  </template>
@@ -62,4 +62,5 @@ export interface IWfTaskAskVo {
62
62
  * 是否是第一个节点
63
63
  */
64
64
  isFirstActivity?: string
65
+ procDefKey?: string
65
66
  }
@@ -4,21 +4,21 @@ export interface IWorkflowCommentVo extends BaseEntity {
4
4
  /**
5
5
  * 主键 ID
6
6
  */
7
- id?: string;
7
+ id?: string
8
8
 
9
9
  /**
10
10
  * 业务 ID
11
11
  */
12
- businessId?: string;
12
+ businessId?: string
13
13
 
14
14
  /**
15
15
  * 当前工作流 ID
16
16
  */
17
- taskId?: string;
17
+ taskId?: string
18
18
 
19
19
  /**
20
20
  * 汇总结论
21
21
  */
22
22
 
23
- techComment?: string;
23
+ techComment?: string
24
24
  }