1
This commit is contained in:
parent
431482c08d
commit
83830c1ba4
@ -208,9 +208,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onchange(e) {
|
onchange(e) {
|
||||||
const value = e.detail.value;
|
this.brandId = e.detail.value[0].id
|
||||||
console.log(e.detail.value,"detail")
|
this.brandName = e.detail.value[0].brandName
|
||||||
console.log(this.$refs.songpicker.inputSelected,"value")
|
|
||||||
},
|
},
|
||||||
onnodeclick(node) {
|
onnodeclick(node) {
|
||||||
console.log(node,"node")
|
console.log(node,"node")
|
||||||
@ -304,6 +303,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
async submit() {
|
async submit() {
|
||||||
|
|
||||||
// bus.$emit('updateCarInfo', this.car)
|
// bus.$emit('updateCarInfo', this.car)
|
||||||
this.car.brandAndModel = [this.brandId, this.car.carModel]
|
this.car.brandAndModel = [this.brandId, this.car.carModel]
|
||||||
//将日期转为时间戳
|
//将日期转为时间戳
|
||||||
@ -322,6 +322,8 @@ export default {
|
|||||||
}else {
|
}else {
|
||||||
this.car.carRegisterDate = undefined
|
this.car.carRegisterDate = undefined
|
||||||
}
|
}
|
||||||
|
console.log(this.car,"car")
|
||||||
|
return
|
||||||
if (this.car.id != null) {
|
if (this.car.id != null) {
|
||||||
request({
|
request({
|
||||||
url: '/admin-api/base/carMain/update',
|
url: '/admin-api/base/carMain/update',
|
||||||
@ -428,7 +430,7 @@ export default {
|
|||||||
//车辆品牌自动定位
|
//车辆品牌自动定位
|
||||||
this.brandList.forEach((item, index) => {
|
this.brandList.forEach((item, index) => {
|
||||||
if (item.brandName == res.data.brand) {
|
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
|
* @param name
|
||||||
*/
|
*/
|
||||||
setCarBrand(id,name){
|
setCarBrand(id,name){
|
||||||
this.brandId = id
|
|
||||||
this.brandName = name
|
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
|
this.brandId = id
|
||||||
|
this.brandName = name
|
||||||
this.$refs.songpicker.inputSelected=[{text:name,value:id}]
|
this.$refs.songpicker.inputSelected=[{text:name,value:id}]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user