adtec-core-package 2.5.1 → 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.1",
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
  }
@@ -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'
@@ -27,14 +27,14 @@ 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)
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
@@ -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,10 +83,9 @@ 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
- 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,14 +122,14 @@ 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 }]
133
- }
134
- ]
129
+ comment: techComment.value?.opinion || allComment,
130
+ commentList: [{ type: techComment.value?.opinion ? 1 : 0 }],
131
+ },
132
+ ],
135
133
  })
136
134
  }
137
135
  }
@@ -149,7 +147,7 @@ const setTaskGroup = (tasks: IWfTaskVo[]) => {
149
147
  for (const hisTask of tasks) {
150
148
  const exist = taskGroup.value.find(
151
149
  (x) =>
152
- x.taskDefKey === hisTask.taskDefKey && x.parentExecutionId === hisTask.parentExecutionId
150
+ x.taskDefKey === hisTask.taskDefKey && x.parentExecutionId === hisTask.parentExecutionId,
153
151
  )
154
152
  if (exist) {
155
153
  if (hisTask.finishTime && hisTask.finishTime > exist.finishTime) {
@@ -175,14 +173,14 @@ const setTaskGroup = (tasks: IWfTaskVo[]) => {
175
173
  parentExecutionId: hisTask.parentExecutionId || '',
176
174
  finishTime: hisTask.finishTime || '',
177
175
  createTime: hisTask.createTime || '',
178
- tasks: [hisTask]
176
+ tasks: [hisTask],
179
177
  })
180
178
  }
181
179
  }
182
180
  if (taskGroup.value.length > 0) {
183
181
  taskGroup.value.sort((a, b) => {
184
182
  const n1 = (a.finishTime ? a.finishTime : '9999').localeCompare(
185
- b.finishTime ? b.finishTime : '9999'
183
+ b.finishTime ? b.finishTime : '9999',
186
184
  )
187
185
  if (n1 == 0) {
188
186
  return a.createTime.localeCompare(b.createTime)
@@ -204,7 +202,7 @@ const getStatus = (task: IWfTaskVo) => {
204
202
  if (task.commentList && task.commentList.length > 0) {
205
203
  return ['待办', '已办', '已办', '终止', '委派', '转办', '终止', '撤回'][
206
204
  Number(task.commentList[task.commentList.length - 1].type)
207
- ]
205
+ ]
208
206
  }
209
207
  return ''
210
208
  }
@@ -216,7 +214,7 @@ const saveComment = async (taskInfo: IWfTaskVo) => {
216
214
  const confirm = await ElMessageBox.confirm('您确定保存数据?', '提示', {
217
215
  confirmButtonText: '确定',
218
216
  cancelButtonText: '取消',
219
- type: 'warning'
217
+ type: 'warning',
220
218
  })
221
219
  if (!confirm) {
222
220
  return
@@ -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) {
@@ -236,7 +233,7 @@ const saveComment = async (taskInfo: IWfTaskVo) => {
236
233
  }
237
234
  }
238
235
  defineExpose({
239
- init
236
+ init,
240
237
  })
241
238
  </script>
242
239
 
@@ -272,7 +269,10 @@ 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
278
  <el-auto-tool-tip :content="task.assigneeName"></el-auto-tool-tip>
@@ -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,8 @@ defineExpose({
302
302
  "
303
303
  >
304
304
  <el-input
305
- v-if="ver?.version===4 &&
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'))
@@ -334,8 +335,8 @@ defineExpose({
334
335
  </el-flex>
335
336
 
336
337
  <span style="display: block; color: #909399" v-if="task.comment">{{
337
- task.finishTime?.substring(0, 19)
338
- }}</span>
338
+ task.finishTime?.substring(0, 19)
339
+ }}</span>
339
340
  </el-flex>
340
341
  </el-flex>
341
342
  </template>
@@ -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
- }