adtec-core-package 2.5.0 → 2.5.2

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.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -6,18 +6,15 @@
6
6
  */
7
7
 
8
8
  import request from '../../utils/request'
9
- import { IWorkflowCommentVo } from 'adtec-core-package/src/interface/workflow/IWorkflowCommentVo'
9
+ import type { ITpReviewBatch } from '../../interface/ITpReviewBatch.ts'
10
10
 
11
11
  export default {
12
12
  // 查询流程版本
13
- getComment(businessId: string, taskId: string) {
14
- return request.get<IWorkflowCommentVo>('/api/tm/workFlowComment/getComment', {
15
- businessId,
16
- taskId,
17
- })
13
+ getComment(tpApplyId?: string) {
14
+ return request.get<ITpReviewBatch>('/api/tm/tpApplyCheck/getMinReviewBatch', {tpApplyId})
18
15
  },
19
16
  // 添加流程版本
20
- addOrEditComment(data: IWorkflowCommentVo) {
21
- return request.post<IWorkflowCommentVo>('/api/tm/workFlowComment/addOrEditComment', data)
17
+ addOrEditComment(tpReviewBatch: ITpReviewBatch) {
18
+ return request.post<ITpReviewBatch>('/api/tm/tpApplyCheck/updateBatchInfo', tpReviewBatch)
22
19
  },
23
20
  }
@@ -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
 
@@ -5,7 +5,7 @@
5
5
  <script setup lang="ts">
6
6
  import workbenchInstApi from '../../../api/workflow/workflowInstApi'
7
7
  import workflowcommentApi from '../../../api/workflow/workflowCommentApi'
8
- import type { IWorkflowCommentVo } from '../../../interface/workflow/IWorkflowCommentVo'
8
+ import type { ITpReviewBatch } from '../../../interface/ITpReviewBatch.ts'
9
9
  import { ElMessage, ElMessageBox } from 'element-plus'
10
10
  import { ref } from 'vue'
11
11
  import type { IWfProcessInstVo, IWfTaskVo } from '../../../interface/workflow/IWfTaskVo'
@@ -34,7 +34,7 @@ const emit = defineEmits(['viewDetail'])
34
34
  const loading = ref<boolean>(false)
35
35
  const wfProcessInstVo = ref<IWfProcessInstVo>()
36
36
  const ver = ref<SysWorkflowVerType>()
37
- const techComment = ref<IWorkflowCommentVo>()
37
+ const techComment = ref<ITpReviewBatch>()
38
38
 
39
39
  interface IWfTaskGroup {
40
40
  taskName: string
@@ -86,7 +86,6 @@ const init = async (procDefId: string, procInstId: string) => {
86
86
  (item) => item.taskName === '专家预审',
87
87
  )
88
88
  if (expertPretrialIndex !== -1) {
89
- debugger
90
89
  //判断是否是最后一个节点
91
90
  if (
92
91
  expertPretrialIndex < taskGroup.value.length - 1 ||
@@ -97,7 +96,6 @@ const init = async (procDefId: string, procInstId: string) => {
97
96
  //获取保存的评论
98
97
  techComment.value = await workflowcommentApi.getComment(
99
98
  expertPretrialTask.tasks[0].businessId,
100
- expertPretrialTask.tasks[0].taskId,
101
99
  )
102
100
  // 拼接expertPretrialTask 的 tasks里面的所有 comment
103
101
  let allComment = expertPretrialTask.tasks
@@ -124,12 +122,12 @@ const init = async (procDefId: string, procInstId: string) => {
124
122
  parentExecutionId: expertPretrialTask.parentExecutionId,
125
123
  businessId: expertPretrialTask.tasks[0].businessId,
126
124
  createTime: expertPretrialTask.createTime,
127
- finishTime: techComment.value?.techComment
125
+ finishTime: techComment.value?.opinion
128
126
  ? expertPretrialTask.finishTime
129
127
  : undefined,
130
128
  assigneeName: '科技管理员',
131
- comment: techComment.value?.techComment || allComment,
132
- commentList: [{ type: techComment.value?.techComment ? 1 : 0 }],
129
+ comment: techComment.value?.opinion || allComment,
130
+ commentList: [{ type: techComment.value?.opinion ? 1 : 0 }],
133
131
  },
134
132
  ],
135
133
  })
@@ -225,8 +223,7 @@ const saveComment = async (taskInfo: IWfTaskVo) => {
225
223
  loading.value = true
226
224
  techComment.value = await workflowcommentApi.addOrEditComment({
227
225
  ...techComment.value,
228
- ...taskInfo,
229
- ...{ techComment: taskInfo.comment },
226
+ ...{ opinion: taskInfo.comment },
230
227
  })
231
228
  ElMessage.success('保存成功')
232
229
  } catch (err) {
@@ -272,10 +269,13 @@ defineExpose({
272
269
  border-radius: 8px;
273
270
  background: #f8f8f8;
274
271
  "
275
- :style="{ width: task.taskDefKey === 'tech_approval' ? '100%' : '31%',border:task.taskId===taskId?'1px solid var(--el-color-primary)':'' }"
272
+ :style="{
273
+ width: task.taskDefKey === 'tech_approval' ? '100%' : '31%',
274
+ border: task.taskId === taskId ? '1px solid var(--el-color-primary)' : '',
275
+ }"
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="
@@ -303,6 +303,7 @@ defineExpose({
303
303
  >
304
304
  <el-input
305
305
  v-if="
306
+ ver?.version === 4 &&
306
307
  task.taskDefKey === 'tech_approval' &&
307
308
  (userInfo.getUserInfo.roleCodes?.includes('PMRole') ||
308
309
  userInfo.getUserInfo.roleCodes?.includes('TMRole'))
@@ -0,0 +1,52 @@
1
+ import type { BaseEntity } from './BaseEntity.ts'
2
+
3
+ export interface ITpReviewBatch extends BaseEntity {
4
+ /**
5
+ * 主键ID
6
+ */
7
+ id?: string
8
+
9
+ /**
10
+ * 批次号(按照科技项目申报ID自动递增生成)
11
+ */
12
+ batchNum?: number
13
+
14
+ /**
15
+ * 评审类型(存评审类型字典"ComReviewType"值)
16
+ */
17
+ reviewType?: string
18
+
19
+ /**
20
+ * 评审方法表ID
21
+ */
22
+ revMethodId?: string
23
+
24
+ /**
25
+ * 结论值(新增时为空)
26
+ */
27
+ conclusionValue?: string
28
+
29
+ /**
30
+ * 结论描述(新增时为空)
31
+ */
32
+ conclusionText?: string
33
+
34
+ /**
35
+ * 科技项目申报表ID
36
+ */
37
+ tpApplyId?: string
38
+
39
+ /**
40
+ * 结论是否提交
41
+ */
42
+ isSubmit?: string
43
+
44
+ /**
45
+ * 合作经费额度
46
+ */
47
+ cooperateFee?: string
48
+
49
+ opinion?: string
50
+
51
+ revMeetingId?: string
52
+ }
@@ -1,24 +0,0 @@
1
- import type { BaseEntity } from '../BaseEntity.ts'
2
-
3
- export interface IWorkflowCommentVo extends BaseEntity {
4
- /**
5
- * 主键 ID
6
- */
7
- id?: string
8
-
9
- /**
10
- * 业务 ID
11
- */
12
- businessId?: string
13
-
14
- /**
15
- * 当前工作流 ID
16
- */
17
- taskId?: string
18
-
19
- /**
20
- * 汇总结论
21
- */
22
-
23
- techComment?: string
24
- }