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