提交
105
README.md
Normal file
@@ -0,0 +1,105 @@
|
||||
# fe_manage
|
||||
|
||||
## Project setup
|
||||
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
|
||||
```
|
||||
npm run lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
|
||||
## pages 页面说明
|
||||
|
||||
### 一、learningpath:学习路径文件夹
|
||||
|
||||
```
|
||||
LearningPath.vue:学习路径页面
|
||||
LevelAdd.vue:关卡页面
|
||||
LevelAddDetail.vue:创建关卡页面
|
||||
LevelCheck.vue查看页面
|
||||
```
|
||||
|
||||
### 二、projectcenter:项目文件夹
|
||||
|
||||
```
|
||||
ProjectManage.vue:项目页面
|
||||
ProjectAdd.vue:创建单层项目页面
|
||||
SonProject.vue:创建单层子项目页面
|
||||
TaskPage.vue:任务页面
|
||||
TaskAdd.vue:创建任务页面
|
||||
TemplateLibrary.vue:模板页面
|
||||
LibraryAdd.vue:模板库查看页面
|
||||
|
||||
```
|
||||
|
||||
### 三、courselibrary:课程文件夹
|
||||
|
||||
```
|
||||
CourseManage.vue:课件管理页面
|
||||
CoursewareManage.vue:课程页面
|
||||
|
||||
```
|
||||
|
||||
### 四、examination:考试文件夹
|
||||
|
||||
```
|
||||
ExaminationCenter.vue:考试中心页面
|
||||
|
||||
```
|
||||
|
||||
### 五、research:调研文件夹
|
||||
|
||||
```
|
||||
ResearchManage.vue:调研管理页面
|
||||
ResearchAdd.vue:创建调研页面
|
||||
ManagePage:调研管理-管理页面
|
||||
|
||||
```
|
||||
|
||||
### 六、report:报表文件夹
|
||||
|
||||
```
|
||||
ReportCenter.vue:报表中心页面
|
||||
|
||||
```
|
||||
|
||||
### 七、teacher:教师文件夹
|
||||
|
||||
```
|
||||
TeacherManage.vue:教师管理页面
|
||||
|
||||
```
|
||||
|
||||
### 八、certificate:证书文件夹
|
||||
|
||||
```
|
||||
CertificateCenter.vue:证书中心页面
|
||||
|
||||
```
|
||||
|
||||
### 九、system:系统文件夹
|
||||
|
||||
```
|
||||
SystemManage.vue:系统管理页面
|
||||
|
||||
```
|
||||
5
babel.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
||||
19
jsconfig.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
}
|
||||
}
|
||||
20502
package-lock.json
generated
Normal file
64
package.json
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"name": "fe_manage",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"ant-design-vue": "^3.2.12",
|
||||
"axios": "^1.1.3",
|
||||
"core-js": "^3.8.3",
|
||||
"element-plus": "^2.2.17",
|
||||
"element-resize-detector": "^1.2.4",
|
||||
"html2canvas": "^1.4.1",
|
||||
"jquery": "^3.6.1",
|
||||
"qrcode.vue": "^3.3.3",
|
||||
"qs": "^6.11.0",
|
||||
"sortablejs": "^1.15.0",
|
||||
"vue": "^3.2.13",
|
||||
"vue-router": "^4.0.3",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"vuex": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/eslint-parser": "^7.12.16",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-plugin-router": "~5.0.0",
|
||||
"@vue/cli-plugin-vuex": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3",
|
||||
"sass": "^1.32.7",
|
||||
"sass-loader": "^12.0.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/vue3-essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "@babel/eslint-parser"
|
||||
},
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"no-debugger": "off",
|
||||
"no-mixed-spaces-and-tabs": "off"
|
||||
}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead",
|
||||
"not ie 11"
|
||||
]
|
||||
}
|
||||
BIN
public/favicon.ico
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
17
public/index.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
109
src/App.vue
Normal file
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<div id="container">
|
||||
<nav-top />
|
||||
<div style="display: flex">
|
||||
<nav-left />
|
||||
<div style="flex: 1; display: flex; flex-direction: column; width: 0">
|
||||
<open-pages />
|
||||
<bread-crumb />
|
||||
<main>
|
||||
<a-config-provider :locale="zhCN">
|
||||
<router-view />
|
||||
</a-config-provider>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { computed, defineComponent } from "vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import NavLeft from "@/components/NavLeft";
|
||||
import NavTop from "@/components/NavTop";
|
||||
import OpenPages from "@/components/OpenPages";
|
||||
import BreadCrumb from "@/components/BreadCrumb";
|
||||
import zhCN from "ant-design-vue/es/locale/zh_CN";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
NavLeft,
|
||||
NavTop,
|
||||
OpenPages,
|
||||
BreadCrumb,
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
// console.log("router", router.getRoutes(), route);
|
||||
const routes = computed(() => {
|
||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||
});
|
||||
|
||||
const currentRouteName = computed(() => route.name);
|
||||
|
||||
return {
|
||||
routes,
|
||||
name: currentRouteName,
|
||||
zhCN,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="scss">
|
||||
#app {
|
||||
// font-family: MicrosoftYaHei, Microsoft YaHei, Avenir, Helvetica, Arial,
|
||||
// sans-serif;
|
||||
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
|
||||
Microsoft YaHei, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: #2c3e50;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
width: 100%;
|
||||
min-width: 1000px;
|
||||
min-height: 100%;
|
||||
background-color: rgba(245, 247, 250, 1);
|
||||
|
||||
main {
|
||||
height: 0;
|
||||
flex: 1 1 auto;
|
||||
// flex-shrink: 0;
|
||||
display: flex;
|
||||
overflow-y: auto;
|
||||
// display: flex;
|
||||
// flex: 1 1 auto;
|
||||
width: calc(100% - 40px);
|
||||
// margin-bottom: 20px;
|
||||
margin: 0px 20px 20px 20px;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.07);
|
||||
}
|
||||
// @media screen and (max-width: 1366px) {
|
||||
// .cmMain {
|
||||
// width: 750px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1367px) and (max-width: 1680px) {
|
||||
// .cmMain {
|
||||
// width: 1010px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1681px) and (max-width: 1920px) {
|
||||
// .cmMain {
|
||||
// width: 1270px;
|
||||
// }
|
||||
// }
|
||||
// @media screen and (min-width: 1921px) {
|
||||
// .cmMain {
|
||||
// width: 1270px;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
</style>
|
||||
53
src/api/config.js
Normal file
@@ -0,0 +1,53 @@
|
||||
import axios from "axios";
|
||||
// const Qs = require("qs");
|
||||
|
||||
// axios.defaults.headers.post["Content-Type"] =
|
||||
// "application/x-www-form-urlencoded";
|
||||
|
||||
axios.defaults.withCredentials = true;
|
||||
|
||||
const http = axios.create({
|
||||
baseURL: "/api",
|
||||
timeout: 1000 * 5,
|
||||
// headers: { "Content-Type": "multipart/form-data" },
|
||||
headers: { "Content-Type": "application/json" },
|
||||
});
|
||||
|
||||
http.interceptors.request.use(
|
||||
(config) => {
|
||||
const token = localStorage.getItem("token");
|
||||
if (token) {
|
||||
// config.headers.token = token;
|
||||
config.headers.token = 123456; //测试1111
|
||||
} else {
|
||||
console.log("当前请求页面无token,请执行操作!!!");
|
||||
// 此处测试默认配置token
|
||||
config.headers.token = "123456";
|
||||
}
|
||||
return config;
|
||||
},
|
||||
(err) => {
|
||||
console.log("登陆前拦截", err);
|
||||
return Promise.reject(err);
|
||||
}
|
||||
);
|
||||
|
||||
http.interceptors.response.use(
|
||||
(response) => {
|
||||
const {
|
||||
data: { code, msg },
|
||||
} = response;
|
||||
if (code === 0 || code === 200) {
|
||||
return response;
|
||||
} else {
|
||||
console.log("api %o", msg);
|
||||
}
|
||||
return response;
|
||||
},
|
||||
function (error) {
|
||||
console.log("api error %o", error);
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
export default http;
|
||||
71
src/api/index.js
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-07 17:06:45
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-15 16:43:26
|
||||
* @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 qs from 'qs';
|
||||
|
||||
|
||||
/**
|
||||
* 接口传参数方式(get)
|
||||
* axios.get('/user', {
|
||||
* params: {
|
||||
* id: 12345,
|
||||
* name: user
|
||||
* }
|
||||
* }).then(res => console.log(res))
|
||||
*
|
||||
* 接口传参三种方式(post/put/patch)
|
||||
*
|
||||
* 1.'Content-Type'= 'multipart/form-data',传参格式为 formData。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'multipart/form-data')
|
||||
* var formData=new FormData();
|
||||
* formData.append('user',123456);formData.append('pass',12345678);
|
||||
* axios.post("/notice",formData).then()
|
||||
*
|
||||
* 2.'Content-Type'= 'application/x-www-form-urlencoded',传参格式为 query 形式,使用$qs.stringify。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* let data = {"code":"1234","name":"yyyy"};
|
||||
* axios.post(`${this.$url}/test/testRequest`,qs.stringify({data})).then()
|
||||
*
|
||||
* 3.'Content-Type'= 'application/json,传参格式为 raw (JSON格式)。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/json;charset=UTF-8')
|
||||
* let data = {"code":"1234","name":"yyyy"}
|
||||
* axios.post(`${this.$url}/test/testRequest`,data).then()
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// 接口-请求
|
||||
|
||||
// 创建编辑单层项目(type=3)/ 多层项目(type=1)/ 多层子项目(type=2)
|
||||
export const createProject = (obj) => http.post('/admin/project/edit', obj)
|
||||
|
||||
// 获取项目列表
|
||||
export const getProjectList = (obj) => http.post('/admin/project/list', 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)
|
||||
//撤回发布、结束
|
||||
export const handleProject = (obj) => http.post('/admin/project/handle', obj)
|
||||
|
||||
//获取任务管理列表
|
||||
export const taskStudentList = (obj) => http.post('/admin/project/taskStudentList', obj)
|
||||
|
||||
|
||||
//获取讨论信息
|
||||
export const getDiscussDetail=(obj)=>http.post('/discuss/getDiscussDetail',obj)
|
||||
|
||||
//获取模版列表
|
||||
export const getTemplate=(obj)=>http.post('/admin/project/template/list',obj)
|
||||
92
src/api/index1.js
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-04 22:45:31
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-17 15:41:45
|
||||
* @FilePath: /fe-manage/src/api/index1.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import http from "./config";
|
||||
import qs from 'qs';
|
||||
|
||||
|
||||
/**
|
||||
* 接口传参数方式(get)
|
||||
* axios.get('/user', {
|
||||
* params: {
|
||||
* id: 12345,
|
||||
* name: user
|
||||
* }
|
||||
* }).then(res => console.log(res))
|
||||
*
|
||||
* 接口传参三种方式(post/put/patch)
|
||||
*
|
||||
* 1.'Content-Type'= 'multipart/form-data',传参格式为 formData。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'multipart/form-data')
|
||||
* var formData=new FormData();
|
||||
* formData.append('user',123456);formData.append('pass',12345678);
|
||||
* axios.post("/notice",formData).then()
|
||||
*
|
||||
* 2.'Content-Type'= 'application/x-www-form-urlencoded',传参格式为 query 形式,使用$qs.stringify。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* let data = {"code":"1234","name":"yyyy"};
|
||||
* axios.post(`${this.$url}/test/testRequest`,qs.stringify({data})).then()
|
||||
*
|
||||
* 3.'Content-Type'= 'application/json,传参格式为 raw (JSON格式)。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/json;charset=UTF-8')
|
||||
* let data = {"code":"1234","name":"yyyy"}
|
||||
* axios.post(`${this.$url}/test/testRequest`,data).then()
|
||||
*
|
||||
*/
|
||||
|
||||
//上传文件
|
||||
export const uploadFile = (obj) => http.post('/test/testRequest', qs.stringify({ obj }));
|
||||
|
||||
// 接口-请求
|
||||
|
||||
//创建学习路径
|
||||
export const createLearnPath = (obj) => http.post('/admin/router/edit', obj);
|
||||
// 获取学习路径图列表
|
||||
export const getLearnPath = (obj) => http.post('/admin/router/list', obj);
|
||||
//学习路径图的发布、停用、删除
|
||||
export const handleLearnPath = (obj) => http.post('/admin/router/handle', obj);
|
||||
|
||||
//获取关卡
|
||||
export const getChapter = (obj) => http.post('/admin/router/detail', { params: obj });
|
||||
|
||||
//新建或编辑关卡
|
||||
export const editChapter = (obj) => http.post('/admin/router/editChapter', obj);
|
||||
|
||||
//获取学员列表
|
||||
export const getStudent = (obj) => http.post('/admin/router/studentList', obj);
|
||||
//获取路径图详情-包含关卡及任务列表
|
||||
export const getRouterDetail = (routerId) => http.get('/admin/router/detail', {
|
||||
params: {
|
||||
routerId: routerId,
|
||||
}
|
||||
});
|
||||
//添加学员
|
||||
export const addStudent = (obj) => http.post('/admin/router/addStudent', obj);
|
||||
//删除学员
|
||||
export const delStudent = (obj) => http.post('/admin/router/deleteStudent', obj);
|
||||
// 获取学员路径图进度明细
|
||||
export const stuProgress = (obj) => http.post('/admin/router/studentProcess', obj);
|
||||
|
||||
|
||||
//项目基础信息-----------------------------------
|
||||
//项目积分榜单
|
||||
export const scoreRank = (obj) => http.post('/admin/project/scoreRank', obj);
|
||||
//排行榜
|
||||
export const billboard = (obj) => http.post('/admin/project/billboard', obj);
|
||||
//项目基础信息-----------------------------------
|
||||
|
||||
// 测试方法
|
||||
// import * as api from '../../api/index'
|
||||
// api.getLearnPath({}).then(res => {
|
||||
// console.log(res)
|
||||
// }).catch(err => {
|
||||
// console.log(err)
|
||||
// })
|
||||
22
src/api/indexActivity.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import http from "./config";
|
||||
|
||||
//获取活动信息接口
|
||||
export const getActivity = (activeId) => http.get(`/activity?activityId=${activeId}`);
|
||||
|
||||
//创建活动接口
|
||||
export const createActivity = (obj) => http.post('/activity/createActivity', obj);
|
||||
|
||||
//删除活动接口
|
||||
export const deleteActivity = (obj) => http.post('/activity/deleteActivity', { params: obj });
|
||||
|
||||
//修改活动接口
|
||||
export const updateActivity = (obj) => http.post('/activity/updateActivity', obj);
|
||||
|
||||
//修改阶段任务信息
|
||||
export const updateTask=(obj)=>http.post('/admin/project/editTask',obj)
|
||||
|
||||
//修改活动是否为必修接口
|
||||
export const updateActivityToCompulsory = (obj) => http.post('/activity/updateActivityToCompulsory', { params: obj });
|
||||
|
||||
//修改活动是否为选修接口
|
||||
export const updateActivityToElective = (obj) => http.post('/activity/updateActivityToElective', { params: obj });
|
||||
4
src/api/indexCase.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import http from "./config";
|
||||
|
||||
//获取案例信息
|
||||
export const queryCasesDetailList = (obj) => http.post(" /cases/queryCasesDetailList", obj);
|
||||
21
src/api/indexCourse.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import http from "./config";
|
||||
|
||||
/**
|
||||
* 1
|
||||
*/
|
||||
//删除开课
|
||||
export const deletePlan = (obj) =>
|
||||
http.delete("/admin/offcourse/deletePlan", obj);
|
||||
//新建或编辑面授课
|
||||
export const edit = (obj) => http.post("/admin/offcourse/edit", obj);
|
||||
//新建或编辑面授课开课
|
||||
export const editPlan = (obj) => http.post("/admin/offcourse/editPlan", obj);
|
||||
//操作面授课(发布,撤回,删除)
|
||||
export const handle = (obj) => http.post("/admin/offcourse/handle", obj);
|
||||
//获取面授课列表
|
||||
export const list = (obj) => http.post("/admin/offcourse/list", obj);
|
||||
//面授课开课列表
|
||||
export const planList = (obj) => http.post("/admin/offcourse/planList", obj);
|
||||
//获取学员列表
|
||||
export const studentList = (obj) =>
|
||||
http.post("/admin/offcourse/studentList", obj);
|
||||
21
src/api/indexDiscuss.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import http from "./config";
|
||||
//import qs from 'qs';
|
||||
|
||||
//创建讨论
|
||||
export const createDiscuss = (obj) => http.post("/discuss/createDiscuss", obj);
|
||||
|
||||
//获取讨论信息接口
|
||||
export const getDiscussDetail = (obj) => http.post('/discuss/getDiscussDetail', obj,{
|
||||
headers: {
|
||||
'token': '123',
|
||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
}
|
||||
})
|
||||
//删除讨论接口
|
||||
export const deleteDiscuss = (obj) =>
|
||||
http.post("/discuss/deleteDiscuss", { params: obj });
|
||||
|
||||
//修改讨论接口
|
||||
export const updateDiscuss = (obj) => http.post('/discuss/updateDiscuss', obj );
|
||||
//修改阶段任务信息
|
||||
export const updateTask=(obj)=>http.post('/admin/project/editTask',obj)
|
||||
87
src/api/indexEval.js
Normal file
@@ -0,0 +1,87 @@
|
||||
import http from "./config";
|
||||
// import qs from 'qs';
|
||||
|
||||
/**
|
||||
* 接口传参数方式(get)
|
||||
* axios.get('/user', {
|
||||
* params: {
|
||||
* id: 12345,
|
||||
* name: user
|
||||
* }
|
||||
* }).then(res => console.log(res))
|
||||
*
|
||||
* 接口传参三种方式(post/put/patch)
|
||||
*
|
||||
* 1.'Content-Type'= 'multipart/form-data',传参格式为 formData。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'multipart/form-data')
|
||||
* var formData=new FormData();
|
||||
* formData.append('user',123456);formData.append('pass',12345678);
|
||||
* axios.post("/notice",formData).then()
|
||||
*
|
||||
* 2.'Content-Type'= 'application/x-www-form-urlencoded',传参格式为 query 形式,使用$qs.stringify。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* let data = {"code":"1234","name":"yyyy"};
|
||||
* axios.post(`${this.$url}/test/testRequest`,qs.stringify({data})).then()
|
||||
*
|
||||
* 3.'Content-Type'= 'application/json,传参格式为 raw (JSON格式)。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/json;charset=UTF-8')
|
||||
* let data = {"code":"1234","name":"yyyy"}
|
||||
* axios.post(`${this.$url}/test/testRequest`,data).then()
|
||||
*
|
||||
*/
|
||||
|
||||
// 接口-请求
|
||||
|
||||
//创建测评
|
||||
export const createEvaluation = (obj) =>
|
||||
http.post("/evaluation/createEvaluation", obj);
|
||||
|
||||
//上传组件
|
||||
export const fileUp = (data) =>
|
||||
http.post("/file/upload", data, {
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
});
|
||||
|
||||
//删除测评信息
|
||||
export const deleteEvaluationById = (obj) => http.post('/evaluation/deleteEvaluationById', { params: obj }, {
|
||||
header: {
|
||||
'token': '123',
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
//根据ID获取测评信息详情
|
||||
export const queryEvaluationDetailById = (obj) =>
|
||||
http.post("/evaluation/queryEvaluationDetailById", obj,{
|
||||
headers: {
|
||||
'token': '123',
|
||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
}
|
||||
});
|
||||
|
||||
//修改测评信息
|
||||
export const updateEvaluation = (obj) =>
|
||||
http.post("/evaluation/updateEvaluation", obj);
|
||||
|
||||
//测评列表查询接口
|
||||
export const choiceEvaluation = (obj) =>
|
||||
http.post(" /evaluation/choiceEvaluation", obj);
|
||||
|
||||
// 测试方法
|
||||
// import * as api from '../../api/index'
|
||||
// api.getLearnPath({}).then(res => {
|
||||
// console.log(res)
|
||||
// }).catch(err => {
|
||||
// console.log(err)
|
||||
// })
|
||||
//根据name获取测评信息详情
|
||||
export const getEvalListByName = (obj) =>
|
||||
http.post("/evaluation/queryEvaluationDetailById", obj,{
|
||||
headers: {
|
||||
'token': '123',
|
||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
}
|
||||
});
|
||||
14
src/api/indexExam.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import http from "./config";
|
||||
// 创建考试信息接口
|
||||
export const createExamination = (obj) => http.post('/examination/createExamination', obj);
|
||||
// 根据Id删除考试信息
|
||||
export const deleteExaminationById = (obj) => http.post('/examination/deleteExaminationById', obj);
|
||||
// 根据ID获取考试信息详情
|
||||
export const queryExaminationDetailById = (obj) => http.post('/examination/queryExaminationDetailById', obj, {
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
|
||||
}
|
||||
});
|
||||
// 创建考试信息接口
|
||||
export const updateExamination = (obj) => http.post('/examination/updateExamination', obj);
|
||||
|
||||
44
src/api/indexExternalChain.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import http from "./config";
|
||||
|
||||
//创建外链接口
|
||||
export const createExternalChain = (obj) => http.post('/link/createLinks', obj, {
|
||||
headers: {
|
||||
'token': '123'
|
||||
}
|
||||
})
|
||||
|
||||
//外链信息删除接口
|
||||
export const deleteLink = (obj) => http.post('/link/deleteLink', { params: obj }, {
|
||||
headers: {
|
||||
'token': '123'
|
||||
}
|
||||
})
|
||||
|
||||
//获取外链详细信息接口
|
||||
export const getLink = (obj) => http.post('/link/getOne', obj,{
|
||||
headers: {
|
||||
'token': '123',
|
||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
}
|
||||
})
|
||||
|
||||
// 更新外链数据
|
||||
export const updateLinks = (obj) => http.post('/link/updateLinks', obj, {
|
||||
headers: {
|
||||
'token': '123'
|
||||
}
|
||||
})
|
||||
|
||||
//修改为必修的接口
|
||||
export const updateToCompulsory = (obj) => http.post('/link/updateToCompulsory', { params: obj }, {
|
||||
headers: {
|
||||
'token': '123'
|
||||
}
|
||||
})
|
||||
|
||||
//修改为选修的接口
|
||||
export const updateToElective = (obj) => http.post('/link/updateToElective', { params: obj }, {
|
||||
headers: {
|
||||
'token': '123'
|
||||
}
|
||||
})
|
||||
62
src/api/indexInvist.js
Normal file
@@ -0,0 +1,62 @@
|
||||
import http from "./config";
|
||||
// import qs from 'qs';
|
||||
|
||||
|
||||
/**
|
||||
* 接口传参数方式(get)
|
||||
* axios.get('/user', {
|
||||
* params: {
|
||||
* id: 12345,
|
||||
* name: user
|
||||
* }
|
||||
* }).then(res => console.log(res))
|
||||
*
|
||||
* 接口传参三种方式(post/put/patch)
|
||||
*
|
||||
* 1.'Content-Type'= 'multipart/form-data',传参格式为 formData。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'multipart/form-data')
|
||||
* var formData=new FormData();
|
||||
* formData.append('user',123456);formData.append('pass',12345678);
|
||||
* axios.post("/notice",formData).then()
|
||||
*
|
||||
* 2.'Content-Type'= 'application/x-www-form-urlencoded',传参格式为 query 形式,使用$qs.stringify。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* let data = {"code":"1234","name":"yyyy"};
|
||||
* axios.post(`${this.$url}/test/testRequest`,qs.stringify({data})).then()
|
||||
*
|
||||
* 3.'Content-Type'= 'application/json,传参格式为 raw (JSON格式)。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/json;charset=UTF-8')
|
||||
* let data = {"code":"1234","name":"yyyy"}
|
||||
* axios.post(`${this.$url}/test/testRequest`,data).then()
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// 接口-请求
|
||||
|
||||
//创建评估
|
||||
export const createAppraiseMessage = (obj) => http.post('/survey/createAppraiseMessage', obj,);
|
||||
|
||||
//删除评估信息
|
||||
export const deleteAppraise = (obj) => http.post('/survey/deleteAppraise', { params: obj })
|
||||
|
||||
//根据ID获取评估信息详情
|
||||
export const queryAppraiseDetailById = (obj) => http.post('/survey/queryAppraiseDetailById', { params: obj })
|
||||
|
||||
//修改评估信息
|
||||
export const updateAppraiseMessage = (obj) => http.post('/survey/updateAppraiseMessage', obj)
|
||||
|
||||
//获取全部评估信息接口
|
||||
export const queryAssessmentDetailList = (obj) => http.post('/assessment/queryAssessmentDetailList', obj)
|
||||
|
||||
|
||||
// 测试方法
|
||||
// import * as api from '../../api/index'
|
||||
// api.getLearnPath({}).then(res => {
|
||||
// console.log(res)
|
||||
// }).catch(err => {
|
||||
// console.log(err)
|
||||
// })
|
||||
4
src/api/indexLearningPath.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import http from "./config";
|
||||
|
||||
// 获取路径图概览
|
||||
export const getRouterOverview = (routerId) => http.get(`/admin/router/overview?routerId=${routerId}`)
|
||||
21
src/api/indexLevel.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-09 09:26:26
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-10 11:50:08
|
||||
* @FilePath: /fe-manage/src/api/indexLevel.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import http from "./config";
|
||||
|
||||
//新建关卡
|
||||
export const editChapter = (obj) => http.post('/admin/router/editChapter', obj);
|
||||
//编辑关卡
|
||||
export const updateChapter = (obj) => http.post('/admin/router/editChapter', obj);
|
||||
//删除关卡
|
||||
export const deleteChapter=(obj)=>http.delete('/admin/router/deleteChapter',{params:obj})
|
||||
//删除任务
|
||||
export const deleteTask = (obj) => http.delete('/admin/router/deleteTask',{params: obj});
|
||||
|
||||
//移动任务到关卡
|
||||
export const moveTask = (obj) => http.post('/admin/router/moveTask',obj);
|
||||
10
src/api/indexLibrary.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import http from "./config";
|
||||
|
||||
// 获取模板库列表
|
||||
export const templateList = obj => http.post('/admin/project/template/list', obj);
|
||||
|
||||
// 获取模板详情
|
||||
export const templateDetail = id => http.get(`/admin/project/template/detail?projectTemplateId=${id}`);
|
||||
|
||||
// 操作模板(撤回,发布,删除)
|
||||
export const templateHadle = obj => http.post(`/admin/project/template/handle`,obj);
|
||||
16
src/api/indexLiveBroadcast.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import http from "./config";
|
||||
|
||||
//根据直播Id获取直播信息 query参数
|
||||
export const getLiveBroadcastInfor = (obj) => http.get('/liveBroadcast', { params: obj })
|
||||
|
||||
//创建直播接口
|
||||
export const createLiveBroadcast = (obj) => http.post('/liveBroadcast/createLiveBroadcast', obj)
|
||||
|
||||
//直播信息删除接口
|
||||
export const deleteLiveBroadcast = (obj) => http.post('/liveBroadcast/deleteLiveBroadcast', obj)
|
||||
|
||||
//直播信息修改接口
|
||||
export const updateLiveBroadcastMessage = (obj) => http.post('/liveBroadcast/updateLiveBroadcastMessage', obj)
|
||||
|
||||
//获取全部评估信息接口
|
||||
export const queryAssessmentDetailList = (obj) => http.post('/assessment/queryAssessmentDetailList', obj)
|
||||
4
src/api/indexMovetask.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import http from "./config";
|
||||
|
||||
//移动任务到阶段
|
||||
export const moveTask = (obj) => http.post('/admin/project/moveTask',obj)
|
||||
34
src/api/indexProjStu.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import http from "./config";
|
||||
|
||||
//获取项目学员列表
|
||||
export const getProjStu = (obj) => http.post('/admin/project/studentList', obj)
|
||||
|
||||
//删除学员
|
||||
export const deleteStu = (obj) => http.post('/admin/project/deleteStudent', obj)
|
||||
|
||||
//获取小组列表
|
||||
export const getGroupList = (obj) => http.post('/admin/project/groupList', obj)
|
||||
|
||||
//删除小组
|
||||
export const deleteGroup = (obj) => http.delete('/admin/project/deleteGroup', { params: obj })
|
||||
|
||||
//新增或编辑小组
|
||||
export const editGroup = (obj) => http.post('/admin/project/editGroup', obj)
|
||||
|
||||
//查看学员
|
||||
export const studentProcess = (obj) => http.get('/admin/project/studentProcess', { params: obj })
|
||||
|
||||
//是否优秀学员
|
||||
export const topStudent = (obj) => http.post('/admin/project/topStudent', obj)
|
||||
|
||||
//项目概览
|
||||
export const overview = (obj) => http.get('/admin/project/overview', { params: obj })
|
||||
|
||||
//设置项目积分规则
|
||||
export const setScoreRule = (obj) => http.post('/admin/project/setScoreRule', obj)
|
||||
|
||||
//获取学员积分明细列表
|
||||
export const studentScoreList = (obj) => http.post('/admin/project/studentScoreList', obj)
|
||||
|
||||
//添加项目学员
|
||||
export const addStudent = (obj) => http.post('/admin/project/addStudent', obj)
|
||||
99
src/api/indexResearch.js
Normal file
@@ -0,0 +1,99 @@
|
||||
import http from "./config";
|
||||
|
||||
/**
|
||||
* 1
|
||||
*/
|
||||
// //评估问题创建接口
|
||||
// export const createResearch = (obj) =>
|
||||
// http.post("research/createResearch", obj);
|
||||
// //删除评估基础信息
|
||||
// export const deleteResearch = (obj) =>
|
||||
// http.post("research/deleteResearch", obj);
|
||||
// //评估信息发布状态的接口
|
||||
// export const editReleaseStatus = (obj) =>
|
||||
// http.post("research/editReleaseStatus", obj);
|
||||
// //修改评估问题的接口
|
||||
// export const editResearchMessage = (obj) =>
|
||||
// http.post("research/editResearchMessage", obj);
|
||||
// //根据ID查询评估基础信息详情
|
||||
// export const queryResearchDetailById = (obj) =>
|
||||
// http.post("research/queryResearchDetailById", obj);
|
||||
// //获取全部评估信息接口
|
||||
// export const queryResearchDetailList = (obj) =>
|
||||
// http.post("research/queryResearchDetailList", obj);
|
||||
|
||||
//评估问题创建接口
|
||||
export const createResearch = (obj) =>
|
||||
http.post("/assessment/createAssessment", obj);
|
||||
//删除评估基础信息
|
||||
export const deleteResearch = (obj) =>
|
||||
http.post("/assessment/deleteAssessment", obj, {
|
||||
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||
});
|
||||
//选择题删除题干或选项接口-修改时删除
|
||||
export const deleteChoiceQuestion = (obj) =>
|
||||
http.post("/assessment/deleteChoiceQuestion", obj);
|
||||
//问答题或评分题删除题干-修改时删除
|
||||
export const deleteQuestionScAndQa = (obj) =>
|
||||
http.post("/assessment/deleteQuestionScAndQa", obj);
|
||||
//修改评估问题的接口
|
||||
export const editResearchMessage = (obj) =>
|
||||
http.post("/assessment/editAssessmentMessage", obj);
|
||||
//评估信息编辑修改评估名称
|
||||
export const editAssessmentName = (obj) =>
|
||||
http.post("/assessment/editAssessmentName", obj);
|
||||
//评估信息发布状态的接口
|
||||
export const editReleaseStatus = (obj) =>
|
||||
http.post("/assessment/editReleaseStatus", obj);
|
||||
//根据ID查询评估基础信息详情
|
||||
export const queryResearchDetailById = (obj) =>
|
||||
http.post("/assessment/queryAssessmentDetailById", obj, {
|
||||
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||
});
|
||||
//获取全部评估信息接口
|
||||
export const queryResearchDetailList = (obj) =>
|
||||
http.post("/assessment/queryAssessmentDetailList", obj);
|
||||
//评估管理-管理-获取评估部分信息
|
||||
export const queryAssessmentDetailList = (obj) =>
|
||||
http.post("/assessment/queryAssessmentPartDetail", obj, {
|
||||
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||
});
|
||||
|
||||
/**
|
||||
* 2
|
||||
*/
|
||||
//创建评估信息
|
||||
// export const createAppraiseMessage = (obj) =>
|
||||
// http.post("/survey/createAppraiseMessage", { params: obj });
|
||||
// //删除评估信息
|
||||
// export const deleteAppraise = (obj) =>
|
||||
// http.post("/survey/deleteAppraise", { params: obj });
|
||||
// //查询评估信息
|
||||
// export const queryAppraiseDetailById = (obj) =>
|
||||
// http.post("/survey/queryAppraiseDetailById", { params: obj });
|
||||
// //修改评估信息
|
||||
// export const updateAppraiseMessage = (obj) =>
|
||||
// http.post("/survey/updateAppraiseMessage", { params: obj });
|
||||
|
||||
// //获取任务列表
|
||||
// export const getTask = (obj) =>
|
||||
// http.get(
|
||||
// "/admin/project/detail",
|
||||
// { params: obj },
|
||||
// {
|
||||
// headers: {
|
||||
// token: "123",
|
||||
// },
|
||||
// }
|
||||
// );
|
||||
|
||||
// createWorkTask({
|
||||
// createTime: "",
|
||||
// })
|
||||
// .then((res) => {
|
||||
// message.success(`添加成功${res}`);
|
||||
// ctx.emit("update:addhomeworkVisible", false);
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// message.error(`添加失败${err}`);
|
||||
// });
|
||||
14
src/api/indexStage.js
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-09 09:26:26
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-17 21:20:05
|
||||
* @FilePath: /fe-manage/src/api/indexStage.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import http from "./config";
|
||||
|
||||
//添加阶段
|
||||
export const editStage = (obj) => http.post('/admin/project/editStage', obj);
|
||||
// 删除阶段
|
||||
export const deleteStage = (obj) => http.delete('/admin/project/deleteStage',{params:obj});
|
||||
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 })
|
||||
14
src/api/indexTask.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import http from "./config";
|
||||
|
||||
|
||||
// 获取路径图详情-包含关卡及任务列表
|
||||
export const GetRouterDetail = (routerId) => http.get(`/admin/router/detail?routerId=${routerId}`)
|
||||
|
||||
// 新建或编辑阶段任务
|
||||
export const ProjectEditTask = (obj) => http.post('/admin/project/editTask',obj)
|
||||
// 新建或编辑关卡任务
|
||||
export const RouterEditTask = (obj) => http.post('/admin/router/editTask',obj)
|
||||
// 删除关卡任务
|
||||
export const RouterDeleteTask = (obj) => http.post('/admin/router/deleteTask',obj);
|
||||
// 删除项目任务
|
||||
export const ProjectDeleteTask = (obj) => http.delete('/admin/project/deleteTask',obj);
|
||||
28
src/api/indexTaskadd.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import http from "./config";
|
||||
//获取任务列表
|
||||
export const getTask = (obj) => http.get('/admin/project/detail', { params: obj })
|
||||
|
||||
//项目里的新建或编辑阶段任务
|
||||
export const addTask = (obj) => http.post('/admin/project/editTask', obj)
|
||||
|
||||
|
||||
//项目里的删除任务
|
||||
export const deleteTask = (obj) => http.delete('/admin/project/deleteTask', { params: obj })
|
||||
|
||||
//新建或编辑项目
|
||||
export const editProj = (obj) => http.post('/admin/project/edit', obj)
|
||||
|
||||
//路径图里的新建或编辑关卡任务
|
||||
export const editTask = (obj) => http.post('/admin/router/editTask', obj)
|
||||
|
||||
//项目里获取项目积分规则
|
||||
export const scoreRule = (obj) => http.get('/admin/project/scoreRule', { params: obj })
|
||||
|
||||
//项目里设置项目积分规则
|
||||
export const setScoreRule = (obj) => http.post('/admin/project/setScoreRule', obj)
|
||||
|
||||
//面授课开课列表
|
||||
export const planList = (obj) => http.post('/admin/offcourse/planList', obj)
|
||||
|
||||
//获取面授课列表
|
||||
export const list = (obj) => http.post('/admin/offcourse/list', obj)
|
||||
17
src/api/indexTemplate.js
Normal file
@@ -0,0 +1,17 @@
|
||||
// 模板相关接口
|
||||
import http from "./config";
|
||||
|
||||
//编辑项目模板
|
||||
export const templateEdit = (obj) => http.post('/admin/project/template/edit',obj);
|
||||
// 模板详情
|
||||
export const templateDetail = (id) => http.get(`/admin/project/template/edit?projectTemplateId=${id}`);
|
||||
// 删除阶段
|
||||
export const deleteStage = (id) => http.delete(`/admin/project/template/deleteStage`,{stageId:id});
|
||||
//删除任务
|
||||
export const deleteTask = (id) => http.delete(`/admin/project/template/deleteTask`,{projectTaskIds:id});
|
||||
// 移动任务到阶段
|
||||
export const moveTask = (obj) => http.post('/admin/project/template/moveTask',obj);
|
||||
// 新建或编辑阶段
|
||||
export const editStage = (obj) => http.post('/admin/project/template/editStage',obj);
|
||||
// 新建或编辑阶段任务
|
||||
export const editTask = (obj) => http.post('/admin/project/template/editTask',obj);
|
||||
83
src/api/indexVote.js
Normal file
@@ -0,0 +1,83 @@
|
||||
import http from "./config";
|
||||
import qs from 'qs';
|
||||
|
||||
|
||||
/**
|
||||
* 接口传参数方式(get)
|
||||
* axios.get('/user', {
|
||||
* params: {
|
||||
* id: 12345,
|
||||
* name: user
|
||||
* }
|
||||
* }).then(res => console.log(res))
|
||||
*
|
||||
* 接口传参三种方式(post/put/patch)
|
||||
*
|
||||
* 1.'Content-Type'= 'multipart/form-data',传参格式为 formData。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'multipart/form-data')
|
||||
* var formData=new FormData();
|
||||
* formData.append('user',123456);formData.append('pass',12345678);
|
||||
* axios.post("/notice",formData).then()
|
||||
*
|
||||
* 2.'Content-Type'= 'application/x-www-form-urlencoded',传参格式为 query 形式,使用$qs.stringify。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* let data = {"code":"1234","name":"yyyy"};
|
||||
* axios.post(`${this.$url}/test/testRequest`,qs.stringify({data})).then()
|
||||
*
|
||||
* 3.'Content-Type'= 'application/json,传参格式为 raw (JSON格式)。
|
||||
* (全局请求头:'Content-Type'= 'application/x-www-form-urlencoded')
|
||||
* (request的Header:'Content-Type'= 'application/json;charset=UTF-8')
|
||||
* let data = {"code":"1234","name":"yyyy"}
|
||||
* axios.post(`${this.$url}/test/testRequest`,data).then()
|
||||
*
|
||||
*/
|
||||
// , {
|
||||
// header: {
|
||||
// 'token': '123',
|
||||
// }
|
||||
// }
|
||||
|
||||
// 接口-请求
|
||||
|
||||
//基础票数上传接口
|
||||
export const baseVoteupload = (obj) => http.post('/vote/baseVoteupload', obj)
|
||||
|
||||
//创建题干信息接口
|
||||
export const createOptionMessage = (obj) => http.post('/vote/createOptionMessage', obj)
|
||||
|
||||
//投票信息创建接口
|
||||
export const createVote = (obj) => http.post('/vote/createVote', obj)
|
||||
|
||||
//删除投票信息
|
||||
export const deleteVoteMessage = (obj) => http.post('/vote/deleteVoteMessage', { params: obj })
|
||||
|
||||
//删除题干信息接口
|
||||
export const deleteVoteStem = (obj) => http.post('/vote/deleteVoteStem', { params: obj })
|
||||
|
||||
//删除题选项息接口
|
||||
export const deleteVoteStemOption = (obj) => http.post('/vote/deleteVoteStemOption', { params: obj })
|
||||
|
||||
//修改投票信息接口
|
||||
export const editVote = (obj) => http.post('/vote/editVote', obj)
|
||||
|
||||
//根据题干ID获取题干信息
|
||||
export const queryStemByStemId = (obj) => http.post('/vote/queryStemByStemId', obj,{
|
||||
headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'}
|
||||
})
|
||||
|
||||
//修改题干信息接口
|
||||
export const updateStemMessage = (obj) => http.post('/vote/updateStemMessage', obj);
|
||||
|
||||
//上传组件
|
||||
export const fileUp = (obj) => http.post('/file/upload', obj, qs.stringify({ obj }));
|
||||
|
||||
|
||||
// 测试方法
|
||||
// import * as api from '../../api/index'
|
||||
// api.getLearnPath({}).then(res => {
|
||||
// console.log(res)
|
||||
// }).catch(err => {
|
||||
// console.log(err)
|
||||
// })
|
||||
15
src/api/indexWork.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import http from "./config";
|
||||
// 创建作业信息接口
|
||||
export const createWorkTask = (obj) =>
|
||||
http.post("/work/createWorkTask", obj);
|
||||
// 删除作业信息接口
|
||||
export const deleteWorkTask = (obj) => http.post("/work/deleteWorkTask", obj);
|
||||
// 根据ID获取作业信息详情
|
||||
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);
|
||||
376
src/api/method.js
Normal file
@@ -0,0 +1,376 @@
|
||||
|
||||
function formatNumber(n) {
|
||||
n = n.toString();
|
||||
return n[1] ? n : "0" + n;
|
||||
}
|
||||
function toDate(number, format) {
|
||||
var formateArr = ["Y", "M", "D", "h", "m", "s"];
|
||||
var returnArr = [];
|
||||
|
||||
if (number === 0) {
|
||||
return 0;
|
||||
} else {
|
||||
var date = new Date(number * 1000);
|
||||
}
|
||||
returnArr.push(date.getFullYear());
|
||||
returnArr.push(formatNumber(date.getMonth() + 1));
|
||||
returnArr.push(formatNumber(date.getDate()));
|
||||
|
||||
returnArr.push(formatNumber(date.getHours()));
|
||||
returnArr.push(formatNumber(date.getMinutes()));
|
||||
returnArr.push(formatNumber(date.getSeconds()));
|
||||
|
||||
for (var i in returnArr) {
|
||||
format = format.replace(formateArr[i], returnArr[i]);
|
||||
}
|
||||
return format;
|
||||
}
|
||||
function getWeek(date) {
|
||||
//date:'Y-M-D'
|
||||
let time = new Date(date).getDay()
|
||||
let week;
|
||||
if (time == 0) week = "星期日"
|
||||
if (time == 1) week = "星期一"
|
||||
if (time == 2) week = "星期二"
|
||||
if (time == 3) week = "星期三"
|
||||
if (time == 4) week = "星期四"
|
||||
if (time == 5) week = "星期五"
|
||||
if (time == 6) week = "星期六"
|
||||
return week;
|
||||
}
|
||||
|
||||
/************************************将数字搞成带逗号的那种*********************************************/
|
||||
function autoComma(number) {
|
||||
// let number = parseInt(numb)
|
||||
if (number) {
|
||||
let newNum = ""; //中间变量
|
||||
let arr = [];
|
||||
let arr1 = [];
|
||||
let num = ""; //最终结果
|
||||
let isDecimal = false; //是不是小数
|
||||
let decimal = 0; //小数点所在位置
|
||||
let decimalNum = ""; //小数点和以后的数据
|
||||
let negative = false; //是不是负数
|
||||
// 判断百万级别或者上亿级别
|
||||
let thousand = false;
|
||||
let Billion = false;
|
||||
|
||||
if (
|
||||
(number >= 10000 || number <= -10000) &&
|
||||
number < 100000000 &&
|
||||
number > -100000000
|
||||
) {
|
||||
thousand = true;
|
||||
number = number / 10000;
|
||||
}
|
||||
if (number >= 100000000 || number <= -100000000) {
|
||||
thousand = false;
|
||||
Billion = true;
|
||||
number = number / 100000000;
|
||||
}
|
||||
|
||||
if (number < 0) {
|
||||
number = Math.abs(number);
|
||||
negative = true;
|
||||
}
|
||||
let numStr = JSON.stringify(number);
|
||||
// 如果传入的是小数,逗号的添加位置和整数是有区别滴
|
||||
for (let i = 0; i < numStr.length; i++) {
|
||||
if (numStr[i] === ".") {
|
||||
isDecimal = true;
|
||||
decimal = i;
|
||||
decimalNum = numStr.slice(decimal, numStr.length);
|
||||
// 保留两位小数
|
||||
if (decimalNum.length > 2) {
|
||||
decimalNum = decimalNum.slice(0, 3);
|
||||
}
|
||||
numStr = numStr.slice(0, decimal);
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < numStr.length; i++) {
|
||||
arr.push(numStr[numStr.length - i - 1]);
|
||||
}
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if ((i + 1) % 3 === 0 && i + 1 !== 0 && i + 1 < arr.length) {
|
||||
newNum += arr[i];
|
||||
newNum = newNum + ",";
|
||||
} else {
|
||||
newNum += arr[i];
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < newNum.length; i++) {
|
||||
arr1.push(newNum[newNum.length - i - 1]);
|
||||
}
|
||||
for (let i = 0; i < arr1.length; i++) {
|
||||
num += arr1[i];
|
||||
}
|
||||
if (isDecimal) {
|
||||
if (negative) {
|
||||
// num = '-' + num + decimalNum
|
||||
// return num
|
||||
if (thousand) {
|
||||
num = "-" + num + decimalNum + "万";
|
||||
return num;
|
||||
} else if (Billion) {
|
||||
num = "-" + num + decimalNum + "亿";
|
||||
return num;
|
||||
} else {
|
||||
num = "-" + num + decimalNum;
|
||||
return num;
|
||||
}
|
||||
} else {
|
||||
// num = num + decimalNum
|
||||
// return num
|
||||
if (thousand) {
|
||||
num = num + decimalNum + "万";
|
||||
return num;
|
||||
} else if (Billion) {
|
||||
num = num + decimalNum + "亿";
|
||||
return num;
|
||||
} else {
|
||||
num = num + decimalNum;
|
||||
return num;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (negative) {
|
||||
// num = '-' + num
|
||||
// return num
|
||||
if (thousand) {
|
||||
num = "-" + num + "万";
|
||||
return num;
|
||||
} else if (Billion) {
|
||||
num = "-" + num + "亿";
|
||||
return num;
|
||||
} else {
|
||||
num = "-" + num;
|
||||
return num;
|
||||
}
|
||||
} else {
|
||||
if (thousand) {
|
||||
num = num + "万";
|
||||
return num;
|
||||
} else if (Billion) {
|
||||
num = num + "亿";
|
||||
return num;
|
||||
} else {
|
||||
return num;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
const commonData={
|
||||
timeout:50
|
||||
}
|
||||
|
||||
|
||||
//组织树
|
||||
const organizationalTree= [
|
||||
{
|
||||
title: "京东方",
|
||||
value: "京东方",
|
||||
children: [
|
||||
{
|
||||
title: "产研部",
|
||||
value: "产研部",
|
||||
children: [
|
||||
{
|
||||
title: "产品部",
|
||||
value: "产品部",
|
||||
},
|
||||
{
|
||||
title: "研究部",
|
||||
value: "研究部",
|
||||
},
|
||||
{
|
||||
title: "研究部2",
|
||||
value: "研究部2",
|
||||
},
|
||||
{
|
||||
title: "研究3",
|
||||
value: "研究3",
|
||||
},
|
||||
{
|
||||
title: "研究4",
|
||||
value: "研究4",
|
||||
},
|
||||
{
|
||||
title: "研究部5",
|
||||
value: "研究部5",
|
||||
},
|
||||
{
|
||||
title: "研究部6",
|
||||
value: "研究部6",
|
||||
},
|
||||
{
|
||||
title: "研究部7",
|
||||
value: "研究部7",
|
||||
},
|
||||
{
|
||||
title: "研究部8",
|
||||
value: "研究部8",
|
||||
},
|
||||
{
|
||||
title: "研究部9",
|
||||
value: "研究部9",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "二级标题",
|
||||
value: "二级标题",
|
||||
children: [
|
||||
{
|
||||
title: "三级标题",
|
||||
value: "三级标题",
|
||||
children: [
|
||||
{
|
||||
title: "四级标题",
|
||||
value: "四级标题",
|
||||
children: [
|
||||
{
|
||||
title: "五级标题",
|
||||
value: "五级标题",
|
||||
children: [
|
||||
{
|
||||
title: "六级标题",
|
||||
value: "六级标题",
|
||||
children: [
|
||||
{
|
||||
title: "七级标题",
|
||||
value: "七级标题",
|
||||
children: [
|
||||
{
|
||||
title: "八级标题",
|
||||
value: "八级标题",
|
||||
children: [
|
||||
{
|
||||
title: "九级标题",
|
||||
value: "九级标题",
|
||||
children: [
|
||||
{
|
||||
title: "十级标题",
|
||||
value: "十级标题",
|
||||
children: [
|
||||
{
|
||||
title: "十一级标题",
|
||||
value: "十一级标题",
|
||||
children: [
|
||||
{
|
||||
title: "十二级标题",
|
||||
value: "十二级标题",
|
||||
children: [
|
||||
{
|
||||
title:
|
||||
"十三级标题十三级标题十三级标题十三级标题",
|
||||
value: "十三级标题",
|
||||
children: [
|
||||
{
|
||||
title:
|
||||
"十四级标题",
|
||||
value:
|
||||
"十四级标题",
|
||||
children: [
|
||||
{
|
||||
title:
|
||||
"十五级标题",
|
||||
value:
|
||||
"十五级标题",
|
||||
children: [
|
||||
{
|
||||
title:
|
||||
"十六级标题",
|
||||
value:
|
||||
"十六级标题",
|
||||
children:
|
||||
[
|
||||
{
|
||||
title:
|
||||
"十七级标题",
|
||||
value:
|
||||
"十七级标题",
|
||||
children:
|
||||
[
|
||||
{
|
||||
title:
|
||||
"十八级标题",
|
||||
value:
|
||||
"十八级标题",
|
||||
children:
|
||||
[
|
||||
{
|
||||
title:
|
||||
"十九级标题",
|
||||
value:
|
||||
"十九级标题",
|
||||
children:
|
||||
[
|
||||
{
|
||||
title:
|
||||
"二十级标题二十级标题",
|
||||
value:
|
||||
"二十级标题二十级标题",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "人力资源部",
|
||||
value: "人力资源部",
|
||||
children: [
|
||||
{
|
||||
title: "人事部",
|
||||
value: "人事部",
|
||||
},
|
||||
{
|
||||
title: "行政部",
|
||||
value: "行政部",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
export {
|
||||
toDate,
|
||||
getWeek,
|
||||
autoComma,
|
||||
commonData,
|
||||
organizationalTree,
|
||||
}
|
||||
51
src/api/storage.js
Normal file
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* 封装操作localstorage本地存储的方法
|
||||
*/
|
||||
export const storage = {
|
||||
//存储
|
||||
set(key, value) {
|
||||
localStorage.setItem(key, JSON.stringify(value))
|
||||
},
|
||||
//取出数据
|
||||
get(key) {
|
||||
const value = localStorage.getItem(key)
|
||||
if (value && value != "undefined" && value != "null") {
|
||||
return JSON.parse(value)
|
||||
}
|
||||
},
|
||||
// 删除数据
|
||||
remove(key) {
|
||||
localStorage.removeItem(key)
|
||||
},
|
||||
// 获取所有数据
|
||||
getAllStorage() {
|
||||
return JSON.parse(window.localStorage.getItem() || "{}")
|
||||
},
|
||||
// 删除所有数据
|
||||
removeAllLocalStorage() {
|
||||
window.localStorage.clear()
|
||||
return { message: "ok" }
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 封装操作sessionStorage本地存储的方法
|
||||
*/
|
||||
export const sessionStorage = {
|
||||
//存储
|
||||
set(key, value) {
|
||||
window.sessionStorage.setItem(key, JSON.stringify(value))
|
||||
},
|
||||
//取出数据
|
||||
get(key) {
|
||||
const value = window.sessionStorage.getItem(key)
|
||||
if (value && value != "undefined" && value != "null") {
|
||||
return JSON.parse(value)
|
||||
}
|
||||
return null
|
||||
},
|
||||
// 删除数据
|
||||
remove(key) {
|
||||
window.sessionStorage.removeItem(key)
|
||||
}
|
||||
}
|
||||
BIN
src/assets/images/basicinfo/add.png
Normal file
|
After Width: | Height: | Size: 787 B |
BIN
src/assets/images/basicinfo/asterisk.png
Normal file
|
After Width: | Height: | Size: 360 B |
BIN
src/assets/images/basicinfo/call.png
Normal file
|
After Width: | Height: | Size: 482 B |
BIN
src/assets/images/basicinfo/ch.png
Normal file
|
After Width: | Height: | Size: 521 B |
BIN
src/assets/images/basicinfo/check.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/images/basicinfo/close.png
Normal file
|
After Width: | Height: | Size: 695 B |
BIN
src/assets/images/basicinfo/close22.png
Normal file
|
After Width: | Height: | Size: 596 B |
BIN
src/assets/images/basicinfo/cloud.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
src/assets/images/basicinfo/download.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/assets/images/basicinfo/edit.png
Normal file
|
After Width: | Height: | Size: 362 B |
BIN
src/assets/images/basicinfo/exl.png
Normal file
|
After Width: | Height: | Size: 855 B |
BIN
src/assets/images/basicinfo/in.png
Normal file
|
After Width: | Height: | Size: 429 B |
BIN
src/assets/images/basicinfo/see.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/assets/images/courseManage/add0.png
Normal file
|
After Width: | Height: | Size: 610 B |
BIN
src/assets/images/courseManage/add1.png
Normal file
|
After Width: | Height: | Size: 782 B |
BIN
src/assets/images/courseManage/reset0.png
Normal file
|
After Width: | Height: | Size: 486 B |
BIN
src/assets/images/courseManage/reset1.png
Normal file
|
After Width: | Height: | Size: 598 B |
BIN
src/assets/images/courseManage/reset2.png
Normal file
|
After Width: | Height: | Size: 657 B |
BIN
src/assets/images/courseManage/search0.png
Normal file
|
After Width: | Height: | Size: 460 B |
BIN
src/assets/images/courseManage/search1.png
Normal file
|
After Width: | Height: | Size: 577 B |
BIN
src/assets/images/coursewareManage/QR.png
Normal file
|
After Width: | Height: | Size: 695 B |
BIN
src/assets/images/coursewareManage/add0.png
Normal file
|
After Width: | Height: | Size: 610 B |
BIN
src/assets/images/coursewareManage/add1.png
Normal file
|
After Width: | Height: | Size: 782 B |
BIN
src/assets/images/coursewareManage/asterisk.png
Normal file
|
After Width: | Height: | Size: 360 B |
BIN
src/assets/images/coursewareManage/close.png
Normal file
|
After Width: | Height: | Size: 695 B |
BIN
src/assets/images/coursewareManage/detail.png
Normal file
|
After Width: | Height: | Size: 311 B |
BIN
src/assets/images/coursewareManage/down.png
Normal file
|
After Width: | Height: | Size: 199 B |
BIN
src/assets/images/coursewareManage/enclosure.png
Normal file
|
After Width: | Height: | Size: 628 B |
BIN
src/assets/images/coursewareManage/export.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/images/coursewareManage/export1.png
Normal file
|
After Width: | Height: | Size: 372 B |
BIN
src/assets/images/coursewareManage/gan.png
Normal file
|
After Width: | Height: | Size: 352 B |
BIN
src/assets/images/coursewareManage/givepower.png
Normal file
|
After Width: | Height: | Size: 489 B |
BIN
src/assets/images/coursewareManage/grade.png
Normal file
|
After Width: | Height: | Size: 427 B |
BIN
src/assets/images/coursewareManage/graduate.png
Normal file
|
After Width: | Height: | Size: 600 B |
BIN
src/assets/images/coursewareManage/imgs.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/assets/images/coursewareManage/nostate.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/assets/images/coursewareManage/notice.png
Normal file
|
After Width: | Height: | Size: 508 B |
BIN
src/assets/images/coursewareManage/pc.png
Normal file
|
After Width: | Height: | Size: 317 B |
BIN
src/assets/images/coursewareManage/reset0.png
Normal file
|
After Width: | Height: | Size: 486 B |
BIN
src/assets/images/coursewareManage/reset1.png
Normal file
|
After Width: | Height: | Size: 598 B |
BIN
src/assets/images/coursewareManage/scht.png
Normal file
|
After Width: | Height: | Size: 501 B |
BIN
src/assets/images/coursewareManage/search0.png
Normal file
|
After Width: | Height: | Size: 460 B |
BIN
src/assets/images/coursewareManage/search1.png
Normal file
|
After Width: | Height: | Size: 577 B |
BIN
src/assets/images/coursewareManage/stum.png
Normal file
|
After Width: | Height: | Size: 469 B |
BIN
src/assets/images/coursewareManage/up.png
Normal file
|
After Width: | Height: | Size: 203 B |
BIN
src/assets/images/img.jpg
Normal file
|
After Width: | Height: | Size: 150 KiB |
BIN
src/assets/images/leveladd/1.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
src/assets/images/leveladd/2.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
src/assets/images/leveladd/3.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
src/assets/images/leveladd/add.png
Normal file
|
After Width: | Height: | Size: 781 B |
BIN
src/assets/images/leveladd/an.png
Normal file
|
After Width: | Height: | Size: 950 B |
BIN
src/assets/images/leveladd/back.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/assets/images/leveladd/ce.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
src/assets/images/leveladd/delete.png
Normal file
|
After Width: | Height: | Size: 302 B |
BIN
src/assets/images/leveladd/diao.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/assets/images/leveladd/done.png
Normal file
|
After Width: | Height: | Size: 391 B |
BIN
src/assets/images/leveladd/edit.png
Normal file
|
After Width: | Height: | Size: 368 B |
BIN
src/assets/images/leveladd/edit1.png
Normal file
|
After Width: | Height: | Size: 410 B |
BIN
src/assets/images/leveladd/gan.png
Normal file
|
After Width: | Height: | Size: 352 B |
BIN
src/assets/images/leveladd/huo.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/images/leveladd/in.png
Normal file
|
After Width: | Height: | Size: 429 B |
BIN
src/assets/images/leveladd/info.png
Normal file
|
After Width: | Height: | Size: 331 B |
BIN
src/assets/images/leveladd/kao.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
src/assets/images/leveladd/ma.png
Normal file
|
After Width: | Height: | Size: 595 B |
BIN
src/assets/images/leveladd/mian.png
Normal file
|
After Width: | Height: | Size: 1007 B |