deviceDetails.vue 4.0 KB

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