import {BasicColumn} from '/@/components/Table'; import {FormSchema} from '/@/components/Table'; import { rules} from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; import { getWeekMonthQuarterYear } from '/@/utils'; //列表数据 export const columns: BasicColumn[] = [ { title: '唯一编号(IMO)', align:"center", dataIndex: 'imo' }, { title: '船名称(ship name)', align:"center", dataIndex: 'shipName' }, { title: 'hull number', align:"center", dataIndex: 'hullNumber' }, { title: '船类型(ship type)', align:"center", dataIndex: 'shipType', }, { title: '船厂(ship factory)', align:"center", dataIndex: 'shipFactory' }, { title: '造船日期(ship date)', align:"center", dataIndex: 'shipDate' }, { title: '关联客户(relate customer)', align:"center", dataIndex: 'relateCustomer' }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ { label: "唯一编号(IMO)", field: 'imo', component: 'Input', //colProps: {span: 6}, }, { label: "船名称(ship name)", field: 'shipName', component: 'Input', //colProps: {span: 6}, }, { label: '关联客户(relate customer)', field: 'relateCustomer', component: 'Input', }, { label: "hull number", field: 'hullNumber', component: 'Input', //colProps: {span: 6}, }, { label: "船厂(ship factory)", field: 'shipFactory', component: 'JSelectMultiple', componentProps:{ dictCode:"ship_factory" }, //colProps: {span: 6}, }, { label: "造船日期(ship date)", field: "shipDate", component: 'RangePicker', componentProps: { valueType: 'Date', showTime:true }, //colProps: {span: 6}, }, { label: "船类型(ship type)", field: 'shipType', component: 'JSelectMultiple', componentProps:{ dictCode:"ship_type" }, //colProps: {span: 6}, }, { label: "状态(status)", field: 'status', component: 'JSelectMultiple', componentProps:{ dictCode:"valid_status" }, //colProps: {span: 6}, }, ]; //表单数据 export const formSchema: FormSchema[] = [ { label: '唯一编号(IMO)', field: 'imo', component: 'Input', // required: true, }, { label: '船名称(ship name)', field: 'shipName', component: 'Input', required: true, }, { label: 'hull number', field: 'hullNumber', component: 'Input', }, { label: '船类型(ship type)', field: 'shipType', component: 'JDictSelectTag', componentProps:{ dictCode:"ship_type" }, }, { label: '船厂(ship factory)', field: 'shipFactory', component: 'JDictSelectTag', componentProps:{ dictCode:"ship_factory" }, }, { label: '造船日期(ship date)', field: 'shipDate', component: 'DatePicker', componentProps: { showTime: true, valueFormat: 'YYYY-MM-DD HH:mm:ss' }, }, { label: '状态(status)', field: 'status', component: 'JDictSelectTag', componentProps:{ dictCode:"valid_status" }, }, // TODO 主键隐藏字段,目前写死为ID { label: '', field: 'id', component: 'Input', show: false }, ]; // 高级查询数据 export const superQuerySchema = { status: {title: '状态(1-启用,0-停用)',order: 0,view: 'number', type: 'number',dictCode: '',}, imo: {title: '唯一编号',order: 2,view: 'text', type: 'string',}, shipName: {title: '船名称',order: 3,view: 'text', type: 'string',}, hullNumber: {title: 'hull number',order: 4,view: 'text', type: 'string',}, shipType: {title: '船类型',order: 5,view: 'list', type: 'string',dictCode: '',}, shipFactory: {title: '船厂',order: 6,view: 'list', type: 'string',dictCode: '',}, shipDate: {title: '造船日期',order: 7,view: 'datetime', type: 'string',}, notes: {title: '备注',order: 8,view: 'text', type: 'string',}, }; /** * 流程表单调用这个方法获取formSchema * @param param */ export function getBpmFormSchema(_formData): FormSchema[]{ // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema return formSchema; }