提交
This commit is contained in:
@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user