ModeInfo.vue 7.1 KB

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