131 lines
2.3 KiB
TypeScript
131 lines
2.3 KiB
TypeScript
import {BasicColumn} from '/@/components/Table';
|
|
import {FormSchema} from '/@/components/Table';
|
|
|
|
//列表数据
|
|
export const columns: BasicColumn[] = [
|
|
{
|
|
title: '区域序号',
|
|
align: "center",
|
|
dataIndex: 'regionId'
|
|
},
|
|
{
|
|
title: '区域名称',
|
|
align: "center",
|
|
dataIndex: 'regionName'
|
|
},
|
|
{
|
|
title: '区域层级',
|
|
align: "center",
|
|
dataIndex: 'regionLevel'
|
|
},
|
|
{
|
|
title: '上级名称',
|
|
align: "center",
|
|
dataIndex: 'parentName'
|
|
},
|
|
{
|
|
title: '机构名称',
|
|
align: "center",
|
|
dataIndex: 'projectName'
|
|
},
|
|
{
|
|
title: '更新时间',
|
|
align: "center",
|
|
dataIndex: 'updateTime'
|
|
},
|
|
{
|
|
title: '区域次序',
|
|
align: "center",
|
|
dataIndex: 'sort'
|
|
},
|
|
];
|
|
|
|
export const searchFormSchema: FormSchema[] = [
|
|
{
|
|
label: '机构',
|
|
field: 'projectId',
|
|
component: 'JDictSelectTag',
|
|
componentProps: {
|
|
dictCode: 'nu_iot_tplink_project,project_name,project_id',
|
|
placeholder: '请选择机构',
|
|
},
|
|
// ignoreDisabled : true,
|
|
//colProps: { span: 6 },
|
|
},
|
|
];
|
|
|
|
export const formSchema: FormSchema[] = [
|
|
{
|
|
label: '',
|
|
field: 'id',
|
|
component: 'Input',
|
|
show: false,
|
|
},
|
|
{
|
|
label: '',
|
|
field: 'projectId',
|
|
component: 'Input',
|
|
show: false,
|
|
},
|
|
{
|
|
label: '',
|
|
field: 'parentId',
|
|
component: 'Input',
|
|
show: false,
|
|
},
|
|
{
|
|
label: '区域序号',
|
|
field: 'regionId',
|
|
component: 'Input',
|
|
dynamicDisabled: true
|
|
},
|
|
{
|
|
label: '区域名称',
|
|
field: 'regionName',
|
|
component: 'Input',
|
|
},
|
|
{
|
|
label: '区域层级',
|
|
field: 'regionLevel',
|
|
component: 'Input',
|
|
dynamicDisabled: true
|
|
},
|
|
{
|
|
label: '上级名称',
|
|
field: 'parentName',
|
|
component: 'Input',
|
|
dynamicDisabled: ({model})=>{
|
|
if(model.regionId || model.parentId){
|
|
return true;
|
|
}else{
|
|
return false;
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '机构名称',
|
|
field: 'projectName',
|
|
component: 'Input',
|
|
dynamicDisabled: ({model})=>{
|
|
if(model.regionId || model.projectId){
|
|
return true;
|
|
}else{
|
|
return false;
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '更新时间',
|
|
field: 'updateTime',
|
|
component: 'Input',
|
|
dynamicDisabled: true
|
|
},
|
|
{
|
|
label: '区域次序',
|
|
field: 'sort',
|
|
component: 'Input',
|
|
dynamicDisabled: true
|
|
},
|
|
];
|
|
|