drainage.vue 6.5 KB

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