mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
去掉添加任务的多次提示,只提示一次,再次创建投票题干id没清空
This commit is contained in:
@@ -377,10 +377,10 @@ export default {
|
||||
type: 9,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
//message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 2) {
|
||||
apiTask
|
||||
@@ -394,10 +394,10 @@ export default {
|
||||
type: 9,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
//message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
//////message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
apiTask
|
||||
@@ -411,10 +411,11 @@ export default {
|
||||
type: 9,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
//message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
|
||||
|
||||
@@ -466,9 +467,11 @@ export default {
|
||||
closeDrawer();
|
||||
updateTask(res);
|
||||
ctx.emit("changeData", false);
|
||||
message.destroy();
|
||||
message.success("更新成功");
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error("更新失败");
|
||||
});
|
||||
} else {
|
||||
@@ -476,12 +479,14 @@ export default {
|
||||
api
|
||||
.createActivity(obj)
|
||||
.then((res) => {
|
||||
message.destroy();
|
||||
message.success("创建成功");
|
||||
closeDrawer();
|
||||
updateTask(res);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error("创建失败");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -197,6 +197,7 @@ export default {
|
||||
type: 8,
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -213,6 +214,7 @@ export default {
|
||||
type: 8,
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -229,6 +231,7 @@ export default {
|
||||
type: 8,
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -255,8 +258,13 @@ export default {
|
||||
updateTask(res);
|
||||
closeDrawer();
|
||||
ctx.emit("changeData", false);
|
||||
message.destroy()
|
||||
message.success("创建讨论成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => {
|
||||
message.destroy()
|
||||
message.error("创建讨论失败");
|
||||
});
|
||||
} else {
|
||||
api
|
||||
.createDiscuss(obj)
|
||||
@@ -264,8 +272,13 @@ export default {
|
||||
updateTask(res);
|
||||
closeDrawer();
|
||||
ctx.emit("changeData", false);
|
||||
message.destroy()
|
||||
message.success("创建讨论成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => {
|
||||
message.destroy()
|
||||
message.error("创建讨论失败");
|
||||
});
|
||||
}
|
||||
};
|
||||
return {
|
||||
|
||||
@@ -315,9 +315,13 @@ export default {
|
||||
updateTask(res.data.data);
|
||||
closeDrawer();
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
message.destroy();
|
||||
message.success("创建测评成功");
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.success("创建测评失败");
|
||||
});
|
||||
}
|
||||
//创建测评信息
|
||||
const createEvalText = () => {
|
||||
@@ -348,8 +352,12 @@ export default {
|
||||
updateTask(res.data.data);
|
||||
closeDrawer();
|
||||
ctx.emit("changeData", false);
|
||||
message.destroy();
|
||||
message.success("创建测评成功");
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.success("创建测评失败");
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -607,11 +607,14 @@ export default {
|
||||
|
||||
editPlan(obj)
|
||||
.then((res) => {
|
||||
console.log("更新任务s's");
|
||||
message.destroy();
|
||||
message.error(`添加成功`);
|
||||
updateTask(res);
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
}).catch((err) => {
|
||||
message.error(`添加失败${err}`);
|
||||
}).catch(() => {
|
||||
message.destroy();
|
||||
message.error(`添加失败`);
|
||||
});
|
||||
|
||||
}
|
||||
@@ -633,13 +636,13 @@ export default {
|
||||
};
|
||||
RouterEditTask(editObj1)
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
//message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
|
||||
// state.addLoading = false;
|
||||
closeDrawer();
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 2) {
|
||||
let editObj = {
|
||||
@@ -654,13 +657,11 @@ export default {
|
||||
// 新增编辑或新增项目
|
||||
ProjectEditTask(editObj)
|
||||
.then(() => {
|
||||
message.success(
|
||||
`${props.EditFaceId ? "编辑" : "新增"}阶段任务成功`
|
||||
);
|
||||
ctx.emit("changeData", false);
|
||||
message.success( `${props.EditFaceId ? "编辑" : "新增"}阶段任务成功` );
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.EditFaceId ? "编辑" : "新增"}阶段任务失败`);
|
||||
//message.error(`${props.EditFaceId ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
console.log("dddddddddddd33333333");
|
||||
@@ -674,13 +675,11 @@ export default {
|
||||
type: 2,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(
|
||||
`${props.EditFaceId ? "编辑" : "新增"}阶段任务成功`
|
||||
);
|
||||
ctx.emit("changeData", false);
|
||||
//message.success(`${props.EditFaceId ? "编辑" : "新增"}阶段任务成功` );
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.EditFaceId ? "编辑" : "新增"}阶段任务失败`);
|
||||
//message.error(`${props.EditFaceId ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -739,6 +738,7 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
message.destroy();
|
||||
message.error("获取员工失败" + err);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -296,18 +296,22 @@ export default {
|
||||
updateWorkTaskUsing(obj)
|
||||
.then((res) => {
|
||||
updateTask(res);
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
message.destroy();
|
||||
message.error(`添加失败${err}`);
|
||||
});
|
||||
} else {
|
||||
createWorkTask(obj)
|
||||
.then((res) => {
|
||||
updateTask(res);
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
message.destroy();
|
||||
message.error(`添加失败${err}`);
|
||||
});
|
||||
}
|
||||
@@ -327,7 +331,7 @@ export default {
|
||||
state.addLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`查询失败`);
|
||||
//message.error(`查询失败`);
|
||||
});
|
||||
};
|
||||
// 新增编辑或新增项目任务
|
||||
@@ -349,12 +353,12 @@ export default {
|
||||
|
||||
RouterEditTask(editObj1)
|
||||
.then(() => {
|
||||
message.success(`${props.EditWorkId > 0 ? "编辑" : "新增"}关卡任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
//message.success(`${props.EditWorkId > 0 ? "编辑" : "新增"}关卡任务成功`);
|
||||
|
||||
state.addLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.EditWorkId > 0 ? "编辑" : "新增"}关卡任务失败`);
|
||||
//message.error(`${props.EditWorkId > 0 ? "编辑" : "新增"}关卡任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 2) {
|
||||
let editObj = {
|
||||
@@ -367,12 +371,12 @@ export default {
|
||||
};
|
||||
ProjectEditTask(editObj)
|
||||
.then(() => {
|
||||
message.success(`${props.EditWorkId > 0 ? "编辑" : "新增"}阶段任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
//message.success(`${props.EditWorkId > 0 ? "编辑" : "新增"}阶段任务成功`);
|
||||
|
||||
state.addLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.EditWorkId > 0 ? "编辑" : "新增"}阶段任务失败`);
|
||||
//message.error(`${props.EditWorkId > 0 ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
console.log("projectTemplateId,===",props.projectTemplateId);
|
||||
@@ -385,12 +389,12 @@ export default {
|
||||
type: 4,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(`${props.EditWorkId > 0 ? "编辑" : "新增"}阶段任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
//message.success(`${props.EditWorkId > 0 ? "编辑" : "新增"}阶段任务成功`);
|
||||
|
||||
state.addLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.EditWorkId > 0 ? "编辑" : "新增"}阶段任务失败`);
|
||||
//message.error(`${props.EditWorkId > 0 ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,12 +225,14 @@ export default {
|
||||
type: 11,
|
||||
})
|
||||
.then(() => {
|
||||
message.destroy();
|
||||
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
state.addLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 2) {
|
||||
@@ -261,11 +263,13 @@ export default {
|
||||
type: 11,
|
||||
})
|
||||
.then(() => {
|
||||
message.destroy();
|
||||
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-auto-complete
|
||||
v-model:value="memberValue"
|
||||
v-model:value="memberValue.label"
|
||||
show-search
|
||||
:not-found-content="fetching ? undefined : null"
|
||||
placeholder="Select a teacher"
|
||||
@@ -408,7 +408,10 @@ export default {
|
||||
pageSize: 10,
|
||||
fetching: false,
|
||||
totalPages: 0,
|
||||
memberValue: null, // 授课老师关键词
|
||||
memberValue: {
|
||||
value:"",
|
||||
label:""
|
||||
}, // 授课老师关键词
|
||||
inputV1: "", //*直播名称
|
||||
time: "", //*直播时间
|
||||
inputV2: "", //*直播时长
|
||||
@@ -505,7 +508,7 @@ export default {
|
||||
state.imageUrl = res.data.data.liveCover;
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`查询失败`);
|
||||
//message.error(`查询失败`);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -534,6 +537,7 @@ export default {
|
||||
|
||||
if (info.file.status === "error") {
|
||||
state.loading = false;
|
||||
message.destroy();
|
||||
message.error("upload error");
|
||||
}
|
||||
};
|
||||
@@ -550,11 +554,11 @@ export default {
|
||||
type: 6,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
//message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 2) {
|
||||
apiTask
|
||||
@@ -568,11 +572,11 @@ export default {
|
||||
type: 6,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
//message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
console.log("props.projectTemplateId",props.projectTemplateId);
|
||||
@@ -586,11 +590,11 @@ export default {
|
||||
type: 6,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
//message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -653,6 +657,7 @@ export default {
|
||||
api
|
||||
.updateLiveBroadcastMessage(state.obj)
|
||||
.then((res) => {
|
||||
message.destroy();
|
||||
message.success("提交成功");
|
||||
updateTask(res);
|
||||
closeDrawer();
|
||||
@@ -662,6 +667,7 @@ export default {
|
||||
api
|
||||
.createLiveBroadcast(state.obj)
|
||||
.then((res) => {
|
||||
message.destroy();
|
||||
message.success("提交成功");
|
||||
updateTask(res);
|
||||
closeDrawer();
|
||||
@@ -679,6 +685,7 @@ export default {
|
||||
file.type === "image/bmp" ||
|
||||
file.type === "image/gif";
|
||||
if (!isJpgOrPng) {
|
||||
message.destroy();
|
||||
message.error("仅支持jpg、gif、png、jpeg、svg、bmp格式!");
|
||||
return reject(false);
|
||||
}
|
||||
@@ -726,7 +733,7 @@ export default {
|
||||
const queryMember = () => {
|
||||
if (!state.memberValue) return;
|
||||
let obj = {
|
||||
keyWord: state.memberValue,
|
||||
keyWord: state.memberValue.label,
|
||||
id: 0,
|
||||
org: 0,
|
||||
pageNo: state.currentPage,
|
||||
@@ -744,6 +751,7 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
message.destroy();
|
||||
message.error("获取员工失败" + err);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -328,7 +328,7 @@ export default {
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addprojvisible", false);
|
||||
ctx.emit("update:edit", false);
|
||||
ctx.emit("changeData", false);
|
||||
|
||||
state.selectedRows = [];
|
||||
state.selectedRowKeys = [];
|
||||
};
|
||||
@@ -386,11 +386,11 @@ export default {
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error("获取全部项目信息接口失败");
|
||||
//message.error("获取全部项目信息接口失败");
|
||||
});
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("哈哈,我进来了");
|
||||
|
||||
if (bool) {
|
||||
getAllProjText();
|
||||
}
|
||||
|
||||
@@ -187,13 +187,13 @@ export default {
|
||||
type: 7,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
// message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
state.addLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
// message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 2) {
|
||||
apiTask
|
||||
@@ -206,14 +206,12 @@ export default {
|
||||
type: 7,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(
|
||||
`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`
|
||||
);
|
||||
// message.success(`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
|
||||
//message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
|
||||
@@ -226,14 +224,12 @@ export default {
|
||||
type: 7,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(
|
||||
`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`
|
||||
);
|
||||
//message.success( `${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
closeDrawer();
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
|
||||
//message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -261,6 +257,7 @@ export default {
|
||||
.then((res) => {
|
||||
message.success("编辑成功");
|
||||
updateTask(res);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
@@ -269,6 +266,7 @@ export default {
|
||||
.then((res) => {
|
||||
message.success("提交成功");
|
||||
updateTask(res);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
@@ -284,7 +282,7 @@ export default {
|
||||
state.textV1 = res.data.data.linkDescription;
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`查询失败`);
|
||||
//message.error(`查询失败`);
|
||||
});
|
||||
};
|
||||
return {
|
||||
|
||||
@@ -512,11 +512,7 @@ export default {
|
||||
return Promise.reject("请输入考试名称");
|
||||
}
|
||||
};
|
||||
let checkExaminationExplain = async (_rule, value) => {
|
||||
if (!value) {
|
||||
return Promise.reject("请输入考试说明");
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
let checkChoosedTest = async (_rule, value) => {
|
||||
if (!value) {
|
||||
@@ -567,12 +563,7 @@ export default {
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
examinationExplain: [
|
||||
{
|
||||
validator: checkExaminationExplain,
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
|
||||
/*
|
||||
choosedTest: [
|
||||
{
|
||||
@@ -705,7 +696,7 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`查询失败`);
|
||||
//message.error(`查询失败`);
|
||||
});
|
||||
};
|
||||
const updateTest = () => {
|
||||
@@ -748,7 +739,7 @@ export default {
|
||||
closeDrawer();
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`编辑失败`);
|
||||
message.error(`创建失败`);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -771,13 +762,13 @@ export default {
|
||||
};
|
||||
RouterEditTask(editObj1)
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
//message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
state.addLoading = false;
|
||||
closeDrawer();
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 2) {
|
||||
let editObj = {
|
||||
@@ -792,13 +783,11 @@ export default {
|
||||
// 新增编辑或新增项目
|
||||
ProjectEditTask(editObj)
|
||||
.then(() => {
|
||||
message.success(
|
||||
`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`
|
||||
);
|
||||
//message.success(`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
|
||||
//message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
console.log("");
|
||||
@@ -812,13 +801,11 @@ export default {
|
||||
type: 5,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(
|
||||
`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`
|
||||
);
|
||||
//message.success( `${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
|
||||
//message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,6 +242,7 @@ export default {
|
||||
state.textV1 = "",
|
||||
state.time = undefined,
|
||||
state.basevote = "",
|
||||
state.ballotId ="",
|
||||
ctx.emit("update:addvoteVisible", false);
|
||||
ctx.emit("update:edit", false);
|
||||
};
|
||||
@@ -322,12 +323,12 @@ export default {
|
||||
type: 12,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? '编辑' : '新增'}关卡任务成功`)
|
||||
//message.success(`${props.edit ? '编辑' : '新增'}关卡任务成功`)
|
||||
ctx.emit("changeData", false);
|
||||
state.addLoading = false;
|
||||
})
|
||||
.catch(( ) => {
|
||||
message.error(`${props.edit ? '编辑' : '新增'}关卡任务失败`)
|
||||
//message.error(`${props.edit ? '编辑' : '新增'}关卡任务失败`)
|
||||
});
|
||||
}else if(props.isLevel ==2){
|
||||
apiTask
|
||||
@@ -340,11 +341,11 @@ export default {
|
||||
type: 12,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? '编辑' : '新增'}阶段任务成功`)
|
||||
//message.success(`${props.edit ? '编辑' : '新增'}阶段任务成功`)
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? '编辑' : '新增'}阶段任务失败`)
|
||||
////message.error(`${props.edit ? '编辑' : '新增'}阶段任务失败`)
|
||||
});
|
||||
}else if (props.isLevel == 3) {
|
||||
|
||||
@@ -357,10 +358,11 @@ export default {
|
||||
type: 12,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
ctx.emit("changeData", false);
|
||||
//message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -400,9 +402,11 @@ export default {
|
||||
console.log("updte======");
|
||||
updateToTask(res);
|
||||
closeDrawer();
|
||||
message.destroy();
|
||||
message.success("修改投票信息成功")
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error("修改投票信息失败")
|
||||
})
|
||||
}else{
|
||||
@@ -411,9 +415,11 @@ export default {
|
||||
.then((res) => {
|
||||
updateToTask(res);
|
||||
closeDrawer();
|
||||
message.destroy();
|
||||
message.success("创建投票信息成功")
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error("创建投票信息失败")
|
||||
})
|
||||
}
|
||||
|
||||
@@ -573,12 +573,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="共享文档">
|
||||
<a-tab-pane key="13" tab="共享文档">
|
||||
<div class="sametab">
|
||||
<div class="Gcon">
|
||||
<div class="pad"></div>
|
||||
<div class="Gin">
|
||||
<div class="headone" style="transform: translateX(30px)">
|
||||
<div class="headone">
|
||||
<div class="box"></div>
|
||||
<div class="onetitle">上传共享文档</div>
|
||||
<div class="oneedi">
|
||||
@@ -589,8 +589,8 @@
|
||||
<a-upload
|
||||
v-model:file-list="fileList"
|
||||
name="file"
|
||||
action="/api/file/upload"
|
||||
@change="handleChange"
|
||||
action="/manageApi/file/upload"
|
||||
@change="handleChange2"
|
||||
>
|
||||
<span
|
||||
class="xkbtn"
|
||||
@@ -609,8 +609,8 @@
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
v-for="item in docList"
|
||||
:key="item.src"
|
||||
v-for="item in fileList"
|
||||
:key="item.uid"
|
||||
class="docListStyle"
|
||||
>
|
||||
<img
|
||||
@@ -623,10 +623,14 @@
|
||||
"
|
||||
alt=""
|
||||
/>
|
||||
<span style="font: oblique 16px Sans-serif">{{
|
||||
<span style="font: oblique bold 16px Sans-serif">{{
|
||||
item.name
|
||||
}}</span>
|
||||
<span style="color: #4ea6ff; float: right">删除</span>
|
||||
<span
|
||||
style="color: #4ea6ff; float: right; cursor: pointer"
|
||||
@click="deFile(item.uid)"
|
||||
>删除</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -940,13 +944,14 @@ export default defineComponent({
|
||||
res.data.data.projectTemplateInfo.courseSyncFlag;
|
||||
state.projectInfo.level = res.data.data.projectTemplateInfo.level;
|
||||
state.projectInfo.systemId =
|
||||
res.data.data.projectTemplateInfo.systemId;
|
||||
res.data.data.projectTemplateInfo.systemId;
|
||||
state.projectInfo.boeFlag = res.data.data.projectTemplateInfo.boeFlag;
|
||||
state.projectInfo.noticeFlag =
|
||||
res.data.data.projectTemplateInfo.noticeFlag;
|
||||
state.projectInfo.remark = res.data.data.projectTemplateInfo.remark;
|
||||
state.projectInfo.status = res.data.data.projectTemplateInfo.status;
|
||||
state.projectInfo.picUrl = res.data.data.projectTemplateInfo.picUrl;
|
||||
state.projectInfo.attach =res.res.data.data.projectTemplateInfo.attach;
|
||||
let data = res.data.data.stageList;
|
||||
console.log("data=====", data);
|
||||
for (let i in data) {
|
||||
@@ -972,6 +977,7 @@ export default defineComponent({
|
||||
|
||||
// 发布公告
|
||||
const addNotice = () => {
|
||||
console.log("ok====s");
|
||||
let obj = {
|
||||
name: state.projectInfo.name,
|
||||
category: state.projectInfo.category,
|
||||
@@ -986,11 +992,13 @@ export default defineComponent({
|
||||
boeFlag: state.projectInfo.boeFlag ? 1 : 0,
|
||||
courseSyncFlag: state.projectInfo.courseSyncFlag ? 1 : 0,
|
||||
notice: state.projectInfo.notice,
|
||||
noticeFlag: 0,
|
||||
noticeFlag: state.projectInfo.noticeFlag,
|
||||
projectTemplateId: localStorage.getItem("projectTemplateId"),
|
||||
remark: state.projectInfo.remark,
|
||||
status: state.projectInfo.status,
|
||||
attach:state.projectInfo.attach,
|
||||
};
|
||||
console.log("obj======",obj);
|
||||
api
|
||||
.templateEdit(obj)
|
||||
.then((res) => {
|
||||
@@ -1108,6 +1116,51 @@ export default defineComponent({
|
||||
console.log("获取项目积分规则失败了", err);
|
||||
});
|
||||
};
|
||||
const handleChange2 = ({ file, fileList }) => {
|
||||
let list = [];
|
||||
if (file.status !== "uploading") {
|
||||
console.log("上传的list", fileList);
|
||||
console.log(file);
|
||||
list = state.fileList;
|
||||
console.log("list", list);
|
||||
let str = JSON.stringify(list);
|
||||
console.log("str", str);
|
||||
//要编辑项目
|
||||
api
|
||||
.templateEdit({
|
||||
name: state.projectInfo.name,
|
||||
category: state.projectInfo.category,
|
||||
picUrl: state.projectInfo.picUrl,
|
||||
beginTime: new Date(state.projectInfo.beginTime).getTime(),
|
||||
endTime: new Date(state.projectInfo.endTime).getTime(),
|
||||
manager: state.projectInfo.manager,
|
||||
managerId: state.projectInfo.managerId || 0,
|
||||
sourceBelongId: state.projectInfo.sourceBelongId,
|
||||
level: state.projectInfo.level,
|
||||
systemId: state.projectInfo.systemId,
|
||||
boeFlag: state.projectInfo.boeFlag ? 1 : 0,
|
||||
courseSyncFlag: state.projectInfo.courseSyncFlag ? 1 : 0,
|
||||
notice: state.projectInfo.notice,
|
||||
noticeFlag: state.projectInfo.noticeFlag,
|
||||
projectTemplateId: localStorage.getItem("projectTemplateId"),
|
||||
remark: state.projectInfo.remark,
|
||||
status: state.projectInfo.status,
|
||||
attach:str,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("上传成功", res);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("上传失败了", err);
|
||||
});
|
||||
}
|
||||
|
||||
if (file.status === "done") {
|
||||
message.success(`${file.name} 文件上传成功`);
|
||||
} else if (file.status === "error") {
|
||||
message.error(`${file.name} 文件上传失败.`);
|
||||
}
|
||||
};
|
||||
//设置积分规则
|
||||
const editRule = () => {
|
||||
let obj = {
|
||||
@@ -1186,6 +1239,7 @@ export default defineComponent({
|
||||
toEdit,
|
||||
getScoreRule,
|
||||
editRule,
|
||||
handleChange2,
|
||||
scoresum,
|
||||
};
|
||||
},
|
||||
@@ -1258,6 +1312,427 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
}
|
||||
.sametab {
|
||||
// margin-left: 30px;
|
||||
// margin-right: 30px;
|
||||
margin-top: 30px;
|
||||
width: 100%;
|
||||
// background-color: green;
|
||||
.Gcon {
|
||||
display: flex;
|
||||
.pad {
|
||||
height: 100%;
|
||||
width: 40px;
|
||||
}
|
||||
.Gin {
|
||||
// background-color: #bfa;
|
||||
margin-top: 30px;
|
||||
.headone {
|
||||
// background-color: red;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
.box {
|
||||
width: 4px;
|
||||
height: 20px;
|
||||
background-color: #409eff;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.onetitle {
|
||||
margin-left: 15px;
|
||||
color: #333333;
|
||||
font-size: 14px;
|
||||
}
|
||||
.oneedi {
|
||||
margin-left: 15px;
|
||||
color: #4ea6ff;
|
||||
cursor: pointer;
|
||||
}
|
||||
.twobtn {
|
||||
display: flex;
|
||||
.btnone {
|
||||
width: 42px;
|
||||
height: 24px;
|
||||
border: 1px solid rgba(64, 158, 255, 1);
|
||||
border-radius: 4px;
|
||||
color: rgba(64, 158, 255, 1);
|
||||
margin-left: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btntwo {
|
||||
width: 42px;
|
||||
height: 24px;
|
||||
border: 1px solid rgba(64, 158, 255, 1);
|
||||
border-radius: 4px;
|
||||
color: #ffffff;
|
||||
margin-left: 20px;
|
||||
background: #409eff;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btnbox {
|
||||
.ant-upload-list {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
.onemain {
|
||||
margin-top: 20px;
|
||||
margin-left: 55px;
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
.checkcon {
|
||||
position: relative;
|
||||
.in {
|
||||
position: absolute;
|
||||
// margin-top: 10px;
|
||||
left: 0;
|
||||
top: 3px;
|
||||
}
|
||||
.yulan {
|
||||
// color: yellow;
|
||||
margin-left: 22px;
|
||||
// display: inline-block;
|
||||
}
|
||||
.yulan2 {
|
||||
margin-left: 22px;
|
||||
}
|
||||
.ant-input-number {
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
margin: 10px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #6d7584;
|
||||
.ant-input-number-input {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 14px;
|
||||
padding: 0;
|
||||
color: #409eff;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.twomain {
|
||||
margin-left: 20px;
|
||||
margin-top: 20px;
|
||||
.ant-switch-checked {
|
||||
background-color: #5dc988;
|
||||
}
|
||||
.info {
|
||||
margin-left: 10px;
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
// margin-top: 10px;
|
||||
}
|
||||
.infor {
|
||||
margin-left: 38px;
|
||||
margin-top: 10px;
|
||||
color: #c7cbd2;
|
||||
font-size: 14px;
|
||||
}
|
||||
.chooseshow {
|
||||
// background-color: red;
|
||||
margin-left: 38px;
|
||||
margin-top: 12px;
|
||||
.fane {
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.choo {
|
||||
display: none;
|
||||
}
|
||||
.btm {
|
||||
margin-left: 38px;
|
||||
margin-top: 20px;
|
||||
.bmo {
|
||||
color: #6f6f6f;
|
||||
font-size: 14px;
|
||||
}
|
||||
.bmt {
|
||||
color: #c7cbd2;
|
||||
font-size: 14px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
.chosecon {
|
||||
display: flex;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 20px;
|
||||
.chose {
|
||||
position: relative;
|
||||
.inl {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
}
|
||||
.sh {
|
||||
margin-left: 23px;
|
||||
color: #6f6f6f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.Lhead {
|
||||
display: flex;
|
||||
.btns {
|
||||
display: flex;
|
||||
margin-left: 20px;
|
||||
// flex-wrap: wrap;
|
||||
.btn {
|
||||
padding: 0px 26px 0px 26px;
|
||||
height: 38px;
|
||||
background: rgba(64, 158, 255, 0);
|
||||
border-radius: 8px;
|
||||
border: 1px solid rgba(64, 158, 255, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 14px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
.search {
|
||||
background-size: 100%;
|
||||
}
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: rgba(64, 158, 255, 1);
|
||||
line-height: 36px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
.btn1 {
|
||||
.search {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url("../../assets/images/courseManage/search1.png");
|
||||
}
|
||||
}
|
||||
.btn2 {
|
||||
.search {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/reset1.png");
|
||||
}
|
||||
}
|
||||
.btn3 {
|
||||
margin-right: 0px;
|
||||
.search {
|
||||
width: 17px;
|
||||
height: 18px;
|
||||
background-image: url("../../assets/images/courseManage/add1.png");
|
||||
}
|
||||
}
|
||||
.btn1:hover {
|
||||
background: rgba(64, 158, 255, 1);
|
||||
.search {
|
||||
background-image: url("../../assets/images/courseManage/search0.png");
|
||||
}
|
||||
.btnText {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.btn2:hover {
|
||||
background: rgba(64, 158, 255, 1);
|
||||
.search {
|
||||
background-image: url("../../assets/images/courseManage/reset0.png");
|
||||
}
|
||||
.btnText {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.btn3:hover {
|
||||
background: rgba(64, 158, 255, 1);
|
||||
.search {
|
||||
background-image: url("../../assets/images/courseManage/add0.png");
|
||||
}
|
||||
.btnText {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.Lbom {
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
.item {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
// background-color: green;
|
||||
margin-top: 40px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #f0f4fe;
|
||||
.itemhead {
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
background-color: #f0f4fe;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
.lev {
|
||||
margin-left: 27px;
|
||||
margin-right: 16px;
|
||||
line-height: 100%;
|
||||
color: #409eff;
|
||||
font-size: 16px;
|
||||
}
|
||||
.lin {
|
||||
width: 1px;
|
||||
height: 35%;
|
||||
background-color: #c7cbd2;
|
||||
}
|
||||
.nam {
|
||||
margin-left: 16px;
|
||||
color: #4f5156;
|
||||
line-height: 100%;
|
||||
font-size: 16px;
|
||||
}
|
||||
.count {
|
||||
position: absolute;
|
||||
line-height: 100%;
|
||||
color: #4f5156;
|
||||
font-size: 14px;
|
||||
right: 40px;
|
||||
span:nth-child(2) {
|
||||
color: #63ca8c;
|
||||
}
|
||||
}
|
||||
}
|
||||
.itembomm {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 150px;
|
||||
.it {
|
||||
// margin-left: 110px;
|
||||
// margin-right: 110px;
|
||||
width: 13%;
|
||||
text-align: center;
|
||||
.on {
|
||||
font-size: 30px;
|
||||
}
|
||||
.ittext {
|
||||
color: #4f5156;
|
||||
margin-top: 16px;
|
||||
margin-left: -5px;
|
||||
}
|
||||
}
|
||||
.linee {
|
||||
background-color: #ecf2fb;
|
||||
width: 1px;
|
||||
height: 55%;
|
||||
}
|
||||
.itright {
|
||||
position: absolute;
|
||||
right: 45px;
|
||||
display: flex;
|
||||
.te {
|
||||
color: #4ea6ff;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.more {
|
||||
position: relative;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
.moreArrow {
|
||||
width: 13px;
|
||||
height: 7px;
|
||||
display: inline-block;
|
||||
background-image: url("../../assets/images/navtop/down.png");
|
||||
background-size: 100%;
|
||||
margin: 2px;
|
||||
margin-left: 7px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
.moreItems {
|
||||
width: 80px;
|
||||
height: 70px;
|
||||
display: none;
|
||||
background: #ffffff;
|
||||
box-shadow: 2px 3px 9px 3px rgba(0, 0, 0, 0.05);
|
||||
border-radius: 3px;
|
||||
border: 0px solid #dcdcdc;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 20px;
|
||||
z-index: 100;
|
||||
.roleItem {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: rgba(79, 81, 86, 1);
|
||||
line-height: 36px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
.roleItem:hover {
|
||||
color: #4ea6ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.more:hover .moreArrow {
|
||||
background-image: url("../../assets/images/navtop/up.png");
|
||||
}
|
||||
.more:hover .moreItems {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.show {
|
||||
color: blue;
|
||||
}
|
||||
.noshow {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.create {
|
||||
margin-top: 40px;
|
||||
.taskbox {
|
||||
width: 412px;
|
||||
height: 160px;
|
||||
border-radius: 10px;
|
||||
position: relative;
|
||||
// margin-left: 68px;
|
||||
margin-bottom: 40px;
|
||||
cursor: pointer;
|
||||
.leftt {
|
||||
position: absolute;
|
||||
top: 18px;
|
||||
left: 0;
|
||||
}
|
||||
.photo {
|
||||
position: absolute;
|
||||
top: 42px;
|
||||
left: 37px;
|
||||
}
|
||||
.rightt {
|
||||
position: absolute;
|
||||
top: 69px;
|
||||
right: 26px;
|
||||
}
|
||||
.centerbox {
|
||||
position: absolute;
|
||||
top: 52px;
|
||||
left: 145px;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
//line-height: 36px;
|
||||
}
|
||||
.centermain {
|
||||
color: rgba(135, 139, 146, 1);
|
||||
font-size: 14px;
|
||||
position: absolute;
|
||||
left: 144px;
|
||||
bottom: 49px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.editBtn {
|
||||
float: right;
|
||||
margin-right: 150px;
|
||||
|
||||
Reference in New Issue
Block a user