mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-20 00:06:47 +08:00
fix:修改任务频繁点击增加多条问题
This commit is contained in:
@@ -317,6 +317,7 @@ export default {
|
|||||||
textV2: "",
|
textV2: "",
|
||||||
radioV1: "",
|
radioV1: "",
|
||||||
time: "",
|
time: "",
|
||||||
|
isClick: false
|
||||||
});
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:addactiveVisible", false);
|
ctx.emit("update:addactiveVisible", false);
|
||||||
@@ -464,6 +465,13 @@ export default {
|
|||||||
return message.warning("请输入活动地址");
|
return message.warning("请输入活动地址");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(state.isClick){
|
||||||
|
message.destroy();
|
||||||
|
message.error('请勿频繁点击')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.isClick = true;
|
||||||
|
|
||||||
let obj = {
|
let obj = {
|
||||||
activityAddress: state.inputV3, //活动地址
|
activityAddress: state.inputV3, //活动地址
|
||||||
activityDuration: state.inputV2, //活动时长
|
activityDuration: state.inputV2, //活动时长
|
||||||
@@ -489,10 +497,12 @@ export default {
|
|||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("更新成功");
|
message.success("更新成功");
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error("更新失败");
|
message.error("更新失败");
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
//新建活动信息
|
//新建活动信息
|
||||||
@@ -504,10 +514,12 @@ export default {
|
|||||||
closeDrawer();
|
closeDrawer();
|
||||||
await updateTask(res);
|
await updateTask(res);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error("创建失败");
|
message.error("创建失败");
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ export default {
|
|||||||
time: undefined,
|
time: undefined,
|
||||||
caseId: null,
|
caseId: null,
|
||||||
caseName: "",
|
caseName: "",
|
||||||
|
isClick: false
|
||||||
});
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:addcaseVisible", false);
|
ctx.emit("update:addcaseVisible", false);
|
||||||
@@ -279,6 +280,12 @@ export default {
|
|||||||
message.destroy();
|
message.destroy();
|
||||||
return message.warning("请先选中关卡");
|
return message.warning("请先选中关卡");
|
||||||
}
|
}
|
||||||
|
if(state.isClick){
|
||||||
|
message.destroy();
|
||||||
|
message.error('请勿频繁点击')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.isClick = true;
|
||||||
for (let i = 0; i < state.apiTaskList.length; i++) {
|
for (let i = 0; i < state.apiTaskList.length; i++) {
|
||||||
RouterEditTask({
|
RouterEditTask({
|
||||||
chapterId: props.isactive,
|
chapterId: props.isactive,
|
||||||
@@ -293,12 +300,20 @@ export default {
|
|||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
state.addLoading = false;
|
state.addLoading = false;
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (props.isLevel == 2) {
|
} else if (props.isLevel == 2) {
|
||||||
|
if(state.isClick){
|
||||||
|
message.destroy();
|
||||||
|
message.error('请勿频繁点击')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.isClick = true;
|
||||||
for (let i = 0; i < state.apiTaskList.length; i++) {
|
for (let i = 0; i < state.apiTaskList.length; i++) {
|
||||||
apiTask
|
apiTask
|
||||||
.addTask({
|
.addTask({
|
||||||
@@ -314,13 +329,21 @@ export default {
|
|||||||
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
|
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
|
message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (props.isLevel == 3) {
|
} else if (props.isLevel == 3) {
|
||||||
|
if(state.isClick){
|
||||||
|
message.destroy();
|
||||||
|
message.error('请勿频繁点击')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.isClick = true;
|
||||||
for (let i = 0; i < state.apiTaskList.length; i++) {
|
for (let i = 0; i < state.apiTaskList.length; i++) {
|
||||||
apiTask
|
apiTask
|
||||||
.addTaskTemplate({
|
.addTaskTemplate({
|
||||||
@@ -336,10 +359,12 @@ export default {
|
|||||||
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
|
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
|
message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,6 +194,7 @@ export default {
|
|||||||
const state = reactive({
|
const state = reactive({
|
||||||
addLoading: false,
|
addLoading: false,
|
||||||
workEnclosureAddress: "",
|
workEnclosureAddress: "",
|
||||||
|
isClick: false
|
||||||
});
|
});
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
|
||||||
@@ -337,29 +338,47 @@ export default {
|
|||||||
workName: formState.workName,
|
workName: formState.workName,
|
||||||
workRequirement: formState.workRequirement,
|
workRequirement: formState.workRequirement,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (props.EditWorkId > 0) {
|
if (props.EditWorkId > 0) {
|
||||||
|
if(state.isClick){
|
||||||
|
message.destroy();
|
||||||
|
message.error('请勿频繁点击')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.isClick = true;
|
||||||
|
|
||||||
updateWorkTaskUsing(obj)
|
updateWorkTaskUsing(obj)
|
||||||
.then(async(res) => {
|
.then(async(res) => {
|
||||||
// console.log("添加成功", res);
|
// console.log("添加成功", res);
|
||||||
await updateTask(res);
|
await updateTask(res);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error(`添加失败${err}`);
|
message.error(`添加失败${err}`);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
if(state.isClick){
|
||||||
|
message.destroy();
|
||||||
|
message.error('请勿频繁点击')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.isClick = true;
|
||||||
createWorkTask(obj)
|
createWorkTask(obj)
|
||||||
.then(async(res) => {
|
.then(async(res) => {
|
||||||
console.log("添加成功", res);
|
console.log("添加成功", res);
|
||||||
await updateTask(res);
|
await updateTask(res);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error(`添加失败${err}`);
|
message.error(`添加失败${err}`);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ export default {
|
|||||||
assessment1: null,
|
assessment1: null,
|
||||||
assessmentVisible: false,
|
assessmentVisible: false,
|
||||||
titleTag: false,
|
titleTag: false,
|
||||||
|
isClick: false
|
||||||
});
|
});
|
||||||
// const getCheckedAss = (ass) => {
|
// const getCheckedAss = (ass) => {
|
||||||
// state.assessmentId = ass.assessmentId;
|
// state.assessmentId = ass.assessmentId;
|
||||||
@@ -153,6 +154,12 @@ export default {
|
|||||||
message.destroy();
|
message.destroy();
|
||||||
return message.warning("请先选中关卡");
|
return message.warning("请先选中关卡");
|
||||||
}
|
}
|
||||||
|
if(state.isClick){
|
||||||
|
message.destroy();
|
||||||
|
message.error('请勿频繁点击')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.isClick = true;
|
||||||
IsExistence({
|
IsExistence({
|
||||||
chapterId: Number(props.isactive),
|
chapterId: Number(props.isactive),
|
||||||
courseTaskId: l_data_id,
|
courseTaskId: l_data_id,
|
||||||
@@ -174,6 +181,7 @@ export default {
|
|||||||
}
|
}
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.warning("评估(" + tipStr + ")重复添加");
|
message.warning("评估(" + tipStr + ")重复添加");
|
||||||
|
state.isClick = false;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
RouterEditTask({
|
RouterEditTask({
|
||||||
@@ -192,17 +200,26 @@ export default {
|
|||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
state.addLoading = false;
|
state.addLoading = false;
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
} else if (props.isLevel == 2) {
|
} else if (props.isLevel == 2) {
|
||||||
|
if(state.isClick){
|
||||||
|
message.destroy();
|
||||||
|
message.error('请勿频繁点击')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.isClick = true;
|
||||||
IsExistenceProject({
|
IsExistenceProject({
|
||||||
courseTaskId: l_data_id,
|
courseTaskId: l_data_id,
|
||||||
projectId: props.projectId,
|
projectId: props.projectId,
|
||||||
@@ -224,6 +241,7 @@ export default {
|
|||||||
}
|
}
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.warning("评估(" + tipStr + ")重复添加");
|
message.warning("评估(" + tipStr + ")重复添加");
|
||||||
|
state.isClick = false;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
apiTask
|
apiTask
|
||||||
@@ -239,16 +257,25 @@ export default {
|
|||||||
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
|
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
|
message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
} else if (props.isLevel == 3) {
|
} else if (props.isLevel == 3) {
|
||||||
|
if(state.isClick){
|
||||||
|
message.destroy();
|
||||||
|
message.error('请勿频繁点击')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.isClick = true;
|
||||||
IsExistenceProjectTemplate({
|
IsExistenceProjectTemplate({
|
||||||
courseTaskId: l_data_id,
|
courseTaskId: l_data_id,
|
||||||
projectTemplateId: props.projectTemplateId,
|
projectTemplateId: props.projectTemplateId,
|
||||||
@@ -269,6 +296,7 @@ export default {
|
|||||||
}
|
}
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.warning("评估(" + tipStr + ")重复添加");
|
message.warning("评估(" + tipStr + ")重复添加");
|
||||||
|
state.isClick = false;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
addTempTask({
|
addTempTask({
|
||||||
@@ -284,10 +312,12 @@ export default {
|
|||||||
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
|
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
|
message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -482,6 +482,7 @@ export default {
|
|||||||
switchC2: false,
|
switchC2: false,
|
||||||
assessmentVisible: false,
|
assessmentVisible: false,
|
||||||
assessmentName: "",
|
assessmentName: "",
|
||||||
|
isClick: false
|
||||||
});
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:addliveVisible", false);
|
ctx.emit("update:addliveVisible", false);
|
||||||
@@ -693,6 +694,13 @@ export default {
|
|||||||
message.destroy();
|
message.destroy();
|
||||||
return message.warning("请输入直播公告");
|
return message.warning("请输入直播公告");
|
||||||
}
|
}
|
||||||
|
if(state.isClick){
|
||||||
|
message.destroy();
|
||||||
|
message.error('请勿频繁点击')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.isClick = true;
|
||||||
|
|
||||||
const regular = /^[+]{0,1}(\d+)$/;
|
const regular = /^[+]{0,1}(\d+)$/;
|
||||||
if (!regular.test(state.inputV2)) {
|
if (!regular.test(state.inputV2)) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
@@ -743,9 +751,11 @@ export default {
|
|||||||
message.success("提交成功");
|
message.success("提交成功");
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
await updateTask(res);
|
await updateTask(res);
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
api
|
api
|
||||||
@@ -755,8 +765,11 @@ export default {
|
|||||||
message.success("提交成功");
|
message.success("提交成功");
|
||||||
await updateTask(res);
|
await updateTask(res);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
state.isClick = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const beforeUpload = (file) => {
|
const beforeUpload = (file) => {
|
||||||
|
|||||||
@@ -232,6 +232,7 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
choicecourse: true,
|
choicecourse: true,
|
||||||
ddLoading: false,
|
ddLoading: false,
|
||||||
|
isClick: false
|
||||||
});
|
});
|
||||||
const ChoiceCourse = () => {
|
const ChoiceCourse = () => {
|
||||||
state.choicecourse = false;
|
state.choicecourse = false;
|
||||||
@@ -455,6 +456,12 @@ export default {
|
|||||||
l_data_id.push(item["courseId"]);
|
l_data_id.push(item["courseId"]);
|
||||||
});
|
});
|
||||||
console.log("需要查询的在线课ID", l_data_id);
|
console.log("需要查询的在线课ID", l_data_id);
|
||||||
|
if(state.isClick){
|
||||||
|
message.destroy();
|
||||||
|
message.error('请勿频繁点击')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.isClick = true;
|
||||||
IsExistence({
|
IsExistence({
|
||||||
chapterId: Number(props.isactive),
|
chapterId: Number(props.isactive),
|
||||||
courseTaskId: l_data_id,
|
courseTaskId: l_data_id,
|
||||||
@@ -475,6 +482,7 @@ export default {
|
|||||||
}
|
}
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.warning("在线课(" + tipStr + ")重复添加");
|
message.warning("在线课(" + tipStr + ")重复添加");
|
||||||
|
state.isClick = false;
|
||||||
state.addLoading = false;
|
state.addLoading = false;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
@@ -498,6 +506,7 @@ export default {
|
|||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
state.addLoading = false;
|
state.addLoading = false;
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
state.addLoading = false;
|
state.addLoading = false;
|
||||||
@@ -505,12 +514,14 @@ export default {
|
|||||||
message.error(
|
message.error(
|
||||||
`${props.edit ? "编辑" : "新增"}关卡任务失败`
|
`${props.edit ? "编辑" : "新增"}关卡任务失败`
|
||||||
);
|
);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
} else if (props.isLevel == 2) {
|
} else if (props.isLevel == 2) {
|
||||||
console.log("我是要便利的数据2", state.addOnlineList);
|
console.log("我是要便利的数据2", state.addOnlineList);
|
||||||
@@ -520,6 +531,12 @@ export default {
|
|||||||
p_data_id.push(item["courseId"]);
|
p_data_id.push(item["courseId"]);
|
||||||
});
|
});
|
||||||
console.log("需要查询的在线课ID", p_data_id);
|
console.log("需要查询的在线课ID", p_data_id);
|
||||||
|
if(state.isClick){
|
||||||
|
message.destroy();
|
||||||
|
message.error('请勿频繁点击')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.isClick = true;
|
||||||
IsExistenceProject({
|
IsExistenceProject({
|
||||||
courseTaskId: p_data_id,
|
courseTaskId: p_data_id,
|
||||||
projectId: Number(props.projectId),
|
projectId: Number(props.projectId),
|
||||||
@@ -540,6 +557,7 @@ export default {
|
|||||||
}
|
}
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.warning("在线课(" + tipStr + ")重复添加");
|
message.warning("在线课(" + tipStr + ")重复添加");
|
||||||
|
state.isClick = false;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
state.addOnlineList.map((value) => {
|
state.addOnlineList.map((value) => {
|
||||||
@@ -557,10 +575,12 @@ export default {
|
|||||||
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
|
message.success(`${props.edit ? "编辑" : "新增"}任务成功`);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
|
message.error(`${props.edit ? "编辑" : "新增"}任务失败`);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -576,6 +596,12 @@ export default {
|
|||||||
p_data_id.push(item["courseId"]);
|
p_data_id.push(item["courseId"]);
|
||||||
});
|
});
|
||||||
console.log("需要查询的在线课ID", p_data_id);
|
console.log("需要查询的在线课ID", p_data_id);
|
||||||
|
if(state.isClick){
|
||||||
|
message.destroy();
|
||||||
|
message.error('请勿频繁点击')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.isClick = true;
|
||||||
IsExistenceProjectTemplate({
|
IsExistenceProjectTemplate({
|
||||||
courseTaskId: p_data_id,
|
courseTaskId: p_data_id,
|
||||||
projectTemplateId: props.projectTemplateId,
|
projectTemplateId: props.projectTemplateId,
|
||||||
@@ -595,6 +621,7 @@ export default {
|
|||||||
}
|
}
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.warning("在线课(" + tipStr + ")重复添加");
|
message.warning("在线课(" + tipStr + ")重复添加");
|
||||||
|
state.isClick = false;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
state.addOnlineList.map((value) => {
|
state.addOnlineList.map((value) => {
|
||||||
@@ -614,10 +641,12 @@ export default {
|
|||||||
message.success(`${props.edit ? "编辑" : "新增"}模板库任务成功`);
|
message.success(`${props.edit ? "编辑" : "新增"}模板库任务成功`);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error(`${props.edit ? "编辑" : "新增"}模板库任务失败`);
|
message.error(`${props.edit ? "编辑" : "新增"}模板库任务失败`);
|
||||||
|
state.isClick = false;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,6 +155,7 @@ export default {
|
|||||||
inputV2: "",
|
inputV2: "",
|
||||||
textV1: "",
|
textV1: "",
|
||||||
title: null,
|
title: null,
|
||||||
|
isClick: false
|
||||||
});
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:addrefVisible", false);
|
ctx.emit("update:addrefVisible", false);
|
||||||
@@ -253,6 +254,14 @@ export default {
|
|||||||
return message.warning("请输入合法的链接地址");
|
return message.warning("请输入合法的链接地址");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(state.isClick){
|
||||||
|
message.destroy();
|
||||||
|
message.error('请勿频繁点击')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
state.isClick = true;
|
||||||
|
|
||||||
let obj = {
|
let obj = {
|
||||||
linkAddress: state.inputV2,
|
linkAddress: state.inputV2,
|
||||||
linkDescription: state.textV1,
|
linkDescription: state.textV1,
|
||||||
@@ -266,8 +275,11 @@ export default {
|
|||||||
message.success("编辑成功");
|
message.success("编辑成功");
|
||||||
await updateTask(res);
|
await updateTask(res);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
state.isClick = false;
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
api
|
api
|
||||||
.createExternalChain(obj)
|
.createExternalChain(obj)
|
||||||
@@ -275,8 +287,11 @@ export default {
|
|||||||
message.success("提交成功");
|
message.success("提交成功");
|
||||||
await updateTask(res);
|
await updateTask(res);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
|
state.isClick = false;
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
state.isClick = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 查询任务
|
// 查询任务
|
||||||
|
|||||||
Reference in New Issue
Block a user