You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
126 lines
2.7 KiB
126 lines
2.7 KiB
import { BasicColumn } from '/@/components/Table'; |
|
import { FormSchema } from '/@/components/Table'; |
|
import {h} from 'vue'; |
|
import {Tag} from 'ant-design-vue'; |
|
|
|
|
|
|
|
export const columns: BasicColumn[] = [ |
|
{ |
|
title: '区域ID', |
|
dataIndex: 'code', |
|
width: 50, |
|
}, |
|
{ |
|
title: '区域名称', |
|
dataIndex: 'name', |
|
width: 120, |
|
}, |
|
{ |
|
title: '排序', |
|
dataIndex: 'sort', |
|
width:50 |
|
}, |
|
{ |
|
title: '创建时间', |
|
dataIndex: 'createTime', |
|
width:200 |
|
}, |
|
|
|
]; |
|
|
|
export const searchFormSchema: FormSchema[] = [ |
|
{ |
|
field: 'name', |
|
label: '区域名称', |
|
component: 'Input', |
|
componentProps: { |
|
placeholder: '请输入区域名称', |
|
}, |
|
colProps: { span: 5 }, |
|
}, |
|
{ |
|
field:'code', |
|
label:'区域ID', |
|
component:'Input', |
|
componentProps:{ |
|
placeholder:'请输入区域ID', |
|
}, |
|
colProps:{span:5} |
|
}, |
|
{ |
|
field: 'dateRange', |
|
label: '创建时间', |
|
component: 'RangePicker', |
|
componentProps: { |
|
style: { width:'100%' }, |
|
valueFormat: 'YYYY-MM-DD', |
|
placeholder: ['开始日期','结束日期'] |
|
}, |
|
colProps: { span: 8 } |
|
}, |
|
|
|
]; |
|
/*表单配置*/ |
|
export const addressFormSchema: FormSchema[] = [ |
|
// { |
|
// field: 'parentId', |
|
// label: '地区', |
|
// component: 'ApiTreeSelect', |
|
// //component: 'TreeSelect', |
|
// //defaultValue:'一级区域', |
|
// componentProps: { |
|
// api: treeList, |
|
// resultField: 'list', |
|
// labelField: 'name', |
|
// valueField: 'code', |
|
// // ReplaceFields:{ |
|
// // title: 'name', |
|
// // key: 'code', |
|
// // value: 'code' |
|
// // } |
|
// }, |
|
// required: true, |
|
// }, |
|
// |
|
{ |
|
field: 'parentId', |
|
label: '上级地区', |
|
component: 'TreeSelect', |
|
defaultValue: '0', |
|
required: true, |
|
componentProps:{ |
|
replaceFields: { |
|
title: 'name', |
|
key: 'id', |
|
value: 'id', |
|
}, |
|
|
|
getPopupContainer: () => document.body, |
|
} |
|
}, |
|
{ |
|
field: 'code', |
|
label: '区域ID', |
|
component: 'Input', |
|
helpMessage: ['区域ID'], |
|
required: true |
|
}, |
|
{ |
|
field:'sort', |
|
label:'排序', |
|
component:'Input', |
|
required:true |
|
}, |
|
{ |
|
label: '区域名称', |
|
field: 'name', |
|
component: 'Input', |
|
}, |
|
|
|
{ |
|
label: '备注', |
|
field: 'remarks', |
|
component: 'InputTextArea', |
|
} |
|
]; |