| | |
| | | align: 'center', |
| | | dataIndex: 'type_dictText', |
| | | }, |
| | | { |
| | | title: '制造商', |
| | | align: 'center', |
| | | dataIndex: 'manufacturer', |
| | | }, |
| | | { |
| | | title: '购入日期', |
| | | align: 'center', |
| | | dataIndex: 'purchaseDate', |
| | | }, |
| | | { |
| | | title: '启用日期', |
| | | align: 'center', |
| | | dataIndex: 'startDate', |
| | | }, |
| | | { |
| | | title: '安装位置', |
| | | align: 'center', |
| | | dataIndex: 'location', |
| | | }, |
| | | { |
| | | title: '设备IP', |
| | | align: 'center', |
| | | dataIndex: 'ip', |
| | | }, |
| | | { |
| | | title: '车间', |
| | | align: 'center', |
| | | dataIndex: 'shopId_dictText', |
| | | }, |
| | | { |
| | | title: '启用状态', |
| | | align: 'center', |
| | | dataIndex: 'enable', |
| | | customRender: ({ text }) => { |
| | | return render.renderSwitch(text, [ |
| | | { text: '是', value: 'Y' }, |
| | | { text: '否', value: 'N' }, |
| | | ]) |
| | | }, |
| | | }, |
| | | { |
| | | title: '设备状态', |
| | | align: 'center', |
| | |
| | | return options[text] || text; |
| | | } |
| | | }, |
| | | { |
| | | title: '制造商', |
| | | align: 'center', |
| | | dataIndex: 'manufacturer', |
| | | }, |
| | | { |
| | | title: '购入日期', |
| | | align: 'center', |
| | | dataIndex: 'purchaseDate', |
| | | }, |
| | | { |
| | | title: '启用日期', |
| | | align: 'center', |
| | | dataIndex: 'startDate', |
| | | }, |
| | | { |
| | | title: '安装位置', |
| | | align: 'center', |
| | | dataIndex: 'location', |
| | | }, |
| | | { |
| | | title: '报废日期', |
| | | align: 'center', |
| | |
| | | align: 'center', |
| | | dataIndex: 'remark', |
| | | }, |
| | | { |
| | | title: '设备IP', |
| | | align: 'center', |
| | | dataIndex: 'ip', |
| | | }, |
| | | { |
| | | title: '车间', |
| | | align: 'center', |
| | | dataIndex: 'shopId_dictText', |
| | | }, |
| | | { |
| | | title: '启用状态', |
| | | align: 'center', |
| | | dataIndex: 'enable', |
| | | customRender: ({ text }) => { |
| | | return render.renderSwitch(text, [ |
| | | { text: '是', value: 'Y' }, |
| | | { text: '否', value: 'N' }, |
| | | ]) |
| | | }, |
| | | }, |
| | | |
| | | ] |
| | | //查询数据 |
| | | export const searchFormSchema: FormSchema[] = [ |
| | |
| | | return [{ required: true, message: '请输入设备名称!' }, { ...rules.duplicateCheckRule('dry_equipment', 'name', model, schema)[0] }] |
| | | }, |
| | | }, |
| | | { |
| | | label: '车间id', |
| | | field: 'shopId', |
| | | component: 'JDictSelectTag', |
| | | componentProps: { |
| | | dictCode: 'dry_shop,name,id,tenant_id=' + getTenantId(), |
| | | }, |
| | | dynamicRules: ({ }) => { |
| | | return [{ required: true, message: '请输入车间id!' }] |
| | | }, |
| | | }, |
| | | |
| | | { |
| | | label: '设备类型', |
| | | field: 'type', |
| | | component: 'JDictSelectTag', |
| | | componentProps: { |
| | | dictCode: 'dry_eqp_type,name,id,tenant_id=' + getTenantId(), |
| | | }, |
| | | dynamicRules: ({ }) => { |
| | | return [{ required: true, message: '请输入设备类型!' }] |
| | | }, |
| | | }, |
| | | { |
| | | label: '设备IP', |
| | | field: 'ip', |
| | | component: 'Input', |
| | | dynamicRules: ({ model, schema }) => { |
| | | return [{ required: true, message: '请绑定设备IP!' }, { ...rules.duplicateCheckRule('dry_equipment', 'ip', model, schema)[0] }] |
| | | }, |
| | | }, |
| | | { |
| | | label: '制造商', |
| | | field: 'manufacturer', |
| | |
| | | format: 'YYYY-MM-DD' |
| | | }, |
| | | }, |
| | | { |
| | | label: '设备IP', |
| | | field: 'ip', |
| | | component: 'Input', |
| | | dynamicRules: ({ model, schema }) => { |
| | | return [{ required: true, message: '请绑定设备IP!' }, { ...rules.duplicateCheckRule('dry_equipment', 'ip', model, schema)[0] }] |
| | | }, |
| | | }, |
| | | { |
| | | label: '设备类型', |
| | | field: 'type', |
| | | component: 'JDictSelectTag', |
| | | componentProps: { |
| | | dictCode: 'dry_eqp_type,name,id,tenant_id=' + getTenantId(), |
| | | }, |
| | | dynamicRules: ({ }) => { |
| | | return [{ required: true, message: '请输入设备类型!' }] |
| | | }, |
| | | }, |
| | | |
| | | { |
| | | label: '设备描述', |
| | | field: 'remark', |
| | | component: 'Input', |
| | | }, |
| | | { |
| | | label: '车间id', |
| | | field: 'shopId', |
| | | component: 'JDictSelectTag', |
| | | componentProps: { |
| | | dictCode: 'dry_shop,name,id,tenant_id=' + getTenantId(), |
| | | }, |
| | | dynamicRules: ({ }) => { |
| | | return [{ required: true, message: '请输入车间id!' }] |
| | | }, |
| | | }, |
| | | |
| | | { |
| | | label: '启用状态', |
| | | field: 'enable', |