pileManagement.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  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" v-if="isAllow"
  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. isAllow:false,
  145. detail:{
  146. },
  147. deviceUser:{
  148. phone: "",
  149. realName: ""
  150. },
  151. price:{
  152. costPrice:"",
  153. firstTime: "",
  154. latestTime: ""
  155. },
  156. sprList:[],
  157. list1: [{
  158. name: '设备列表'
  159. }, {
  160. name: '分润比例'
  161. }],
  162. list2: [{
  163. name: '是'
  164. }, {
  165. name: '否'
  166. }],
  167. timeList:[{
  168. name:"10分钟"
  169. },
  170. {
  171. name:"20分钟"
  172. },
  173. {
  174. name:"30分钟"
  175. }],
  176. current: 0,
  177. checked: false,
  178. }
  179. },
  180. onLoad(op){
  181. this.id=op.id;
  182. this.getInfo()
  183. },
  184. methods: {
  185. change(index) {
  186. this.current = index;
  187. },
  188. getInfo(){
  189. uni.showLoading({
  190. title:"加载中",mask:true,
  191. })
  192. API.carDeviceDetail({
  193. deviceId:this.id
  194. }).then((res) => {
  195. this.isAllow=res.data.isAllow
  196. this.detail=res.data.device
  197. this.sprList=res.data.sprList
  198. this.gunList=res.data.gunList
  199. this.price=res.data.price;
  200. this.deviceUser=res.data.deviceUser;
  201. uni.hideLoading()
  202. }).catch(error => {
  203. uni.showToast({
  204. title:error
  205. })
  206. })
  207. }
  208. }
  209. }
  210. </script>
  211. <style lang="scss">
  212. page{
  213. padding-bottom: 233px;
  214. background-color: #F6F8F8;
  215. }
  216. .delete {
  217. margin-left: 85.3%;
  218. color: #cccccc;
  219. font-size: 12px
  220. }
  221. .details {
  222. width: 100%;
  223. background-color: #fff;
  224. padding: 16px 0 0px 16px;
  225. .name {
  226. height: 20px;
  227. color: rgba(16, 16, 16, 100);
  228. font-size: 20px;
  229. font-weight: 600;
  230. }
  231. .info {
  232. height: 75px;
  233. line-height: 16px;
  234. color: rgba(102, 102, 102, 100);
  235. font-size: 16px;
  236. margin-top: 12px;
  237. display: flex;
  238. // justify-content: space-between;
  239. .dc-fast {
  240. color: #CDC0FF;
  241. margin: 0 4px;
  242. }
  243. .info-text {
  244. width: 69%;
  245. height: 100%;
  246. display: flex;
  247. flex-direction: column;
  248. justify-content: space-between;
  249. .tag-items {
  250. display: flex;
  251. // justify-content: space-between;
  252. }
  253. .tag {
  254. line-height: 26px;
  255. border-radius: 4px;
  256. background-color: rgba(255, 255, 255, 100);
  257. color: rgba(119, 119, 119, 100);
  258. text-align: center;
  259. border: 1px solid rgba(119, 119, 119, 100);
  260. padding: 0 4px;
  261. margin-right: 8px;
  262. }
  263. }
  264. .info-img {
  265. // margin-left: 35px;
  266. }
  267. }
  268. .station-address {
  269. width: 100%;
  270. margin-top: 17px;
  271. position: relative;
  272. img {
  273. width: 100%;
  274. height: 100%;
  275. }
  276. .address-text {
  277. line-height: 40px;
  278. position: absolute;
  279. top: 0px;
  280. left: 0;
  281. font-size: 16px
  282. }
  283. .navigation {
  284. position: absolute;
  285. top: 0;
  286. right: 28px;
  287. }
  288. .address-font {
  289. font-size: 28px;
  290. color: #4e94ff;
  291. }
  292. .view-map {
  293. font-size: 12px;
  294. text-align: center;
  295. }
  296. }
  297. /deep/.u-cell__value{
  298. text-align: left;
  299. //margin-left: 16px;
  300. color: #101010;
  301. font-size: 16px;
  302. }
  303. /deep/.u-cell_title{
  304. width: 15% !important;
  305. font-size: 16px;
  306. color: #777777;
  307. }
  308. .u-cell{
  309. position: relative;
  310. padding: 13px 16px 13px 0 ;
  311. }
  312. .price-detail{
  313. width: 56px;
  314. height: 20px;
  315. color: rgba(22, 119, 255, 100);
  316. font-size: 14px;
  317. position: absolute;
  318. top: 15px;
  319. right: 20px;
  320. }
  321. }
  322. // 充电枪选项
  323. .gun-options{
  324. background-color: #fff;
  325. margin-top: 12px;
  326. .tab-equipment{
  327. background-color: #fff;
  328. padding: 16px 16px 16px 0;
  329. margin-left: 16px ;
  330. border-bottom: 1px solid #E5E7EA;
  331. position: relative;
  332. .equipment-top{
  333. line-height: 27px;
  334. position: relative;
  335. }
  336. .name{
  337. line-height: 20px;
  338. line-height: 20px;
  339. font-weight: 600;
  340. color: rgba(16, 16, 16, 100);
  341. }
  342. .radio{
  343. margin-left: 54px;
  344. }
  345. .switch{
  346. position:absolute;
  347. top: 3px;
  348. left: 21%;
  349. }
  350. .state{
  351. margin-top: 12px;
  352. display: flex;
  353. justify-content: space-between;
  354. width: 75%;
  355. flex-wrap: wrap;
  356. .state-item{
  357. height: 20px;
  358. line-height: 20px;
  359. margin-top: 4px;
  360. color: rgba(16, 16, 16, 100);
  361. .bot1{
  362. display: inline-block;
  363. width: 12px;
  364. height: 12px;
  365. margin-left: 2px;
  366. background-color: rgba(255, 115, 0, 100);
  367. border-radius: 999px;
  368. }
  369. .bot2{
  370. background-color: rgba(0, 185, 98, 100);
  371. }
  372. }
  373. .more{
  374. line-height: 24px;
  375. font-size: 24px;
  376. color: #b3b3b3;
  377. position: absolute;
  378. right: 20px;
  379. top: 16px;
  380. .set{
  381. display: inline-block;
  382. width: 30px;
  383. font-size: 14px;
  384. color: #1677ff;
  385. position: absolute;
  386. top: 0;
  387. left: -29px;
  388. }
  389. }
  390. }
  391. }
  392. /deep/.u-tab-bar{
  393. background-color: #00B962 !important;
  394. }
  395. .share{
  396. padding: 16px;
  397. }
  398. .equipment-info{
  399. padding: 16px;
  400. }
  401. .title{
  402. font-size: 16px;
  403. font-weight: 600;
  404. .line{
  405. display: inline-block;
  406. height:12px;
  407. width: 4px;
  408. background-color: #00B962;
  409. margin-right: 8px;
  410. }
  411. }
  412. .item{
  413. display: flex;
  414. justify-content: space-between;
  415. margin-top: 20px;
  416. }
  417. }
  418. .bottom{
  419. width: 100%;
  420. height: 64px;
  421. background-color: #fff;
  422. position: fixed;
  423. bottom: 0;
  424. display: flex;
  425. .u-btn{
  426. width: 91.4%;
  427. height: 40px;
  428. margin: auto;
  429. }
  430. }
  431. </style>