pileManagement.vue 10 KB

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