<template>
  <!-- 容器 -->
  <div>
    <Header></Header>
    <Desktop
      :defaultZIndex="defaultZIndex"
      :userSettingData="userSettingData"
      :fixWindowData="fixWindowData"
      :notifyTrayPanelDetailData="notifyTrayPanelDetailData"
      :notifySettingData="notifySettingData"
      :notifyShowAllData="notifyShowAllData"
    ></Desktop>
    <DesktopAppView
      :defaultZIndex="defaultZIndex"
      :appViewData="appViewData"
    ></DesktopAppView>
    <!-- <UserAbout :defaultZIndex="defaultZIndex"></UserAbout> -->
    <Mask :defaultZIndex="defaultZIndex" :maskIsShow="maskIsShow"></Mask>
    <Message></Message>
  </div>
</template>

<script>
import Header from "./Header";
import Desktop from "./Desktop";
import DesktopAppView from "./DesktopAppView";
import UserAbout from "./Desktop/UserAbout";
import Mask from "./Mask";
import Message from "./Message";

export default {
  data() {
    return {
      defaultZIndex: 9050,
      maskIsShow:false,
      notifyIsShow:false,
      appViewData: [
        {
          id: 0,
          width: "1150px",
          height: "calc(100vh - 120px)",
          minHeight: "520px",
          title: "控制中心",
          spacialCls: "controlCenter",
          cls: "deactive-win",
          titleImgUrl: "../../../../public/image/index/controlCenter.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 1,
          width: "1010px",
          height: "calc(100vh - 220px)",
          minHeight: "420px",
          title: "DSM 说明",
          spacialCls: "question",
          cls: "deactive-win",
          titleImgUrl: "../../../../public/image/index/question.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 2,
          width: "1254px",
          height: "calc(100vh - 80px)",
          minHeight: "560px",
          title: "套件中心",
          spacialCls: "tjCenter",
          cls: "deactive-win",
          titleImgUrl: "../../../../public/image/index/tjCenter.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 3,
          width: "1230px",
          height: "calc(100vh - 200px)",
          minHeight: "560px",
          title: "资源监控",
          spacialCls: "resourceMonitor",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/resourceMonitor.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 4,
          width: "1220px",
          height: "calc(100vh - 210px)",
          minHeight: "560px",
          title: "存储管理器",
          spacialCls: "storageManager",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/storageManager.png",

          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 5,
          width: "1210px",
          height: "calc(100vh - 190px)",
          minHeight: "560px",
          title: "logCenter",
          spacialCls: "controlCenter",
          cls: "deactive-win",
          titleImgUrl: "../../../../public/image/DesktopAppView/logCenter.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 6,
          width: "1200px",
          height: "calc(100vh - 180px)",
          minHeight: "560px",
          title: "安全顾问",
          spacialCls: "securityScan",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/securityScan.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 7,
          width: "1190px",
          height: "calc(100vh - 170px)",
          minHeight: "560px",
          title: "技术支持中心",
          spacialCls: "supportCenter",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/supportCenter.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 8,
          width: "1170px",
          height: "calc(100vh - 160px)",
          minHeight: "560px",
          title: "Storage Manager",
          spacialCls: "storageManager",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/storageManager.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 9,
          width: "1160px",
          height: "calc(100vh - 150px)",
          minHeight: "560px",
          title: "Synology MailPlus Server",
          spacialCls: "mailPlusServer",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/mailPlusServer.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 10,
          width: "1150px",
          height: "calc(100vh - 140px)",
          minHeight: "560px",
          title: "Synology Chat 管理控制台",
          spacialCls: "chatAdminpng",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/chatAdminpng.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 11,
          width: "1140px",
          height: "calc(100vh - 130px)",
          minHeight: "560px",
          title: "Synology Chat",
          spacialCls: "chat",
          cls: "deactive-win",
          titleImgUrl: "../../../../public/image/DesktopAppView/chat.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 12,
          width: "1010px",
          height: "calc(100vh - 200px)",
          minHeight: "440px",
          title: "File Station",
          spacialCls: "file",
          cls: "deactive-win",
          titleImgUrl: "../../../../public/image/index/file.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 13,
          width: "1120px",
          height: "calc(100vh - 110px)",
          minHeight: "560px",
          title: "Hyper Backup",
          spacialCls: "hyperBackup",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/hyperBackup.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 14,
          width: "1110px",
          height: "calc(100vh - 100px)",
          minHeight: "560px",
          title: "Advanced Media Extensions",
          spacialCls: "aME",
          cls: "deactive-win",
          titleImgUrl: "../../../../public/image/DesktopAppView/aME.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 15,
          width: "1100px",
          height: "calc(100vh - 90px)",
          minHeight: "560px",
          title: "Synology Calendar",
          spacialCls: "synologyCalendar",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/synologyCalendar.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 16,
          width: "1090px",
          height: "calc(100vh - 80px)",
          minHeight: "560px",
          title: "Synology Contacts",
          spacialCls: "contacts",
          cls: "deactive-win",
          titleImgUrl: "../../../../public/image/DesktopAppView/contacts.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 17,
          width: "1070px",
          height: "calc(100vh - 70px)",
          minHeight: "560px",
          title: "Universal Search",
          spacialCls: "universalSearch",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/universalSearch.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 18,
          width: "1060px",
          height: "calc(100vh - 60px)",
          minHeight: "560px",
          title: "Synology Photos",
          spacialCls: "photos",
          cls: "deactive-win",
          titleImgUrl: "../../../../public/image/DesktopAppView/photos.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 19,
          width: "1260px",
          height: "calc(100vh - 210px)",
          minHeight: "560px",
          title: "Audio Station",
          spacialCls: "audioStation",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/audioStation.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 20,
          width: "1050px",
          height: "calc(100vh - 30px)",
          minHeight: "560px",
          title: "Synology Drive 管理控制台",
          spacialCls: "driveAdminConsole",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/driveAdminConsole.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 21,
          width: "1060px",
          height: "calc(100vh - 60px)",
          minHeight: "560px",
          title: "Download Station",
          spacialCls: "downloadStation",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/downloadStation.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 22,
          width: "1240px",
          height: "calc(100vh - 170px)",
          minHeight: "560px",
          title: "Synology Drive",
          spacialCls: "synologyDrive",
          display: "none",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/synologyDrive.png",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 23,
          width: "1130px",
          height: "calc(100vh - 50px)",
          minHeight: "560px",
          title: "Synology MailPlus",
          spacialCls: "mailPlus",
          cls: "deactive-win",
          titleImgUrl: "../../../../public/image/DesktopAppView/mailPlus.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 24,
          width: "1050px",
          height: "calc(100vh - 90px)",
          minHeight: "560px",
          title: "媒体服务器",
          spacialCls: "mediaServer",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/mediaServer.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 25,
          width: "1120px",
          height: "calc(100vh - 100px)",
          minHeight: "560px",
          title: "Note Station",
          spacialCls: "noteStation",
          display: "none",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/noteStation.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 26,
          width: "1130px",
          height: "calc(100vh - 80px)",
          minHeight: "560px",
          title: "OAuth Service",
          spacialCls: "authenticator",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/authenticator.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 27,
          width: "1070px",
          height: "calc(100vh - 180px)",
          minHeight: "560px",
          title: "PDF 查看器",
          spacialCls: "documentViewer",
          display: "none",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/documentViewer.png",
          zIndex: "9050",
        },
        {
          id: 28,
          width: "1030px",
          height: "calc(100vh - 200px)",
          minHeight: "560px",
          title: "Synology Drive ShareSync",
          spacialCls: "package",
          cls: "deactive-win",
          titleImgUrl: "../../../../public/image/DesktopAppView/package.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 29,
          width: "1110px",
          height: "calc(100vh - 110px)",
          minHeight: "560px",
          title: "Video Station",
          spacialCls: "videoStation",
          cls: "deactive-win",
          titleImgUrl:
            "../../../../public/image/DesktopAppView/videoStation.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
        {
          id: 30,
          width: "1120px",
          height: "calc(100vh - 120px)",
          minHeight: "560px",
          title: "文本编辑器",
          spacialCls: "textEditor",
          cls: "deactive-win",
          titleImgUrl: "../../../../public/image/DesktopAppView/textEditor.png",
          display: "none",
          zIndex: 9050,
          iconRestore: "none",
          iconMaximize: "block",
        },
      ],
      userSettingData: {
        spacialCls: "UserSetting",
        id: 1111,
        display: "none",
        width: "850px",
        zIndex: 9040,
        cls: "deactive-win",
        title: "个人设置",
        titleImgUrl: "../../../../public/image/index/personalSetting.png",
        iconRestore: "none",
        iconMaximize: "block",
        restoreWidth: "850px",
      },
      fixWindowData: {
        zIndex: 9050,
        display: "block",
        cls: "active-win",
      },
      notifyTrayPanelDetailData: {
        zIndex: 9050,
        display: "none",
        cls: "deactive-win",
      },
      notifySettingData: {
        zIndex: 9050,
        display: "none",
        cls: "deactive-win",
      },
      notifyShowAllData: {
        zIndex: 9050,
        display: "none",
        cls: "deactive-win",
        clearAllNotifyData: {
          clearAllNotifyMessageDisplay: "none",
          clearAllNotifyMessageCls: "deactive-win",
          clearAllNotifyMessageZIndex: 9050,
        },
      },
      
    };
  },
  mounted() {
    this.$bus.on("changeDefaultZIndex", this.changeDefaultZIndex);
    this.$bus.on('maskShowOrHidden',this.maskShowOrHidden)
    this.$bus.on("showOrHiddenNotifyShowallClearAll",this.showOrHiddenNotifyShowallClearAll)
  },
  methods: {
    // 改变公共zIndex
    changeDefaultZIndex(zIndex) {
      if (this.defaultZIndex > 999999990) {
        this.defaultZIndex = 999999990;
      }
      this.defaultZIndex = zIndex;
    },
    // 按z-index 给窗口排序
    arraySort(array, key) {
      return array.sort(function (a, b) {
        var x = a[key]; //如果要从大到小,把x,y互换就好
        var y = b[key];
        return x < y ? -1 : x > y ? 1 : 0;
      });
    },
    // 遮罩层的显示与隐藏
    maskShowOrHidden(bol){
      this.maskIsShow = bol
    },
    // notifyShowAll界面的清除全部遮罩层的显示与隐藏
    showOrHiddenNotifyShowallClearAll(bol){
      this.notifyIsShow = bol
      console.log(bol)
    }
  },
  watch: {
    defaultZIndex() {
      console.log(this.maskIsShow)
      let appViewIndex = this.appViewData.findIndex((item) => {
        return item.zIndex >= this.defaultZIndex && item.display === "block";
      });
      let fixWindowZIndexIsMax =
        this.fixWindowData.zIndex >= this.defaultZIndex &&
        this.fixWindowData.display === "block";
      let userSettingZIndexMax =
        this.userSettingData.zIndex >= this.defaultZIndex &&
        this.userSettingData.display === "block";
      let notifyTrayPanelDetailZIndexMax =
        this.notifyTrayPanelDetailData.zIndex >= this.defaultZIndex &&
        this.notifyTrayPanelDetailData.display === "block";
      let notifySettingZIndexMax =
        this.notifySettingData.zIndex >= this.defaultZIndex &&
        this.notifySettingData.display === "block";
      let notifyShowAllZIndexMax =
        this.notifyShowAllData.zIndex >= this.defaultZIndex &&
        this.notifyShowAllData.display === "block";
      console.log(
        appViewIndex,
        fixWindowZIndexIsMax,
        userSettingZIndexMax,
        notifyTrayPanelDetailZIndexMax,
        notifySettingZIndexMax,
        notifyShowAllZIndexMax
      );
      console.log(
        this.defaultZIndex,
        this.fixWindowData.zIndex,
        this.userSettingData.zIndex,
        this.notifyTrayPanelDetailData.zIndex,
        this.notifySettingData.zIndex,
        this.notifyShowAllData.zIndex
      );
      if ((appViewIndex || appViewIndex === 0) && appViewIndex !== -1) {
        this.appViewData.forEach((item) => {
          if (item.cls === "active-win") {
            item.cls = "deactive-win";
          }
        });
        this.appViewData[appViewIndex].cls = "active-win";
        let obj = {
          imgUrl: this.appViewData[appViewIndex].titleImgUrl,
          zIndex: this.appViewData[appViewIndex].zIndex,
          spacialCls: this.appViewData[appViewIndex].spacialCls,
          title: this.appViewData[appViewIndex].title,
          id: this.appViewData[appViewIndex].id,
        };
        this.$bus.emit("changeDialogWindow", obj);
        this.userSettingData.cls = "deactive-win";
        this.notifyTrayPanelDetailData.cls = "deactive-win";
        this.fixWindowData.cls = "deactive-win";
        this.notifyShowAllData.cls = "deactive-win";
        this.notifySettingData.cls = "deactive-win";
      } else if (fixWindowZIndexIsMax) {
        this.fixWindowData.cls = "active-win";
        this.userSettingData.cls = "deactive-win";
        this.notifyTrayPanelDetailData.cls = "deactive-win";
        this.notifyShowAllData.cls = "deactive-win";
        this.notifySettingData.cls = "deactive-win";
        this.appViewData.forEach((item) => {
          if (item.cls === "active-win") {
            item.cls = "deactive-win";
          }
        });
      } else if (userSettingZIndexMax) {
        this.userSettingData.cls = "active-win";
        let obj = {
          spacialCls: this.userSettingData.spacialCls,
          imgUrl: this.userSettingData.titleImgUrl,
          zIndex: this.userSettingData.zIndex,
          title: this.userSettingData.title,
          id: this.userSettingData.id,
        };
        this.$bus.emit("clickShortcutItem", obj);
        this.notifyTrayPanelDetailData.cls = "deactive-win";
        this.fixWindowData.cls = "deactive-win";
        this.notifyShowAllData.cls = "deactive-win";
        this.notifySettingData.cls = "deactive-win";
        this.appViewData.forEach((item) => {
          if (item.cls === "active-win") {
            item.cls = "deactive-win";
          }
        });
      } else if (notifyTrayPanelDetailZIndexMax) {
        this.notifyTrayPanelDetailData.cls = "active-win";
        this.userSettingData.cls = "deactive-win";
        this.fixWindowData.cls = "deactive-win";
        this.notifyShowAllData.cls = "deactive-win";
        this.notifySettingData.cls = "deactive-win";
        this.appViewData.forEach((item) => {
          if (item.cls === "active-win") {
            item.cls = "deactive-win";
          }
        });
      } else if (notifySettingZIndexMax) {
        this.notifySettingData.cls = "active-win";
        this.notifyTrayPanelDetailData.cls = "deactive-win";
        this.userSettingData.cls = "deactive-win";
        this.fixWindowData.cls = "deactive-win";
        this.notifyShowAllData.cls = "deactive-win";
        this.appViewData.forEach((item) => {
          if (item.cls === "active-win") {
            item.cls = "deactive-win";
          }
        });
      } else if (notifyShowAllZIndexMax) {
        console.log(1121)
        this.notifyShowAllData.cls = "active-win";
        this.notifyTrayPanelDetailData.cls = "deactive-win";
        this.userSettingData.cls = "deactive-win";
        this.fixWindowData.cls = "deactive-win";
        this.notifySettingData.cls = "deactive-win";
        this.appViewData.forEach((item) => {
          if (item.cls === "active-win") {
            item.cls = "deactive-win";
          }
        });
      }
      if (
        appViewIndex === -1 &&
        !fixWindowZIndexIsMax &&
        !userSettingZIndexMax &&
        !notifyTrayPanelDetailZIndexMax &&
        !notifySettingZIndexMax &&
        !notifyShowAllZIndexMax
      ) {
        let appViewData = this.appViewData.filter((item) => {
          console.log(item.display);
          return item.display === "block";
        });
        if (appViewData.length) {
          appViewData = this.arraySort(appViewData, "zIndex");
        }
        console.log(appViewData.length, appViewData);
        let fixWindowZIndexIsMax1 =
          this.fixWindowData.display === "block" &&
          (this.fixWindowData.zIndex >= this.userSettingData.zIndex ||
            this.userSettingData.display === "none") &&
          (this.fixWindowData.zIndex >= this.notifyTrayPanelDetailData.zIndex ||
            this.notifyTrayPanelDetailData.display === "none") &&
          (appViewData.length
            ? this.fixWindowData.zIndex >=
              appViewData[appViewData.length - 1].zIndex
            : true);
        let userSettingZIndexMax1 =
          this.userSettingData.display === "block" &&
          (this.userSettingData.zIndex >= this.fixWindowData.zIndex ||
            this.fixWindowData.display === "none") &&
          (this.userSettingData.zIndex >=
            this.notifyTrayPanelDetailData.zIndex ||
            this.notifyTrayPanelDetailData.display === "none") &&
          (appViewData.length
            ? this.userSettingData.zIndex >=
              appViewData[appViewData.length - 1].zIndex
            : true);
        let notifyTrayPanelDetailZIndexMax1 =
          this.notifyTrayPanelDetailData.display === "block" &&
          (this.notifyTrayPanelDetailData.zIndex >=
            this.userSettingData.zIndex ||
            this.userSettingData.display === "none") &&
          (this.notifyTrayPanelDetailData.zIndex >= this.fixWindowData.zIndex ||
            this.fixWindowData.display === "none") &&
          (appViewData.length
            ? this.notifyTrayPanelDetailData.zIndex >=
              appViewData[appViewData.length - 1].zIndex
            : true);

        let notifySettingZIndexMax1 =
          this.notifySettingData.display === "block" &&
          (this.notifySettingData.zIndex >= this.userSettingData.zIndex ||
            this.userSettingData.display === "none") &&
          (this.notifySettingData.zIndex >= this.fixWindowData.zIndex ||
            this.fixWindowData.display === "none") &&
          (this.notifySettingData.zIndex >=
            this.notifyTrayPanelDetailData.zIndex ||
            this.notifyTrayPanelDetailData.display === "none") &&
          (this.notifySettingData.zIndex >= this.notifyShowAllData.zIndex ||
            this.notifyShowAllData.display === "none") &&
          (appViewData.length
            ? this.notifySettingData.zIndex >=
              appViewData[appViewData.length - 1].zIndex
            : true);
        let notifyShowAllZIndexMax1 =
          this.notifyShowAllData.display === "block" &&
          (this.notifyShowAllData.zIndex >= this.userSettingData.zIndex ||
            this.userSettingData.display === "none") &&
          (this.notifyShowAllData.zIndex >= this.fixWindowData.zIndex ||
            this.fixWindowData.display === "none") &&
          (this.notifyShowAllData.zIndex >=
            this.notifyTrayPanelDetailData.zIndex ||
            this.notifyTrayPanelDetailData.display === "none") &&
          (appViewData.length
            ? this.notifyShowAllData.zIndex >=
              appViewData[appViewData.length - 1].zIndex
            : true);
        let appViewIsMax =
          appViewData.length &&
          (appViewData[appViewData.length - 1].zIndex >
            this.fixWindowData.zIndex ||
            this.fixWindowData.display === "none") &&
          (appViewData[appViewData.length - 1].zIndex >
            this.userSettingData.zIndex ||
            this.userSettingData.display === "none") &&
          (appViewData[appViewData.length - 1].zIndex >
            this.notifyTrayPanelDetailData.zIndex ||
            this.notifyTrayPanelDetailData.display === "none");
        console.log(
          fixWindowZIndexIsMax1,
          userSettingZIndexMax1,
          notifyTrayPanelDetailZIndexMax1,
          notifySettingZIndexMax1,
          notifyShowAllZIndexMax1,
          appViewIsMax
        );
        if (fixWindowZIndexIsMax1) {
          console.log("1111w");
          this.fixWindowData.cls = "active-win";
        } else if (userSettingZIndexMax1) {
          this.userSettingData.cls = "active-win";
          let obj = {
            spacialCls: this.userSettingData.spacialCls,
            imgUrl: this.userSettingData.titleImgUrl,
            zIndex: this.userSettingData.zIndex,
            title: this.userSettingData.title,
            id: this.userSettingData.id,
          };
          this.$bus.emit("clickShortcutItem", obj);
        } else if (notifyTrayPanelDetailZIndexMax1) {
          this.notifyTrayPanelDetailData.cls = "active-win";
        } else if (notifySettingZIndexMax1) {
          this.notifySettingData.cls = "active-win";
        } else if (notifyShowAllZIndexMax1) {
          this.notifyShowAllData.cls = "active-win";
        } else if (appViewIsMax) {
          let index = this.appViewData.findIndex((item) => {
            return item.id === appViewData[appViewData.length - 1].id;
          });
          if ((index || index === 0) && index !== -1) {
            this.appViewData.forEach((item) => {
              if (item.cls === "active-win") {
                item.cls = "deactive-win";
              }
            });
            this.appViewData[index].cls = "active-win";
            let obj = {
              imgUrl: this.appViewData[index].titleImgUrl,
              zIndex: this.appViewData[index].zIndex,
              spacialCls: this.appViewData[index].spacialCls,
              title: this.appViewData[index].title,
              id: this.appViewData[index].id,
            };
            this.$bus.emit("changeDialogWindow", obj);
          }
        }
      }
      if(this.maskIsShow || this.notifyIsShow){
        this.appViewData.forEach((item) => {
          if (item.cls === "active-win") {
            item.cls = "deactive-win";
          }
        });
        this.fixWindowData.cls = "deactive-win";
        this.notifySettingData.cls = "deactive-win";
        this.notifyTrayPanelDetailData.cls = "deactive-win";
        this.notifyShowAllData.cls = "deactive-win";
        this.userSettingData.cls = "deactive-win";
      }
    },
  },
  components: {
    Header,
    Desktop,
    DesktopAppView,
    UserAbout,
    Mask,
    Message
  },
  name: "Container",
};
</script>

<style lang="">
</style>
