drainage.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  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" @click="open('../../h5/h5?url=多级排水系统')"> -->
  8. <view class="btn">
  9. <view class="left">
  10. <view class="icon">
  11. <image src="../img/btn_icon.png" mode="widthFix"></image>
  12. </view>
  13. <view class="title">
  14. 多级排水系统
  15. </view>
  16. </view>
  17. <view class="right">
  18. <!-- <uni-icons type="arrowright" color="#FFF"></uni-icons> -->
  19. </view>
  20. </view>
  21. <view class="info">
  22. <view class="box">
  23. <view class="item" v-for="(item,index) in info_paishui" :key="index">
  24. <view class="label">{{item.label}}</view>
  25. <view class="value">{{item.value}}</view>
  26. </view>
  27. </view>
  28. </view>
  29. <!-- <view class="btn" @click="open('../../h5/h5?url=多级供水')"> -->
  30. <view class="btn">
  31. <view class="left">
  32. <view class="icon">
  33. <image src="../img/btn_icon.png" mode="widthFix"></image>
  34. </view>
  35. <view class="title">
  36. 多级供水系统
  37. </view>
  38. </view>
  39. <view class="right">
  40. <!-- <uni-icons type="arrowright" color="#FFF"></uni-icons> -->
  41. </view>
  42. </view>
  43. <view class="info">
  44. <view class="box">
  45. <view class="item" v-for="(item,index) in info_gongshui" :key="index">
  46. <view class="label">{{item.label}}</view>
  47. <view class="value">{{item.value}}</view>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="content">
  52. <view class="section" v-for="(item,index) in list" :key="index">
  53. <view class="title">
  54. <view class="left">{{item.title}}</view>
  55. <view class="right" @click="goto_url(item)">点击查看详情</view>
  56. </view>
  57. <view class="inner">
  58. <view class="item" v-for="(item_2,index_2) in item.info" :key="index_2">
  59. <view class="label">{{item_2.label}}</view>
  60. <view class="value">
  61. <view class="state" :style="{'backgroundColor':item_2.state == 1?'#00BD00':'#D6000F'}">
  62. </view>
  63. <view class="text">{{item_2.text}}</view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. </template>
  72. <script>
  73. export default {
  74. data() {
  75. return {
  76. info_paishui: [{
  77. label: "1#水池液位",
  78. value: "2.95m"
  79. },
  80. {
  81. label: "通讯状态",
  82. value: "通讯正常"
  83. },
  84. {
  85. label: "2#水池液位",
  86. value: "3.15m"
  87. },
  88. {
  89. label: "通讯地址",
  90. value: "172.16.59.241"
  91. }
  92. ],
  93. info_gongshui: [{
  94. label: "补清水量",
  95. value: "214748364.8m3"
  96. },
  97. {
  98. label: "复用水累计流量",
  99. value: "10380792.8m3"
  100. },
  101. {
  102. label: "通讯状态",
  103. value: "通讯正常"
  104. }
  105. ],
  106. list: [{
  107. title: "929水泵房",
  108. sys_code: "929",
  109. info: [{
  110. label: "1#水泵",
  111. state: 1,
  112. text: "开启"
  113. },
  114. {
  115. label: "2#水泵",
  116. state: 1,
  117. text: "开启"
  118. },
  119. {
  120. label: "3#水泵",
  121. state: 1,
  122. text: "开启"
  123. }
  124. ]
  125. },
  126. {
  127. title: "+1000水泵房",
  128. sys_code: "1000",
  129. info: [{
  130. label: "1#污水泵",
  131. state: 1,
  132. text: "开启"
  133. },
  134. {
  135. label: "2#污水泵",
  136. state: 1,
  137. text: "开启"
  138. },
  139. {
  140. label: "1#清水泵",
  141. state: 0,
  142. text: "无信号"
  143. },
  144. {
  145. label: "2#清水泵",
  146. state: 0,
  147. text: "无信号"
  148. }
  149. ]
  150. }
  151. ],
  152. };
  153. },
  154. mounted() {
  155. this.getServerData()
  156. },
  157. methods: {
  158. open(url) {
  159. uni.navigateTo({
  160. url: url
  161. })
  162. },
  163. goto_url(item) {
  164. uni.navigateTo({
  165. url: "./pump_house/pump_house" + "?title=" + item.title + "&sys_code=" + item.sys_code
  166. })
  167. },
  168. getServerData() {
  169. this.$api.zaoquan_dcs_pump({
  170. sys_code: "list"
  171. }).then((res) => {
  172. console.log(res.data)
  173. this.info_gongshui = res.data.info_gongshui
  174. this.info_paishui = res.data.info_paishui
  175. this.list = res.data.list
  176. })
  177. },
  178. }
  179. }
  180. </script>
  181. <style lang="scss">
  182. page {
  183. background-color: #F7F7F7;
  184. }
  185. .top {
  186. margin-top: -80rpx;
  187. image {
  188. width: 750rpx;
  189. }
  190. }
  191. .container {
  192. margin: -900rpx 0 0 0;
  193. position: relative;
  194. .btn {
  195. margin: 0 auto;
  196. width: 680rpx;
  197. height: 120rpx;
  198. background-image: url("../img/btn.png");
  199. background-size: cover;
  200. display: flex;
  201. align-items: center;
  202. justify-content: space-between;
  203. box-sizing: border-box;
  204. padding: 0 40rpx;
  205. .left {
  206. display: flex;
  207. align-items: center;
  208. .icon {
  209. margin-right: 20rpx;
  210. font-size: 0;
  211. image {
  212. width: 36rpx;
  213. }
  214. }
  215. .title {
  216. font-size: 34rpx;
  217. font-weight: 700;
  218. color: #FFF;
  219. }
  220. }
  221. .right {
  222. font-weight: 700;
  223. }
  224. }
  225. .info {
  226. margin: 25rpx;
  227. padding: 10rpx 0;
  228. background-color: #34ADFE40;
  229. border-radius: 16rpx;
  230. .box {
  231. margin: 20rpx 40rpx;
  232. box-sizing: border-box;
  233. display: flex;
  234. justify-content: space-between;
  235. flex-wrap: wrap;
  236. .item {
  237. min-width: 300rpx;
  238. font-size: 26rpx;
  239. line-height: 60rpx;
  240. display: flex;
  241. .label {
  242. color: #FFF;
  243. }
  244. .value {
  245. margin-left: 20rpx;
  246. color: #FFFF00;
  247. }
  248. }
  249. }
  250. }
  251. .content {
  252. background-color: #F7F7F7;
  253. border-radius: 35rpx 35rpx 0 0;
  254. box-sizing: border-box;
  255. padding: 35rpx;
  256. .section {
  257. margin-bottom: 40rpx;
  258. border-radius: 14rpx;
  259. overflow: hidden;
  260. .title {
  261. background: linear-gradient(-90deg, #FFFFFF, #E6FAFF);
  262. display: flex;
  263. align-items: flex-end;
  264. justify-content: space-between;
  265. box-sizing: border-box;
  266. padding: 24rpx;
  267. .left {
  268. border-left: 6rpx solid #33C777;
  269. padding-left: 10rpx;
  270. font-size: 34rpx;
  271. font-weight: 700;
  272. color: #343434;
  273. }
  274. .right {
  275. font-size: 22rpx;
  276. color: #3394F9;
  277. }
  278. }
  279. .inner {
  280. background-color: #FFFFFF;
  281. padding: 30rpx 20rpx;
  282. display: grid;
  283. grid-template-columns: repeat(2, 1fr);
  284. gap: 0 40rpx;
  285. .item {
  286. display: flex;
  287. align-items: center;
  288. justify-content: space-around;
  289. line-height: 60rpx;
  290. .label {
  291. width: 150rpx;
  292. color: #8D8D8D;
  293. font-size: 26rpx;
  294. }
  295. .value {
  296. width: 150rpx;
  297. display: flex;
  298. align-items: center;
  299. .state {
  300. width: 30rpx;
  301. height: 30rpx;
  302. background: #D6000F;
  303. border-radius: 6rpx;
  304. }
  305. .text {
  306. margin-left: 20rpx;
  307. font-size: 26rpx;
  308. }
  309. }
  310. }
  311. }
  312. }
  313. }
  314. }
  315. </style>