feat:合并

This commit is contained in:
lixg
2022-11-07 18:06:19 +08:00
12 changed files with 282 additions and 336 deletions

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com * @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-04 22:45:31 * @Date: 2022-11-04 22:45:31
* @LastEditors: lixg lixg@dongwu-inc.com * @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-11-07 11:12:01 * @LastEditTime: 2022-11-06 16:48:50
* @FilePath: /fe-manage/src/api/index1.js * @FilePath: /fe-manage/src/api/index1.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
@@ -72,22 +72,12 @@ export const addStudent = (obj) => http.post('/admin/router/addStudent', obj);
//项目基础信息----------------------------------- //项目基础信息-----------------------------------
//学员获取
export const getProjectStudent=(obj)=>http.post('/admin/project/studentList',obj)
//项目积分榜单 //项目积分榜单
export const scoreRank = (obj) => http.post('/admin/project/scoreRank', obj); export const scoreRank = (obj) => http.post('/admin/project/scoreRank', obj);
//获取规则
export const scoreRule=(projectId)=>http.get('/admin/project/scoreRule',{
params: {
projectId: projectId,
}
})
//排行榜 //排行榜
export const billboard = (obj) => http.post('/admin/project/billboard', obj); export const billboard = (obj) => http.post('/admin/project/billboard', obj);
//项目基础信息----------------------------------- //项目基础信息-----------------------------------
// 测试方法 // 测试方法
// import * as api from '../../api/index' // import * as api from '../../api/index'
// api.getLearnPath({}).then(res => { // api.getLearnPath({}).then(res => {

View File

