nitrogenHome.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815
  1. <template>
  2. <div id="compressor3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"></div>
  3. <template v-for="(sysItem, sysIndex) in monitorDataGroupArr" :key="sysIndex">
  4. <div
  5. :id="`compressorCss3D${sysIndex + 1}`"
  6. class="threejs-Object-CSS compressorCss3D-box"
  7. style="width: 100%; height: 100%; position: absolute; pointer-events: none; overflow: hidden; z-index: 2; top: 0px; left: 0px"
  8. >
  9. </div>
  10. </template>
  11. <div v-for="(sysItem, sysIndex) in monitorDataGroupArr" :key="sysIndex">
  12. <div v-show="monitorDataGroupFlag == sysIndex + 1">
  13. <div v-for="(groupNum, index) in sysItem" :key="index" class="modal-monitor">
  14. <fourBorderBg :class="`kyj${groupNum}`" :id="`nitrogenMonitor${groupNum}`">
  15. <div class="title">{{ kyjs[index] }} </div>
  16. <template v-for="(preMonitor, preMonitorIndex) in preMonitorList" :key="preMonitorIndex">
  17. <div v-if="preMonitor.code !== 'signal'" class="monitor-item">
  18. <span class="monitor-title">{{ preMonitor.title }}:</span>
  19. <span class="monitor-val"
  20. ><span class="val">{{
  21. monitorData[preMonitor.code.replace(prefix[0], `${prefix[0]}${groupNum}`)]
  22. ? formatNum(monitorData[preMonitor.code.replace(prefix[0], `${prefix[0]}${groupNum}`)])
  23. : '-'
  24. }}</span
  25. ><span class="unit">{{ preMonitor.unit }}</span></span
  26. >
  27. </div>
  28. <div v-else class="signal-item">
  29. <div class="signal" v-for="(signal, childIndex) in preMonitor.child" :key="childIndex">
  30. <span class="monitor-title">{{ signal.title }}</span>
  31. <span
  32. :class="{
  33. 'signal-round': true,
  34. 'signal-round-run': signal.title != '故障信号' && monitorData[signal.code.replace(prefix[0], `${prefix[0]}${groupNum}`)] == '1',
  35. 'signal-round-warning':
  36. signal.title == '故障信号' && monitorData[signal.code.replace(prefix[0], `${prefix[0]}${groupNum}`)] == '1',
  37. 'signal-round-gry': monitorData[signal.code.replace(prefix[0], `${prefix[0]}${groupNum}`)] != '1',
  38. }"
  39. ></span>
  40. </div>
  41. </div>
  42. </template>
  43. </fourBorderBg>
  44. <fourBorderBg :class="`cqg${groupNum}`" :id="`cqgMonitor${groupNum}`">
  45. <div class="title">{{ cqgs[index] }}</div>
  46. <template v-for="(cqgMonitor, cqgMonitorIndex) in cqgMonitorList" :key="cqgMonitorIndex">
  47. <div class="monitor-item">
  48. <span class="monitor-title">{{ cqgMonitor.title }}:</span>
  49. <span class="monitor-val"
  50. ><span class="val">{{
  51. monitorData[cqgMonitor.code.replace(prefix[0], `${prefix[1]}${groupNum}`)]
  52. ? formatNum(monitorData[cqgMonitor.code.replace(prefix[1], `${prefix[1]}${groupNum}`)])
  53. : '-'
  54. }}</span
  55. ><span class="unit">{{ cqgMonitor.unit }}</span></span
  56. >
  57. </div>
  58. </template>
  59. </fourBorderBg>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="nitrogen-home">
  64. <div style="position: absolute; color: #fff; top: 30px; pointer-events: auto; display: flex">
  65. <div
  66. v-for="(sysItem, sysIndex) in monitorDataGroupArr"
  67. :key="sysIndex"
  68. class="tab-button-box"
  69. :class="{ 'tab-button-box-active': monitorDataGroupFlag == sysIndex + 1 }"
  70. @click="setMonitorGroupNum(sysIndex + 1)"
  71. >{{ '压风系统' + (sysIndex + 1) }} (运行: <p style="padding: 0 5px"></p
  72. ><span
  73. :class="{
  74. 'signal-round': true,
  75. 'signal-round-run': sysStateList[sysIndex] && sysStateList[sysIndex].isRun,
  76. 'signal-round-gry': sysStateList[sysIndex] && !sysStateList[sysIndex].isRun,
  77. }"
  78. ></span>
  79. <p style="padding: 0 5px"></p>故障:<p style="padding: 0 5px"></p
  80. ><span
  81. :class="{
  82. 'signal-round': true,
  83. 'signal-round-warning': sysStateList[sysIndex] && sysStateList[sysIndex].fault,
  84. 'signal-round-gry': sysStateList[sysIndex] && !sysStateList[sysIndex].fault,
  85. }"
  86. ></span
  87. ><p style="padding: 0 5px"></p> )</div
  88. >
  89. </div>
  90. <div class="total-data">
  91. <div class="vent-flex-row">
  92. <div class="item" v-for="(data, index) in totalData" :key="index"
  93. >{{ data.title + '(' + data.unit + ')' }}:<span class="val">{{
  94. monitorData[data.code] ? formatNum(monitorData[data.code]) : '-'
  95. }}</span></div
  96. >
  97. </div>
  98. </div>
  99. <div class="nitrogen-container">
  100. <div v-if="monitorData['netStatus'] == 0" class="device-state">网络断开</div>
  101. <div class="top-box">
  102. <!-- 左边监测数据 -->
  103. <div class="lr-box left-box">
  104. <div class="left-container">
  105. <div class="item item-l" v-for="(groupNum, index) in monitorDataGroup" :key="index">
  106. <div class="monitor-box">
  107. <ventBox1>
  108. <template #title>
  109. <div>{{ groupNum }}号压风机</div>
  110. </template>
  111. <template #container>
  112. <div class="state-item">
  113. <div class="item-col" v-for="(preFan, preFanIndex) in preFanMonitorData" :key="preFanIndex">
  114. <span class="state-title">{{ preFan.title + (preFan.unit !== 'signal' ? `(${preFan.unit})` : '') }}</span>
  115. <span v-if="preFan.unit !== 'signal'" class="state-val">{{
  116. monitorData[preFan.code.replace(prefix[2], prefix[2] + groupNum)] >= 0
  117. ? formatNum(Number(monitorData[preFan.code.replace(prefix[2], prefix[2] + groupNum)]))
  118. : '-'
  119. }}</span>
  120. <span
  121. v-else
  122. :class="{
  123. 'signal-round': true,
  124. 'signal-round-warning': monitorData[preFan.code.replace(prefix[2], `${prefix[2]}${groupNum}`)] == '1',
  125. 'signal-round-gry': monitorData[preFan.code.replace(prefix[2], `${prefix[2]}${groupNum}`)] != '1',
  126. }"
  127. ></span>
  128. </div>
  129. </div>
  130. </template>
  131. </ventBox1>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. </template>
  140. <script lang="ts" setup name="nitrogenHome">
  141. import { onMounted, onUnmounted, ref } from 'vue';
  142. import fourBorderBg from '../../../comment/components/fourBorderBg.vue';
  143. import { mountedThree, destroy, setModelType } from '../nitrogen.threejs';
  144. import { list } from '../nitrogen.api';
  145. import ventBox1 from '/@/components/vent/ventBox1.vue';
  146. import { getMonitorData } from '../nitrogen.data.1';
  147. import type { State } from '../nitrogen.data.1';
  148. import { formatNum } from '/@/utils/ventutil';
  149. const { monitorDataGroupArr, preFanMonitorData, preMonitorList, cqgMonitorList, prefix, getSysState, totalData } = getMonitorData();
  150. const loading = ref(true);
  151. const monitorDataGroupFlag = ref(1);
  152. const monitorDataGroup = ref<Number[]>([]);
  153. const kyjs = ref<string[]>([]);
  154. const cqgs = ref<string[]>([]);
  155. const monitorData = ref<Object | []>({});
  156. const sysStateList = ref<State[]>([]);
  157. // https获取监测数据
  158. let timer: null | NodeJS.Timeout = null;
  159. async function getMonitor(flag?) {
  160. if (Object.prototype.toString.call(timer) === '[object Null]') {
  161. timer = await setTimeout(
  162. async () => {
  163. await getDataSource();
  164. if (timer) {
  165. timer = null;
  166. }
  167. await getMonitor(false);
  168. },
  169. flag ? 0 : 1000
  170. );
  171. }
  172. }
  173. async function getDataSource() {
  174. const res = await list({ devicetype: 'forcFan', pagetype: 'normal' });
  175. let dataSource = res.msgTxt[0] && res.msgTxt[0].datalist ? res.msgTxt[0].datalist[0] : [];
  176. if (dataSource) {
  177. monitorData.value = Object.assign(dataSource, dataSource.readData);
  178. }
  179. loading.value = false;
  180. sysStateList.value = getSysState(monitorData.value);
  181. }
  182. function setMonitorGroupNum(flag) {
  183. monitorDataGroupFlag.value = flag;
  184. const monitorGroup = monitorDataGroupArr[flag - 1];
  185. changeGroup(monitorGroup);
  186. setModelType('compressor' + (flag - 1));
  187. monitorDataGroup.value = monitorGroup;
  188. }
  189. function changeGroup(val) {
  190. kyjs.value = val.map((item) => `${item}号空压机`);
  191. cqgs.value = val.map((item) => `${item}号储气罐`);
  192. monitorData.value = new Array(val.length).fill({
  193. strName: '空压机',
  194. compressGroupName: '',
  195. compressExhaustPressF1: '-',
  196. compressSeparatePressF1: '-',
  197. compressHostTempF1: '-',
  198. compressCrewTempF1: '-',
  199. compressRunTimeF1: '-',
  200. controlModel: 'LOC',
  201. });
  202. }
  203. onMounted(async () => {
  204. setTimeout(() => {
  205. monitorDataGroupFlag.value = 1;
  206. mountedThree(monitorDataGroupArr).then(async () => {
  207. setMonitorGroupNum(1);
  208. await getMonitor(true);
  209. });
  210. }, 0);
  211. });
  212. onUnmounted(() => {
  213. destroy();
  214. if (timer) {
  215. clearTimeout(timer);
  216. timer = undefined;
  217. }
  218. });
  219. </script>
  220. <style lang="less" scoped>
  221. @ventSpace: zxm;
  222. .nitrogen-home {
  223. width: 100%;
  224. height: 100%;
  225. display: flex;
  226. justify-content: center;
  227. position: relative;
  228. .total-data {
  229. position: absolute;
  230. color: #e4cd00;
  231. z-index: 9;
  232. top: 50px;
  233. right: 30px;
  234. // display: flex;
  235. font-size: 18px;
  236. .item {
  237. width: 200px;
  238. margin-left: 30px;
  239. .val {
  240. color: #00d8ff;
  241. }
  242. }
  243. }
  244. }
  245. .compressorCss3D-box {
  246. .modal-monitor {
  247. position: absolute;
  248. left: 0px;
  249. top: 0px;
  250. }
  251. &:deep(.win) {
  252. margin: 0 !important;
  253. background: #00000044;
  254. }
  255. &:deep(.main) {
  256. .title {
  257. height: 34px;
  258. text-align: center;
  259. font-weight: 600;
  260. color: #7af5ff;
  261. // background-image: url('../../../assets/img/yfj/light.png');
  262. background-repeat: no-repeat;
  263. background-position-x: center;
  264. background-position-y: 100%;
  265. background-size: 80%;
  266. font-size: 16px;
  267. }
  268. .monitor-item {
  269. display: flex;
  270. flex-direction: row;
  271. width: auto;
  272. margin-bottom: 3px;
  273. .monitor-val {
  274. color: #ffb700;
  275. display: flex;
  276. width: auto;
  277. .val {
  278. width: 80px;
  279. font-size: 14px;
  280. }
  281. .unit {
  282. color: #ffffffbb;
  283. font-size: 14px;
  284. }
  285. }
  286. }
  287. .monitor-title {
  288. width: 100px;
  289. color: #7af5ff;
  290. font-weight: 400;
  291. font-size: 14px;
  292. }
  293. .signal-item {
  294. display: flex;
  295. justify-content: space-between;
  296. // margin-bottom: 5px;
  297. .signal-round {
  298. display: inline-block;
  299. width: 8px;
  300. height: 8px;
  301. border-radius: 50%;
  302. margin: 0 10px;
  303. position: relative;
  304. &::after {
  305. display: block;
  306. content: '';
  307. position: absolute;
  308. width: 12px;
  309. height: 12px;
  310. top: -2px;
  311. left: -2px;
  312. border-radius: 50%;
  313. }
  314. }
  315. .signal-round-gry {
  316. background-color: #858585;
  317. &::after {
  318. background-color: #85858544;
  319. box-shadow: 0 0 1px 1px #85858599;
  320. }
  321. }
  322. .signal-round-run {
  323. background-color: #67fc00;
  324. &::after {
  325. background-color: #67fc0044;
  326. box-shadow: 0 0 1px 1px #c6ff77;
  327. }
  328. }
  329. .signal-round-warning {
  330. background-color: #e9170b;
  331. &::after {
  332. background-color: #e9170b44;
  333. box-shadow: 0 0 1px 1px #e9170b;
  334. }
  335. }
  336. }
  337. }
  338. }
  339. .nitrogen-home {
  340. width: 100%;
  341. height: calc(100% - 100px);
  342. position: fixed;
  343. z-index: 99;
  344. display: flex;
  345. flex-direction: column;
  346. justify-content: center;
  347. align-items: center;
  348. pointer-events: none;
  349. top: 60px;
  350. .nitrogen-container {
  351. width: 100%;
  352. height: calc(100%);
  353. display: flex;
  354. justify-content: space-between;
  355. margin-bottom: 100px;
  356. position: relative;
  357. .device-state {
  358. width: 100%;
  359. position: absolute;
  360. top: 20px;
  361. color: #e90000;
  362. display: flex;
  363. justify-content: center;
  364. font-size: 20px;
  365. }
  366. .top-box {
  367. width: 100%;
  368. padding: 10px;
  369. overflow: hidden;
  370. display: flex;
  371. justify-content: space-between;
  372. .lr-box {
  373. display: flex;
  374. flex-direction: column;
  375. position: relative;
  376. z-index: 9999;
  377. pointer-events: auto;
  378. }
  379. .item {
  380. width: 285px;
  381. height: auto;
  382. position: relative;
  383. border-radius: 5px;
  384. margin-top: 10px;
  385. margin-bottom: 0px;
  386. pointer-events: auto;
  387. color: #fff;
  388. overflow: hidden;
  389. .control-item {
  390. height: auto;
  391. min-height: 35px;
  392. display: flex;
  393. flex-direction: row;
  394. justify-content: space-between;
  395. align-items: center;
  396. padding: 5px;
  397. margin: 0 10px 0 3px;
  398. pointer-events: auto;
  399. background: linear-gradient(to right, #0063cd22, #0063cd04);
  400. margin-bottom: 5px;
  401. border-width: 1px;
  402. border-style: dashed;
  403. border-image: linear-gradient(to right, #008ccd66, #0063cd04) 1 1;
  404. border-radius: 5px;
  405. &:last-child {
  406. margin-bottom: 0;
  407. }
  408. .control-item-l {
  409. display: flex;
  410. align-items: center;
  411. font-size: 14px;
  412. .round {
  413. display: inline-block;
  414. width: 3px;
  415. height: 3px;
  416. padding: 1px;
  417. border-radius: 50%;
  418. background-color: #3df6ff;
  419. margin-right: 5px;
  420. box-shadow: 0 0 1px 1px #64f7ff;
  421. }
  422. }
  423. .control-item-r {
  424. text-align: right;
  425. }
  426. .button-box {
  427. position: relative;
  428. padding: 5px;
  429. border: 1px transparent solid;
  430. background-clip: border-box;
  431. border-radius: 5px;
  432. margin-left: 8px;
  433. }
  434. .a-button {
  435. pointer-events: auto;
  436. }
  437. &::v-deep .a-button--mini {
  438. padding: 6px 10px;
  439. }
  440. &::v-deep .a-button--mini.is-round {
  441. padding: 6px 10px;
  442. }
  443. }
  444. .base-title {
  445. width: calc(100% - 60px);
  446. text-align: center;
  447. color: #00d8ff;
  448. }
  449. .state-item {
  450. width: 100%;
  451. display: flex;
  452. flex-direction: row;
  453. flex-wrap: wrap;
  454. .item-col {
  455. width: 50%;
  456. display: flex;
  457. justify-content: center;
  458. align-items: center;
  459. padding: 5px;
  460. .state-title {
  461. color: #ffffffcc;
  462. flex: 9;
  463. font-size: 14px;
  464. .unit {
  465. // color: #ffffffbb;
  466. }
  467. }
  468. .state-val {
  469. flex: 1;
  470. color: #e4a300;
  471. margin-right: 5px;
  472. text-align: right;
  473. font-size: 14px;
  474. }
  475. }
  476. }
  477. .signal-box {
  478. margin: 5px 0;
  479. display: flex;
  480. align-items: center;
  481. .signal-title {
  482. color: #7af5ff;
  483. margin: 0 5px;
  484. }
  485. &:last-child {
  486. margin-right: 0px;
  487. }
  488. }
  489. .list-item {
  490. padding: 0 10px;
  491. display: flex;
  492. justify-content: space-between;
  493. align-items: center;
  494. .item-data-key {
  495. color: #ffffff99;
  496. }
  497. }
  498. .item-data-box {
  499. color: #fff;
  500. .state-icon {
  501. display: inline-block;
  502. width: 12px;
  503. height: 12px;
  504. border-radius: 12px;
  505. }
  506. .open {
  507. border: 5px solid #133a56;
  508. background: #4ecb73;
  509. }
  510. .close {
  511. border: 5px solid #192961;
  512. background: #6d7898;
  513. }
  514. }
  515. }
  516. .item-l {
  517. width: 335px;
  518. .monitor-box {
  519. // width: 335px;
  520. background-color: #ffffff05;
  521. // margin-left: 2px;
  522. // border-radius: 5px;
  523. // backdrop-filter: blur(10px);
  524. }
  525. }
  526. .right-box {
  527. width: 330px;
  528. .control-group {
  529. display: flex;
  530. // justify-content: space-around;
  531. flex-wrap: wrap;
  532. .control-item {
  533. display: flex;
  534. flex-direction: column;
  535. justify-content: center;
  536. align-items: center;
  537. padding: 0 4px;
  538. .control-item-title {
  539. color: #a6dce9;
  540. position: relative;
  541. top: 5px;
  542. }
  543. .control-item-state {
  544. width: 94px;
  545. height: 47px;
  546. background: url('/@/assets/images/vent/control-switch-bg.png');
  547. display: flex;
  548. justify-content: center;
  549. align-items: center;
  550. color: #fff;
  551. }
  552. .button-box {
  553. position: relative;
  554. padding: 5px;
  555. border: 1px transparent solid;
  556. background-clip: border-box;
  557. border-radius: 5px;
  558. margin-left: 8px;
  559. }
  560. .a-button {
  561. pointer-events: auto;
  562. }
  563. &::v-deep .a-button--mini {
  564. padding: 6px 10px;
  565. }
  566. &::v-deep .a-button--mini.is-round {
  567. padding: 6px 10px;
  568. }
  569. }
  570. }
  571. .control-btn-group {
  572. width: 100%;
  573. display: flex;
  574. flex-direction: row;
  575. justify-content: space-between;
  576. align-items: center;
  577. .control-left-box {
  578. display: flex;
  579. flex-direction: column;
  580. justify-content: center;
  581. align-items: center;
  582. padding: 0 20px;
  583. .btn-box {
  584. width: 100px;
  585. color: #fff;
  586. display: flex;
  587. justify-content: space-between;
  588. span {
  589. display: inline-block;
  590. padding: 2px 8px;
  591. background: #007099;
  592. border-radius: 4px;
  593. border: 1px solid rgb(125, 230, 249);
  594. cursor: pointer;
  595. &:hover {
  596. background: #005574;
  597. }
  598. }
  599. }
  600. .icon-box {
  601. width: 60px;
  602. height: 60px;
  603. border-radius: 30px;
  604. border: 2px solid #00bcdd;
  605. box-shadow: 0 0 20px #ffffff88;
  606. display: flex;
  607. justify-content: center;
  608. align-items: center;
  609. margin-top: 20px;
  610. .icon {
  611. width: 18px;
  612. height: 18px;
  613. border-radius: 9px;
  614. border: 3px solid #d7f9ff;
  615. position: relative;
  616. background: #00bcdd;
  617. &::before {
  618. position: absolute;
  619. content: '';
  620. width: 2px;
  621. height: 12px;
  622. background-color: #00bcdd;
  623. left: 6px;
  624. top: -16px;
  625. }
  626. &::after {
  627. position: absolute;
  628. content: '';
  629. width: 2px;
  630. height: 12px;
  631. left: 6px;
  632. top: 17px;
  633. background-color: #00d9ff;
  634. }
  635. }
  636. }
  637. .remote-icon-box {
  638. transform: rotate(30deg);
  639. animation: iconRotate 1s linear;
  640. }
  641. .remote-icon-box1 {
  642. transform: rotate(-30deg);
  643. animation: iconRotate1 1s linear;
  644. }
  645. @keyframes iconRotate {
  646. from {
  647. transform: rotate(-30deg);
  648. }
  649. to {
  650. transform: rotate(30deg);
  651. }
  652. }
  653. @keyframes iconRotate1 {
  654. from {
  655. transform: rotate(30deg);
  656. }
  657. to {
  658. transform: rotate(-30deg);
  659. }
  660. }
  661. }
  662. .control-right-box {
  663. width: 100px;
  664. color: #fff;
  665. height: 80px;
  666. justify-content: space-between;
  667. align-items: center;
  668. .btn {
  669. margin-bottom: 30px;
  670. }
  671. }
  672. }
  673. }
  674. .left-box {
  675. height: calc(100%);
  676. overflow-x: hidden;
  677. overflow-y: auto;
  678. pointer-events: auto;
  679. direction: rtl;
  680. .left-container {
  681. direction: ltr;
  682. }
  683. .control-item {
  684. height: 36px;
  685. }
  686. }
  687. }
  688. }
  689. }
  690. .tab-button-box {
  691. display: inline-block;
  692. position: relative;
  693. padding: 5px;
  694. // border: 1px transparent solid;
  695. border-radius: 5px;
  696. margin-left: 8px;
  697. margin-right: 8px;
  698. width: auto;
  699. // height: 40px;
  700. // border: 1px solid #65dbea;
  701. height: 35px !important;
  702. display: flex;
  703. align-items: center;
  704. justify-content: center;
  705. color: #fff;
  706. padding: 0 15px 5px 15px;
  707. cursor: pointer;
  708. &:hover {
  709. background: linear-gradient(#2cd1ff55, #1eb0ff55);
  710. }
  711. &::before {
  712. width: calc(100% - 6px);
  713. height: 27px;
  714. content: '';
  715. position: absolute;
  716. top: 3px;
  717. right: 0;
  718. left: 3px;
  719. bottom: 0;
  720. z-index: -1;
  721. border-radius: inherit; /*important*/
  722. background: linear-gradient(#1fa6cb, #127cb5);
  723. }
  724. &::after {
  725. width: calc(100% + 32px);
  726. height: 10px;
  727. content: '';
  728. position: absolute;
  729. top: 28px;
  730. right: 0;
  731. left: -16px;
  732. bottom: 0;
  733. z-index: -1;
  734. border-radius: inherit; /*important*/
  735. background: url('/@/assets/images/vent/short-light.png') no-repeat;
  736. background-position: center;
  737. background-size: 100%;
  738. z-index: 999;
  739. }
  740. }
  741. .tab-button-box-active {
  742. border: 1px solid #66989e !important;
  743. &:hover {
  744. background: none !important;
  745. }
  746. &::before {
  747. background: linear-gradient(#1fa6cbcc, #127cb5cc) !important;
  748. }
  749. }
  750. </style>