Commit fa02d604 by yancanhua

fix: 前端自测问题修改

1 parent 7a291eb9
......@@ -54,7 +54,7 @@
<a-form-item label="品牌偏好" name="vehicleBrand">
<a-select v-model:value="pageData.vehicleBrand" style="width: 100%;" mode="multiple"
:max-tag-count="3" :max-tag-text-length="10" placeholder="请选择品牌偏好">
<a-select-option v-for="(item, index) in brands" :key="index" :value="item.value">
<a-select-option v-for="(item, index) in brands" :key="index" :value="item.label">
{{ item.label }}
</a-select-option>
</a-select>
......@@ -144,7 +144,7 @@ export default class PreferenceForm extends FormComponent<Venue> {
this.pageData.vehicleAge = (data.vehicleAge || '').split(',').filter(Boolean);
this.pageData.vehicleFuelType = (data.vehicleFuelType || '').split(',').filter(Boolean);
this.pageData.vehicleType = (data.vehicleType || '').split(',').filter(Boolean);
this.pageData.vehicleBrand = (JSON.parse(data.brandList || '[]')).map(item => item.id);
this.pageData.vehicleBrand = (JSON.parse(data.brandList || '[]')).map(item => item.name);
}
handleCitiesChange(value, selectedOptions: DefaultOptionType[]): void {
......@@ -158,7 +158,7 @@ export default class PreferenceForm extends FormComponent<Venue> {
console.log('formValue', formValue);
const vehicleBrandList = (this.pageData.vehicleBrand || []).sort((a, b) => a - b);
const brandList = vehicleBrandList.map(item => {
const brandItem = this.brands.find(brand => brand.value === item) || {};
const brandItem = this.brands.find(brand => brand.label === item) || {};
return { name: brandItem?.label || '', id: brandItem.value || '' }
});
const paramsData = {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!