This commit is contained in:
cxc
2022-07-27 17:30:27 +08:00
parent a0e2102f51
commit 6f4a650962
2 changed files with 3 additions and 67 deletions

View File

@ -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();
</script>
<!-- <script>
@ -545,15 +492,4 @@ export default {
font-weight: 700;
margin-bottom: 30px;
}
// 上传图片框限制
// ::v-deep .el-upload--picture-card {
// width: 120px;
// height: 120px;
// line-height: 120px;
// }
// .el-select,
// .el-date-editor {
// display: block;
// width: 100%;
// }
</style>

View File

@ -6,7 +6,7 @@
type="primary"
plain
icon="Plus"
size="small"
size="default"
@click="handleAdd"
>
新增
@ -92,7 +92,7 @@ import { reactive, ref, toRefs } from "vue";
import TreeSelect from "@/components/TreeSelect";
import { ElMessage, ElMessageBox } from "element-plus";
import { cloneDeep } from "lodash";
// import { resetForm } from "../../../utils/ruoyi";
const loading = ref(true);
const sysIndustryList = ref([]); // 领域列表
const menuOptions = ref([]); // 领域树选项