import React, { useState,useRef, useEffect } from 'react';
import { Tabs,Table, Spin, message, Popconfirm,Card,Collapse, Modal, Button} from 'antd';
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
import ViewRishFormModal from './components/ViewRishFormModal';
import ViewQuoteWarningFormModal from './components/ViewQuoteWarningFormModal';
import { getRoomId, getSessionUserData } from '@/utils/session';
import ViewBlacklistFormModal from './components/ViewBlacklistFormModal';
import ViewReviewResultFormModal from './components/ViewReviewResultFormModal';
import ViewJuryScoringRemindFormModal from './components/ViewJuryScoringRemindFormModal';
import ViewJuryScoringAnalysisFormModal from './components/ViewJuryScoringAnalysisFormModal';

function callback(key) {
  //getSessionUserData.roleIds;
}

const title2 = [
  {
    title: '序号',
    dataIndex: 'num',
    key: 'num',
  },
  {
    title: '投标人及报价',
    dataIndex: 'tbrbj',
    key: 'tbrbj',
  },
  {
    title: '预警信息',
    dataIndex: 'yjxx',
    key: 'yjxx',
  },
  {
    title: '操作',
    dataIndex: 'cz',
    key: 'cz',
  },
];



const columns: ProColumns<any>[] = [
  { title: '序号', dataIndex: 'num', width: 50, },
  { title: '供应商名称', dataIndex: 'gysmc', },
  { title: 'IP地址',width: '20%', dataIndex: 'ip', },
  { title: 'MAC地址', dataIndex: 'mac', },
  { title: '上传时间', dataIndex: 'uploadTime',},
];

const columnsMac: ProColumns<any>[] = [
  { title: '序号', dataIndex: 'num', width: 50, },
  { title: '供应商名称', dataIndex: 'gysmc', },
  { title: '相同的MAC地址', dataIndex: 'mac', },
];

const columns2: ProColumns<any>[] = [
  { title: '序号', dataIndex: 'num', width: 50, },
  { title: '投标人及报价', dataIndex: 'tbrbj', },
  { title: '预警信息', dataIndex: 'yjxx', },
  { title: '操作', dataIndex: '', },
];


const Sing: React.FC<{}> = () => {
  //ip mac
  const [ViewRishFormVisible, setViewRishFormVisible] = useState<any>(false);
  //查看详情窗口record
  const [ViewRishValues, setViewRishValues] = useState<any>({});
  
  //一致性
  const [ViewQuoteWarningFormVisible, setViewQuoteWarningFormVisible] = useState<any>(false);
  //查看详情窗口record
  const [ViewQuoteWarningValues, setViewQuoteWarningValues] = useState<any>({});

  //黑名单
  const [ViewBlacklistFormVisible, setViewBlacklistFormVisible] = useState<any>(false);
  //查看详情窗口record
  const [ViewBlacklistValues, setViewBlacklistValues] = useState<any>({});

  //评审结果展示及预警
  const [ViewReviewResultFormVisible, setViewReviewResultFormVisible] = useState<any>(false);
  //查看详情窗口record
  const [ViewReviewResultValues, setViewReviewResultValues] = useState<any>({});

  //评审专家打分偏离度提醒
  const [ViewJuryScoringRemindFormVisible, setViewJuryScoringRemindFormVisible] = useState<any>(false);
  //查看详情窗口record
  const [ViewJuryScoringRemindValues, setViewJuryScoringRemindValues] = useState<any>({});
  
  //评审专家打分偏离度分析
  const [ViewJuryScoringAnalysisFormVisible, setViewJuryScoringAnalysisFormVisible] = useState<any>(false);
  //查看详情窗口record
  const [ViewJuryScoringAnalysisValues, setViewJuryScoringAnalysisValues] = useState<any>({});


  const getWarningList = async() => {
  }
  return ( 
    <>
          {
            ViewRishFormModal ? (
              <ViewRishFormModal
                modalVisible={ViewRishFormVisible}
                values={ViewRishValues}
                onCancel={() => {
                  setViewRishFormVisible(!ViewRishFormVisible);
                  setViewRishValues({});
                }}
              >
              </ViewRishFormModal>
            ) : null
          } 
          { 
            ViewQuoteWarningFormModal ? (
              <ViewQuoteWarningFormModal
                modalVisible={ViewQuoteWarningFormVisible}
                values={ViewQuoteWarningValues}
                onCancel={() => {
                  setViewQuoteWarningFormVisible(!ViewQuoteWarningFormVisible);
                  setViewQuoteWarningValues({});
                }} 
              >

              </ViewQuoteWarningFormModal>
            ) : null
          }
          {
            ViewBlacklistFormModal ? (
              <ViewBlacklistFormModal
                modalVisible={ViewBlacklistFormVisible}
                values={ViewBlacklistValues}
                onCancel={() => {
                  setViewBlacklistFormVisible(!ViewBlacklistFormVisible);
                  setViewBlacklistValues({});
                }}
              >
              </ViewBlacklistFormModal>
            ) : null
          }     
          {
            ViewReviewResultFormModal ? (
              <ViewReviewResultFormModal
                modalVisible={ViewReviewResultFormVisible}
                values={ViewReviewResultValues}
                onCancel={() => {
                  setViewReviewResultFormVisible(!ViewReviewResultFormVisible);
                  setViewReviewResultValues({});
                }}
              >
              </ViewReviewResultFormModal>
            ) : null
          }    
          {
            ViewJuryScoringRemindFormModal ? (
              <ViewJuryScoringRemindFormModal
                modalVisible={ViewJuryScoringRemindFormVisible}
                values={ViewJuryScoringRemindValues}
                onCancel={() => {
                  setViewJuryScoringRemindFormVisible(!ViewJuryScoringRemindFormVisible);
                  setViewJuryScoringRemindValues({});
                }}
              >
              </ViewJuryScoringRemindFormModal>
            ) : null
          }   
          {
            ViewJuryScoringAnalysisFormModal ? (
              <ViewJuryScoringAnalysisFormModal
                modalVisible={ViewJuryScoringAnalysisFormVisible}
                values={ViewJuryScoringAnalysisValues}
                onCancel={() => {
                  setViewJuryScoringAnalysisFormVisible(!ViewJuryScoringAnalysisFormVisible);
                  setViewJuryScoringAnalysisValues({});
                }}
              >
              </ViewJuryScoringAnalysisFormModal>
            ) : null
          }  
    </>
  )
}
export default Sing;