Commit 96971673 authored by 肖健's avatar 肖健

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

parent 135efa7c
......@@ -46,6 +46,7 @@
default: 8
}
},
data() {
return {
focus: false,
......@@ -63,6 +64,12 @@
this.$emit('input', val.join(''));
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: {
focusHandler(index = 0) {
......
......@@ -73,13 +73,17 @@
import CarNumber from "@/common/codecook-carnumber/codecook-carnumber.vue";
export default {
components: {
CarNumber,
CarNumber,
},
data() {
return {
carNumber: "",
model1: {
carInfo: {},
carInfo: {
carNo: '',
brand: '',
carModel: '',
mileage: '',
},
},
rules: {
"carInfo.brand": {
......@@ -95,17 +99,16 @@ export default {
trigger: ["blur", "change"],
},
"carInfo.carNo": [{
min: 7,
max: 8,
message: '车牌长度在7-8个字符之间'
},
{
type: "string",
required: true,
message: "请填写车牌号",
trigger: ["blur", "change"],
},
min: 7,
max: 8,
message: '车牌长度在7-8个字符之间'
},
{
type: "string",
required: true,
message: "请填写车牌号",
trigger: ["blur", "change"],
},
]
},
carId: '',
......@@ -113,11 +116,6 @@ export default {
freeCode: {},
};
},
watch: {
carNumber(num) {
//console.log(num);
},
},
methods: {
goLoveCar() {
uni.navigateTo({
......@@ -147,15 +145,21 @@ export default {
},
getCarInfo() {
if (this.carId) {
const that = this
if (that.carId) {
let opts = {
url: '/app/vehicleAdmin/' + this.carId,
method: 'get'
};
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
this.model1.carInfo = res.data.data
}
that.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
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 {
this.$refs.form1.setRules(this.rules)
},
onShow() {
this.$nextTick(() => {
this.getCarInfo()
this.getMoveCode()
})
},
onLoad(e) {
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