nitrogenHome_bet.vue 29 KB

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