ventilate.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  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. methods: {
  233. goto_url(item) {
  234. let zhutongfeng = ["east", "west", "1314"]
  235. if (zhutongfeng.includes(item.sys_code)) {
  236. uni.navigateTo({
  237. url: "./main_ventilation/main_ventilation" + "?title=" + item.title + "&sys_code=" + item
  238. .sys_code
  239. })
  240. } else {
  241. uni.navigateTo({
  242. url: "./local_ventilation/local_ventilation" + "?title=" + item.title + "&sys_code=" + item
  243. .sys_code
  244. })
  245. }
  246. }
  247. }
  248. }
  249. </script>
  250. <style lang="scss">
  251. page {
  252. background-color: #F7F7F7;
  253. }
  254. .top {
  255. margin-top: -80rpx;
  256. image {
  257. width: 750rpx;
  258. }
  259. }
  260. .container {
  261. margin: -900rpx 0 0 0;
  262. position: relative;
  263. .btn {
  264. margin: 0 auto;
  265. width: 680rpx;
  266. height: 120rpx;
  267. background-image: url("../img/btn.png");
  268. background-size: cover;
  269. display: flex;
  270. align-items: center;
  271. justify-content: space-between;
  272. box-sizing: border-box;
  273. padding: 0 40rpx;
  274. .left {
  275. display: flex;
  276. align-items: center;
  277. .icon {
  278. margin-right: 20rpx;
  279. font-size: 0;
  280. image {
  281. width: 36rpx;
  282. }
  283. }
  284. .title {
  285. font-size: 34rpx;
  286. font-weight: 700;
  287. color: #FFF;
  288. }
  289. }
  290. .right {
  291. font-weight: 700;
  292. }
  293. }
  294. .info {
  295. margin: 25rpx;
  296. padding-bottom: 20rpx;
  297. background-color: #34ADFE40;
  298. border-radius: 16rpx;
  299. .chart {
  300. display: flex;
  301. .charts-box {
  302. width: 50%;
  303. height: 300rpx;
  304. }
  305. }
  306. .box {
  307. margin: 20rpx 40rpx;
  308. box-sizing: border-box;
  309. display: flex;
  310. justify-content: space-between;
  311. .item {
  312. font-size: 26rpx;
  313. display: flex;
  314. .label {
  315. color: #FFF;
  316. }
  317. .value {
  318. margin-left: 20rpx;
  319. color: #FFFF00;
  320. }
  321. }
  322. }
  323. }
  324. .content {
  325. background-color: #F7F7F7;
  326. border-radius: 35rpx 35rpx 0 0;
  327. box-sizing: border-box;
  328. padding: 35rpx;
  329. .section {
  330. margin-bottom: 40rpx;
  331. border-radius: 14rpx;
  332. overflow: hidden;
  333. .title {
  334. background: linear-gradient(-90deg, #FFFFFF, #E6FAFF);
  335. display: flex;
  336. align-items: flex-end;
  337. justify-content: space-between;
  338. box-sizing: border-box;
  339. padding: 24rpx;
  340. .left {
  341. border-left: 6rpx solid #33C777;
  342. padding-left: 10rpx;
  343. font-size: 34rpx;
  344. font-weight: 700;
  345. color: #343434;
  346. }
  347. .right {
  348. font-size: 22rpx;
  349. color: #3394F9;
  350. }
  351. }
  352. .inner {
  353. background-color: #FFFFFF;
  354. padding: 30rpx 20rpx;
  355. display: grid;
  356. grid-template-columns: repeat(2, 1fr);
  357. gap: 0 40rpx;
  358. .item {
  359. display: flex;
  360. align-items: center;
  361. justify-content: space-around;
  362. line-height: 60rpx;
  363. .label {
  364. width: 140rpx;
  365. color: #8D8D8D;
  366. font-size: 26rpx;
  367. }
  368. .value {
  369. display: flex;
  370. align-items: center;
  371. .state {
  372. width: 30rpx;
  373. height: 30rpx;
  374. background: #D6000F;
  375. border-radius: 6rpx;
  376. }
  377. .text {
  378. margin-left: 20rpx;
  379. font-size: 26rpx;
  380. }
  381. }
  382. }
  383. }
  384. }
  385. }
  386. }
  387. </style>