|
|
@ -1,14 +1,35 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<PageWrapper |
|
|
|
|
|
|
|
contentClass="flex" |
|
|
|
|
|
|
|
contentFullHeight |
|
|
|
|
|
|
|
fixedHeight |
|
|
|
|
|
|
|
dense |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="m-4 mr-0 overflow-hidden bg-white w-1/4 xl:w-1/5"> |
|
|
|
|
|
|
|
<BasicTree title="流程分类" |
|
|
|
|
|
|
|
toolbar |
|
|
|
|
|
|
|
search |
|
|
|
|
|
|
|
defaultExpandAll |
|
|
|
|
|
|
|
:clickRowToExpand="false" |
|
|
|
|
|
|
|
:treeData="state.treeData" |
|
|
|
|
|
|
|
:fieldNames="{ key: 'id', title: 'name' }" |
|
|
|
|
|
|
|
@select="handleSelect" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</div> |
|
|
|
<BasicTable |
|
|
|
<BasicTable |
|
|
|
|
|
|
|
class="w-3/4 xl:w-4/5" |
|
|
|
@register="registerTable" |
|
|
|
@register="registerTable" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
> |
|
|
|
> |
|
|
|
<template #toolbar> |
|
|
|
<template #tableTitle> |
|
|
|
<a-button |
|
|
|
<a-button |
|
|
|
type="primary" |
|
|
|
type="primary" |
|
|
|
@click="handleAdd()" |
|
|
|
@click="handleAdd()" |
|
|
|
>新增</a-button> |
|
|
|
>新增</a-button> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="handleAdd()" |
|
|
|
|
|
|
|
>数据库导入表单</a-button> |
|
|
|
<a-button |
|
|
|
<a-button |
|
|
|
type="primary" |
|
|
|
type="primary" |
|
|
|
:disabled="state.single" |
|
|
|
:disabled="state.single" |
|
|
@ -18,7 +39,27 @@ |
|
|
|
type="primary" |
|
|
|
type="primary" |
|
|
|
:disabled="state.multiple" |
|
|
|
:disabled="state.multiple" |
|
|
|
@click="handleDel()" |
|
|
|
@click="handleDel()" |
|
|
|
>删除</a-button> |
|
|
|
>移除</a-button> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
:disabled="state.single" |
|
|
|
|
|
|
|
@click="handleEdit()" |
|
|
|
|
|
|
|
>生成代码</a-button> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
:disabled="state.single" |
|
|
|
|
|
|
|
@click="handleEdit()" |
|
|
|
|
|
|
|
>创建菜单</a-button> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
:disabled="state.single" |
|
|
|
|
|
|
|
@click="handleEdit()" |
|
|
|
|
|
|
|
>添加到java类型</a-button> |
|
|
|
|
|
|
|
<a-button |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
:disabled="state.single" |
|
|
|
|
|
|
|
@click="handleEdit()" |
|
|
|
|
|
|
|
>获取流程表单</a-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #bodyCell="{ column, record }"> |
|
|
|
<template #bodyCell="{ column, record }"> |
|
|
|
<template v-if="column.key === 'action'"> |
|
|
|
<template v-if="column.key === 'action'"> |
|
|
@ -30,22 +71,29 @@ |
|
|
|
onClick: handleEdit.bind(null, record) |
|
|
|
onClick: handleEdit.bind(null, record) |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: '复制', |
|
|
|
label: '移除', |
|
|
|
icon: 'fa-regular:copy', |
|
|
|
icon: 'ant-design:delete-outlined', |
|
|
|
onClick: handleCopy.bind(null, record) |
|
|
|
color: 'error', |
|
|
|
}, |
|
|
|
onClick: handleDel.bind(null, record) |
|
|
|
|
|
|
|
}]" |
|
|
|
|
|
|
|
:dropDownActions="[ |
|
|
|
{ |
|
|
|
{ |
|
|
|
label: '删除', |
|
|
|
label: '删除', |
|
|
|
icon: 'ant-design:delete-outlined', |
|
|
|
icon: 'ant-design:delete-outlined', |
|
|
|
color: 'error', |
|
|
|
color: 'error', |
|
|
|
onClick: handleDel.bind(null, record) |
|
|
|
onClick: handleDel.bind(null, record) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
label: '同步数据库', |
|
|
|
|
|
|
|
icon: 'fa-regular:copy', |
|
|
|
|
|
|
|
onClick: handleCopy.bind(null, record) |
|
|
|
}]" |
|
|
|
}]" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</BasicTable> |
|
|
|
</BasicTable> |
|
|
|
<GenTableModal @register="registerModal" @success="handleRefreshTable"/> |
|
|
|
<GenTableModal @register="registerModal" @success="handleRefreshTable"/> |
|
|
|
</div> |
|
|
|
</PageWrapper> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup> |
|
|
|
<script lang="ts" setup> |
|
|
@ -56,10 +104,13 @@ |
|
|
|
import GenTableModal from './GenTableModal.vue'; |
|
|
|
import GenTableModal from './GenTableModal.vue'; |
|
|
|
import { columns, searchFormSchema } from './genTable.data'; |
|
|
|
import { columns, searchFormSchema } from './genTable.data'; |
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'; |
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'; |
|
|
|
|
|
|
|
import {PageWrapper} from '/@/components/Page'; |
|
|
|
|
|
|
|
import {BasicTree, TreeItem} from '/@/components/Tree'; |
|
|
|
|
|
|
|
|
|
|
|
interface TableState { |
|
|
|
interface TableState { |
|
|
|
single: boolean; |
|
|
|
single: boolean; |
|
|
|
multiple: boolean; |
|
|
|
multiple: boolean; |
|
|
|
|
|
|
|
treeData: TreeItem[]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 通用变量统一声明区域 */ |
|
|
|
/** 通用变量统一声明区域 */ |
|
|
@ -67,7 +118,8 @@ |
|
|
|
// 非单个禁用 |
|
|
|
// 非单个禁用 |
|
|
|
single: true, |
|
|
|
single: true, |
|
|
|
// 非多个禁用 |
|
|
|
// 非多个禁用 |
|
|
|
multiple: true |
|
|
|
multiple: true, |
|
|
|
|
|
|
|
treeData: [] |
|
|
|
}); |
|
|
|
}); |
|
|
|
const { createConfirm, createMessage } = useMessage(); |
|
|
|
const { createConfirm, createMessage } = useMessage(); |
|
|
|
const [registerModal, { openModal }] = useModal(); |
|
|
|
const [registerModal, { openModal }] = useModal(); |
|
|
@ -93,7 +145,7 @@ |
|
|
|
width: 220, |
|
|
|
width: 220, |
|
|
|
title: '操作', |
|
|
|
title: '操作', |
|
|
|
dataIndex: 'action', |
|
|
|
dataIndex: 'action', |
|
|
|
fixed: false |
|
|
|
fixed: 'right' |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleSearchInfoFn: () => clearSelectedRowKeys() |
|
|
|
handleSearchInfoFn: () => clearSelectedRowKeys() |
|
|
|
}); |
|
|
|
}); |
|
|
|