detail.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. <template>
  2. <view class="page-body">
  3. <page-header :name="'排水系统'" :bg="'#1560e0'" :showLeft="true" @goBack="goBack()"></page-header>
  4. <view class="scroll-wrap">
  5. <view class="basic-info-wrap">
  6. <view class="info-wrap">
  7. <view class="system-wrap">
  8. <view class="title">
  9. <view class="left">
  10. <image src="@/static/jg-icon.png"/>
  11. <view class="center">多级排水系统</view>
  12. </view>
  13. <view class="right">
  14. <image src="@/static/right-arrow.png"/>
  15. </view>
  16. </view>
  17. <view class="params-wrap">
  18. <view class="item" style="width: 40%;">
  19. <view>1#水池液位</view>
  20. <view>3m</view>
  21. </view>
  22. <view class="item" style="width: calc(60% - 52rpx);">
  23. <view>通讯状态</view>
  24. <view>通讯正常</view>
  25. </view>
  26. <view class="item" style="width: 40%;">
  27. <view>2#水池液位</view>
  28. <view>2.74m</view>
  29. </view>
  30. <view class="item" style="width: calc(60% - 52rpx);">
  31. <view>通讯地址</view>
  32. <view>172.16.59.241</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="system-wrap">
  37. <view class="title">
  38. <view class="left">
  39. <image src="@/static/jg-icon.png"/>
  40. <view class="center">多级供水系统</view>
  41. </view>
  42. <view class="right">
  43. <image src="@/static/right-arrow.png"/>
  44. </view>
  45. </view>
  46. <view class="params-wrap">
  47. <view class="item" style="width: calc(60% - 52rpx);">
  48. <view>补清水量</view>
  49. <view>29759m³</view>
  50. </view>
  51. <view class="item" style="width: 40%;margin-left: 42rpx;">
  52. <view>通讯状态</view>
  53. <view>通讯正常</view>
  54. </view>
  55. <view class="item" style="width: 100%;justify-content: start;">
  56. <view>复用水累计流量</view>
  57. <view>10358744.8m³</view>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="radius-wrap"></view>
  63. </view>
  64. <view class="detail-info-wrap">
  65. <page-card v-for="(item, index) in list" style="margin-bottom: 30rpx;" :name="item.name" :data="item" @goDetail="goDetail">
  66. <template v-slot:content>
  67. <view class="item-wrap">
  68. <view class="position">
  69. <view>太仓水位</view>
  70. <view>{{ item.position }}</view>
  71. </view>
  72. <view class="status-wrap">
  73. <status-tip class="item" v-for="(item1,index1) in item.children" :key="index1" :name="item1.name" :status="item1.status" :tip="item1.status ? '运行' : '停止'"></status-tip>
  74. </view>
  75. </view>
  76. </template>
  77. </page-card>
  78. </view>
  79. </view>
  80. </view>
  81. </template>
  82. <script>
  83. export default {
  84. data() {
  85. return {
  86. systemList: [{ // 系统列表
  87. name: '多级排水系统',
  88. children: [{
  89. name: '1#水池液位',
  90. data: '3m'
  91. },{
  92. name: '通讯状态',
  93. data: '通讯正常'
  94. },{
  95. name: '2#水池液位',
  96. data: '2.74m'
  97. },{
  98. name: '通讯地址',
  99. data: '172.16.59.241'
  100. }]
  101. },{
  102. name: '多级供水系统',
  103. children: [{
  104. name: '补清水量',
  105. data: '29759m³'
  106. },{
  107. name: '通讯状态',
  108. data: '通讯正常'
  109. },{
  110. name: '复用水累计流量',
  111. data: '10358744.8m³'
  112. }]
  113. }],
  114. list: [{ // 泵房列表
  115. name: '清水泵房',
  116. position: '2.14m',
  117. children: [{
  118. name: '1#清水泵',
  119. status: 0
  120. },{
  121. name: '4#清水泵',
  122. status: 1
  123. },{
  124. name: '2#清水泵',
  125. status: 0
  126. },{
  127. name: '5#清水泵',
  128. status: 0
  129. },{
  130. name: '3#清水泵',
  131. status: 0
  132. },{
  133. name: '6#清水泵',
  134. status: 0
  135. }]
  136. },{
  137. name: '+1000水泵房',
  138. position: '2.14m',
  139. children: [{
  140. name: '1#清水泵',
  141. status: 0
  142. },{
  143. name: '3#清水泵',
  144. status: 1
  145. },{
  146. name: '2#清水泵',
  147. status: 0
  148. },{
  149. name: '4#清水泵',
  150. status: 0
  151. }]
  152. },{
  153. name: '13207水泵房',
  154. position: '2.14m',
  155. children: [{
  156. name: '1#清水泵',
  157. status: 0
  158. },{
  159. name: '3#清水泵',
  160. status: 1
  161. },{
  162. name: '2#清水泵',
  163. status: 0
  164. },{
  165. name: '4#清水泵',
  166. status: 0
  167. }]
  168. },{
  169. name: '880水泵房',
  170. position: '2.14m',
  171. children: [{
  172. name: '1#清水泵',
  173. status: 0
  174. },{
  175. name: '3#清水泵',
  176. status: 1
  177. },{
  178. name: '2#清水泵',
  179. status: 0
  180. }]
  181. },{
  182. name: '929水泵房',
  183. position: '2.14m',
  184. children: [{
  185. name: '1#清水泵',
  186. status: 0
  187. },{
  188. name: '3#清水泵',
  189. status: 1
  190. },{
  191. name: '2#清水泵',
  192. status: 0
  193. }]
  194. },{
  195. name: '950水泵房',
  196. position: '2.14m',
  197. children: [{
  198. name: '1#清水泵',
  199. status: 0
  200. },{
  201. name: '3#清水泵',
  202. status: 1
  203. },{
  204. name: '2#清水泵',
  205. status: 0
  206. }]
  207. }]
  208. }
  209. },
  210. onLoad() {},
  211. methods: {
  212. goBack() { // 返回上一頁面
  213. uni.navigateBack()
  214. },
  215. goDetail(data) { // 卡片右上角跳转详情
  216. uni.navigateTo({
  217. url: `/pages/data/supply-water/supply-room/supply-room?data=${JSON.stringify(data)}`,
  218. })
  219. }
  220. }
  221. }
  222. </script>
  223. <style scoped lang="scss">
  224. .page-body {
  225. .scroll-wrap {
  226. height: calc(100vh - 85rpx);
  227. overflow: scroll;
  228. .basic-info-wrap {
  229. position: relative;
  230. height: 610rpx;
  231. padding: 50rpx 49rpx 0;
  232. background: url(../../../../static/page_bg.png);
  233. background-size: 100%;
  234. .info-wrap {
  235. .system-wrap {
  236. width: calc(100vw - 98rpx);
  237. height: 235rpx;
  238. padding: 42rpx 35rpx 38rpx 52rpx;
  239. background: url(../../../../static/chart-bg.png);
  240. background-size: calc(100vw - 98rpx) 235rpx;
  241. margin-bottom: 27rpx;
  242. .title {
  243. display: flex;
  244. justify-content: space-between;
  245. .left {
  246. display: flex;
  247. align-items: center;
  248. image {
  249. width: 37rpx;
  250. height: 36rpx;
  251. margin-right: 21rpx;
  252. vertical-align: bottom;
  253. }
  254. .center {
  255. color: #fff;
  256. font-size: 34rpx;
  257. font-weight: 700;
  258. }
  259. }
  260. .right {
  261. image {
  262. width: 16rpx;
  263. height: 29rpx;
  264. }
  265. }
  266. }
  267. .params-wrap {
  268. display: flex;
  269. flex-wrap: wrap;
  270. .item {
  271. margin-top: 26rpx;
  272. display: flex;
  273. justify-content: space-between;
  274. width: calc(50% - 26rpx);
  275. font-size: 26rpx;
  276. color: #fff;
  277. view:last-child {
  278. color: #FFFF00;
  279. }
  280. }
  281. .item:nth-child(2n) {
  282. margin-left: 52rpx;
  283. }
  284. }
  285. }
  286. }
  287. .radius-wrap {
  288. position: absolute;
  289. left: 0;
  290. bottom: 0;
  291. width: 100vw;
  292. height: 30rpx;
  293. background-color: #fff;
  294. border-radius: 35rpx 35rpx 0 0;
  295. }
  296. }
  297. .detail-info-wrap {
  298. padding: 40rpx 35rpx;
  299. .item-wrap {
  300. padding: 47rpx 62rpx 35rpx 55rpx;
  301. color: #8D8D8D;
  302. .position {
  303. display: flex;
  304. view:first-child {
  305. margin-right: 20rpx;
  306. }
  307. }
  308. .status-wrap {
  309. display: flex;
  310. flex-wrap: wrap;
  311. .item {
  312. width: calc(50% - 30rpx);
  313. margin-top: 48rpx;
  314. /deep/ .status-wrap {
  315. color: #000000;
  316. view:first-child {
  317. margin: 0 7rpx 0 14rpx;
  318. }
  319. }
  320. }
  321. .item:nth-child(2n) {
  322. margin-left: 60rpx;
  323. }
  324. }
  325. }
  326. /deep/ .card-wrap:last-child {
  327. margin-bottom: 0 !important;
  328. }
  329. }
  330. }
  331. }
  332. </style>