mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
feat:外链添加到阶段
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">添加外链</div>
|
||||
<div class="headerTitle">{{ title }}外链</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@@ -111,12 +111,25 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
projectId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
chooseStageId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
isRefEdit: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
inputV1: "",
|
||||
inputV2: "",
|
||||
textV1: "",
|
||||
title: props.isRefEdit == 2 ? "编辑" : "添加",
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
console.log(props, 1111);
|
||||
@@ -129,6 +142,8 @@ export default {
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
};
|
||||
//编辑外链
|
||||
//创建外链
|
||||
const createExternalChain = () => {
|
||||
if (!state.inputV1) return message.warning("请输入外链名称");
|
||||
if (!state.inputV2) return message.warning("请输入链接");
|
||||
@@ -150,7 +165,7 @@ export default {
|
||||
console.log(res.data.data);
|
||||
message.success("提交成功");
|
||||
closeDrawer();
|
||||
|
||||
//学习路径的创建
|
||||
if (props.isStudy == 1) {
|
||||
let objj = {
|
||||
chapterId: 36,
|
||||
@@ -170,15 +185,16 @@ export default {
|
||||
console.log(err, 1111);
|
||||
});
|
||||
} else {
|
||||
//项目的创建
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: obj.linkName,
|
||||
projectId: 28,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: 0,
|
||||
stageId: 3,
|
||||
stageId: props.chooseStageId,
|
||||
type: 7,
|
||||
})
|
||||
.then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user