ventilate.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. <template>
  2. <view>
  3. <view class="top">
  4. <image src="../img/top.jpg" mode="widthFix"></image>
  5. </view>
  6. <view class="container">
  7. <view class="btn">
  8. <view class="left">
  9. <view class="icon">
  10. <image src="../img/btn_icon.png" mode="widthFix"></image>
  11. </view>
  12. <view class="title">
  13. 通风智能决策及控制系统
  14. </view>
  15. </view>
  16. <!-- <view class="right">
  17. <uni-icons type="arrowright" color="#FFF"></uni-icons>
  18. </view> -->
  19. </view>
  20. <view class="info">
  21. <view class="chart">
  22. <view class="charts-box">
  23. <qiun-data-charts type="ring" :opts="opts_1" :chartData="chartData_1" />
  24. </view>
  25. <view class="charts-box">
  26. <qiun-data-charts type="ring" :opts="opts_2" :chartData="chartData_2" />
  27. </view>
  28. </view>
  29. <view class="box">
  30. <view class="item" v-for="(item,index) in info" :key="index">
  31. <view class="label">{{item.label}}</view>
  32. <view class="value">{{item.value}}</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="content">
  37. <view class="section" v-for="(item,index) in list" :key="index">
  38. <view class="title">
  39. <view class="left">{{item.title}}</view>
  40. <view class="right" @click="goto_url(item)">点击查看详情</view>
  41. </view>
  42. <view class="inner">
  43. <view class="item" v-for="(item_2,index_2) in item.info" :key="index_2">
  44. <view class="label">{{item_2.label}}</view>
  45. <view class="value">
  46. <view class="state" :style="{'backgroundColor':item_2.state == 1?'#00BD00':'#D6000F'}">
  47. </view>
  48. <view class="text">{{item_2.text}}</view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. export default {
  59. data() {
  60. return {
  61. chartData_1: {
  62. series: [{
  63. data: [{
  64. "name": "有效风",
  65. "value": 0
  66. }, {
  67. "name": "无效风",
  68. "value": 0
  69. }]
  70. }]
  71. },
  72. opts_1: {
  73. color: ["#00FF00", "#FFFF00"],
  74. dataLabel: false,
  75. legend: {
  76. show: true,
  77. fontColor: "#FFF",
  78. fontSize: 10,
  79. position: "bottom",
  80. margin: 0,
  81. padding: 0
  82. },
  83. title: {
  84. name: "90%",
  85. fontSize: 12,
  86. color: "#FFF"
  87. },
  88. subtitle: {
  89. name: "有效风率",
  90. fontSize: 10,
  91. color: "#FFF"
  92. },
  93. extra: {
  94. ring: {
  95. centerColor: "#34ADFE",
  96. ringWidth: 20,
  97. border: false,
  98. }
  99. }
  100. },
  101. chartData_2: {
  102. series: [{
  103. data: [{
  104. "name": "供风量",
  105. "value": 16052
  106. }, {
  107. "name": "需风量",
  108. "value": 15052
  109. }]
  110. }]
  111. },
  112. opts_2: {
  113. color: ["#51FFF1", "#FFB944"],
  114. dataLabel: false,
  115. legend: {
  116. show: true,
  117. fontColor: "#FFF",
  118. fontSize: 10,
  119. position: "bottom",
  120. margin: 0,
  121. padding: 0
  122. },
  123. title: {
  124. name: "1.07",
  125. fontSize: 12,
  126. color: "#FFF"
  127. },
  128. subtitle: {
  129. name: "供需比",
  130. fontSize: 10,
  131. color: "#FFF"
  132. },
  133. extra: {
  134. ring: {
  135. centerColor: "#34ADFE",
  136. ringWidth: 20,
  137. border: false,
  138. }
  139. }
  140. },
  141. info: [{
  142. label: "自动风门",
  143. value: "2扇"
  144. },
  145. {
  146. label: "自动风窗",
  147. value: "2扇"
  148. },
  149. {
  150. label: "变频风扇",
  151. value: "6扇"
  152. }
  153. ],
  154. list: [{
  155. title: "东井通风机",
  156. sys_code: "east",
  157. info: [{
  158. label: "1#风机",
  159. state: 0,
  160. text: "停止"
  161. },
  162. {
  163. label: "2#风机",
  164. state: 1,
  165. text: "运行"
  166. }
  167. ]
  168. },
  169. {
  170. title: "西井通风机",
  171. sys_code: "west",
  172. info: [{
  173. label: "1#风机",
  174. state: 0,
  175. text: "停止"
  176. },
  177. {
  178. label: "2#风机",
  179. state: 1,
  180. text: "运行"
  181. }
  182. ]
  183. },
  184. {
  185. title: "1314 立井通风机",
  186. sys_code: "1314",
  187. info: [{
  188. label: "1#风机",
  189. state: 1,
  190. text: "运行"
  191. },
  192. {
  193. label: "2#风机",
  194. state: 0,
  195. text: "停止"
  196. }
  197. ]
  198. },
  199. {
  200. title: "220708 辅助巷通风机",
  201. sys_code: "220708fzx",
  202. info: [{
  203. label: "1#风机",
  204. state: 1,
  205. text: "运行"
  206. },
  207. {
  208. label: "2#风机",
  209. state: 0,
  210. text: "停止"
  211. }
  212. ]
  213. },
  214. {
  215. title: "220708 胶带巷通风机",
  216. sys_code: "220708jdx",
  217. info: [{
  218. label: "1#风机",
  219. state: 1,
  220. text: "运行"
  221. },
  222. {
  223. label: "2#风机",
  224. state: 0,
  225. text: "停止"
  226. }
  227. ]
  228. }
  229. ],
  230. };
  231. },
  232. mounted() {
  233. this.getServerData()
  234. },
  235. methods: {
  236. getServerData() {
  237. this.$api.zaoquan_dcs_getFan({
  238. sys_code: "index"
  239. }).then((res) => {
  240. console.log(res.data)
  241. this.chartData_1 = res.data.chartData_1
  242. this.chartData_2 = res.data.chartData_2
  243. this.info = res.data.info
  244. this.list = res.data.list
  245. })
  246. },
  247. goto_url(item) {
  248. let zhutongfeng = ["east", "west", "1314","5fq"]
  249. if (zhutongfeng.includes(item.sys_code)) {
  250. uni.navigateTo({
  251. url: "./main_ventilation/main_ventilation" + "?title=" + item.title + "&sys_code=" + item
  252. .sys_code
  253. })
  254. } else {
  255. uni.navigateTo({
  256. url: "./local_ventilation/local_ventilation" + "?title=" + item.title + "&sys_code=" + item
  257. .sys_code
  258. })
  259. }
  260. }
  261. }
  262. }
  263. </script>
  264. <style lang="scss">
  265. page {
  266. background-color: #F7F7F7;
  267. }
  268. .top {
  269. margin-top: -80rpx;
  270. image {
  271. width: 750rpx;
  272. }
  273. }
  274. .container {
  275. margin: -900rpx 0 0 0;
  276. position: relative;
  277. .btn {
  278. margin: 0 auto;
  279. width: 680rpx;
  280. height: 120rpx;
  281. background-image: url("../img/btn.png");
  282. background-size: cover;
  283. display: flex;
  284. align-items: center;
  285. justify-content: space-between;
  286. box-sizing: border-box;
  287. padding: 0 40rpx;
  288. .left {
  289. display: flex;
  290. align-items: center;
  291. .icon {
  292. margin-right: 20rpx;
  293. font-size: 0;
  294. image {
  295. width: 36rpx;
  296. }
  297. }
  298. .title {
  299. font-size: 34rpx;
  300. font-weight: 700;
  301. color: #FFF;
  302. }
  303. }
  304. .right {
  305. font-weight: 700;
  306. }
  307. }
  308. .info {
  309. margin: 25rpx;
  310. padding-bottom: 20rpx;
  311. background-color: #34ADFE40;
  312. border-radius: 16rpx;
  313. .chart {
  314. display: flex;
  315. .charts-box {
  316. width: 50%;
  317. height: 300rpx;
  318. }
  319. }
  320. .box {
  321. margin: 20rpx 40rpx;
  322. box-sizing: border-box;
  323. display: flex;
  324. justify-content: space-between;
  325. .item {
  326. font-size: 26rpx;
  327. display: flex;
  328. .label {
  329. color: #FFF;
  330. }
  331. .value {
  332. margin-left: 20rpx;
  333. color: #FFFF00;
  334. }
  335. }
  336. }
  337. }
  338. .content {
  339. background-color: #F7F7F7;
  340. border-radius: 35rpx 35rpx 0 0;
  341. box-sizing: border-box;
  342. padding: 35rpx;
  343. .section {
  344. margin-bottom: 40rpx;
  345. border-radius: 14rpx;
  346. overflow: hidden;
  347. .title {
  348. background: linear-gradient(-90deg, #FFFFFF, #E6FAFF);
  349. display: flex;
  350. align-items: flex-end;
  351. justify-content: space-between;
  352. box-sizing: border-box;
  353. padding: 24rpx;
  354. .left {
  355. border-left: 6rpx solid #33C777;
  356. padding-left: 10rpx;
  357. font-size: 34rpx;
  358. font-weight: 700;
  359. color: #343434;
  360. }
  361. .right {
  362. font-size: 22rpx;
  363. color: #3394F9;
  364. }
  365. }
  366. .inner {
  367. background-color: #FFFFFF;
  368. padding: 30rpx 20rpx;
  369. display: grid;
  370. grid-template-columns: repeat(2, 1fr);
  371. gap: 0 40rpx;
  372. .item {
  373. display: flex;
  374. align-items: center;
  375. justify-content: space-around;
  376. line-height: 60rpx;
  377. .label {
  378. width: 140rpx;
  379. color: #8D8D8D;
  380. font-size: 26rpx;
  381. }
  382. .value {
  383. display: flex;
  384. align-items: center;
  385. .state {
  386. width: 30rpx;
  387. height: 30rpx;
  388. background: #D6000F;
  389. border-radius: 6rpx;
  390. }
  391. .text {
  392. margin-left: 20rpx;
  393. font-size: 26rpx;
  394. }
  395. }
  396. }
  397. }
  398. }
  399. }
  400. }
  401. </style>