mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-06 17:36:44 +08:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -106,6 +106,7 @@
|
||||
v-model:validated="validated"
|
||||
:id="formData.id"
|
||||
show-count
|
||||
:onceName="onceName"
|
||||
:type="5"
|
||||
style="width: 440px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入开课名称"
|
||||
@@ -214,7 +215,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cstm_items">
|
||||
<!-- <div class="cstm_items">
|
||||
<div class="signbox">
|
||||
<span style="margin-right: 3px">报名设置</span>
|
||||
</div>
|
||||
@@ -225,7 +226,7 @@
|
||||
<span style="color: #6d7584">是否允许公开报名</span>
|
||||
</CheckBox>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="cstm_items" style="align-items: flex-start;">
|
||||
<div class="signbox">
|
||||
@@ -357,6 +358,7 @@ import BaseTable from "@/components/common/BaseTable";
|
||||
import {request} from "@/api/request";
|
||||
import dialog from "@/utils/dialog";
|
||||
import {useResetRef} from "@/utils/useCommon";
|
||||
import { validateName } from "@/api/index1";
|
||||
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
@@ -435,7 +437,7 @@ const params = ref({
|
||||
const validated = ref(0);
|
||||
const dateTime = ref([]);
|
||||
const courseName = ref();
|
||||
|
||||
const onceName = ref("");
|
||||
const formData = useResetRef({
|
||||
name: "",
|
||||
address: "",
|
||||
@@ -529,6 +531,7 @@ const createNewCourse = () => {
|
||||
offcourseId: params.value.offcourseId,
|
||||
draftTaskId: params.value.draftTaskId,
|
||||
});
|
||||
onceName.value = "";
|
||||
dateTime.value = [];
|
||||
validated.value = 0;
|
||||
offCourseNewVisiable.value = true;
|
||||
@@ -552,6 +555,19 @@ async function coursePlanConfirm() {
|
||||
message.warning(errorFields[0].errors.join());
|
||||
throw Error("数据校验不通过");
|
||||
});
|
||||
const offName = await validateName({
|
||||
name: formData.value.name,
|
||||
type: 5,
|
||||
id: formData.value.id,
|
||||
}).then((res) => {
|
||||
console.log(res, res.data.data);
|
||||
return res.data.data === 1;
|
||||
});
|
||||
if (offName) {
|
||||
message.destroy();
|
||||
message.warning("开课名称重复,请重新填写");
|
||||
return;
|
||||
}
|
||||
offCourseNewVisiable.value = false;
|
||||
tableRef.value.toLoading();
|
||||
await request(COURSE_PLAN_EDIT, { ...formData.value });
|
||||
@@ -574,6 +590,7 @@ function openDrawer(row) {
|
||||
params.value.draftTaskId = row.id;
|
||||
formData.value.offcourseId = row.courseId;
|
||||
formData.value.draftTaskId = row.id;
|
||||
onceName.value = row.name;
|
||||
courseName.value = row.name;
|
||||
nextTick(tableRef.value.fetch);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user