adtec-core-package 2.5.0 → 2.5.1

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.5.0",
3
+ "version": "2.5.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -6,52 +6,56 @@
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">{{
10
- params?.cancelBtnText ?? '取消'
11
- }}</el-button>
9
+ <el-button :loading="butLoading" v-if="params?.cancelBtnText !== ''" @click="params?.cancelFunction">{{
10
+ params?.cancelBtnText ?? '取消'
11
+ }}</el-button>
12
12
  <el-button v-if="showProcessBtn" type="info" @click="processShow = true">流程详情</el-button>
13
13
  <template v-if="isAssignee">
14
14
  <el-button type="primary" @click="openDialog('assignee')">指定执行人</el-button>
15
15
  </template>
16
16
  <template v-if="!isAssignee && task?.taskId && task?.operations">
17
- <el-button v-if="params?.saveBtnText" type="primary" @click="params?.saveFunction">{{
18
- params?.saveBtnText
19
- }}</el-button>
17
+ <el-button :loading="butLoading" v-if="params?.saveBtnText" type="primary" @click="params?.saveFunction">{{
18
+ params?.saveBtnText
19
+ }}</el-button>
20
20
  <el-button
21
21
  v-if="task?.operations.indexOf('addMulti') > -1"
22
22
  type="warning"
23
23
  @click="openDialog('addMulti')"
24
- >加签</el-button
24
+ >加签</el-button
25
25
  >
26
26
  <el-button
27
27
  v-if="task?.operations.indexOf('minusMulti') > -1"
28
28
  type="danger"
29
29
  @click="openDialog('minusMulti')"
30
- >减签</el-button
30
+ >减签</el-button
31
31
  >
32
32
  <el-button
33
+ :loading="butLoading"
33
34
  v-if="task?.operations.indexOf('refuse') > -1 && params?.refuseBtnText !== ''"
34
35
  type="danger"
35
36
  @click="openDialog('refuse')"
36
- >{{ params?.refuseBtnText ?? '终止' }}</el-button
37
+ >{{ params?.refuseBtnText ?? '终止' }}</el-button
37
38
  >
38
39
  <el-button
40
+ :loading="butLoading"
39
41
  v-if="task?.operations.indexOf('transfer') > -1 && params?.transferBtnText !== ''"
40
42
  type="warning"
41
43
  @click="openDialog('transfer')"
42
- >{{ params?.transferBtnText ?? '转办' }}</el-button
44
+ >{{ params?.transferBtnText ?? '转办' }}</el-button
43
45
  >
44
46
  <el-button
47
+ :loading="butLoading"
45
48
  v-if="task?.operations.indexOf('back') > -1 && params?.backBtnText !== ''"
46
49
  type="danger"
47
50
  @click="openDialog('back')"
48
- >{{ params?.backBtnText ?? '退回' }}</el-button
51
+ >{{ params?.backBtnText ?? '退回' }}</el-button
49
52
  >
50
53
  <el-button
54
+ :loading="butLoading"
51
55
  v-if="task?.operations.indexOf('complete') > -1 && params?.completeBtnText !== ''"
52
56
  type="primary"
53
57
  @click="openDialog('complete')"
54
- >{{ params?.completeBtnText ?? '同意' }}</el-button
58
+ >{{ params?.completeBtnText ?? '同意' }}</el-button
55
59
  >
56
60
  </template>
57
61
  <slot name="right"></slot>
@@ -95,6 +99,7 @@ const $props = defineProps({
95
99
  // modelValue: { type: Object, required: false },
96
100
  taskId: { type: String, required: true },
97
101
  showProcessBtn: { type: Boolean, required: false, default: false },
102
+ butLoading: { type: Boolean, required: false, default: false },
98
103
  params: { type: Object as PropType<ITaskOperate>, required: false },
99
104
  })
100
105
 
@@ -27,8 +27,8 @@ const props = withDefaults(
27
27
  {
28
28
  procInstId: '',
29
29
  source: '',
30
- taskId: '',
31
- },
30
+ taskId: ''
31
+ }
32
32
  )
33
33
  const emit = defineEmits(['viewDetail'])
34
34
  const loading = ref<boolean>(false)
@@ -62,7 +62,7 @@ const init = async (procDefId: string, procInstId: string) => {
62
62
  .getUpLoadFilesByBussinessIds(
63
63
  wfProcessInstVo.value.hisTasks
64
64
  .filter((item) => item.comment !== '***' && item.taskDefKey !== 'tech_approval')
65
- .map((item) => item.taskId),
65
+ .map((item) => item.taskId)
66
66
  )
67
67
  .then((res) => {
68
68
  taskFiles.value = res
@@ -83,7 +83,7 @@ const init = async (procDefId: string, procInstId: string) => {
83
83
  if (taskGroup.value.length) {
84
84
  // 判断taskGroup.value中的专家预审的位置index
85
85
  const expertPretrialIndex = taskGroup.value.findIndex(
86
- (item) => item.taskName === '专家预审',
86
+ (item) => item.taskName === '专家预审'
87
87
  )
88
88
  if (expertPretrialIndex !== -1) {
89
89
  debugger
@@ -97,7 +97,7 @@ const init = async (procDefId: string, procInstId: string) => {
97
97
  //获取保存的评论
98
98
  techComment.value = await workflowcommentApi.getComment(
99
99
  expertPretrialTask.tasks[0].businessId,
100
- expertPretrialTask.tasks[0].taskId,
100
+ expertPretrialTask.tasks[0].taskId
101
101
  )
102
102
  // 拼接expertPretrialTask 的 tasks里面的所有 comment
103
103
  let allComment = expertPretrialTask.tasks
@@ -129,9 +129,9 @@ const init = async (procDefId: string, procInstId: string) => {
129
129
  : undefined,
130
130
  assigneeName: '科技管理员',
131
131
  comment: techComment.value?.techComment || allComment,
132
- commentList: [{ type: techComment.value?.techComment ? 1 : 0 }],
133
- },
134
- ],
132
+ commentList: [{ type: techComment.value?.techComment ? 1 : 0 }]
133
+ }
134
+ ]
135
135
  })
136
136
  }
137
137
  }
