bugfix
This commit is contained in:
@ -40,9 +40,12 @@
|
||||
<script setup>
|
||||
import AgentForm from "@/views/components/AgentForm";
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import { getInfo, updateLaboratory } from "@/api/admin/laboratory/account";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { insertClientUser } from "@/api/admin/enterprise";
|
||||
import {
|
||||
getInfo,
|
||||
insertClientUser,
|
||||
updateCasBroker,
|
||||
} from "@/api/admin/agent/account";
|
||||
|
||||
const data = reactive({
|
||||
form: {
|
||||
@ -61,10 +64,9 @@ const labelWidth = ref(140);
|
||||
// 获取基础信息用于回显
|
||||
const getBasicInfo = async () => {
|
||||
const { data } = await getInfo();
|
||||
data.laboratory.researchs =
|
||||
data.laboratory.researchDirection?.split(",") ?? [];
|
||||
data.laboratory.keywords = data.laboratory.keyword?.split(",") ?? [];
|
||||
form.value = data.laboratory ?? {};
|
||||
data.broker.industrys = data.broker.industry?.split(",") ?? [];
|
||||
data.broker.keywords = data.broker.keyword?.split(",") ?? [];
|
||||
form.value = data.broker ?? {};
|
||||
personForm.value = data.user ?? {};
|
||||
};
|
||||
|
||||
@ -82,9 +84,9 @@ const submitPersonalInfo = async () => {
|
||||
const submitExpertForm = async () => {
|
||||
const valid = await agentFormRef.value.validateForm();
|
||||
if (valid) {
|
||||
form.value.researchDirection = form.value.researchs?.join(",") ?? null;
|
||||
// form.value.researchDirection = form.value.researchs?.join(",") ?? null;
|
||||
form.value.keyword = form.value.keywords?.join(",") ?? null;
|
||||
updateLaboratory(form.value).then((res) => {
|
||||
updateCasBroker(form.value).then((res) => {
|
||||
ElMessage.success("修改成功");
|
||||
getBasicInfo();
|
||||
});
|
||||
|
Reference in New Issue
Block a user