|
|
@ -99,6 +99,19 @@ |
|
|
|
/> |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
<template #form-categoryId> |
|
|
|
|
|
|
|
<ApiTreeSelect |
|
|
|
|
|
|
|
ref="formCategoryIdElRef" |
|
|
|
|
|
|
|
placeholder="请选择表单分类" |
|
|
|
|
|
|
|
:fieldNames="{ |
|
|
|
|
|
|
|
label: 'name', |
|
|
|
|
|
|
|
key: 'id', |
|
|
|
|
|
|
|
value: 'id' |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
:api="listFormCategory" |
|
|
|
|
|
|
|
:listToTree="true" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</template> |
|
|
|
</BasicTable> |
|
|
|
</BasicTable> |
|
|
|
<FormModal @register="registerModal" @success="handleRefreshTable"/> |
|
|
|
<FormModal @register="registerModal" @success="handleRefreshTable"/> |
|
|
|
<FormCategoryModal @register="registerFormCategoryModal" @success="handleRefreshTree"/> |
|
|
|
<FormCategoryModal @register="registerFormCategoryModal" @success="handleRefreshTree"/> |
|
|
@ -107,7 +120,7 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts"> |
|
|
|
<script lang="ts"> |
|
|
|
import { defineComponent, reactive, toRaw, onMounted } from 'vue'; |
|
|
|
import { defineComponent, reactive, toRaw, onMounted, ref } from 'vue'; |
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
|
|
|
import { listFormDefinition, delFormDefinition, } from '/@/api/platform/workflow/extension/controller/formDefinition'; |
|
|
|
import { listFormDefinition, delFormDefinition, } from '/@/api/platform/workflow/extension/controller/formDefinition'; |
|
|
|
import { PageWrapper } from '/@/components/Page'; |
|
|
|
import { PageWrapper } from '/@/components/Page'; |
|
|
@ -122,13 +135,13 @@ |
|
|
|
import { listFormCategory, delFormCategory } from '/@/api/platform/workflow/extension/controller/formCategory'; |
|
|
|
import { listFormCategory, delFormCategory } from '/@/api/platform/workflow/extension/controller/formCategory'; |
|
|
|
import { PlusOutlined, FormOutlined, DeleteOutlined } from '@ant-design/icons-vue'; |
|
|
|
import { PlusOutlined, FormOutlined, DeleteOutlined } from '@ant-design/icons-vue'; |
|
|
|
import { useRouter } from 'vue-router'; |
|
|
|
import { useRouter } from 'vue-router'; |
|
|
|
|
|
|
|
import ApiTreeSelect from '/@/components/Form/src/components/ApiTreeSelect.vue'; |
|
|
|
|
|
|
|
|
|
|
|
/** 类型规范统一声明定义区域 */ |
|
|
|
/** 类型规范统一声明定义区域 */ |
|
|
|
interface TableState { |
|
|
|
interface TableState { |
|
|
|
ids: string[]; |
|
|
|
ids: string[]; |
|
|
|
single: boolean; |
|
|
|
single: boolean; |
|
|
|
multiple: boolean; |
|
|
|
multiple: boolean; |
|
|
|
searchInfo: Recordable; |
|
|
|
|
|
|
|
treeData: TreeItem[]; |
|
|
|
treeData: TreeItem[]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -144,7 +157,8 @@ |
|
|
|
FormOutlined, |
|
|
|
FormOutlined, |
|
|
|
DeleteOutlined, |
|
|
|
DeleteOutlined, |
|
|
|
WorkflowFormDesign, |
|
|
|
WorkflowFormDesign, |
|
|
|
FormCategoryModal |
|
|
|
FormCategoryModal, |
|
|
|
|
|
|
|
ApiTreeSelect |
|
|
|
}, |
|
|
|
}, |
|
|
|
setup() { |
|
|
|
setup() { |
|
|
|
|
|
|
|
|
|
|
@ -156,11 +170,10 @@ |
|
|
|
single: true, |
|
|
|
single: true, |
|
|
|
// 非多个禁用 |
|
|
|
// 非多个禁用 |
|
|
|
multiple: true, |
|
|
|
multiple: true, |
|
|
|
// 搜索信息 |
|
|
|
|
|
|
|
searchInfo: {}, |
|
|
|
|
|
|
|
treeData: [] |
|
|
|
treeData: [] |
|
|
|
}); |
|
|
|
}); |
|
|
|
const { push } = useRouter(); |
|
|
|
const { push } = useRouter(); |
|
|
|
|
|
|
|
const formCategoryIdElRef = ref(); |
|
|
|
const { createConfirm, createMessage } = useMessage(); |
|
|
|
const { createConfirm, createMessage } = useMessage(); |
|
|
|
const [registerModal, { openModal }] = useModal(); |
|
|
|
const [registerModal, { openModal }] = useModal(); |
|
|
|
const [registerFormCategoryModal, { openModal: openFormCategoryModal }] = useModal(); |
|
|
|
const [registerFormCategoryModal, { openModal: openFormCategoryModal }] = useModal(); |
|
|
@ -184,7 +197,6 @@ |
|
|
|
bordered: true, |
|
|
|
bordered: true, |
|
|
|
clickToRowSelect: false, |
|
|
|
clickToRowSelect: false, |
|
|
|
showIndexColumn: false, |
|
|
|
showIndexColumn: false, |
|
|
|
searchInfo: state.searchInfo, |
|
|
|
|
|
|
|
actionColumn: { |
|
|
|
actionColumn: { |
|
|
|
width: 220, |
|
|
|
width: 220, |
|
|
|
title: '操作', |
|
|
|
title: '操作', |
|
|
@ -266,12 +278,7 @@ |
|
|
|
/** 处理树形列表刷新 */ |
|
|
|
/** 处理树形列表刷新 */ |
|
|
|
async function handleRefreshTree() { |
|
|
|
async function handleRefreshTree() { |
|
|
|
state.treeData = listToTree(await listFormCategory()); |
|
|
|
state.treeData = listToTree(await listFormCategory()); |
|
|
|
await getForm().updateSchema({ |
|
|
|
await getForm().resetFields(); |
|
|
|
field: 'categoryId', |
|
|
|
|
|
|
|
componentProps: { |
|
|
|
|
|
|
|
treeData: state.treeData |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 处理工作流表单设计 */ |
|
|
|
/** 处理工作流表单设计 */ |
|
|
@ -309,7 +316,9 @@ |
|
|
|
handleRefreshTree, |
|
|
|
handleRefreshTree, |
|
|
|
handleFormCategoryAdd, |
|
|
|
handleFormCategoryAdd, |
|
|
|
handleFormCategoryEdit, |
|
|
|
handleFormCategoryEdit, |
|
|
|
handleFormCategoryDel |
|
|
|
handleFormCategoryDel, |
|
|
|
|
|
|
|
listFormCategory, |
|
|
|
|
|
|
|
formCategoryIdElRef |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|