pileManagement.vue 9.4 KB

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