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:
@@ -291,6 +291,7 @@ import { message } from "ant-design-vue";
|
||||
import * as api from "../../api/indexLiveBroadcast";
|
||||
import * as apiTask from "../../api/indexTaskadd";
|
||||
import { toDate } from "@/api/method";
|
||||
import { RouterEditTask } from "@/api/indexTask";
|
||||
// import { useRouter } from "vue-router";
|
||||
function getBase64(img, callback) {
|
||||
const reader = new FileReader();
|
||||
@@ -329,6 +330,10 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isStudy: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
// const router = useRouter();
|
||||
@@ -441,6 +446,7 @@ export default {
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:addliveVisible", false);
|
||||
console.log(props, "props");
|
||||
state.radioV1 = "";
|
||||
state.playback = false;
|
||||
state.inputV6 = "";
|
||||
@@ -565,7 +571,7 @@ export default {
|
||||
updateTime: "",
|
||||
updateUser: 0,
|
||||
};
|
||||
|
||||
let name = state.inputV1;
|
||||
api
|
||||
.createLiveBroadcast(state.obj)
|
||||
.then((res) => {
|
||||
@@ -573,6 +579,27 @@ export default {
|
||||
// console.log(state, 2222);
|
||||
message.success("提交成功");
|
||||
closeDrawer();
|
||||
|
||||
if (props.isStudy == 1) {
|
||||
console.log("hhhhh", name);
|
||||
let objj = {
|
||||
chapterId: 36,
|
||||
courseId: 0,
|
||||
duration: state.obj.liveDuration,
|
||||
flag: true,
|
||||
name: name,
|
||||
routerId: 92,
|
||||
routerTaskId: 0,
|
||||
type: 6,
|
||||
};
|
||||
RouterEditTask(objj)
|
||||
.then((res) => {
|
||||
console.log(res, 11111);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, 1111);
|
||||
});
|
||||
} else {
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId: 0,
|
||||
@@ -595,6 +622,7 @@ export default {
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, 2222);
|
||||
|
||||
@@ -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,6 +150,25 @@ export default {
|
||||
message.success("提交成功");
|
||||
closeDrawer();
|
||||
|
||||
if (props.isStudy == 1) {
|
||||
let objj = {
|
||||
chapterId: 36,
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: obj.linkName,
|
||||
routerId: 92,
|
||||
routerTaskId: 0,
|
||||
type: 7,
|
||||
};
|
||||
RouterEditTask(objj)
|
||||
.then((res) => {
|
||||
console.log(res, 11111);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err, 1111);
|
||||
});
|
||||
} else {
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId: 0,
|
||||
@@ -156,15 +181,16 @@ export default {
|
||||
type: 7,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后111", res.data);
|
||||
console.log("调用项目添加接口后111", res.data, 11111);
|
||||
ctx.emit("changeData", false);
|
||||
//重新获取任务列表
|
||||
// apiTask.getTask({ projectId: 28 });
|
||||
// router.push("/taskadd");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
console.log(err, 111111);
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
|
||||
@@ -539,8 +539,12 @@
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 添加直播抽屉 -->
|
||||
<add-live v-model:addliveVisible="addlivevisible" />
|
||||
<add-ref v-model:addrefVisible="addrefvisible" />
|
||||
<add-live
|
||||
v-model:addliveVisible="addlivevisible"
|
||||
v-model:isStudy="isStudy"
|
||||
/>
|
||||
<!-- 添加外链抽屉 -->
|
||||
<add-ref v-model:addrefVisible="addrefvisible" v-model:isStudy="isStudy" />
|
||||
<!-- 是否确认删除任务弹窗 -->
|
||||
<!-- 确认删除阶段弹窗 -->
|
||||
<a-modal
|
||||
@@ -808,6 +812,7 @@ export default {
|
||||
deleteModal: false, // 删除弹窗
|
||||
deleteID: "", // 要删除的任务的id
|
||||
editID: "", // 要编辑的任务id
|
||||
isStudy: 1,
|
||||
cC: false,
|
||||
value1: "",
|
||||
value2: "",
|
||||
|
||||
Reference in New Issue
Block a user