nitrogenHome1.vue 26 KB

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