deviceDetails.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <view>
  3. <u-navbar title="设备详情"></u-navbar>
  4. <view class="details">
  5. <view class="details-title">
  6. <h4>充电桩分润信息</h4>
  7. </view>
  8. <view class="details-row"><p>所属站点</p><span>{{detail.stationName}}</span></view>
  9. <view class="details-row"><p>桩号</p><span>{{detail.deviceNo}}</span></view>
  10. <view class="details-row"><p>充电桩类型</p><span v-if="detail.type">{{options0[detail.type].label}}</span></view>
  11. <view class="details-row"><p>设备状态</p><span>{{detail.online?'在线':'离线'}}</span></view>
  12. <view class="details-row"><p>我的身份</p><span>{{detail.roleName}}</span></view>
  13. <view class="details-row"><p>分润标准</p><span>{{detail.disProportion}}%</span></view>
  14. <view class="details-row"><p>收费标准(元/度)</p><span
  15. style="
  16. color: #5a8eef;
  17. "
  18. @click="gotoUrl('pagesFinance/user/chargingDetails?id='+id)" >查看详情</span></view>
  19. </view>
  20. <!-- <view class="details">
  21. <view class="details-title">
  22. <h4>设备相关信息</h4>
  23. </view>
  24. <view class="details-row"><p>设备型号</p><span>HCD0001-A</span></view>
  25. <view class="details-row"><p>初次安装时间</p><span>2022-05-01</span></view>
  26. <view class="details-row"><p>输出功率范围(瓦)</p><span>100-400</span></view>
  27. </view> -->
  28. <view class="detailsBtn">
  29. <u-button class="detailsBtn-btn" type="primary" @click="back" plain>返回</u-button>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import * as API from '@/apis/finance.js'
  35. export default {
  36. data() {
  37. return {
  38. id:'',
  39. detail:{
  40. },
  41. options0: [
  42. {
  43. label: '自行车充电',
  44. value: 0,
  45. },
  46. {
  47. label: '直流快充',
  48. value: 1,
  49. },
  50. {
  51. label: '交流慢充',
  52. value: 2,
  53. },
  54. ],
  55. form: {
  56. name: '',
  57. intro: '',
  58. },
  59. }
  60. },
  61. onLoad(op){
  62. this.id=op.id;
  63. this.getInfo()
  64. },
  65. methods: {
  66. back(){
  67. uni.navigateBack()
  68. },
  69. getInfo(){
  70. uni.showLoading({
  71. title:"加载中",mask:true,
  72. })
  73. API.deviceDetail({
  74. deviceId:this.id
  75. }).then((res) => {
  76. this.detail=res.data.device
  77. uni.hideLoading()
  78. }).catch(error => {
  79. uni.showToast({
  80. title:error
  81. })
  82. })
  83. }
  84. }
  85. }
  86. </script>
  87. <style>
  88. page{
  89. background-color: #F7F7F7;
  90. }
  91. </style>
  92. <style lang="scss" scoped>
  93. .detailsBtn{
  94. margin: 16px;
  95. .detailsBtn-btn{
  96. border-color:#185AC6!important;
  97. border-radius: 8px!important;
  98. background: none!important;
  99. color:#185AC6!important;
  100. }
  101. }
  102. .details-title{
  103. margin-bottom: 16px;
  104. h4{
  105. font-weight: normal;
  106. font-size: 16px;
  107. position: relative;
  108. padding-left:10px;
  109. &::after{
  110. content: '';
  111. position: absolute;
  112. height: 12px;
  113. width: 4px;
  114. background-color: #27B148;
  115. left: 0;
  116. top:5px;
  117. }
  118. }
  119. }
  120. .details-row{
  121. display: flex;
  122. justify-content: space-between;
  123. align-items: center;
  124. margin-top: 15px;
  125. p{color:#888}
  126. }
  127. .details{
  128. margin: 16px;
  129. padding: 20px;
  130. background-color: #fff;
  131. border-radius: 8px;
  132. .details-head{
  133. display: flex;
  134. align-items: center;
  135. justify-content: center;
  136. h4{
  137. font-size: 18px;
  138. font-weight: normal;
  139. margin-left: 4px;
  140. }
  141. }
  142. .details-price{
  143. margin-top: 28px;
  144. display: flex;
  145. align-items: flex-end;
  146. justify-content: center;
  147. h3{
  148. font-size: 36px;
  149. color:#27B148;
  150. line-height: 36px;
  151. margin: 0 4px;
  152. font-weight: normal;
  153. }
  154. span{
  155. font-size: 20px;
  156. color:#27B148;
  157. }
  158. }
  159. .details-main{
  160. text-align: center;
  161. margin-bottom: 20px;
  162. p{
  163. color:#777;
  164. margin-top: 4px;
  165. }
  166. }
  167. }
  168. </style>