nitrogenHome_bet.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945
  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. :option="echatsOption"
  244. />
  245. </template>
  246. </ventBox1>
  247. </div>
  248. <div ref="playerRef" class="player-box"></div>
  249. </div>
  250. </div>
  251. </div>
  252. <HandleModal :modal-is-show="modalIsShow" :modal-title="modalTitle" :modal-type="modalType" @handle-ok="handleOK" @handle-cancel="handleCancel" />
  253. </template>
  254. <script lang="ts" setup name="nitrogenHome">
  255. import { onMounted, onUnmounted, ref, watch, reactive, defineProps, nextTick, inject, onBeforeUnmount } from 'vue';
  256. import ventBox1 from '/@/components/vent/ventBox1.vue';
  257. import fourBorderBg from '../../../comment/components/fourBorderBg.vue';
  258. import { mountedThree, destroy, setModelType } from '../nitrogen.threejs';
  259. import { getDevice } from '../nitrogen.api';
  260. import { SvgIcon } from '/@/components/Icon';
  261. import BarAndLine from '/@/components/chart/BarAndLine.vue';
  262. import HandleModal from './modal.vue';
  263. import { deviceControlApi } from '/@/api/vent/index';
  264. import { groupParameterData, deviceParameterData, downWindData } from '../nitrogen.data';
  265. import { message } from 'ant-design-vue';
  266. import lodash from 'lodash';
  267. import { useCamera } from '/@/hooks/system/useCamera';
  268. import dayjs from 'dayjs';
  269. import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
  270. const globalConfig = inject('globalConfig');
  271. const props = defineProps({
  272. deviceId: {
  273. type: String,
  274. require: true,
  275. },
  276. modalType: {
  277. type: String,
  278. require: true,
  279. },
  280. });
  281. const playerRef = ref();
  282. const refresh = ref(false);
  283. const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
  284. const modalType = ref(''); // 模态框内容显示类型,设备操作类型
  285. const modalIsShow = ref<boolean>(false); // 是否显示模态框
  286. const loading = ref(true);
  287. let kzParam = reactive<any>({
  288. data: {},
  289. isFw: null,
  290. });
  291. // const kyjs = ['1号空压机', '1号空压机', '1号空压机', '1号空压机'];
  292. const flvURL1 = () => {
  293. // return `https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv`;
  294. return '';
  295. };
  296. const colors = ['#FDB146', '#EE6666', '#9BCB75', '#03C2EC', '#DA3914', '#9C83D9'];
  297. const echatsOption = {
  298. grid: {
  299. top: '35%',
  300. left: '15%',
  301. right: '20px',
  302. bottom: '8%',
  303. // containLabel: true
  304. },
  305. toolbox: {
  306. feature: {},
  307. },
  308. };
  309. const monitorNetStatus = ref(0);
  310. const monitorDataGroupNum = ref(0);
  311. let airCompressorState = reactive<any[]>([]);
  312. const chartsColumns = ref(getTableHeaderColumns('sys_nitrogen_chart'));
  313. // const propTypeArr = ref([]);
  314. // watch(monitorDataGroupNum, () => {
  315. // const arr = <any[]>[]
  316. // const item = getTableHeaderColumns('sys_nitrogen_chart')
  317. // const propTypeList = []
  318. // for (let i = 1; i <= monitorDataGroupNum.value; i++) {
  319. // const lineType = lodash.cloneDeep(item[0])
  320. // lineType.legend = `制氮机${i}瞬时流量`;
  321. // lineType.dataIndex = `${item[0].dataIndex}${i}`
  322. // lineType.color = colors[i - 1]
  323. // arr.push(lineType)
  324. // }
  325. // chartsColumns.value = arr
  326. // })
  327. const monitorData = ref(
  328. new Array(3).fill({
  329. // strName: '空压机',
  330. // cumulativeFlow: '-',
  331. // centerTemperature: '-',
  332. // outletTemperature: '-',
  333. })
  334. );
  335. //图表数据
  336. let echartData = ref<any>([]);
  337. const { getCamera, removeCamera } = useCamera();
  338. // https获取监测数据
  339. let timer: null | NodeJS.Timeout = null;
  340. async function getMonitor(flag?) {
  341. if (Object.prototype.toString.call(timer) === '[object Null]') {
  342. timer = await setTimeout(
  343. async () => {
  344. if (props.deviceId) {
  345. await getDataSource(props.deviceId, flag);
  346. }
  347. if (timer) {
  348. timer = null;
  349. }
  350. await getMonitor();
  351. },
  352. flag ? 0 : 3000
  353. );
  354. }
  355. }
  356. async function getDataSource(systemID, flag = false) {
  357. const res = await getDevice({ devicetype: 'sys', systemID, type: 'all' });
  358. if (res) {
  359. const result = res;
  360. if (!result || result.msgTxt.length < 1) return;
  361. result.msgTxt.forEach((item) => {
  362. if (item.type && item.type.startsWith('nitrogen')) {
  363. airCompressorState.length = 0;
  364. let netStatus = 0;
  365. monitorData.value = item['datalist'].filter((data) => {
  366. const readData = data.readData;
  367. if (data['netStatus'] == 1) {
  368. netStatus = 1;
  369. }
  370. airCompressorState.push({
  371. id: data.deviceID,
  372. deviceType: data.deviceType,
  373. HMIReset: readData.HMIReset,
  374. HMIStartStop: readData.HMIStartStop,
  375. });
  376. return Object.assign(data, readData);
  377. });
  378. monitorNetStatus.value = netStatus;
  379. // console.log(monitorData,'monitorData.value---===')
  380. const airCompressor = {
  381. readTime: monitorData.value[0]['readTime'] ? monitorData.value[0]['readTime'].substring(11) : dayjs().format('HH:mm:ss'),
  382. };
  383. const dataArr = lodash.cloneDeep(echartData.value);
  384. //图表数据
  385. if (dataArr.length <= 5) {
  386. monitorData.value.forEach((el, index) => {
  387. airCompressor[`InputFlux${index + 1}`] = el['InputFlux'] || 0;
  388. });
  389. dataArr.push(airCompressor);
  390. } else {
  391. dataArr.shift();
  392. dataArr.push(airCompressor);
  393. }
  394. echartData.value = dataArr;
  395. }
  396. });
  397. if (flag) monitorDataGroupNum.value = monitorData.value.length;
  398. refresh.value = true;
  399. nextTick(() => {
  400. refresh.value = false;
  401. });
  402. }
  403. }
  404. function handlerDevice(data, bol) {
  405. // console.log(bol, 'bol-------')
  406. kzParam.data = data;
  407. kzParam.isFw = bol;
  408. // console.log(kzParam, 'kz--------')
  409. if (bol) {
  410. modalTitle.value = '一键复位';
  411. modalType.value = '1';
  412. modalIsShow.value = true;
  413. kzParam.data.HMIReset = !data.HMIReset;
  414. } else {
  415. modalTitle.value = '一键启停';
  416. modalType.value = '2';
  417. modalIsShow.value = true;
  418. kzParam.data.HMIStartStop = !data.HMIStartStop;
  419. }
  420. }
  421. function handleOK(passWord, handlerState) {
  422. // console.log(kzParam, 'kz----------');
  423. // if (passWord !== '123456') {
  424. // message.warning('密码不正确,请重新输入');
  425. // return;
  426. // }
  427. let data = {};
  428. if (kzParam.isFw) {
  429. data = {
  430. deviceid: kzParam.data.id,
  431. devicetype: kzParam.data.deviceType,
  432. password: passWord,
  433. HMIReset: kzParam.data.HMIReset,
  434. };
  435. } else {
  436. data = {
  437. deviceid: kzParam.data.id,
  438. password: passWord,
  439. devicetype: kzParam.data.deviceType,
  440. HMIStartStop: kzParam.data.HMIStartStop,
  441. };
  442. }
  443. deviceControlApi(data).then((res) => {
  444. // 模拟时开启
  445. if (res.success) {
  446. modalIsShow.value = false;
  447. getDataSource(props.deviceId);
  448. if (globalConfig.History_Type == 'remote') {
  449. message.success('指令已下发至生产管控平台成功!');
  450. } else {
  451. message.success('指令已下发成功!');
  452. }
  453. }
  454. });
  455. }
  456. function handleCancel() {
  457. modalIsShow.value = false;
  458. modalTitle.value = '';
  459. modalType.value = '';
  460. }
  461. watch([monitorDataGroupNum, loading], ([newMonitorDataGroupNum, newLoading]) => {
  462. nextTick(() => {
  463. if (newMonitorDataGroupNum && !newLoading) {
  464. setModelType(props.modalType, newMonitorDataGroupNum);
  465. }
  466. });
  467. });
  468. watch(
  469. () => props.deviceId,
  470. async (deviceId) => {
  471. if (deviceId) {
  472. await getCamera(deviceId, playerRef.value, 'nitrogen');
  473. getDataSource(props.deviceId, true);
  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. @import '/@/design/theme.less';
  498. @ventSpace: zxm;
  499. .nitrogen-box {
  500. width: 100%;
  501. height: 100%;
  502. display: flex;
  503. justify-content: center;
  504. }
  505. #nitrogenCss3D {
  506. .modal-monitor {
  507. width: 200px;
  508. position: absolute;
  509. left: 0px;
  510. top: 0px;
  511. }
  512. &:deep(.win) {
  513. margin: 0 !important;
  514. background: #00000044;
  515. }
  516. }
  517. .nitrogen-home {
  518. width: 100%;
  519. height: 100%;
  520. position: fixed;
  521. z-index: 9999;
  522. display: flex;
  523. flex-direction: column;
  524. justify-content: center;
  525. align-items: center;
  526. pointer-events: none;
  527. top: 20px;
  528. .nitrogen-container {
  529. width: 100%;
  530. height: calc(100% - 100px);
  531. display: flex;
  532. justify-content: space-between;
  533. margin-bottom: 100px;
  534. position: relative;
  535. .device-state {
  536. width: 100%;
  537. position: absolute;
  538. top: 80px;
  539. color: #e90000;
  540. display: flex;
  541. justify-content: center;
  542. font-size: 20px;
  543. }
  544. .top-box {
  545. width: 100%;
  546. padding: 10px;
  547. overflow: hidden;
  548. display: flex;
  549. justify-content: space-between;
  550. position: relative;
  551. // margin-top: 40px;
  552. .lr-box {
  553. height: 100%;
  554. display: flex;
  555. flex-direction: column;
  556. position: relative;
  557. // overflow: hidden;
  558. z-index: 9999;
  559. pointer-events: auto;
  560. overflow-y: auto;
  561. overflow-x: hidden;
  562. height: calc(100% - 70px);
  563. }
  564. .item {
  565. width: 335px;
  566. height: auto;
  567. position: relative;
  568. border-radius: 5px;
  569. margin-top: 10px;
  570. margin-bottom: 0px;
  571. pointer-events: auto;
  572. color: #fff;
  573. // overflow: hidden;
  574. &:first-child {
  575. margin-top: 0px;
  576. }
  577. .base-title {
  578. color: #fff;
  579. margin-bottom: 8px;
  580. padding-left: 10px;
  581. position: relative;
  582. font-size: 16px;
  583. &::after {
  584. content: '';
  585. position: absolute;
  586. display: block;
  587. width: 4px;
  588. height: 12px;
  589. top: 7px;
  590. left: 0px;
  591. background: #45d3fd;
  592. border-radius: 4px;
  593. }
  594. }
  595. .state-item {
  596. display: flex;
  597. flex-direction: row;
  598. padding: 5px;
  599. .item-col {
  600. width: calc(50% - 5px);
  601. display: flex;
  602. justify-content: center;
  603. align-items: center;
  604. padding-right: 4px;
  605. background-image: linear-gradient(to right, #39a3ff00, #39a3ff10);
  606. &:first-child {
  607. margin-right: 10px;
  608. }
  609. .state-title {
  610. color: #ffffffcc;
  611. flex: 9;
  612. font-size: 14px;
  613. }
  614. .state-val {
  615. flex: 1;
  616. color: #00eefffe;
  617. margin-right: 5px;
  618. text-align: right;
  619. font-size: 14px;
  620. }
  621. }
  622. }
  623. .signal-box {
  624. margin: 5px 0;
  625. display: flex;
  626. align-items: center;
  627. .signal-title {
  628. color: #7af5ff;
  629. margin: 0 5px;
  630. }
  631. &:last-child {
  632. margin-right: 0px;
  633. }
  634. }
  635. .list-item {
  636. padding: 0 10px;
  637. display: flex;
  638. justify-content: space-between;
  639. align-items: center;
  640. .item-data-key {
  641. color: #ffffff99;
  642. }
  643. }
  644. .item-data-box {
  645. color: #fff;
  646. .state-icon {
  647. display: inline-block;
  648. width: 12px;
  649. height: 12px;
  650. border-radius: 12px;
  651. }
  652. .open {
  653. border: 5px solid #133a56;
  654. background: #4ecb73;
  655. }
  656. .close {
  657. border: 5px solid #192961;
  658. background: #6d7898;
  659. }
  660. }
  661. }
  662. .item-l {
  663. width: 100%;
  664. .monitor-box {
  665. width: 100%;
  666. .parameter-title {
  667. position: relative;
  668. width: 100%;
  669. height: 14px;
  670. margin-top: 10px;
  671. .icon,
  672. span {
  673. position: absolute;
  674. top: -10px;
  675. }
  676. }
  677. .group-parameter-title {
  678. background-image: linear-gradient(to right, #39a3ff50, #39a3ff00);
  679. .icon {
  680. left: -12px;
  681. top: -17px;
  682. }
  683. span {
  684. left: 18px;
  685. }
  686. .item-col {
  687. background-image: linear-gradient(to right, #39a3ff00, #39a3ff10);
  688. }
  689. }
  690. .device-parameter-title {
  691. background-image: linear-gradient(to right, #3df6ff40, #3df6ff00);
  692. .icon {
  693. left: -10px;
  694. top: -14px;
  695. }
  696. span {
  697. left: 18px;
  698. }
  699. .item-col {
  700. background-image: linear-gradient(to right, #3df6ff10, #3df6ff00);
  701. }
  702. }
  703. }
  704. }
  705. .right-box {
  706. width: 310px;
  707. margin-top: 50px;
  708. .control-group {
  709. display: flex;
  710. // justify-content: space-around;
  711. flex-wrap: wrap;
  712. .control-item {
  713. width: 50%; //lxh
  714. display: flex;
  715. flex-direction: column;
  716. justify-content: center;
  717. align-items: center;
  718. padding: 0 4px;
  719. .control-item-title {
  720. color: #a6dce9;
  721. position: relative;
  722. top: 5px;
  723. }
  724. .control-item-state {
  725. width: 94px;
  726. height: 47px;
  727. background: url('/@/assets/images/vent/control-switch-bg.png');
  728. display: flex;
  729. justify-content: center;
  730. align-items: center;
  731. color: #fff;
  732. }
  733. .button-box {
  734. position: relative;
  735. padding: 5px;
  736. border: 1px transparent solid;
  737. background-clip: border-box;
  738. border-radius: 5px;
  739. margin-left: 8px;
  740. }
  741. .a-button {
  742. pointer-events: auto;
  743. }
  744. &::v-deep .a-button--mini {
  745. padding: 6px 10px;
  746. }
  747. &::v-deep .a-button--mini.is-round {
  748. padding: 6px 10px;
  749. }
  750. }
  751. }
  752. }
  753. .left-box {
  754. width: 365px;
  755. margin-top: 80px;
  756. }
  757. }
  758. .player-box {
  759. position: absolute;
  760. height: 100%;
  761. width: 100%;
  762. padding: 0 20px 0 20px;
  763. z-index: 9999;
  764. display: flex;
  765. align-items: end;
  766. :deep(#LivePlayerBox) {
  767. display: flex;
  768. justify-content: end;
  769. }
  770. }
  771. &:deep(.win) {
  772. width: 100%;
  773. margin: 0 !important;
  774. }
  775. }
  776. }
  777. &:deep(.main) {
  778. .title {
  779. height: 34px;
  780. text-align: center;
  781. font-weight: 600;
  782. color: #7af5ff;
  783. // background-image: url('../../../assets/img/yfj/light.png');
  784. background-repeat: no-repeat;
  785. background-position-x: center;
  786. background-position-y: 100%;
  787. background-size: 80%;
  788. font-size: 16px;
  789. }
  790. .monitor-item {
  791. width: 200px;
  792. display: flex;
  793. flex-direction: row;
  794. width: auto;
  795. margin-bottom: 3px;
  796. .monitor-val {
  797. color: #ffb700;
  798. display: flex;
  799. width: auto;
  800. .val {
  801. width: 80px;
  802. font-size: 14px;
  803. }
  804. .unit {
  805. color: #ffffffbb;
  806. font-size: 14px;
  807. }
  808. }
  809. }
  810. .monitor-title {
  811. width: 100px;
  812. color: #7af5ff;
  813. font-weight: 400;
  814. font-size: 14px;
  815. }
  816. .signal-item {
  817. display: flex;
  818. justify-content: space-between;
  819. // margin-bottom: 5px;
  820. .signal-round {
  821. display: inline-block;
  822. width: 8px;
  823. height: 8px;
  824. border-radius: 50%;
  825. margin: 0 10px;
  826. position: relative;
  827. &::after {
  828. display: block;
  829. content: '';
  830. position: absolute;
  831. width: 12px;
  832. height: 12px;
  833. top: -2px;
  834. left: -2px;
  835. border-radius: 50%;
  836. }
  837. }
  838. .signal-round-gry {
  839. background-color: #858585;
  840. &::after {
  841. background-color: #85858544;
  842. box-shadow: 0 0 1px 1px #85858599;
  843. }
  844. }
  845. .signal-round-run {
  846. background-color: #67fc00;
  847. &::after {
  848. background-color: #67fc0044;
  849. box-shadow: 0 0 1px 1px #c6ff77;
  850. }
  851. }
  852. .signal-round-warning {
  853. background-color: #e9170b;
  854. &::after {
  855. background-color: #e9170b44;
  856. box-shadow: 0 0 1px 1px #e9170b;
  857. }
  858. }
  859. }
  860. }
  861. :deep(.zxm-radio-wrapper) {
  862. color: #fff !important;
  863. }
  864. </style>