pileManagement.vue 10 KB

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