mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 21:06:44 +08:00
feat:合并
This commit is contained in:
@@ -8,8 +8,7 @@
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div v-if="isRefEdit == 2" class="headerTitle">编辑外链</div>
|
||||
<div v-else class="headerTitle">添加外链</div>
|
||||
<div class="headerTitle">{{ title }}外链</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@@ -127,20 +126,13 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
isactive: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
routerId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
inputV1: "",
|
||||
inputV2: "",
|
||||
textV1: "",
|
||||
title: null,
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
console.log(props, 1111);
|
||||
@@ -164,10 +156,10 @@ export default {
|
||||
createTime: "",
|
||||
linkAddress: state.inputV2,
|
||||
linkDescription: state.textV1,
|
||||
linkFlag: "0",
|
||||
linkFlag: "",
|
||||
linkId: props.EditRefId == null ? 0 : props.EditRefId,
|
||||
linkName: state.inputV1,
|
||||
linkTag: "0",
|
||||
linkTag: "",
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
};
|
||||
@@ -179,11 +171,9 @@ export default {
|
||||
console.log("编辑成功", res);
|
||||
message.success("编辑成功");
|
||||
closeDrawer();
|
||||
ctx.emit("changeData", false);
|
||||
})
|
||||
.catch((err) => console.log(err));
|
||||
} else {
|
||||
//创建外链
|
||||
api
|
||||
.createExternalChain(obj)
|
||||
.then((res) => {
|
||||
@@ -193,12 +183,12 @@ export default {
|
||||
//学习路径的创建
|
||||
if (props.isStudy == 1) {
|
||||
let objj = {
|
||||
chapterId: props.isactive,
|
||||
courseId: res.data.data.linkId,
|
||||
chapterId: 36,
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: obj.linkName,
|
||||
routerId: props.routerId,
|
||||
routerId: 92,
|
||||
routerTaskId: 0,
|
||||
type: 7,
|
||||
};
|
||||
@@ -239,13 +229,10 @@ export default {
|
||||
});
|
||||
}
|
||||
};
|
||||
//不生效
|
||||
onMounted(() => {
|
||||
console.log("few");
|
||||
// api.getLink({ linkId: props.EditRefId }).then((res) => {
|
||||
// console.log(res), "获取成功";
|
||||
// });
|
||||
state.title = props.isRefEdit == 2 ? "编辑" : "添加";
|
||||
});
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
|
||||
@@ -501,6 +501,7 @@
|
||||
margin-right: 25px;
|
||||
cursor: pointer;
|
||||
"
|
||||
@click="decideType(element.lei, element.courseId)"
|
||||
>
|
||||
编辑
|
||||
</span>
|
||||
@@ -871,6 +872,10 @@ export default {
|
||||
name: "默认关卡",
|
||||
},
|
||||
],
|
||||
isRefEdit: 1, //外链编辑
|
||||
isLiveEdit: 1, //直播编辑
|
||||
EditRefId: null, //要编辑的外链的id
|
||||
EditLiveId: null, //要编辑的直播的id
|
||||
tableData: [
|
||||
{
|
||||
key: 1,
|
||||
@@ -1687,18 +1692,39 @@ export default {
|
||||
let obj = {
|
||||
chapterId: state.isactive,
|
||||
routerTaskIdList: state.selectRow,
|
||||
}
|
||||
};
|
||||
api
|
||||
.moveTask(obj)
|
||||
.then((res) => {
|
||||
console.log("移动成功", res);
|
||||
message.destroy();
|
||||
message.success("移动成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("移动失败",err);
|
||||
})
|
||||
}
|
||||
.moveTask(obj)
|
||||
.then((res) => {
|
||||
console.log("移动成功", res);
|
||||
message.destroy();
|
||||
message.success("移动成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("移动失败", err);
|
||||
});
|
||||
};
|
||||
//打开编辑外链的弹窗
|
||||
const showEditRefDrawer = (id) => {
|
||||
state.addrefvisible = true;
|
||||
state.isRefEdit = 2;
|
||||
state.EditRefId = id;
|
||||
};
|
||||
//打开编辑直播的弹窗
|
||||
const showEditLiveDrawer = (id) => {
|
||||
state.addlivevisible = true;
|
||||
state.isLiveEdit = 2;
|
||||
state.EditLiveId = id;
|
||||
};
|
||||
//编辑的按钮
|
||||
const decideType = (type, id) => {
|
||||
console.log(type, id);
|
||||
if (type == "外链") {
|
||||
showEditRefDrawer(id);
|
||||
} else if (type == "直播") {
|
||||
showEditLiveDrawer(id);
|
||||
}
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
// tableDataFunc,
|
||||
@@ -1737,6 +1763,9 @@ export default {
|
||||
deletecTaskAll,
|
||||
moveTask,
|
||||
showDeleteModal,
|
||||
showEditRefDrawer,
|
||||
showEditLiveDrawer,
|
||||
decideType,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -191,6 +191,10 @@
|
||||
<add-ref
|
||||
v-model:addrefVisible="addrefvisible"
|
||||
@changeData="updateTableData"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
v-model:isRefEdit="isRefEdit"
|
||||
v-model:EditRefId="EditRefId"
|
||||
/>
|
||||
</div>
|
||||
<!-- 添加外链侧弹窗 -->
|
||||
@@ -207,6 +211,10 @@
|
||||
<div>
|
||||
<add-discuss
|
||||
v-model:adddiscussVisible="adddiscussvisible"
|
||||
v-model:edit="edit"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
v-model:editDiscussId="editDiscussId"
|
||||
@changeData="updateTableData"
|
||||
/>
|
||||
</div>
|
||||
@@ -224,6 +232,9 @@
|
||||
<div>
|
||||
<add-active
|
||||
v-model:addactiveVisible="addactivevisible"
|
||||
v-model:projectId="projectId"
|
||||
v-model:edit="edit"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
@changeData="updateTableData"
|
||||
/>
|
||||
</div>
|
||||
@@ -242,6 +253,10 @@
|
||||
<add-eval
|
||||
v-model:addevalVisible="addevalvisible"
|
||||
@changeData="updateTableData"
|
||||
v-model:edit="edit"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
v-model:EditEvalId="EditEvalId"
|
||||
/>
|
||||
</div>
|
||||
<!-- 添加测评侧弹窗 -->
|
||||
@@ -259,6 +274,9 @@
|
||||
<add-invist
|
||||
v-model:addinvistVisible="addinvistvisible"
|
||||
@changeData="updateTableData"
|
||||
v-model:edit="edit"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
/>
|
||||
</div>
|
||||
<!-- 添加评估侧弹窗 -->
|
||||
@@ -275,6 +293,7 @@
|
||||
<add-vote
|
||||
v-model:addvoteVisible="addvotevisible"
|
||||
@changeData="updateTableData"
|
||||
v-model:edit="edit"
|
||||
v-model:projectId="projectId"
|
||||
v-model:chooseStageId="chooseStageId"
|
||||
/>
|
||||
@@ -481,6 +500,7 @@
|
||||
margin-right: 25px;
|
||||
cursor: pointer;
|
||||
"
|
||||
@click="decideType(element.lei, element.courseId)"
|
||||
>
|
||||
编辑
|
||||
</span>
|
||||
@@ -1059,6 +1079,7 @@ export default {
|
||||
cretime: value.duration ? value.duration : "-",
|
||||
checked1: value.flag ? true : false,
|
||||
checked: false, //是否选中类型
|
||||
courseId: value.courseId,
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
@@ -1648,25 +1669,21 @@ export default {
|
||||
};
|
||||
//移动任务到阶段
|
||||
const moveTask = () => {
|
||||
let arr = state.selectRow;
|
||||
console.log("选择的行信息", arr);
|
||||
arr.map((value) => {
|
||||
console.log("value:", value);
|
||||
let obj = {
|
||||
chapterId: state.chooseStageId,
|
||||
routerTaskIdList: value,
|
||||
};
|
||||
apimove
|
||||
.moveTask(obj)
|
||||
.then((res) => {
|
||||
console.log("移动成功", res);
|
||||
message.destroy();
|
||||
message.success("移动成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("移动失败", err);
|
||||
});
|
||||
});
|
||||
let obj = {
|
||||
stageId: state.chooseStageId,
|
||||
projectTaskId: state.selectRow,
|
||||
};
|
||||
apimove
|
||||
.moveTask(obj)
|
||||
.then((res) => {
|
||||
console.log("移动成功", res);
|
||||
message.destroy();
|
||||
message.success("移动成功");
|
||||
getTask();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("移动失败", err);
|
||||
});
|
||||
};
|
||||
//批量删除
|
||||
const deleteTaskAll = () => {
|
||||
@@ -1873,6 +1890,14 @@ export default {
|
||||
showEditRefDrawer(id);
|
||||
} else if (type == "直播") {
|
||||
showEditLiveDrawer(id);
|
||||
} else if (type == "测评") {
|
||||
showDrawerAddEval(id);
|
||||
} else if (type == "评估") {
|
||||
showDrawerAddInvist(id);
|
||||
} else if (type == "投票") {
|
||||
showDrawerAddVote(id);
|
||||
} else if (type == "讨论") {
|
||||
showDrawerAddDiscuss(id);
|
||||
}
|
||||
};
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user