mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 20:06:47 +08:00
feat:学习路径删除 增加任务到列表
This commit is contained in:
@@ -15,7 +15,11 @@ export const deleteLink = (obj) => http.post('/link/deleteLink', { params: obj }
|
|||||||
})
|
})
|
||||||
|
|
||||||
//获取外链详细信息接口
|
//获取外链详细信息接口
|
||||||
export const getLink = (obj) => http.post('/link/getOne', { params: obj })
|
export const getLink = (obj) => http.post('/link/getOne', obj, {
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// 更新外链数据
|
// 更新外链数据
|
||||||
export const updateLinks = (obj) => http.post('/link/updateLinks', obj, {
|
export const updateLinks = (obj) => http.post('/link/updateLinks', obj, {
|
||||||
|
|||||||
3
src/api/indexStudy.js
Normal file
3
src/api/indexStudy.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
import http from "./config";
|
||||||
|
//路径图删除任务
|
||||||
|
export const deleteStudyTask = (obj) => http.delete('/admin/router/deleteTask', { params: obj })
|
||||||
@@ -1,18 +1,14 @@
|
|||||||
import http from "./config";
|
import http from "./config";
|
||||||
// 创建作业信息接口
|
// 创建作业信息接口
|
||||||
export const createWorkTask = (obj) => http.post('/work/createWorkTask',obj,{
|
export const createWorkTask = (obj) => http.post('/work/createWorkTask', obj, {
|
||||||
headers: {
|
headers: {
|
||||||
'token': '123'
|
'token': '123'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 删除作业信息接口
|
// 删除作业信息接口
|
||||||
export const deleteWorkTask = (obj) => http.post('/work/deleteWorkTask',obj);
|
export const deleteWorkTask = (obj) => http.post('/work/deleteWorkTask', obj);
|
||||||
// 根据ID获取作业信息详情
|
// 根据ID获取作业信息详情
|
||||||
export const queryWorkDetailById = (obj) => http.post('/work/queryWorkDetailById',obj,{
|
export const queryWorkDetailById = (obj) => http.post('/work/queryWorkDetailById', { params: obj });
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 修改作业信息接口
|
// 修改作业信息接口
|
||||||
export const updateWorkTaskUsing = (obj) => http.post('/work/updateWorkTask',obj);
|
export const updateWorkTaskUsing = (obj) => http.post('/work/updateWorkTask', obj);
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
>
|
>
|
||||||
<div class="drawerMain">
|
<div class="drawerMain">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="headerTitle">添加直播</div>
|
<div v-if="isLiveEdit == 2" class="headerTitle">编辑直播</div>
|
||||||
|
<div v-else class="headerTitle">添加直播</div>
|
||||||
<img
|
<img
|
||||||
style="width: 29px; height: 29px; cursor: pointer"
|
style="width: 29px; height: 29px; cursor: pointer"
|
||||||
src="../../assets/images/basicinfo/close.png"
|
src="../../assets/images/basicinfo/close.png"
|
||||||
@@ -342,93 +343,26 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
isLiveEdit: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
EditLiveId: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
isactive: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
routerId: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
setup(props, ctx) {
|
setup(props, ctx) {
|
||||||
// const router = useRouter();
|
// const router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
tableData1: [
|
|
||||||
{
|
|
||||||
key: "1",
|
|
||||||
num: "JDF2022071100001",
|
|
||||||
name: "时间管理课程",
|
|
||||||
content: "通用力",
|
|
||||||
teacher: "BOE教师",
|
|
||||||
creator: "管理员",
|
|
||||||
time: "2022-10-31 23:12:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "2",
|
|
||||||
num: "JDF2022071100001",
|
|
||||||
name: "管理能力课程",
|
|
||||||
content: "领导力",
|
|
||||||
teacher: "BOE教师",
|
|
||||||
creator: "管理员",
|
|
||||||
time: "2022-10-31 23:12:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "3",
|
|
||||||
num: "JDF2022071100001",
|
|
||||||
name: "快速换模SMED",
|
|
||||||
content: "通用力",
|
|
||||||
teacher: "BOE教师",
|
|
||||||
creator: "管理员",
|
|
||||||
time: "2022-10-31 23:12:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "4",
|
|
||||||
num: "JDF2022071100001",
|
|
||||||
name: "巧妙对话人见人夸",
|
|
||||||
content: "领导力",
|
|
||||||
teacher: "BOE教师",
|
|
||||||
creator: "管理员",
|
|
||||||
time: "2022-10-31 23:12:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "5",
|
|
||||||
num: "JDF2022071100001",
|
|
||||||
name: "管理能力课程",
|
|
||||||
content: "领导力",
|
|
||||||
teacher: "BOE教师",
|
|
||||||
creator: "管理员",
|
|
||||||
time: "2022-10-31 23:12:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "6",
|
|
||||||
num: "JDF2022071100001",
|
|
||||||
name: "时间管理课程",
|
|
||||||
content: "领导力",
|
|
||||||
teacher: "BOE教师",
|
|
||||||
creator: "管理员",
|
|
||||||
time: "2022-10-31 23:12:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "7",
|
|
||||||
num: "JDF2022071100001",
|
|
||||||
name: "时间管理课程",
|
|
||||||
content: "领导力",
|
|
||||||
teacher: "BOE教师",
|
|
||||||
creator: "管理员",
|
|
||||||
time: "2022-10-31 23:12:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "8",
|
|
||||||
num: "JDF2022071100001",
|
|
||||||
name: "时间管理课程",
|
|
||||||
content: "领导力",
|
|
||||||
teacher: "BOE教师",
|
|
||||||
creator: "管理员",
|
|
||||||
time: "2022-10-31 23:12:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "9",
|
|
||||||
num: "JDF2022071100001",
|
|
||||||
name: "时间管理课程",
|
|
||||||
content: "领导力",
|
|
||||||
teacher: "BOE教师",
|
|
||||||
creator: "管理员",
|
|
||||||
time: "2022-10-31 23:12:00",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
tableDataTotal: 100,
|
tableDataTotal: 100,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -454,6 +388,7 @@ export default {
|
|||||||
});
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:addliveVisible", false);
|
ctx.emit("update:addliveVisible", false);
|
||||||
|
ctx.emit("update:isLiveEdit", 1);
|
||||||
console.log(props, "props");
|
console.log(props, "props");
|
||||||
state.radioV1 = "";
|
state.radioV1 = "";
|
||||||
state.playback = false;
|
state.playback = false;
|
||||||
@@ -567,7 +502,7 @@ export default {
|
|||||||
liveStartTime: startTime,
|
liveStartTime: startTime,
|
||||||
liveExplain: state.textV1,
|
liveExplain: state.textV1,
|
||||||
liveFlag: "",
|
liveFlag: "",
|
||||||
liveId: 0,
|
liveId: props.EditLiveId == null ? 0 : props.EditLiveId,
|
||||||
liveLink: state.inputV4,
|
liveLink: state.inputV4,
|
||||||
liveName: state.inputV1,
|
liveName: state.inputV1,
|
||||||
livePlayback: "",
|
livePlayback: "",
|
||||||
@@ -581,61 +516,74 @@ export default {
|
|||||||
updateUser: 0,
|
updateUser: 0,
|
||||||
};
|
};
|
||||||
let name = state.inputV1;
|
let name = state.inputV1;
|
||||||
api
|
if (props.isLiveEdit == 2) {
|
||||||
.createLiveBroadcast(state.obj)
|
api
|
||||||
.then((res) => {
|
.updateLiveBroadcastMessage(state.obj)
|
||||||
console.log("调用添加直播接口后", res.data.data);
|
.then((res) => {
|
||||||
// console.log(state, 2222);
|
console.log("编辑成功", res);
|
||||||
message.success("提交成功");
|
message.success("编辑成功");
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
|
ctx.emit("changeData", false);
|
||||||
if (props.isStudy == 1) {
|
})
|
||||||
console.log("hhhhh", name);
|
.catch((err) => console.log(err));
|
||||||
let objj = {
|
} else {
|
||||||
chapterId: 36,
|
api
|
||||||
courseId: 0,
|
.createLiveBroadcast(state.obj)
|
||||||
duration: state.obj.liveDuration,
|
.then((res) => {
|
||||||
flag: true,
|
console.log("调用添加直播接口后", res.data.data);
|
||||||
name: name,
|
// console.log(state, 2222);
|
||||||
routerId: 92,
|
message.success("提交成功");
|
||||||
routerTaskId: 0,
|
closeDrawer();
|
||||||
type: 6,
|
//学习路径的创建
|
||||||
};
|
if (props.isStudy == 1) {
|
||||||
RouterEditTask(objj)
|
console.log("hhhhh", name);
|
||||||
.then((res) => {
|
let objj = {
|
||||||
console.log(res, 11111);
|
chapterId: props.isactive,
|
||||||
})
|
courseId: res.data.data.liveId,
|
||||||
.catch((err) => {
|
|
||||||
console.log(err, 1111);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
apiTask
|
|
||||||
.addTask({
|
|
||||||
courseId: 0,
|
|
||||||
duration: state.obj.liveDuration,
|
duration: state.obj.liveDuration,
|
||||||
flag: true,
|
flag: true,
|
||||||
name: state.obj.liveName,
|
name: name,
|
||||||
projectId: props.projectId,
|
routerId: props.routerId,
|
||||||
projectTaskId: 0,
|
routerTaskId: 0,
|
||||||
stageId: props.chooseStageId,
|
|
||||||
type: 6,
|
type: 6,
|
||||||
})
|
};
|
||||||
.then((res) => {
|
RouterEditTask(objj)
|
||||||
console.log("调用项目添加接口后", res.data);
|
.then((res) => {
|
||||||
//自定义事件给父组件传值
|
console.log(res, 11111);
|
||||||
ctx.emit("changeData", false);
|
})
|
||||||
//重新获取任务列表
|
.catch((err) => {
|
||||||
// apiTask.getTask({ projectId: 28 });
|
console.log(err, 1111);
|
||||||
// router.push("/taskadd");
|
});
|
||||||
})
|
} else {
|
||||||
.catch((err) => {
|
//项目的创建
|
||||||
console.log(err);
|
apiTask
|
||||||
});
|
.addTask({
|
||||||
}
|
courseId: res.data.data.liveId,
|
||||||
})
|
duration: state.obj.liveDuration,
|
||||||
.catch((err) => {
|
flag: true,
|
||||||
console.log(err, 2222);
|
name: state.obj.liveName,
|
||||||
});
|
projectId: props.projectId,
|
||||||
|
projectTaskId: 0,
|
||||||
|
stageId: props.chooseStageId,
|
||||||
|
type: 6,
|
||||||
|
})
|
||||||
|
.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, 2222);
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
>
|
>
|
||||||
<div class="drawerMain">
|
<div class="drawerMain">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="headerTitle">{{ title }}外链</div>
|
<div v-if="isRefEdit == 2" class="headerTitle">编辑外链</div>
|
||||||
|
<div v-else class="headerTitle">添加外链</div>
|
||||||
<img
|
<img
|
||||||
style="width: 29px; height: 29px; cursor: pointer"
|
style="width: 29px; height: 29px; cursor: pointer"
|
||||||
src="../../assets/images/basicinfo/close.png"
|
src="../../assets/images/basicinfo/close.png"
|
||||||
@@ -126,13 +127,20 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
isactive: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
routerId: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
setup(props, ctx) {
|
setup(props, ctx) {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
inputV1: "",
|
inputV1: "",
|
||||||
inputV2: "",
|
inputV2: "",
|
||||||
textV1: "",
|
textV1: "",
|
||||||
title: null,
|
|
||||||
});
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
console.log(props, 1111);
|
console.log(props, 1111);
|
||||||
@@ -156,10 +164,10 @@ export default {
|
|||||||
createTime: "",
|
createTime: "",
|
||||||
linkAddress: state.inputV2,
|
linkAddress: state.inputV2,
|
||||||
linkDescription: state.textV1,
|
linkDescription: state.textV1,
|
||||||
linkFlag: "",
|
linkFlag: "0",
|
||||||
linkId: props.EditRefId == null ? 0 : props.EditRefId,
|
linkId: props.EditRefId == null ? 0 : props.EditRefId,
|
||||||
linkName: state.inputV1,
|
linkName: state.inputV1,
|
||||||
linkTag: "",
|
linkTag: "0",
|
||||||
updateTime: "",
|
updateTime: "",
|
||||||
updateUser: 0,
|
updateUser: 0,
|
||||||
};
|
};
|
||||||
@@ -171,9 +179,11 @@ export default {
|
|||||||
console.log("编辑成功", res);
|
console.log("编辑成功", res);
|
||||||
message.success("编辑成功");
|
message.success("编辑成功");
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
|
ctx.emit("changeData", false);
|
||||||
})
|
})
|
||||||
.catch((err) => console.log(err));
|
.catch((err) => console.log(err));
|
||||||
} else {
|
} else {
|
||||||
|
//创建外链
|
||||||
api
|
api
|
||||||
.createExternalChain(obj)
|
.createExternalChain(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@@ -183,12 +193,12 @@ export default {
|
|||||||
//学习路径的创建
|
//学习路径的创建
|
||||||
if (props.isStudy == 1) {
|
if (props.isStudy == 1) {
|
||||||
let objj = {
|
let objj = {
|
||||||
chapterId: 36,
|
chapterId: props.isactive,
|
||||||
courseId: 0,
|
courseId: res.data.data.linkId,
|
||||||
duration: 0,
|
duration: 0,
|
||||||
flag: true,
|
flag: true,
|
||||||
name: obj.linkName,
|
name: obj.linkName,
|
||||||
routerId: 92,
|
routerId: props.routerId,
|
||||||
routerTaskId: 0,
|
routerTaskId: 0,
|
||||||
type: 7,
|
type: 7,
|
||||||
};
|
};
|
||||||
@@ -229,10 +239,13 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//不生效
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
state.title = props.isRefEdit == 2 ? "编辑" : "添加";
|
console.log("few");
|
||||||
|
// api.getLink({ linkId: props.EditRefId }).then((res) => {
|
||||||
|
// console.log(res), "获取成功";
|
||||||
|
// });
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
afterVisibleChange,
|
afterVisibleChange,
|
||||||
|
|||||||
@@ -504,7 +504,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
style="color: #4ea6ff; cursor: pointer"
|
style="color: #4ea6ff; cursor: pointer"
|
||||||
@click="showDelete(element.id)"
|
@click="showDeleteModal(element.id)"
|
||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</span>
|
</span>
|
||||||
@@ -778,9 +778,16 @@
|
|||||||
<add-live
|
<add-live
|
||||||
v-model:addliveVisible="addlivevisible"
|
v-model:addliveVisible="addlivevisible"
|
||||||
v-model:isStudy="isStudy"
|
v-model:isStudy="isStudy"
|
||||||
|
v-model:isactive="isactive"
|
||||||
|
v-model:routerId="routerId"
|
||||||
/>
|
/>
|
||||||
<!-- 添加外链抽屉 -->
|
<!-- 添加外链抽屉 -->
|
||||||
<add-ref v-model:addrefVisible="addrefvisible" v-model:isStudy="isStudy" />
|
<add-ref
|
||||||
|
v-model:addrefVisible="addrefvisible"
|
||||||
|
v-model:isStudy="isStudy"
|
||||||
|
v-model:isactive="isactive"
|
||||||
|
v-model:routerId="routerId"
|
||||||
|
/>
|
||||||
<!-- 是否确认删除任务弹窗 -->
|
<!-- 是否确认删除任务弹窗 -->
|
||||||
<!-- 确认删除阶段弹窗 -->
|
<!-- 确认删除阶段弹窗 -->
|
||||||
<a-modal
|
<a-modal
|
||||||
@@ -829,9 +836,10 @@ import AddVote from "../../components/drawers/AddVote.vue";
|
|||||||
import AddLive from "../../components/drawers/AddLive.vue";
|
import AddLive from "../../components/drawers/AddLive.vue";
|
||||||
import AddRef from "../../components/drawers/AddRef.vue";
|
import AddRef from "../../components/drawers/AddRef.vue";
|
||||||
import * as api from "../../api/indexLevel";
|
import * as api from "../../api/indexLevel";
|
||||||
import { GetRouterDetail, RouterDeleteTask } from "../../api/indexTask";
|
import { GetRouterDetail } from "../../api/indexTask";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import { storage } from "../../api/storage";
|
import { storage } from "../../api/storage";
|
||||||
|
import { deleteStudyTask } from "../../api/indexStudy";
|
||||||
import draggable from "vuedraggable";
|
import draggable from "vuedraggable";
|
||||||
export default {
|
export default {
|
||||||
name: "LevelAddDetail",
|
name: "LevelAddDetail",
|
||||||
@@ -1176,6 +1184,7 @@ export default {
|
|||||||
cretime: element.duration,
|
cretime: element.duration,
|
||||||
checked1: element.flag,
|
checked1: element.flag,
|
||||||
routerTaskId: element.routerTaskId,
|
routerTaskId: element.routerTaskId,
|
||||||
|
courseId: element.courseId,
|
||||||
};
|
};
|
||||||
array.push(obj);
|
array.push(obj);
|
||||||
});
|
});
|
||||||
@@ -1218,135 +1227,128 @@ export default {
|
|||||||
const showImpStu = () => {
|
const showImpStu = () => {
|
||||||
state.AddImpStuvisible = true;
|
state.AddImpStuvisible = true;
|
||||||
};
|
};
|
||||||
const tableDataFunc = () => {
|
// const tableDataFunc = () => {
|
||||||
const columns = [
|
// const columns = [
|
||||||
{
|
// {
|
||||||
title: "类型",
|
// title: "类型",
|
||||||
dataIndex: "state",
|
// dataIndex: "state",
|
||||||
// width: "30%",
|
// // width: "30%",
|
||||||
key: "state",
|
// key: "state",
|
||||||
width: 60,
|
// width: 60,
|
||||||
align: "left",
|
// align: "left",
|
||||||
className: "classify",
|
// className: "classify",
|
||||||
scopedSlots: { customRender: "action" }, //引入的插槽
|
// scopedSlots: { customRender: "action" }, //引入的插槽
|
||||||
customRender: (text) => {
|
// customRender: (text) => {
|
||||||
// console.log(text.record.checked1);
|
// // console.log(text.record.checked1);
|
||||||
return (
|
// return (
|
||||||
<div class="racona">
|
// <div class="racona">
|
||||||
<div
|
// <div
|
||||||
class="img"
|
// class="img"
|
||||||
style={{ cursor: "pointer" }}
|
// style={{ cursor: "pointer" }}
|
||||||
onClick={() => {
|
// onClick={() => {
|
||||||
console.log("点击了");
|
// console.log("点击了");
|
||||||
}}
|
// }}
|
||||||
></div>
|
// ></div>
|
||||||
<span> {text.record.lei}</span>
|
// <span> {text.record.lei}</span>
|
||||||
|
// </div>
|
||||||
{/**
|
// );
|
||||||
<div class="img"></div>
|
// },
|
||||||
<a-checkbox class="ch" checked={text.record.checkedd}>
|
// },
|
||||||
{text.record.lei}
|
// {
|
||||||
</a-checkbox>
|
// title: "任务名称",
|
||||||
*/}
|
// dataIndex: "creater",
|
||||||
</div>
|
// // width: "30%",
|
||||||
);
|
// key: "creater",
|
||||||
},
|
// width: 200,
|
||||||
},
|
// align: "center",
|
||||||
{
|
// className: "h",
|
||||||
title: "任务名称",
|
// },
|
||||||
dataIndex: "creater",
|
// {
|
||||||
// width: "30%",
|
// title: "必修/选修",
|
||||||
key: "creater",
|
// dataIndex: "pubtime",
|
||||||
width: 200,
|
// key: "pubtime",
|
||||||
align: "center",
|
// // width: 100,
|
||||||
className: "h",
|
// align: "center",
|
||||||
},
|
// className: "h",
|
||||||
{
|
// scopedSlots: { customRender: "action" }, //引入的插槽
|
||||||
title: "必修/选修",
|
// customRender: (text) => {
|
||||||
dataIndex: "pubtime",
|
// // console.log(text.record.checked1);
|
||||||
key: "pubtime",
|
// return (
|
||||||
// width: 100,
|
// <div class="opat">
|
||||||
align: "center",
|
// <div class="opacationt clearfix">
|
||||||
className: "h",
|
// <a-switch
|
||||||
scopedSlots: { customRender: "action" }, //引入的插槽
|
// style="margin-left:-50px;margin-top:3px"
|
||||||
customRender: (text) => {
|
// checked={text.record.checked1}
|
||||||
// console.log(text.record.checked1);
|
// size="small"
|
||||||
return (
|
// active-color="red"
|
||||||
<div class="opat">
|
// onClick={() => {
|
||||||
<div class="opacationt clearfix">
|
// console.log("点击了");
|
||||||
<a-switch
|
// text.record.checked1 = !text.record.checked1;
|
||||||
style="margin-left:-50px;margin-top:3px"
|
// }}
|
||||||
checked={text.record.checked1}
|
// />
|
||||||
size="small"
|
// <div class="showt clearfix">
|
||||||
active-color="red"
|
// <div
|
||||||
onClick={() => {
|
// class="bi"
|
||||||
console.log("点击了");
|
// style={
|
||||||
text.record.checked1 = !text.record.checked1;
|
// text.record.checked1 ? "z-index:999" : "z-index:998"
|
||||||
}}
|
// }
|
||||||
/>
|
// >
|
||||||
<div class="showt clearfix">
|
// 必修
|
||||||
<div
|
// </div>
|
||||||
class="bi"
|
// <div class="xuan">选修</div>
|
||||||
style={
|
// </div>
|
||||||
text.record.checked1 ? "z-index:999" : "z-index:998"
|
// </div>
|
||||||
}
|
// </div>
|
||||||
>
|
// );
|
||||||
必修
|
// },
|
||||||
</div>
|
// },
|
||||||
<div class="xuan">选修</div>
|
// {
|
||||||
</div>
|
// title: "时长",
|
||||||
</div>
|
// dataIndex: "cretime",
|
||||||
</div>
|
// key: "cretime",
|
||||||
);
|
// // width: 100,
|
||||||
},
|
// align: "center",
|
||||||
},
|
// className: "h",
|
||||||
{
|
// },
|
||||||
title: "时长",
|
// {
|
||||||
dataIndex: "cretime",
|
// title: "操作",
|
||||||
key: "cretime",
|
// className: "h",
|
||||||
// width: 100,
|
// dataIndex: "opacation",
|
||||||
align: "center",
|
// key: "opacation",
|
||||||
className: "h",
|
// // width: 100,
|
||||||
},
|
// align: "center",
|
||||||
{
|
// scopedSlots: { customRender: "action" }, //引入的插槽
|
||||||
title: "操作",
|
// customRender: (e) => {
|
||||||
className: "h",
|
// return (
|
||||||
dataIndex: "opacation",
|
// <div class="opa">
|
||||||
key: "opacation",
|
// <div class="opacation">
|
||||||
// width: 100,
|
// <span
|
||||||
align: "center",
|
// style="color:#4EA6FF;margin-right:25px;cursor:pointer"
|
||||||
scopedSlots: { customRender: "action" }, //引入的插槽
|
// onClick={() => {
|
||||||
customRender: (e) => {
|
// console.log("编辑id", e.record.routerTaskId);
|
||||||
return (
|
// console.log("编辑类型", e.record.lei);
|
||||||
<div class="opa">
|
// state.editID = e.record.routerTaskId;
|
||||||
<div class="opacation">
|
// //state.addhomeworkvisible = true;
|
||||||
<span
|
// }}
|
||||||
style="color:#4EA6FF;margin-right:25px;cursor:pointer"
|
// >
|
||||||
onClick={() => {
|
// 编辑
|
||||||
console.log("编辑id", e.record.routerTaskId);
|
// </span>
|
||||||
console.log("编辑类型", e.record.lei);
|
// <span
|
||||||
state.editID = e.record.routerTaskId;
|
// style="color:#4EA6FF;cursor:pointer"
|
||||||
//state.addhomeworkvisible = true;
|
// onClick={() => {
|
||||||
}}
|
// showDeleteModal(e.record.routerTaskId);
|
||||||
>
|
// }}
|
||||||
编辑
|
// >
|
||||||
</span>
|
// 删除
|
||||||
<span
|
// </span>
|
||||||
style="color:#4EA6FF;cursor:pointer"
|
// </div>
|
||||||
onClick={() => {
|
// </div>
|
||||||
showDeleteModal(e.record.routerTaskId);
|
// );
|
||||||
}}
|
// },
|
||||||
>
|
// },
|
||||||
删除
|
// ];
|
||||||
</span>
|
// return columns;
|
||||||
</div>
|
// };
|
||||||
</div>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
return columns;
|
|
||||||
};
|
|
||||||
const checkType = (index) => {
|
const checkType = (index) => {
|
||||||
let typeRules = [
|
let typeRules = [
|
||||||
"",
|
"",
|
||||||
@@ -1381,13 +1383,6 @@ export default {
|
|||||||
return (
|
return (
|
||||||
<div class="racona">
|
<div class="racona">
|
||||||
<span> {text.record.name}</span>
|
<span> {text.record.name}</span>
|
||||||
|
|
||||||
{/**
|
|
||||||
<div class="img"></div>
|
|
||||||
<a-checkbox class="ch" checked={text.record.checkedd}>
|
|
||||||
{text.record.lei}
|
|
||||||
</a-checkbox>
|
|
||||||
*/}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -1558,9 +1553,9 @@ export default {
|
|||||||
});
|
});
|
||||||
const changebgc = (chapterId) => {
|
const changebgc = (chapterId) => {
|
||||||
state.isactive = chapterId;
|
state.isactive = chapterId;
|
||||||
state.selectRow = [] //选择行
|
state.selectRow = []; //选择行
|
||||||
state.selectAll = 0 //0:未选择,1:全选,2:部分选择
|
state.selectAll = 0; //0:未选择,1:全选,2:部分选择
|
||||||
dataAssignment(chapterId);
|
dataAssignment(chapterId);
|
||||||
};
|
};
|
||||||
const gqxy_hShow = () => {
|
const gqxy_hShow = () => {
|
||||||
state.gqxy_hs = !state.gqxy_hs;
|
state.gqxy_hs = !state.gqxy_hs;
|
||||||
@@ -1574,6 +1569,7 @@ export default {
|
|||||||
};
|
};
|
||||||
const showDeleteModal = (id) => {
|
const showDeleteModal = (id) => {
|
||||||
state.deleteID = id;
|
state.deleteID = id;
|
||||||
|
console.log(id);
|
||||||
state.deleteModal = true;
|
state.deleteModal = true;
|
||||||
};
|
};
|
||||||
const closeConfirm = () => {
|
const closeConfirm = () => {
|
||||||
@@ -1582,14 +1578,17 @@ export default {
|
|||||||
state.editID = "";
|
state.editID = "";
|
||||||
};
|
};
|
||||||
const deleteLevelTask = () => {
|
const deleteLevelTask = () => {
|
||||||
RouterDeleteTask(state.listChoosedId)
|
deleteStudyTask({ routerTaskIds: state.deleteID }).then((res) =>
|
||||||
.then((res) => {
|
console.log("删除成功", res)
|
||||||
console.log(`删除成功${res}`);
|
);
|
||||||
message.success("删除成功");
|
// RouterDeleteTask(state.listChoosedId)
|
||||||
})
|
// .then((res) => {
|
||||||
.catch((err) => {
|
// console.log(`删除成功${res}`);
|
||||||
console.log(`删除失败${err}`);
|
// message.success("删除成功");
|
||||||
});
|
// })
|
||||||
|
// .catch((err) => {
|
||||||
|
// console.log(`删除失败${err}`);
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
const showDrawerAddLive = () => {
|
const showDrawerAddLive = () => {
|
||||||
@@ -1663,50 +1662,50 @@ export default {
|
|||||||
//批量删除任务
|
//批量删除任务
|
||||||
const deletecTaskAll = () => {
|
const deletecTaskAll = () => {
|
||||||
let arr = state.selectRow;
|
let arr = state.selectRow;
|
||||||
console.log("选择的行信息",arr);
|
console.log("选择的行信息", arr);
|
||||||
arr.map( value => {
|
arr.map((value) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
routerTaskIds: value,
|
routerTaskIds: value,
|
||||||
}
|
};
|
||||||
console.log("value",value);
|
console.log("value", value);
|
||||||
api
|
api
|
||||||
.deleteTask(obj)
|
.deleteTask(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("批量删除成功");
|
message.success("批量删除成功");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
//移动任务到关卡
|
//移动任务到关卡
|
||||||
const moveTask = () => {
|
const moveTask = () => {
|
||||||
let arr = state.selectRow;
|
let arr = state.selectRow;
|
||||||
console.log("选择的行信息",arr);
|
console.log("选择的行信息", arr);
|
||||||
console.log("选择的关卡id",state.isactive);
|
console.log("选择的关卡id", state.isactive);
|
||||||
arr.map( value => {
|
arr.map((value) => {
|
||||||
console.log("value:",value);
|
console.log("value:", value);
|
||||||
let obj = {
|
let obj = {
|
||||||
chapterId: state.isactive,
|
chapterId: state.isactive,
|
||||||
routerTaskIdList: value,
|
routerTaskIdList: value,
|
||||||
}
|
};
|
||||||
api
|
api
|
||||||
.moveTask(obj)
|
.moveTask(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("移动成功",res);
|
console.log("移动成功", res);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("移动成功");
|
message.success("移动成功");
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log("移动失败",err);
|
console.log("移动失败", err);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
tableDataFunc,
|
// tableDataFunc,
|
||||||
tableDataFunc2,
|
tableDataFunc2,
|
||||||
showDrawer,
|
showDrawer,
|
||||||
closeDrawer,
|
closeDrawer,
|
||||||
@@ -1741,6 +1740,7 @@ export default {
|
|||||||
changeRow,
|
changeRow,
|
||||||
deletecTaskAll,
|
deletecTaskAll,
|
||||||
moveTask,
|
moveTask,
|
||||||
|
showDeleteModal,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -172,6 +172,8 @@
|
|||||||
@changeData="updateTableData"
|
@changeData="updateTableData"
|
||||||
v-model:projectId="projectId"
|
v-model:projectId="projectId"
|
||||||
v-model:chooseStageId="chooseStageId"
|
v-model:chooseStageId="chooseStageId"
|
||||||
|
v-model:isLiveEdit="isLiveEdit"
|
||||||
|
v-model:EditLiveId="EditLiveId"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 添加直播侧弹窗 -->
|
<!-- 添加直播侧弹窗 -->
|
||||||
@@ -285,8 +287,8 @@
|
|||||||
<add-vote
|
<add-vote
|
||||||
v-model:addvoteVisible="addvotevisible"
|
v-model:addvoteVisible="addvotevisible"
|
||||||
@changeData="updateTableData"
|
@changeData="updateTableData"
|
||||||
v-model:projectId="projectId"
|
v-model:projectId="projectId"
|
||||||
v-model:chooseStageId="chooseStageId"
|
v-model:chooseStageId="chooseStageId"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 添加投票侧弹窗 -->
|
<!-- 添加投票侧弹窗 -->
|
||||||
@@ -839,7 +841,9 @@ export default {
|
|||||||
: null,
|
: null,
|
||||||
chooseStageId: null,
|
chooseStageId: null,
|
||||||
isRefEdit: 1, //外链编辑
|
isRefEdit: 1, //外链编辑
|
||||||
|
isLiveEdit: 1, //直播编辑
|
||||||
EditRefId: null, //要编辑的外链的id
|
EditRefId: null, //要编辑的外链的id
|
||||||
|
EditLiveId: null, //要编辑的直播的id
|
||||||
projectNameList: [
|
projectNameList: [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
@@ -1019,9 +1023,9 @@ export default {
|
|||||||
.editStage(obj)
|
.editStage(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("添加阶段成功", res);
|
console.log("添加阶段成功", res);
|
||||||
state.valuesname = "",
|
(state.valuesname = ""),
|
||||||
state.valuesnotice = "",
|
(state.valuesnotice = ""),
|
||||||
state.stage = false;
|
(state.stage = false);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("添加阶段成功");
|
message.success("添加阶段成功");
|
||||||
})
|
})
|
||||||
@@ -1534,69 +1538,6 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//编辑直播信息
|
|
||||||
const editLiveBroadcast = () => {
|
|
||||||
let obj = {
|
|
||||||
afterSignIn: "",
|
|
||||||
beforeSignIn: "",
|
|
||||||
createTime: "",
|
|
||||||
createUser: 0,
|
|
||||||
liveCover: "",
|
|
||||||
liveDuration: 0,
|
|
||||||
liveEndTime: "",
|
|
||||||
liveExplain: "",
|
|
||||||
liveFlag: "",
|
|
||||||
liveId: 0,
|
|
||||||
liveLink: "",
|
|
||||||
liveName: "",
|
|
||||||
livePlayback: "",
|
|
||||||
livePlaybackLink: "",
|
|
||||||
liveStartTime: "",
|
|
||||||
liveTag: "",
|
|
||||||
liveTeacherId: 0,
|
|
||||||
otherSettings: "",
|
|
||||||
signOutTime: "",
|
|
||||||
standardSettings: "",
|
|
||||||
updateTime: "",
|
|
||||||
updateUser: 0,
|
|
||||||
};
|
|
||||||
apilive
|
|
||||||
.updateLiveBroadcastMessage(obj)
|
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
message.success("修改成功");
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
message.warn("修改失败");
|
|
||||||
});
|
|
||||||
};
|
|
||||||
//编辑外链信息
|
|
||||||
const editExternal = () => {
|
|
||||||
let obj = {
|
|
||||||
createTime: "",
|
|
||||||
createUser: 0,
|
|
||||||
linkAddress: "",
|
|
||||||
linkDescription: "",
|
|
||||||
linkFlag: "",
|
|
||||||
linkId: 0,
|
|
||||||
linkName: "",
|
|
||||||
linkTag: "",
|
|
||||||
updateTime: "",
|
|
||||||
updateUser: 0,
|
|
||||||
};
|
|
||||||
apiExternal
|
|
||||||
.updateLinks(obj)
|
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
message.success("修改成功");
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
message.warn("修改失败");
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
//删除评估测试
|
//删除评估测试
|
||||||
const deleteInvistText = () => {
|
const deleteInvistText = () => {
|
||||||
let obj = {
|
let obj = {
|
||||||
@@ -1722,11 +1663,11 @@ export default {
|
|||||||
let obj = {
|
let obj = {
|
||||||
chapterId: state.chooseStageId,
|
chapterId: state.chooseStageId,
|
||||||
routerTaskIdList: value,
|
routerTaskIdList: value,
|
||||||
}
|
};
|
||||||
apimove
|
apimove
|
||||||
.moveTask(obj)
|
.moveTask(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("移动成功",res);
|
console.log("移动成功", res);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("移动成功");
|
message.success("移动成功");
|
||||||
})
|
})
|
||||||
@@ -1744,18 +1685,18 @@ export default {
|
|||||||
projectTaskIds: value,
|
projectTaskIds: value,
|
||||||
};
|
};
|
||||||
api
|
api
|
||||||
.deleteTask(obj)
|
.deleteTask(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("批量删除成功");
|
message.success("批量删除成功");
|
||||||
getTask();
|
getTask();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
const onSelectChange = (selectedRowKeys) => {
|
const onSelectChange = (selectedRowKeys) => {
|
||||||
console.log("selectedRowKeys changed: ", selectedRowKeys);
|
console.log("selectedRowKeys changed: ", selectedRowKeys);
|
||||||
state.selectedRowKeys = selectedRowKeys;
|
state.selectedRowKeys = selectedRowKeys;
|
||||||
@@ -1927,11 +1868,19 @@ export default {
|
|||||||
state.isRefEdit = 2;
|
state.isRefEdit = 2;
|
||||||
state.EditRefId = id;
|
state.EditRefId = id;
|
||||||
};
|
};
|
||||||
|
//打开编辑直播的弹窗
|
||||||
|
const showEditLiveDrawer = (id) => {
|
||||||
|
state.addlivevisible = true;
|
||||||
|
state.isLiveEdit = 2;
|
||||||
|
state.EditLiveId = id;
|
||||||
|
};
|
||||||
//编辑的按钮
|
//编辑的按钮
|
||||||
const decideType = (type, id) => {
|
const decideType = (type, id) => {
|
||||||
console.log(type, id);
|
console.log(type, id);
|
||||||
if (type == "外链") {
|
if (type == "外链") {
|
||||||
showEditRefDrawer(id);
|
showEditRefDrawer(id);
|
||||||
|
} else if (type == "直播") {
|
||||||
|
showEditLiveDrawer(id);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
@@ -1976,8 +1925,6 @@ export default {
|
|||||||
editActivity,
|
editActivity,
|
||||||
editEvalPath,
|
editEvalPath,
|
||||||
deleteInvistText,
|
deleteInvistText,
|
||||||
editLiveBroadcast,
|
|
||||||
editExternal,
|
|
||||||
editInvistPath,
|
editInvistPath,
|
||||||
editVotePath,
|
editVotePath,
|
||||||
getTableData,
|
getTableData,
|
||||||
@@ -1996,6 +1943,7 @@ export default {
|
|||||||
deleteWork,
|
deleteWork,
|
||||||
decideType,
|
decideType,
|
||||||
showEditRefDrawer,
|
showEditRefDrawer,
|
||||||
|
showEditLiveDrawer,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user