mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 19:06:45 +08:00
--fix bug
This commit is contained in:
@@ -3541,7 +3541,7 @@ export default defineComponent({
|
||||
const createft = () => {
|
||||
if (!state.xzinputV1) {
|
||||
message.destroy();
|
||||
return message.warning("请输入必填项");
|
||||
return message.warning("请输入课程名称");
|
||||
}
|
||||
|
||||
if (state.validated !== 2) {
|
||||
@@ -3718,18 +3718,20 @@ export default defineComponent({
|
||||
afterStart: state.afterStartValue, //考勤 开始后
|
||||
};
|
||||
console.log(postData);
|
||||
const checkList = [
|
||||
postData.name,
|
||||
// postData.address,
|
||||
postData.beginTime,
|
||||
postData.endTime,
|
||||
postData.teacherId,
|
||||
];
|
||||
if (!checkVal(checkList)) {
|
||||
message.destroy();
|
||||
return message.error("请输入必填项");
|
||||
} else {
|
||||
console.log("state.addLoading ", state.addLoading);
|
||||
if(!postData.name){
|
||||
return message.error("请输入开课名称");
|
||||
}
|
||||
if(!postData.beginTime){
|
||||
return message.error("请选择开课时间");
|
||||
}
|
||||
if(!postData.endTime){
|
||||
return message.error("请选择结束时间");
|
||||
}
|
||||
if(!postData.teacherId){
|
||||
return message.error("请选择授课老师");
|
||||
}
|
||||
if(!postData.duration){
|
||||
return message.error("请输入持续时间");
|
||||
}
|
||||
state.addLoading = true;
|
||||
editPlan(postData)
|
||||
|
||||
@@ -892,18 +892,32 @@ export default defineComponent({
|
||||
postData.sourceBelongId,
|
||||
];
|
||||
console.log("checkList", checkList);
|
||||
if (
|
||||
(!postData.organizationIds &&
|
||||
!postData.jobTypeIds &&
|
||||
!postData.bandIds) ||
|
||||
!checkVal(checkList)
|
||||
) {
|
||||
message.destroy();
|
||||
return message.error("请输入必填项");
|
||||
} else {
|
||||
state.addLoading = true;
|
||||
if(!postData.organizationIds){
|
||||
return message.error("请选择目标人群的归属组织");
|
||||
}
|
||||
if(!postData.jobTypeIds && jobType.value && jobType.value.length){
|
||||
return message.error("请选择目标人群的岗位");
|
||||
}
|
||||
if(!postData.bandIds && bandList.value && bandList.value.length){
|
||||
return message.error("请选择目标人群的Band");
|
||||
}
|
||||
if(!postData.intro){
|
||||
return message.error("请输入课程简介");
|
||||
}
|
||||
if(!postData.name){
|
||||
return message.error("请输入课程名称");
|
||||
}
|
||||
if(!postData.picUrl){
|
||||
return message.error("请选择封面图");
|
||||
}
|
||||
if(!postData.sourceBelongId){
|
||||
return message.error("请选择资源归属");
|
||||
}
|
||||
if(!postData.sysTypeId){
|
||||
return message.error("请选择内容分类");
|
||||
}
|
||||
|
||||
state.addLoading = true;
|
||||
edit(postData).then((res) => {
|
||||
state.addLoading = false;
|
||||
if (res.data.code === 200) {
|
||||
|
||||
Reference in New Issue
Block a user