token问题修复2
This commit is contained in:
@ -150,20 +150,16 @@ export default {
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const token = urlParams.get('token');
|
||||
this.$toast("车辆编辑打印token",token)
|
||||
this.id=this.$route.query?.id || ''
|
||||
// const urlParams = new URLSearchParams(window.location.search);
|
||||
// const token = urlParams.get('token');
|
||||
// this.$toast("车辆编辑打印token",token)
|
||||
this.id=this.$route.params?.id || ''
|
||||
this.$toast('id:', this.id)
|
||||
const selectElement = document.getElementById('mySelect');
|
||||
selectElement.addEventListener('change', function() {
|
||||
this.selectedOption=selectElement.value;
|
||||
// console.log(this.selectedOption,"11")
|
||||
});
|
||||
await this.getTypeList();
|
||||
// console.log(this.selectedOption,"22")
|
||||
this.id=this.$route.query?.id || ''
|
||||
console.log("this.$route.query",this.id);
|
||||
await this.vehicleInfo()
|
||||
},
|
||||
methods:{
|
||||
@ -179,7 +175,6 @@ export default {
|
||||
})
|
||||
if(res.code === 200){
|
||||
let result=res.data;
|
||||
console.log("获取信息",res)
|
||||
this.id=result.vehicleId
|
||||
this.carNum=result.plateNumber
|
||||
this.isJoin=result.hasPolymerization.code
|
||||
|
@ -23,7 +23,7 @@
|
||||
<div class="codeLeft">{{item.plateNumber}} / {{item.vehicleTypeString}}</div>
|
||||
<div class="twoBtn">
|
||||
<button class="del" @click="deleteItem(item.vehicleId)">删除</button>
|
||||
<button class="revise" @click="goPage('vehicleAdd',{ id: item.vehicleId })">修改</button>
|
||||
<button class="revise" @click="updateVehlcle(item)">修改</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carType">{{ item.serviceName }}</div>
|
||||
@ -58,13 +58,17 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.$toast('window.location', window.location)
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
// const token = urlParams.get('token');
|
||||
this.$toast("车辆管理打印token", JSON.stringify(urlParams))
|
||||
|
||||
this.getVehicleList();
|
||||
},
|
||||
methods:{
|
||||
updateVehlcle(item){
|
||||
this.$router.push({
|
||||
name:'vehicleAdd',
|
||||
params:{
|
||||
id:item.vehicleId
|
||||
}
|
||||
})
|
||||
},
|
||||
async getVehicleList(){
|
||||
let result = await supplierVehicleList({
|
||||
pageNum:this.pageNum,
|
||||
|
Reference in New Issue
Block a user