mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-06 11:00:13 +08:00
新增 站点管理配置下发二维码地址
This commit is contained in:
@@ -36,8 +36,20 @@
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="运营管理" name="operation">
|
||||
|
||||
<el-button icon="el-icon-setting" size="big" @click="handleCreate">配置参数</el-button>
|
||||
</el-tab-pane>
|
||||
|
||||
<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>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
@@ -49,6 +61,8 @@ import connectorList from "./connectorList.vue";
|
||||
import pileList from "./pileList.vue";
|
||||
import MapContainer from "../../../components/MapContainer/MapContainer.vue";
|
||||
import stationOrderList from "@/views/pile/station/stationOrderList";
|
||||
import {updatePlateNumber} from "@/api/member/info";
|
||||
import {updateStationQRCodePrefix} from "@/api/pile/station";
|
||||
export default {
|
||||
components: {
|
||||
SiteInfo,
|
||||
@@ -61,6 +75,12 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
activeName: 'pile',
|
||||
form: {
|
||||
prefix: '',
|
||||
},
|
||||
dialogTitle: '',
|
||||
qrcodePrefix: '',
|
||||
dialogFormVisible: false,
|
||||
stationId: this.$route.params.id,
|
||||
stationName: this.$route.params.stationName,
|
||||
};
|
||||
@@ -81,7 +101,6 @@ export default {
|
||||
// console.log(tab, event);
|
||||
this.initializeData(tab.name);
|
||||
},
|
||||
|
||||
// 执行对应页面的查询数据方法
|
||||
initializeData(name) {
|
||||
console.log("执行对应页面的查询数据方法", name)
|
||||
@@ -97,6 +116,37 @@ export default {
|
||||
} else if (name === "order") {
|
||||
this.$refs.order.dataLoading();
|
||||
}
|
||||
},
|
||||
// 配置参数按钮
|
||||
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
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user