This commit is contained in:
2023-06-19 17:25:50 +08:00
parent ef579def81
commit eb19778bd0
41 changed files with 2788 additions and 186 deletions

View File

@ -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>