@@ -15,11 +15,7 @@ export const deleteLink = (obj) => http.post('/link/deleteLink', { params: obj }
}) })
//获取外链详细信息接口 //获取外链详细信息接口
export const getLink = (obj) => http.post('/link/getOne', obj, { export const getLink = (obj) => http.post('/link/getOne', { params: 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, {

View File

@@ -4,16 +4,9 @@ import http from "./config";
export const editChapter = (obj) => http.post('/admin/router/editChapter', obj); export const editChapter = (obj) => http.post('/admin/router/editChapter', obj);
//编辑关卡 //编辑关卡
export const updateChapter = (obj) => http.post('/admin/router/editChapter', obj); export const updateChapter = (obj) => http.post('/admin/router/editChapter', obj);
//删除任务 //删除任务
export const deleteTask = (obj) => http.delete('/admin/router/deleteTask',{params: obj}); export const deleteTask = (obj) => http.delete('/admin/router/deleteTask',{params: obj});
//移动任务到关卡 //移动任务到关卡
export const moveTask = (obj) => http.post('/admin/router/moveTask',obj); export const moveTask = (obj) => http.post('/admin/router/moveTask',obj);
// 学员路径图进度明细(概览)
export const studentProcess = (obj) => http.get(`admin/router/studentProcess?routerId=${obj.routerId}&studentId=${obj.studentId}`);
// 学员关卡设置
// 添加学员
export const addStudent = (obj) => http.post('/admin/router/addStudent',obj);
// 删除学员
export const deleteStudent = (obj) => http.post('/admin/router/deleteStudent',obj);

View File

@@ -1,14 +1,18 @@
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', { params: obj }); export const queryWorkDetailById = (obj) => http.post('/work/queryWorkDetailById',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);

View File

@@ -9,7 +9,8 @@
> >
<div class="drawerMain"> <div class="drawerMain">
<div class="header"> <div class="header">
<div class="headerTitle" >添加活动</div> <div v-if="edit" 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"
@@ -272,6 +273,10 @@ export default {
chooseStageId: { chooseStageId: {
type: Number, type: Number,
default: null, default: null,
},
edit: {
type: Boolean,
default: false,
} }
}, },
setup(props, ctx) { setup(props, ctx) {
@@ -290,6 +295,7 @@ export default {
}); });
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:addactiveVisible", false); ctx.emit("update:addactiveVisible", false);
ctx.emit("update:edit", false);
state.radioV1 = ""; state.radioV1 = "";
state.inputV1 = ""; state.inputV1 = "";
state.inputV2 = ""; state.inputV2 = "";

View File

@@ -126,6 +126,10 @@ export default {
chooseStageId: { chooseStageId: {
type: Number, type: Number,
default: null, default: null,
},
editDiscussId: {
type: Number,
default: null,
} }
}, },
setup(props, ctx) { setup(props, ctx) {
@@ -161,13 +165,24 @@ export default {
createTime: "", //创建时间 createTime: "", //创建时间
createUser: 0, //创建人 createUser: 0, //创建人
discussFlag: "", //活动逻辑删除标识 discussFlag: "", //活动逻辑删除标识
discussId: 0, //讨论Id discussId: props.editDiscussId == null ? 0 : props.editDiscussId, //讨论Id
discussTag: "", //是否必修的标识 discussTag: "", //是否必修的标识
updateTime: "", //更新时间 updateTime: "", //更新时间
updateUser: 0, //更新人 updateUser: 0, //更新人
projectId: 0, //项目id projectId: 0, //项目id
}; };
api if(props.edit){
//console.log("编辑");
api
.updateDiscuss(obj)
.then((res) => {
console.log("编辑成功", res);
message.success("编辑成功");
closeDrawer();
})
.catch((err) => console.log(err));
}else{
api
.createDiscuss(obj) .createDiscuss(obj)
.then((res) => { .then((res) => {
console.log("创建成功", res); console.log("创建成功", res);
@@ -179,7 +194,7 @@ export default {
if(props.isStudiscuss){ if(props.isStudiscuss){
let editObj1 = { let editObj1 = {
chapterId:props.isactive, chapterId:props.isactive,
courseId: 0, courseId: res.data.data.discussId,
duration: 0, duration: 0,
flag: true, flag: true,
name: obj.discussName, name: obj.discussName,
@@ -202,7 +217,7 @@ export default {
console.log("项目添加讨论"); console.log("项目添加讨论");
apiTask apiTask
.addTask({ .addTask({
courseId: 0, courseId: res.data.data.discussId,
duration: 0, duration: 0,
flag: true, flag: true,
name: obj.discussName, name: obj.discussName,
@@ -227,6 +242,8 @@ export default {
.catch((err) => { .catch((err) => {
console.log("创建失败", err); console.log("创建失败", err);
}); });
}
}; };
return { return {
...toRefs(state), ...toRefs(state),

View File

@@ -10,8 +10,7 @@
> >
<div class="drawerMain"> <div class="drawerMain">
<div class="header"> <div class="header">
<div v-if="isLiveEdit == 2" class="headerTitle">编辑直播</div> <div 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"
@@ -343,26 +342,93 @@ 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,
@@ -388,7 +454,6 @@ 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;
@@ -502,7 +567,7 @@ export default {
liveStartTime: startTime, liveStartTime: startTime,
liveExplain: state.textV1, liveExplain: state.textV1,
liveFlag: "", liveFlag: "",
liveId: props.EditLiveId == null ? 0 : props.EditLiveId, liveId: 0,
liveLink: state.inputV4, liveLink: state.inputV4,
liveName: state.inputV1, liveName: state.inputV1,
livePlayback: "", livePlayback: "",
@@ -516,74 +581,61 @@ export default {
updateUser: 0, updateUser: 0,
}; };
let name = state.inputV1; let name = state.inputV1;
if (props.isLiveEdit == 2) { api
api .createLiveBroadcast(state.obj)
.updateLiveBroadcastMessage(state.obj) .then((res) => {
.then((res) => { console.log("调用添加直播接口后", res.data.data);
console.log("编辑成功", res); // console.log(state, 2222);
message.success("编辑成功"); message.success("提交成功");
closeDrawer(); closeDrawer();
ctx.emit("changeData", false);
}) if (props.isStudy == 1) {
.catch((err) => console.log(err)); console.log("hhhhh", name);
} else { let objj = {
api chapterId: 36,
.createLiveBroadcast(state.obj) courseId: 0,
.then((res) => { duration: state.obj.liveDuration,
console.log("调用添加直播接口后", res.data.data); flag: true,
// console.log(state, 2222); name: name,
message.success("提交成功"); routerId: 92,
closeDrawer(); routerTaskId: 0,
//学习路径的创建 type: 6,
if (props.isStudy == 1) { };
console.log("hhhhh", name); RouterEditTask(objj)
let objj = { .then((res) => {
chapterId: props.isactive, console.log(res, 11111);
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: name, name: state.obj.liveName,
routerId: props.routerId, projectId: props.projectId,
routerTaskId: 0, projectTaskId: 0,
stageId: props.chooseStageId,
type: 6, type: 6,
}; })
RouterEditTask(objj) .then((res) => {
.then((res) => { console.log("调用项目添加接口后", res.data);
console.log(res, 11111); //自定义事件给父组件传值
}) ctx.emit("changeData", false);
.catch((err) => { //重新获取任务列表
console.log(err, 1111); // apiTask.getTask({ projectId: 28 });
}); // router.push("/taskadd");
} else { })
//项目的创建 .catch((err) => {
apiTask console.log(err);
.addTask({ });
courseId: res.data.data.liveId, }
duration: state.obj.liveDuration, })
flag: true, .catch((err) => {
name: state.obj.liveName, console.log(err, 2222);
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 {

View File

@@ -8,8 +8,7 @@
> >
<div class="drawerMain"> <div class="drawerMain">
<div class="header"> <div class="header">
<div v-if="isRefEdit == 2" class="headerTitle">编辑外链</div> <div class="headerTitle">{{ title }}外链</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"
@@ -127,20 +126,13 @@ 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);
@@ -164,10 +156,10 @@ export default {
createTime: "", createTime: "",
linkAddress: state.inputV2, linkAddress: state.inputV2,
linkDescription: state.textV1, linkDescription: state.textV1,
linkFlag: "0", linkFlag: "",
linkId: props.EditRefId == null ? 0 : props.EditRefId, linkId: props.EditRefId == null ? 0 : props.EditRefId,
linkName: state.inputV1, linkName: state.inputV1,
linkTag: "0", linkTag: "",
updateTime: "", updateTime: "",
updateUser: 0, updateUser: 0,
}; };
@@ -179,11 +171,9 @@ 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) => {
@@ -193,12 +183,12 @@ export default {
//学习路径的创建 //学习路径的创建
if (props.isStudy == 1) { if (props.isStudy == 1) {
let objj = { let objj = {
chapterId: props.isactive, chapterId: 36,
courseId: res.data.data.linkId, courseId: 0,
duration: 0, duration: 0,
flag: true, flag: true,
name: obj.linkName, name: obj.linkName,
routerId: props.routerId, routerId: 92,
routerTaskId: 0, routerTaskId: 0,
type: 7, type: 7,
}; };
@@ -239,13 +229,10 @@ export default {
}); });
} }
}; };
//不生效
onMounted(() => { onMounted(() => {
console.log("few"); state.title = props.isRefEdit == 2 ? "编辑" : "添加";
// api.getLink({ linkId: props.EditRefId }).then((res) => {
// console.log(res), "获取成功";
// });
}); });
return { return {
...toRefs(state), ...toRefs(state),
afterVisibleChange, afterVisibleChange,
@@ -395,4 +382,4 @@ export default {
} }
} }
} }
</style> </style>

View File

@@ -9,16 +9,16 @@
<div class="groupname" style="width: 42px">姓名</div> <div class="groupname" style="width: 42px">姓名</div>
<a-input <a-input
class="ant-input" class="ant-input"
v-model:value="studentName" v-model:value="value"
placeholder="请输入姓名" placeholder="请输入姓名"
/> />
</div> </div>
<div class="groupright"> <div class="groupright">
<div class="btn1" @click="searchProjectStudent"> <div class="btn1">
<img src="../../assets/images/courseManage/search0.png" /> <img src="../../assets/images/courseManage/search0.png" />
<span class="btn1text">搜索</span> <span class="btn1text">搜索</span>
</div> </div>
<div class="btn2" @click="projectStudentReset"> <div class="btn2">
<img src="../../assets/images/courseManage/reset1.png" /> <img src="../../assets/images/courseManage/reset1.png" />
<span class="btn2text">重置</span> <span class="btn2text">重置</span>
</div> </div>
@@ -367,17 +367,13 @@ export default {
activeKeyScore: "2", activeKeyScore: "2",
stuName: "请输入姓名", stuName: "请输入姓名",
todayvalue: "1", todayvalue: "1",
tableDataTotal: 30,
stuValue: false, stuValue: false,
Svisible: false, Svisible: false,
score1: 5, score1: 5,
score2: 5, score2: 5,
edit: true, edit: true,
searchRankName:null,//榜单搜索名称 searchRankName:null,//榜单搜索名称
studentName:null,//学员搜索名称
pageSize:10,
currentPage:1,
tableDataTotal: -1,
}); });
const getTableData = () => { const getTableData = () => {
let datas = state.tabledataStu; let datas = state.tabledataStu;
@@ -403,59 +399,21 @@ export default {
getTableData(); getTableData();
const tabsChange = (e) => { const tabsChange = (e) => {
if (e == 1) {
// console.log('获取项目积分-学员')
getProjectStudent();
}
if (e == 2) { if (e == 2) {
// console.log('获取项目积分-榜单') // console.log('获取项目积分-榜单')
scoreRank(1, 1); scoreRank(1, 1);
} }
if(e==3){
scoreRule()
}
projectStudentReset()
rankReset() rankReset()
state.todayvalue='1' state.todayvalue='1'
state.stuValue=1 state.stuValue=1
}; };
// start -------学员---------------学员------------学员------------------学员---------
//重置
const projectStudentReset=()=>{
state.studentName=null
}
//搜索
const searchProjectStudent = () => {
state.currentPage=1
getProjectStudent()
};
//项目积分榜单
const getProjectStudent = () => {
console.log("projectId", props.projectId,state.studentName);
let obj = {
projectId:props.projectId,
pageSize:state.pageSize,
pageNo:state.currentPage,
name:state.studentName,
};
api
.getProjectStudent(obj)
.then((res) => {
console.log("获取项目积分-学员", res);
})
.catch((err) => {
console.log("获取项目积分-学员", err);
});
};
// end -----学员----------------学员----------------------学员-----------学员----------
// start -------榜单---------------榜单------------榜单------------------榜单---------
//重置 //重置
const rankReset=()=>{ const rankReset=()=>{
state.searchRankName=null state.searchRankName=null
} }
// start -------榜单---------------榜单------------榜单------------------榜单---------
//学员积分还是小组积分 //学员积分还是小组积分
const typeChange = (num) => { const typeChange = (num) => {
state.stuValue = num; state.stuValue = num;
@@ -491,22 +449,6 @@ export default {
}); });
}; };
// end -----榜单----------------榜单----------------------榜单-----------榜单---------- // end -----榜单----------------榜单----------------------榜单-----------榜单----------
// start -------获取规则---------------获取规则------------获取规则------------------获取规则---------
//获取规则
const scoreRule = () => {
console.log("projectId", props.projectId);
api
.scoreRule(props.projectId)
.then((res) => {
console.log("获取项目积分-获取规则", res);
})
.catch((err) => {
console.log("获取项目积分-获取规则", err);
});
};
// end -----获取规则----------------获取规则----------------------获取规则-----------获取规则----------
return { return {
...toRefs(state), ...toRefs(state),
typeChange, typeChange,
@@ -514,11 +456,7 @@ export default {
searchRank, searchRank,
rankReset, rankReset,
tabsChange, tabsChange,
projectStudentReset,
searchProjectStudent,
getProjectStudent,
scoreRank, scoreRank,
scoreRule,
}; };
}, },
computed: { computed: {

View File

@@ -886,7 +886,7 @@
</div> </div>
</template> </template>
<script> <script>
import { ref, reactive, toRefs, onMounted } from "vue"; import { ref, reactive, toRefs } from "vue";
import AddStu from "../../components/drawers/AddLevelAddStu"; import AddStu from "../../components/drawers/AddLevelAddStu";
import ImpStu from "../../components/drawers/AddLevelImportStu"; import ImpStu from "../../components/drawers/AddLevelImportStu";
import CheckStu from "../../components/drawers/CheckStu"; import CheckStu from "../../components/drawers/CheckStu";
@@ -900,8 +900,6 @@ import WorkManage from "../../components/drawers/WorkManage";
// import { useStore } from "vuex"; // import { useStore } from "vuex";
import * as api from "../../api/index1"; import * as api from "../../api/index1";
import { storage } from "../../api/storage"; import { storage } from "../../api/storage";
import { message } from "ant-design-vue";
import { studentProcess, deleteStudent, addStudent } from "@/api/indexLevel";
export default { export default {
name: "LevelAdd", name: "LevelAdd",
@@ -1458,26 +1456,6 @@ export default {
getStudent(); getStudent();
} }
}; };
onMounted(() => {
getBriefIntroduction()
});
// 获取简介
const getBriefIntroduction = () => {
let obj = {
routerId: state.routerId,
studentId:0,
};
studentProcess(obj)
.then((res) => {
console.log("获取简介", res);
})
.catch((err) => {
console.log("获取简介失败", err);
});
}
//学员管理------------------------------------------------ //学员管理------------------------------------------------
//获取学员列表 //获取学员列表
const getStudent = () => { const getStudent = () => {
@@ -1496,56 +1474,6 @@ export default {
}); });
}; };
// 添加学员
const adStudent = () => {
let obj = {
"deptList": [
{
"id": 0,
"name": ""
}
],
"groupList": [
{
"id": 0,
"name": ""
}
],
"routerId": 0,
"studentList": [
{
"id": 0,
"name": ""
}
]
}
addStudent(obj)
.then((res) => {
console.log("添加学员成功", res);
message.success("添加学员成功");
})
.catch((err) => {
console.log("添加学员失败", err);
message.error("添加学员失败");
});
}
// 删除学员
const delStudent = () => {
let obj = {
"routerId": 0,
"studentIds": []
}
deleteStudent(obj)
.then((res) => {
console.log("删除学员成功", res);
message.success("删除学员成功");
})
.catch((err) => {
console.log("删除学员失败", err);
message.error("删除学员失败");
});
}
//学员管理------------------------------------------------ //学员管理------------------------------------------------
return { return {
...toRefs(state), ...toRefs(state),
@@ -1577,11 +1505,6 @@ export default {
closehuodModal, closehuodModal,
closezhibModal, closezhibModal,
changeTabs, changeTabs,
getBriefIntroduction, // 获取简介
// settingControls, // 设置
delStudent, // 删除学员
adStudent, // 添加学员
// pathingController, // 路径管理{ ... }
}; };
}, },
}; };

View File

@@ -501,6 +501,7 @@
margin-right: 25px; margin-right: 25px;
cursor: pointer; cursor: pointer;
" "
@click="decideType(element.lei, element.courseId)"
> >
编辑 编辑
</span> </span>
@@ -516,22 +517,6 @@
</div> </div>
</template> </template>
</draggable> </draggable>
<!-- <a-table
style="border: 1px solid #f2f6fe"
:columns="tableDataFunc()"
:data-source="tableData"
:loading="tableDataTotal === -1 ? true : false"
expandRowByClick="true"
@expand="expandTable"
:customRow="handleClickRow"
:pagination="false"
:row-selection="{
columnWidth: 30,
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
/> -->
</div> </div>
<!-- 无数据样式 --> <!-- 无数据样式 -->
<div class="notable" :style="{ display: stm_hs ? 'block' : 'none' }"> <div class="notable" :style="{ display: stm_hs ? 'block' : 'none' }">
@@ -871,6 +856,10 @@ export default {
name: "默认关卡", name: "默认关卡",
}, },
], ],
isRefEdit: 1, //外链编辑
isLiveEdit: 1, //直播编辑
EditRefId: null, //要编辑的外链的id
EditLiveId: null, //要编辑的直播的id
tableData: [ tableData: [
{ {
key: 1, key: 1,
@@ -1687,18 +1676,39 @@ export default {
let obj = { let obj = {
chapterId: state.isactive, chapterId: state.isactive,
routerTaskIdList: state.selectRow, routerTaskIdList: state.selectRow,
} };
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);
}) });
} };
//打开编辑外链的弹窗
const showEditRefDrawer = (id) => {
state.addrefvisible = true;
state.isRefEdit = 2;
state.EditRefId = id;
};
//打开编辑直播的弹窗
const showEditLiveDrawer = (id) => {
state.addlivevisible = true;
state.isLiveEdit = 2;
state.EditLiveId = id;
};
//编辑的按钮
const decideType = (type, id) => {
console.log(type, id);
if (type == "外链") {
showEditRefDrawer(id);
} else if (type == "直播") {
showEditLiveDrawer(id);
}
};
return { return {
...toRefs(state), ...toRefs(state),
// tableDataFunc, // tableDataFunc,
@@ -1737,6 +1747,9 @@ export default {
deletecTaskAll, deletecTaskAll,
moveTask, moveTask,
showDeleteModal, showDeleteModal,
showEditRefDrawer,
showEditLiveDrawer,
decideType,
}; };
}, },
}; };

