diff --git a/src/components/drawers/AddOpenCourse.vue b/src/components/drawers/AddOpenCourse.vue
index 4864956d..00a7f4dd 100644
--- a/src/components/drawers/AddOpenCourse.vue
+++ b/src/components/drawers/AddOpenCourse.vue
@@ -196,6 +196,7 @@
权重
@@ -738,7 +739,8 @@ const projectInfo = ref({});
const emit = defineEmits(['call-parent-method']);
const confirm = async()=>{
closeDrawer();
- await api.getDraftTask({projectId: route.query.projectId}).then((res) => {
+ if(route.query.projectId){
+ await api.getDraftTask({projectId: route.query.projectId}).then((res) => {
projectInfo.value = res.data.data
});
request(PROJECT_DETAIL_MODIFY, { ...projectInfo.value });
@@ -746,6 +748,8 @@ const confirm = async()=>{
request(PROJECT_RELEASE, {projectId: route.query.projectId})
}
emit('call-parent-method');
+ }
+
}
const createNewCourse = () => {
@@ -861,14 +865,17 @@ async function coursePlanConfirm() {
formData.value.beginTime = dateTime.value[0]
formData.value.endTime = dateTime.value[1]
await request(COURSE_PLAN_EDIT, { ...formData.value });
- await api.getDraftTask({projectId: route.query.projectId}).then((res) => {
- projectInfo.value = res.data.data
- });
- request(PROJECT_DETAIL_MODIFY, { ...projectInfo.value });
- if(projectInfo.value.projectInfo.status==3){
- request(PROJECT_RELEASE, {projectId: route.query.projectId})
+ if(route.query.projectId){
+ await api.getDraftTask({projectId: route.query.projectId}).then((res) => {
+ projectInfo.value = res.data.data
+ });
+ request(PROJECT_DETAIL_MODIFY, { ...projectInfo.value });
+ if(projectInfo.value.projectInfo.status==3){
+ request(PROJECT_RELEASE, {projectId: route.query.projectId})
+ }
+ emit('call-parent-method');
+
}
- emit('call-parent-method');
handleCancelStu();
tableRef.value.fetch();
}
diff --git a/src/components/project/NameInputNew.vue b/src/components/project/NameInputNew.vue
index d2c81885..88549bd1 100644
--- a/src/components/project/NameInputNew.vue
+++ b/src/components/project/NameInputNew.vue
@@ -8,12 +8,13 @@
@focus="onFocus"
@blur="onBlur"
/>
-
- 名称重复,请重新输入
+
+
+ 开课名称已自动带入,请自行修改
-
+