import { store } from "@/store"; import { defineStore } from "pinia"; interface CommonState { [key: string]: any; } export const useCommonStore = defineStore("commonStore", { state: (): CommonState => ({ // 弹出公共Table的弹窗 isShowTable: false, tableType: 1, tableTitle: "", // 大屏显示的组件key值,包含默认值 mainSL001: "OrderInformation", mainSL002: "MaterialsCondition", mainSL003: "ProductionScheduleOfHeavyParts", mainSRT12: "ProductionTaskStatistics", mainSRT13: "ProductionCapacitySituation", mainS076: "DailyProductionS", mainS077: "EquipmentMonitoring", mainS078: "ProductionSituation", // ==== qualityTOP01: "DistributionOfUnqualifiedProducts", qualityTOP02: "ProductionPassThroughRate", qualityTOP03: "QualityAnomaly", qualityBottom01: "InspectionTaskOfToday", qualityBottom02: "DefectDistributionDiagram", moduleKey: "", // 用于判断修改了哪个模块 isShowSelectModule: false, // 是否显示选择模块中的组件弹窗 }), persist: true, }); export function useCommonStoreHook() { return useCommonStore(store); }