index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689
  1. <template>
  2. <div class="device-box" id="monitorBox">
  3. <a-tabs class="tabs-box" type="card" v-model:activeKey="activeKey" @change="tabChange" id="tabsBox" v-if="isRefresh">
  4. <a-tab-pane key="1" tab="实时监测">
  5. <template v-if="deviceType == 'fan' && activeKey == '1'">
  6. <GroupMonitorTable :dataSource="dataSource" :columnsType="`${deviceType}_monitor`" />
  7. </template>
  8. <template v-else-if="activeKey == '1' && deviceType">
  9. <template v-if="hasPermission('btn:noGb') && deviceType.startsWith('safetymonitor')">
  10. <MonitorTable
  11. ref="monitorTable"
  12. :columnsType="`${deviceType}_monitor`"
  13. :dataSource="dataSource"
  14. design-scope="device_monitor"
  15. :isShowPagination="false"
  16. :isShowActionColumn="false"
  17. :is-show-select="false"
  18. :form-config="deviceType == 'safetymonitor' && sysOrgCode != 'zjtzqctmk' ? formConfig : undefined"
  19. title="设备监测"
  20. :scroll="{ y: 650 }"
  21. :defSort="defSort"
  22. sortDataIndex="strinstallpos"
  23. >
  24. <template #filterCell="{ column, record }">
  25. <template v-if="deviceType.startsWith('safetymonitor')">
  26. <div v-if="!record.devicename && column.dataIndex === 'devicename'">-</div>
  27. <div v-if="!record.V && column.dataIndex === 'V'">-</div>
  28. <div v-if="!record.PointUnit && column.dataIndex === 'PointUnit'">-</div>
  29. <div v-if="!record.highRange && column.dataIndex === 'highRange'">-</div>
  30. <div v-if="!record.lowRange && column.dataIndex === 'lowRange'">-</div>
  31. <div v-if="!record.dataTypeName && column.dataIndex === 'dataTypeName'">-</div>
  32. </template>
  33. <a-tag v-if="column.dataIndex === 'exceptionType_str'" :color="record.exceptionType_str == '正常' ? 'green' : '#f00'">
  34. {{ record.exceptionType_str == '正常' ? '正常' : '异常' }}</a-tag
  35. >
  36. <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '1' ? 'green' : '#f00'">{{
  37. record.netStatus == '1' ? '正常' : '异常'
  38. }}</a-tag>
  39. <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : '#f00'">{{
  40. record.warnFlag == '0' ? '正常' : '异常'
  41. }}</a-tag>
  42. </template>
  43. </MonitorTable>
  44. </template>
  45. <template v-else>
  46. <MonitorTable
  47. ref="monitorTable"
  48. :columnsType="`${deviceType}_monitor`"
  49. :dataSource="dataSource"
  50. design-scope="device_monitor"
  51. :isShowPagination="false"
  52. :isShowActionColumn="false"
  53. :is-show-select="false"
  54. :form-config="deviceType == 'safetymonitor' && sysOrgCode != 'zjtzqctmk' ? formConfig : undefined"
  55. title="设备监测"
  56. :scroll="{ y: 650 }"
  57. :defSort="defSort"
  58. sortDataIndex="strinstallpos"
  59. >
  60. <template #filterCell="{ column, record }">
  61. <template v-if="deviceType.startsWith('safetymonitor')">
  62. <div v-if="!record.devicename && column.dataIndex === 'devicename'">-</div>
  63. <div v-if="!record.V && column.dataIndex === 'V'">-</div>
  64. <div v-if="!record.PointUnit && column.dataIndex === 'PointUnit'">-</div>
  65. <div v-if="!record.highRange && column.dataIndex === 'highRange'">-</div>
  66. <div v-if="!record.lowRange && column.dataIndex === 'lowRange'">-</div>
  67. <div v-if="!record.dataTypeName && column.dataIndex === 'dataTypeName'">-</div>
  68. </template>
  69. <a-tag v-if="column.dataIndex === 'exceptionType_str'" :color="record.exceptionType_str == '正常' ? 'green' : '#f00'">
  70. {{ record.exceptionType_str == '正常' ? '正常' : '异常' }}</a-tag
  71. >
  72. <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '1' ? 'green' : '#f00'">{{
  73. record.netStatus == '1' ? '正常' : '异常'
  74. }}</a-tag>
  75. <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : '#f00'">{{
  76. record.warnFlag == '0' ? '正常' : '异常'
  77. }}</a-tag>
  78. </template>
  79. </MonitorTable>
  80. </template>
  81. <!-- <MonitorTable
  82. ref="monitorTable"
  83. :columnsType="`${deviceType}_monitor`"
  84. :dataSource="dataSource"
  85. design-scope="device_monitor"
  86. :isShowPagination="false"
  87. :isShowActionColumn="isHaveNoAction.includes(deviceType.split('_')[0]) ? false : true"
  88. :is-show-select="false"
  89. title="设备监测"
  90. :form-config="deviceType == 'safetymonitor' && sysOrgCode != 'zjtzqctmk' ? formConfig : undefined"
  91. :scroll="{ y: 650 }"
  92. > -->
  93. </template>
  94. <!-- 图表 -->
  95. <!-- <div style="width:100%;height:280px;margin: 20px 0px;">
  96. <BarAndLine v-if="deviceType == 'windrect'" xAxisPropType="strname" :dataSource="dataSource" height="100%"
  97. :chartsColumns="chartsColumnsRect" chartsType="" :option="echartsOption" />
  98. <BarAndLine v-else-if="deviceType == 'fanlocal'" xAxisPropType="strname" :dataSource="dataSource" height="100%"
  99. :chartsColumns="chartsColumnsFan" chartsType="" :option="echartsOption" />
  100. <BarAndLine v-else-if="deviceType == 'fanmain'" xAxisPropType="strname" :dataSource="dataSource" height="100%"
  101. :chartsColumns="chartsColumnsMain" chartsType="" :option="echartsOption" />
  102. <BarAndLine v-else-if="deviceType == 'fiber'" xAxisPropType="strname" :dataSource="dataSource" height="100%"
  103. :chartsColumns="chartsColumnsFiber" chartsType="" :option="echartsOption" />
  104. <BarAndLine v-else-if="deviceType == 'obfurage'" xAxisPropType="strname" :dataSource="dataSource" height="100%"
  105. :chartsColumns="chartsColumnsObf" chartsType="" :option="echartsOption" />
  106. <BarAndLine v-else-if="deviceType == 'bundletube'" xAxisPropType="strname" :dataSource="dataSource"
  107. height="100%" :chartsColumns="chartsColumnsBun" chartsType="" :option="echartsOption" />
  108. <BarAndLine v-else xAxisPropType="strname" :dataSource="dataSource" height="100%"
  109. :chartsColumns="chartsColumnsreal" chartsType="" :option="echartsOption" />
  110. </div> -->
  111. </a-tab-pane>
  112. <a-tab-pane key="2" tab="历史数据">
  113. <div class="tab-item">
  114. <HistoryTable
  115. ref="historyTable"
  116. v-if="activeKey == '2'"
  117. :columns-type="`${deviceType}`"
  118. :device-type="deviceType"
  119. designScope="device-history"
  120. />
  121. </div>
  122. <!-- 图表 -->
  123. <!-- <div v-if="alive" style="width:100%;height:280px;margin: 20px 0px;">
  124. <BarAndLine v-if="deviceType == 'windrect'" xAxisPropType="gdevicename" :dataSource="dataSourceHis"
  125. height="100%" :chartsColumns="chartsColumnsRect" chartsType="" :option="echartsOption" />
  126. <BarAndLine v-else-if="deviceType == 'fanlocal'" xAxisPropType="gdevicename" :dataSource="dataSourceHis"
  127. height="100%" :chartsColumns="chartsColumnsFan" chartsType="" :option="echartsOption" />
  128. <BarAndLine v-else-if="deviceType == 'fanmain'" xAxisPropType="gdevicename" :dataSource="dataSourceHis"
  129. height="100%" :chartsColumns="chartsColumnsMain" chartsType="" :option="echartsOption" />
  130. <BarAndLine v-else-if="deviceType == 'fiber'" xAxisPropType="gdevicename" :dataSource="dataSourceHis"
  131. height="100%" :chartsColumns="chartsColumnsFiber" chartsType="" :option="echartsOption" />
  132. <BarAndLine v-else-if="deviceType == 'obfurage'" xAxisPropType="gdevicename" :dataSource="dataSourceHis"
  133. height="100%" :chartsColumns="chartsColumnsObf" chartsType="" :option="echartsOption" />
  134. <BarAndLine v-else-if="deviceType == 'bundletube'" xAxisPropType="gdevicename" :dataSource="dataSourceHis"
  135. height="100%" :chartsColumns="chartsColumnsBun" chartsType="" :option="echartsOption" />
  136. <BarAndLine v-else xAxisPropType="gdevicename" :dataSource="dataSourceHis" height="100%"
  137. :chartsColumns="chartsColumnsreal" chartsType="" :option="echartsOption" />
  138. </div> -->
  139. </a-tab-pane>
  140. <template v-if="!hasPermission('safety:hideWarning')">
  141. <a-tab-pane key="3" tab="报警历史">
  142. <div class="tab-item">
  143. <AlarmHistoryTable
  144. ref="alarmHistoryTable"
  145. v-if="activeKey == '3' && deviceType == 'safetymonitor'"
  146. columns-type="alarm"
  147. :list="safetyList"
  148. :device-type="deviceType"
  149. :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, pageSize: 10000 })"
  150. designScope="alarm-history"
  151. />
  152. </div>
  153. </a-tab-pane>
  154. </template>
  155. <template v-else>
  156. <a-tab-pane key="3" tab="报警历史">
  157. <div class="tab-item">
  158. <AlarmHistoryCommentTable
  159. v-if="activeKey == '3' && deviceType != 'safetymonitor'"
  160. columns-type="alarm"
  161. :device-type="deviceType"
  162. :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, pageSize: 10000 })"
  163. designScope="alarm-history"
  164. />
  165. </div>
  166. </a-tab-pane>
  167. </template>
  168. <a-tab-pane key="4" tab="操作历史" v-if="deviceType !== 'safetymonitor' && deviceType !== 'wasichoufang'">
  169. <div class="tab-item">
  170. <HandlerHistoryTable
  171. ref="handlerHistoryTable"
  172. v-if="activeKey == '4'"
  173. columns-type="operator_history"
  174. :device-type="deviceType"
  175. :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, pageSize: 10000 })"
  176. designScope="operator-history"
  177. />
  178. </div>
  179. </a-tab-pane>
  180. <a-tab-pane key="5" tab="报警分析" v-if="!hasPermission('safety:hideWarning') && deviceType == 'safetymonitor'">
  181. <div class="tab-item">
  182. <safetyWarnAnalysis :device-type="deviceType" />
  183. </div>
  184. </a-tab-pane>
  185. </a-tabs>
  186. <div class="right-btn-group" v-if="deviceType.startsWith('safetymonitor')">
  187. <div class="update-btn">
  188. <span>同步分站:</span>
  189. <a-select
  190. v-model:value="subStation"
  191. :options="subStationOptions"
  192. placeholder="同步分站"
  193. size="large"
  194. :fieldNames="{ label: 'strinstallpos', value: 'id' }"
  195. style="width: 150px"
  196. />
  197. <div class="btn btn1" @click="updateSubstation">确定</div>
  198. </div>
  199. <div class="export-btn"><div class="btn btn1" @click="exportData" v-if="!hasPermission('safety:hideWarning')">一键导出</div></div>
  200. <div class="export-btn m-l-20px" v-if="!hasPermission('safety:hideWarning')"
  201. ><div class="btn btn2" @click="goSystem"><send-outlined />安全监控系统</div></div
  202. >
  203. </div>
  204. </div>
  205. </template>
  206. <script setup lang="ts">
  207. import { ref, onMounted, onUnmounted, shallowRef, defineProps, watch, inject, unref } from 'vue';
  208. import { list, getDeviceList, safetyList, getExportUrl, subStationList, initSubStation } from './safety.api';
  209. import AlarmHistoryCommentTable from '../comment/AlarmHistoryTable.vue';
  210. import safetyWarnAnalysis from '../comment/safetyWarnAnalysis.vue';
  211. import AlarmHistoryTable from './AlarmHistoryTable.vue';
  212. import HistoryTable from './HistoryTable.vue';
  213. import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
  214. import MonitorTable from '../comment/MonitorTable.vue';
  215. import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
  216. import { useRouter } from 'vue-router';
  217. import { formConfig, isHaveNoAction } from './safety.data';
  218. import { getDictItemsByCode } from '/@/utils/dict';
  219. import { usePermission } from '/@/hooks/web/usePermission';
  220. import { useGlobSetting } from '/@/hooks/setting';
  221. import { useMethods } from '/@/hooks/system/useMethods';
  222. import { message } from 'ant-design-vue';
  223. import { SendOutlined } from '@ant-design/icons-vue';
  224. import { template } from 'lodash-es';
  225. const { sysOrgCode } = useGlobSetting();
  226. const { hasPermission } = usePermission();
  227. const globalConfig = inject('globalConfig');
  228. const { handleExportXls } = useMethods();
  229. // import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
  230. // const echartsOption = {
  231. // grid: {
  232. // top: '60px',
  233. // left: '10px',
  234. // right: '25px',
  235. // bottom: '5%',
  236. // containLabel: true,
  237. // },
  238. // toolbox: {
  239. // feature: {},
  240. // },
  241. // };
  242. // let alive = ref(true)
  243. type DeviceType = { deviceType: string; deviceName: string; datalist: any[] };
  244. const props = defineProps({
  245. pageData: {
  246. type: Object,
  247. default: () => {},
  248. },
  249. });
  250. const scroll = {
  251. y: 360,
  252. };
  253. const defSort = {
  254. column: 'strinstallpos',
  255. order: 'desc',
  256. };
  257. const monitorTable = ref();
  258. const historyTable = ref();
  259. const alarmHistoryTable = ref();
  260. const handlerHistoryTable = ref();
  261. const isRefresh = ref(true);
  262. const activeKey = ref('1'); // tab key
  263. const dataSource = shallowRef([]); // 实时监测数据
  264. const deviceType = ref(''); // 监测设备类型
  265. const subStation = ref('');
  266. const subStationOptions = ref([]);
  267. // let dataSourceHis = shallowRef([])//历史数据
  268. //历史数据
  269. async function changeHis(data) {
  270. // alive.value = false
  271. // nextTick(() => {
  272. // dataSourceHis = data
  273. // alive.value = true
  274. // })
  275. }
  276. async function tabChange(activeKeyVal) {
  277. activeKey.value = activeKeyVal;
  278. if (activeKey.value != '1') {
  279. if (timer != undefined) {
  280. clearTimeout(timer);
  281. timer = undefined;
  282. }
  283. } else {
  284. timer = null;
  285. await getMonitor(true);
  286. }
  287. }
  288. // https获取监测数据
  289. let timer: null | NodeJS.Timeout = null;
  290. function getMonitor(flag?) {
  291. if (deviceType.value) {
  292. if (timer) timer = null;
  293. if (Object.prototype.toString.call(timer) === '[object Null]') {
  294. timer = setTimeout(
  295. async () => {
  296. await getDataSource();
  297. if (timer) {
  298. getMonitor();
  299. }
  300. },
  301. flag ? 0 : 1000
  302. );
  303. }
  304. }
  305. }
  306. async function getDataSource() {
  307. const formData = monitorTable.value.getForm();
  308. const res = await list({ devicetype: deviceType.value, filterParams: { ...formData.getFieldsValue() } });
  309. if (res.msgTxt.length > 0) {
  310. dataSource.value = [];
  311. let dataArr = res.msgTxt[0].datalist || [];
  312. dataArr.filter((data: any) => {
  313. const readData = data.readData;
  314. return Object.assign(data, readData);
  315. });
  316. if (deviceType.value == 'safetymonitor') {
  317. // 如果是安全监控的数据时需要过滤常见设备数据,根据设定的常用安全监控字典去匹配
  318. let dictCodes = getDictItemsByCode('safetynormal');
  319. const searchForm = formData.getFieldsValue();
  320. if (searchForm && searchForm['dataTypeName'] && dictCodes && dictCodes.length > 0) {
  321. const tempData = [];
  322. const tempData1 = [];
  323. for (let i = 0; i < dataArr.length; i++) {
  324. const item = dataArr[i];
  325. let flag = false;
  326. for (let i = 0; i < dictCodes.length; i++) {
  327. const dict = dictCodes[i];
  328. if (dict['value'] == item['dataTypeName']) {
  329. flag = true;
  330. }
  331. }
  332. if (flag) {
  333. tempData.push(item);
  334. } else {
  335. tempData1.push(item);
  336. }
  337. }
  338. if (sysOrgCode == 'zjtzqctmk' || hasPermission('btn:noGb')) {
  339. dataSource.value = [...tempData, ...tempData1];
  340. } else {
  341. dataSource.value = [...tempData];
  342. }
  343. } else {
  344. dataSource.value = dataArr;
  345. }
  346. } else {
  347. dataSource.value = dataArr;
  348. }
  349. } else {
  350. dataSource.value = [];
  351. }
  352. }
  353. async function getSubstation() {
  354. const list: [] = await subStationList({ monitorparam: 'safetymonitor*' });
  355. subStationOptions.value = list;
  356. if (list.length > 0) {
  357. subStation.value = list[0]['id'];
  358. }
  359. }
  360. function exportData() {
  361. handleExportXls('安全监控导出', getExportUrl);
  362. }
  363. function goSystem() {
  364. if (VENT_PARAM['safetyCrlPlatformUrl']) {
  365. window.open(VENT_PARAM['safetyCrlPlatformUrl'], '_blank');
  366. return;
  367. }
  368. }
  369. function updateSubstation() {
  370. if (subStation.value) {
  371. initSubStation({ substationID: subStation.value }).then(() => {
  372. message.success('分站同步完成!');
  373. });
  374. } else {
  375. message.warning('请选择分站!');
  376. }
  377. }
  378. onMounted(async () => {
  379. const { currentRoute } = useRouter();
  380. if (unref(currentRoute)) {
  381. const path = unref(currentRoute).path;
  382. if (path) {
  383. deviceType.value = path.substring(path.lastIndexOf('/') + 1);
  384. }
  385. await getMonitor(true);
  386. await getSubstation();
  387. }
  388. });
  389. onUnmounted(() => {
  390. if (timer) {
  391. clearTimeout(timer);
  392. }
  393. timer = undefined;
  394. });
  395. </script>
  396. <style lang="less" scoped>
  397. @import '/@/design/theme.less';
  398. @import '/@/design/vent/modal.less';
  399. @ventSpace: zxm;
  400. .device-box {
  401. width: 100%;
  402. height: calc(100% - 100px);
  403. padding-bottom: 10px;
  404. margin-top: 20px;
  405. display: flex;
  406. justify-content: center;
  407. .tabs-box {
  408. width: calc(100% - 12px) !important;
  409. height: 100% !important;
  410. bottom: 3px !important;
  411. }
  412. .device-button-group {
  413. position: absolute;
  414. top: -30px;
  415. display: flex;
  416. width: 100%;
  417. .device-button {
  418. height: 26px;
  419. padding: 0 20px;
  420. background: linear-gradient(45deg, #04e6fb55, #0c5cab55);
  421. clip-path: polygon(10px 0, 0 50%, 10px 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  422. display: flex;
  423. justify-content: center;
  424. align-items: center;
  425. color: #fff;
  426. position: relative;
  427. cursor: pointer;
  428. &:nth-child(1) {
  429. left: calc(-6px * 1);
  430. }
  431. &:nth-child(2) {
  432. left: calc(-6px * 2);
  433. }
  434. &:nth-child(3) {
  435. left: calc(-6px * 3);
  436. }
  437. &:nth-child(4) {
  438. left: calc(-6px * 4);
  439. }
  440. &:nth-child(5) {
  441. left: calc(-6px * 5);
  442. }
  443. &:nth-child(6) {
  444. left: calc(-6px * 6);
  445. }
  446. &:nth-child(7) {
  447. left: calc(-6px * 7);
  448. }
  449. &:nth-child(8) {
  450. left: calc(-6px * 8);
  451. }
  452. &:nth-child(9) {
  453. left: calc(-6px * 9);
  454. }
  455. &:nth-child(10) {
  456. left: calc(-6px * 10);
  457. }
  458. &:nth-child(11) {
  459. left: calc(-6px * 11);
  460. }
  461. &:nth-child(12) {
  462. left: calc(-6px * 12);
  463. }
  464. &:nth-child(13) {
  465. left: calc(-6px * 13);
  466. }
  467. &:nth-child(14) {
  468. left: calc(-6px * 14);
  469. }
  470. &:nth-child(15) {
  471. left: calc(-6px * 15);
  472. }
  473. &:first-child {
  474. clip-path: polygon(0 0, 10px 50%, 0 100%, 100% 100%, calc(100% - 10px) 50%, 100% 0);
  475. }
  476. }
  477. .device-active {
  478. background: linear-gradient(45deg, #04e6fb, #0c5cab);
  479. &::before {
  480. border-color: #0efcff;
  481. box-shadow: 1px 1px 3px 1px #0efcff inset;
  482. }
  483. }
  484. }
  485. .enter-detail {
  486. color: #fff;
  487. cursor: pointer;
  488. position: absolute;
  489. right: 120px;
  490. top: -6px;
  491. padding: 5px;
  492. border-radius: 5px;
  493. margin-left: 8px;
  494. margin-right: 8px;
  495. width: auto;
  496. height: 33px !important;
  497. display: flex;
  498. align-items: center;
  499. justify-content: center;
  500. color: #fff;
  501. padding: 5px 15px 5px 15px;
  502. cursor: pointer;
  503. &:hover {
  504. background: var(--vent-modal-bg2);
  505. }
  506. &::before {
  507. width: calc(100% - 6px);
  508. height: 27px;
  509. content: '';
  510. position: absolute;
  511. top: 3px;
  512. right: 0;
  513. left: 3px;
  514. bottom: 0;
  515. z-index: -1;
  516. border-radius: inherit;
  517. /*important*/
  518. background: linear-gradient(#1fa6cb, #127cb5);
  519. }
  520. }
  521. }
  522. .right-btn-group {
  523. position: absolute;
  524. color: #fff;
  525. right: 20px;
  526. display: flex;
  527. .export-btn {
  528. }
  529. .update-btn {
  530. margin-right: 10px;
  531. display: flex;
  532. align-items: center;
  533. .btn {
  534. background: var(--vent-modal-bg2);
  535. }
  536. }
  537. .btn {
  538. padding: 8px 20px;
  539. position: relative;
  540. border-radius: 2px;
  541. color: #fff;
  542. width: fit-content;
  543. cursor: pointer;
  544. &::before {
  545. position: absolute;
  546. display: block;
  547. content: '';
  548. width: calc(100% - 4px);
  549. height: calc(100% - 4px);
  550. top: 2px;
  551. left: 2px;
  552. border-radius: 2px;
  553. z-index: -1;
  554. }
  555. }
  556. .btn1 {
  557. border: 1px solid var(--vent-btn-primary-border-color);
  558. &::before {
  559. background-image: linear-gradient(#2effee92, #0cb1d592);
  560. }
  561. &:hover {
  562. border: 1px solid #5cfaffaa;
  563. &::before {
  564. background-image: linear-gradient(#2effee72, #0cb1d572);
  565. }
  566. }
  567. }
  568. .btn2 {
  569. border: 1px solid var(--vent-btn-primary-border-color);
  570. background-image: linear-gradient(#2effee92, #0cb1d592);
  571. &:hover {
  572. border: 1px solid var(--vent-btn-primary-focus-color);
  573. background-image: linear-gradient(#0cb0d554, rgba(46, 255, 238, 0.342));
  574. }
  575. }
  576. }
  577. :deep(.@{ventSpace}-tabs-tabpane-active) {
  578. height: 100%;
  579. border: 1px solid var(--vent-device-manager-box-border);
  580. border-radius: 2px;
  581. -webkit-backdrop-filter: blur(8px);
  582. box-shadow: 0 0 20px #44b4ff33 inset;
  583. background-color: var(--vent-device-manager-box-bg);
  584. overflow-y: auto;
  585. }
  586. :deep(.@{ventSpace}-tabs-card) {
  587. .@{ventSpace}-tabs-tab {
  588. background: var(--vent-modal-bg2);
  589. border-color: var(--vent-btn-primary-border-color);
  590. border-radius: 0%;
  591. &:hover {
  592. color: #64d5ff;
  593. }
  594. }
  595. .@{ventSpace}-tabs-content {
  596. height: 100% !important;
  597. }
  598. .@{ventSpace}-tabs-tab.@{ventSpace}-tabs-tab-active .@{ventSpace}-tabs-tab-btn {
  599. color: var(--vent-font-action-link);
  600. }
  601. .@{ventSpace}-tabs-nav::before {
  602. border-color: var(--vent-btn-primary-border-color);
  603. }
  604. .@{ventSpace}-picker,
  605. .@{ventSpace}-select-selector {
  606. width: 100%;
  607. background: #00000017 !important;
  608. border: 1px solid @vent-form-item-border !important;
  609. input,
  610. .@{ventSpace}-select-selection-item,
  611. .@{ventSpace}-picker-suffix {
  612. color: #fff !important;
  613. }
  614. .@{ventSpace}-select-selection-placeholder {
  615. color: #b7b7b7 !important;
  616. }
  617. }
  618. .@{ventSpace}-pagination-next,
  619. .action,
  620. .@{ventSpace}-select-arrow,
  621. .@{ventSpace}-picker-separator {
  622. color: #fff !important;
  623. }
  624. }
  625. </style>