feat:测试评估投票 创建完信息添加到学习路径完善

This commit is contained in:
dongwug
2022-11-04 16:23:46 +08:00
parent bbd64a50f2
commit 09d6a19ac4
4 changed files with 104 additions and 47 deletions

View File

@@ -74,6 +74,7 @@ import { reactive, toRefs } from "vue";
import * as api from "../../api/indexInvist";
import * as apitaskadd from "../../api/indexTaskadd";
import { message } from "ant-design-vue";
import { RouterEditTask } from "@/api/indexTask";
export default {
name: "AddInvist",
// components: {
@@ -83,6 +84,14 @@ export default {
type: Boolean,
default: false,
},
edit: {
type: Boolean,
default: false,
},
learn: {
type: Number,
default: 0,
},
},
setup(props, ctx) {
const state = reactive({
@@ -198,6 +207,7 @@ export default {
message.success("创建成功");
closeDrawer();
getAllInvistText();
if (props.learn == 0)
apitaskadd
.addTask({
courseId: 0,
@@ -210,12 +220,29 @@ export default {
type: 11,
})
.then((res) => {
console.log("调用项目添加接口后", res.data);
ctx.emit("changeData", false);
})
.catch((err) => {
console.log(err);
});
console.log("调用项目添加接口后", res.data);
//自定义事件给父组件传值
ctx.emit("changeData", false);
//重新获取任务列表
// apiTask.getTask({ projectId: 28 });
// router.push("/taskadd");
})
.catch((err) => {
console.log(err);
});
else {
let editObj1 = {
chapterId: 36,
courseId: 0,
duration: 0,
flag: true,
name: obj.appraiseName,
routerId: 92,
routerTaskId: 0,
type: 11,
};
RouterEditTask(editObj1)
}
})
.catch((err) => {
console.log("创建失败", err);