View File

@@ -191,6 +191,10 @@
<add-ref <add-ref
v-model:addrefVisible="addrefvisible" v-model:addrefVisible="addrefvisible"
@changeData="updateTableData" @changeData="updateTableData"
v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId"
v-model:isRefEdit="isRefEdit"
v-model:EditRefId="EditRefId"
/> />
</div> </div>
<!-- 添加外链侧弹窗 --> <!-- 添加外链侧弹窗 -->
@@ -207,6 +211,10 @@
<div> <div>
<add-discuss <add-discuss
v-model:adddiscussVisible="adddiscussvisible" v-model:adddiscussVisible="adddiscussvisible"
v-model:edit="edit"
v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId"
v-model:editDiscussId="editDiscussId"
@changeData="updateTableData" @changeData="updateTableData"
/> />
</div> </div>
@@ -224,6 +232,9 @@
<div> <div>
<add-active <add-active
v-model:addactiveVisible="addactivevisible" v-model:addactiveVisible="addactivevisible"
v-model:projectId="projectId"
v-model:edit="edit"
v-model:chooseStageId="chooseStageId"
@changeData="updateTableData" @changeData="updateTableData"
/> />
</div> </div>
@@ -242,6 +253,10 @@
<add-eval <add-eval
v-model:addevalVisible="addevalvisible" v-model:addevalVisible="addevalvisible"
@changeData="updateTableData" @changeData="updateTableData"
v-model:edit="edit"
v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId"
v-model:EditEvalId="EditEvalId"
/> />
</div> </div>
<!-- 添加测评侧弹窗 --> <!-- 添加测评侧弹窗 -->
@@ -259,6 +274,9 @@
<add-invist <add-invist
v-model:addinvistVisible="addinvistvisible" v-model:addinvistVisible="addinvistvisible"
@changeData="updateTableData" @changeData="updateTableData"
v-model:edit="edit"
v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId"
/> />
</div> </div>
<!-- 添加评估侧弹窗 --> <!-- 添加评估侧弹窗 -->
@@ -275,6 +293,7 @@
<add-vote <add-vote
v-model:addvoteVisible="addvotevisible" v-model:addvoteVisible="addvotevisible"
@changeData="updateTableData" @changeData="updateTableData"
v-model:edit="edit"
v-model:projectId="projectId" v-model:projectId="projectId"
v-model:chooseStageId="chooseStageId" v-model:chooseStageId="chooseStageId"
/> />
@@ -481,6 +500,7 @@
margin-right: 25px; margin-right: 25px;
cursor: pointer; cursor: pointer;
" "
@click="decideType(element.lei, element.courseId)"
> >
编辑 编辑
</span> </span>
@@ -827,6 +847,7 @@ export default {
? JSON.parse(storage.get("projectId")) ? JSON.parse(storage.get("projectId"))
: null, : null,
chooseStageId: null, chooseStageId: null,
edit: false,
isRefEdit: 1, //外链编辑 isRefEdit: 1, //外链编辑
isLiveEdit: 1, //直播编辑 isLiveEdit: 1, //直播编辑
EditRefId: null, //要编辑的外链的id EditRefId: null, //要编辑的外链的id
@@ -1059,6 +1080,7 @@ export default {
cretime: value.duration ? value.duration : "-", cretime: value.duration ? value.duration : "-",
checked1: value.flag ? true : false, checked1: value.flag ? true : false,
checked: false, //是否选中类型 checked: false, //是否选中类型
courseId: value.courseId,
}; };
array.push(obj); array.push(obj);
}); });
@@ -1648,25 +1670,21 @@ export default {
}; };
//移动任务到阶段 //移动任务到阶段
const moveTask = () => { const moveTask = () => {
let arr = state.selectRow; let obj = {
console.log("选择的行信息", arr); stageId: state.chooseStageId,
arr.map((value) => { projectTaskId: state.selectRow,
console.log("value:", value); };
let obj = { apimove
chapterId: state.chooseStageId, .moveTask(obj)
routerTaskIdList: value, .then((res) => {
}; console.log("移动成功", res);
apimove message.destroy();
.moveTask(obj) message.success("移动成功");
.then((res) => { getTask();
console.log("移动成功", res); })
message.destroy(); .catch((err) => {
message.success("移动成功"); console.log("移动失败", err);
}) });
.catch((err) => {
console.log("移动失败", err);
});
});
}; };
//批量删除 //批量删除
const deleteTaskAll = () => { const deleteTaskAll = () => {
@@ -1868,11 +1886,20 @@ export default {
}; };
//编辑的按钮 //编辑的按钮
const decideType = (type, id) => { const decideType = (type, id) => {
state.edit = true;
console.log(type, id); console.log(type, id);
if (type == "外链") { if (type == "外链") {
showEditRefDrawer(id); showEditRefDrawer(id);
} else if (type == "直播") { } else if (type == "直播") {
showEditLiveDrawer(id); showEditLiveDrawer(id);
} else if (type == "测评") {
showDrawerAddEval(id);
} else if (type == "评估") {
showDrawerAddInvist(id);
} else if (type == "投票") {
showDrawerAddVote(id);
} else if (type == "讨论") {
showDrawerAddDiscuss(id);
} }
}; };
return { return {