2023-03-04 16:29:55 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
|
|
|
|
|
<el-tab-pane label="订单" name="order">
|
|
|
|
|
<stationOrderList ref="order" :stationId="stationId"/>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
|
|
|
|
<el-tab-pane label="设备" name="pile">
|
|
|
|
|
<pileList ref="pile" :stationId="stationId"/>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
|
|
|
|
<el-tab-pane label="充电接口" name="connector">
|
|
|
|
|
<connectorList ref="connector" :stationId="stationId"/>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
|
|
|
|
<el-tab-pane label="基本资料" name="stationInfo">
|
|
|
|
|
<div class="over">
|
|
|
|
|
<div id="map_wrap">
|
|
|
|
|
<MapContainer ref="map"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="menu">
|
|
|
|
|
<site-info ref="stationInfo"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
|
|
|
|
<!--<el-tab-pane label="账单" ></el-tab-pane>-->
|
|
|
|
|
|
|
|
|
|
<el-tab-pane label="计费模块" name="billing">
|
|
|
|
|
<!-- billing 文件到时引入 -->
|
|
|
|
|
<billing ref="billing" :stationId="stationId"/>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
|
|
|
|
<el-tab-pane label="客户管理" name="member">
|
|
|
|
|
角色管理
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
|
|
|
|
<el-tab-pane label="运营管理" name="operation">
|
2023-04-10 14:01:48 +08:00
|
|
|
<el-form>
|
|
|
|
|
<el-form-item label="当前配置二维码规则:">
|
|
|
|
|
<el-input v-model="stationDetail.qrcodePrefix" maxlength="100px" :disabled="true"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
2023-04-17 09:14:27 +08:00
|
|
|
<el-button icon="el-icon-setting" size="big" @click="handleCreate" v-has-permi = "['pile:station:edit']">配置参数</el-button>
|
2023-04-10 14:01:48 +08:00
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
2023-03-04 16:29:55 +08:00
|
|
|
</el-tab-pane>
|
2023-03-31 16:19:26 +08:00
|
|
|
|
|
|
|
|
<el-dialog :title="dialogTitle" :visible.sync="dialogFormVisible">
|
|
|
|
|
<el-form ref="form" :model="form" @submit.native.prevent>
|
|
|
|
|
<el-form-item label="二维码前缀:" prop="prefix" label-width="100px">
|
|
|
|
|
<el-input v-model="form.prefix" placeholder="请输入二维码前缀" style="width: 300px"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer" align="center">
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
2023-03-04 16:29:55 +08:00
|
|
|
</el-tabs>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import Billing from "./components/billing.vue";
|
|
|
|
|
import SiteInfo from "./components/SiteInfo.vue";
|
|
|
|
|
import connectorList from "./connectorList.vue";
|
|
|
|
|
import pileList from "./pileList.vue";
|
|
|
|
|
import MapContainer from "../../../components/MapContainer/MapContainer.vue";
|
|
|
|
|
import stationOrderList from "@/views/pile/station/stationOrderList";
|
2023-03-31 16:19:26 +08:00
|
|
|
import {updatePlateNumber} from "@/api/member/info";
|
2023-04-10 14:01:48 +08:00
|
|
|
import {getStationInfo, updateStationQRCodePrefix} from "@/api/pile/station";
|
2023-03-04 16:29:55 +08:00
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
SiteInfo,
|
|
|
|
|
pileList,
|
|
|
|
|
connectorList,
|
|
|
|
|
Billing,
|
|
|
|
|
MapContainer,
|
|
|
|
|
stationOrderList
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
activeName: 'pile',
|
2023-03-31 16:19:26 +08:00
|
|
|
form: {
|
|
|
|
|
prefix: '',
|
|
|
|
|
},
|
|
|
|
|
dialogTitle: '',
|
|
|
|
|
qrcodePrefix: '',
|
|
|
|
|
dialogFormVisible: false,
|
2023-03-04 16:29:55 +08:00
|
|
|
stationId: this.$route.params.id,
|
2023-03-11 15:16:22 +08:00
|
|
|
stationName: this.$route.params.stationName,
|
2023-04-10 14:01:48 +08:00
|
|
|
stationDetail: {}
|
2023-03-04 16:29:55 +08:00
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
// console.log(this.stationId, "充电桩详情 create");
|
2023-03-11 15:29:55 +08:00
|
|
|
// const stationId = this.stationId;
|
2023-03-11 15:16:22 +08:00
|
|
|
const stationName = this.stationName;
|
|
|
|
|
const title = "【" + stationName + "】站点详情";
|
|
|
|
|
const route = Object.assign({}, this.$route, { title: `${title}` })
|
2023-04-10 14:01:48 +08:00
|
|
|
this.$store.dispatch('tagsView/updateVisitedView', route);
|
|
|
|
|
this.queryStationInfo();
|
2023-03-04 16:29:55 +08:00
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.initializeData(this.activeName);
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handleClick(tab, event) {
|
|
|
|
|
// console.log(tab, event);
|
|
|
|
|
this.initializeData(tab.name);
|
|
|
|
|
},
|
|
|
|
|
// 执行对应页面的查询数据方法
|
|
|
|
|
initializeData(name) {
|
|
|
|
|
console.log("执行对应页面的查询数据方法", name)
|
|
|
|
|
if (name === "pile") {
|
|
|
|
|
this.$refs.pile.getPileList();
|
|
|
|
|
} else if (name === "connector") {
|
|
|
|
|
this.$refs.connector.getList();
|
|
|
|
|
} else if (name === "billing") {
|
|
|
|
|
this.$refs.billing.getStationBillingTemplateList();
|
|
|
|
|
} else if (name === "stationInfo") {
|
|
|
|
|
this.$refs.map.queryStationInfo();
|
|
|
|
|
this.$refs.stationInfo.queryStationInfo();
|
|
|
|
|
} else if (name === "order") {
|
|
|
|
|
this.$refs.order.dataLoading();
|
|
|
|
|
}
|
2023-03-31 16:19:26 +08:00
|
|
|
},
|
2023-04-10 14:01:48 +08:00
|
|
|
queryStationInfo() {
|
|
|
|
|
console.log("stationId", this.stationId);
|
|
|
|
|
getStationInfo(this.stationId).then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.stationDetail = res.data;
|
|
|
|
|
});
|
|
|
|
|
console.log("queryStationInfo==", this.stationDetail);
|
|
|
|
|
},
|
2023-03-31 16:19:26 +08:00
|
|
|
// 配置参数按钮
|
|
|
|
|
handleCreate() {
|
|
|
|
|
this.dialogTitle = '配置参数';
|
|
|
|
|
this.form = {
|
|
|
|
|
prefix: '',
|
|
|
|
|
};
|
|
|
|
|
this.dialogFormVisible = true;
|
|
|
|
|
},
|
|
|
|
|
// 配置参数提交按钮
|
|
|
|
|
submitForm(form) {
|
|
|
|
|
const param = {
|
|
|
|
|
stationId: this.stationId,
|
|
|
|
|
qrcodePrefix: this.form.prefix
|
|
|
|
|
}
|
|
|
|
|
console.log("form:", this.form);
|
|
|
|
|
console.log("param:", param);
|
|
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
|
|
if(valid){
|
|
|
|
|
updateStationQRCodePrefix(param).then((response) => {
|
|
|
|
|
this.$modal.msgSuccess('修改成功')
|
|
|
|
|
this.dialogFormVisible = false
|
|
|
|
|
})
|
|
|
|
|
} else{
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 取消按钮
|
|
|
|
|
cancel() {
|
|
|
|
|
this.dialogFormVisible = false
|
2023-03-04 16:29:55 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
#container {
|
|
|
|
|
width: 800px;
|
|
|
|
|
height: 400px;
|
|
|
|
|
// margin-left: 50%; transform: translate(-50%,0);
|
|
|
|
|
}
|
|
|
|
|
</style>
|