bugfix
This commit is contained in:
@ -12,7 +12,10 @@
|
||||
<script setup>
|
||||
import AgentForm from "@/views/components/AgentForm";
|
||||
import { reactive, ref, toRefs } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { insertCasBroker } from "@/api/admin/agent/account";
|
||||
|
||||
const router = useRouter();
|
||||
const props = defineProps({
|
||||
labelWidth: {
|
||||
type: Number,
|
||||
@ -22,7 +25,7 @@ const props = defineProps({
|
||||
const data = reactive({
|
||||
form: {
|
||||
industrys: [],
|
||||
id_image: {},
|
||||
idImage: [],
|
||||
},
|
||||
});
|
||||
const { form } = toRefs(data);
|
||||
@ -31,7 +34,14 @@ const submitForm = async () => {
|
||||
if (!agentFormRef.value) return;
|
||||
const valid = await agentFormRef.value.validateForm();
|
||||
if (valid) {
|
||||
// TODO: submit agent
|
||||
form.value.idCardPics = form.value.idImage.join(",");
|
||||
form.value.keyword = form.value.keywords.join(",");
|
||||
insertCasBroker(form.value).then(() => {
|
||||
ElMessage.success("新增成功");
|
||||
router.push({
|
||||
path: "/identity/index",
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user