From 6f4a65096272388e3834cbf35080e4b8035f1c9f Mon Sep 17 00:00:00 2001 From: cxc Date: Wed, 27 Jul 2022 17:30:27 +0800 Subject: [PATCH] fixed --- src/views/components/ExpertForm/index.vue | 66 +---------------------- src/views/platform/industry/index.vue | 4 +- 2 files changed, 3 insertions(+), 67 deletions(-) diff --git a/src/views/components/ExpertForm/index.vue b/src/views/components/ExpertForm/index.vue index cab8465..30056d3 100644 --- a/src/views/components/ExpertForm/index.vue +++ b/src/views/components/ExpertForm/index.vue @@ -294,7 +294,6 @@ import CityOptions from "@/views/components/CityOptions"; import InputBoxAdd from "@/views/components/InputBoxAdd"; import { researchSelect } from "@/api/dataList/research"; import { laboratorySelect } from "@/api/dataList/laboratory"; -import { tenantSelect } from "@/api/subPlatform/tenant"; import { enterpriseOptions } from "@/utils/parameter"; import { reactive, ref, toRefs } from "vue"; import WangEditor from "../../../components/WangEditor/index.vue"; @@ -402,33 +401,7 @@ const nameName = computed(() => { return ""; } }); -// 获取站点列表 -const getSiteList = async () => { - const resp = await tenantSelect(); - siteList.value = resp.rows; -}; -const check = async () => { - // console.log(cityFormRef.value); - // console.log(cityFormRef.value.formRef.value.validate()); - // cityFormRef.value - // .validateForm() - // .then((re) => { - // console.log(re); - // }) - // .catch((error) => { - // console.log(error); - // }); - // console.log(await keywordsFormRef.value.validateForm()); - const res = await validateForm(); - console.log(res); -}; -const validate1 = async () => { - try { - return await formRef.value.validate(); - } catch (error) { - return false; - } -}; + const validateForm = async () => { let formValid; try { @@ -467,32 +440,6 @@ const validateForm = async () => { defineExpose({ validateForm, }); -// const submitForm = () => { -// let flag = false; -// if (this.formType == 1) { -// this.$refs["form"].validate((valid) => { -// const cityForm = this.$refs.cityForm.submitForm(); // 城市 -// const fieldForm = this.$refs.fieldForm.submitForm(); // 所属领域 -// const keywordsForm = this.$refs.keywordsForm.submitForm(); // 关键词 -// const researchsForm = this.$refs.researchsForm.submitForm(); // 研究方向 -// if (valid && cityForm && fieldForm && keywordsForm && researchsForm) { -// flag = !flag; -// } -// }); -// } else if (this.formType == 2) { -// this.$refs["form"].validate((valid) => { -// const cityForm = this.$refs.cityForm.submitForm(); -// const fieldForm = this.$refs.fieldForm.submitForm(); -// const keywordsForm = this.$refs.keywordsForm.submitForm(); -// const directionsForm = this.$refs.directionsForm.submitForm(); -// if (valid && cityForm && fieldForm && keywordsForm && directionsForm) { -// flag = !flag; -// } -// }); -// } -// return flag; -// }; -getSiteList();