富文本

This commit is contained in:
kclf
2022-12-06 13:40:44 +08:00
parent 62663b8449
commit 6eeb2c540e
2 changed files with 54 additions and 25 deletions

View File

@@ -55,10 +55,10 @@ http.interceptors.response.use(
if (code === 0 || code === 200) {
return response;
} else {
if (code === 1000) {
window.open("https://u-pre.boe.com/web/", '_self');
// window.open("http://111.231.196.214:12013/manage/login", '_self');
}
// if (code === 1000) {
// window.open("https://u-pre.boe.com/web/", '_self');
// // window.open("http://111.231.196.214:12013/manage/login", '_self');
// }
console.log("api %o", msg);
}
return response;

View File

@@ -270,7 +270,7 @@
:closable="false"
wrapClassName="modalStyle facteachModal"
width="80%"
@cancel="ft_exit"
@cancel="ft_exit_1"
>
<div class="modalHeader">
<div class="headerLeft">
@@ -283,7 +283,7 @@
</div>
<div style="margin-right: 57px; cursor: pointer">
<img
@click="ft_exit"
@click="ft_exit_1"
style="width: 22px; height: 22px"
src="../../assets/images/basicinfo/close22.png"
/>
@@ -682,7 +682,7 @@
</div>
</div>
<div class="m_btn">
<div class="btn btn5" @click="ft_exit">
<div class="btn btn5" @click="ft_exit_1">
<div class="btnText">取消</div>
</div>
<div class="btn btn6" v-if="isEdit == 0" @click="handlePush">
@@ -3041,6 +3041,7 @@ import {
watch,
} from "vue";
import { message } from "ant-design-vue";
import { useRouter, useRoute } from "vue-router";
// import StuAdd from "../../components/drawers/StuAdd";
// import OwnPower from "../../components/drawers/OwnPower.vue";
// import Corpowerlist from "../../components/drawers/CorPowerlist.vue";
@@ -3836,16 +3837,16 @@ export default defineComponent({
const valueHtml = ref("");
// // 模拟 ajax 异步获取内容
onMounted(() => {
// setTimeout(() => {
// // valueHtml.value = "<p>模拟 Ajax 异步设置内容</p>";
// console.log("toolbar222222222222222");
// console.log(editorRef.value);
// // const toolbar = DomEditor.getToolbar(editorRef.value);
// // const menu = editorRef.value.getAllMenuKeys();
// // const bar = toolbar.getConfig().toolbarKeys;
// // console.log(menu);
// // console.log(bar);
// }, 3500);
setTimeout(() => {
// valueHtml.value = "<p>模拟 Ajax 异步设置内容</p>";
console.log("toolbar222222222222222");
console.log(editorRef.value);
// const toolbar = DomEditor.getToolbar(editorRef.value);
// const menu = editorRef.value.getAllMenuKeys();
// const bar = toolbar.getConfig().toolbarKeys;
// console.log(menu);
// console.log(bar);
}, 3500);
});
const toolbarConfig = {
@@ -3865,17 +3866,41 @@ export default defineComponent({
});
},
};
const handleCreated = (editor) => {
console.log("toolbar2222222222333333322222");
console.log(editorRef.value);
editorRef.value = editor; // 记录 editor 实例,重要!
};
// 组件销毁时,也及时销毁编辑器
onBeforeUnmount(() => {
const editor = editorRef.value;
if (editor == null) return;
editor.destroy();
});
const handleCreated = (editor) => {
editorRef.value = editor; // 记录 editor 实例,重要!
};
watch(
() => state,
(newVal) => {
console.log("newVal3333333333333333333");
console.log(newVal.ft_hs);
if (!newVal.ft_hs) {
console.log("newVal.ft_hs11111111111111");
// const editor = editorRef.value;
// if (editor == null) return;
// editor.destroy();
// router.go(0);
}
},
{
deep: true,
}
);
// 富文本 eeeeeeeeeeeeee
const route = useRoute();
console.log(route);
const router = useRouter();
console.log(router);
const beforeUpload = (file) => {
return new Promise((resolve, reject) => {
const isJpgOrPng =
@@ -4517,8 +4542,11 @@ export default defineComponent({
}
return count ? false : true;
};
const ft_exit = () => {
const ft_exit_1 = () => {
state.ft_hs = false;
router.go(0);
};
const ft_exit = () => {
state.ft_eidt = false;
state.hideshow = true;
@@ -4542,6 +4570,7 @@ export default defineComponent({
const handlelookMs = () => {
state.lookMs = false;
};
//保存面授课
const handlePush = (param) => {
let files = "";
@@ -4589,7 +4618,7 @@ export default defineComponent({
edit(postData).then((res) => {
if (res.data.code === 200) {
getTableDate();
// ft_exit();
// ft_exit_1();
rest();
state.addLoading = false;
state.isEdit = 1;
@@ -5060,7 +5089,6 @@ export default defineComponent({
};
//获取教师
const getTea = async () => {
options4CurName.value = state.teacher;
options4CurId.value = state.teacherId;
const item1 = await getMemberInfoApi({
@@ -5432,7 +5460,7 @@ export default defineComponent({
handle(obj).then((res) => {
console.log("提交审核成功", res.data);
if (res.data.code === 200) {
ft_exit();
ft_exit_1();
rest();
getTableDate();
state.addLoading = false;
@@ -5584,6 +5612,7 @@ export default defineComponent({
bs_hShow,
createft,
ft_exit,
ft_exit_1,
om_exit,
ckxq_hs,
ftsr_exit,