nitrogenHome_bet.vue 28 KB

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