import { ModuleVersionOptions, ModuleChartTypeOptions, ModulePositionOptions, ModuleSizeOptions } from './options'; import { BasicColumn } from '/@/components/Table'; import { FormSchema } from '/@/components/Table'; import _ from 'lodash-es'; export const columns: BasicColumn[] = [ { title: '所属页面', dataIndex: 'pageType', }, { title: '设备类型', dataIndex: 'deviceType', }, { title: '模块标题', dataIndex: 'moduleName', }, { title: '模块主体配置', dataIndex: 'moduleData.main', }, { title: '模块页头配置', dataIndex: 'moduleData.header', }, { title: '模块图表配置', dataIndex: 'moduleData.chart', }, { title: '模块尺寸', dataIndex: 'showStyle.size', }, { title: '模块版本', dataIndex: 'showStyle.version', }, { title: '模块定位', dataIndex: 'showStyle.position', }, { title: '模块图表类型', dataIndex: 'showStyle.charttype', }, ]; export const searchFormSchema: FormSchema[] = [ { label: '设备类型', field: 'deviceType', component: 'JDictSelectTag', componentProps: { dictCode: 'devicekind', placeholder: '请选择设备类型', }, colProps: { span: 6 }, }, { label: '所属页面', field: 'pageType', component: 'JDictSelectTag', componentProps: { dictCode: 'configurable_homepage', placeholder: '请选择所属页面', }, colProps: { span: 6 }, }, ]; export const formSchema: FormSchema[] = [ { label: '', field: 'id', component: 'InputNumber', show: false, }, { label: '模块标题', field: 'moduleName', component: 'Input', }, { label: '设备类型', field: 'deviceType', component: 'JDictSelectTag', required: true, componentProps: { dictCode: 'devicekind', placeholder: '请选择设备类型', }, }, { label: '所属页面', field: 'pageType', component: 'JDictSelectTag', required: true, componentProps: { dictCode: 'configurable_homepage', placeholder: '请选择所属页面', }, }, { label: '模块主体配置', field: 'moduleData.main', component: 'JAddInput', componentProps: { min: 0, placeholders: ['请输入点位', '请输入名称'], }, }, { label: '模块页头配置', field: 'moduleData.header', component: 'JAddInput', componentProps: { min: 0, placeholders: ['请输入点位', '请输入名称'], }, }, { label: '模块图表配置', field: 'moduleData.chart', component: 'JAddInput', componentProps: { min: 0, placeholders: ['请输入点位', '请输入名称'], }, }, { label: '模块尺寸', field: 'showStyle.size', component: 'Select', componentProps: { options: ModuleSizeOptions, }, }, { label: '模块版本', field: 'showStyle.version', component: 'Select', componentProps: { options: ModuleVersionOptions, }, }, { label: '模块定位', field: 'showStyle.position', component: 'Select', componentProps: { options: ModulePositionOptions, }, }, { label: '模块图表类型', field: 'showStyle.charttype', component: 'Select', componentProps: { options: ModuleChartTypeOptions, }, }, ];