mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
feat:完成学习路径直播 外链添加
This commit is contained in:
@@ -81,6 +81,7 @@ import { reactive, toRefs, ref } from "vue";
|
||||
import * as api from "../../api/indexExternalChain";
|
||||
import * as apiTask from "../../api/indexTaskadd";
|
||||
import { message } from "ant-design-vue";
|
||||
import { RouterEditTask } from "@/api/indexTask";
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
@@ -106,6 +107,10 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isStudy: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
@@ -114,6 +119,7 @@ export default {
|
||||
textV1: "",
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
console.log(props, 1111);
|
||||
ctx.emit("update:addrefVisible", false);
|
||||
state.inputV2 = "";
|
||||
state.inputV1 = "";
|
||||
@@ -144,27 +150,47 @@ export default {
|
||||
message.success("提交成功");
|
||||
closeDrawer();
|
||||
|
||||
apiTask
|
||||
.addTask({
|
||||
if (props.isStudy == 1) {
|
||||
let objj = {
|
||||
chapterId: 36,
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: obj.linkName,
|
||||
projectId: 28,
|
||||
projectTaskId: 0,
|
||||
stageId: 3,
|
||||
routerId: 92,
|
||||
routerTaskId: 0,
|
||||
type: 7,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后111", res.data);
|
||||
ctx.emit("changeData", false);
|
||||
//重新获取任务列表
|
||||
// apiTask.getTask({ projectId: 28 });
|
||||
// router.push("/taskadd");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
};
|
||||
RouterEditTask(objj)
|
||||
.then((res) => {
|
||||
console.log(res, 11111);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, 1111);
|
||||
});
|
||||
} else {
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: obj.linkName,
|
||||
projectId: 28,
|
||||
projectTaskId: 0,
|
||||
stageId: 3,
|
||||
type: 7,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后111", res.data, 11111);
|
||||
ctx.emit("changeData", false);
|
||||
//重新获取任务列表
|
||||
// apiTask.getTask({ projectId: 28 });
|
||||
// router.push("/taskadd");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, 111111);
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
|
||||
Reference in New Issue
Block a user