This commit is contained in:
parent
9c08cca095
commit
b2acba4114
@ -1,7 +1,6 @@
|
|||||||
import type { FormSchemaGetter } from '#/adapter/form';
|
import type { FormSchemaGetter } from '#/adapter/form';
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
|
|
||||||
|
|
||||||
export const querySchema: FormSchemaGetter = () => [
|
export const querySchema: FormSchemaGetter = () => [
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
@ -20,32 +19,15 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {},
|
||||||
},
|
|
||||||
fieldName: 'libType',
|
fieldName: 'libType',
|
||||||
label: '库类型,1:人员库,2:工服库',
|
label: '库类型',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {},
|
||||||
},
|
|
||||||
fieldName: 'busiType',
|
fieldName: 'busiType',
|
||||||
label: '库的业务类型 1: 门禁库,2: 黑名单库',
|
label: '业务类型',
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'createById',
|
|
||||||
label: '创建人id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'updateById',
|
|
||||||
label: '更新人id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Input',
|
|
||||||
fieldName: 'searchValue',
|
|
||||||
label: '搜索值',
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -126,32 +108,15 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '库类型,1:人员库,2:工服库',
|
label: '库类型',
|
||||||
fieldName: 'libType',
|
fieldName: 'libType',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {},
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '库的业务类型 1: 门禁库,2: 黑名单库',
|
label: '业务类型',
|
||||||
fieldName: 'busiType',
|
fieldName: 'busiType',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {},
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '创建人id',
|
|
||||||
fieldName: 'createById',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '更新人id',
|
|
||||||
fieldName: 'updateById',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '搜索值',
|
|
||||||
fieldName: 'searchValue',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -1,30 +1,24 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Recordable } from '@vben/types';
|
import type { VbenFormProps } from '@vben/common-ui';
|
||||||
|
|
||||||
import { ref } from 'vue';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
|
import type { PersonLibForm } from '#/api/sis/personLib/model';
|
||||||
|
|
||||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
import { Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { getVxePopupContainer } from '@vben/utils';
|
import { getVxePopupContainer } from '@vben/utils';
|
||||||
|
|
||||||
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
||||||
import dayjs from 'dayjs';
|
|
||||||
|
|
||||||
import {
|
|
||||||
useVbenVxeGrid,
|
|
||||||
vxeCheckboxChecked,
|
|
||||||
type VxeGridProps
|
|
||||||
} from '#/adapter/vxe-table';
|
|
||||||
|
|
||||||
|
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
personLibExport,
|
personLibExport,
|
||||||
personLibList,
|
personLibList,
|
||||||
personLibRemove,
|
personLibRemove,
|
||||||
} from '#/api/sis/personLib';
|
} from '#/api/sis/personLib';
|
||||||
import type { PersonLibForm } from '#/api/sis/personLib/model';
|
|
||||||
import { commonDownloadExcel } from '#/utils/file/download';
|
import { commonDownloadExcel } from '#/utils/file/download';
|
||||||
|
|
||||||
import personLibModal from './personLib-modal.vue';
|
|
||||||
import { columns, querySchema } from './data';
|
import { columns, querySchema } from './data';
|
||||||
|
import personLibModal from './personLib-modal.vue';
|
||||||
|
|
||||||
const formOptions: VbenFormProps = {
|
const formOptions: VbenFormProps = {
|
||||||
commonConfig: {
|
commonConfig: {
|
||||||
@ -76,7 +70,7 @@ const gridOptions: VxeGridProps = {
|
|||||||
keyField: 'id',
|
keyField: 'id',
|
||||||
},
|
},
|
||||||
// 表格全局唯一表示 保存列配置需要用到
|
// 表格全局唯一表示 保存列配置需要用到
|
||||||
id: 'sis-personLib-index'
|
id: 'sis-personLib-index',
|
||||||
};
|
};
|
||||||
|
|
||||||
const [BasicTable, tableApi] = useVbenVxeGrid({
|
const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||||
@ -118,9 +112,14 @@ function handleMultiDelete() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleDownloadExcel() {
|
function handleDownloadExcel() {
|
||||||
commonDownloadExcel(personLibExport, '人像库数据', tableApi.formApi.form.values, {
|
commonDownloadExcel(
|
||||||
fieldMappingTime: formOptions.fieldMappingTime,
|
personLibExport,
|
||||||
});
|
'人像库数据',
|
||||||
|
tableApi.formApi.form.values,
|
||||||
|
{
|
||||||
|
fieldMappingTime: formOptions.fieldMappingTime,
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -140,7 +139,8 @@ function handleDownloadExcel() {
|
|||||||
danger
|
danger
|
||||||
type="primary"
|
type="primary"
|
||||||
v-access:code="['sis:personLib:remove']"
|
v-access:code="['sis:personLib:remove']"
|
||||||
@click="handleMultiDelete">
|
@click="handleMultiDelete"
|
||||||
|
>
|
||||||
{{ $t('pages.common.delete') }}
|
{{ $t('pages.common.delete') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import type { FormSchemaGetter } from '#/adapter/form';
|
import type { FormSchemaGetter } from '#/adapter/form';
|
||||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
|
|
||||||
|
|
||||||
export const querySchema: FormSchemaGetter = () => [
|
export const querySchema: FormSchemaGetter = () => [
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
@ -25,11 +24,9 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {},
|
||||||
},
|
|
||||||
fieldName: 'sex',
|
fieldName: 'sex',
|
||||||
label: '性别 1:男
|
label: '性别',
|
||||||
2:女 99:未说明',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
@ -43,12 +40,9 @@ export const querySchema: FormSchemaGetter = () => [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {},
|
||||||
},
|
|
||||||
fieldName: 'certificateType',
|
fieldName: 'certificateType',
|
||||||
label: '证件类型
|
label: '证件类型',
|
||||||
1:身份证 2:护照
|
|
||||||
3:行驶证 99:其它',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
@ -102,9 +96,7 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
field: 'imgUrl',
|
field: 'imgUrl',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '性别 1:男
|
title: '性别',
|
||||||
2:女 99:未说明',
|
|
||||||
field: 'sex',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '邮箱',
|
title: '邮箱',
|
||||||
@ -115,9 +107,7 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
field: 'tel',
|
field: 'tel',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '证件类型
|
title: '证件类型',
|
||||||
1:身份证 2:护照
|
|
||||||
3:行驶证 99:其它',
|
|
||||||
field: 'certificateType',
|
field: 'certificateType',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -143,7 +133,9 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
{
|
{
|
||||||
field: 'action',
|
field: 'action',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
slots: { default: 'action' },
|
slots: {
|
||||||
|
default: 'action',
|
||||||
|
},
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: 180,
|
width: 180,
|
||||||
},
|
},
|
||||||
@ -183,12 +175,10 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
rules: 'required',
|
rules: 'required',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '性别 1:男
|
label: '性别 1:男',
|
||||||
2:女 99:未说明',
|
|
||||||
fieldName: 'sex',
|
fieldName: 'sex',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {},
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '邮箱',
|
label: '邮箱',
|
||||||
@ -201,13 +191,10 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '证件类型
|
label: '证件类型',
|
||||||
1:身份证 2:护照
|
|
||||||
3:行驶证 99:其它',
|
|
||||||
fieldName: 'certificateType',
|
fieldName: 'certificateType',
|
||||||
component: 'Select',
|
component: 'Select',
|
||||||
componentProps: {
|
componentProps: {},
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '证件号码',
|
label: '证件号码',
|
||||||
|
Loading…
Reference in New Issue
Block a user