index.vue 22 KB

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