diff --git a/src/layout/components/CarBrandSelector/index.vue b/src/layout/components/CarBrandSelector/index.vue index 8426ec4..07324f8 100644 --- a/src/layout/components/CarBrandSelector/index.vue +++ b/src/layout/components/CarBrandSelector/index.vue @@ -1,74 +1,52 @@ - + created() { + this.getData(); + }, + methods: { + // 处理过滤方法 + handleFilter(node, keyword) { + console.log(keyword, 'Filtering:'); + //请求相关选项 + this.getData(keyword); + }, + getData(keyword) { + let param = { + modelName: keyword, + } + CarBrandSelectorApi.searchBrand(param).then(res => { + this.options = res.data + }); + }, + + + }, + + data() { + return { + selectedOptions: [], // 存储已选择的选项 + + options: [], //选项集合 + + }; + } + }; + + \ No newline at end of file diff --git a/src/views/base/carmain/CarMainForm.vue b/src/views/base/carmain/CarMainForm.vue index 653e691..dba6dca 100644 --- a/src/views/base/carmain/CarMainForm.vue +++ b/src/views/base/carmain/CarMainForm.vue @@ -13,7 +13,9 @@ - + + + - + 确 定 取 消 - + @@ -90,6 +92,7 @@ export default { }, data() { return { + tesst:[ "5d8eb726839bbe64a4f405e0cce29274", "7c8493517c4eaa0f0c56f40f0626e8d2" ], // 弹出层标题 dialogTitle: "", // 是否显示弹出层 @@ -149,6 +152,10 @@ export default { await this.$refs["formRef"].validate(); this.formLoading = true; try { + console.log("before",this.formData); + this.formData.carModel = this.formData.carModel[this.formData.carModel.length-1]; + console.log("after",this.formData); + const data = this.formData; // 修改的提交 if (data.id) {