提交
This commit is contained in:
@ -160,6 +160,11 @@
|
||||
>
|
||||
</el-option>
|
||||
<el-option
|
||||
value="硕士"
|
||||
label="硕士"
|
||||
>
|
||||
</el-option>
|
||||
<el-option
|
||||
value="本科"
|
||||
label="本科"
|
||||
>
|
||||
@ -194,11 +199,11 @@
|
||||
|
||||
<el-row v-if="formType == 1">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="从业时间:" prop="workAt">
|
||||
<el-form-item label="从业时间:" prop="workTime">
|
||||
<el-date-picker
|
||||
v-model="modelValue.workAt"
|
||||
v-model="modelValue.workTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
@ -365,7 +370,7 @@ const data = reactive({
|
||||
major: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
job: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
title: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
workAt: [
|
||||
workTime: [
|
||||
{
|
||||
required: true,
|
||||
message: "从业时间不能为空",
|
||||
@ -420,16 +425,15 @@ const validateForm = async () => {
|
||||
}
|
||||
const cityFormValid = await cityFormRef.value.validateForm();
|
||||
const fieldFormValid = await fieldFormRef.value.validateForm();
|
||||
const keywordsFormValid = await keywordsFormRef.value.validateForm();
|
||||
// const keywordsFormValid = await keywordsFormRef.value.validateForm();
|
||||
if (formType.value == 1) {
|
||||
//个人
|
||||
const researchsFormValid = await researchsFormRef.value.validateForm(); // 研究方向验证
|
||||
// const researchsFormValid = await researchsFormRef.value.validateForm(); //研究方向验证
|
||||
return (
|
||||
formValid &&
|
||||
cityFormValid &&
|
||||
fieldFormValid &&
|
||||
keywordsFormValid &&
|
||||
researchsFormValid
|
||||
fieldFormValid
|
||||
// researchsFormValid
|
||||
);
|
||||
} else if (formType.value == 2) {
|
||||
//企业
|
||||
@ -438,7 +442,7 @@ const validateForm = async () => {
|
||||
formValid &&
|
||||
cityFormValid &&
|
||||
fieldFormValid &&
|
||||
keywordsFormValid &&
|
||||
// keywordsFormValid &&
|
||||
directionsFormValid
|
||||
);
|
||||
} else {
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属领域:" required :show-message="false">
|
||||
<el-form-item label="所属领域:" prop="industrys" :show-message="false">
|
||||
<el-row type="flex" justify="space-between">
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="industrys">
|
||||
<el-form-item >
|
||||
<el-select
|
||||
v-model="fields[0]"
|
||||
value-key="id"
|
||||
@ -94,7 +94,7 @@
|
||||
// import { industry } from "@/api/config";
|
||||
import { listSysIndustry } from "@/api/platform/industry";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { toRefs, watch } from "vue";
|
||||
import { toRefs, watch ,reactive} from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: Object,
|
||||
@ -119,7 +119,7 @@ const data = reactive({
|
||||
industrys: [
|
||||
{
|
||||
type: "array",
|
||||
required: true,
|
||||
required:true,
|
||||
message: "请选择并添加",
|
||||
trigger: "change",
|
||||
},
|
||||
@ -171,6 +171,8 @@ const getFieldNameById = (ids) => {
|
||||
// 所属领域添加按钮
|
||||
const fieldAdd = () => {
|
||||
if (!fields.value.length) return ElMessage.error("请选择领域类型");
|
||||
// 移除校验
|
||||
formRef.value.clearValidate()
|
||||
industrysTags.value.push(fields.value);
|
||||
modelValue.value.industrys.push(fields.value.join("-"));
|
||||
fields.value = [];
|
||||
|
||||
@ -77,6 +77,9 @@ const dataVal = ref("");
|
||||
const formRef = ref(null);
|
||||
const keyWordAdd = () => {
|
||||
if (!dataVal.value.length) return ElMessage.error(`请输入${title.value}`);
|
||||
if(!modelValue.value[fieldKey.value]){
|
||||
modelValue.value[fieldKey.value]=[]
|
||||
}
|
||||
modelValue.value[fieldKey.value].push(dataVal.value);
|
||||
dataVal.value = "";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user