feat:增加项目的发布

This commit is contained in:
lixg
2022-11-07 20:15:21 +08:00
parent 0e93785409
commit cecb5377d9
3 changed files with 3626 additions and 2915 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';
@@ -44,4 +52,8 @@ export const createProject = (obj) => http.post('/admin/project/edit', obj)
export const getProjectList = (obj) => http.post('/admin/project/list', obj) 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

@@ -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
<a-spin :spinning="lpLoading" tip="添加中..." /> class="aeLoading"
:style="{ display: lpLoading ? 'flex' : 'none' }"
>
<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,19 +1300,30 @@ 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,
setTimeout(() => { };
console.log("创建成功", res); //创建关卡
message.destroy(); api
message.success("创建成功"); .editChapter(chapterObj)
state.lpLoading = false; .then((chapterRes) => {
state.currentPage = 1; console.log("关卡创建成功", chapterRes);
router.push("/leveladd"); setTimeout(() => {
// getLearnPath(); console.log("创建成功", res);
}, commonData.timeout); message.destroy();
message.success("创建成功");
state.lpLoading = false;
state.currentPage = 1;
router.push("/leveladd");
storage.set("routerId", res.data.data.routerId);
// getLearnPath();
}, commonData.timeout);
})
.catch((chapterErr) => {
console.log("关卡创建失败", chapterErr);
});
}) })
.catch((err) => { .catch((err) => {
console.log("创建失败", err); console.log("创建失败", err);

File diff suppressed because it is too large Load Diff