mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 05:46:45 +08:00
--fix 路径图草稿
This commit is contained in:
@@ -743,7 +743,6 @@ export default {
|
||||
liveExplain: state.textV1,
|
||||
liveNotice: state.liveNotice,
|
||||
liveFlag: "",
|
||||
id: props.edit ? Number(props.EditLiveId) : 0,
|
||||
liveLink: state.inputV4,
|
||||
liveName: state.inputV1,
|
||||
livePlayback: state.switchC1 ? "1" : "0",
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<draggable v-model="level" chosenClass="chosen" ghostClass="ghost" forceFallback="true" group="stage"
|
||||
animation="500" @end="changeSort">
|
||||
<template #item="{ element }">
|
||||
<div class="items" :class="isactive == element.chapterId ? 'active' : ''"
|
||||
@click="changebgc(element.chapterId)">
|
||||
<div class="items" :class="isactive == element.id ? 'active' : ''"
|
||||
@click="changebgc(element.id)">
|
||||
<div class="items1">
|
||||
<div class="boxs_left">
|
||||
<a-popover placement="topLeft" trigger="click">
|
||||
@@ -54,7 +54,7 @@
|
||||
<div class="imgIcon" @click="showModal(element)"></div>
|
||||
</div>
|
||||
<div class="boxs_right">
|
||||
<div class="imgIcon" @click="showDeleteChapter(element.chapterId)"></div>
|
||||
<div class="imgIcon" @click="showDeleteChapter(element.id)"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="items2">
|
||||
@@ -554,7 +554,7 @@
|
||||
)">
|
||||
编辑
|
||||
</span>
|
||||
<span style="color: #4ea6ff; cursor: pointer" @click="showDeleteModal(element.routerTaskId)">
|
||||
<span style="color: #4ea6ff; cursor: pointer" @click="showDeleteModal(element.id)">
|
||||
删除
|
||||
</span>
|
||||
</div>
|
||||
@@ -998,6 +998,7 @@ export default {
|
||||
chooseChapterId: null,
|
||||
|
||||
updateChapterID: null, //编辑关卡id
|
||||
updateID: null, //编辑关卡id
|
||||
deleteChapterModal: false, //删除关卡弹窗
|
||||
deleteChapterId: null, //删除关卡id
|
||||
|
||||
@@ -1019,7 +1020,7 @@ export default {
|
||||
state.value1 = element.name;
|
||||
state.value2 = element.remark;
|
||||
state.updateChapterID = element.chapterId;
|
||||
|
||||
state.updateID = element.id;
|
||||
}
|
||||
};
|
||||
const closeModal = () => {
|
||||
@@ -1060,10 +1061,10 @@ export default {
|
||||
name: state.value1,
|
||||
remark: state.value2,
|
||||
routerId: state.routerId,
|
||||
id: state.updateID,
|
||||
chapterId: state.updateChapterID,
|
||||
};
|
||||
api
|
||||
.updateChapter(obj)
|
||||
api.updateChapter(obj)
|
||||
.then((res) => {
|
||||
console.log("修改成功", res);
|
||||
message.success("修改成功");
|
||||
@@ -1119,7 +1120,7 @@ export default {
|
||||
const deleteChapter = () => {
|
||||
console.log("chapterId", state.deleteChapterId);
|
||||
let obj = {
|
||||
chapterId: state.deleteChapterId,
|
||||
id: state.deleteChapterId,
|
||||
};
|
||||
api
|
||||
.deleteChapter(obj)
|
||||
@@ -1273,22 +1274,16 @@ export default {
|
||||
const dataAssignment = (id) => {
|
||||
console.log(state.level);
|
||||
for (let i = 0; i < state.level.length; i++) {
|
||||
console.log("state.level[i].chapterId", state.level[i].chapterId, id);
|
||||
if (state.level[i].chapterId == Number(id)) {
|
||||
if (state.level[i].id == 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,
|
||||
id: element.id,
|
||||
key: element.routerTaskId,
|
||||
lei: checkType(element.type),
|
||||
creater: element.name,
|
||||
cretime:
|
||||
element.duration || element.duration == 0
|
||||
? element.duration
|
||||
: "-",
|
||||
cretime: element.duration || element.duration === 0 ? element.duration : "-",
|
||||
checked1: element.flag,
|
||||
routerTaskId: element.routerTaskId,
|
||||
courseId: element.courseId,
|
||||
@@ -1298,12 +1293,9 @@ export default {
|
||||
chapterId: element.chapterId,
|
||||
...element
|
||||
};
|
||||
// console.log("obj", obj);
|
||||
array.push(obj);
|
||||
// console.log("array", array);
|
||||
});
|
||||
state.tableData = array;
|
||||
// console.log("tableData", state.tableData);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user