wy
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import type { FormSchemaGetter } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
import { renderDict } from '#/utils/render';
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
@@ -31,23 +33,23 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'accessPort',
|
||||
label: '设备端口',
|
||||
label: '端口',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
},
|
||||
component: 'Input',
|
||||
fieldName: 'accssType',
|
||||
label: '门禁设备类型',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'factoryCode',
|
||||
label: '工程编号',
|
||||
label: '工厂编码',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_KZKLX 便于维护
|
||||
options: getDictOptions('wy_kzklx'),
|
||||
},
|
||||
fieldName: 'controlType',
|
||||
label: '控制卡类型:1-系统,2-E8',
|
||||
@@ -72,12 +74,21 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
fieldName: 'dataState',
|
||||
label: '数据状态:1有效,0无效',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'searchValue',
|
||||
label: '搜索值',
|
||||
},
|
||||
];
|
||||
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
// export const columns: () => VxeGridProps['columns'] = () => [
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '主键',
|
||||
field: 'id',
|
||||
},
|
||||
{
|
||||
title: '门禁设备编码',
|
||||
field: 'accessCode',
|
||||
@@ -99,7 +110,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'accessIp',
|
||||
},
|
||||
{
|
||||
title: '设备端口',
|
||||
title: '端口',
|
||||
field: 'accessPort',
|
||||
},
|
||||
{
|
||||
@@ -107,12 +118,18 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'accssType',
|
||||
},
|
||||
{
|
||||
title: '工程编号',
|
||||
title: '工厂编码',
|
||||
field: 'factoryCode',
|
||||
},
|
||||
{
|
||||
title: '控制卡类型:1-系统,2-E8',
|
||||
field: 'controlType',
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_KZKLX 便于维护
|
||||
return renderDict(row.controlType, 'wy_kzklx');
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '控制卡类型编码',
|
||||
@@ -130,6 +147,10 @@ export const columns: VxeGridProps['columns'] = [
|
||||
title: '数据状态:1有效,0无效',
|
||||
field: 'dataState',
|
||||
},
|
||||
{
|
||||
title: '搜索值',
|
||||
field: 'searchValue',
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
@@ -140,6 +161,15 @@ export const columns: VxeGridProps['columns'] = [
|
||||
];
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '主键',
|
||||
fieldName: 'id',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
show: () => false,
|
||||
triggerFields: [''],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '门禁设备编码',
|
||||
fieldName: 'accessCode',
|
||||
@@ -170,20 +200,18 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '设备端口',
|
||||
label: '端口',
|
||||
fieldName: 'accessPort',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '门禁设备类型',
|
||||
fieldName: 'accssType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '工程编号',
|
||||
label: '工厂编码',
|
||||
fieldName: 'factoryCode',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
@@ -193,6 +221,8 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'controlType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
// 可选从DictEnum中获取 DictEnum.WY_KZKLX 便于维护
|
||||
options: getDictOptions('wy_kzklx'),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
@@ -218,4 +248,9 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '搜索值',
|
||||
fieldName: 'searchValue',
|
||||
component: 'Input',
|
||||
},
|
||||
];
|
||||
|
Reference in New Issue
Block a user