| | |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | :title="state.title" |
| | | width="700px" |
| | | width="800px" |
| | | :before-close="handleClose" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="员工情况介绍:" prop="companyRoster"> |
| | | <editor v-model="state.form.companyRoster" :min-height="300"/> |
| | | <!-- <editor v-model="state.form.companyRoster" :min-height="300"/>--> |
| | | <t-editor style="width: 800px" ref="myEditor" :value="state.form.companyRoster" ></t-editor> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer v-if="state.title !='查看'"> |
| | |
| | | import {Base64} from "js-base64" |
| | | import {getCompany} from "@/api/onlineEducation/company"; |
| | | import {saveRoster, updateRoster} from "@/api/staffManage/staff"; |
| | | |
| | | import TEditor from "@/components/Tinymce/Tinymce.vue" |
| | | const emit = defineEmits(["getList"]); |
| | | const dialogVisible = ref(false) |
| | | const superRef = ref() |
| | | const myEditor = ref(); |
| | | const state = reactive({ |
| | | title: '', |
| | | form: { |
| | |
| | | const loading = ref(false) |
| | | |
| | | const onSubmit = async () => { |
| | | state.form.companyRoster = tinyMCE.activeEditor.getContent(); |
| | | const valid = await superRef.value.validate(); |
| | | if(valid){ |
| | | |
| | | if(state.title == '新增'){ |
| | | const {id,...data} = state.form |
| | | const res = await saveRoster(data) |
| | |
| | | companyId: null, |
| | | companyRoster: '', |
| | | } |
| | | myEditor.value.clear(); |
| | | superRef.value.clearValidate(); |
| | | superRef.value.resetFields() |
| | | dialogVisible.value = false; |