初版代码’

This commit is contained in:
2025-06-19 09:50:46 +08:00
parent 06a0e3649d
commit d980195302
20 changed files with 470 additions and 163 deletions

View File

@@ -44,12 +44,21 @@ export const querySchema: FormSchemaGetter = () => [
fieldName: 'lat',
label: '维度',
},
{
component: 'Input',
fieldName: 'dataState',
label: '数据状态1有效0无效',
},
];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '主键ID',
field: 'id',
},
{
title: '城市编码',
field: 'areaCode',
@@ -84,6 +93,10 @@ export const columns: VxeGridProps['columns'] = [
title: '维度',
field: 'lat',
},
{
title: '数据状态1有效0无效',
field: 'dataState',
},
{
field: 'action',
fixed: 'right',
@@ -98,6 +111,7 @@ export const modalSchema: FormSchemaGetter = () => [
label: '主键ID',
fieldName: 'id',
component: 'Input',
rules: 'required',
},
{
label: '城市编码',
@@ -148,4 +162,10 @@ export const modalSchema: FormSchemaGetter = () => [
component: 'Input',
rules: 'required',
},
{
label: '数据状态1有效0无效',
fieldName: 'dataState',
component: 'Input',
rules: 'required',
},
];

View File

@@ -9,10 +9,10 @@ import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'ant-design-vue';
import dayjs from 'dayjs';
import {
import {
useVbenVxeGrid,
vxeCheckboxChecked,
type VxeGridProps
type VxeGridProps
} from '#/adapter/vxe-table';
import {
@@ -118,8 +118,7 @@ function handleMultiDelete() {
}
function handleDownloadExcel() {
commonDownloadExcel(cityAreaExport, '行政区划
数据', tableApi.formApi.form.values, {
commonDownloadExcel(cityAreaExport, '行政区划数据', tableApi.formApi.form.values, {
fieldMappingTime: formOptions.fieldMappingTime,
});
}
@@ -140,8 +139,8 @@ function handleDownloadExcel() {
<a-button
:disabled="!vxeCheckboxChecked(tableApi)"
danger
type="primary"
v-access:code="['property:cityArea:remove']"
type="primary"
v-access:code="['property:cityArea:remove']"
@click="handleMultiDelete">
{{ $t('pages.common.delete') }}
</a-button>