EquipmentInfo.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <template>
  2. <div class="equipment-info-module">
  3. <common-title title="设备基本运行情况"></common-title>
  4. <div class="visualization-common-border box">
  5. <!-- <a-row>
  6. <a-col :span="12">
  7. 湿度实值
  8. </a-col>
  9. <a-col :span="12">
  10. 30%R.H
  11. </a-col>
  12. <a-col :span="12">
  13. 温度实值
  14. </a-col>
  15. <a-col :span="12">
  16. 20℃
  17. </a-col>
  18. <a-col :span="12">
  19. 辐射强度实值
  20. </a-col>
  21. <a-col :span="12">
  22. 20W/㎡
  23. </a-col>
  24. </a-row> -->
  25. <!-- <div id="demo1">
  26. <div>湿度实值</div>
  27. <div>温度实值</div>
  28. <div>辐射强度实值</div>
  29. </div>
  30. <div>
  31. <div>30%R.H</div>
  32. <div>20℃</div>
  33. <div>20W/㎡</div>
  34. </div> -->
  35. <!-- <div style="height: 32%;display: flex; justify-content: center; align-items: center; font-size: 39px;">程序运行</div> -->
  36. <div style="height: 32%;display: flex; justify-content: center; align-items: center; font-size: 39px;">{{runStatus == 1 ? '程序运行': '定值运行'}}</div>
  37. <div style="height: 36%; display: flex; flex-direction: row;">
  38. <!-- 左 -->
  39. <div class="le" style="margin: 0 0.1% 0 2.4%;">
  40. <div style="height: 15%; display: flex; justify-content: space-between;">
  41. <span style="font-size: 12px;">温度</span>
  42. <span style="font-size: 11px;">设定{{targetT}}℃</span>
  43. </div>
  44. <div style="height: 70%; display: flex; justify-content: center; align-items: center;">
  45. <span style="font-size: 35px;">{{template}}</span>
  46. </div>
  47. <div style="height: 15%; display: flex; justify-content: end; align-items: center;">
  48. <span style="font-size: 12px;">℃</span>
  49. </div>
  50. </div>
  51. <!-- 中 -->
  52. <div class="le" style="margin: 0 0.1% 0 1%;">
  53. <div style="height: 15%; display: flex; justify-content: space-between;">
  54. <span style="font-size: 12px;">湿度</span>
  55. <span style="font-size: 11px;">设定{{targetH}}%R.H</span>
  56. </div>
  57. <div style="height: 70%; display: flex; justify-content: center; align-items: center;">
  58. <span style="font-size: 35px;">{{humidity}}</span>
  59. </div>
  60. <div style="height: 15%; display: flex; justify-content: end; align-items: center;">
  61. <span style="font-size: 12px;">%R.H</span>
  62. </div>
  63. </div>
  64. <!-- 右 -->
  65. <div class="le" style="margin: 0 0.1% 0 1%;">
  66. <div style="height: 15%; display: flex; justify-content: space-between;">
  67. <span style="font-size: 12px;">辐射强度</span>
  68. <span style="font-size: 11px;">设定{{targetF}}W/㎡</span>
  69. </div>
  70. <div style="height: 70%; display: flex; justify-content: center; align-items: center;">
  71. <span style="font-size: 35px;">{{irradiation}}</span>
  72. </div>
  73. <div style="height: 15%; display: flex; justify-content: end; align-items: center;">
  74. <span style="font-size: 12px;">W/㎡</span>
  75. </div>
  76. </div>
  77. </div>
  78. <div style="height: 22%; margin-top: 2%;">
  79. <div class="bo">
  80. <div style="width: 35%; padding-left: 2%">{{alarmTime}}</div>
  81. <div style="width: 65%;">{{ information }}</div>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </template>
  87. <script>
  88. import commonTitle from '../components/commonTitle.vue'
  89. export default {
  90. components: { commonTitle },
  91. name: '',
  92. props: {
  93. data: {
  94. type: Array,
  95. default: function(){
  96. return [] // 使用工厂函数返回默认值
  97. }
  98. },
  99. alarmData: {
  100. type: Array,
  101. default: function(){
  102. return [] // 使用工厂函数返回默认值
  103. }
  104. }
  105. },
  106. data () {
  107. return {
  108. // 获取数据(总)
  109. dataList: [],
  110. // 温度
  111. template: '',
  112. // 温度输出
  113. outputT: '',
  114. // 升温/降温(0升温,1降温,3啥也不是)
  115. statusT: 3,
  116. // 目标温度
  117. targetT: '',
  118. // 斜率设定(温度)
  119. slopeT: '',
  120. // 起始温度
  121. startT: '',
  122. // 辐照强度
  123. irradiation: '1000.0',
  124. // 吹风
  125. // 时间
  126. // 辐照强度设定
  127. targetF: '1120',
  128. // 辐射强度起始
  129. startF: '',
  130. // 湿度
  131. humidity: '',
  132. // 湿度输出
  133. outputH: '',
  134. // 加湿/除湿(0加湿,1除湿,3啥也不是)
  135. statusH: 3,
  136. // 目标湿度
  137. targetH: '',
  138. // 起始湿度
  139. startH: '',
  140. // 运行方式设定
  141. runStatus: '',
  142. // 报警信息
  143. alarm: [],
  144. alarmTime: '',
  145. information: ''
  146. }
  147. },
  148. watch: {
  149. data: {
  150. handler(newValue, oldValue){
  151. // console.log(77,newValue, oldValue)
  152. this.dataList = newValue
  153. this.getList()
  154. },
  155. immediate: true,
  156. deep: true
  157. },
  158. alarmData: {
  159. handler(newValue, oldValue){
  160. this.alarm = newValue
  161. // console.log(7788,this.alarm)
  162. this.getList()
  163. },
  164. immediate: true,
  165. deep: true
  166. }
  167. },
  168. created () {
  169. },
  170. mounted () {
  171. },
  172. methods: {
  173. getList(){
  174. // console.log(this.dataList)
  175. for (var i = 0; i < this.dataList.length; i++) {
  176. // console.log(i,this.dataList[i].Name)
  177. // 温度
  178. if (this.dataList[i].Name == '当前温度值') {
  179. this.template = this.dataList[i].Value
  180. }
  181. if (this.dataList[i].Name == '温度设定值') {
  182. this.targetT = this.dataList[i].Value
  183. }
  184. // 辐照
  185. // 湿度
  186. if (this.dataList[i].Name == '当前湿度值') {
  187. this.humidity = this.dataList[i].Value
  188. }
  189. if (this.dataList[i].Name == '湿度设定值') {
  190. this.targetH = this.dataList[i].Value
  191. }
  192. // 运行方式
  193. if (this.dataList[i].Name == '运行方式设定') {
  194. this.runStatus = this.dataList[i].Value
  195. }
  196. }
  197. this.information = this.alarm[0].Name
  198. this.alarmTime = this.alarm[0].Time
  199. }
  200. }
  201. }
  202. </script>
  203. <style scoped>
  204. @import '~@/assets/less/uStyle.less';
  205. </style>
  206. <style lang="less" scoped>
  207. .equipment-info-module{
  208. width: 100%;
  209. height: 100%;
  210. }
  211. .box {
  212. width: 100%;
  213. height: calc(100% - 26px);
  214. border-width: 8px 0 0 6px;
  215. // border: 1px solid rgb(255, 255, 255);
  216. // display: flex;
  217. // /* row (默认值) : 主轴为水平万向,起点在左端。*/
  218. // flex-direction: row;
  219. }
  220. // .box>div#demo1{
  221. // width: 50%;
  222. // height: 94%;
  223. // margin: 2%;
  224. // color: #eeeeee;
  225. // font-size: 15px;
  226. // // border: 1px solid rgb(255, 255, 255);
  227. // }
  228. // .box>div{
  229. // width: 70%;
  230. // height: 94%;
  231. // margin-top: 2%;
  232. // color: #eeeeee;
  233. // font-size: 15px;
  234. // // border: 1px solid rgb(255, 255, 255);
  235. // }
  236. // .box>div>div{
  237. // padding: 5%;
  238. // }
  239. .box>div{
  240. width: 100%;
  241. color: #eeeeee;
  242. // border: 1px solid rgb(255, 255, 255);
  243. }
  244. .le{
  245. height: 100%;
  246. width: 31%;
  247. // border: 1px solid rgb(255, 255, 255);
  248. background: linear-gradient(#207ab7, #207ab7) left top,
  249. linear-gradient(#207ab7, #207ab7) left top ,
  250. linear-gradient(#207ab7, #207ab7) right top,
  251. linear-gradient(#207ab7, #207ab7) right top,
  252. linear-gradient(#207ab7, #207ab7) left bottom,
  253. linear-gradient(#207ab7, #207ab7) left bottom,
  254. linear-gradient(#207ab7, #207ab7) right bottom,
  255. linear-gradient(#207ab7, #207ab7) right bottom;
  256. background-repeat: no-repeat;
  257. background-size: 0.05vw 1vw, 1vw 0.05vw;
  258. padding: 5px 2px;
  259. }
  260. .le>div{
  261. width: 100%;
  262. padding: 0 3% 0 3%;
  263. // border: 1px solid rgb(255, 255, 255);
  264. color: #eeeeee;
  265. align-items: center;
  266. }
  267. .bo{
  268. height: 95%;
  269. width: 95.5%;
  270. // border: 1px solid rgb(255, 255, 255);
  271. margin: 0 0.1% 0.5% 2.4%;
  272. background: linear-gradient(#207ab7, #207ab7) left top,
  273. linear-gradient(#207ab7, #207ab7) left top ,
  274. linear-gradient(#207ab7, #207ab7) right top,
  275. linear-gradient(#207ab7, #207ab7) right top,
  276. linear-gradient(#207ab7, #207ab7) left bottom,
  277. linear-gradient(#207ab7, #207ab7) left bottom,
  278. linear-gradient(#207ab7, #207ab7) right bottom,
  279. linear-gradient(#207ab7, #207ab7) right bottom;
  280. background-repeat: no-repeat;
  281. background-size: 0.05vw 1vw, 1vw 0.05vw;
  282. display: flex;
  283. flex-direction: row;
  284. }
  285. .bo>div{
  286. height: 100%;
  287. color: #eeeeee;
  288. font-size: 16px;
  289. // border: 1px solid rgb(255, 255, 255);
  290. display: flex;
  291. align-items: center;
  292. }
  293. </style>