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