This commit is contained in:
dongwug
2022-11-08 09:09:31 +08:00
5 changed files with 3655 additions and 2932 deletions

View File

@@ -1,3 +1,11 @@
/*
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-07 17:06:45
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-11-07 20:11:23
* @FilePath: /fe-manage/src/api/index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import http from "./config"; import http from "./config";
// import qs from 'qs'; // import qs from 'qs';
@@ -45,3 +53,7 @@ export const getProjectList = (obj) => http.post('/admin/project/list', obj)
// 获取项目详情信息(包含阶段及任务列表) // 获取项目详情信息(包含阶段及任务列表)
export const getProjectDetail = (obj) => http.get('/admin/project/detail', { params: obj }) export const getProjectDetail = (obj) => http.get('/admin/project/detail', { params: obj })
//发布项目
export const releaseProject=(obj)=>http.post('/admin/project/publish',obj)
//获取项目学员
export const projectStudent=(obj)=>http.post('/admin/project/studentList',obj)

View File

@@ -173,14 +173,21 @@ export default {
}; };
if(props.edit){ if(props.edit){
//console.log("编辑"); //console.log("编辑");
console.log("props.editDiscussId",props.editDiscussId)
let obj = {
discussId: props.editDiscussId,
}
console.log(obj)
api api
.updateDiscuss(obj) .getDiscussDetail(obj)
.then((res) => { .then((res) => {
console.log("编辑成功", res); console.log("获取成功",res.data);
message.success("编辑成功");
closeDrawer();
}) })
.catch((err) => console.log(err)); .catch((err) => {
console.log("获取失败",err.data);
})
}else{ }else{
api api
.createDiscuss(obj) .createDiscuss(obj)

View File

@@ -226,11 +226,13 @@
<button class="samtn btn2" @click="createLearnPath">确定</button> <button class="samtn btn2" @click="createLearnPath">确定</button>
</div> </div>
</div> </div>
<div class="aeLoading" :style="{display:lpLoading?'flex':'none'}"> <div
class="aeLoading"
:style="{ display: lpLoading ? 'flex' : 'none' }"
>
<a-spin :spinning="lpLoading" tip="添加中..." /> <a-spin :spinning="lpLoading" tip="添加中..." />
</div> </div>
</div> </div>
</a-modal> </a-modal>
<!-- 编辑路径弹窗 --> <!-- 编辑路径弹窗 -->
@@ -590,7 +592,7 @@ import QueryRight from "../../components/drawers/QueryRight";
import ManageRight from "../../components/drawers/ManageRight"; import ManageRight from "../../components/drawers/ManageRight";
import * as api from "../../api/index1"; import * as api from "../../api/index1";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import { toDate,commonData } from "../../api/method"; import { toDate, commonData } from "../../api/method";
import { storage } from "../../api/storage"; import { storage } from "../../api/storage";
export default { export default {
name: "learningPath", name: "learningPath",
@@ -721,7 +723,7 @@ export default {
recallPathId: null, //撤回路径id recallPathId: null, //撤回路径id
stopPathId: null, //停用路径id stopPathId: null, //停用路径id
lpLoading:false, lpLoading: false,
}); });
const selectProjectName = (value, index) => { const selectProjectName = (value, index) => {
@@ -1298,10 +1300,16 @@ export default {
api api
.createLearnPath(obj) .createLearnPath(obj)
.then((res) => { .then((res) => {
// console.log("创建成功", res); let chapterObj = {
// message.destroy(); name: "关卡一",
// message.success("创建成功"); remark: "",
// router.push("/leveladd"); routerId: res.data.data.routerId,
};
//创建关卡
api
.editChapter(chapterObj)
.then((chapterRes) => {
console.log("关卡创建成功", chapterRes);
setTimeout(() => { setTimeout(() => {
console.log("创建成功", res); console.log("创建成功", res);
message.destroy(); message.destroy();
@@ -1309,9 +1317,14 @@ export default {
state.lpLoading = false; state.lpLoading = false;
state.currentPage = 1; state.currentPage = 1;
router.push("/leveladd"); router.push("/leveladd");
storage.set("routerId", res.data.data.routerId);
// getLearnPath(); // getLearnPath();
}, commonData.timeout); }, commonData.timeout);
}) })
.catch((chapterErr) => {
console.log("关卡创建失败", chapterErr);
});
})
.catch((err) => { .catch((err) => {
console.log("创建失败", err); console.log("创建失败", err);
// state.createLoading = false; // state.createLoading = false;

File diff suppressed because it is too large Load Diff

View File

@@ -851,6 +851,8 @@ export default {
isRefEdit: 1, //外链编辑 isRefEdit: 1, //外链编辑
isLiveEdit: 1, //直播编辑 isLiveEdit: 1, //直播编辑
EditRefId: null, //要编辑的外链的id EditRefId: null, //要编辑的外链的id
EditLiveId: null, //要编辑的直播的id
editDiscussId:null,//要编辑的讨论的id
EditEvalId:null, EditEvalId:null,
projectNameList: [ projectNameList: [
{ {
@@ -1743,6 +1745,11 @@ export default {
const showDrawerAddDiscuss = () => { const showDrawerAddDiscuss = () => {
state.adddiscussvisible = true; state.adddiscussvisible = true;
}; };
//打开编辑讨论的弹窗
const showEditAddDiscuss = (id)=>{
state.editDiscussId = id
state.adddiscussvisible = true;
}
const showDrawerAddActive = () => { const showDrawerAddActive = () => {
state.addactivevisible = true; state.addactivevisible = true;
}; };
@@ -1867,18 +1874,16 @@ export default {
} }
else if (type == "直播") { else if (type == "直播") {
showEditLiveDrawer(id); showEditLiveDrawer(id);
} } else if (type == "测评") {
else if (type == "测评") { showDrawerAddEval(id);
showEditEvalDrawer(id) } else if (type == "评估") {
} showDrawerAddInvist(id);
else if (type == "评估") { } else if (type == "投票") {
showDrawerAddInvist(id) showDrawerAddVote(id);
} } else if (type == "讨论") {
else if (type == "投票") { showEditAddDiscuss(id);
showDrawerAddVote(id) } else if (type == "活动") {
} showDrawerAddActive(id);
else if (type == "讨论") {
showDrawerAddDiscuss(id)
} }
} }
return { return {