| | |
| | | import {updateInfoPlatforms, updateSysClause} from "@/api/staffManage/staff"; |
| | | import Cookies from "js-cookie"; |
| | | import {addBasic, editBasic} from "@/api/companyInfo/basicInfo"; |
| | | import {addIndustry, editIndustry} from "@/api/system/industry"; |
| | | |
| | | const emit = defineEmits(["getList"]); |
| | | const dialogVisible = ref(false) |
| | |
| | | const onSubmit = async () => { |
| | | const valid = await busRef.value.validate(); |
| | | if(valid){ |
| | | if(title.value === '新增'){ |
| | | if(state.title === '新增'){ |
| | | const {id, ...data} = JSON.parse(JSON.stringify(state.form)) |
| | | const res = await addBasic(data) |
| | | const res = await addIndustry(data) |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | |
| | | busRef.value.clearValidate(); |
| | | reset(); |
| | | dialogVisible.value = false; |
| | | }else if(title.value === '编辑'){ |
| | | }else if(state.title === '编辑'){ |
| | | const {...data} = JSON.parse(JSON.stringify(state.form)) |
| | | const res = await editBasic(data) |
| | | const res = await editIndustry(data) |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |