| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251 |
- import { BasicColumn } from '/@/components/Table';
- import { FormSchema } from '/@/components/Table';
- import { list, modalList, huifengids, beiyong, qita, cheliang, dongshi, juejin, caimei } from './workingFace.api';
- export const columns: BasicColumn[] = [
- {
- title: '系统名称',
- dataIndex: 'strname',
- width: 120,
- },
- // {
- // title: '系统型号',
- // dataIndex: 'strinstallpos',
- // width: 100,
- // },
- {
- title: '系统Code',
- dataIndex: 'nwindowtype_dictText',
- width: 100,
- },
- {
- title: '类型',
- dataIndex: 'strtype',
- width: 80,
- },
- {
- title: '模型ID',
- dataIndex: 'fperheight',
- width: 100,
- },
- {
- title: '控制策略',
- dataIndex: 'nwindow',
- width: 100,
- },
- {
- title: '风向',
- width: 150,
- dataIndex: 'stationname',
- },
- ];
- export const recycleColumns: BasicColumn[] = [
- {
- title: '名称',
- dataIndex: 'strname',
- width: 100,
- },
- {
- title: '是否为常闭型',
- dataIndex: 'bnormalclose',
- width: 100,
- },
- ];
- export const searchFormSchema: FormSchema[] = [
- {
- label: '系统类型',
- field: 'strtype',
- component: 'JDictSelectTag',
- colProps: { span: 6 },
- componentProps: {
- dictCode: 'syskind',
- placeholder: '请选择系统型号',
- },
- },
- {
- label: '系统名称',
- field: 'systemname',
- component: 'Input',
- colProps: { span: 6 },
- },
- ];
- export const commentFormSchema = (strtype) => {
- return [
- {
- label: '',
- field: 'id',
- component: 'Input',
- show: false,
- },
- {
- label: '系统名称',
- field: 'systemname',
- component: 'Input',
- },
- {
- label: '系统Code',
- field: 'code',
- component: 'Input',
- },
- {
- label: '系统类型',
- field: 'strtype',
- component: 'JDictSelectTag',
- defaultValue: strtype,
- required: true,
- componentProps: {
- disabled: true,
- dictCode: 'syskind',
- placeholder: '请选择系统型号',
- },
- },
- {
- label: '模型ID',
- field: 'nmodelid',
- component: 'ApiSelect',
- componentProps: () => {
- return {
- api: modalList,
- resultField: 'records',
- labelField: 'strmodelname',
- valueField: 'nmodelid',
- };
- },
- },
- {
- label: '控制策略',
- field: 'workmode',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'workmode',
- placeholder: '请选择控制策略',
- stringToNumber: true,
- },
- },
- {
- label: '监测类型',
- field: 'monitorflag_dictText',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'monitorflag',
- placeholder: '请选择状态',
- },
- },
- {
- label: '风向',
- field: 'windkind',
- component: 'JDictSelectTag',
- componentProps: {
- dictCode: 'winddir',
- placeholder: '请选择风向',
- stringToNumber: true,
- },
- },
- {
- label: '所属回风系统',
- field: 'huifengid',
- component: 'ApiSelect',
- componentProps: () => {
- return {
- api: huifengids,
- labelField: 'huifeng_name',
- valueField: 'id',
- resultField: 'obj',
- };
- },
- },
- {
- label: '关联需风量地点',
- field: 'xufengliangid',
- component: 'ApiSelect',
- componentProps: ({ formModel }) => {
- let api;
- if (formModel['strtype'] == 'sys_dongshi') {
- api = dongshi;
- } else if (formModel['strtype'] == 'sys_cheliang') {
- api = cheliang;
- } else if (formModel['strtype'] == 'sys_surface_juejin') {
- api = juejin;
- } else if (formModel['strtype'] == 'sys_surface_caimei') {
- api = caimei;
- } else if (formModel['strtype'] == 'sys_surface_beiyong') {
- api = beiyong;
- } else if (formModel['strtype'] == 'sys_other') {
- api = qita;
- }
- if (api)
- return {
- api: api.bind(null, { id: formModel['huifengid'] }),
- labelField: 'work_name',
- valueField: 'id',
- resultField: 'obj',
- };
- },
- },
- {
- label: '模型类型',
- field: 'strsystype',
- component: 'JDictSelectTag',
- componentProps: ({ formModel }) => {
- if (formModel['strtype']) {
- console.log('场景类型---->', formModel['strtype']);
- return {
- dictCode: `${formModel['strtype']}_modal`,
- placeholder: '请选择模型类型',
- };
- }
- return {
- options: [],
- };
- },
- },
- {
- label: '是否绑定采空区',
- field: 'linkEmptyFlag',
- component: 'RadioGroup',
- defaultValue: 0,
- componentProps: ({ formActionType }) => {
- return {
- options: [
- { label: '绑定采空区', value: 1, key: '1' },
- { label: '不绑定', value: 0, key: '2' },
- ],
- onChange: (e: any) => {
- const { updateSchema } = formActionType;
- updateSchema({
- field: 'linkEmpty',
- label: '绑定采空区ID',
- component: 'ApiSelect',
- show: e.target.value == 1 ? true : false,
- componentProps: () => {
- return {
- api: list.bind(null, { strtype: 'sys_empty', pageSize: 1000 }),
- labelField: 'systemname',
- valueField: 'id',
- resultField: 'records',
- };
- },
- });
- },
- };
- },
- },
- {
- label: '绑定采空区ID',
- field: 'linkEmpty',
- component: 'ApiSelect',
- show: false,
- componentProps: () => {
- return {
- api: list.bind(null, { strtype: 'sys_empty', pageSize: 1000 }),
- labelField: 'systemname',
- valueField: 'id',
- resultField: 'records',
- };
- },
- },
- ];
- };
|