1、资产管理
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 6m27s

This commit is contained in:
2025-06-24 14:52:45 +08:00
parent ed326906f5
commit a107323e36
37 changed files with 521 additions and 454 deletions

View File

@@ -1,100 +1,49 @@
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
import type {FormSchemaGetter} from '#/adapter/form';
import type {VxeGridProps} from '#/adapter/vxe-table';
import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render';
import {getDictOptions} from '#/utils/dict';
import {renderDict} from '#/utils/render';
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'accessCode',
label: '门禁设备编码',
label: '设备编码',
},
{
component: 'Input',
fieldName: 'accessName',
label: '门禁名称',
},
{
component: 'Input',
fieldName: 'communityCode',
label: '园区编码',
},
{
component: 'Input',
fieldName: 'buildingCode',
label: '建筑编码',
},
{
component: 'Input',
fieldName: 'accessIp',
label: '门禁设备ip',
},
{
component: 'Input',
fieldName: 'accessPort',
label: '端口',
},
{
component: 'Input',
fieldName: 'accessType',
label: '门禁设备类型',
},
{
component: 'Input',
fieldName: 'factoryCode',
label: '工厂编码',
label: '设备名称',
},
{
component: 'Select',
fieldName: 'controlType',
componentProps: {
// 可选从DictEnum中获取 DictEnum.WY_KZKLX 便于维护
options: getDictOptions('wy_kzklx'),
},
fieldName: 'controlType',
label: '控制卡类型1-系统2-E8',
},
{
component: 'Input',
fieldName: 'controlCode',
label: '控制卡类型编码',
},
{
component: 'Input',
fieldName: 'outCode',
label: '外部编码',
},
{
component: 'Input',
fieldName: 'orgCode',
label: '组织编码',
},
{
component: 'Input',
fieldName: 'dataState',
label: '数据状态1有效0无效',
},
{
component: 'Input',
fieldName: 'searchValue',
label: '搜索值',
label: '控制卡类型',
},
];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{type: 'checkbox', width: 60},
{
title: '主键',
title: '序号',
field: 'id',
slots: {
default: ({rowIndex}) => {
return rowIndex + 1;
},
},
},
{
title: '门禁设备编码',
title: '设备编码',
field: 'accessCode',
},
{
title: '门禁名称',
title: '设备名称',
field: 'accessName',
},
{
@@ -106,7 +55,7 @@ export const columns: VxeGridProps['columns'] = [
field: 'buildingCode',
},
{
title: '门禁设备ip',
title: '设备IP',
field: 'accessIp',
},
{
@@ -114,7 +63,7 @@ export const columns: VxeGridProps['columns'] = [
field: 'accessPort',
},
{
title: '门禁设备类型',
title: '设备类型',
field: 'accessType',
},
{
@@ -122,11 +71,10 @@ export const columns: VxeGridProps['columns'] = [
field: 'factoryCode',
},
{
title: '控制卡类型1-系统2-E8',
title: '控制卡类型',
field: 'controlType',
slots: {
default: ({ row }) => {
// 可选从DictEnum中获取 DictEnum.WY_KZKLX 便于维护
default: ({row}) => {
return renderDict(row.controlType, 'wy_kzklx');
},
},
@@ -143,18 +91,10 @@ export const columns: VxeGridProps['columns'] = [
title: '组织编码',
field: 'orgCode',
},
{
title: '数据状态1有效0无效',
field: 'dataState',
},
{
title: '搜索值',
field: 'searchValue',
},
{
field: 'action',
fixed: 'right',
slots: { default: 'action' },
slots: {default: 'action'},
title: '操作',
width: 180,
},
@@ -171,13 +111,13 @@ export const modalSchema: FormSchemaGetter = () => [
},
},
{
label: '门禁设备编码',
label: '设备编码',
fieldName: 'accessCode',
component: 'Input',
rules: 'required',
},
{
label: '门禁名称',
label: '设备名称',
fieldName: 'accessName',
component: 'Input',
rules: 'required',
@@ -195,7 +135,7 @@ export const modalSchema: FormSchemaGetter = () => [
rules: 'required',
},
{
label: '门禁设备ip',
label: '设备IP',
fieldName: 'accessIp',
component: 'Input',
},
@@ -205,7 +145,7 @@ export const modalSchema: FormSchemaGetter = () => [
component: 'Input',
},
{
label: '门禁设备类型',
label: '设备类型',
fieldName: 'accessType',
component: 'Input',
rules: 'required',
@@ -217,7 +157,7 @@ export const modalSchema: FormSchemaGetter = () => [
rules: 'required',
},
{
label: '控制卡类型1-系统2-E8',
label: '控制卡类型',
fieldName: 'controlType',
component: 'Select',
componentProps: {
@@ -242,15 +182,4 @@ export const modalSchema: FormSchemaGetter = () => [
component: 'Input',
rules: 'required',
},
{
label: '数据状态1有效0无效',
fieldName: 'dataState',
component: 'Input',
rules: 'required',
},
{
label: '搜索值',
fieldName: 'searchValue',
component: 'Input',
},
];