Commit 96971673 authored by 肖健's avatar 肖健

免费挪车牌选择车辆,车牌号不渲染的问题

parent 135efa7c
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
default: 8 default: 8
} }
}, },
data() { data() {
return { return {
focus: false, focus: false,
...@@ -63,6 +64,12 @@ ...@@ -63,6 +64,12 @@
this.$emit('input', val.join('')); this.$emit('input', val.join(''));
this.$emit('change', val); this.$emit('change', val);
}, },
value(val){
for (let i = 0 ; i < val.length; i++) {
this.fill[i] = val.substring(i,i+1)
}
this.$forceUpdate()
}
}, },
methods: { methods: {
focusHandler(index = 0) { focusHandler(index = 0) {
......
...@@ -77,9 +77,13 @@ export default { ...@@ -77,9 +77,13 @@ export default {
}, },
data() { data() {
return { return {
carNumber: "",
model1: { model1: {
carInfo: {}, carInfo: {
carNo: '',
brand: '',
carModel: '',
mileage: '',
},
}, },
rules: { rules: {
"carInfo.brand": { "carInfo.brand": {
...@@ -99,7 +103,6 @@ export default { ...@@ -99,7 +103,6 @@ export default {
max: 8, max: 8,
message: '车牌长度在7-8个字符之间' message: '车牌长度在7-8个字符之间'
}, },
{ {
type: "string", type: "string",
required: true, required: true,
...@@ -113,11 +116,6 @@ export default { ...@@ -113,11 +116,6 @@ export default {
freeCode: {}, freeCode: {},
}; };
}, },
watch: {
carNumber(num) {
//console.log(num);
},
},
methods: { methods: {
goLoveCar() { goLoveCar() {
uni.navigateTo({ uni.navigateTo({
...@@ -147,14 +145,20 @@ export default { ...@@ -147,14 +145,20 @@ export default {
}, },
getCarInfo() { getCarInfo() {
if (this.carId) { const that = this
if (that.carId) {
let opts = { let opts = {
url: '/app/vehicleAdmin/' + this.carId, url: '/app/vehicleAdmin/' + this.carId,
method: 'get' method: 'get'
}; };
this.http.httpTokenRequest(opts, {}).then(res => { that.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.model1.carInfo = res.data.data that.$nextTick(() => {
that.model1.carInfo = res.data.data;
that.model1.carInfo.carNo = res.data.data.carNo;
console.log(that.model1.carInfo)
that.$set(that.model1.carInfo, 'carNo', res.data.data.carNo);
})
} }
}) })
} }
...@@ -177,8 +181,12 @@ export default { ...@@ -177,8 +181,12 @@ export default {
this.$refs.form1.setRules(this.rules) this.$refs.form1.setRules(this.rules)
}, },
onShow() { onShow() {
this.$nextTick(() => {
this.getCarInfo() this.getCarInfo()
this.getMoveCode() this.getMoveCode()
})
}, },
onLoad(e) { onLoad(e) {
this.orderId = e.orderId this.orderId = e.orderId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment