index.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. <template>
  2. <!-- notifyShowAll -->
  3. <div class="notifyShowall">
  4. <div
  5. class="v-layout sds-notify-showall-dialog layout-window-app v-window"
  6. :class="notifyShowAllContant.cls"
  7. style="position: absolute;"
  8. :style="{
  9. display: notifyShowAllContant.display,
  10. width: width,
  11. height: height,
  12. top: notifyShowAllContant.top,
  13. left: notifyShowAllContant.left,
  14. zIndex: notifyShowAllContant.zIndex,
  15. }"
  16. @mousedown.capture="clickNotifyShowall"
  17. >
  18. <div class="v-window-header-wrapper draggable"
  19. @mousedown.capture="mousedownNotifyTrayPanelDetail">
  20. <div class="app-icon"></div>
  21. <div class="v-window-header-text">
  22. <div class="v-window-header-title">消息</div>
  23. </div>
  24. <div class="window-header-tool-wrapper light">
  25. <div
  26. class="tool maximize"
  27. @click.capture="maxWindow"
  28. v-if="!windowIsMax"
  29. ></div>
  30. <div class="tool restore" @click.capture="restoreWindow" v-else></div>
  31. <div class="tool close" @click.capture="closeNotifyShowall"></div>
  32. </div>
  33. </div>
  34. <div class="v-window-body">
  35. <div class="v-trap-focus-indicator"></div>
  36. <div class="v-trap-focus-body">
  37. <div class="v-trap-focus-indicator"></div>
  38. <div
  39. class="v-layout show-all-panel layout-panel-content v-panel"
  40. style="--svc-layout-height: 100%"
  41. >
  42. <div class="v-spin-wrapper circle v-panel-wrapper">
  43. <div class="v-spin-wrapper-masking" style="display: none"></div>
  44. <div
  45. class="v-layout layout-body-wrapper layout-panel-body"
  46. style="
  47. --panel-in-tabs-padding-top: 8px;
  48. --svc-layout-padding: 16px 20px 6px 20px;
  49. --svc-layout-margin: 0 0 0 0;
  50. "
  51. >
  52. <div class="v-toolbar tbar-wrapper default-tbar">
  53. <button
  54. type="button"
  55. class="v-btn v-btn-grey"
  56. @click.capture="reload"
  57. >
  58. <span> 刷新 </span>
  59. </button>
  60. <button
  61. type="button"
  62. class="v-btn v-btn-grey"
  63. @click.capture="showClearAllNotifyMessage"
  64. >
  65. <span> 清除全部 </span>
  66. </button>
  67. <button type="button" class="v-btn v-btn-grey v-btn-disabled">
  68. <span> 查看 </span>
  69. </button>
  70. <button
  71. type="button"
  72. class="i-filter v-btn v-btn-grey v-btn-dropdown"
  73. >
  74. <div class="v-btn-dropdown-btn"></div>
  75. </button>
  76. <div class="right-wrapper"></div>
  77. </div>
  78. <div class="body-wrapper">
  79. <div class="all-notification-table-wrapper">
  80. <div
  81. class="
  82. all-notification-table
  83. v-spin-wrapper
  84. circle
  85. v-table-wrapper
  86. "
  87. >
  88. <div
  89. class="v-spin-wrapper-masking"
  90. :style="{ display: maskDisplay }"
  91. ></div>
  92. <div class="v-table">
  93. <div class="v-table-header">
  94. <table>
  95. <colgroup>
  96. <col
  97. name="51d8198d-fd9d-4986-9532-b8a0a3962c1f"
  98. width="100"
  99. />
  100. <col
  101. name="5b742784-0a51-436e-89d0-1a0b2f31fed0"
  102. width="160"
  103. />
  104. <col
  105. name="e034d4a6-59d9-4fda-b9d6-e7cbd2293991"
  106. width="380"
  107. />
  108. <col
  109. name="3b0b169b-2410-4f64-b3f9-790f94f9c6db"
  110. width="160"
  111. />
  112. </colgroup>
  113. <thead class="v-table-thead">
  114. <tr class="row">
  115. <th
  116. colspan="1"
  117. rowspan="1"
  118. class="cell-first"
  119. :class="thContant.cls"
  120. v-for="(
  121. thContant, thContantIndex
  122. ) in thContantArray"
  123. :key="thContant.id"
  124. @click.capture="sort(thContantIndex)"
  125. >
  126. <div class="inner-cell">
  127. <div class="head-cell cell">
  128. <span class="cell-title">{{
  129. thContant.text
  130. }}</span>
  131. <span
  132. class="v-table-column-sorter"
  133. :class="thContant.cls1"
  134. ></span>
  135. </div>
  136. </div>
  137. </th>
  138. </tr>
  139. </thead>
  140. </table>
  141. <div class="hd-menu-btn-wrapper"></div>
  142. </div>
  143. <div class="v-ps ps">
  144. <div class="v-table-content">
  145. <div class="v-table-body">
  146. <table>
  147. <colgroup>
  148. <col width="100" />
  149. <col width="160" />
  150. <col width="380" />
  151. <col width="160" />
  152. </colgroup>
  153. <tbody class="v-table-tbody">
  154. <tr
  155. class="row"
  156. @click.capture="clickTr(detailMessageIndex)"
  157. @mouseenter="
  158. mouseenterTr(detailMessageIndex)
  159. "
  160. @mouseleave="
  161. mouseleaveTr(detailMessageIndex)
  162. "
  163. v-for="(
  164. detailMessage, detailMessageIndex
  165. ) in notifyShowallDetail.detailMessageList"
  166. :key="detailMessage.id"
  167. :class="detailMessage.cls1"
  168. >
  169. <td class="cell-first">
  170. <div class="inner-cell">
  171. <div class="cell content-cell">
  172. <div class="level-info">信息</div>
  173. </div>
  174. </div>
  175. </td>
  176. <td class="">
  177. <div class="inner-cell">
  178. <div class="cell content-cell">
  179. <div>{{ detailMessage.title }}</div>
  180. </div>
  181. </div>
  182. </td>
  183. <td class="">
  184. <div class="inner-cell">
  185. <div class="cell content-cell">
  186. <div>
  187. {{ detailMessage.showMessage }}
  188. </div>
  189. </div>
  190. </div>
  191. </td>
  192. <td class="last-td-cell">
  193. <div class="inner-cell">
  194. <div class="cell content-cell">
  195. <div>{{ detailMessage.time1 }}</div>
  196. </div>
  197. </div>
  198. </td>
  199. </tr>
  200. </tbody>
  201. </table>
  202. </div>
  203. </div>
  204. <div
  205. class="ps__rail-x"
  206. style="left: 0px; bottom: 0px"
  207. >
  208. <div
  209. class="ps__thumb-x"
  210. style="left: 0px; width: 0px"
  211. ></div>
  212. </div>
  213. <div class="ps__rail-y" style="top: 0px; right: 0px">
  214. <div
  215. class="ps__thumb-y"
  216. style="top: 0px; height: 0px"
  217. ></div>
  218. </div>
  219. </div>
  220. <div
  221. class="
  222. col-resizable-indicator
  223. col-resizable-indicator--hidden
  224. "
  225. ></div>
  226. <div
  227. class="
  228. col-resizable-indicator
  229. col-resizable-indicator--hidden
  230. "
  231. ></div>
  232. <div
  233. class="
  234. col-resizable-indicator
  235. col-resizable-indicator--hidden
  236. "
  237. ></div>
  238. </div>
  239. <div class="v-pagination">
  240. <div class="v-pagination-left">
  241. <ul class="left-paging">
  242. <li class="v-pagination-first disabled"></li>
  243. <li class="v-pagination-prev disabled"></li>
  244. <li
  245. class="
  246. v-pagination-item
  247. v-pagination-item-1
  248. v-pagination-item-active
  249. "
  250. v-if="
  251. notifyShowallDetail.detailMessageList.length
  252. "
  253. >
  254. 1
  255. </li>
  256. <li class="v-pagination-next disabled"></li>
  257. <li class="v-pagination-last disabled"></li>
  258. </ul>
  259. </div>
  260. <div class="v-pagination-right">
  261. <div class="v-pagination-total">
  262. {{ notifyShowallDetail.detailMessageList.length }}
  263. 个项目
  264. </div>
  265. <div
  266. class="v-pagination-refresh"
  267. @click.capture="reload"
  268. ></div>
  269. </div>
  270. </div>
  271. <div
  272. class="v-spin"
  273. :style="{ display: loading ? 'block' : 'none' }"
  274. >
  275. <div class="v-spin-text has-icon">加载中...</div>
  276. <div class="v-spin-icon">
  277. <i>
  278. <i></i>
  279. </i>
  280. </div>
  281. </div>
  282. </div>
  283. </div>
  284. </div>
  285. </div>
  286. <div
  287. class="
  288. v-layout
  289. layout-panel-fbar
  290. fbar-wrapper fbar-wrapper--fluid
  291. "
  292. >
  293. <div class="pull-right">
  294. <button
  295. type="button"
  296. class="v-btn v-btn-footbar v-btn-grey"
  297. @click.capture="closeNotifyShowall"
  298. >
  299. <span> 关闭 </span>
  300. </button>
  301. </div>
  302. </div>
  303. </div>
  304. </div>
  305. </div>
  306. <div class="v-trap-focus-indicator"></div>
  307. </div>
  308. <div class="v-window-resizable">
  309. <div class="handler v-window-resizable-nw"></div>
  310. <div class="handler v-window-resizable-ne"></div>
  311. <div class="handler v-window-resizable-sw"></div>
  312. <div class="handler v-window-resizable-se"></div>
  313. <div class="handler v-window-resizable-n"></div>
  314. <div class="handler v-window-resizable-s"></div>
  315. <div class="handler v-window-resizable-w"></div>
  316. <div class="handler v-window-resizable-e"></div>
  317. </div>
  318. <div
  319. class="v-window-mask"
  320. :style="{
  321. display:
  322. notifyShowAllContant.clearAllNotifyData
  323. .clearAllNotifyMessageDisplay,
  324. }"
  325. @mousedown.capture="maskMousedown()"
  326. >
  327. <div
  328. class="v-window v-message-box-window auto-height"
  329. syno-id="SYNO.SDS.DSMNotify.ShowAll.Window-msgbox"
  330. style="
  331. position: relative;
  332. width: 480px;
  333. height: auto;
  334. top: 50%;
  335. left: 50%;
  336. transform: translate(-50%, -50%);
  337. "
  338. :style="{
  339. display:
  340. notifyShowAllContant.clearAllNotifyData
  341. .clearAllNotifyMessageDisplay,
  342. zIndex:
  343. notifyShowAllContant.clearAllNotifyData
  344. .clearAllNotifyMessageZIndex,
  345. }"
  346. :class="
  347. notifyShowAllContant.clearAllNotifyData.clearAllNotifyMessageCls
  348. "
  349. @mousedown="mousedownClearAllNotifyMessage"
  350. >
  351. <div>
  352. <div class="v-trap-focus-indicator"></div>
  353. <div class="v-trap-focus-body">
  354. <div class="v-trap-focus-indicator"></div>
  355. <div class="v-layout layout-panel-content v-panel message-box">
  356. <div class="v-spin-wrapper circle v-panel-wrapper">
  357. <div
  358. class="v-spin-wrapper-masking"
  359. style="display: none"
  360. ></div>
  361. <div
  362. class="v-layout layout-body-wrapper layout-panel-body"
  363. style="--panel-in-tabs-padding-top: 0"
  364. >
  365. <div class="body-wrapper">
  366. <div class="message-box-body has-icon">
  367. <div class="dialog-icon-wrapper alarm">
  368. <div class="dialog-icon alarm"></div>
  369. </div>
  370. <div class="dialog-content">
  371. 所有桌面通知都会被清除。是否确定要继续?
  372. </div>
  373. </div>
  374. </div>
  375. </div>
  376. <div
  377. class="
  378. v-layout
  379. layout-panel-fbar
  380. fbar-wrapper fbar-wrapper--fluid
  381. "
  382. >
  383. <div class="v-status-bar loading" style="display: none">
  384. <div class="status-text">
  385. <div class="v-spin-icon">
  386. <i><i></i></i>
  387. </div>
  388. 加载中...
  389. </div>
  390. </div>
  391. <div class="default pull-right">
  392. <button
  393. type="button"
  394. class="v-btn v-btn-footbar v-btn-cancel"
  395. @click.capture="cancelDeleteAllNotifyMessage"
  396. >
  397. <span>取消</span>
  398. </button>
  399. <button
  400. type="button"
  401. class="v-btn v-btn-footbar v-btn-red"
  402. @click.capture="confirmDeleteAllNotifyMessage"
  403. >
  404. <span>删除</span>
  405. </button>
  406. </div>
  407. </div>
  408. </div>
  409. </div>
  410. </div>
  411. <div class="v-trap-focus-indicator"></div>
  412. </div>
  413. </div>
  414. </div>
  415. </div>
  416. </div>
  417. </template>
  418. <script>
  419. import {moveWindow} from '../../../../common/common'
  420. export default {
  421. props: ["defaultZIndex", "notifyShowAllData"],
  422. data() {
  423. return {
  424. windowFirstClick:{
  425. layerX:0,
  426. layerY:0,
  427. screenX:0,
  428. screenY:0,
  429. },
  430. notifyShowAllContant: {
  431. display: "none",
  432. zIndex: 9050,
  433. cls: "active-win",
  434. left:0,
  435. top:0,
  436. clearAllNotifyData: {
  437. clearAllNotifyMessageDisplay: "none",
  438. clearAllNotifyMessageCls: "deactive-win",
  439. clearAllNotifyMessageZIndex: 9050,
  440. },
  441. },
  442. loading: false,
  443. maskDisplay: "none",
  444. width: "840px",
  445. height: "480px",
  446. thContantArray: [
  447. {
  448. id: 0,
  449. text: "层级",
  450. cls: "",
  451. cls1: "down",
  452. },
  453. {
  454. id: 1,
  455. text: "类别",
  456. cls: "",
  457. cls1: "down",
  458. },
  459. {
  460. id: 1,
  461. text: "主题",
  462. cls: "",
  463. cls1: "down",
  464. },
  465. {
  466. id: 1,
  467. text: "时间",
  468. cls: "",
  469. cls1: "down",
  470. },
  471. ],
  472. notifyShowallDetail: {
  473. detailMessageList: [],
  474. },
  475. windowIsMax: false,
  476. };
  477. },
  478. mounted() {
  479. this.$bus.on("openNotifyShowall", this.openNotifyShowall);
  480. this.$bus.on("closeNotifyShowall", this.closeNotifyShowall);
  481. this.notifyShowAllContant = this.notifyShowAllData;
  482. },
  483. methods: {
  484. // 打开本页面
  485. openNotifyShowall(detailMessageList) {
  486. this.maskDisplay = "block";
  487. this.loading = true;
  488. this.notifyShowAllContant.display = "block";
  489. this.clickNotifyShowall();
  490. setTimeout(() => {
  491. this.maskDisplay = "none";
  492. this.loading = false;
  493. let detailMessageList1 = JSON.parse(JSON.stringify(detailMessageList));
  494. detailMessageList1.forEach((item) => {
  495. item.cls1 = "";
  496. });
  497. this.notifyShowallDetail.detailMessageList = detailMessageList1;
  498. }, 1000);
  499. },
  500. // 关闭本页面
  501. closeNotifyShowall() {
  502. this.notifyShowAllContant.display = "none";
  503. this.notifyShowAllContant.zIndex = 9050;
  504. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex - 10);
  505. },
  506. // 点击本页面
  507. clickNotifyShowall() {
  508. if (
  509. this.notifyShowAllContant.cls === "deactive-win" && (
  510. this.notifyShowAllContant.clearAllNotifyData
  511. .clearAllNotifyMessageZIndex < this.defaultZIndex && this.notifyShowAllContant.clearAllNotifyData
  512. .clearAllNotifyMessageDisplay === 'block')
  513. ) {
  514. this.notifyShowAllContant.zIndex = this.defaultZIndex + 10;
  515. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex + 10);
  516. }else if (
  517. this.notifyShowAllContant.cls === "deactive-win" && this.notifyShowAllContant.clearAllNotifyData
  518. .clearAllNotifyMessageDisplay === 'none'){
  519. this.notifyShowAllContant.zIndex = this.defaultZIndex + 10;
  520. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex + 10);
  521. }
  522. },
  523. // 重新加载数据
  524. reload() {
  525. this.maskDisplay = "block";
  526. this.loading = true;
  527. setTimeout(() => {
  528. this.maskDisplay = "none";
  529. this.loading = false;
  530. }, 1000);
  531. },
  532. // 点击每一行
  533. clickTr(detailMessageIndex) {
  534. this.notifyShowallDetail.detailMessageList.forEach((item) => {
  535. item.cls1 = "";
  536. });
  537. this.notifyShowallDetail.detailMessageList[detailMessageIndex].cls1 =
  538. "row-selected";
  539. },
  540. // 鼠标移入表格每一行
  541. mouseenterTr(detailMessageIndex) {
  542. if (
  543. !this.notifyShowallDetail.detailMessageList[detailMessageIndex].cls1
  544. ) {
  545. this.notifyShowallDetail.detailMessageList[detailMessageIndex].cls1 =
  546. "row-hover";
  547. }
  548. },
  549. // 鼠标移出表格每一行
  550. mouseleaveTr(detailMessageIndex) {
  551. if (
  552. this.notifyShowallDetail.detailMessageList[
  553. detailMessageIndex
  554. ].cls1.includes("row-hover")
  555. ) {
  556. this.notifyShowallDetail.detailMessageList[detailMessageIndex].cls1 =
  557. "";
  558. }
  559. },
  560. // 排序
  561. sort(thContantIndex) {
  562. this.thContantArray.forEach((item) => {
  563. item.cls = "";
  564. });
  565. if (this.thContantArray[thContantIndex].cls === "") {
  566. this.thContantArray[thContantIndex].cls = "sorting";
  567. }
  568. if (this.thContantArray[thContantIndex].cls1 === "down") {
  569. this.thContantArray[thContantIndex].cls1 = "up";
  570. } else {
  571. this.thContantArray[thContantIndex].cls1 = "down";
  572. }
  573. this.maskDisplay = "block";
  574. this.loading = true;
  575. setTimeout(() => {
  576. this.maskDisplay = "none";
  577. this.loading = false;
  578. }, 1000);
  579. },
  580. // 页面最大化
  581. maxWindow() {
  582. this.notifyShowAllContant.top = '40px';
  583. this.notifyShowAllContant.left = 0;
  584. this.width = "100%";
  585. this.windowIsMax = true;
  586. let el = document.querySelector('.v-layout.sds-notify-showall-dialog')
  587. if(! el.className.includes(' x-window-maximized')){
  588. el.className = el.className + ' x-window-maximized'
  589. }
  590. },
  591. // 恢复页面宽度
  592. restoreWindow() {
  593. this.notifyShowAllContant.top = 0;
  594. this.notifyShowAllContant.left= '10px';
  595. this.width = "840px";
  596. this.windowIsMax = false;
  597. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex - 10);
  598. let el = document.querySelector('.v-layout.sds-notify-showall-dialog')
  599. if(el.className.includes(' x-window-maximized')){
  600. el.className = el.className.replace(' x-window-maximized','')
  601. }
  602. },
  603. // 显示清除全部信息弹出框
  604. showClearAllNotifyMessage() {
  605. if (this.notifyShowAllContant.zIndex >= this.defaultZIndex) {
  606. this.notifyShowAllContant.clearAllNotifyData.clearAllNotifyMessageZIndex =
  607. this.defaultZIndex + 10;
  608. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex + 10);
  609. } else {
  610. this.notifyShowAllContant.clearAllNotifyData.clearAllNotifyMessageZIndex =
  611. this.defaultZIndex + 20;
  612. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex + 20);
  613. }
  614. this.notifyShowAllContant.clearAllNotifyData.clearAllNotifyMessageDisplay =
  615. "block";
  616. this.$bus.emit("showOrHiddenNotifyShowallClearAll", true);
  617. this.$bus.emit("showOrHiddenNotifyShowallClearAll", true);
  618. },
  619. // 点击清除全部信息弹出框
  620. mousedownClearAllNotifyMessage() {
  621. let el = document.querySelector(
  622. ".notifyShowall .v-message-box-window"
  623. );
  624. if (el.className && el.className.includes(" no-shadow")) {
  625. el.className = el.className.replace(" no-shadow", "");
  626. }
  627. },
  628. //没关闭清除全部信息弹出框时鼠标按下遮罩层
  629. maskMousedown() {
  630. if (
  631. this.notifyShowAllContant.clearAllNotifyData
  632. .clearAllNotifyMessageZIndex < this.defaultZIndex &&
  633. this.notifyShowAllContant.zIndex < this.defaultZIndex
  634. ) {
  635. this.notifyShowAllContant.zIndex = this.defaultZIndex + 10;
  636. this.notifyShowAllContant.clearAllNotifyData.clearAllNotifyMessageZIndex =
  637. this.defaultZIndex + 20;
  638. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex + 20);
  639. this.$bus.emit("showOrHiddenNotifyShowallClearAll", true);
  640. } else if (
  641. this.notifyShowAllContant.clearAllNotifyData
  642. .clearAllNotifyMessageZIndex < this.defaultZIndex &&
  643. this.notifyShowAllContant.zIndex >= this.defaultZIndex
  644. ) {
  645. this.notifyShowAllContant.clearAllNotifyData.clearAllNotifyMessageZIndex =
  646. this.defaultZIndex + 10;
  647. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex + 10);
  648. }
  649. let el = document.querySelector(
  650. ".notifyShowall .v-message-box-window"
  651. );
  652. if (!el.className.includes(" no-shadow")) {
  653. this.$nextTick(()=>{
  654. el.className = el.className + " no-shadow";
  655. })
  656. setTimeout(() => {
  657. el.className = el.className.replace(" no-shadow", "");
  658. }, 500);
  659. }
  660. },
  661. // 取消删除
  662. cancelDeleteAllNotifyMessage(e) {
  663. e.stopPropagation();
  664. this.notifyShowAllContant.clearAllNotifyData.clearAllNotifyMessageDisplay =
  665. "none";
  666. this.notifyShowAllContant.clearAllNotifyData.clearAllNotifyMessageZIndex = 9050;
  667. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex - 10);
  668. this.$bus.emit("showOrHiddenNotifyShowallClearAll", false);
  669. },
  670. // 确认删除
  671. confirmDeleteAllNotifyMessage(e) {
  672. e.stopPropagation();
  673. this.$bus.emit("notifyShowAllContant.clearAllNotifyMessage");
  674. this.notifyShowallDetail.detailMessageList = [];
  675. this.cancelDeleteAllNotifyMessage(e);
  676. },
  677. // 鼠标按下该页面头部
  678. mousedownNotifyTrayPanelDetail(e){
  679. // document.documentElement.click()
  680. if(!this.windowIsMax){
  681. this.windowFirstClick.layerX = e.layerX;
  682. this.windowFirstClick.screenX = document.documentElement.clientWidth;
  683. this.windowFirstClick.layerY = e.layerY;
  684. this.windowFirstClick.screenY = document.documentElement.clientHeight;
  685. document.addEventListener(
  686. "mousemove",
  687. this.moveWindowPosition
  688. );
  689. document.addEventListener(
  690. "mouseup",
  691. this.upWindowPosition
  692. );
  693. }
  694. },
  695. // 移动弹出框窗口位置
  696. moveWindowPosition(e) {
  697. let window = document.querySelector('.v-layout.sds-notify-showall-dialog')
  698. let obj = moveWindow(e,window,this.windowFirstClick.layerX,this.windowFirstClick.layerY,this.windowFirstClick.screenX,this.windowFirstClick.screenY)
  699. this.notifyShowAllContant.left = obj.moveX +'px'
  700. this.notifyShowAllContant.top = obj.moveY +'px'
  701. if (!window.className.includes(' x-panel-ghost')){
  702. window.className = window.className + ' x-panel-ghost'
  703. }
  704. },
  705. // 鼠标松开
  706. upWindowPosition(e){
  707. let window = document.querySelector('.v-layout.sds-notify-showall-dialog')
  708. if (window.className.includes(' x-panel-ghost')){
  709. window.className = window.className.replace(' x-panel-ghost','')
  710. }
  711. document.removeEventListener("mousemove", this.moveWindowPosition);
  712. document.removeEventListener("mouseup", this.upWindowPosition);
  713. },
  714. },
  715. components: {},
  716. name: "NotifyShowall",
  717. };
  718. </script>
  719. <style lang="css" scoped>
  720. .v-window .v-window-body {
  721. height: calc(100% - 40px);
  722. }
  723. </style>