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