chore: codegen

This commit is contained in:
dap 2024-10-06 10:00:59 +08:00
parent 60ae7cc0cc
commit 315a6939dd
2 changed files with 43 additions and 9 deletions

View File

@ -182,23 +182,42 @@ function handleImport() {
:disabled="!checked"
danger
type="primary"
v-access:code="['tool:gen:remove']"
@click="handleMultiDelete"
>
{{ $t('pages.common.delete') }}
</a-button>
<a-button :disabled="!checked" @click="handleBatchGen">
<a-button
:disabled="!checked"
v-access:code="['tool:gen:code']"
@click="handleBatchGen"
>
{{ $t('pages.common.generate') }}
</a-button>
<a-button type="primary" @click="handleImport">
<a-button
type="primary"
v-access:code="['tool:gen:import']"
@click="handleImport"
>
{{ $t('pages.common.import') }}
</a-button>
</Space>
</template>
<template #action="{ row }">
<a-button size="small" type="link" @click.stop="handlePreview(row)">
<a-button
size="small"
type="link"
v-access:code="['tool:gen:preview']"
@click.stop="handlePreview(row)"
>
{{ $t('pages.common.preview') }}
</a-button>
<a-button size="small" type="link" @click.stop="handleEdit(row)">
<a-button
size="small"
type="link"
v-access:code="['tool:gen:edit']"
@click.stop="handleEdit(row)"
>
{{ $t('pages.common.edit') }}
</a-button>
<Popconfirm
@ -206,11 +225,21 @@ function handleImport() {
placement="left"
@confirm="handleSync(row)"
>
<a-button size="small" type="link" @click.stop="">
<a-button
size="small"
type="link"
v-access:code="['tool:gen:edit']"
@click.stop=""
>
{{ $t('pages.common.sync') }}
</a-button>
</Popconfirm>
<a-button size="small" type="link" @click.stop="handleDownload(row)">
<a-button
size="small"
type="link"
v-access:code="['tool:gen:code']"
@click.stop="handleDownload(row)"
>
生成代码
</a-button>
<Popconfirm
@ -218,7 +247,13 @@ function handleImport() {
placement="left"
@confirm="handleDelete(row)"
>
<a-button danger size="small" type="link" @click.stop="">
<a-button
danger
size="small"
type="link"
v-access:code="['tool:gen:remove']"
@click.stop=""
>
{{ $t('pages.common.delete') }}
</a-button>
</Popconfirm>

View File

@ -66,8 +66,7 @@ const gridOptions: VxeGridProps = {
pagerConfig: {},
proxyConfig: {
ajax: {
query: async ({ page }, formValues) => {
console.log(page);
query: async ({ page }, formValues = {}) => {
return await readyToGenList({
pageNum: page.currentPage,
pageSize: page.pageSize,