123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- <template>
- <view class="">
- <view class="drawerBox">
- <view class="top">
- <view class="title">充电设置</view>
- <view class="handler">
- <view class="cancel" @click="close">取消</view>
- <view class="save" @click="SubmitPublic">保存</view>
- </view>
- </view>
- </view>
- <view class="main_drawe">
- <uni-forms :modelValue="fromData">
- <uni-forms-item label="当前充电:" name="name" label-align="right" label-width="120px">
- <uni-easyinput type="text" v-model="fromData.comState== 0 ?'插枪充电':'线束充电'" placeholder="请输入"
- disabled />
- </uni-forms-item>
- <uni-forms-item label="枪号:" name="arr" label-width="120px" label-align="right">
- <uni-data-select v-model="fromData.Guncall" :localdata="fromData.arr" @change="changegun">
- </uni-data-select>
- </uni-forms-item>
- <uni-forms-item label="按类型设置:" name="arrType" label-width="120px" label-align="right">
- <uni-data-select v-model="fromData.setType" :localdata="fromData.arrType" @change="changeId">
- </uni-data-select>
- </uni-forms-item>
- <uni-forms-item label="充电功率:" name="name" label-align="right" label-width="120px" v-if="fromData.setType !=0">
- <uni-easyinput type="number" v-model="fromData.powerNum" placeholder="请输入" maxlength="4"/>
- <view class="kwh">
- {{fromData.setType == 2 ?'%': fromData.setType == 3 ?'A':'kWh'}}
- </view>
- </uni-forms-item>
- </uni-forms>
- </view>
- </view>
- </template>
- <script>
- export default {
- props: ['infodata'],
- data() {
- return {
-
- fromData: {
- arr: [{
- text: 'A枪',
- value: '0'
- }, {
- text: 'B枪',
- value: '1'
- }],
- arrType: [{
- text: '桩自主控制功率',
- value: '0'
- },
- {
- text: '功率值',
- value: '1'
- },
- {
- text: '功率百分比',
- value: '2'
- }, {
- text: '输出电流',
- value: '3'
- }
- ],
- gunNo: '',
- comState: 1, //充电类型
- Guncall: '',
- setType: '',
- cangnum:0,//仓号
- powerNum:'',
- },
- }
- },
- methods: {
- //下拉事件
- changeId() {
- console.log(123)
- },
- //下拉事件
- changegun() {
- },
- //取消
- close() {
- this.$emit('closeDrawer')
- },
- // 保存
- SubmitPublic() {
- this.$emit('save',this.fromData)
- }
- },
- mounted() {
- this.fromData.comState = this.infodata.chgType
- if(this.fromData.comState == 0){ //0是插枪充电 1是线束充电
- this.fromData.arr = [ {text: "A枪",value: "0",},{text: "B枪",value: "1",}]
- }else{
- this.fromData.arr = [ {text: "A枪",value: "0",}]
- }
- this.fromData.cangnum = this.infodata.chargerInfoVo.chargerCode
- }
- }
- </script>
- <style lang="scss" scoped>
- ::v-deep .uni-forms-item__content {
- background: rgba(255, 255, 255, 0);
- border-radius: 2px 2px 2px 2px;
- border: 1px solid #263042;
- .uni-easyinput__content {
- background: none !important;
- border: none !important;
- color: #fff;
- }
- }
- .kwh {
- width: 50px;
- height: 35px;
- background: #263042;
- font-size: 14px;
- font-weight: 400;
- color: #4C5D71;
- line-height: 35px;
- position: absolute;
- right: 0;
- top: 0px;
- text-align: center;
- }
- ::v-deep .uni-select__selector {
- background: #111827;
- border: 1px solid #263042;
- color: #606266;
- z-index: 9999999;
- }
- ::v-deep .uni-select {
- border: none;
- }
- ::v-deep .uni-popper__arrow::after {
- display: none;
- }
- ::v-deep .uni-popper__arrow {
- display: none;
- }
- ::v-deep .uni-select__input-text {
- color: #fff;
- }
- .main_drawe {
- padding: 20px;
- margin-top: 80px;
- }
- .drawerBox {
- display: flex;
- flex-direction: column;
- height: 100%;
- .top {
- width: 100%;
- height: 74px;
- line-height: 54px;
- border-bottom: 1px solid rgba(65, 74, 99, 0.5);
- box-sizing: border-box;
- z-index: 999;
- padding: 0px 20px;
- display: flex;
- padding-top: 20px;
- background-color: #141A25;
- position: fixed;
- top: 0;
- .title {
- min-width: 74px;
- white-space: nowrap;
- font-size: 16px;
- font-weight: 500;
- color: #FFFFFF;
- position: relative;
- }
- .title::before {
- content: '';
- width: 100%;
- position: absolute;
- height: 2px;
- background: #FFFFFF;
- box-shadow: 0px 0px 6px 0px rgba(255, 255, 255, 0.8);
- bottom: -1px;
- }
- .close {
- width: 24px;
- height: 24px;
- color: #FFFFFF;
- margin-left: auto;
- font-size: 14px;
- text-align: center;
- vertical-align: middle;
- }
- .handler {
- display: flex;
- margin-left: auto;
- height: 54px;
- align-items: center;
- .cancel {
- width: 60px;
- height: 54px;
- border-radius: 2px;
- border: 1px solid #263042;
- font-size: 14px;
- font-weight: 400;
- color: #FFFFFF;
- text-align: center;
- line-height: 54px;
- }
- .save {
- width: 60px;
- height: 54px;
- background: #91FDB9;
- border-radius: 2px;
- text-align: center;
- line-height: 54px;
- font-size: 14px;
- font-weight: 400;
- color: black;
- }
- }
- }
- }
- </style>
|