index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696
  1. <template>
  2. <div class="visualization-container">
  3. <!-- 头部标题区域 -->
  4. <div class="top-title-container u-flex-jac">
  5. <div class="title-content">
  6. <span class="text" :data-attr="titleName">{{ titleName }}</span>
  7. </div>
  8. </div>
  9. <!-- 报警按钮 -->
  10. <div class="alarm-btn u-flex-jac" @click="clickAlarmBtn">
  11. <div>故障<br />报警</div>
  12. </div>
  13. <!-- 数据内容区域 -->
  14. <div class="content-container u-flex">
  15. <!-- 左侧区域 -->
  16. <div class="left-container">
  17. <div class="left-top-con">
  18. <!-- 左上 -->
  19. <common-title title="预制曲线" @click="showModal"></common-title>
  20. <div class="visualization-common-border">
  21. <yuzhi-curve :data="yuzhiData" :marks="yuzhiMarkData" ref="yuzhiCurve"></yuzhi-curve>
  22. </div>
  23. </div>
  24. <div class="left-center-con">
  25. <!-- 左中 -->
  26. <common-title title="实时曲线" @click="showModal"></common-title>
  27. <div class="visualization-common-border">
  28. <real-time-curve :data="realTimeData" ref="realTimeCurve"></real-time-curve>
  29. </div>
  30. </div>
  31. <div class="left-bottom-con">
  32. <!-- 左下 -->
  33. <!-- <test-information></test-information> -->
  34. <common-title title="全程曲线" @click="showModal"></common-title>
  35. <div class="visualization-common-border">
  36. <full-curve :data="fullData" ref="fullCurve"></full-curve>
  37. </div>
  38. </div>
  39. </div>
  40. <!-- 中间部分 -->
  41. <div class="center-container">
  42. <!-- 中上 -->
  43. <div class="important">
  44. <!-- 顶部信息+3D -->
  45. <alarm-modal-list ref="alarmList"></alarm-modal-list>
  46. <info-3D :data="eqRealData"></info-3D>
  47. </div>
  48. <div class="centen-bottom-con u-flex-jab">
  49. <!-- 中下 -->
  50. <div class="center-bottom-left">
  51. <running-state :data="eqRealData" @click="handleXunhuan"></running-state>
  52. </div>
  53. <div class="center-bottom-right">
  54. <mode-info :data="eqRealData"></mode-info>
  55. </div>
  56. </div>
  57. </div>
  58. <!-- 右侧区域 -->
  59. <div class="right-container">
  60. <div class="right-top-con">
  61. <!-- 右上 -->
  62. <equipment-info :data="eqRealData" :alarmData="newAlarmData"></equipment-info>
  63. </div>
  64. <div class="right-center-con">
  65. <!-- 右中 -->
  66. <surveillance-video :data="eqRealData"></surveillance-video>
  67. </div>
  68. <div class="right-bottom-con">
  69. <!-- 右下 -->
  70. <test-status-info :data="eqRealData"></test-status-info>
  71. </div>
  72. </div>
  73. </div>
  74. <j-modal :title="title" :visible="visible" @cancel="curveClose" cancelText="关闭" class="u-modal-box">
  75. <div v-if="title === '全程曲线'" class="table-page-search-wrapper">
  76. <a-form layout="inline" @keyup.enter.native="searchQuery">
  77. <a-row :gutter="24">
  78. <a-col :lg="18" :md="12" style="width: 400px">
  79. <a-form-item label="试验开始时间">
  80. <j-date
  81. placeholder="请选择试验开始时间"
  82. v-model="queryParam.starttime"
  83. :show-time="true"
  84. date-format="YYYY-MM-DD HH:mm:ss"
  85. style="width: 100%"
  86. />
  87. </a-form-item>
  88. </a-col>
  89. <a-col :lg="6" :md="12">
  90. <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
  91. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  92. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  93. </span>
  94. </a-col>
  95. </a-row>
  96. </a-form>
  97. </div>
  98. <yuzhi-curve v-if="title === '预制曲线'" :data="yuzhiData" :marks="yuzhiMarkData" ref="yuzhiCurveM"></yuzhi-curve>
  99. <real-time-curve v-if="title === '实时曲线'" :data="realTimeData"></real-time-curve>
  100. <full-curve-model v-if="title === '全程曲线'" :data="fullModelData" ref="fullCurveModel"></full-curve-model>
  101. <template slot="footer">
  102. <a-button @click="curveClose">关闭</a-button>
  103. </template>
  104. </j-modal>
  105. </div>
  106. </template>
  107. <script>
  108. import commonTitle from './components/commonTitle.vue'
  109. import AlarmModalList from './modules/AlarmModalList.vue'
  110. import YuzhiCurve from './modules/YuzhiCurve.vue'
  111. import RealTimeCurve from './modules/RealTimeCurve.vue'
  112. import FullCurve from './modules/FullCurve.vue'
  113. import FullCurveModel from './modules/FullCurveModel.vue'
  114. import Info3D from './modules/info3D.vue'
  115. import RunningState from './modules/RunningState.vue'
  116. import EquipmentInfo from './modules/EquipmentInfo.vue'
  117. import ModeInfo from './modules/ModeInfo.vue'
  118. import SurveillanceVideo from './modules/SurveillanceVideo.vue'
  119. import TestInformation from './modules/TestInformation.vue'
  120. import TestStatusInfo from './modules/TestStatusInfo.vue'
  121. import { getAction } from '@/api/manage'
  122. import store from '@/store'
  123. import Vue from 'vue'
  124. import signMd5Utils from '@/utils/encryption/signMd5Utils'
  125. import { axios } from '@/utils/request'
  126. import { ACCESS_TOKEN } from '@/store/mutation-types'
  127. import axios111 from 'axios'
  128. import moment from 'moment'
  129. export default {
  130. name: '',
  131. components: {
  132. commonTitle,
  133. AlarmModalList,
  134. YuzhiCurve,
  135. RealTimeCurve,
  136. FullCurve,
  137. FullCurveModel,
  138. Info3D,
  139. RunningState,
  140. EquipmentInfo,
  141. ModeInfo,
  142. SurveillanceVideo,
  143. TestInformation,
  144. TestStatusInfo,
  145. },
  146. data() {
  147. return {
  148. titleName: '高温高湿试验项目',
  149. eqRealData: [],
  150. yuzhiData: [],
  151. yuzhiMarkData: [],
  152. realTimeData: [],
  153. fullData: [],
  154. fullModelData: [],
  155. websock: null,
  156. newAlarmData: null,
  157. title: '',
  158. visible: false,
  159. curveType: '',
  160. // 设备状态
  161. equipmentStatus: 1,
  162. // 弹窗搜索
  163. queryParam: {},
  164. isFullWebSocket: true, // 判断:当搜索之后就不随websocket进行改变了
  165. tagParams: {Tags: [
  166. { Name: '运行方式设定' }, { Name: '设备状态' }, { Name: '试验运行时间' }, { Name: '全部循环设定值' },
  167. { Name: '内部循环设定值' }, { Name: '全部循环运行值' }, { Name: '内部循环运行值' }, { Name: '预计结束时间' },
  168. { Name: '内部循环1_启始段' }, { Name: '内部循环1_结束段' }, { Name: '内部循环1_次数' },
  169. { Name: '内部循环2_启始段' }, { Name: '内部循环2_结束段' }, { Name: '内部循环2_次数' },
  170. { Name: '内部循环3_启始段' }, { Name: '内部循环3_结束段' }, { Name: '内部循环3_次数' },
  171. { Name: '内部循环4_启始段' }, { Name: '内部循环4_结束段' }, { Name: '内部循环4_次数' },
  172. { Name: '总的运行段数' }, { Name: '总的设定段数' }, { Name: '当前运行程序号' }, { Name: '当前运行段号' },
  173. { Name: '程序段运行时间' }, { Name: '程序段设定时间' }, { Name: '当前湿度值' }, { Name: '当前温度值' },
  174. { Name: '温度输出率' }, { Name: '起始温度值' }, { Name: '温度设定值' }, { Name: '湿度输出率' },
  175. { Name: '起始湿度值' }, { Name: '湿度设定值' }, { Name: '定值温度斜率值' },
  176. { Name: 'A1压机吸气压力' }, { Name: 'A1压机排气压力' }, { Name: 'A2压机吸气压力' }, { Name: 'A2压机排气压力' },
  177. { Name: 'B1压机吸气压力' }, { Name: 'B1压机排气压力' }, { Name: 'B2压机吸气压力' }, { Name: 'B2压机排气压力' },
  178. { Name: 'C1压机吸气压力' }, { Name: 'C1压机排气压力' }, { Name: 'C2压机吸气压力' }, { Name: 'C2压机排气压力' },
  179. { Name: 'D1压机吸气压力' }, { Name: 'D1压机排气压力' }, { Name: 'D2压机吸气压力' }, { Name: 'D2压机排气压力' },
  180. { Name: 'E1压机吸气压力' }, { Name: 'E1压机排气压力' }, { Name: 'E2压机吸气压力' }, { Name: 'E2压机排气压力' },
  181. { Name: 'F1压机吸气压力' }, { Name: 'F1压机排气压力' }, { Name: 'F2压机吸气压力' }, { Name: 'F2压机排气压力' },
  182. { Name: 'G1压机吸气压力' }, { Name: 'G1压机排气压力' }, { Name: 'G2压机吸气压力' }, { Name: 'G2压机排气压力' },
  183. { Name: 'H1压机吸气压力' }, { Name: 'H1压机排气压力' }, { Name: 'H2压机吸气压力' }, { Name: 'H2压机排气压力' },
  184. { Name: 'I1压机吸气压力' }, { Name: 'I1压机排气压力' }, { Name: 'I2压机吸气压力' }, { Name: 'I2压机排气压力' },
  185. { Name: 'J1压机吸气压力' }, { Name: 'J1压机排气压力' }, { Name: 'J2压机吸气压力' }, { Name: 'J2压机排气压力' },
  186. { Name: '氧浓度1采集值' }, { Name: '氧浓度2采集值' }, { Name: '氧浓度3采集值' }, { Name: '氧浓度4采集值' },
  187. { Name: '压差1采集值' }, { Name: '压差2采集值' }, { Name: '前风道鼓风变频器' }, { Name: '后风道鼓风变频器' }
  188. ]}
  189. }
  190. },
  191. destroyed() {
  192. // 离开路由之后断开websocket连接
  193. this.websock.close()
  194. },
  195. created() {
  196. // 初始化websocket
  197. this.initWebSocket()
  198. // 数据获取
  199. // this.getData()
  200. // 打开当前页面即数据获取
  201. this.getDashBoardData()
  202. // 直接从webaccess获取数据,满足实时性要求
  203. setTimeout(this.refreshData, 15000)
  204. },
  205. mounted() {},
  206. methods: {
  207. // getData(){
  208. // getAction(`/datacoll/webaccess/getWATagValue`).then(res=>{
  209. // console.log(res)
  210. // if(res.success){
  211. // this.eqRealData = res.result
  212. // }
  213. // })
  214. // },
  215. getInfo(url, parameter) {
  216. let sign = signMd5Utils.getSign(url, parameter)
  217. //将签名和时间戳,添加在请求接口 Header
  218. // update-begin--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
  219. let signHeader = { 'X-Sign': sign, 'X-TIMESTAMP': signMd5Utils.getTimestamp() }
  220. // update-end--author:taoyan---date:20220421--for: VUEN-410【签名改造】 X-TIMESTAMP牵扯
  221. return axios({
  222. timeout: 50000,
  223. url: url,
  224. method: 'get',
  225. params: parameter,
  226. headers: signHeader,
  227. })
  228. },
  229. getDashBoardData() {
  230. this.getInfo(`/datacoll/webaccess/getDashBoardData`).then((res) => {
  231. const redata = JSON.parse(res.result);
  232. // console.log("首次获取", redata);
  233. this.initData(redata);
  234. })
  235. },
  236. // 点击报警按钮触发弹窗
  237. clickAlarmBtn() {
  238. this.$refs.alarmList.visible = true
  239. this.$refs.alarmList.loadData()
  240. },
  241. // websocket
  242. initWebSocket() {
  243. // 初始化weosocket(必须)
  244. // 请根据实际项目需要进行修改
  245. // var userId = store.getters.userInfo.id
  246. // const wsuri = 'ws://127.0.0.1:8866/websocket'
  247. // const wsuri = `ws://192.168.2.216:8866/websocket/${userId}`
  248. // const wsuri = `ws://192.168.2.247:8866/websocket/${userId}`
  249. // WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
  250. var userId = 'f0019fdebedb443c98dcb17d88222c38' // 免登录使用
  251. if (store && store.getters && store.getters.userInfo && store.getters.userInfo.id) {
  252. userId = store.getters.userInfo.id
  253. }
  254. var wsuri =
  255. window._CONFIG['domianURL'].replace('https://', 'wss://').replace('http://', 'ws://') + '/websocket/' + userId
  256. console.log('地址', wsuri)
  257. // var wsuri = 'ws://192.168.2.247:8866/websocket';
  258. // console.log(wsuri);
  259. //update-begin-author:taoyan date:2022-4-22 for: v2.4.6 的 websocket 服务端,存在性能和安全问题。 #3278
  260. let token = Vue.ls.get(ACCESS_TOKEN)
  261. // 大屏免登录,去掉token
  262. this.websock = new WebSocket(wsuri)
  263. // this.websock = new WebSocket(wsuri, [token]);
  264. // 新建一个webstock对象
  265. // this.websock = new WebSocket(wsuri)
  266. this.websock.onmessage = this.websocketonmessage
  267. this.websock.onopen = this.websocketonopen
  268. this.websock.onerror = this.websocketonerror
  269. this.websock.onclose = this.websocketclose
  270. },
  271. // 数据接收
  272. websocketonmessage(e) {
  273. console.log('-----接收消息-------', e)
  274. const redata = JSON.parse(e.data)
  275. // console.log(redata)
  276. this.initData(redata)
  277. },
  278. initData(redata) {
  279. console.log(66666, redata)
  280. // 接收数据之后操作
  281. this.eqRealData = redata['设备实时值']
  282. if (redata['设备实时值']) {
  283. var titleObj = redata['设备实时值'].find((item) => item.Name === '试验名称')
  284. // console.log('我要找名字', titleObj.Value)
  285. if (titleObj && titleObj != -1) {
  286. this.titleName = titleObj.Value
  287. }
  288. }
  289. // this.curveData = redata['设备历史值'] // 原来第一版后端传数格式
  290. if (redata['预制曲线']) {
  291. this.realTimeData = redata['实时曲线']
  292. this.fullData = redata['全程曲线']
  293. } else {
  294. // console.log("实时曲线", this.realTimeData, redata['实时曲线'])
  295. this.realTimeData = [...this.realTimeData, ...redata['实时曲线']]
  296. this.fullData = [...this.fullData, ...redata['全程曲线']]
  297. }
  298. if (this.isFullWebSocket) {
  299. // this.fullModelData = redata['设备历史值'] // 原来第一版后端传数格式
  300. if (redata['预制曲线']) {
  301. this.fullModelData = redata['全程曲线']
  302. } else {
  303. this.fullModelData = [...this.fullModelData, ...redata['全程曲线']]
  304. }
  305. }
  306. // 旧版本
  307. // this.newAlarmData = redata['最新一条报警信息']
  308. // 新版本
  309. // console.log('判断是否含有1',redata.hasOwnProperty('最近24H报警信息'))
  310. // console.log('判断是否含有2',redata['最近24H报警信息'])
  311. this.newAlarmData = redata.hasOwnProperty('最近24H报警信息') ? redata['最近24H报警信息'] : ['原数据']
  312. if (redata['预制曲线'] && redata['预制曲线'].length > 0) {
  313. this.yuzhiData = redata['预制曲线']
  314. }
  315. if (redata['预制曲线'] && redata['预制曲线线段'].length > 0) {
  316. this.yuzhiMarkData = redata['预制曲线线段']
  317. }
  318. // this.$refs.yuzhiCurve.markData = this.yuzhiMarkData
  319. // var titleObj = redata['设备实时值'].find(item => item.Name === '试验名称')
  320. // console.log(titleObj)
  321. // this.titleName = titleObj ? titleObj.Value : '高温高湿试验项目'
  322. },
  323. // websocket连接后发送数据(send发送)
  324. websocketonopen() {
  325. console.log('WebSocket连接成功')
  326. // let actions = {} // 请根据实际项目需要进行修改
  327. // this.websocketsend()
  328. },
  329. // 数据发送
  330. websocketsend(d) {
  331. this.websock.send(d)
  332. console.log(d)
  333. },
  334. // 连接建立失败重连
  335. websocketonerror() {
  336. this.initWebSocket()
  337. },
  338. // 关闭
  339. websocketclose(e) {
  340. console.log('断开连接', e)
  341. this.initWebSocket()
  342. },
  343. // 点击循环时触发
  344. handleXunhuan(choose) {
  345. this.$refs.yuzhiCurve.chooseXunhuan.circname = choose
  346. // this.$refs.yuzhiCurveM.chooseXunhuan.circname = choose
  347. },
  348. // 刷新数据
  349. refreshData() {
  350. const instance = axios111.create({
  351. baseURL: window._CONFIG['webaccessURL'] + '/WaWebService/Json', // 目标服务器的URL
  352. timeout: 20000, // 请求超时时间
  353. headers: {
  354. 'Content-Type': 'application/json',
  355. Authorization: window._CONFIG['webaccessAUTHOR'],
  356. },
  357. })
  358. instance
  359. .post('/GetTagValue/瑞莱', this.tagParams)
  360. .then((response) => {
  361. this.initData(this.addExtraTagValues(response.data.Values))
  362. console.log("为啥1")
  363. setTimeout(this.refreshData, 1000)
  364. })
  365. .catch((error) => {
  366. // 处理错误
  367. // console.error(error)
  368. setTimeout(this.refreshData, 1000)
  369. })
  370. },
  371. // 增加额外的参数
  372. addExtraTagValues(values) {
  373. var syyxsj, yjjssj, cxdsdsj, cxdyxsj, wdscl, sdscl = 0;
  374. var realtimecurves = [];
  375. var wholecurves = [];
  376. var now = new Date();
  377. var logtime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss');
  378. var shorttime = moment(new Date()).format('HH:mm:ss');
  379. var longtime = moment(new Date()).format('MM-DD HH:mm:ss');
  380. for (var i = 0; i < values.length; i++) {
  381. switch (values[i].Name) {
  382. case '设备状态':
  383. // 如果设备状态原来不是启动,现在改成启动,则刷新试验信息、预制曲线、实时曲线、全程曲线
  384. if (this.equipmentStatus != 1 && parseInt(values[i].Value) == 1) {
  385. this.equipmentStatus = parseInt(values[i].Value);
  386. this.getDashBoardData();
  387. }
  388. break;
  389. case '试验运行时间':
  390. syyxsj = parseInt(values[i].Value);
  391. break;
  392. case '预计结束时间':
  393. yjjssj = parseInt(values[i].Value);
  394. break;
  395. case '程序段设定时间':
  396. cxdsdsj = parseInt(values[i].Value);
  397. break;
  398. case '程序段运行时间':
  399. cxdyxsj = parseInt(values[i].Value);
  400. break;
  401. case '温度输出率':
  402. wdscl = parseFloat(values[i].Value);
  403. break;
  404. case '湿度输出率':
  405. sdscl = parseFloat(values[i].Value);
  406. break;
  407. case '当前温度值':
  408. realtimecurves.push({name: "温度实值-实时", subList: [{logtime: logtime, tagvalue: values[i].Value, transtime: shorttime}], type: "实时"})
  409. wholecurves.push({name: "温度实值-全程", subList: [{logtime: logtime, tagvalue: values[i].Value, transtime: longtime}], type: "全程"})
  410. break;
  411. case '当前湿度值':
  412. realtimecurves.push({name: "湿度实值-实时", subList: [{logtime: logtime, tagvalue: values[i].Value, transtime: shorttime}], type: "实时"})
  413. wholecurves.push({name: "湿度实值-全程", subList: [{logtime: logtime, tagvalue: values[i].Value, transtime: longtime}], type: "全程"})
  414. break;
  415. default:
  416. break;
  417. }
  418. }
  419. console.log("实时曲线", realtimecurves)
  420. console.log("全程曲线", wholecurves)
  421. // 试验进度:试验运行时间/(试验运行时间+预计结束时间)
  422. var syjd = (syyxsj + yjjssj) == 0 ? 0 : parseFloat(syyxsj) / (parseFloat(syyxsj) + parseFloat(yjjssj));
  423. values.push({Name: "试验进度", Value: syjd, Quality: 0});
  424. // 预计结束时间-试验信息:“预计结束时间”给到的是时间段(s):预计结束时间+本地时间=预计时间(显示月日时分)。
  425. var yjjssj_syxx = new Date();
  426. if (yjjssj != null) {
  427. yjjssj_syxx.setSeconds(yjjssj_syxx.getSeconds() + yjjssj);
  428. }
  429. values.push({Name: "预计结束时间-试验信息", Value: moment(yjjssj_syxx).format('YYYY-MM-DD HH:mm:ss'), Quality: 0});
  430. // 段余时间:程序段设定时间-程序段运行时间
  431. values.push({Name: "段余时间", Value: cxdsdsj - cxdyxsj, Quality: 0});
  432. // 段进度:(程序段设定时间(设定时间-秒) - 程序段运行时间(运行时间-秒) )/程序段设定时间(设定时间-秒)
  433. var djd = cxdyxsj == 0 ? "0" : ((cxdsdsj - cxdyxsj) / cxdsdsj).toFixed(2);
  434. values.push({Name: "段进度", Value: djd, Quality: 0});
  435. // 斜率设定
  436. // 升温/降温:温度输出率为0%-100%则是加热状态,-100%--0%则是降温状态
  437. values.push({Name: "升温", Value: wdscl > 0 ? 1 : 0, Quality: 0});
  438. values.push({Name: "降温", Value: wdscl < 0 ? 1 : 0, Quality: 0});
  439. // 加湿/除湿:湿度输出率为0%-100%则是加湿状态,-100%--0%则是除湿状态
  440. values.push({Name: "加湿", Value: sdscl > 0 ? 1 : 0, Quality: 0});
  441. values.push({Name: "除湿", Value: sdscl < 0 ? 1 : 0, Quality: 0});
  442. return {"设备实时值": values, "实时曲线": realtimecurves, "全程曲线": wholecurves};
  443. },
  444. // 弹窗
  445. showModal(title) {
  446. this.title = title
  447. this.visible = true
  448. // console.log('弹簧全程曲线赋值', this.$refs.fullCurve.data)
  449. // this.fullModelData = this.$refs.fullCurve.data
  450. },
  451. getSearchData() {
  452. getAction('/datacoll/webaccess/getQcqx', this.queryParam).then((res) => {
  453. console.log(res)
  454. if (res.success) {
  455. this.fullModelData = res.result
  456. }
  457. })
  458. },
  459. searchQuery() {
  460. this.getSearchData()
  461. this.isFullWebSocket = false
  462. },
  463. searchReset() {
  464. this.queryParam = {}
  465. this.getSearchData()
  466. this.isFullWebSocket = true
  467. },
  468. curveClose() {
  469. this.isFullWebSocket = true
  470. this.visible = false
  471. this.queryParam = {}
  472. this.fullModelData = this.fullData // 解除搜索数据状态,保证再次打开是全部数据状态
  473. },
  474. },
  475. }
  476. </script>
  477. <style lang="less" scoped>
  478. @import '~@/assets/less/uStyle.less';
  479. // 表单
  480. .ant-form {
  481. /deep/ .ant-form-item-label {
  482. label {
  483. color: #fff !important;
  484. }
  485. }
  486. /deep/ .ant-input {
  487. background: rgba(6, 23, 48, 0.5);
  488. color: #fff;
  489. }
  490. /deep/ .ant-btn-primary {
  491. background: transparent;
  492. // background: #0b2243d9;
  493. // border-color: #fff;
  494. }
  495. }
  496. </style>
  497. <style lang="less">
  498. .visualization-container {
  499. width: 100%;
  500. height: 100vh;
  501. background: url('~@/assets/visualization/pageBg.png') no-repeat;
  502. background-size: cover;
  503. position: relative;
  504. // 头部标题区域
  505. .top-title-container {
  506. position: fixed;
  507. top: 0;
  508. left: 0;
  509. right: 0;
  510. // border: 1px solid #000;
  511. height: 80px;
  512. text-align: center;
  513. // line-height: 22px;
  514. .title-content {
  515. width: 700px;
  516. height: 100%;
  517. background: url('~@/assets/visualization/pageTitleBg.png') no-repeat center center;
  518. background-size: auto 100%;
  519. .text {
  520. font-size: 28px;
  521. color: transparent;
  522. // font-weight: bold;
  523. // 描边 变相加粗
  524. -webkit-text-stroke: 0.4px;
  525. letter-spacing: 0.15em;
  526. text-shadow: 1px 2px 2px rgb(10, 37, 92);
  527. // text-shadow: 1px 2px 2px rgba(10, 68, 134, .67);
  528. position: relative;
  529. font-family: '黑体';
  530. // font-family: "宋体";
  531. // font-family: serif;
  532. // font-family: "楷体_GB2312";
  533. &::before {
  534. // content: attr(text); // div中设置了text=>相当于又写了一个标题覆盖在原来设置了阴影的文字上面
  535. content: attr(data-attr);
  536. position: absolute;
  537. z-index: 10;
  538. background-image: linear-gradient(to bottom, #ffffff, #8dd4f7);
  539. // background-image: linear-gradient(to bottom, #ffffff, #7ed7fb);
  540. -webkit-background-clip: text;
  541. color: transparent;
  542. // 去除集成父级样式
  543. text-shadow: none;
  544. }
  545. }
  546. }
  547. }
  548. // 报警按钮
  549. .alarm-btn {
  550. position: absolute;
  551. top: 26px;
  552. left: calc(25% + 94px);
  553. width: 50px;
  554. height: 50px;
  555. background: url('~@/assets/visualization/alarm.png') no-repeat;
  556. background-size: contain;
  557. cursor: pointer;
  558. z-index: 999;
  559. div {
  560. color: #20eef9;
  561. text-align: center;
  562. font-size: 10px;
  563. line-height: 12px;
  564. font-style: italic;
  565. padding-right: 3px;
  566. padding-bottom: 2px;
  567. }
  568. }
  569. // 数据内容区域
  570. .content-container {
  571. height: 100%;
  572. // padding: 60px 20px 20px;
  573. // padding-top: 60px;
  574. // padding-bottom: 20px;
  575. box-sizing: border-box;
  576. .left-container {
  577. width: 25%;
  578. padding-left: 10px;
  579. padding-right: 10px;
  580. height: 100%;
  581. z-index: 999;
  582. .left-top-con {
  583. height: 33.3%;
  584. padding-top: 60px;
  585. padding-bottom: 12px;
  586. }
  587. .left-center-con {
  588. height: 33.3%;
  589. padding-top: 6px;
  590. padding-bottom: 6px;
  591. }
  592. .left-bottom-con {
  593. height: 33.3%;
  594. padding-top: 6px;
  595. padding-bottom: 12px;
  596. }
  597. }
  598. .center-container {
  599. width: 50%;
  600. height: 100%;
  601. padding-left: 10px;
  602. padding-right: 10px;
  603. .important {
  604. width: 100%;
  605. height: 66.7%;
  606. // text-align: center;
  607. // line-height: 500px;
  608. }
  609. .centen-bottom-con {
  610. height: 33.3%;
  611. padding-top: 6px;
  612. padding-bottom: 12px;
  613. .center-bottom-left {
  614. width: 50%;
  615. height: 100%;
  616. padding-right: 6px;
  617. }
  618. .center-bottom-right {
  619. width: 50%;
  620. height: 100%;
  621. padding-left: 6px;
  622. }
  623. }
  624. }
  625. .right-container {
  626. width: 25%;
  627. padding-left: 10px;
  628. padding-right: 10px;
  629. .right-top-con {
  630. height: 33.3%;
  631. padding-top: 60px;
  632. padding-bottom: 6px;
  633. }
  634. .right-center-con {
  635. height: 33.3%;
  636. padding-top: 6px;
  637. padding-bottom: 6px;
  638. }
  639. .right-bottom-con {
  640. height: 33.3%;
  641. padding-top: 6px;
  642. padding-bottom: 12px;
  643. }
  644. }
  645. }
  646. }
  647. .u-modal-box {
  648. .ant-modal {
  649. width: 100vw !important;
  650. height: 100vh !important;
  651. padding: 0 !important;
  652. margin: 0;
  653. top: 0;
  654. .ant-modal-close {
  655. color: #fff;
  656. }
  657. .ant-modal-header {
  658. background-color: rgba(5, 24, 61, 0.9) !important;
  659. border-bottom: none;
  660. .ant-modal-title {
  661. color: #fff;
  662. }
  663. }
  664. .ant-modal-content {
  665. border-radius: 0;
  666. height: 100%;
  667. background-color: rgba(5, 24, 61, 0.9) !important;
  668. // background-color: rgba(15, 57, 91, .94) !important;
  669. overflow: hidden;
  670. }
  671. .ant-modal-body {
  672. height: calc(100% - 55px - 53px);
  673. }
  674. .ant-modal-footer {
  675. border-top: none;
  676. }
  677. }
  678. }
  679. </style>