feat: 支持回退按钮

pull/253/head
shizhong 2023-09-25 13:23:11 +08:00
parent 6888fd90d1
commit 3542b50f7d
1 changed files with 13 additions and 11 deletions

View File

@ -189,6 +189,9 @@
/> />
</template> </template>
</XModal> </XModal>
<!-- 弹窗回退节点 -->
<TaskRollbackDialog ref="taskRollbackRef" @success="getDetail" />
</ContentWrap> </ContentWrap>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -204,6 +207,7 @@ import { setConfAndFields2 } from '@/utils/formCreate'
import type { ApiAttrs } from '@form-create/element-ui/types/config' import type { ApiAttrs } from '@form-create/element-ui/types/config'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { MyProcessViewer } from '@/components/bpmnProcessDesigner/package' import { MyProcessViewer } from '@/components/bpmnProcessDesigner/package'
import TaskRollbackDialog from './TaskRollbackDialogForm.vue'
defineOptions({ name: 'BpmProcessInstanceDetail' }) defineOptions({ name: 'BpmProcessInstanceDetail' })
@ -278,6 +282,9 @@ const getTimelineItemIcon = (item) => {
if (item.result === 4) { if (item.result === 4) {
return 'el-icon-remove-outline' return 'el-icon-remove-outline'
} }
if (item.result === 5) {
return 'el-icon-back'
}
return '' return ''
} }
const getTimelineItemType = (item) => { const getTimelineItemType = (item) => {
@ -293,6 +300,9 @@ const getTimelineItemType = (item) => {
if (item.result === 4) { if (item.result === 4) {
return 'info' return 'info'
} }
if (item.result === 5) {
return 'warning'
}
return '' return ''
} }
@ -354,19 +364,11 @@ const handleDelegate = async (task) => {
console.log(task) console.log(task)
} }
//退
const taskRollbackRef = ref()
/** 处理审批退回的操作 */ /** 处理审批退回的操作 */
const handleBack = async (task) => { const handleBack = async (task) => {
message.error('暂不支持【退回】功能!') taskRollbackRef.value.open(task.id)
// http://blog.wya1.com/article/636697030/details/7296
// const data = {
// id: task.id,
// assigneeUserId: 1
// }
// backTask(data).then(response => {
// this.$modal.msgSuccess("退");
// this.getDetail(); //
// });
console.log(task)
} }
// ========== ========== // ========== ==========