@@ -149,7 +149,7 @@ const setTaskGroup = (tasks: IWfTaskVo[]) => {
149
149
  for (const hisTask of tasks) {
150
150
  const exist = taskGroup.value.find(
151
151
  (x) =>
152
- x.taskDefKey === hisTask.taskDefKey && x.parentExecutionId === hisTask.parentExecutionId,
152
+ x.taskDefKey === hisTask.taskDefKey && x.parentExecutionId === hisTask.parentExecutionId
153
153
  )
154
154
  if (exist) {
155
155
  if (hisTask.finishTime && hisTask.finishTime > exist.finishTime) {
@@ -175,14 +175,14 @@ const setTaskGroup = (tasks: IWfTaskVo[]) => {
175
175
  parentExecutionId: hisTask.parentExecutionId || '',
176
176
  finishTime: hisTask.finishTime || '',
177
177
  createTime: hisTask.createTime || '',
178
- tasks: [hisTask],
178
+ tasks: [hisTask]
179
179
  })
180
180
  }
181
181
  }
182
182
  if (taskGroup.value.length > 0) {
183
183
  taskGroup.value.sort((a, b) => {
184
184
  const n1 = (a.finishTime ? a.finishTime : '9999').localeCompare(
185
- b.finishTime ? b.finishTime : '9999',
185
+ b.finishTime ? b.finishTime : '9999'
186
186
  )
187
187
  if (n1 == 0) {
188
188
  return a.createTime.localeCompare(b.createTime)
@@ -204,7 +204,7 @@ const getStatus = (task: IWfTaskVo) => {
204
204
  if (task.commentList && task.commentList.length > 0) {
205
205
  return ['待办', '已办', '已办', '终止', '委派', '转办', '终止', '撤回'][
206
206
  Number(task.commentList[task.commentList.length - 1].type)
207
- ]
207
+ ]
208
208
  }
209
209
  return ''
210
210
  }
@@ -216,7 +216,7 @@ const saveComment = async (taskInfo: IWfTaskVo) => {
216
216
  const confirm = await ElMessageBox.confirm('您确定保存数据?', '提示', {
217
217
  confirmButtonText: '确定',
218
218
  cancelButtonText: '取消',
219
- type: 'warning',
219
+ type: 'warning'
220
220
  })
221
221
  if (!confirm) {
222
222
  return
@@ -226,7 +226,7 @@ const saveComment = async (taskInfo: IWfTaskVo) => {
226
226
  techComment.value = await workflowcommentApi.addOrEditComment({
227
227
  ...techComment.value,
228
228
  ...taskInfo,
229
- ...{ techComment: taskInfo.comment },
229
+ ...{ techComment: taskInfo.comment }
230
230
  })
231
231
  ElMessage.success('保存成功')
232
232
  } catch (err) {
@@ -236,7 +236,7 @@ const saveComment = async (taskInfo: IWfTaskVo) => {
236
236
  }
237
237
  }
238
238
  defineExpose({
239
- init,
239
+ init
240
240
  })
241
241
  </script>
242
242
 
@@ -275,7 +275,7 @@ defineExpose({
275
275
  :style="{ width: task.taskDefKey === 'tech_approval' ? '100%' : '31%',border:task.taskId===taskId?'1px solid var(--el-color-primary)':'' }"
276
276
  >
277
277
  <el-flex height="30px" align="center" justify="space-between">
278
- <el-auto-tool-tip :content="task.assigneeName"> </el-auto-tool-tip>
278
+ <el-auto-tool-tip :content="task.assigneeName"></el-auto-tool-tip>
279
279
  <div style="display: inline-flex; align-items: center; gap: 8px">
280
280
  <el-icon-btn
281
281
  v-if="
@@ -288,7 +288,7 @@ defineExpose({
288
288
  @click="saveComment(task)"
289
289
  />
290
290
  <el-tag :type="task.finishTime ? 'success' : 'primary'" size="small"
291
- >{{ getStatus(task) }}
291
+ >{{ getStatus(task) }}
292
292
  </el-tag>
293
293
  </div>
294
294
  </el-flex>
@@ -302,7 +302,7 @@ defineExpose({
302
302
  "
303
303
  >
304
304
  <el-input
305
- v-if="
305
+ v-if="ver?.version===4 &&
306
306
  task.taskDefKey === 'tech_approval' &&
307
307
  (userInfo.getUserInfo.roleCodes?.includes('PMRole') ||
308
308
  userInfo.getUserInfo.roleCodes?.includes('TMRole'))
@@ -334,8 +334,8 @@ defineExpose({
334
334
  </el-flex>
335
335
 
336
336
  <span style="display: block; color: #909399" v-if="task.comment">{{
337
- task.finishTime?.substring(0, 19)
338
- }}</span>
337
+ task.finishTime?.substring(0, 19)
338
+ }}</span>
339
339
  </el-flex>
340
340
  </el-flex>
341
341
  </template>