mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-05 10:30:12 +08:00
后管页面新增 停车平台配置
This commit is contained in:
@@ -129,17 +129,87 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item>
|
||||
<!-- <el-button size="big" @click="submitConfigForm" v-has-permi="['pile:station:edit']">提交</el-button>-->
|
||||
<el-button size="big" @click="pushStation" v-has-permi="['pile:station:edit']">
|
||||
推送站点信息
|
||||
</el-button>
|
||||
<!-- <el-button icon="el-icon-edit" size="big" @click="openEdit" v-has-permi = "['pile:station:edit']" >编辑参数</el-button>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<h2>绑定停车平台(配置完成后,订单完成将自动下发优惠券)</h2>
|
||||
<el-button icon="el-icon-edit" size="big" @click="parkingOpenEdit" v-has-permi="['pile:station:edit']">编辑参数
|
||||
</el-button>
|
||||
<el-form ref="parkingForm" :model="parkingInfo" label-position="right"
|
||||
label-width="200px"
|
||||
style="margin-top:10px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="停车平台名称:" prop="type">
|
||||
<el-select
|
||||
v-model="parkingInfo.parkingName"
|
||||
placeholder="请选择停车平台名称"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 220px"
|
||||
:disabled="parkingDisableFlag"
|
||||
@change="getParkingInfo($event)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in parkingInfoList"
|
||||
:key="item.id"
|
||||
:label="item.parkingName"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<!-- <el-input placeholder="请输入" v-model="stationSettingInfo.type" :disabled="disableFlag"/>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="停车场库商户id:" prop="parkingMerchantId">
|
||||
<el-input placeholder="请输入" v-model="parkingInfo.parkingMerchantId"
|
||||
:disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="停车场库secretKey:" prop="secretKey">
|
||||
<el-input placeholder="请输入" v-model="parkingInfo.secretKey"
|
||||
:disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="停车场库appId:" prop="appId">
|
||||
<el-input placeholder="请输入" v-model="parkingInfo.appId"
|
||||
:disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="票券id:" prop="couponId">
|
||||
<el-input placeholder="请输入" v-model="parkingInfo.couponId"
|
||||
:disabled="true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item>
|
||||
<el-button size="big" @click="saveParkingSetting(parkingInfo.id)" v-has-permi="['pile:station:edit']">
|
||||
保存
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card style="margin-top:10px">
|
||||
<h2>地锁二维码</h2>
|
||||
<el-form label-position="right" label-width="200px" style="margin-top:10px">
|
||||
@@ -196,12 +266,12 @@ import MapContainer from "../../../components/MapContainer/MapContainer.vue";
|
||||
import stationOrderList from "@/views/pile/station/stationOrderList";
|
||||
import stationWhiteList from "@/views/pile/station/stationWhiteList";
|
||||
import {
|
||||
getStationInfo,
|
||||
updateStationQRCodePrefix,
|
||||
getSettingByStationId,
|
||||
updateSettingByStationId,
|
||||
pushStationInfo,
|
||||
getSettingInfo,
|
||||
getStationInfo,
|
||||
updateStationQRCodePrefix,
|
||||
getSettingByStationId,
|
||||
updateSettingByStationId,
|
||||
pushStationInfo,
|
||||
getSettingInfo, getParkingInfoList, bindParkingPlatform,
|
||||
} from "@/api/pile/station";
|
||||
import Whitelist from "@/views/pile/station/stationWhiteList";
|
||||
import OrderReport from './orderReport.vue';
|
||||
@@ -226,6 +296,8 @@ export default {
|
||||
form: {
|
||||
prefix: '',
|
||||
},
|
||||
parkingInfo:{},
|
||||
parkingInfoList:[],
|
||||
queryGroundLockQrCode: '',
|
||||
dialogTitle: '',
|
||||
qrcodePrefix: '',
|
||||
@@ -237,6 +309,7 @@ export default {
|
||||
stationLng: null,
|
||||
stationSettingInfo: {},
|
||||
disableFlag: true,
|
||||
parkingDisableFlag: true,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -247,8 +320,9 @@ export default {
|
||||
const title = "【" + stationName + "】站点详情";
|
||||
const route = Object.assign({}, this.$route, {title: `${title}`})
|
||||
this.$store.dispatch('tagsView/updateVisitedView', route);
|
||||
this.queryStationInfo();
|
||||
this.getStationSettingInfo();
|
||||
this.getParkingList();
|
||||
this.queryStationInfo();
|
||||
this.getStationSettingInfo();
|
||||
},
|
||||
mounted() {
|
||||
this.initializeData(this.activeName);
|
||||
@@ -284,6 +358,10 @@ export default {
|
||||
this.stationLat = res.data.stationLat
|
||||
this.stationLng = res.data.stationLng
|
||||
console.log(this.stationLat, this.stationLng, "父组件里面的经纬度")
|
||||
console.log("res.data", res.data)
|
||||
if (res.data.parkingId != null) {
|
||||
this.getParkingInfo(parseInt(res.data.parkingId))
|
||||
}
|
||||
});
|
||||
console.log("queryStationInfo==", this.stationDetail);
|
||||
},
|
||||
@@ -316,10 +394,32 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
// 获取停车平台列表
|
||||
getParkingList() {
|
||||
getParkingInfoList().then((response) =>{
|
||||
console.info("response", response)
|
||||
this.parkingInfoList = response.obj;
|
||||
})
|
||||
},
|
||||
// 通过id获取停车平台信息
|
||||
getParkingInfo(parkingId) {
|
||||
console.log("parkingId", parkingId)
|
||||
this.parkingInfoList.forEach(item => {
|
||||
if (parkingId === item.id){
|
||||
console.log("item", item)
|
||||
this.parkingInfo = item;
|
||||
// console.log("this.parkingInfo", this.parkingInfo)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 开放编辑按钮
|
||||
openEdit() {
|
||||
this.disableFlag = this.disableFlag === false;
|
||||
},
|
||||
parkingOpenEdit() {
|
||||
this.parkingDisableFlag = this.parkingDisableFlag === false;
|
||||
},
|
||||
|
||||
// 提交配置设置
|
||||
submitConfigForm() {
|
||||
@@ -357,6 +457,17 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
// 绑定站点与停车平台配置
|
||||
saveParkingSetting(parkingId) {
|
||||
console.log("parkingId", parkingId)
|
||||
const params = {
|
||||
stationId: this.stationId,
|
||||
parkingId: parkingId,
|
||||
}
|
||||
bindParkingPlatform(params).then(response =>{
|
||||
console.log("绑定站点与停车平台配置 response", response)
|
||||
})
|
||||
},
|
||||
// 配置参数按钮
|
||||
handleCreate() {
|
||||
this.dialogTitle = '配置参数';
|
||||
|
||||
@@ -176,7 +176,6 @@
|
||||
filterable
|
||||
placeholder="请选择产品型号"
|
||||
v-selectLoadMore="selectLoadMore"
|
||||
:remote-method="remoteMethod"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in modelList"
|
||||
|
||||
Reference in New Issue
Block a user