index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  1. <template>
  2. <!-- 容器 -->
  3. <div>
  4. <Header></Header>
  5. <Desktop
  6. :defaultZIndex="defaultZIndex"
  7. :userSettingData="userSettingData"
  8. :fixWindowData="fixWindowData"
  9. :notifyTrayPanelDetailData="notifyTrayPanelDetailData"
  10. :notifySettingData="notifySettingData"
  11. :notifyShowAllData="notifyShowAllData"
  12. ></Desktop>
  13. <DesktopAppView
  14. :defaultZIndex="defaultZIndex"
  15. :appViewData="appViewData"
  16. ></DesktopAppView>
  17. <!-- <UserAbout :defaultZIndex="defaultZIndex"></UserAbout> -->
  18. <Mask :defaultZIndex="defaultZIndex" :maskIsShow="maskIsShow"></Mask>
  19. <Message></Message>
  20. </div>
  21. </template>
  22. <script>
  23. import Header from "./Header";
  24. import Desktop from "./Desktop";
  25. import DesktopAppView from "./DesktopAppView";
  26. import UserAbout from "./Desktop/UserAbout";
  27. import Mask from "./Mask";
  28. import Message from "./Message";
  29. export default {
  30. data() {
  31. return {
  32. defaultZIndex: 9050,
  33. maskIsShow:false,
  34. notifyIsShow:false,
  35. appViewData: [
  36. {
  37. id: 0,
  38. width: "1150px",
  39. height: "calc(100vh - 120px)",
  40. minHeight: "520px",
  41. title: "控制中心",
  42. spacialCls: "controlCenter",
  43. cls: "deactive-win",
  44. titleImgUrl: "../../../../public/image/index/controlCenter.png",
  45. display: "none",
  46. zIndex: 9050,
  47. iconRestore: "none",
  48. iconMaximize: "block",
  49. },
  50. {
  51. id: 1,
  52. width: "1010px",
  53. height: "calc(100vh - 220px)",
  54. minHeight: "420px",
  55. title: "DSM 说明",
  56. spacialCls: "question",
  57. cls: "deactive-win",
  58. titleImgUrl: "../../../../public/image/index/question.png",
  59. display: "none",
  60. zIndex: 9050,
  61. iconRestore: "none",
  62. iconMaximize: "block",
  63. },
  64. {
  65. id: 2,
  66. width: "1254px",
  67. height: "calc(100vh - 80px)",
  68. minHeight: "560px",
  69. title: "套件中心",
  70. spacialCls: "tjCenter",
  71. cls: "deactive-win",
  72. titleImgUrl: "../../../../public/image/index/tjCenter.png",
  73. display: "none",
  74. zIndex: 9050,
  75. iconRestore: "none",
  76. iconMaximize: "block",
  77. },
  78. {
  79. id: 3,
  80. width: "1230px",
  81. height: "calc(100vh - 200px)",
  82. minHeight: "560px",
  83. title: "资源监控",
  84. spacialCls: "resourceMonitor",
  85. cls: "deactive-win",
  86. titleImgUrl:
  87. "../../../../public/image/DesktopAppView/resourceMonitor.png",
  88. display: "none",
  89. zIndex: 9050,
  90. iconRestore: "none",
  91. iconMaximize: "block",
  92. },
  93. {
  94. id: 4,
  95. width: "1220px",
  96. height: "calc(100vh - 210px)",
  97. minHeight: "560px",
  98. title: "存储管理器",
  99. spacialCls: "storageManager",
  100. cls: "deactive-win",
  101. titleImgUrl:
  102. "../../../../public/image/DesktopAppView/storageManager.png",
  103. display: "none",
  104. zIndex: 9050,
  105. iconRestore: "none",
  106. iconMaximize: "block",
  107. },
  108. {
  109. id: 5,
  110. width: "1210px",
  111. height: "calc(100vh - 190px)",
  112. minHeight: "560px",
  113. title: "logCenter",
  114. spacialCls: "controlCenter",
  115. cls: "deactive-win",
  116. titleImgUrl: "../../../../public/image/DesktopAppView/logCenter.png",
  117. display: "none",
  118. zIndex: 9050,
  119. iconRestore: "none",
  120. iconMaximize: "block",
  121. },
  122. {
  123. id: 6,
  124. width: "1200px",
  125. height: "calc(100vh - 180px)",
  126. minHeight: "560px",
  127. title: "安全顾问",
  128. spacialCls: "securityScan",
  129. cls: "deactive-win",
  130. titleImgUrl:
  131. "../../../../public/image/DesktopAppView/securityScan.png",
  132. display: "none",
  133. zIndex: 9050,
  134. iconRestore: "none",
  135. iconMaximize: "block",
  136. },
  137. {
  138. id: 7,
  139. width: "1190px",
  140. height: "calc(100vh - 170px)",
  141. minHeight: "560px",
  142. title: "技术支持中心",
  143. spacialCls: "supportCenter",
  144. cls: "deactive-win",
  145. titleImgUrl:
  146. "../../../../public/image/DesktopAppView/supportCenter.png",
  147. display: "none",
  148. zIndex: 9050,
  149. iconRestore: "none",
  150. iconMaximize: "block",
  151. },
  152. {
  153. id: 8,
  154. width: "1170px",
  155. height: "calc(100vh - 160px)",
  156. minHeight: "560px",
  157. title: "Storage Manager",
  158. spacialCls: "storageManager",
  159. cls: "deactive-win",
  160. titleImgUrl:
  161. "../../../../public/image/DesktopAppView/storageManager.png",
  162. display: "none",
  163. zIndex: 9050,
  164. iconRestore: "none",
  165. iconMaximize: "block",
  166. },
  167. {
  168. id: 9,
  169. width: "1160px",
  170. height: "calc(100vh - 150px)",
  171. minHeight: "560px",
  172. title: "Synology MailPlus Server",
  173. spacialCls: "mailPlusServer",
  174. cls: "deactive-win",
  175. titleImgUrl:
  176. "../../../../public/image/DesktopAppView/mailPlusServer.png",
  177. display: "none",
  178. zIndex: 9050,
  179. iconRestore: "none",
  180. iconMaximize: "block",
  181. },
  182. {
  183. id: 10,
  184. width: "1150px",
  185. height: "calc(100vh - 140px)",
  186. minHeight: "560px",
  187. title: "Synology Chat 管理控制台",
  188. spacialCls: "chatAdminpng",
  189. cls: "deactive-win",
  190. titleImgUrl:
  191. "../../../../public/image/DesktopAppView/chatAdminpng.png",
  192. display: "none",
  193. zIndex: 9050,
  194. iconRestore: "none",
  195. iconMaximize: "block",
  196. },
  197. {
  198. id: 11,
  199. width: "1140px",
  200. height: "calc(100vh - 130px)",
  201. minHeight: "560px",
  202. title: "Synology Chat",
  203. spacialCls: "chat",
  204. cls: "deactive-win",
  205. titleImgUrl: "../../../../public/image/DesktopAppView/chat.png",
  206. display: "none",
  207. zIndex: 9050,
  208. iconRestore: "none",
  209. iconMaximize: "block",
  210. },
  211. {
  212. id: 12,
  213. width: "1010px",
  214. height: "calc(100vh - 200px)",
  215. minHeight: "440px",
  216. title: "File Station",
  217. spacialCls: "file",
  218. cls: "deactive-win",
  219. titleImgUrl: "../../../../public/image/index/file.png",
  220. display: "none",
  221. zIndex: 9050,
  222. iconRestore: "none",
  223. iconMaximize: "block",
  224. },
  225. {
  226. id: 13,
  227. width: "1120px",
  228. height: "calc(100vh - 110px)",
  229. minHeight: "560px",
  230. title: "Hyper Backup",
  231. spacialCls: "hyperBackup",
  232. cls: "deactive-win",
  233. titleImgUrl:
  234. "../../../../public/image/DesktopAppView/hyperBackup.png",
  235. display: "none",
  236. zIndex: 9050,
  237. iconRestore: "none",
  238. iconMaximize: "block",
  239. },
  240. {
  241. id: 14,
  242. width: "1110px",
  243. height: "calc(100vh - 100px)",
  244. minHeight: "560px",
  245. title: "Advanced Media Extensions",
  246. spacialCls: "aME",
  247. cls: "deactive-win",
  248. titleImgUrl: "../../../../public/image/DesktopAppView/aME.png",
  249. display: "none",
  250. zIndex: 9050,
  251. iconRestore: "none",
  252. iconMaximize: "block",
  253. },
  254. {
  255. id: 15,
  256. width: "1100px",
  257. height: "calc(100vh - 90px)",
  258. minHeight: "560px",
  259. title: "Synology Calendar",
  260. spacialCls: "synologyCalendar",
  261. cls: "deactive-win",
  262. titleImgUrl:
  263. "../../../../public/image/DesktopAppView/synologyCalendar.png",
  264. display: "none",
  265. zIndex: 9050,
  266. iconRestore: "none",
  267. iconMaximize: "block",
  268. },
  269. {
  270. id: 16,
  271. width: "1090px",
  272. height: "calc(100vh - 80px)",
  273. minHeight: "560px",
  274. title: "Synology Contacts",
  275. spacialCls: "contacts",
  276. cls: "deactive-win",
  277. titleImgUrl: "../../../../public/image/DesktopAppView/contacts.png",
  278. display: "none",
  279. zIndex: 9050,
  280. iconRestore: "none",
  281. iconMaximize: "block",
  282. },
  283. {
  284. id: 17,
  285. width: "1070px",
  286. height: "calc(100vh - 70px)",
  287. minHeight: "560px",
  288. title: "Universal Search",
  289. spacialCls: "universalSearch",
  290. cls: "deactive-win",
  291. titleImgUrl:
  292. "../../../../public/image/DesktopAppView/universalSearch.png",
  293. display: "none",
  294. zIndex: 9050,
  295. iconRestore: "none",
  296. iconMaximize: "block",
  297. },
  298. {
  299. id: 18,
  300. width: "1060px",
  301. height: "calc(100vh - 60px)",
  302. minHeight: "560px",
  303. title: "Synology Photos",
  304. spacialCls: "photos",
  305. cls: "deactive-win",
  306. titleImgUrl: "../../../../public/image/DesktopAppView/photos.png",
  307. display: "none",
  308. zIndex: 9050,
  309. iconRestore: "none",
  310. iconMaximize: "block",
  311. },
  312. {
  313. id: 19,
  314. width: "1260px",
  315. height: "calc(100vh - 210px)",
  316. minHeight: "560px",
  317. title: "Audio Station",
  318. spacialCls: "audioStation",
  319. cls: "deactive-win",
  320. titleImgUrl:
  321. "../../../../public/image/DesktopAppView/audioStation.png",
  322. display: "none",
  323. zIndex: 9050,
  324. iconRestore: "none",
  325. iconMaximize: "block",
  326. },
  327. {
  328. id: 20,
  329. width: "1050px",
  330. height: "calc(100vh - 30px)",
  331. minHeight: "560px",
  332. title: "Synology Drive 管理控制台",
  333. spacialCls: "driveAdminConsole",
  334. cls: "deactive-win",
  335. titleImgUrl:
  336. "../../../../public/image/DesktopAppView/driveAdminConsole.png",
  337. display: "none",
  338. zIndex: 9050,
  339. iconRestore: "none",
  340. iconMaximize: "block",
  341. },
  342. {
  343. id: 21,
  344. width: "1060px",
  345. height: "calc(100vh - 60px)",
  346. minHeight: "560px",
  347. title: "Download Station",
  348. spacialCls: "downloadStation",
  349. cls: "deactive-win",
  350. titleImgUrl:
  351. "../../../../public/image/DesktopAppView/downloadStation.png",
  352. display: "none",
  353. zIndex: 9050,
  354. iconRestore: "none",
  355. iconMaximize: "block",
  356. },
  357. {
  358. id: 22,
  359. width: "1240px",
  360. height: "calc(100vh - 170px)",
  361. minHeight: "560px",
  362. title: "Synology Drive",
  363. spacialCls: "synologyDrive",
  364. display: "none",
  365. cls: "deactive-win",
  366. titleImgUrl:
  367. "../../../../public/image/DesktopAppView/synologyDrive.png",
  368. zIndex: 9050,
  369. iconRestore: "none",
  370. iconMaximize: "block",
  371. },
  372. {
  373. id: 23,
  374. width: "1130px",
  375. height: "calc(100vh - 50px)",
  376. minHeight: "560px",
  377. title: "Synology MailPlus",
  378. spacialCls: "mailPlus",
  379. cls: "deactive-win",
  380. titleImgUrl: "../../../../public/image/DesktopAppView/mailPlus.png",
  381. display: "none",
  382. zIndex: 9050,
  383. iconRestore: "none",
  384. iconMaximize: "block",
  385. },
  386. {
  387. id: 24,
  388. width: "1050px",
  389. height: "calc(100vh - 90px)",
  390. minHeight: "560px",
  391. title: "媒体服务器",
  392. spacialCls: "mediaServer",
  393. cls: "deactive-win",
  394. titleImgUrl:
  395. "../../../../public/image/DesktopAppView/mediaServer.png",
  396. display: "none",
  397. zIndex: 9050,
  398. iconRestore: "none",
  399. iconMaximize: "block",
  400. },
  401. {
  402. id: 25,
  403. width: "1120px",
  404. height: "calc(100vh - 100px)",
  405. minHeight: "560px",
  406. title: "Note Station",
  407. spacialCls: "noteStation",
  408. display: "none",
  409. cls: "deactive-win",
  410. titleImgUrl:
  411. "../../../../public/image/DesktopAppView/noteStation.png",
  412. display: "none",
  413. zIndex: 9050,
  414. iconRestore: "none",
  415. iconMaximize: "block",
  416. },
  417. {
  418. id: 26,
  419. width: "1130px",
  420. height: "calc(100vh - 80px)",
  421. minHeight: "560px",
  422. title: "OAuth Service",
  423. spacialCls: "authenticator",
  424. cls: "deactive-win",
  425. titleImgUrl:
  426. "../../../../public/image/DesktopAppView/authenticator.png",
  427. display: "none",
  428. zIndex: 9050,
  429. iconRestore: "none",
  430. iconMaximize: "block",
  431. },
  432. {
  433. id: 27,
  434. width: "1070px",
  435. height: "calc(100vh - 180px)",
  436. minHeight: "560px",
  437. title: "PDF 查看器",
  438. spacialCls: "documentViewer",
  439. display: "none",
  440. cls: "deactive-win",
  441. titleImgUrl:
  442. "../../../../public/image/DesktopAppView/documentViewer.png",
  443. zIndex: "9050",
  444. },
  445. {
  446. id: 28,
  447. width: "1030px",
  448. height: "calc(100vh - 200px)",
  449. minHeight: "560px",
  450. title: "Synology Drive ShareSync",
  451. spacialCls: "package",
  452. cls: "deactive-win",
  453. titleImgUrl: "../../../../public/image/DesktopAppView/package.png",
  454. display: "none",
  455. zIndex: 9050,
  456. iconRestore: "none",
  457. iconMaximize: "block",
  458. },
  459. {
  460. id: 29,
  461. width: "1110px",
  462. height: "calc(100vh - 110px)",
  463. minHeight: "560px",
  464. title: "Video Station",
  465. spacialCls: "videoStation",
  466. cls: "deactive-win",
  467. titleImgUrl:
  468. "../../../../public/image/DesktopAppView/videoStation.png",
  469. display: "none",
  470. zIndex: 9050,
  471. iconRestore: "none",
  472. iconMaximize: "block",
  473. },
  474. {
  475. id: 30,
  476. width: "1120px",
  477. height: "calc(100vh - 120px)",
  478. minHeight: "560px",
  479. title: "文本编辑器",
  480. spacialCls: "textEditor",
  481. cls: "deactive-win",
  482. titleImgUrl: "../../../../public/image/DesktopAppView/textEditor.png",
  483. display: "none",
  484. zIndex: 9050,
  485. iconRestore: "none",
  486. iconMaximize: "block",
  487. },
  488. ],
  489. userSettingData: {
  490. spacialCls: "UserSetting",
  491. id: 1111,
  492. display: "none",
  493. width: "850px",
  494. zIndex: 9040,
  495. cls: "deactive-win",
  496. title: "个人设置",
  497. titleImgUrl: "../../../../public/image/index/personalSetting.png",
  498. iconRestore: "none",
  499. iconMaximize: "block",
  500. restoreWidth: "850px",
  501. },
  502. fixWindowData: {
  503. zIndex: 9050,
  504. display: "block",
  505. cls: "active-win",
  506. },
  507. notifyTrayPanelDetailData: {
  508. zIndex: 9050,
  509. display: "none",
  510. cls: "deactive-win",
  511. },
  512. notifySettingData: {
  513. zIndex: 9050,
  514. display: "none",
  515. cls: "deactive-win",
  516. },
  517. notifyShowAllData: {
  518. zIndex: 9050,
  519. display: "none",
  520. cls: "deactive-win",
  521. clearAllNotifyData: {
  522. clearAllNotifyMessageDisplay: "none",
  523. clearAllNotifyMessageCls: "deactive-win",
  524. clearAllNotifyMessageZIndex: 9050,
  525. },
  526. },
  527. };
  528. },
  529. mounted() {
  530. this.$bus.on("changeDefaultZIndex", this.changeDefaultZIndex);
  531. this.$bus.on('maskShowOrHidden',this.maskShowOrHidden)
  532. this.$bus.on("showOrHiddenNotifyShowallClearAll",this.showOrHiddenNotifyShowallClearAll)
  533. },
  534. methods: {
  535. // 改变公共zIndex
  536. changeDefaultZIndex(zIndex) {
  537. if (this.defaultZIndex > 999999990) {
  538. this.defaultZIndex = 999999990;
  539. }
  540. this.defaultZIndex = zIndex;
  541. },
  542. // 按z-index 给窗口排序
  543. arraySort(array, key) {
  544. return array.sort(function (a, b) {
  545. var x = a[key]; //如果要从大到小,把x,y互换就好
  546. var y = b[key];
  547. return x < y ? -1 : x > y ? 1 : 0;
  548. });
  549. },
  550. // 遮罩层的显示与隐藏
  551. maskShowOrHidden(bol){
  552. this.maskIsShow = bol
  553. },
  554. // notifyShowAll界面的清除全部遮罩层的显示与隐藏
  555. showOrHiddenNotifyShowallClearAll(bol){
  556. this.notifyIsShow = bol
  557. console.log(bol)
  558. }
  559. },
  560. watch: {
  561. defaultZIndex() {
  562. console.log(this.maskIsShow)
  563. let appViewIndex = this.appViewData.findIndex((item) => {
  564. return item.zIndex >= this.defaultZIndex && item.display === "block";
  565. });
  566. let fixWindowZIndexIsMax =
  567. this.fixWindowData.zIndex >= this.defaultZIndex &&
  568. this.fixWindowData.display === "block";
  569. let userSettingZIndexMax =
  570. this.userSettingData.zIndex >= this.defaultZIndex &&
  571. this.userSettingData.display === "block";
  572. let notifyTrayPanelDetailZIndexMax =
  573. this.notifyTrayPanelDetailData.zIndex >= this.defaultZIndex &&
  574. this.notifyTrayPanelDetailData.display === "block";
  575. let notifySettingZIndexMax =
  576. this.notifySettingData.zIndex >= this.defaultZIndex &&
  577. this.notifySettingData.display === "block";
  578. let notifyShowAllZIndexMax =
  579. this.notifyShowAllData.zIndex >= this.defaultZIndex &&
  580. this.notifyShowAllData.display === "block";
  581. console.log(
  582. appViewIndex,
  583. fixWindowZIndexIsMax,
  584. userSettingZIndexMax,
  585. notifyTrayPanelDetailZIndexMax,
  586. notifySettingZIndexMax,
  587. notifyShowAllZIndexMax
  588. );
  589. console.log(
  590. this.defaultZIndex,
  591. this.fixWindowData.zIndex,
  592. this.userSettingData.zIndex,
  593. this.notifyTrayPanelDetailData.zIndex,
  594. this.notifySettingData.zIndex,
  595. this.notifyShowAllData.zIndex
  596. );
  597. if ((appViewIndex || appViewIndex === 0) && appViewIndex !== -1) {
  598. this.appViewData.forEach((item) => {
  599. if (item.cls === "active-win") {
  600. item.cls = "deactive-win";
  601. }
  602. });
  603. this.appViewData[appViewIndex].cls = "active-win";
  604. let obj = {
  605. imgUrl: this.appViewData[appViewIndex].titleImgUrl,
  606. zIndex: this.appViewData[appViewIndex].zIndex,
  607. spacialCls: this.appViewData[appViewIndex].spacialCls,
  608. title: this.appViewData[appViewIndex].title,
  609. id: this.appViewData[appViewIndex].id,
  610. };
  611. this.$bus.emit("changeDialogWindow", obj);
  612. this.userSettingData.cls = "deactive-win";
  613. this.notifyTrayPanelDetailData.cls = "deactive-win";
  614. this.fixWindowData.cls = "deactive-win";
  615. this.notifyShowAllData.cls = "deactive-win";
  616. this.notifySettingData.cls = "deactive-win";
  617. } else if (fixWindowZIndexIsMax) {
  618. this.fixWindowData.cls = "active-win";
  619. this.userSettingData.cls = "deactive-win";
  620. this.notifyTrayPanelDetailData.cls = "deactive-win";
  621. this.notifyShowAllData.cls = "deactive-win";
  622. this.notifySettingData.cls = "deactive-win";
  623. this.appViewData.forEach((item) => {
  624. if (item.cls === "active-win") {
  625. item.cls = "deactive-win";
  626. }
  627. });
  628. } else if (userSettingZIndexMax) {
  629. this.userSettingData.cls = "active-win";
  630. let obj = {
  631. spacialCls: this.userSettingData.spacialCls,
  632. imgUrl: this.userSettingData.titleImgUrl,
  633. zIndex: this.userSettingData.zIndex,
  634. title: this.userSettingData.title,
  635. id: this.userSettingData.id,
  636. };
  637. this.$bus.emit("clickShortcutItem", obj);
  638. this.notifyTrayPanelDetailData.cls = "deactive-win";
  639. this.fixWindowData.cls = "deactive-win";
  640. this.notifyShowAllData.cls = "deactive-win";
  641. this.notifySettingData.cls = "deactive-win";
  642. this.appViewData.forEach((item) => {
  643. if (item.cls === "active-win") {
  644. item.cls = "deactive-win";
  645. }
  646. });
  647. } else if (notifyTrayPanelDetailZIndexMax) {
  648. this.notifyTrayPanelDetailData.cls = "active-win";
  649. this.userSettingData.cls = "deactive-win";
  650. this.fixWindowData.cls = "deactive-win";
  651. this.notifyShowAllData.cls = "deactive-win";
  652. this.notifySettingData.cls = "deactive-win";
  653. this.appViewData.forEach((item) => {
  654. if (item.cls === "active-win") {
  655. item.cls = "deactive-win";
  656. }
  657. });
  658. } else if (notifySettingZIndexMax) {
  659. this.notifySettingData.cls = "active-win";
  660. this.notifyTrayPanelDetailData.cls = "deactive-win";
  661. this.userSettingData.cls = "deactive-win";
  662. this.fixWindowData.cls = "deactive-win";
  663. this.notifyShowAllData.cls = "deactive-win";
  664. this.appViewData.forEach((item) => {
  665. if (item.cls === "active-win") {
  666. item.cls = "deactive-win";
  667. }
  668. });
  669. } else if (notifyShowAllZIndexMax) {
  670. console.log(1121)
  671. this.notifyShowAllData.cls = "active-win";
  672. this.notifyTrayPanelDetailData.cls = "deactive-win";
  673. this.userSettingData.cls = "deactive-win";
  674. this.fixWindowData.cls = "deactive-win";
  675. this.notifySettingData.cls = "deactive-win";
  676. this.appViewData.forEach((item) => {
  677. if (item.cls === "active-win") {
  678. item.cls = "deactive-win";
  679. }
  680. });
  681. }
  682. if (
  683. appViewIndex === -1 &&
  684. !fixWindowZIndexIsMax &&
  685. !userSettingZIndexMax &&
  686. !notifyTrayPanelDetailZIndexMax &&
  687. !notifySettingZIndexMax &&
  688. !notifyShowAllZIndexMax
  689. ) {
  690. let appViewData = this.appViewData.filter((item) => {
  691. console.log(item.display);
  692. return item.display === "block";
  693. });
  694. if (appViewData.length) {
  695. appViewData = this.arraySort(appViewData, "zIndex");
  696. }
  697. console.log(appViewData.length, appViewData);
  698. let fixWindowZIndexIsMax1 =
  699. this.fixWindowData.display === "block" &&
  700. (this.fixWindowData.zIndex >= this.userSettingData.zIndex ||
  701. this.userSettingData.display === "none") &&
  702. (this.fixWindowData.zIndex >= this.notifyTrayPanelDetailData.zIndex ||
  703. this.notifyTrayPanelDetailData.display === "none") &&
  704. (appViewData.length
  705. ? this.fixWindowData.zIndex >=
  706. appViewData[appViewData.length - 1].zIndex
  707. : true);
  708. let userSettingZIndexMax1 =
  709. this.userSettingData.display === "block" &&
  710. (this.userSettingData.zIndex >= this.fixWindowData.zIndex ||
  711. this.fixWindowData.display === "none") &&
  712. (this.userSettingData.zIndex >=
  713. this.notifyTrayPanelDetailData.zIndex ||
  714. this.notifyTrayPanelDetailData.display === "none") &&
  715. (appViewData.length
  716. ? this.userSettingData.zIndex >=
  717. appViewData[appViewData.length - 1].zIndex
  718. : true);
  719. let notifyTrayPanelDetailZIndexMax1 =
  720. this.notifyTrayPanelDetailData.display === "block" &&
  721. (this.notifyTrayPanelDetailData.zIndex >=
  722. this.userSettingData.zIndex ||
  723. this.userSettingData.display === "none") &&
  724. (this.notifyTrayPanelDetailData.zIndex >= this.fixWindowData.zIndex ||
  725. this.fixWindowData.display === "none") &&
  726. (appViewData.length
  727. ? this.notifyTrayPanelDetailData.zIndex >=
  728. appViewData[appViewData.length - 1].zIndex
  729. : true);
  730. let notifySettingZIndexMax1 =
  731. this.notifySettingData.display === "block" &&
  732. (this.notifySettingData.zIndex >= this.userSettingData.zIndex ||
  733. this.userSettingData.display === "none") &&
  734. (this.notifySettingData.zIndex >= this.fixWindowData.zIndex ||
  735. this.fixWindowData.display === "none") &&
  736. (this.notifySettingData.zIndex >=
  737. this.notifyTrayPanelDetailData.zIndex ||
  738. this.notifyTrayPanelDetailData.display === "none") &&
  739. (this.notifySettingData.zIndex >= this.notifyShowAllData.zIndex ||
  740. this.notifyShowAllData.display === "none") &&
  741. (appViewData.length
  742. ? this.notifySettingData.zIndex >=
  743. appViewData[appViewData.length - 1].zIndex
  744. : true);
  745. let notifyShowAllZIndexMax1 =
  746. this.notifyShowAllData.display === "block" &&
  747. (this.notifyShowAllData.zIndex >= this.userSettingData.zIndex ||
  748. this.userSettingData.display === "none") &&
  749. (this.notifyShowAllData.zIndex >= this.fixWindowData.zIndex ||
  750. this.fixWindowData.display === "none") &&
  751. (this.notifyShowAllData.zIndex >=
  752. this.notifyTrayPanelDetailData.zIndex ||
  753. this.notifyTrayPanelDetailData.display === "none") &&
  754. (appViewData.length
  755. ? this.notifyShowAllData.zIndex >=
  756. appViewData[appViewData.length - 1].zIndex
  757. : true);
  758. let appViewIsMax =
  759. appViewData.length &&
  760. (appViewData[appViewData.length - 1].zIndex >
  761. this.fixWindowData.zIndex ||
  762. this.fixWindowData.display === "none") &&
  763. (appViewData[appViewData.length - 1].zIndex >
  764. this.userSettingData.zIndex ||
  765. this.userSettingData.display === "none") &&
  766. (appViewData[appViewData.length - 1].zIndex >
  767. this.notifyTrayPanelDetailData.zIndex ||
  768. this.notifyTrayPanelDetailData.display === "none");
  769. console.log(
  770. fixWindowZIndexIsMax1,
  771. userSettingZIndexMax1,
  772. notifyTrayPanelDetailZIndexMax1,
  773. notifySettingZIndexMax1,
  774. notifyShowAllZIndexMax1,
  775. appViewIsMax
  776. );
  777. if (fixWindowZIndexIsMax1) {
  778. console.log("1111w");
  779. this.fixWindowData.cls = "active-win";
  780. } else if (userSettingZIndexMax1) {
  781. this.userSettingData.cls = "active-win";
  782. let obj = {
  783. spacialCls: this.userSettingData.spacialCls,
  784. imgUrl: this.userSettingData.titleImgUrl,
  785. zIndex: this.userSettingData.zIndex,
  786. title: this.userSettingData.title,
  787. id: this.userSettingData.id,
  788. };
  789. this.$bus.emit("clickShortcutItem", obj);
  790. } else if (notifyTrayPanelDetailZIndexMax1) {
  791. this.notifyTrayPanelDetailData.cls = "active-win";
  792. } else if (notifySettingZIndexMax1) {
  793. this.notifySettingData.cls = "active-win";
  794. } else if (notifyShowAllZIndexMax1) {
  795. this.notifyShowAllData.cls = "active-win";
  796. } else if (appViewIsMax) {
  797. let index = this.appViewData.findIndex((item) => {
  798. return item.id === appViewData[appViewData.length - 1].id;
  799. });
  800. if ((index || index === 0) && index !== -1) {
  801. this.appViewData.forEach((item) => {
  802. if (item.cls === "active-win") {
  803. item.cls = "deactive-win";
  804. }
  805. });
  806. this.appViewData[index].cls = "active-win";
  807. let obj = {
  808. imgUrl: this.appViewData[index].titleImgUrl,
  809. zIndex: this.appViewData[index].zIndex,
  810. spacialCls: this.appViewData[index].spacialCls,
  811. title: this.appViewData[index].title,
  812. id: this.appViewData[index].id,
  813. };
  814. this.$bus.emit("changeDialogWindow", obj);
  815. }
  816. }
  817. }
  818. if(this.maskIsShow || this.notifyIsShow){
  819. this.appViewData.forEach((item) => {
  820. if (item.cls === "active-win") {
  821. item.cls = "deactive-win";
  822. }
  823. });
  824. this.fixWindowData.cls = "deactive-win";
  825. this.notifySettingData.cls = "deactive-win";
  826. this.notifyTrayPanelDetailData.cls = "deactive-win";
  827. this.notifyShowAllData.cls = "deactive-win";
  828. this.userSettingData.cls = "deactive-win";
  829. }
  830. },
  831. },
  832. components: {
  833. Header,
  834. Desktop,
  835. DesktopAppView,
  836. UserAbout,
  837. Mask,
  838. Message
  839. },
  840. name: "Container",
  841. };
  842. </script>
  843. <style lang="">
  844. </style>