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