import TipTool from '../index';
export default () => {
  const style = {
    minWidth: '600px',
    minHeight: '300px',
    maxWidth: '800px',
    maxHeight: '400px',
  };
  const scaleChange = () => {
    console.log('缩放');
  };
  const windowChange = ({ name }) => {
    console.log('窗口大小', name);
  };
  const smallChange = ({ flag }) => {
    console.log('最小化', flag);
  };
  const tipClose = () => {
    console.log('关闭');
  };
  const dataList = {
    headerSetting: {
      layerName: '德玛西亚',
      oid: '4152',
    },
    leftSetting: [
      {
        name: 'dataList',
        active: true,
        data: {
          attributes: {
            DMAID: '',
            OID: 5776,
            code: 'f7c433f9-c1d9-4106-b419-a1aac5e8e8e8',
            create_user: ' ',
            from_code: 'b354c3ab-2f85-4d37-b7bb-1bbb8effc67e',
            from_layer: '水库',
            geom: null,
            guid: '',
            modify_user: '',
            to_code: '{cc856577-67f1-41d2-b14d-1758876906ad}',
            to_layer: '节点',
            主流系数: 0,
            余氯: 0,
            初始状态: 'Open',
            单位水损: 0,
            备注: '',
            局损系数: 0,
            描述: '',
            摩阻系数: 130,
            标签: '',
            水质: 0,
            流速: 0,
            流量: 0,
            漏水量: 0,
            状态: '',
            用水量: 0,
            管壁系数: 0,
            管径: 1200,
            管材: 'PE',
            管长: 4048.862944,
            组分类型: '0水库原水管',
            终止节点: 'JD10823',
            编号: 'GD5776',
            起始节点: 'RE7',
          },
          fields: [
            {
              name: 'OID',
              type: 'civFieldTypeOID',
              alias: 'OID',
              nullable: false,
              editable: false,
              domain: null,
              visible: false,
              editType: null,
              editTypeConfig: null,
              defaultValue: null,
              collectable: false,
              editTypeMobile: null,
              mappingField: null,
            },
            {
              name: 'geom',
              type: 'civFieldTypeMultiLineString',
              alias: 'geom',
              length: 8,
              nullable: false,
              editable: false,
              domain: {},
              visible: false,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: false,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: 'code',
              type: 'civFieldTypeString',
              alias: 'code',
              length: 256,
              nullable: false,
              editable: false,
              domain: {},
              visible: false,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: false,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: 'from_code',
              type: 'civFieldTypeString',
              alias: 'from_code',
              length: 256,
              nullable: true,
              editable: false,
              domain: {},
              visible: false,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: false,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: 'from_layer',
              type: 'civFieldTypeString',
              alias: 'from_layer',
              length: 256,
              nullable: true,
              editable: false,
              domain: {},
              visible: false,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: false,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: 'to_code',
              type: 'civFieldTypeString',
              alias: 'to_code',
              length: 256,
              nullable: true,
              editable: false,
              domain: {},
              visible: false,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: false,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: 'to_layer',
              type: 'civFieldTypeString',
              alias: 'to_layer',
              length: 256,
              nullable: true,
              editable: false,
              domain: {},
              visible: false,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: false,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: '管长',
              type: 'civFieldTypeDouble',
              alias: '管长',
              length: 8,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '{}',
              defaultValue: '{"Expression": "", "ApplyOnUpdate": false}',
              collectable: true,
              editTypeMobile: '文本',
              mappingField: '',
            },
            {
              name: '管径',
              type: 'civFieldTypeInteger',
              alias: '管径',
              length: 8,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: true,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: '管材',
              type: 'civFieldTypeString',
              alias: '管材',
              length: 256,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: true,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: 'create_user',
              type: 'civFieldTypeString',
              alias: 'create_user',
              length: 256,
              nullable: true,
              editable: false,
              domain: {},
              visible: false,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: false,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: 'modify_user',
              type: 'civFieldTypeString',
              alias: 'modify_user',
              length: 256,
              nullable: true,
              editable: false,
              domain: {},
              visible: false,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: false,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: 'create_time',
              type: 'civFieldTypeDateTime',
              alias: 'create_time',
              length: 16,
              nullable: true,
              editable: false,
              domain: {},
              visible: false,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: false,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: 'modify_time',
              type: 'civFieldTypeDateTime',
              alias: 'modify_time',
              length: 16,
              nullable: true,
              editable: false,
              domain: {},
              visible: false,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: false,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: '编号',
              type: 'civFieldTypeString',
              alias: '编号',
              length: 256,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: true,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: '起始节点',
              type: 'civFieldTypeString',
              alias: '起始节点',
              length: 256,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: true,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: '终止节点',
              type: 'civFieldTypeString',
              alias: '终止节点',
              length: 256,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: true,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: '描述',
              type: 'civFieldTypeString',
              alias: '描述',
              length: 256,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: true,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: '摩阻系数',
              type: 'civFieldTypeDouble',
              alias: '摩阻系数',
              length: 8,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '{}',
              defaultValue: '{"Expression": "", "ApplyOnUpdate": false}',
              collectable: true,
              editTypeMobile: '文本',
              mappingField: '',
            },
            {
              name: '局损系数',
              type: 'civFieldTypeDouble',
              alias: '局损系数',
              length: 8,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '{}',
              defaultValue: '{"Expression": "", "ApplyOnUpdate": false}',
              collectable: true,
              editTypeMobile: '文本',
              mappingField: '',
            },
            {
              name: '初始状态',
              type: 'civFieldTypeString',
              alias: '初始状态',
              length: 256,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: true,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: '主流系数',
              type: 'civFieldTypeDouble',
              alias: '主流系数',
              length: 8,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '{}',
              defaultValue: '{"Expression": "", "ApplyOnUpdate": false}',
              collectable: true,
              editTypeMobile: '文本',
              mappingField: '',
            },
            {
              name: '管壁系数',
              type: 'civFieldTypeDouble',
              alias: '管壁系数',
              length: 8,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '{}',
              defaultValue: '{"Expression": "", "ApplyOnUpdate": false}',
              collectable: true,
              editTypeMobile: '文本',
              mappingField: '',
            },
            {
              name: 'DMAID',
              type: 'civFieldTypeString',
              alias: 'DMAID',
              length: 256,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: true,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: '流量',
              type: 'civFieldTypeDouble',
              alias: '流量',
              length: 8,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '{}',
              defaultValue: '{"Expression": "", "ApplyOnUpdate": false}',
              collectable: true,
              editTypeMobile: '文本',
              mappingField: '',
            },
            {
              name: '流速',
              type: 'civFieldTypeDouble',
              alias: '流速',
              length: 8,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '{}',
              defaultValue: '{"Expression": "", "ApplyOnUpdate": false}',
              collectable: true,
              editTypeMobile: '文本',
              mappingField: '',
            },
            {
              name: '单位水损',
              type: 'civFieldTypeDouble',
              alias: '单位水损',
              length: 8,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '{}',
              defaultValue: '{"Expression": "", "ApplyOnUpdate": false}',
              collectable: true,
              editTypeMobile: '文本',
              mappingField: '',
            },
            {
              name: '状态',
              type: 'civFieldTypeString',
              alias: '状态',
              length: 256,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: true,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: '水质',
              type: 'civFieldTypeDouble',
              alias: '水质',
              length: 8,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '{}',
              defaultValue: '{"Expression": "", "ApplyOnUpdate": false}',
              collectable: true,
              editTypeMobile: '文本',
              mappingField: '',
            },
            {
              name: '组分类型',
              type: 'civFieldTypeString',
              alias: '组分类型',
              length: 256,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: true,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: '余氯',
              type: 'civFieldTypeDouble',
              alias: '余氯',
              length: 8,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '{}',
              defaultValue: '{"Expression": "", "ApplyOnUpdate": false}',
              collectable: true,
              editTypeMobile: '文本',
              mappingField: '',
            },
            {
              name: '备注',
              type: 'civFieldTypeString',
              alias: '备注',
              length: 256,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: true,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: '标签',
              type: 'civFieldTypeString',
              alias: '标签',
              length: 256,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: true,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: 'guid',
              type: 'civFieldTypeString',
              alias: 'guid',
              length: 256,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: true,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: '埋设时间',
              type: 'civFieldTypeDateTime',
              alias: '埋设时间',
              length: 16,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '',
              defaultValue: '',
              collectable: true,
              editTypeMobile: '',
              mappingField: '',
            },
            {
              name: '漏水量',
              type: 'civFieldTypeDouble',
              alias: '漏水量',
              length: 8,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '{}',
              defaultValue: '{"Expression": "", "ApplyOnUpdate": false}',
              collectable: true,
              editTypeMobile: '文本',
              mappingField: '',
            },
            {
              name: '用水量',
              type: 'civFieldTypeDouble',
              alias: '用水量',
              length: 8,
              nullable: true,
              editable: true,
              domain: {},
              visible: true,
              editType: '',
              editTypeConfig: '{}',
              defaultValue: '{"Expression": "", "ApplyOnUpdate": false}',
              collectable: true,
              editTypeMobile: '文本',
              mappingField: '',
            },
          ],
        },
      },
      {
        name: 'media',
        active: true,
        data: [],
      },
    ],
    events: {
      scaleChange,
      windowChange,
      smallChange,
      tipClose,
    },
  };
  return (
    <div>
      <TipTool style={style} dataList={dataList} />
    </div>
  );
};
