|
@@ -9,12 +9,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-for="(item, idx) in myArray" :key="item" class="group_list">
|
|
|
+ <div v-for="(item, idx) in myArray" :key="item.categoryId" class="group_list">
|
|
|
<div class="group_header flex flex-pack-justify flex-align-center">
|
|
|
<div class="group_header_title">
|
|
|
<span>
|
|
|
<template v-if="!item.editor">
|
|
|
- {{ item.name }}
|
|
|
+ {{ item.categoryName }}
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<el-input v-model="item.name" placeholder="请输入流程组名称" v-autoFocus @blur="editFlowGroup('save', item, idx)" />
|
|
@@ -86,31 +86,9 @@
|
|
|
import Draggable from 'vuedraggable'
|
|
|
import { Delete, CircleClose, EditPen, CopyDocument } from '@element-plus/icons-vue'
|
|
|
import { nextTick, onMounted, ref } from 'vue'
|
|
|
-import flowGroup from '@/api/system/flowGroup'
|
|
|
-const myArray = ref([
|
|
|
- {
|
|
|
- name: '考勤',
|
|
|
- id: 1,
|
|
|
- children: [
|
|
|
- { name: '采购申请', title: '各类办公、活动用品采购', seeable: '全员可见', id: 123 },
|
|
|
- { name: '采购申请1', title: '各类办公、活动用品采购', seeable: '全员可见', id: 1232 }
|
|
|
- ],
|
|
|
- editor: false,
|
|
|
- sort: 0
|
|
|
- },
|
|
|
- {
|
|
|
- name: '人事',
|
|
|
- id: 2,
|
|
|
- children: [
|
|
|
- { name: '采购申请', title: '各类办公、活动用品采购', seeable: '全员可见', id: 123 },
|
|
|
- { name: '采购申请1', title: '各类办公、活动用品采购', seeable: '全员可见', id: 1232 }
|
|
|
- ],
|
|
|
- editor: false,
|
|
|
- sort: 1
|
|
|
- },
|
|
|
- { name: '财务', id: 3, editor: false, sort: 2 },
|
|
|
- { name: '行政', id: 4, editor: false, sort: 3 }
|
|
|
-])
|
|
|
+import flowGroup from '@/api/flow/group'
|
|
|
+import flowDefinition from '@/api/flow/definition'
|
|
|
+const myArray = ref([])
|
|
|
const hideAddInput = ref(true)
|
|
|
|
|
|
const listGroupName = ref('')
|
|
@@ -142,7 +120,8 @@ const addFlowGroup = async () => {
|
|
|
// 流程组列表
|
|
|
const flowGroupListAll = () => {
|
|
|
try {
|
|
|
- const data = flowGroup.flowGroupListAllApi({})
|
|
|
+ const data = flowDefinition.flowDefinitionListCategoryApi({})
|
|
|
+ myArray.value = data || []
|
|
|
console.log(data)
|
|
|
} catch (e) {
|
|
|
console.log(e)
|