nitrogenHome1.vue 24 KB

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