master
lion 1 week ago
parent dc37f4822e
commit a34129c6cf

@ -2,5 +2,5 @@
ENV = 'development' ENV = 'development'
# base api与测试/正式环境同一后端域名) # base api与测试/正式环境同一后端域名)
VUE_APP_BASE_API = http://yxbd-fangke.ali251.langye.net VUE_APP_BASE_API = https://yxbd-fangke.ali251.langye.net
VUE_APP_UPLOAD_API = http://yxbd-fangke.ali251.langye.net/api/admin/upload-file VUE_APP_UPLOAD_API = https://yxbd-fangke.ali251.langye.net/api/admin/upload-file

@ -642,6 +642,12 @@
this.getLabel() this.getLabel()
}, },
methods: { methods: {
syncCarsToForm() {
//
this.form.cars = (this.carsList || [])
.map(item => (item && item.car ? String(item.car).trim() : ""))
.filter(Boolean)
},
async getDetail() { async getDetail() {
const res = await show({ const res = await show({
@ -818,6 +824,7 @@
}, },
submit() { submit() {
let that = this let that = this
this.syncCarsToForm()
if(that.form.credent==1){ if(that.form.credent==1){
const regtest = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/ const regtest = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
if(!regtest.test(that.form.idcard)){ if(!regtest.test(that.form.idcard)){
@ -833,11 +840,7 @@
} }
} }
that.form.follw_people = that.followList that.form.follw_people = that.followList
let _car = [] this.syncCarsToForm()
for(var k of that.carsList){
_car.push(k.car)
}
this.form.cars = _car
console.log("this.form.cars",this.form.cars) console.log("this.form.cars",this.form.cars)
// return // return
if(this.visitType==3){ if(this.visitType==3){
@ -859,6 +862,12 @@
} }
}, },
watch: { watch: {
carsList: {
deep: true,
handler() {
this.syncCarsToForm()
}
},
isShow(newVal) { isShow(newVal) {
if (newVal) { if (newVal) {
console.log("this.visitType",this.visitType) console.log("this.visitType",this.visitType)

Loading…
Cancel
Save