nitrogenHome_bet.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954
  1. <template>
  2. <div id="nitrogen3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"></div>
  3. <div
  4. id="nitrogenCss3D"
  5. class="threejs-Object-CSS"
  6. style="width: 100%; height: 100%; position: absolute; pointer-events: none; overflow: hidden; z-index: 2; top: 0px; left: 0px"
  7. >
  8. <a-spin :spinning="loading" />
  9. <template>
  10. <div v-for="groupNum in monitorDataGroupNum" :key="groupNum" class="modal-monitor">
  11. <fourBorderBg :class="`kyj${groupNum}`" :id="`nitrogenMonitor${groupNum}`">
  12. <div class="title">
  13. {{ monitorData[groupNum - 1]['strname'] }}
  14. <span :style="{ color: monitorData[groupNum - 1]['AirCompressor_Status'] == '1' ? '#67fc00' : '#e9170b' }">
  15. {{ monitorData[groupNum - 1]['AirCompressor_Status'] == '1' ? '运行' : '停止' }}
  16. </span>
  17. </div>
  18. <div class="monitor-item">
  19. <span class="monitor-title">排气压力:</span>
  20. <span class="monitor-val" v-if="!refresh"
  21. ><span class="val">{{
  22. monitorData[groupNum - 1]['AirCompressor_ExhaustPre'] ? monitorData[groupNum - 1]['AirCompressor_ExhaustPre'] : '-'
  23. }}</span>
  24. <span class="unit">kPa</span></span
  25. >
  26. </div>
  27. <div class="monitor-item">
  28. <span class="monitor-title">累计流量:</span>
  29. <span class="monitor-val" v-if="!refresh"
  30. ><span class="val">{{
  31. monitorData[groupNum - 1]['FluxTotal1'] ? parseFloat(monitorData[groupNum - 1]['FluxTotal1']).toFixed(2) : '-'
  32. }}</span
  33. ><span class="unit">m³</span></span
  34. >
  35. </div>
  36. <div class="monitor-item">
  37. <span class="monitor-title">氮气纯度:</span>
  38. <span class="monitor-val" v-if="!refresh"
  39. ><span class="val">{{
  40. monitorData[groupNum - 1]['NitrogenPurity'] ? parseFloat(monitorData[groupNum - 1]['NitrogenPurity']).toFixed(2) : '-'
  41. }}</span>
  42. <span class="unit">%</span></span
  43. >
  44. </div>
  45. <div class="monitor-item">
  46. <span class="monitor-title">运行时间:</span>
  47. <span class="monitor-val" v-if="!refresh"
  48. ><span class="val">{{
  49. monitorData[groupNum - 1]['AirCompressor_RunTime'] ? monitorData[groupNum - 1]['AirCompressor_RunTime'] : '-'
  50. }}</span
  51. ><span class="unit">h</span></span
  52. >
  53. </div>
  54. <div class="monitor-item">
  55. <span class="monitor-title">加载时间:</span>
  56. <span class="monitor-val" v-if="!refresh"
  57. ><span class="val">{{
  58. monitorData[groupNum - 1]['AirCompressor_LoadTime'] ? monitorData[groupNum - 1]['AirCompressor_LoadTime'] : '-'
  59. }}</span
  60. ><span class="unit">h</span></span
  61. >
  62. </div>
  63. </fourBorderBg>
  64. </div>
  65. <div class="modal-monitor">
  66. <fourBorderBg id="downWindMonitor">
  67. <div class="title">下风测监测 </div>
  68. <div class="monitor-item" v-for="(data, index) in downWindData" :key="index">
  69. <span class="monitor-title">{{ data.title }} :</span>
  70. <span class="monitor-val" v-if="!refresh"
  71. ><span class="val">
  72. {{
  73. monitorData.length > 0 && monitorData[0][data.code]
  74. ? data.raw
  75. ? monitorData[0][data.code]
  76. : parseFloat(monitorData[0][data.code]).toFixed(2)
  77. : '-'
  78. }}
  79. </span>
  80. <span class="unit">{{ data.unit }}</span></span
  81. >
  82. </div>
  83. </fourBorderBg>
  84. </div>
  85. </template>
  86. </div>
  87. <div class="nitrogen-home">
  88. <div class="nitrogen-container">
  89. <div v-if="monitorNetStatus == 0" class="device-state">网络断开</div>
  90. <div class="top-box">
  91. <!-- 左边监测数据 -->
  92. <div class="lr-box left-box">
  93. <div class="item item-l" v-for="groupNum in monitorDataGroupNum" :key="groupNum">
  94. <ventBox1>
  95. <template #title>
  96. <div>{{ monitorData[groupNum - 1]['strname'] }}</div>
  97. </template>
  98. <template #container>
  99. <div class="monitor-box">
  100. <div class="parameter-title group-parameter-title">
  101. <SvgIcon class="icon" size="38" name="device-group-paramer" /><span>机组参数</span>
  102. </div>
  103. <div class="state-item" v-for="(data, index) in groupParameterData" :key="index">
  104. <div class="item-col">
  105. <span class="state-title">{{ Object.values(data)[0] }} :</span>
  106. <span class="state-val">{{
  107. (monitorData.length > 0 && monitorData[groupNum - 1][Object.keys(data)[0]]) >= 0
  108. ? monitorData[groupNum - 1][Object.keys(data)[0]]
  109. ? parseFloat(monitorData[groupNum - 1][Object.keys(data)[0]]).toFixed(2)
  110. : '-'
  111. : '-'
  112. }}</span>
  113. </div>
  114. <div class="item-col" v-if="Object.keys(data)[1]">
  115. <span class="state-title">{{ Object.values(data)[1] }} :</span>
  116. <span class="state-val">{{
  117. (monitorData.length > 0 && monitorData[groupNum - 1][Object.keys(data)[1]]) >= 0
  118. ? monitorData[groupNum - 1][Object.keys(data)[1]]
  119. ? parseFloat(monitorData[groupNum - 1][Object.keys(data)[1]]).toFixed(2)
  120. : '-'
  121. : '-'
  122. }}</span>
  123. </div>
  124. </div>
  125. </div>
  126. <div class="monitor-box">
  127. <div class="parameter-title device-parameter-title">
  128. <SvgIcon class="icon" size="32" name="device-paramer" /><span>空压机数据</span>
  129. </div>
  130. <div class="state-item" v-for="(data, index) in deviceParameterData" :key="index">
  131. <div class="item-col">
  132. <span class="state-title">{{ Object.values(data)[0] }} :</span>
  133. <span class="state-val">{{
  134. (monitorData.length > 0 && monitorData[groupNum - 1][Object.keys(data)[0]]) >= 0
  135. ? monitorData[groupNum - 1][Object.keys(data)[0]]
  136. : '-'
  137. }}</span>
  138. </div>
  139. <div class="item-col" v-if="Object.keys(data)[1]">
  140. <span class="state-title">{{ Object.values(data)[1] }} :</span>
  141. <span class="state-val">{{
  142. (monitorData.length > 0 && monitorData[groupNum - 1][Object.keys(data)[1]]) >= 0
  143. ? monitorData[groupNum - 1][Object.keys(data)[1]]
  144. : '-'
  145. }}</span>
  146. </div>
  147. </div>
  148. </div>
  149. </template>
  150. </ventBox1>
  151. </div>
  152. <div class="item item-l">
  153. <!-- <ventBox1 class="vent-margin-t-10">
  154. <template #title>
  155. <div>下风侧详情</div>
  156. </template>
  157. <template #container>
  158. <div class="monitor-box">
  159. <div class="state-item" v-for="(data, index) in downWindData" :key="index">
  160. <div class="item-col">
  161. <span class="state-title">{{ Object.values(data)[0] }} :</span>
  162. <span class="state-val">{{
  163. (monitorData.length > 0 && monitorData[0][Object.keys(data)[0]]) >= 0
  164. ? monitorData[0][Object.keys(data)[0]] ? parseFloat(monitorData[0][Object.keys(data)[0]]).toFixed(2) : '-'
  165. : '-'
  166. }}</span>
  167. </div>
  168. <div class="item-col" v-if="Object.keys(data)[1]">
  169. <span class="state-title">{{ Object.values(data)[1] }} :</span>
  170. <span class="state-val">{{
  171. (monitorData.length > 0 && monitorData[0][Object.keys(data)[1]]) >= 0
  172. ? monitorData[0][Object.keys(data)[1]] ? parseFloat(monitorData[0][Object.keys(data)[1]]).toFixed(2) : '-'
  173. : '-'
  174. }}</span>
  175. </div>
  176. </div>
  177. </div>
  178. </template>
  179. </ventBox1> -->
  180. </div>
  181. </div>
  182. <!-- 右边控制状态 -->
  183. <div class="lr-box right-box">
  184. <ventBox1>
  185. <template #title>
  186. <div>远程控制</div>
  187. </template>
  188. <template #container>
  189. <div class="control-group">
  190. <div class="control-item" v-for="(groupNum, index) in monitorDataGroupNum" :key="groupNum">
  191. <div class="control-item-title">{{ monitorData[groupNum - 1]['strname'] }}</div>
  192. <div class="control-item-state">
  193. <a-button
  194. disabled
  195. v-if="index == 0"
  196. size="small"
  197. type="text"
  198. style="color: #fff"
  199. @click="handlerDevice(airCompressorState[groupNum - 1], false)"
  200. >一键启停</a-button
  201. >
  202. <a-button
  203. disabled
  204. v-else
  205. size="small"
  206. type="text"
  207. style="color: #fff"
  208. @click="handlerDevice(airCompressorState[groupNum - 1], false)"
  209. >一键启停</a-button
  210. >
  211. </div>
  212. </div>
  213. <div class="control-item" v-for="(groupNum, index) in monitorDataGroupNum" :key="groupNum">
  214. <div class="control-item-title">{{ monitorData[groupNum - 1]['strname'] }}</div>
  215. <div class="control-item-state">
  216. <a-button
  217. disabled
  218. v-if="index == 0"
  219. size="small"
  220. type="text"
  221. style="color: #fff"
  222. @click="handlerDevice(airCompressorState[groupNum - 1], true)"
  223. >一键复位</a-button
  224. >
  225. <a-button
  226. disabled
  227. v-else
  228. size="small"
  229. type="text"
  230. style="color: #fff"
  231. @click="handlerDevice(airCompressorState[groupNum - 1], true)"
  232. >一键复位</a-button
  233. >
  234. </div>
  235. </div>
  236. </div>
  237. </template>
  238. </ventBox1>
  239. <ventBox1 class="vent-margin-t-10">
  240. <template #title>
  241. <div>设备实时监测曲线</div>
  242. </template>
  243. <template #container>
  244. <BarAndLine
  245. v-if="chartsColumns.length > 0"
  246. xAxisPropType="readTime"
  247. :dataSource="echartData"
  248. height="300px"
  249. :chartsColumns="chartsColumns"
  250. :option="echatsOption"
  251. />
  252. </template>
  253. </ventBox1>
  254. </div>
  255. <div ref="playerRef" class="player-box"></div>
  256. </div>
  257. </div>
  258. </div>
  259. <HandleModal :modal-is-show="modalIsShow" :modal-title="modalTitle" :modal-type="modalType" @handle-ok="handleOK" @handle-cancel="handleCancel" />
  260. </template>
  261. <script lang="ts" setup name="nitrogenHome">
  262. import { onMounted, onUnmounted, ref, watch, reactive, defineProps, nextTick, inject, onBeforeUnmount } from 'vue';
  263. import ventBox1 from '/@/components/vent/ventBox1.vue';
  264. import fourBorderBg from '../../../comment/components/fourBorderBg.vue';
  265. import { mountedThree, destroy, setModelType } from '../nitrogen.threejs';
  266. import { getDevice } from '../nitrogen.api';
  267. import { SvgIcon } from '/@/components/Icon';
  268. import BarAndLine from '/@/components/chart/BarAndLine.vue';
  269. import HandleModal from './modal.vue';
  270. import { deviceControlApi } from '/@/api/vent/index';
  271. import { groupParameterData, deviceParameterData, downWindData } from '../nitrogen.data';
  272. import { message } from 'ant-design-vue';
  273. import lodash from 'lodash';
  274. import { useCamera } from '/@/hooks/system/useCamera';
  275. import dayjs from 'dayjs';
  276. import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
  277. const globalConfig = inject('globalConfig');
  278. const props = defineProps({
  279. deviceId: {
  280. type: String,
  281. require: true,
  282. },
  283. modalType: {
  284. type: String,
  285. require: true,
  286. },
  287. });
  288. const playerRef = ref();
  289. const refresh = ref(false);
  290. const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
  291. const modalType = ref(''); // 模态框内容显示类型,设备操作类型
  292. const modalIsShow = ref<boolean>(false); // 是否显示模态框
  293. const loading = ref(true);
  294. let kzParam = reactive<any>({
  295. data: {},
  296. isFw: null,
  297. });
  298. // const kyjs = ['1号空压机', '1号空压机', '1号空压机', '1号空压机'];
  299. const flvURL1 = () => {
  300. // return `https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv`;
  301. return '';
  302. };
  303. const colors = ['#FDB146', '#EE6666', '#9BCB75', '#03C2EC', '#DA3914', '#9C83D9'];
  304. const echatsOption = {
  305. grid: {
  306. top: '35%',
  307. left: '15%',
  308. right: '20px',
  309. bottom: '8%',
  310. // containLabel: true
  311. },
  312. toolbox: {
  313. feature: {},
  314. },
  315. };
  316. const monitorNetStatus = ref(0);
  317. const monitorDataGroupNum = ref(0);
  318. let airCompressorState = reactive<any[]>([]);
  319. const chartsColumns = ref(getTableHeaderColumns('sys_nitrogen_chart'));
  320. // const propTypeArr = ref([]);
  321. // watch(monitorDataGroupNum, () => {
  322. // const arr = <any[]>[]
  323. // const item = getTableHeaderColumns('sys_nitrogen_chart')
  324. // const propTypeList = []
  325. // for (let i = 1; i <= monitorDataGroupNum.value; i++) {
  326. // const lineType = lodash.cloneDeep(item[0])
  327. // lineType.legend = `制氮机${i}瞬时流量`;
  328. // lineType.dataIndex = `${item[0].dataIndex}${i}`
  329. // lineType.color = colors[i - 1]
  330. // arr.push(lineType)
  331. // }
  332. // chartsColumns.value = arr
  333. // })
  334. const monitorData = ref(
  335. new Array(3).fill({
  336. // strName: '空压机',
  337. // cumulativeFlow: '-',
  338. // centerTemperature: '-',
  339. // outletTemperature: '-',
  340. })
  341. );
  342. //图表数据
  343. let echartData = ref<any>([]);
  344. const { getCamera, removeCamera } = useCamera();
  345. // https获取监测数据
  346. let timer: null | NodeJS.Timeout = null;
  347. async function getMonitor(flag?) {
  348. if (Object.prototype.toString.call(timer) === '[object Null]') {
  349. timer = await setTimeout(
  350. async () => {
  351. if (props.deviceId) {
  352. await getDataSource(props.deviceId, flag);
  353. }
  354. if (timer) {
  355. timer = null;
  356. }
  357. await getMonitor();
  358. },
  359. flag ? 0 : 3000
  360. );
  361. }
  362. }
  363. async function getDataSource(systemID, flag = false) {
  364. const res = await getDevice({ devicetype: 'sys', systemID, type: 'all' });
  365. if (res) {
  366. const result = res;
  367. if (!result || result.msgTxt.length < 1) return;
  368. result.msgTxt.forEach((item) => {
  369. if (item.type && item.type.startsWith('nitrogen')) {
  370. airCompressorState.length = 0;
  371. let netStatus = 0;
  372. monitorData.value = item['datalist'].filter((data) => {
  373. const readData = data.readData;
  374. if (data['netStatus'] == 1) {
  375. netStatus = 1;
  376. }
  377. airCompressorState.push({
  378. id: data.deviceID,
  379. deviceType: data.deviceType,
  380. HMIReset: readData.HMIReset,
  381. HMIStartStop: readData.HMIStartStop,
  382. });
  383. return Object.assign(data, readData);
  384. });
  385. monitorNetStatus.value = netStatus;
  386. // console.log(monitorData,'monitorData.value---===')
  387. const airCompressor = {
  388. readTime: monitorData.value[0]['readTime'] ? monitorData.value[0]['readTime'].substring(11) : dayjs().format('HH:mm:ss'),
  389. };
  390. const dataArr = lodash.cloneDeep(echartData.value);
  391. //图表数据
  392. if (dataArr.length <= 5) {
  393. monitorData.value.forEach((el, index) => {
  394. airCompressor[`InputFlux${index + 1}`] = el['InputFlux'] || 0;
  395. });
  396. dataArr.push(airCompressor);
  397. } else {
  398. dataArr.shift();
  399. dataArr.push(airCompressor);
  400. }
  401. echartData.value = dataArr;
  402. }
  403. });
  404. if (flag) monitorDataGroupNum.value = monitorData.value.length;
  405. refresh.value = true;
  406. nextTick(() => {
  407. refresh.value = false;
  408. });
  409. }
  410. }
  411. function handlerDevice(data, bol) {
  412. // console.log(bol, 'bol-------')
  413. kzParam.data = data;
  414. kzParam.isFw = bol;
  415. // console.log(kzParam, 'kz--------')
  416. if (bol) {
  417. modalTitle.value = '一键复位';
  418. modalType.value = '1';
  419. modalIsShow.value = true;
  420. kzParam.data.HMIReset = !data.HMIReset;
  421. } else {
  422. modalTitle.value = '一键启停';
  423. modalType.value = '2';
  424. modalIsShow.value = true;
  425. kzParam.data.HMIStartStop = !data.HMIStartStop;
  426. }
  427. }
  428. function handleOK(passWord, handlerState) {
  429. // console.log(kzParam, 'kz----------');
  430. // if (passWord !== '123456') {
  431. // message.warning('密码不正确,请重新输入');
  432. // return;
  433. // }
  434. let data = {};
  435. if (kzParam.isFw) {
  436. data = {
  437. deviceid: kzParam.data.id,
  438. devicetype: kzParam.data.deviceType,
  439. password: passWord,
  440. HMIReset: kzParam.data.HMIReset,
  441. };
  442. } else {
  443. data = {
  444. deviceid: kzParam.data.id,
  445. password: passWord,
  446. devicetype: kzParam.data.deviceType,
  447. HMIStartStop: kzParam.data.HMIStartStop,
  448. };
  449. }
  450. deviceControlApi(data).then((res) => {
  451. // 模拟时开启
  452. if (res.success) {
  453. modalIsShow.value = false;
  454. getDataSource(props.deviceId);
  455. if (globalConfig.History_Type == 'remote') {
  456. message.success('指令已下发至生产管控平台成功!');
  457. } else {
  458. message.success('指令已下发成功!');
  459. }
  460. }
  461. });
  462. }
  463. function handleCancel() {
  464. modalIsShow.value = false;
  465. modalTitle.value = '';
  466. modalType.value = '';
  467. }
  468. watch([monitorDataGroupNum, loading], ([newMonitorDataGroupNum, newLoading]) => {
  469. nextTick(() => {
  470. if (newMonitorDataGroupNum && !newLoading) {
  471. setModelType(props.modalType, newMonitorDataGroupNum);
  472. }
  473. });
  474. });
  475. watch(
  476. () => props.deviceId,
  477. async (deviceId) => {
  478. if (deviceId) {
  479. await getCamera(deviceId, playerRef.value, 'nitrogen');
  480. getDataSource(props.deviceId, true);
  481. }
  482. }
  483. );
  484. onBeforeUnmount(() => {
  485. removeCamera();
  486. });
  487. onMounted(async () => {
  488. await getMonitor(true);
  489. await mountedThree().then(() => {
  490. loading.value = false;
  491. });
  492. await getCamera(props.deviceId, playerRef.value, 'nitrogen');
  493. });
  494. onUnmounted(() => {
  495. destroy();
  496. removeCamera();
  497. if (timer) {
  498. clearTimeout(timer);
  499. timer = undefined;
  500. }
  501. });
  502. </script>
  503. <style lang="less" scoped>
  504. @import '/@/design/theme.less';
  505. @ventSpace: zxm;
  506. .nitrogen-box {
  507. width: 100%;
  508. height: 100%;
  509. display: flex;
  510. justify-content: center;
  511. }
  512. #nitrogenCss3D {
  513. .modal-monitor {
  514. width: 200px;
  515. position: absolute;
  516. left: 0px;
  517. top: 0px;
  518. }
  519. &:deep(.win) {
  520. margin: 0 !important;
  521. background: #00000044;
  522. }
  523. }
  524. .nitrogen-home {
  525. width: 100%;
  526. height: 100%;
  527. position: fixed;
  528. z-index: 9999;
  529. display: flex;
  530. flex-direction: column;
  531. justify-content: center;
  532. align-items: center;
  533. pointer-events: none;
  534. top: 20px;
  535. .nitrogen-container {
  536. width: 100%;
  537. height: calc(100% - 100px);
  538. display: flex;
  539. justify-content: space-between;
  540. margin-bottom: 100px;
  541. position: relative;
  542. .device-state {
  543. width: 100%;
  544. position: absolute;
  545. top: 80px;
  546. color: #e90000;
  547. display: flex;
  548. justify-content: center;
  549. font-size: 20px;
  550. }
  551. .top-box {
  552. width: 100%;
  553. padding: 10px;
  554. overflow: hidden;
  555. display: flex;
  556. justify-content: space-between;
  557. position: relative;
  558. // margin-top: 40px;
  559. .lr-box {
  560. height: 100%;
  561. display: flex;
  562. flex-direction: column;
  563. position: relative;
  564. // overflow: hidden;
  565. z-index: 9999;
  566. pointer-events: auto;
  567. overflow-y: auto;
  568. overflow-x: hidden;
  569. height: calc(100% - 70px);
  570. }
  571. .item {
  572. width: 335px;
  573. height: auto;
  574. position: relative;
  575. border-radius: 5px;
  576. margin-top: 10px;
  577. margin-bottom: 0px;
  578. pointer-events: auto;
  579. color: #fff;
  580. // overflow: hidden;
  581. &:first-child {
  582. margin-top: 0px;
  583. }
  584. .base-title {
  585. color: #fff;
  586. margin-bottom: 8px;
  587. padding-left: 10px;
  588. position: relative;
  589. font-size: 16px;
  590. &::after {
  591. content: '';
  592. position: absolute;
  593. display: block;
  594. width: 4px;
  595. height: 12px;
  596. top: 7px;
  597. left: 0px;
  598. background: #45d3fd;
  599. border-radius: 4px;
  600. }
  601. }
  602. .state-item {
  603. display: flex;
  604. flex-direction: row;
  605. padding: 5px;
  606. .item-col {
  607. width: calc(50% - 5px);
  608. display: flex;
  609. justify-content: center;
  610. align-items: center;
  611. padding-right: 4px;
  612. background-image: linear-gradient(to right, #39a3ff00, #39a3ff10);
  613. &:first-child {
  614. margin-right: 10px;
  615. }
  616. .state-title {
  617. color: #ffffffcc;
  618. flex: 9;
  619. font-size: 14px;
  620. }
  621. .state-val {
  622. flex: 1;
  623. color: #00eefffe;
  624. margin-right: 5px;
  625. text-align: right;
  626. font-size: 14px;
  627. }
  628. }
  629. }
  630. .signal-box {
  631. margin: 5px 0;
  632. display: flex;
  633. align-items: center;
  634. .signal-title {
  635. color: #7af5ff;
  636. margin: 0 5px;
  637. }
  638. &:last-child {
  639. margin-right: 0px;
  640. }
  641. }
  642. .list-item {
  643. padding: 0 10px;
  644. display: flex;
  645. justify-content: space-between;
  646. align-items: center;
  647. .item-data-key {
  648. color: #ffffff99;
  649. }
  650. }
  651. .item-data-box {
  652. color: #fff;
  653. .state-icon {
  654. display: inline-block;
  655. width: 12px;
  656. height: 12px;
  657. border-radius: 12px;
  658. }
  659. .open {
  660. border: 5px solid #133a56;
  661. background: #4ecb73;
  662. }
  663. .close {
  664. border: 5px solid #192961;
  665. background: #6d7898;
  666. }
  667. }
  668. }
  669. .item-l {
  670. width: 100%;
  671. .monitor-box {
  672. width: 100%;
  673. .parameter-title {
  674. position: relative;
  675. width: 100%;
  676. height: 14px;
  677. margin-top: 10px;
  678. .icon,
  679. span {
  680. position: absolute;
  681. top: -10px;
  682. }
  683. }
  684. .group-parameter-title {
  685. background-image: linear-gradient(to right, #39a3ff50, #39a3ff00);
  686. .icon {
  687. left: -12px;
  688. top: -17px;
  689. }
  690. span {
  691. left: 18px;
  692. }
  693. .item-col {
  694. background-image: linear-gradient(to right, #39a3ff00, #39a3ff10);
  695. }
  696. }
  697. .device-parameter-title {
  698. background-image: linear-gradient(to right, #3df6ff40, #3df6ff00);
  699. .icon {
  700. left: -10px;
  701. top: -14px;
  702. }
  703. span {
  704. left: 18px;
  705. }
  706. .item-col {
  707. background-image: linear-gradient(to right, #3df6ff10, #3df6ff00);
  708. }
  709. }
  710. }
  711. }
  712. .right-box {
  713. width: 310px;
  714. margin-top: 50px;
  715. .control-group {
  716. display: flex;
  717. // justify-content: space-around;
  718. flex-wrap: wrap;
  719. .control-item {
  720. width: 50%; //lxh
  721. display: flex;
  722. flex-direction: column;
  723. justify-content: center;
  724. align-items: center;
  725. padding: 0 4px;
  726. .control-item-title {
  727. color: #a6dce9;
  728. position: relative;
  729. top: 5px;
  730. }
  731. .control-item-state {
  732. width: 94px;
  733. height: 47px;
  734. background: url('/@/assets/images/vent/control-switch-bg.png');
  735. display: flex;
  736. justify-content: center;
  737. align-items: center;
  738. color: #fff;
  739. }
  740. .button-box {
  741. position: relative;
  742. padding: 5px;
  743. border: 1px transparent solid;
  744. background-clip: border-box;
  745. border-radius: 5px;
  746. margin-left: 8px;
  747. }
  748. .a-button {
  749. pointer-events: auto;
  750. }
  751. &::v-deep .a-button--mini {
  752. padding: 6px 10px;
  753. }
  754. &::v-deep .a-button--mini.is-round {
  755. padding: 6px 10px;
  756. }
  757. }
  758. }
  759. }
  760. .left-box {
  761. width: 365px;
  762. margin-top: 80px;
  763. }
  764. }
  765. .player-box {
  766. position: absolute;
  767. height: 100%;
  768. width: 100%;
  769. padding: 0 20px 0 20px;
  770. z-index: 9999;
  771. display: flex;
  772. align-items: end;
  773. :deep(#LivePlayerBox) {
  774. display: flex;
  775. justify-content: end;
  776. }
  777. }
  778. &:deep(.win) {
  779. width: 100%;
  780. margin: 0 !important;
  781. }
  782. }
  783. }
  784. &:deep(.main) {
  785. .title {
  786. height: 34px;
  787. text-align: center;
  788. font-weight: 600;
  789. color: #7af5ff;
  790. // background-image: url('../../../assets/img/yfj/light.png');
  791. background-repeat: no-repeat;
  792. background-position-x: center;
  793. background-position-y: 100%;
  794. background-size: 80%;
  795. font-size: 16px;
  796. }
  797. .monitor-item {
  798. width: 200px;
  799. display: flex;
  800. flex-direction: row;
  801. width: auto;
  802. margin-bottom: 3px;
  803. .monitor-val {
  804. color: #ffb700;
  805. display: flex;
  806. width: auto;
  807. .val {
  808. width: 80px;
  809. font-size: 14px;
  810. }
  811. .unit {
  812. color: #ffffffbb;
  813. font-size: 14px;
  814. }
  815. }
  816. }
  817. .monitor-title {
  818. width: 100px;
  819. color: #7af5ff;
  820. font-weight: 400;
  821. font-size: 14px;
  822. }
  823. .signal-item {
  824. display: flex;
  825. justify-content: space-between;
  826. // margin-bottom: 5px;
  827. .signal-round {
  828. display: inline-block;
  829. width: 8px;
  830. height: 8px;
  831. border-radius: 50%;
  832. margin: 0 10px;
  833. position: relative;
  834. &::after {
  835. display: block;
  836. content: '';
  837. position: absolute;
  838. width: 12px;
  839. height: 12px;
  840. top: -2px;
  841. left: -2px;
  842. border-radius: 50%;
  843. }
  844. }
  845. .signal-round-gry {
  846. background-color: #858585;
  847. &::after {
  848. background-color: #85858544;
  849. box-shadow: 0 0 1px 1px #85858599;
  850. }
  851. }
  852. .signal-round-run {
  853. background-color: #67fc00;
  854. &::after {
  855. background-color: #67fc0044;
  856. box-shadow: 0 0 1px 1px #c6ff77;
  857. }
  858. }
  859. .signal-round-warning {
  860. background-color: #e9170b;
  861. &::after {
  862. background-color: #e9170b44;
  863. box-shadow: 0 0 1px 1px #e9170b;
  864. }
  865. }
  866. }
  867. }
  868. :deep(.zxm-radio-wrapper) {
  869. color: #fff !important;
  870. }
  871. </style>