index.vue 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187
  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. console.log(el);
  852. let { elTop, elLeft } = windowResize(el);
  853. this.notifySettingContant.top = elTop;
  854. this.notifySettingContant.left = elLeft;
  855. }
  856. });
  857. },
  858. data() {
  859. return {
  860. windowFirstClick: {
  861. layerX: 0,
  862. layerY: 0,
  863. screenX: 0,
  864. screenY: 0,
  865. },
  866. notifySettingContant: {
  867. display: "none",
  868. zIndex: 9050,
  869. cls: "active-win",
  870. top: 0,
  871. left: 0,
  872. width: "626px",
  873. },
  874. notifySettingDetail: {
  875. tableHeaderContant1: {
  876. title: "服务",
  877. cls: "sort-asc",
  878. },
  879. tableHeaderContant2: {
  880. title: "信息",
  881. cls: "syno-ux-cb-checked",
  882. },
  883. tableBodyContantList: [
  884. {
  885. id: 0,
  886. title: "Codec Pack",
  887. cls: "",
  888. cls1: "syno-ux-cb-checked",
  889. cls2: "syno-ux-grid-enable-column-checked",
  890. },
  891. {
  892. id: 1,
  893. title: "Download Station ",
  894. cls: "",
  895. cls1: "syno-ux-cb-checked",
  896. cls2: "syno-ux-grid-enable-column-checked",
  897. },
  898. {
  899. id: 2,
  900. title: "File Station",
  901. cls: "",
  902. cls1: "syno-ux-cb-checked",
  903. cls2: "syno-ux-grid-enable-column-checked",
  904. },
  905. {
  906. id: 3,
  907. title: "Hyper Backup",
  908. cls: "",
  909. cls1: "syno-ux-cb-checked",
  910. cls2: "syno-ux-grid-enable-column-checked",
  911. },
  912. {
  913. id: 4,
  914. title: "Note Station",
  915. cls: "",
  916. cls1: "syno-ux-cb-checked",
  917. cls2: "syno-ux-grid-enable-column-checked",
  918. },
  919. {
  920. id: 5,
  921. title: "PDF Viewer",
  922. cls: "",
  923. cls1: "syno-ux-cb-checked",
  924. cls2: "syno-ux-grid-enable-column-checked",
  925. },
  926. {
  927. id: 6,
  928. title: "Synology Drive",
  929. cls: "",
  930. cls1: "syno-ux-cb-checked",
  931. cls2: "syno-ux-grid-enable-column-checked",
  932. },
  933. {
  934. id: 7,
  935. title: "Synology Drive ShareSync",
  936. cls: "",
  937. cls1: "syno-ux-cb-checked",
  938. cls2: "syno-ux-grid-enable-column-checked",
  939. },
  940. {
  941. id: 8,
  942. title: "Synology MailPlus",
  943. cls: "",
  944. cls1: "syno-ux-cb-checked",
  945. cls2: "syno-ux-grid-enable-column-checked",
  946. },
  947. {
  948. id: 9,
  949. title: "Synology Universal Search",
  950. cls: "",
  951. cls1: "syno-ux-cb-checked",
  952. cls2: "syno-ux-grid-enable-column-checked",
  953. },
  954. {
  955. id: 10,
  956. title: "Video Station",
  957. cls: "",
  958. cls1: "syno-ux-cb-checked",
  959. cls2: "syno-ux-grid-enable-column-checked",
  960. },
  961. {
  962. id: 11,
  963. title: "外部存储",
  964. cls: "",
  965. cls1: "syno-ux-cb-checked",
  966. cls2: "syno-ux-grid-enable-column-checked",
  967. },
  968. {
  969. id: 12,
  970. title: "套件中心",
  971. cls: "",
  972. cls1: "syno-ux-cb-checked",
  973. cls2: "syno-ux-grid-enable-column-checked",
  974. },
  975. {
  976. id: 13,
  977. title: "存储",
  978. cls: "",
  979. cls1: "syno-ux-cb-checked",
  980. cls2: "syno-ux-grid-enable-column-checked",
  981. },
  982. {
  983. id: 14,
  984. title: "安全顾问",
  985. cls: "",
  986. cls1: "syno-ux-cb-checked",
  987. cls2: "syno-ux-grid-enable-column-checked",
  988. },
  989. {
  990. id: 15,
  991. title: "日志中心",
  992. cls: "",
  993. cls1: "syno-ux-cb-checked",
  994. cls2: "syno-ux-grid-enable-column-checked",
  995. },
  996. {
  997. id: 16,
  998. title: "盗版检测",
  999. cls: "",
  1000. cls1: "syno-ux-cb-checked",
  1001. cls2: "syno-ux-grid-enable-column-checked",
  1002. },
  1003. {
  1004. id: 17,
  1005. title: "系统",
  1006. cls: "",
  1007. cls1: "syno-ux-cb-checked",
  1008. cls2: "syno-ux-grid-enable-column-checked",
  1009. },
  1010. ],
  1011. },
  1012. };
  1013. },
  1014. created() {
  1015. },
  1016. methods: {
  1017. // 打开本页面
  1018. openNotifySetting() {
  1019. if(this.notifySettingContant.display === "none"){
  1020. this.notifySettingContant.display = "block";
  1021. this.$nextTick(() => {
  1022. let el = document.querySelector(".x-window.sds-notify-setting-dialog");
  1023. let { elTop, elLeft } = windowResize(el);
  1024. this.notifySettingContant.top = elTop;
  1025. this.notifySettingContant.left = elLeft;
  1026. });
  1027. let left =
  1028. (document.documentElement.clientWidth -
  1029. parseInt(this.notifySettingContant.width.replace("px", ""))) /
  1030. 2;
  1031. this.notifySettingContant.left = left + "px";
  1032. }
  1033. if (this.notifySettingContant.cls === "deactive-win") {
  1034. this.notifySettingContant.zIndex = this.defaultZIndex + 10;
  1035. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex + 10);
  1036. }
  1037. },
  1038. // 关闭本页面
  1039. closeNotifySetting() {
  1040. this.notifySettingContant.display = "none";
  1041. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex - 10);
  1042. },
  1043. // 点击本页面
  1044. clickNotifySetting() {
  1045. if (this.notifySettingContant.zIndex < this.defaultZIndex) {
  1046. this.notifySettingContant.zIndex = this.defaultZIndex + 10;
  1047. this.$bus.emit("changeDefaultZIndex", this.defaultZIndex + 10);
  1048. }
  1049. },
  1050. // 确认修改
  1051. confirmChangeSetting() {
  1052. this.closeNotifySetting();
  1053. },
  1054. // 点击列表每一行
  1055. clickTr(tableBodyContantIndex) {
  1056. this.notifySettingDetail.tableBodyContantList.forEach((item) => {
  1057. item.cls = "";
  1058. });
  1059. this.notifySettingDetail.tableBodyContantList[tableBodyContantIndex].cls =
  1060. "x-grid3-row-selected";
  1061. },
  1062. // 鼠标移入列表每一行
  1063. mouseenterTr(tableBodyContantIndex) {
  1064. if (
  1065. !this.notifySettingDetail.tableBodyContantList[tableBodyContantIndex]
  1066. .cls
  1067. ) {
  1068. this.notifySettingDetail.tableBodyContantList[
  1069. tableBodyContantIndex
  1070. ].cls = "x-grid3-row-over";
  1071. }
  1072. },
  1073. // 鼠标移出列表每一行
  1074. mouseleaveTr(tableBodyContantIndex) {
  1075. if (
  1076. this.notifySettingDetail.tableBodyContantList[
  1077. tableBodyContantIndex
  1078. ].cls.includes("x-grid3-row-over")
  1079. ) {
  1080. this.notifySettingDetail.tableBodyContantList[
  1081. tableBodyContantIndex
  1082. ].cls = "";
  1083. }
  1084. },
  1085. // 改变排序方式
  1086. changeSort() {
  1087. if (this.notifySettingDetail.tableHeaderContant1.cls === "sort-asc") {
  1088. this.notifySettingDetail.tableHeaderContant1.cls = "sort-desc";
  1089. } else {
  1090. this.notifySettingDetail.tableHeaderContant1.cls = "sort-asc";
  1091. }
  1092. },
  1093. // 点击全选全不选
  1094. clickCheckAll() {
  1095. if (
  1096. this.notifySettingDetail.tableHeaderContant2.cls ===
  1097. "syno-ux-cb-checked"
  1098. ) {
  1099. this.notifySettingDetail.tableHeaderContant2.cls = "";
  1100. this.notifySettingDetail.tableBodyContantList.forEach((item) => {
  1101. item.cls2 = "syno-ux-grid-enable-column-unchecked";
  1102. });
  1103. } else {
  1104. this.notifySettingDetail.tableHeaderContant2.cls = "syno-ux-cb-checked";
  1105. this.notifySettingDetail.tableBodyContantList.forEach((item) => {
  1106. item.cls2 = "syno-ux-grid-enable-column-checked";
  1107. });
  1108. }
  1109. },
  1110. // 点击每一行的复选框
  1111. clickCheckItem(tableBodyContantIndex) {
  1112. if (
  1113. this.notifySettingDetail.tableBodyContantList[tableBodyContantIndex]
  1114. .cls2 === "syno-ux-grid-enable-column-checked"
  1115. ) {
  1116. this.notifySettingDetail.tableBodyContantList[
  1117. tableBodyContantIndex
  1118. ].cls2 = "syno-ux-grid-enable-column-unchecked";
  1119. } else {
  1120. this.notifySettingDetail.tableBodyContantList[
  1121. tableBodyContantIndex
  1122. ].cls2 = "syno-ux-grid-enable-column-checked";
  1123. }
  1124. let countChecked = 0;
  1125. this.notifySettingDetail.tableBodyContantList.forEach((item) => {
  1126. if (item.cls2 === "syno-ux-grid-enable-column-checked") {
  1127. countChecked++;
  1128. }
  1129. });
  1130. if (!countChecked) {
  1131. this.notifySettingDetail.tableHeaderContant2.cls = "";
  1132. } else if (
  1133. countChecked < this.notifySettingDetail.tableBodyContantList.length
  1134. ) {
  1135. this.notifySettingDetail.tableHeaderContant2.cls = "syno-ux-cb-grayed";
  1136. } else {
  1137. this.notifySettingDetail.tableHeaderContant2.cls = "syno-ux-cb-checked";
  1138. }
  1139. },
  1140. // 鼠标按下该页面头部
  1141. mousedownNotifyTrayPanelDetail(e) {
  1142. // document.documentElement.click()
  1143. this.windowFirstClick.layerX = e.layerX;
  1144. this.windowFirstClick.screenX = document.documentElement.clientWidth;
  1145. this.windowFirstClick.layerY = e.layerY;
  1146. this.windowFirstClick.screenY = document.documentElement.clientHeight;
  1147. document.addEventListener("mousemove", this.moveWindowPosition);
  1148. document.addEventListener("mouseup", this.upWindowPosition);
  1149. },
  1150. // 移动弹出框窗口位置
  1151. moveWindowPosition(e) {
  1152. let window = document.querySelector(
  1153. ".sds-notify-setting-dialog.sds-window-v5"
  1154. );
  1155. let obj = moveWindow(
  1156. e,
  1157. window,
  1158. this.windowFirstClick.layerX,
  1159. this.windowFirstClick.layerY,
  1160. this.windowFirstClick.screenX,
  1161. this.windowFirstClick.screenY
  1162. );
  1163. this.notifySettingContant.left = obj.moveX + "px";
  1164. this.notifySettingContant.top = obj.moveY + "px";
  1165. if (!window.className.includes(" x-panel-ghost")) {
  1166. window.className = window.className + " x-panel-ghost";
  1167. }
  1168. },
  1169. // 鼠标松开
  1170. upWindowPosition(e) {
  1171. let window = document.querySelector(
  1172. ".sds-notify-setting-dialog.sds-window-v5"
  1173. );
  1174. if (window.className.includes(" x-panel-ghost")) {
  1175. window.className = window.className.replace(" x-panel-ghost", "");
  1176. }
  1177. document.removeEventListener("mousemove", this.moveWindowPosition);
  1178. document.removeEventListener("mouseup", this.upWindowPosition);
  1179. },
  1180. },
  1181. components: {},
  1182. name: "NotifySetting",
  1183. };
  1184. </script>