mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16: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" >添加活动</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@@ -225,6 +225,7 @@
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import * as api from "../../api/indexActivity";
|
||||
import * as apiTask from "../../api/indexTaskadd";
|
||||
import { RouterEditTask } from "@/api/indexTask"
|
||||
import { message } from "ant-design-vue";
|
||||
import { toDate } from "../../api/method.js";
|
||||
const rowSelection = ref({
|
||||
@@ -252,8 +253,13 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isStudiscuss: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
//console.log("学习路径",props.isStudiscuss);
|
||||
const state = reactive({
|
||||
inputV1: "",
|
||||
inputV2: "",
|
||||
@@ -347,27 +353,48 @@ export default {
|
||||
state.textV2 = "";
|
||||
state.time = "";
|
||||
ctx.emit("update:addactiveVisible", false);
|
||||
apiTask
|
||||
.addTask({
|
||||
console.log("学习路径",props.isStudiscuss);
|
||||
if(props.isStudiscuss){
|
||||
let editObj1 = {
|
||||
chapterId:36,
|
||||
courseId: 0,
|
||||
duration: obj.activityDuration,
|
||||
flag: true,
|
||||
name: obj.activityName,
|
||||
projectId: 28,
|
||||
projectTaskId: 0,
|
||||
stageId: 3,
|
||||
routerId: 92,
|
||||
routerTaskId: 0,
|
||||
type: 9,
|
||||
}
|
||||
RouterEditTask(editObj1).then(res => {
|
||||
console.log("新增关卡任务成功",res);
|
||||
closeDrawer();
|
||||
}).catch(err => {
|
||||
console.log("新增关卡任务失败",err);
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后", res.data);
|
||||
ctx.emit("changeData", false);
|
||||
//重新获取任务列表
|
||||
// apiTask.getTask({ projectId: 28 });
|
||||
// router.push("/taskadd");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}else{
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId: 0,
|
||||
duration: obj.activityDuration,
|
||||
flag: true,
|
||||
name: obj.activityName,
|
||||
projectId: 28,
|
||||
projectTaskId: 0,
|
||||
stageId: 3,
|
||||
type: 9,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后", res.data);
|
||||
ctx.emit("changeData", false);
|
||||
//重新获取任务列表
|
||||
// apiTask.getTask({ projectId: 28 });
|
||||
// router.push("/taskadd");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败",err);
|
||||
|
||||
Reference in New Issue
Block a user