import EquipmentMonitoring from "@/views/screens/screen-components/EquipmentMonitoring.vue";
import ProductionSituation from "@/views/screens/screen-components/ProductionSituation.vue";
import CompletionProductionPlan from "@/views/screens/screen-components/CompletionProductionPlan.vue";
import OrderInformation from "@/views/screens/screen-components/OrderInformation.vue";
import MaterialsCondition from "@/views/screens/screen-components/MaterialsCondition.vue";
import ProductionScheduleOfHeavyParts from "@/views/screens/screen-components/ProductionScheduleOfHeavyParts.vue";
import ProductionTaskStatistics from "@/views/screens/screen-components/ProductionTaskStatistics.vue";
import ProductionCapacitySituation from "@/views/screens/screen-components/ProductionCapacitySituation.vue";
import DistributionOfUnqualifiedProducts from "@/views/screens/screen-components/DistributionOfUnqualifiedProducts.vue";
import QualityAnomaly from "@/views/screens/screen-components/QualityAnomaly.vue";
import ProductionPassThroughRate from "@/views/screens/screen-components/ProductionPassThroughRate.vue";
import InspectionTaskOfToday from "@/views/screens/screen-components/InspectionTaskOfToday.vue";
import DefectDistributionDiagram from "@/views/screens/screen-components/DefectDistributionDiagram.vue";
import ManagementPersons from "@/views/screens/screen-components/ManagementPersons.vue";
import ChanLiangTongJi from "@/views/screens/screen-components/ChanLiangTongJi.vue";
import CurrentProductionOrderProgress from "@/views/screens/screen-components/CurrentProductionOrderProgress.vue";
import WeeklyFulfillmentOfProductionOrders from "@/views/screens/screen-components/WeeklyFulfillmentOfProductionOrders.vue";
import BadTop10 from "@/views/screens/screen-components/BadTop10.vue";
import XiaFaGongDanJinDu from "@/views/screens/screen-components/XiaFaGongDanJinDu.vue";
import BanZuChuQinTongJi from "@/views/screens/screen-components/BanZuChuQinTongJi.vue";
import ShengChanJiHuaQingKuang from "@/views/screens/screen-components/ShengChanJiHuaQingKuang.vue";
import ChengPinRuKuQingKuang from "@/views/screens/screen-components/ChengPinRuKuQingKuang.vue";
import WeiDianZiCheJianGongGao from "@/views/screens/screen-components/WeiDianZiCheJianGongGao.vue";

export interface ScreenComponent {
  name: string;
  key: string;
  component: any;
  description: string;
}

// 每添加一个组件，都需要在这里添加一个键值对
export const componentsDicts: { [key: string]: ScreenComponent } = {
  // Add your components here
  EquipmentMonitoring: {
    name: "设备监控",
    component: EquipmentMonitoring,
    key: "EquipmentMonitoring",
    description:
      "This component shows the status of the equipment in real-time.",
  },
  ProductionSituation: {
    name: "每日产量统计",
    component: ProductionSituation,
    key: "ProductionSituation",
    description:
      "This component shows the production situation of the company.",
  },
  DailyProductionS: {
    name: "生产计划完成情况",
    component: CompletionProductionPlan,
    key: "DailyProductionS",
    description: " This component shows the daily production statistics.",
  },
  OrderInformation: {
    name: "订单信息",
    component: OrderInformation,
    key: "OrderInformation",
    description: "This component shows the order information.",
  },
  MaterialsCondition: {
    name: "物料情况",
    component: MaterialsCondition,
    key: "MaterialsCondition",
    description: "This component shows the materials condition.",
  },
  ProductionScheduleOfHeavyParts: {
    name: "关重件生产进度",
    component: ProductionScheduleOfHeavyParts,
    key: "ProductionScheduleOfHeavyParts",
    description: "This component shows the production schedule of heavy parts.",
  },
  ProductionTaskStatistics: {
    name: "生产任务统计",
    component: ProductionTaskStatistics,
    key: "ProductionTaskStatistics",
    description: "This component shows the production task statistics.",
  },
  ProductionCapacitySituation: {
    name: "生产量情况",
    component: ProductionCapacitySituation,
    key: "ProductionCapacitySituation",
    description: "This component shows the production capacity situation.",
  },
  DistributionOfUnqualifiedProducts: {
    name: "不合格产品分布",
    component: DistributionOfUnqualifiedProducts,
    key: "DistributionOfUnqualifiedProducts",
    description:
      "This component shows the distribution of unqualified products.",
  },
  QualityAnomaly: {
    name: "质量异常",
    component: QualityAnomaly,
    key: "QualityAnomaly",
    description: "This component shows the quality anomaly.",
  },
  ProductionPassThroughRate: {
    name: "生产直通率",
    component: ProductionPassThroughRate,
    key: "ProductionPassThroughRate",
    description: "This component shows the production pass-through rate.",
  },
  InspectionTaskOfToday: {
    name: "今日检验任务",
    component: InspectionTaskOfToday,
    key: "InspectionTaskOfToday",
    description: "This component shows the inspection task of today.",
  },
  DefectDistributionDiagram: {
    name: "缺陷分布图",
    component: DefectDistributionDiagram,
    key: "DefectDistributionDiagram",
    description: "This component shows the defect distribution diagram.",
  },
  ManagementPersons: {
    name: "管理人员",
    component: ManagementPersons,
    key: "ManagementPersons",
    description: "This component shows the management persons.",
  },
  ChanLiangTongJi: {
    name: "产量统计",
    component: ChanLiangTongJi,
    key: "ChanLiangTongJi",
    description: " shows the production situation of the company.",
  },
  CurrentProductionOrderProgress: {
    name: "当前生产订单进度",
    component: CurrentProductionOrderProgress,
    key: "CurrentProductionOrderProgress",
    description: "This component shows the current production order progress.",
  },
  WeeklyFulfillmentOfProductionOrders: {
    name: "周生产订单完成情况",
    component: WeeklyFulfillmentOfProductionOrders,
    key: "WeeklyFulfillmentOfProductionOrders",
    description:
      "This component shows the weekly fulfillment of production orders.",
  },
  BadTop10: {
    name: "不良TOP10",
    component: BadTop10,
    key: "BadTop10",
    description: "This component shows the bad top 10.",
  },
  XiaFaGongDanJinDu: {
    name: "当月生产工单完成进度",
    component: XiaFaGongDanJinDu,
    key: "XiaFaGongDanJinDu",
    description: "This component shows the progress of the dispatched bill.",
  },
  BanZuChuQinTongJi: {
    name: "班组出勤统计",
    component: BanZuChuQinTongJi,
    key: "BanZuChuQinTongJi",
    description: "This component shows the attendance statistics of the team.",
  },
  ShengChanJiHuaQingKuang: {
    name: "生产计划情况",
    component: ShengChanJiHuaQingKuang,
    key: "ShengChanJiHuaQingKuang",
    description: "This component shows the production plan situation.",
  },
  ChengPinRuKuQingKuang: {
    name: "成品入库情况",
    component: ChengPinRuKuQingKuang,
    key: "ChengPinRuKuQingKuang",
    description: "This component shows the incoming product situation.",
  },
  WeiDianZiCheJianGongGao: {
    name: "微电子车间公告",
    component: WeiDianZiCheJianGongGao,
    key: "WeiDianZiCheJianGongGao",
    description: "This component shows the monitoring of the assets.",
  },
};

export const getComponetnByName = (name: string) => {
  return componentsDicts[name].component;
};
