|
|
@@ -78,7 +78,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
- import { reactive, ref, onMounted } from 'vue'
|
|
|
+ import { reactive, ref, watch } from 'vue'
|
|
|
import { LoadingOutlined, PlusOutlined } from '@ant-design/icons-vue'
|
|
|
import { QuillEditor } from '@vueup/vue-quill'
|
|
|
import '@vueup/vue-quill/dist/vue-quill.snow.css'
|
|
|
@@ -190,7 +190,6 @@
|
|
|
courseCenterApi
|
|
|
.lecturerList()
|
|
|
.then((res) => {
|
|
|
- console.log(res.data, '获取教师下拉数据')
|
|
|
teacherOptions.value = res.data
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
@@ -284,16 +283,32 @@
|
|
|
// 版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
|
|
|
|
|
|
// 原文链接:https://blog.csdn.net/moanuan/article/details/128240291
|
|
|
- onMounted(() => {
|
|
|
- // toRaw(quillEditorRef.value).setHTML(props.value)
|
|
|
- // formState.courseDesc = '<p>默认内容</p>'
|
|
|
- getOrgTreeSelector()
|
|
|
- getCourseAllList()
|
|
|
- getlecturerListSelector()
|
|
|
- if (props.courseInfoId) {
|
|
|
- getDetail()
|
|
|
- }
|
|
|
- })
|
|
|
+ watch(
|
|
|
+ () => props.courseInfoId,
|
|
|
+ (newVal) => {
|
|
|
+ if (newVal) {
|
|
|
+ getOrgTreeSelector()
|
|
|
+ getCourseAllList()
|
|
|
+ getlecturerListSelector()
|
|
|
+ if (props.courseInfoId) {
|
|
|
+ getDetail()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ { immediate: true }
|
|
|
+ )
|
|
|
+
|
|
|
+ // 初始化数据
|
|
|
+ // onMounted(() => {
|
|
|
+ // // toRaw(quillEditorRef.value).setHTML(props.value)
|
|
|
+ // // formState.courseDesc = '<p>默认内容</p>'
|
|
|
+ // getOrgTreeSelector()
|
|
|
+ // getCourseAllList()
|
|
|
+ // getlecturerListSelector()
|
|
|
+ // if (props.courseInfoId) {
|
|
|
+ // getDetail()
|
|
|
+ // }
|
|
|
+ // })
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|