mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
feat:增加项目的发布
This commit is contained in:
@@ -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)
|
||||||
@@ -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
Reference in New Issue
Block a user