index.vue 47 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186
  1. <template>
  2. <!-- notifySetting -->
  3. <div>
  4. <div
  5. class="
  6. x-window
  7. sds-notify-setting-dialog sds-window-v5
  8. x-resizable-pinned
  9. "
  10. style="position: absolute"
  11. :style="{
  12. display: notifySettingContant.display,
  13. zIndex: notifySettingContant.zIndex,
  14. left: notifySettingContant.left,
  15. top: notifySettingContant.top,
  16. width: notifySettingContant.width,
  17. }"
  18. :class="notifySettingContant.cls"
  19. @mousedown="clickNotifySetting"
  20. >
  21. <div class="x-dlg-focus"></div>
  22. <div
  23. class="x-window-tl"
  24. @mousedown.capture="mousedownNotifyTrayPanelDetail"
  25. >
  26. <div class="x-window-tr">
  27. <div class="x-window-tc">
  28. <div class="x-window-header x-panel-icon x-window-draggable">
  29. <div class="x-window-toolCt">
  30. <div class="x-tool x-tool-close" @click="closeNotifySetting">
  31. &nbsp;
  32. </div>
  33. </div>
  34. <span class="x-window-header-text">通知设置</span>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="x-window-bwrap">
  40. <div class="x-window-ml">
  41. <div class="x-window-mr">
  42. <div class="x-window-mc">
  43. <div
  44. class="x-window-body x-border-layout-ct"
  45. style="width: 626px; height: 394px"
  46. >
  47. <div
  48. class="
  49. x-panel
  50. syno-ux-formpanel
  51. syno-ux-formpanel-gradient
  52. syno-ux-formpanel-no-fbar
  53. syno-ux-formpanel-no-tbar
  54. x-panel-noborder x-form-label-left x-border-panel
  55. scroll-at-top
  56. scroll-at-bottom
  57. scroll-at-left
  58. scroll-at-right
  59. "
  60. style="left: 12px; top: 8px; width: 601px"
  61. >
  62. <div class="x-panel-bwrap">
  63. <form
  64. class="
  65. x-panel-body
  66. x-panel-body-noheader
  67. x-panel-body-noborder
  68. x-form
  69. flexcrollactive
  70. "
  71. method="POST"
  72. style="
  73. height: 55px;
  74. width: 585px;
  75. overflow: hidden;
  76. border-width: 0px;
  77. position: relative;
  78. text-align: left;
  79. padding: 8px 8px 0px;
  80. "
  81. >
  82. <div
  83. class="mcontentwrapper"
  84. style="
  85. width: 585px;
  86. height: 55px;
  87. top: -8px;
  88. left: -8px;
  89. border-bottom: 0px solid black;
  90. text-align: start;
  91. padding: 8px 8px 0px;
  92. position: relative;
  93. overflow: hidden;
  94. z-index: 2;
  95. "
  96. >
  97. <div
  98. class="contentwrapper"
  99. style="
  100. position: relative;
  101. top: 0px;
  102. width: 100%;
  103. display: block;
  104. padding: 0px;
  105. left: 0px;
  106. "
  107. >
  108. <div class="x-form-item x-hide-label">
  109. <label
  110. style="width: 180px"
  111. class="x-form-item-label syno-ux-item-label"
  112. ></label>
  113. <div
  114. class="x-form-element"
  115. style="padding-left: 185px"
  116. >
  117. <div
  118. class="
  119. x-form-display-field
  120. syno-ux-displayfield
  121. "
  122. style="margin-left: 0px; height: 40px"
  123. >
  124. 控制是否为下列每个服务接收 DSM
  125. 桌面通知。您还可更改未读服务通知的顺序,并手动或按时间排序
  126. </div>
  127. <div class="x-form-hidden-error-msg"></div>
  128. </div>
  129. <div class="x-form-clear-left"></div>
  130. </div>
  131. </div>
  132. </div>
  133. <div
  134. class="scrollwrapper"
  135. style="
  136. width: 601px;
  137. height: 63px;
  138. position: absolute;
  139. top: 0px;
  140. left: 0px;
  141. "
  142. >
  143. <div
  144. class="zoomdetectdiv"
  145. style="
  146. font-size: 12px;
  147. height: 1em;
  148. width: 1em;
  149. position: absolute;
  150. z-index: -999;
  151. visibility: hidden;
  152. "
  153. ></div>
  154. <div
  155. class="vscrollerbase scrollgeneric flexinactive"
  156. style="height: 63px; left: 601px; visibility: hidden"
  157. >
  158. <div
  159. class="vscrollerbar scrollgeneric"
  160. style="
  161. padding: 0px;
  162. height: 62px;
  163. top: 0px;
  164. z-index: 2;
  165. visibility: hidden;
  166. "
  167. >
  168. <div
  169. class="vscrollerbarbeg scrollgeneric"
  170. style="height: 62px"
  171. ></div>
  172. <div
  173. class="vscrollerbarend scrollgeneric"
  174. style="top: 62px"
  175. ></div>
  176. </div>
  177. <div
  178. class="vscrollerbasebeg scrollgeneric"
  179. style="height: 63px"
  180. ></div>
  181. <div
  182. class="vscrollerbaseend scrollgeneric"
  183. style="top: 63px"
  184. ></div>
  185. </div>
  186. <div
  187. class="hscrollerbase scrollgeneric flexinactive"
  188. style="width: 601px; top: 63px; visibility: hidden"
  189. >
  190. <div
  191. class="hscrollerbar scrollgeneric"
  192. style="
  193. padding: 0px;
  194. width: 594px;
  195. left: 0px;
  196. z-index: 2;
  197. visibility: hidden;
  198. "
  199. >
  200. <div
  201. class="hscrollerbarbeg scrollgeneric"
  202. style="width: 594px"
  203. ></div>
  204. <div
  205. class="hscrollerbarend scrollgeneric"
  206. style="left: 594px"
  207. ></div>
  208. </div>
  209. <div
  210. class="hscrollerbasebeg scrollgeneric"
  211. style="width: 601px"
  212. ></div>
  213. <div
  214. class="hscrollerbaseend scrollgeneric"
  215. style="left: 601px"
  216. ></div>
  217. </div>
  218. <div
  219. class="scrollerjogbox scrollgeneric"
  220. style="visibility: hidden"
  221. ></div>
  222. <div class="domfixdiv" style="display: none"></div>
  223. <div
  224. class="copyholder"
  225. style="
  226. border: 0px solid blue;
  227. visibility: hidden;
  228. padding: 8px 8px 0px;
  229. display: none;
  230. "
  231. ></div>
  232. </div>
  233. </form>
  234. </div>
  235. </div>
  236. <div
  237. class="
  238. x-panel
  239. sds-notify-setting-grid
  240. without-dirty-red-grid
  241. syno-ux-gridpanel
  242. x-panel-noborder x-grid-panel
  243. hide-org-hd-menu
  244. x-border-panel
  245. "
  246. style="left: 20px; top: 79px; width: 585px"
  247. >
  248. <div class="x-panel-bwrap">
  249. <div
  250. class="
  251. x-panel-body x-panel-body-noheader x-panel-body-noborder
  252. "
  253. style="width: 585px; height: 303px"
  254. >
  255. <div
  256. class="x-grid3"
  257. hidefocus="true"
  258. style="width: 585px; height: 302px"
  259. >
  260. <div class="x-grid3-viewport">
  261. <div class="x-grid3-header">
  262. <div
  263. class="x-grid3-header-inner"
  264. style="width: 585px"
  265. >
  266. <div
  267. class="x-grid3-header-offset"
  268. style="width: 585px"
  269. >
  270. <table
  271. border="0"
  272. cellspacing="0"
  273. cellpadding="0"
  274. style="width: 585px"
  275. >
  276. <thead>
  277. <tr class="x-grid3-hd-row">
  278. <td
  279. class="
  280. x-grid3-hd
  281. x-grid3-cell
  282. x-grid3-td-ext-gen650
  283. x-grid3-cell-first
  284. x-grid3-cell-first-visible
  285. "
  286. style="width: 403px"
  287. :class="
  288. notifySettingDetail
  289. .tableHeaderContant1.cls
  290. "
  291. @click="changeSort"
  292. >
  293. <div
  294. class="
  295. x-grid3-hd-inner
  296. x-grid3-hd-ext-gen650
  297. "
  298. style=""
  299. >
  300. {{
  301. notifySettingDetail
  302. .tableHeaderContant1.title
  303. }}<img
  304. alt=""
  305. class="x-grid3-sort-icon"
  306. src="../../../../../public/image/index/s.gif"
  307. />
  308. </div>
  309. </td>
  310. <td
  311. class="
  312. x-grid3-hd
  313. x-grid3-cell
  314. x-grid3-td-1
  315. x-grid3-cell-disable-sort
  316. x-grid3-cell-last-visible
  317. "
  318. style="width: 178px; text-align: center"
  319. >
  320. <div
  321. class="x-grid3-hd-inner x-grid3-hd-1"
  322. style=""
  323. >
  324. <input
  325. type="button"
  326. class="syno-ux-checkbox-icon"
  327. :class="
  328. notifySettingDetail
  329. .tableHeaderContant2.cls
  330. "
  331. style="
  332. vertical-align: middle;
  333. top: -1px;
  334. "
  335. @click="clickCheckAll"
  336. />{{
  337. notifySettingDetail
  338. .tableHeaderContant2.title
  339. }}<img
  340. alt=""
  341. class="x-grid3-sort-icon"
  342. src="../../../../../public/image/index/s.gif"
  343. />
  344. </div>
  345. </td>
  346. <td
  347. class="
  348. x-grid3-hd
  349. x-grid3-cell
  350. x-grid3-td-2
  351. x-grid3-cell-last
  352. x-grid3-cell-disable-sort
  353. "
  354. style="width: 178px; display: none"
  355. >
  356. <div
  357. class="x-grid3-hd-inner x-grid3-hd-2"
  358. style=""
  359. >
  360. <input
  361. type="button"
  362. class="
  363. syno-ux-checkbox-icon
  364. syno-ux-cb-checked
  365. "
  366. style="
  367. vertical-align: middle;
  368. top: -1px;
  369. "
  370. />Badge<img
  371. alt=""
  372. class="x-grid3-sort-icon"
  373. src="../../../../../image/index/s.gif"
  374. />
  375. </div>
  376. </td>
  377. </tr>
  378. </thead>
  379. </table>
  380. </div>
  381. </div>
  382. <div class="x-grid3-header-bwrap">
  383. <div
  384. class="syno-ux-grid-hd-btn x-hide-display"
  385. ></div>
  386. </div>
  387. <div class="x-clear"></div>
  388. </div>
  389. <div
  390. class="x-grid3-scroller flexcrollactive"
  391. style="
  392. width: 585px;
  393. height: 273px;
  394. overflow: hidden;
  395. border-width: 0px;
  396. position: relative;
  397. text-align: left;
  398. padding: 0px;
  399. "
  400. >
  401. <div
  402. class="mcontentwrapper"
  403. style="
  404. width: 585px;
  405. height: 273px;
  406. top: 0px;
  407. left: 0px;
  408. border-bottom: 0px solid black;
  409. text-align: start;
  410. padding: 0px;
  411. position: relative;
  412. overflow: hidden;
  413. z-index: 2;
  414. "
  415. >
  416. <div
  417. class="contentwrapper"
  418. style="
  419. position: relative;
  420. top: 0px;
  421. width: 100%;
  422. display: block;
  423. padding: 0px;
  424. left: 0px;
  425. "
  426. >
  427. <a
  428. href="#"
  429. class="x-grid3-focus"
  430. style="left: 0px; top: 0px"
  431. ><div class="syno-ux-gridpanel-empty-hint">
  432. {{
  433. notifySettingDetail.tableBodyContantList
  434. .length
  435. }}
  436. 个项目。
  437. </div></a
  438. >
  439. <div class="x-grid3-body" style="width: 585px">
  440. <div
  441. class="x-grid3-row"
  442. :class="tableBodyContant.cls"
  443. style="width: 585px"
  444. v-for="(
  445. tableBodyContant, tableBodyContantIndex
  446. ) in notifySettingDetail.tableBodyContantList"
  447. :key="tableBodyContant.id"
  448. >
  449. <table
  450. class="x-grid3-row-table"
  451. border="0"
  452. cellspacing="0"
  453. cellpadding="0"
  454. style="width: 585px"
  455. >
  456. <tbody>
  457. <tr
  458. @click.capture="
  459. clickTr(tableBodyContantIndex)
  460. "
  461. @mouseenter="
  462. mouseenterTr(tableBodyContantIndex)
  463. "
  464. @mouseleave="
  465. mouseleaveTr(tableBodyContantIndex)
  466. "
  467. >
  468. <td
  469. class="
  470. x-grid3-col
  471. x-grid3-cell
  472. x-grid3-td-ext-gen650
  473. x-grid3-cell-first
  474. x-grid3-cell-first-visible
  475. "
  476. style="width: 403px"
  477. >
  478. <div
  479. class="
  480. x-grid3-cell-inner
  481. x-grid3-col-ext-gen650
  482. "
  483. :class="tableBodyContant.cls1"
  484. >
  485. <div>
  486. {{ tableBodyContant.title }}
  487. </div>
  488. </div>
  489. </td>
  490. <td
  491. class="
  492. x-grid3-col
  493. x-grid3-cell
  494. x-grid3-td-1
  495. x-grid3-cell-last-visible
  496. "
  497. style="
  498. width: 178px;
  499. text-align: center;
  500. "
  501. >
  502. <div
  503. class="
  504. x-grid3-cell-inner
  505. x-grid3-col-1
  506. x-unselectable
  507. "
  508. >
  509. <div
  510. :class="tableBodyContant.cls2"
  511. @click="
  512. clickCheckItem(
  513. tableBodyContantIndex
  514. )
  515. "
  516. ></div>
  517. </div>
  518. </td>
  519. <td
  520. class="
  521. x-grid3-col
  522. x-grid3-cell
  523. x-grid3-td-2
  524. x-grid3-cell-last
  525. "
  526. style="width: 178px; display: none"
  527. >
  528. <div
  529. class="
  530. x-grid3-cell-inner
  531. x-grid3-col-2
  532. x-unselectable
  533. "
  534. >
  535. <div></div>
  536. </div>
  537. </td>
  538. </tr>
  539. </tbody>
  540. </table>
  541. </div>
  542. </div>
  543. </div>
  544. </div>
  545. <!-- <div
  546. class="scrollwrapper"
  547. style="
  548. width: 585px;
  549. height: 273px;
  550. position: absolute;
  551. top: 0px;
  552. left: 0px;
  553. "
  554. >
  555. <div
  556. class="zoomdetectdiv"
  557. style="
  558. font-size: 12px;
  559. height: 1em;
  560. width: 1em;
  561. position: absolute;
  562. z-index: -999;
  563. visibility: hidden;
  564. "
  565. ></div>
  566. <div
  567. class="vscrollerbase scrollgeneric"
  568. style="
  569. height: 273px;
  570. left: 585px;
  571. visibility: visible;
  572. "
  573. >
  574. <div
  575. class="vscrollerbar scrollgeneric"
  576. style="
  577. padding: 0px;
  578. height: 142px;
  579. top: 0px;
  580. z-index: 2;
  581. visibility: visible;
  582. "
  583. >
  584. <div
  585. class="vscrollerbarbeg scrollgeneric"
  586. style="height: 142px"
  587. ></div>
  588. <div
  589. class="vscrollerbarend scrollgeneric"
  590. style="top: 142px"
  591. ></div>
  592. </div>
  593. <div
  594. class="vscrollerbasebeg scrollgeneric"
  595. style="height: 273px"
  596. ></div>
  597. <div
  598. class="vscrollerbaseend scrollgeneric"
  599. style="top: 273px"
  600. ></div>
  601. </div>
  602. <div
  603. class="hscrollerbase scrollgeneric flexinactive"
  604. style="
  605. width: 585px;
  606. top: 273px;
  607. visibility: hidden;
  608. "
  609. >
  610. <div
  611. class="hscrollerbar scrollgeneric"
  612. style="
  613. padding: 0px;
  614. width: 579px;
  615. left: 0px;
  616. z-index: 2;
  617. visibility: hidden;
  618. "
  619. >
  620. <div
  621. class="hscrollerbarbeg scrollgeneric"
  622. style="width: 579px"
  623. ></div>
  624. <div
  625. class="hscrollerbarend scrollgeneric"
  626. style="left: 579px"
  627. ></div>
  628. </div>
  629. <div
  630. class="hscrollerbasebeg scrollgeneric"
  631. style="width: 585px"
  632. ></div>
  633. <div
  634. class="hscrollerbaseend scrollgeneric"
  635. style="left: 585px"
  636. ></div>
  637. </div>
  638. <div
  639. class="scrollerjogbox scrollgeneric"
  640. style="visibility: hidden"
  641. ></div>
  642. <div
  643. class="domfixdiv"
  644. style="display: none"
  645. ></div>
  646. <div
  647. class="copyholder"
  648. style="
  649. border: 0px solid blue;
  650. visibility: hidden;
  651. padding: 0px;
  652. display: none;
  653. "
  654. ></div>
  655. </div> -->
  656. </div>
  657. </div>
  658. <div class="x-grid3-resize-marker">&nbsp;</div>
  659. <div class="x-grid3-resize-proxy">&nbsp;</div>
  660. </div>
  661. </div>
  662. </div>
  663. </div>
  664. </div>
  665. </div>
  666. </div>
  667. </div>
  668. <div class="x-window-bl">
  669. <div class="x-window-br">
  670. <div class="x-window-bc">
  671. <div class="x-window-footer x-panel-btns" style="width: 626px">
  672. <div
  673. class="
  674. x-panel-fbar x-small-editor x-statusbar x-toolbar-layout-ct
  675. "
  676. style="width: auto"
  677. >
  678. <table cellspacing="0" class="x-toolbar-ct">
  679. <tbody>
  680. <tr>
  681. <td class="x-toolbar-left" align="left">
  682. <table cellspacing="0">
  683. <tbody>
  684. <tr class="x-toolbar-left-row"></tr>
  685. </tbody>
  686. </table>
  687. </td>
  688. <td class="x-toolbar-right" align="right">
  689. <table cellspacing="0" class="x-toolbar-right-ct">
  690. <tbody>
  691. <tr>
  692. <td>
  693. <table cellspacing="0">
  694. <tbody>
  695. <tr class="x-toolbar-right-row">
  696. <td class="x-toolbar-cell">
  697. <span
  698. cellspacing="0"
  699. class="
  700. x-btn
  701. syno-ux-button
  702. syno-ux-button-default
  703. x-btn-noicon
  704. "
  705. style="
  706. width: auto;
  707. margin-left: 0px;
  708. "
  709. ><em class="x-unselectable"
  710. ><button
  711. type="button"
  712. class="x-btn-text"
  713. @click="closeNotifySetting"
  714. >
  715. 取消
  716. </button></em
  717. ></span
  718. >
  719. </td>
  720. <td class="x-toolbar-cell">
  721. <span
  722. cellspacing="0"
  723. class="
  724. x-btn
  725. syno-ux-button syno-ux-button-blue
  726. x-btn-noicon
  727. "
  728. style="
  729. width: auto;
  730. margin-left: 0px;
  731. "
  732. ><em class="x-unselectable"
  733. ><button
  734. type="button"
  735. class="x-btn-text"
  736. @click="confirmChangeSetting"
  737. >
  738. 确定
  739. </button></em
  740. ></span
  741. >
  742. </td>
  743. <td class="x-toolbar-cell">
  744. <div
  745. class="xtb-text x-status-text"
  746. style="max-width: none"
  747. ></div>
  748. </td>
  749. </tr>
  750. </tbody>
  751. </table>
  752. </td>
  753. <td>
  754. <table cellspacing="0">
  755. <tbody>
  756. <tr class="x-toolbar-extras-row"></tr>
  757. </tbody>
  758. </table>
  759. </td>
  760. </tr>
  761. </tbody>
  762. </table>
  763. </td>
  764. </tr>
  765. </tbody>
  766. </table>
  767. </div>
  768. <div class="x-clear"></div>
  769. </div>
  770. </div>
  771. </div>
  772. </div>
  773. </div>
  774. <div
  775. class="
  776. x-resizable-handle
  777. x-resizable-handle-north
  778. x-unselectable
  779. x-window-handle
  780. "
  781. ></div>
  782. <div
  783. class="
  784. x-resizable-handle
  785. x-resizable-handle-south
  786. x-unselectable
  787. x-window-handle
  788. "
  789. ></div>
  790. <div
  791. class="
  792. x-resizable-handle
  793. x-resizable-handle-east
  794. x-unselectable
  795. x-window-handle
  796. "
  797. ></div>
  798. <div
  799. class="
  800. x-resizable-handle
  801. x-resizable-handle-west
  802. x-unselectable
  803. x-window-handle
  804. "
  805. ></div>
  806. <div
  807. class="
  808. x-resizable-handle
  809. x-resizable-handle-northeast
  810. x-unselectable
  811. x-window-handle
  812. "
  813. ></div>
  814. <div
  815. class="
  816. x-resizable-handle
  817. x-resizable-handle-northwest
  818. x-unselectable
  819. x-window-handle
  820. "
  821. ></div>
  822. <div
  823. class="
  824. x-resizable-handle
  825. x-resizable-handle-southeast
  826. x-unselectable
  827. x-window-handle
  828. "
  829. ></div>
  830. <div
  831. class="
  832. x-resizable-handle
  833. x-resizable-handle-southwest
  834. x-unselectable
  835. x-window-handle
  836. "
  837. ></div>
  838. </div>
  839. </div>
  840. </template>
  841. <script>
  842. import { moveWindow, windowResize } from "../../../../common/common";
  843. export default {
  844. props: ["defaultZIndex", "notifySettingData"],
  845. mounted() {
  846. this.$bus.on("openNotifySetting", this.openNotifySetting);
  847. this.notifySettingContant = this.notifySettingData;
  848. window.addEventListener("resize", () => {
  849. if (this.notifySettingContant.display === "block") {
  850. let el = document.querySelector(".x-window.sds-notify-setting-dialog");
  851. let { elTop, elLeft } = windowResize(el);
  852. this.notifySettingContant.top = elTop;
  853. this.notifySettingContant.left = elLeft;
  854. }
  855. });
  856. },
  857. data() {
  858. return {
  859. windowFirstClick: {
  860. layerX: 0,
  861. layerY: 0,
  862. screenX: 0,
  863. screenY: 0,
  864. },
  865. notifySettingContant: {
  866. display: "none",
  867. zIndex: 9050,
  868. cls: "active-win",
  869. top: 0,
  870. left: 0,
  871. width: "626px",
  872. },
  873. notifySettingDetail: {
  874. tableHeaderContant1: {
  875. title: "服务",
  876. cls: "sort-asc",
  877. },
  878. tableHeaderContant2: {
  879. title: "信息",
  880. cls: "syno-ux-cb-checked",
  881. },
  882. tableBodyContantList: [
  883. {
  884. id: 0,
  885. title: "Codec Pack",
  886. cls: "",
  887. cls1: "syno-ux-cb-checked",
  888. cls2: "syno-ux-grid-enable-column-checked",
  889. },
  890. {
  891. id: 1,
  892. title: "Download Station ",
  893. cls: "",
  894. cls1: "syno-ux-cb-checked",
  895. cls2: "syno-ux-grid-enable-column-checked",
  896. },
  897. {
  898. id: 2,
  899. title: "File Station",
  900. cls: "",
  901. cls1: "syno-ux-cb-checked",
  902. cls2: "syno-ux-grid-enable-column-checked",
  903. },
  904. {
  905. id: 3,
  906. title: "Hyper Backup",
  907. cls: "",
  908. cls1: "syno-ux-cb-checked",
  909. cls2: "syno-ux-grid-enable-column-checked",
  910. },
  911. {
  912. id: 4,
  913. title: "Note Station",
  914. cls: "",
  915. cls1: "syno-ux-cb-checked",
  916. cls2: "syno-ux-grid-enable-column-checked",
  917. },
  918. {
  919. id: 5,
  920. title: "PDF Viewer",
  921. cls: "",
  922. cls1: "syno-ux-cb-checked",
  923. cls2: "syno-ux-grid-enable-column-checked",
  924. },
  925. {
  926. id: 6,
  927. title: "Synology Drive",
  928. cls: "",
  929. cls1: "syno-ux-cb-checked",
  930. cls2: "syno-ux-grid-enable-column-checked",
  931. },
  932. {
  933. id: 7,
  934. title: "Synology Drive ShareSync",
  935. cls: "",
  936. cls1: "syno-ux-cb-checked",
  937. cls2: "syno-ux-grid-enable-column-checked",
  938. },
  939. {
  940. id: 8,
  941. title: "Synology MailPlus",
  942. cls: "",
  943. cls1: "syno-ux-cb-checked",
  944. cls2: "syno-ux-grid-enable-column-checked",
  945. },
  946. {
  947. id: 9,
  948. title: "Synology Universal Search",
  949. cls: "",
  950. cls1: "syno-ux-cb-checked",
  951. cls2: "syno-ux-grid-enable-column-checked",
  952. },
  953. {
  954. id: 10,
  955. title: "Video Station",
  956. cls: "",
  957. cls1: "syno-ux-cb-checked",
  958. cls2: "syno-ux-grid-enable-column-checked",
  959. },
  960. {
  961. id: 11,
  962. title: "外部存储",
  963. cls: "",
  964. cls1: "syno-ux-cb-checked",
  965. cls2: "syno-ux-grid-enable-column-checked",
  966. },
  967. {
  968. id: 12,
  969. title: "套件中心",
  970. cls: "",
  971. cls1: "syno-ux-cb-checked",
  972. cls2: "syno-ux-grid-enable-column-checked",
  973. },
  974. {
  975. id: 13,
  976. title: "存储",
  977. cls: "",
  978. cls1: "syno-ux-cb-checked",
  979. cls2: "syno-ux-grid-enable-column-checked",
  980. },
  981. {
  982. id: 14,
  983. title: "安全顾问",
  984. cls: "",
  985. cls1: "syno-ux-cb-checked",
  986. cls2: "syno-ux-grid-enable-column-checked",
  987. },
  988. {
  989. id: 15,
  990. title: "日志中心",
  991. cls: "",
  992. cls1: "syno-ux-cb-checked",
  993. cls2: "syno-ux-grid-enable-column-checked",
  994. },
  995. {
  996. id: 16,
  997. title: "盗版检测",
  998. cls: "",
  999. cls1: "syno-ux-cb-checked",
  1000. cls2: "syno-ux-grid-enable-column-checked",
  1001. },
  1002. {
  1003. id: 17,
  1004. title: "系统",
  1005. cls: "",
  1006. cls1: "syno-ux-cb-checked",
  1007. cls2: "syno-ux-grid-enable-column-checked",
  1008. },
  1009. ],
  1010. },
  1011. };
  1012. },
  1013. created() {
  1014. },
  1015. methods: {
  1016. // 打开本页面
  1017. openNotifySetting() {
  1018. if(this.notifySettingContant.display === "none"){
  1019. this.notifySettingContant.display = "block";
  1020. this.$nextTick(() => {
  1021. let el = document.querySelector(".x-window.sds-notify-setting-dialog");
  1022. let { elTop, elLeft } = windowResize(el);
  1023. this.notifySettingContant.top = elTop;
  1024. this.notifySettingContant.left = elLeft;
  1025. });
  1026. let left =
  1027. (document.documentElement.clientWidth -
  1028. parseInt(this.notifySettingContant.width.replace("px", ""))) /
  1029. 2;
  1030. this.notifySettingContant.left = left + "px";
  1031. }
  1032. if (this.notifySettingContant.cls === "deactive-win") {
  1033. this.notifySettingContant.zIndex = this.defaultZIndex + 10;
  1034. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex + 10);
  1035. }
  1036. },
  1037. // 关闭本页面
  1038. closeNotifySetting() {
  1039. this.notifySettingContant.display = "none";
  1040. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex - 10);
  1041. },
  1042. // 点击本页面
  1043. clickNotifySetting() {
  1044. if (this.notifySettingContant.zIndex < this.defaultZIndex) {
  1045. this.notifySettingContant.zIndex = this.defaultZIndex + 10;
  1046. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex + 10);
  1047. }
  1048. },
  1049. // 确认修改
  1050. confirmChangeSetting() {
  1051. this.closeNotifySetting();
  1052. },
  1053. // 点击列表每一行
  1054. clickTr(tableBodyContantIndex) {
  1055. this.notifySettingDetail.tableBodyContantList.forEach((item) => {
  1056. item.cls = "";
  1057. });
  1058. this.notifySettingDetail.tableBodyContantList[tableBodyContantIndex].cls =
  1059. "x-grid3-row-selected";
  1060. },
  1061. // 鼠标移入列表每一行
  1062. mouseenterTr(tableBodyContantIndex) {
  1063. if (
  1064. !this.notifySettingDetail.tableBodyContantList[tableBodyContantIndex]
  1065. .cls
  1066. ) {
  1067. this.notifySettingDetail.tableBodyContantList[
  1068. tableBodyContantIndex
  1069. ].cls = "x-grid3-row-over";
  1070. }
  1071. },
  1072. // 鼠标移出列表每一行
  1073. mouseleaveTr(tableBodyContantIndex) {
  1074. if (
  1075. this.notifySettingDetail.tableBodyContantList[
  1076. tableBodyContantIndex
  1077. ].cls.includes("x-grid3-row-over")
  1078. ) {
  1079. this.notifySettingDetail.tableBodyContantList[
  1080. tableBodyContantIndex
  1081. ].cls = "";
  1082. }
  1083. },
  1084. // 改变排序方式
  1085. changeSort() {
  1086. if (this.notifySettingDetail.tableHeaderContant1.cls === "sort-asc") {
  1087. this.notifySettingDetail.tableHeaderContant1.cls = "sort-desc";
  1088. } else {
  1089. this.notifySettingDetail.tableHeaderContant1.cls = "sort-asc";
  1090. }
  1091. },
  1092. // 点击全选全不选
  1093. clickCheckAll() {
  1094. if (
  1095. this.notifySettingDetail.tableHeaderContant2.cls ===
  1096. "syno-ux-cb-checked"
  1097. ) {
  1098. this.notifySettingDetail.tableHeaderContant2.cls = "";
  1099. this.notifySettingDetail.tableBodyContantList.forEach((item) => {
  1100. item.cls2 = "syno-ux-grid-enable-column-unchecked";
  1101. });
  1102. } else {
  1103. this.notifySettingDetail.tableHeaderContant2.cls = "syno-ux-cb-checked";
  1104. this.notifySettingDetail.tableBodyContantList.forEach((item) => {
  1105. item.cls2 = "syno-ux-grid-enable-column-checked";
  1106. });
  1107. }
  1108. },
  1109. // 点击每一行的复选框
  1110. clickCheckItem(tableBodyContantIndex) {
  1111. if (
  1112. this.notifySettingDetail.tableBodyContantList[tableBodyContantIndex]
  1113. .cls2 === "syno-ux-grid-enable-column-checked"
  1114. ) {
  1115. this.notifySettingDetail.tableBodyContantList[
  1116. tableBodyContantIndex
  1117. ].cls2 = "syno-ux-grid-enable-column-unchecked";
  1118. } else {
  1119. this.notifySettingDetail.tableBodyContantList[
  1120. tableBodyContantIndex
  1121. ].cls2 = "syno-ux-grid-enable-column-checked";
  1122. }
  1123. let countChecked = 0;
  1124. this.notifySettingDetail.tableBodyContantList.forEach((item) => {
  1125. if (item.cls2 === "syno-ux-grid-enable-column-checked") {
  1126. countChecked++;
  1127. }
  1128. });
  1129. if (!countChecked) {
  1130. this.notifySettingDetail.tableHeaderContant2.cls = "";
  1131. } else if (
  1132. countChecked < this.notifySettingDetail.tableBodyContantList.length
  1133. ) {
  1134. this.notifySettingDetail.tableHeaderContant2.cls = "syno-ux-cb-grayed";
  1135. } else {
  1136. this.notifySettingDetail.tableHeaderContant2.cls = "syno-ux-cb-checked";
  1137. }
  1138. },
  1139. // 鼠标按下该页面头部
  1140. mousedownNotifyTrayPanelDetail(e) {
  1141. // document.documentElement.click()
  1142. this.windowFirstClick.layerX = e.layerX;
  1143. this.windowFirstClick.screenX = document.documentElement.clientWidth;
  1144. this.windowFirstClick.layerY = e.layerY;
  1145. this.windowFirstClick.screenY = document.documentElement.clientHeight;
  1146. document.addEventListener("mousemove", this.moveWindowPosition);
  1147. document.addEventListener("mouseup", this.upWindowPosition);
  1148. },
  1149. // 移动弹出框窗口位置
  1150. moveWindowPosition(e) {
  1151. let window = document.querySelector(
  1152. ".sds-notify-setting-dialog.sds-window-v5"
  1153. );
  1154. let obj = moveWindow(
  1155. e,
  1156. window,
  1157. this.windowFirstClick.layerX,
  1158. this.windowFirstClick.layerY,
  1159. this.windowFirstClick.screenX,
  1160. this.windowFirstClick.screenY
  1161. );
  1162. this.notifySettingContant.left = obj.moveX + "px";
  1163. this.notifySettingContant.top = obj.moveY + "px";
  1164. if (!window.className.includes(" x-panel-ghost")) {
  1165. window.className = window.className + " x-panel-ghost";
  1166. }
  1167. },
  1168. // 鼠标松开
  1169. upWindowPosition(e) {
  1170. let window = document.querySelector(
  1171. ".sds-notify-setting-dialog.sds-window-v5"
  1172. );
  1173. if (window.className.includes(" x-panel-ghost")) {
  1174. window.className = window.className.replace(" x-panel-ghost", "");
  1175. }
  1176. document.removeEventListener("mousemove", this.moveWindowPosition);
  1177. document.removeEventListener("mouseup", this.upWindowPosition);
  1178. },
  1179. },
  1180. components: {},
  1181. name: "NotifySetting",
  1182. };
  1183. </script>