diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts
index a937eae2..1a5b5ecb 100644
--- a/src/api/bpm/processInstance/index.ts
+++ b/src/api/bpm/processInstance/index.ts
@@ -20,14 +20,14 @@ export type ProcessInstanceVO = {
endTime: string
}
-export type ProcessInstanceCCVO = {
- type: number,
- taskName: string,
- taskKey: string,
- processInstanceName: string,
- processInstanceKey: string,
- startUserId: string,
- options:string [],
+export type ProcessInstanceCopyVO = {
+ type: number
+ taskName: string
+ taskKey: string
+ processInstanceName: string
+ processInstanceKey: string
+ startUserId: string
+ options: string[]
reason: string
}
@@ -51,20 +51,6 @@ export const getProcessInstance = async (id: number) => {
return await request.get({ url: '/bpm/process-instance/get?id=' + id })
}
-/**
- * 抄送
- * @param data 抄送数据
- * @returns 是否抄送成功
- */
-export const createProcessInstanceCC = async (data) => {
- return await request.post({ url: '/bpm/process-instance/cc/create', data: data })
+export const getProcessInstanceCopyPage = async (params: any) => {
+ return await request.get({ url: '/bpm/process-instance/copy/page', params })
}
-
-/**
- * 抄送列表
- * @param params
- * @returns
- */
-export const getProcessInstanceCCPage = async (params) => {
- return await request.get({ url: '/bpm/process-instance/cc/my-page', params })
-}
\ No newline at end of file
diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts
index ed434cb0..134a986e 100644
--- a/src/utils/formatTime.ts
+++ b/src/utils/formatTime.ts
@@ -175,18 +175,18 @@ export function formatPast2(ms: number): string {
const minute = Math.floor(ms / (60 * 1000) - day * 24 * 60 - hour * 60)
const second = Math.floor(ms / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - minute * 60)
if (day > 0) {
- return day + '天' + hour + '小时' + minute + '分钟'
+ return day + ' 天' + hour + ' 小时 ' + minute + ' 分钟'
}
if (hour > 0) {
- return hour + '小时' + minute + '分钟'
+ return hour + ' 小时 ' + minute + ' 分钟'
}
if (minute > 0) {
- return minute + '分钟'
+ return minute + ' 分钟'
}
if (second > 0) {
- return second + '秒'
+ return second + ' 秒'
} else {
- return 0 + '秒'
+ return 0 + ' 秒'
}
}
diff --git a/src/views/bpm/processInstance/detail/TaskCCDialogForm.vue b/src/views/bpm/processInstance/detail/TaskCCDialogForm.vue
deleted file mode 100644
index be3bb4f5..00000000
--- a/src/views/bpm/processInstance/detail/TaskCCDialogForm.vue
+++ /dev/null
@@ -1,242 +0,0 @@
-
-
-
-
-
diff --git a/src/views/bpm/processInstance/detail/index.vue b/src/views/bpm/processInstance/detail/index.vue
index 3ce665f6..800ff2f3 100644
--- a/src/views/bpm/processInstance/detail/index.vue
+++ b/src/views/bpm/processInstance/detail/index.vue
@@ -31,6 +31,16 @@
type="textarea"
/>
+
+
+
+
+
@@ -118,6 +128,7 @@ import TaskDelegateForm from './TaskDelegateForm.vue'
import TaskAddSignDialogForm from './TaskAddSignDialogForm.vue'
import { registerComponent } from '@/utils/routerHelper'
import { isEmpty } from '@/utils/is'
+import * as UserApi from '@/api/system/user'
defineOptions({ name: 'BpmProcessInstanceDetail' })
@@ -161,7 +172,8 @@ const handleAudit = async (task, pass) => {
// 2.1 提交审批
const data = {
id: task.id,
- reason: auditForms.value[index].reason
+ reason: auditForms.value[index].reason,
+ copyUserIds: auditForms.value[index].copyUserIds
}
if (pass) {
await TaskApi.approveTask(data)
@@ -180,21 +192,20 @@ const openTaskUpdateAssigneeForm = (id: string) => {
taskUpdateAssigneeFormRef.value.open(id)
}
-const taskDelegateForm = ref()
/** 处理审批退回的操作 */
+const taskDelegateForm = ref()
const handleDelegate = async (task) => {
taskDelegateForm.value.open(task.id)
}
-//回退弹框组件
-const taskReturnDialogRef = ref()
/** 处理审批退回的操作 */
+const taskReturnDialogRef = ref()
const handleBack = async (task) => {
taskReturnDialogRef.value.open(task.id)
}
-const taskAddSignDialogForm = ref()
/** 处理审批加签的操作 */
+const taskAddSignDialogForm = ref()
const handleSign = async (task) => {
taskAddSignDialogForm.value.open(task.id)
}
@@ -304,13 +315,17 @@ const loadRunningTask = (tasks) => {
// 2.3 添加到处理任务
runningTasks.value.push({ ...task })
auditForms.value.push({
- reason: ''
+ reason: '',
+ copyUserIds: []
})
})
}
/** 初始化 */
-onMounted(() => {
+const userOptions = ref([]) // 用户列表
+onMounted(async () => {
getDetail()
+ // 获得用户列表
+ userOptions.value = await UserApi.getSimpleUserList()
})
diff --git a/src/views/bpm/task/cc/index.vue b/src/views/bpm/task/copy/index.vue
similarity index 74%
rename from src/views/bpm/task/cc/index.vue
rename to src/views/bpm/task/copy/index.vue
index 50ddf889..dd41b2e1 100644
--- a/src/views/bpm/task/cc/index.vue
+++ b/src/views/bpm/task/copy/index.vue
@@ -11,14 +11,6 @@
placeholder="请输入流程名称"
/>
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
- 跳转待办
+ 详情
@@ -78,14 +75,14 @@
import { dateFormatter } from '@/utils/formatTime'
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
-defineOptions({ name: 'BpmCCProcessInstance' })
+defineOptions({ name: 'BpmProcessInstanceCopy' })
const { push } = useRouter() // 路由
const loading = ref(false) // 列表的加载中
const total = ref(0) // 列表的总页数
const list = ref([]) // 列表的数据
-const queryParams = ref({
+const queryParams = reactive({
pageNo: 1,
pageSize: 10,
processInstanceId: '',
@@ -98,7 +95,7 @@ const queryFormRef = ref() // 搜索的表单
const getList = async () => {
loading.value = true
try {
- const data = await ProcessInstanceApi.getProcessInstanceCCPage(queryParams)
+ const data = await ProcessInstanceApi.getProcessInstanceCopyPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
@@ -118,7 +115,7 @@ const handleAudit = (row: any) => {
/** 搜索按钮操作 */
const handleQuery = () => {
- queryParams.value.pageNo = 1
+ queryParams.pageNo = 1
getList()
}
diff --git a/src/views/bpm/task/done/TaskDetail.vue b/src/views/bpm/task/done/TaskDetail.vue
deleted file mode 100644
index ff8f313d..00000000
--- a/src/views/bpm/task/done/TaskDetail.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
diff --git a/src/views/bpm/task/done/index.vue b/src/views/bpm/task/done/index.vue
index b190bd4f..d9b32803 100644
--- a/src/views/bpm/task/done/index.vue
+++ b/src/views/bpm/task/done/index.vue
@@ -46,27 +46,50 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ formatPast2(scope.row.durationInMillis) }}
+
+
+
-
-
-
+
+
+
- 详情
- 流程
+ 历史
@@ -78,15 +101,11 @@
@pagination="getList"
/>
-
-
-