pileManagement.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. <template>
  2. <view>
  3. <u-navbar title="电桩管理">
  4. </u-navbar>
  5. <view class="details">
  6. <view class="name">
  7. {{detail.stationName}}| {{detail.name}}
  8. </view>
  9. <view class="info">
  10. <view class="info-text">
  11. <p>{{detail.chargingType}} |<text class="dc-fast"> {{detail.interfaceType}} </text> | {{detail.chargingPower}}kW</p>
  12. </view>
  13. <view class="info-img">
  14. <img :src="detail.stationImage"
  15. style="
  16. width: 100px;
  17. height: 75px;
  18. "
  19. alt="">
  20. </view>
  21. </view>
  22. <view class="station-address">
  23. <img src="../../assets/img/Frame 201.png" alt="">
  24. <view class="address-text">
  25. {{detail.address}}
  26. </view>
  27. <view class="navigation" v-if="false">
  28. <view class="iconfont address-font">
  29. &#xe60c;
  30. </view>
  31. <view class="view-map">导航</view>
  32. </view>
  33. </view>
  34. <u-cell-group >
  35. <u-cell-item v-if="price" title="电价" :arrow="false" :value="price.costPrice+'元/度('+price.firstTime+'-'+price.latestTime+')'"> </u-cell-item>
  36. <u-cell-item v-if="deviceUser" title="联系人" :arrow="false" :value="deviceUser.realName+' '+deviceUser.phone"></u-cell-item>
  37. <view class="price-detail" v-if="price"
  38. @click="gotoUrl('pagesFinance/user/chargingDetails?id='+detail.deviceNo)"
  39. >
  40. 价格详情
  41. </view>
  42. <!-- <u-cell-item title="停车费" :arrow="false" value="新能源车2小时停车费"></u-cell-item>
  43. --> </u-cell-group>
  44. </view>
  45. <!-- 充电枪选项 -->
  46. <view class="gun-options">
  47. <u-tabs :list="list1" :is-scroll="false" :current="current" @change="change" bar-width="125" inactive-color="#777777" active-color="#101010"></u-tabs>
  48. <view class="tab-equipment" v-show="current==0" v-for="(item,i) in gunList" :key="i" >
  49. <view class="equipment-top">
  50. <text class="name">{{item.channelNo}}号充电枪</text>
  51. <!-- <text class="switch"><u-switch v-model="checked" size="40" active-color="#FF7300"></u-switch></text>
  52. <text class="radio">
  53. 开启共享</text> -->
  54. </view>
  55. <view class="state">
  56. <view class="state-item">
  57. 工作状态:{{item.workStatusText}} <text class="bot1 "
  58. :class="{
  59. bot2:!item.workStatus
  60. }"
  61. ></text>
  62. </view>
  63. <view class="state-item">
  64. 开放共享:{{!item.enableShare?'关闭':'开启'}} <text class="bot1 "
  65. :class="{
  66. bot2:item.enableShare
  67. }"
  68. ></text>
  69. </view>
  70. <view class="state-item">
  71. 开放预约:{{!item.enableAppointment ?'关闭':'开启'}} <text class="bot1 "
  72. :class="{
  73. bot2:item.enableAppointment
  74. }"
  75. ></text>
  76. </view>
  77. <view class="state-item">
  78. 联网状态:{{!detail.online?'离线':'在线'}} <text class="bot1"
  79. :class="{
  80. bot2:detail.online
  81. }"
  82. ></text>
  83. </view>
  84. <view class="iconfont more"
  85. @click="gotoUrl('pagesFinance/user/myPile?id='+item.id)"
  86. >
  87. <text class="set" >设置</text>&#xe600;
  88. </view>
  89. </view>
  90. </view>
  91. <!-- 分润比例 -->
  92. <view class="share" v-show="current==1">
  93. <view class="title" >
  94. <text class="line"></text>分润比列
  95. </view>
  96. <view class="item" v-for="(item,i) in sprList" :key="i" v-if="item.describe!='0%'" >
  97. <view >
  98. {{item.name}}
  99. </view>
  100. <view >
  101. {{item.describe}}
  102. </view>
  103. </view>
  104. </view>
  105. <!-- 设备信息 -->
  106. <view class="equipment-info" v-show="current==2">
  107. <view class="title" >
  108. <text class="line"></text>设备相关信息
  109. </view>
  110. <view class="item">
  111. <view class="">
  112. 设备型号
  113. </view>
  114. <view class="">
  115. HCD0001-A
  116. </view>
  117. </view>
  118. <view class="item">
  119. <view class="">
  120. 初次安装时间
  121. </view>
  122. <view class="">
  123. 2022-04-1
  124. </view>
  125. </view>
  126. <view class="item">
  127. <view class="">
  128. 输出功率范围(瓦)
  129. </view>
  130. <view class="">
  131. 100-400
  132. </view>
  133. </view>
  134. </view>
  135. </view>
  136. </view>
  137. </template>
  138. <script>
  139. import * as API from '@/apis/finance.js'
  140. export default {
  141. data() {
  142. return {
  143. gunList:[],
  144. detail:{
  145. },
  146. deviceUser:{
  147. phone: "",
  148. realName: ""
  149. },
  150. price:{
  151. costPrice:"",
  152. firstTime: "",
  153. latestTime: ""
  154. },
  155. sprList:[],
  156. list1: [{
  157. name: '设备列表'
  158. }, {
  159. name: '分润比例'
  160. }],
  161. list2: [{
  162. name: '是'
  163. }, {
  164. name: '否'
  165. }],
  166. timeList:[{
  167. name:"10分钟"
  168. },
  169. {
  170. name:"20分钟"
  171. },
  172. {
  173. name:"30分钟"
  174. }],
  175. current: 0,
  176. checked: false,
  177. }
  178. },
  179. onLoad(op){
  180. this.id=op.id;
  181. this.getInfo()
  182. },
  183. methods: {
  184. change(index) {
  185. this.current = index;
  186. },
  187. getInfo(){
  188. uni.showLoading({
  189. title:"加载中",mask:true,
  190. })
  191. API.carDeviceDetail({
  192. deviceId:this.id
  193. }).then((res) => {
  194. this.detail=res.data.device
  195. this.sprList=res.data.sprList
  196. this.gunList=res.data.gunList
  197. this.price=res.data.price;
  198. this.deviceUser=res.data.deviceUser;
  199. uni.hideLoading()
  200. }).catch(error => {
  201. uni.showToast({
  202. title:error
  203. })
  204. })
  205. }
  206. }
  207. }
  208. </script>
  209. <style lang="scss">
  210. page{
  211. padding-bottom: 233px;
  212. background-color: #F6F8F8;
  213. }
  214. .delete {
  215. margin-left: 85.3%;
  216. color: #cccccc;
  217. font-size: 12px
  218. }
  219. .details {
  220. width: 100%;
  221. background-color: #fff;
  222. padding: 16px 0 0px 16px;
  223. .name {
  224. height: 20px;
  225. color: rgba(16, 16, 16, 100);
  226. font-size: 20px;
  227. font-weight: 600;
  228. }
  229. .info {
  230. height: 75px;
  231. line-height: 16px;
  232. color: rgba(102, 102, 102, 100);
  233. font-size: 16px;
  234. margin-top: 12px;
  235. display: flex;
  236. // justify-content: space-between;
  237. .dc-fast {
  238. color: #CDC0FF;
  239. margin: 0 4px;
  240. }
  241. .info-text {
  242. width: 69%;
  243. height: 100%;
  244. display: flex;
  245. flex-direction: column;
  246. justify-content: space-between;
  247. .tag-items {
  248. display: flex;
  249. // justify-content: space-between;
  250. }
  251. .tag {
  252. line-height: 26px;
  253. border-radius: 4px;
  254. background-color: rgba(255, 255, 255, 100);
  255. color: rgba(119, 119, 119, 100);
  256. text-align: center;
  257. border: 1px solid rgba(119, 119, 119, 100);
  258. padding: 0 4px;
  259. margin-right: 8px;
  260. }
  261. }
  262. .info-img {
  263. // margin-left: 35px;
  264. }
  265. }
  266. .station-address {
  267. width: 100%;
  268. margin-top: 17px;
  269. position: relative;
  270. img {
  271. width: 100%;
  272. height: 100%;
  273. }
  274. .address-text {
  275. line-height: 40px;
  276. position: absolute;
  277. top: 0px;
  278. left: 0;
  279. font-size: 16px
  280. }
  281. .navigation {
  282. position: absolute;
  283. top: 0;
  284. right: 28px;
  285. }
  286. .address-font {
  287. font-size: 28px;
  288. color: #4e94ff;
  289. }
  290. .view-map {
  291. font-size: 12px;
  292. text-align: center;
  293. }
  294. }
  295. /deep/.u-cell__value{
  296. text-align: left;
  297. //margin-left: 16px;
  298. color: #101010;
  299. font-size: 16px;
  300. }
  301. /deep/.u-cell_title{
  302. width: 15% !important;
  303. font-size: 16px;
  304. color: #777777;
  305. }
  306. .u-cell{
  307. position: relative;
  308. padding: 13px 16px 13px 0 ;
  309. }
  310. .price-detail{
  311. width: 56px;
  312. height: 20px;
  313. color: rgba(22, 119, 255, 100);
  314. font-size: 14px;
  315. position: absolute;
  316. top: 15px;
  317. right: 20px;
  318. }
  319. }
  320. // 充电枪选项
  321. .gun-options{
  322. background-color: #fff;
  323. margin-top: 12px;
  324. .tab-equipment{
  325. background-color: #fff;
  326. padding: 16px 16px 16px 0;
  327. margin-left: 16px ;
  328. border-bottom: 1px solid #E5E7EA;
  329. position: relative;
  330. .equipment-top{
  331. line-height: 27px;
  332. position: relative;
  333. }
  334. .name{
  335. line-height: 20px;
  336. line-height: 20px;
  337. font-weight: 600;
  338. color: rgba(16, 16, 16, 100);
  339. }
  340. .radio{
  341. margin-left: 54px;
  342. }
  343. .switch{
  344. position:absolute;
  345. top: 3px;
  346. left: 21%;
  347. }
  348. .state{
  349. margin-top: 12px;
  350. display: flex;
  351. justify-content: space-between;
  352. width: 75%;
  353. flex-wrap: wrap;
  354. .state-item{
  355. height: 20px;
  356. line-height: 20px;
  357. margin-top: 4px;
  358. color: rgba(16, 16, 16, 100);
  359. .bot1{
  360. display: inline-block;
  361. width: 12px;
  362. height: 12px;
  363. margin-left: 2px;
  364. background-color: rgba(255, 115, 0, 100);
  365. border-radius: 999px;
  366. }
  367. .bot2{
  368. background-color: rgba(0, 185, 98, 100);
  369. }
  370. }
  371. .more{
  372. line-height: 24px;
  373. font-size: 24px;
  374. color: #b3b3b3;
  375. position: absolute;
  376. right: 20px;
  377. top: 16px;
  378. .set{
  379. display: inline-block;
  380. width: 30px;
  381. font-size: 14px;
  382. color: #1677ff;
  383. position: absolute;
  384. top: 0;
  385. left: -29px;
  386. }
  387. }
  388. }
  389. }
  390. /deep/.u-tab-bar{
  391. background-color: #00B962 !important;
  392. }
  393. .share{
  394. padding: 16px;
  395. }
  396. .equipment-info{
  397. padding: 16px;
  398. }
  399. .title{
  400. font-size: 16px;
  401. font-weight: 600;
  402. .line{
  403. display: inline-block;
  404. height:12px;
  405. width: 4px;
  406. background-color: #00B962;
  407. margin-right: 8px;
  408. }
  409. }
  410. .item{
  411. display: flex;
  412. justify-content: space-between;
  413. margin-top: 20px;
  414. }
  415. }
  416. .bottom{
  417. width: 100%;
  418. height: 64px;
  419. background-color: #fff;
  420. position: fixed;
  421. bottom: 0;
  422. display: flex;
  423. .u-btn{
  424. width: 91.4%;
  425. height: 40px;
  426. margin: auto;
  427. }
  428. }
  429. </style>