mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 12:56:45 +08:00
fix:修改关卡添加任务
This commit is contained in:
@@ -1385,10 +1385,13 @@ export default {
|
||||
const dataAssignment = (id) => {
|
||||
console.log(state.level);
|
||||
for (let i = 0; i < state.level.length; i++) {
|
||||
if (state.level[i].chapterId === id) {
|
||||
console.log("state.level[i].chapterId", state.level[i].chapterId, id);
|
||||
if (state.level[i].chapterId == Number(id)) {
|
||||
let array = [];
|
||||
state.chooseProjectList = JSON.stringify(state.level[i].taskList);
|
||||
console.log("state.level[i].taskList", state.level[i].taskList);
|
||||
state.level[i].taskList.forEach((element) => {
|
||||
// console.log("element", element);
|
||||
let obj = {
|
||||
id: element.routerTaskId,
|
||||
key: element.routerTaskId,
|
||||
@@ -1403,9 +1406,12 @@ export default {
|
||||
routerId: element.routerId,
|
||||
chapterId: element.chapterId,
|
||||
};
|
||||
// console.log("obj", obj);
|
||||
array.push(obj);
|
||||
// console.log("array", array);
|
||||
});
|
||||
state.tableData = array;
|
||||
// console.log("tableData", state.tableData);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1432,12 +1438,15 @@ export default {
|
||||
});
|
||||
console.log("路径图详情", res);
|
||||
if (state.level.length > 0) {
|
||||
let chapter = localStorage.getItem("chapterId");
|
||||
// console.log("chapter", chapter, chapter !== "null");
|
||||
let chapter = localStorage.getItem("chapterId")
|
||||
? JSON.parse(localStorage.getItem("chapterId"))
|
||||
: null;
|
||||
console.log("chapter", chapter);
|
||||
if (chapter) {
|
||||
dataAssignment(chapter); //用哪个的任务表
|
||||
state.isactive = chapter; //哪个亮
|
||||
} else {
|
||||
console.log("state.level[0]", state.level[0]);
|
||||
dataAssignment(state.level[0].chapterId);
|
||||
state.isactive = state.level[0].chapterId;
|
||||
}
|
||||
@@ -1740,7 +1749,7 @@ export default {
|
||||
const moveTask = () => {
|
||||
if (state.isactive == state.removeStageId) {
|
||||
message.destroy();
|
||||
message.warning("选择的任务已在当前阶段");
|
||||
message.warning("选择的任务已在当前关卡");
|
||||
} else if (state.removeStageId == null) {
|
||||
message.destroy();
|
||||
message.warning("请选择关卡");
|
||||
|
||||
Reference in New Issue
Block a user