diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index 87991333..9f896e07 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -4890,8 +4890,6 @@ export default defineComponent({ }; //编辑面授课 const handleEdit = async (itm, type) => { - console.log(45555); - console.log(itm); if (type === "1") { return; } diff --git a/src/views/courselibrary/courseModal.vue b/src/views/courselibrary/courseModal.vue index c9cd7c0f..314ad8cb 100644 --- a/src/views/courselibrary/courseModal.vue +++ b/src/views/courselibrary/courseModal.vue @@ -361,7 +361,7 @@ import { ref, shallowRef, // onMounted, - onBeforeUnmount, + onUnmounted, } from "vue"; import { message } from "ant-design-vue"; import { edit, detail, handle } from "@/api/indexCourse"; @@ -450,7 +450,7 @@ export default defineComponent({ state.imgList = []; state.attach = ""; - valueHtml.value = ""; + // valueHtml.value = ""; }; // 富文本 sssssssssssssss @@ -460,11 +460,8 @@ export default defineComponent({ const valueHtml = ref(""); // // 模拟 ajax 异步获取内容 // onMounted(() => { - // console.log("toolbar222222222222222111111"); - // console.log(editorRef.value); // setTimeout(() => { // // valueHtml.value = "
模拟 Ajax 异步设置内容
"; - // console.log("toolbar22222222222222222222222233"); // console.log(editorRef.value); // // const toolbar = DomEditor.getToolbar(editorRef.value); // // const menu = editorRef.value.getAllMenuKeys(); @@ -484,25 +481,23 @@ export default defineComponent({ formData.append("file", file); fileUp(formData).then((res) => { if (res.data.code === 200) { - // 最后插入图片 + // 最后插入图片 url alt href insertFn(res.data.data, file.name, res.data.data); } }); }, }; const handleCreated = (editor) => { - console.log(4545454544); - console.log(editor); editorRef.value = editor; // 记录 editor 实例,重要! }; - const handleDestory = () => { - const editor = editorRef.value; - if (editor == null) return; - editor.destroy(); - }; + // const handleDestory = () => { + // const editor = editorRef.value; + // if (editor == null) return; + // editor.destroy(); + // }; // 组件销毁时,也及时销毁编辑器 - onBeforeUnmount(() => { - console.log(78787866666666666666); + onUnmounted(() => { + console.log("组件销毁时,也及时销毁编辑器"); // handleDestory(); }); // 富文本 eeeeeeeeeeeeee @@ -662,14 +657,15 @@ export default defineComponent({ pageNo: 1, pageSize: 1, }; - api2.auditList(obj).then((res) => { - if (res.data.data.rows && res.data.data.rows.length > 0) { - state.auditDescription = res.data.data.rows[0].description - ? res.data.data.rows[0].description - : "-"; - console.log("state.auditDescription", state.auditDescription); - } + const res = await api2.auditList(obj).then((res) => { + if (res.data.code === 200) return res.data.data; }); + if (res.rows && res.rows.length > 0) { + state.auditDescription = res.rows[0].description + ? res.rows[0].description + : "-"; + console.log("state.auditDescription", state.auditDescription); + } } state.qdms_inputV1 = item.name; @@ -741,7 +737,6 @@ export default defineComponent({ toolbarConfig, editorConfig, handleCreated, - handleDestory, }; }, });