代码补正
This commit is contained in:
parent
9a74a8414f
commit
8dc907e992
@ -113,7 +113,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-button :loading="buttonLoading" icon="el-icon-date" @click="compute" size="small" type="primary">计算</el-button>
|
||||
<el-button :loading="buttonLoading" icon="el-icon-date" @click="compute" size="small" type="primary">
|
||||
计算
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-collapse-item>
|
||||
@ -224,6 +226,10 @@ export default {
|
||||
async compute() {
|
||||
this.buttonLoading = true
|
||||
try {
|
||||
const brand = this.formData.brandAndModel
|
||||
if (typeof brand === 'string'){
|
||||
this.formData.brandAndModel = [brand, this.formData?.carModel]
|
||||
}
|
||||
const data = this.formData;
|
||||
debugger
|
||||
const res = await CarMainApi.compute(data);
|
||||
@ -259,7 +265,10 @@ export default {
|
||||
async submitForm() {
|
||||
// 校验主表
|
||||
// await this.$refs["formRef"].validate();
|
||||
this.formData.brandAndModel = [this.formData?.brandAndModel, this.formData?.carModel]
|
||||
const brand = this.formData.brandAndModel
|
||||
if (typeof brand === 'string'){
|
||||
this.formData.brandAndModel = [brand, this.formData?.carModel]
|
||||
}
|
||||
this.formLoading = true;
|
||||
try {
|
||||
const data = this.formData;
|
||||
|
Loading…
Reference in New Issue
Block a user