|
@@ -34,41 +34,41 @@
|
|
|
</div>
|
|
|
<div class="group_body">
|
|
|
<ul class="group_list_ul">
|
|
|
- <draggable :list="item.children" item-key="id">
|
|
|
+ <draggable :list="item.processList" item-key="id">
|
|
|
<template #item="{ element }">
|
|
|
<div>
|
|
|
<li class="group_item flex flex-align-center">
|
|
|
<div class="group_itemIcon">
|
|
|
- <img src="https://lf3-ea.bytetos.com/obj/goofy/ee/approval/approval-admin/image/iconLib/v3/bought.png" />
|
|
|
+ <img :src="element.processIcon" />
|
|
|
</div>
|
|
|
<div class="group_itemLeft">
|
|
|
<div class="group_itemNameWrapper flex flex-align-center" style="margin-bottom: 5px">
|
|
|
<div class="group_itemName">
|
|
|
- <span>{{ element.name }}</span>
|
|
|
+ <span>{{ element.processName }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="group_itemIntro">{{ element.title }}</div>
|
|
|
</div>
|
|
|
- <div class="group_itemSeeable">{{ element.seeable }}</div>
|
|
|
+ <div class="group_itemSeeable">{{ element.processKey }}</div>
|
|
|
<div class="group_itemOperations">
|
|
|
<el-space wrap>
|
|
|
<el-tooltip effect="dark" content="编辑" placement="top">
|
|
|
- <el-icon :size="16"><EditPen /></el-icon>
|
|
|
+ <el-icon :size="16" @click="updateEv(element.processId)"><EditPen /></el-icon>
|
|
|
</el-tooltip>
|
|
|
</el-space>
|
|
|
<el-space wrap>
|
|
|
<el-tooltip effect="dark" content="复制" placement="top">
|
|
|
- <el-icon :size="16"><CopyDocument /></el-icon>
|
|
|
+ <el-icon :size="16" @click="copyEv(element.processId)"><CopyDocument /></el-icon>
|
|
|
</el-tooltip>
|
|
|
</el-space>
|
|
|
<el-space wrap>
|
|
|
<el-tooltip effect="dark" content="禁用" placement="top">
|
|
|
- <el-icon :size="16"><CircleClose /></el-icon>
|
|
|
+ <el-icon :size="16" @click="enabledEv(element.processId)"><CircleClose /></el-icon>
|
|
|
</el-tooltip>
|
|
|
</el-space>
|
|
|
<el-space wrap>
|
|
|
<el-tooltip effect="dark" content="删除" placement="top">
|
|
|
- <el-icon :size="16"><Delete /></el-icon>
|
|
|
+ <el-icon :size="16" @click="stopEv(element.processId)"><Delete /></el-icon>
|
|
|
</el-tooltip>
|
|
|
</el-space>
|
|
|
</div>
|
|
@@ -89,6 +89,7 @@ import { nextTick, onMounted, ref } from 'vue'
|
|
|
import flowGroup from '@/api/flow/group'
|
|
|
import flowDefinition from '@/api/flow/definition'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
+import process from '@/api/flow/process'
|
|
|
const myArray = ref([])
|
|
|
const hideAddInput = ref(true)
|
|
|
|
|
@@ -130,7 +131,7 @@ const flowGroupListAll = async () => {
|
|
|
}
|
|
|
|
|
|
// 流程组删除
|
|
|
-const deleteFlowGroup = item => {
|
|
|
+const deleteFlowGroup = (item: any) => {
|
|
|
try {
|
|
|
// todo 这里需要判断当前的流程组下是否有实例,有不能删除,没有 直接调用删除接口
|
|
|
ElMessageBox.confirm('是否删除该分组?', '提示', {
|
|
@@ -174,6 +175,32 @@ const editFlowGroup = async (type, item, idx) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// 删除
|
|
|
+const stopEv = async (id: any) => {
|
|
|
+ await process.progressDeleteApi({ id })
|
|
|
+ flowGroupListAll()
|
|
|
+ console.log('停用')
|
|
|
+}
|
|
|
+
|
|
|
+// 禁用
|
|
|
+const enabledEv = async (id: any) => {
|
|
|
+ await process.processUpdateStateApi({ id, state: 0 })
|
|
|
+ flowGroupListAll()
|
|
|
+ console.log('禁用')
|
|
|
+}
|
|
|
+
|
|
|
+// 复制
|
|
|
+const copyEv = async (id: any) => {
|
|
|
+ await process.progressCloneApi({ id })
|
|
|
+ flowGroupListAll()
|
|
|
+ console.log('复制')
|
|
|
+}
|
|
|
+
|
|
|
+// 修改
|
|
|
+const updateEv = async () => {
|
|
|
+ console.log('修改')
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
nextTick(() => {
|
|
|
flowGroupListAll()
|