This commit is contained in:
Vinjor 2024-11-04 14:06:18 +08:00
parent 431482c08d
commit 83830c1ba4

View File

@ -208,9 +208,8 @@ export default {
},
methods: {
onchange(e) {
const value = e.detail.value;
console.log(e.detail.value,"detail")
console.log(this.$refs.songpicker.inputSelected,"value")
this.brandId = e.detail.value[0].id
this.brandName = e.detail.value[0].brandName
},
onnodeclick(node) {
console.log(node,"node")
@ -304,6 +303,7 @@ export default {
},
//
async submit() {
// bus.$emit('updateCarInfo', this.car)
this.car.brandAndModel = [this.brandId, this.car.carModel]
//
@ -322,6 +322,8 @@ export default {
}else {
this.car.carRegisterDate = undefined
}
console.log(this.car,"car")
return
if (this.car.id != null) {
request({
url: '/admin-api/base/carMain/update',
@ -428,7 +430,7 @@ export default {
//
this.brandList.forEach((item, index) => {
if (item.brandName == res.data.brand) {
this.setCarBrand(item.brandName.id,item.brandName)
this.setCarBrand(item.id,item.brandName)
}
})
//
@ -449,9 +451,9 @@ export default {
* @param name
*/
setCarBrand(id,name){
this.brandId = id
this.brandName = name
this.$nextTick(()=>{
this.brandId = id
this.brandName = name
this.$refs.songpicker.inputSelected=[{text:name,value:id}]
})
}