firset submit
142
README.md
@@ -1,37 +1,105 @@
|
||||
### 3 分钟了解如何进入开发
|
||||
|
||||
欢迎使用 Codeup,通过阅读以下内容,你可以快速熟悉 Codeup ,并立即开始今天的工作。
|
||||
|
||||
### 提交**文件**
|
||||
|
||||
首先,你需要了解在 Codeup 中如何提交代码文件,跟着文档「[__提交第一行代码__](https://thoughts.teambition.com/sharespace/5d88b152037db60015203fd3/docs/5dc4f6786b81620014ef7574)」一起操作试试看吧。
|
||||
|
||||
### 开启扫描
|
||||
|
||||
开发过程中,为了更好的管理你的代码资产,Codeup 内置了「[__代码规约扫描__](https://thoughts.teambition.com/sharespace/5d88b152037db60015203fd3/docs/5dc4f68b6b81620014ef7588)」和「[__敏感信息检测__](https://thoughts.teambition.com/sharespace/5d88b152037db60015203fd3/docs/5dc4f6886b81620014ef7587)」服务,你可以在代码库设置-集成与服务中一键开启,开启后提交或合并请求的变更将自动触发扫描,并及时提供结果反馈。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### 代码评审
|
||||
|
||||
功能开发完毕后,通常你需要发起「[__代码合并和评审__](https://thoughts.teambition.com/sharespace/5d88b152037db60015203fd3/docs/5dc4f6876b81620014ef7585)」,Codeup 支持多人协作的代码评审服务,你可以通过「[__保护分支__](https://thoughts.teambition.com/sharespace/5d88b152037db60015203fd3/docs/5dc4f68e6b81620014ef758c)」策略及「[__合并请求设置__](https://thoughts.teambition.com/sharespace/5d88b152037db60015203fd3/docs/5dc4f68f6b81620014ef758d)」对合并过程进行流程化管控,同时提供 WebIDE 在线代码评审及冲突解决能力,让你的评审过程更加流畅。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### 编写文档
|
||||
|
||||
项目推进过程中,你的经验和感悟可以直接记录到 Codeup 代码库的「[__文档__](https://thoughts.teambition.com/sharespace/5d88b152037db60015203fd3/docs/5e13107eedac6e001bd84889)」内,让智慧可视化。
|
||||
|
||||

|
||||
|
||||
### 成员协作
|
||||
|
||||
是时候邀请成员一起编写卓越的代码工程了,请点击右上角「成员」邀请你的小伙伴开始协作吧!
|
||||
|
||||
### 更多
|
||||
|
||||
Git 使用教学、高级功能指引等更多说明,参见[__Codeup帮助文档__](https://thoughts.teambition.com/sharespace/5d88b152037db60015203fd3/docs/5dc4f6756b81620014ef7571)。
|
||||
# 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'
|
||||
]
|
||||
}
|
||||
5
docker/Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM devforth/spa-to-http:latest
|
||||
WORKDIR /
|
||||
|
||||
ADD ./dist/ .
|
||||
EXPOSE 8080
|
||||
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"
|
||||
]
|
||||
}
|
||||
}
|
||||
22375
package-lock.json
generated
Normal file
78
package.json
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
"name": "fe_manage",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"build:boe": "vue-cli-service build --mode boe",
|
||||
"build:release": "vue-cli-service build --mode release",
|
||||
"build:prod": "vue-cli-service build --mode prod",
|
||||
"build:test": "vue-cli-service build --mode test",
|
||||
"build:alpine": "vue-cli-service build --mode alpine"
|
||||
},
|
||||
"dependencies": {
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"ant-design-vue": "^3.2.12",
|
||||
"axios": "^1.1.3",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"core-js": "^3.8.3",
|
||||
"dayjs": "^1.11.6",
|
||||
"echarts": "^5.4.1",
|
||||
"element-plus": "^2.2.17",
|
||||
"element-resize-detector": "^1.2.4",
|
||||
"exceljs": "^4.3.0",
|
||||
"html2canvas": "^1.4.1",
|
||||
"jquery": "^3.6.1",
|
||||
"json-bigint": "^1.0.0",
|
||||
"mitt": "^3.0.0",
|
||||
"moment": "^2.29.4",
|
||||
"qrcode.vue": "^3.3.3",
|
||||
"qs": "^6.11.0",
|
||||
"sortablejs": "^1.15.0",
|
||||
"vue": "^3.2.13",
|
||||
"vue-cookies": "^1.8.2",
|
||||
"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,
|
||||
"vue/setup-compiler-macros": 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: 25 KiB |
29
public/index.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<!--
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-09 09:26:26
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-12-10 15:22:22
|
||||
* @FilePath: /fe-manage/public/index.html
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<!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>京东方大学堂</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>
|
||||
196
src/App.vue
Normal file
@@ -0,0 +1,196 @@
|
||||
<template>
|
||||
<div id="container" v-if="!isLogin">
|
||||
<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>
|
||||
<div id="container" v-if="isLogin">
|
||||
<router-view/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref, onMounted} from "vue";
|
||||
import {useStore, createStore} from "vuex";
|
||||
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";
|
||||
import * as api1 from "@/api/index1";
|
||||
import * as api2 from "@/api/index";
|
||||
import {boeRequest} from "@/api/request";
|
||||
import {USER_PERMISSION} from "@/api/ThirdApi";
|
||||
|
||||
const store = useStore();
|
||||
const isLogin = ref(false);
|
||||
|
||||
console.log("版本3.0.3------------");
|
||||
|
||||
|
||||
|
||||
// 监听关闭浏览器
|
||||
let time1 = ref(0);
|
||||
let time2 = ref(0);
|
||||
|
||||
onMounted(() => {
|
||||
init()
|
||||
window.addEventListener('beforeunload', e => beforeunloadHandler(e));
|
||||
window.addEventListener('unload', e => unloadHandler(e));
|
||||
})
|
||||
|
||||
//添加监听事件
|
||||
function beforeunloadHandler() {
|
||||
time1.value = new Date().getTime();
|
||||
}
|
||||
|
||||
function init() {
|
||||
getUserInfo();
|
||||
getUserPermission();
|
||||
initDict("content_type"); //内容分类
|
||||
initDict("project_level"); //项目级别
|
||||
initDict("project_sys"); //培训分类
|
||||
initDict("project_pic"); //项目封面
|
||||
initDict("router_pic"); //路径图封面
|
||||
initDict("course_pic"); //课程封面
|
||||
initDict("job_type"); //岗位
|
||||
initDict("band"); //band
|
||||
}
|
||||
|
||||
function unloadHandler() {
|
||||
time2.value = new Date().getTime() - time1.value;
|
||||
if (time2.value <= 5) {
|
||||
store.replaceState(createStore({state: {openpages: null}}).state);
|
||||
localStorage.removeItem("openpages");
|
||||
}
|
||||
}
|
||||
|
||||
async function getUserInfo() {
|
||||
const userInfo = await api2.userInfo();
|
||||
store.commit("SET_USER", userInfo.data.data);
|
||||
}
|
||||
|
||||
async function initDict(key) {
|
||||
const list = await getDictList(key);
|
||||
store.commit("SET_DICT", {key, data: list});
|
||||
}
|
||||
|
||||
function getUserPermission(){
|
||||
boeRequest(USER_PERMISSION,{permissionType:'PAGE'}).then(res=>{
|
||||
store.commit("SET_PERMISSION", res.result.flatMap(t=>t?.permissionPageList.map(s=>s.url)));
|
||||
})
|
||||
}
|
||||
|
||||
const getDictList = (param) => api1.getDictTree({code: param,}).then((res) => res.data.data);
|
||||
</script>
|
||||
<style lang="scss">
|
||||
#app {
|
||||
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%;
|
||||
}
|
||||
|
||||
.ant-table-wrapper {
|
||||
.ant-table-content {
|
||||
.ant-table-thead th {
|
||||
background-color: #eff4fc !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
}
|
||||
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-btn-link {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
.cus-btn {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 16px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
background: #4ea6ff;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.white {
|
||||
// background: #fff;
|
||||
// color: #4ea6ff;
|
||||
}
|
||||
|
||||
.cus-input {
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.cus-select {
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
// @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>
|
||||
15
src/api/ThirdApi.js
Normal file
@@ -0,0 +1,15 @@
|
||||
//学员列表带分页
|
||||
export const USER_LIST_PAGE = "/userbasic/user/list post";
|
||||
//学员列表 没有分页数据 只能通过名称检索 速度较快
|
||||
export const USER_LIST = "/userbasic/user/searchList post";
|
||||
export const ORG_LIST = "/userbasic/org/list post";
|
||||
export const ORG_CHILD_LIST = "/userbasic/org/info post";
|
||||
// export const AUDIENCE_LIST = '/userbasic/audience/list post'
|
||||
//当前用户可以查看的受众接口
|
||||
export const AUDIENCE_LIST = "/userbasic/audience/userAudiencesFilter post";
|
||||
export const USER_PERMISSION = "/userbasic/permission/listByUser post";
|
||||
export const CASE_PAGE = "/systemapi/xboe/m/boe/cases/pagelist post formData";
|
||||
export const EXAM_PAPER_PAGE = "/systemapi/xboe/m/exam/paper/querylist post formData";
|
||||
export const TEST_PAGE = "/api/b1/system/quiz/quiz-list post formData";
|
||||
export const ONLINE_PAGE = "/systemapi/xboe/m/course/manage/pagelist post formData";
|
||||
export const ONLINE_COURSE_DEL = (id, courseId) => `/systemapi/xboe/school/study/course/delete-signup?id=${id}&couserId=${courseId} post`;
|
||||
25
src/api/apis.js
Normal file
@@ -0,0 +1,25 @@
|
||||
export const STUDENT_LIST = "/admin/student/getStudent";
|
||||
export const TASK_STUDENT_LIST = "/admin/student/getTaskStudent";
|
||||
export const ONLINE_COURSE_PAGE = "/onlineClasses/queryOnlineList";
|
||||
export const ASSESSMENT_PAGE = "/assessment/queryAssessmentDetailList post";
|
||||
export const PROJECT_AUDIT_PAGE = "/admin/project/auditedlistV2 post";
|
||||
export const ROUTER_DETAIL_MODIFY = "/admin/router/routerInfoTemp post";
|
||||
export const PROJECT_DETAIL_MODIFY = "/admin/project/projectInfoTemp post";
|
||||
export const PROJECT_TEMPLATE_DETAIL_MODIFY = "/admin/project/template/editStageAndTask post";
|
||||
export const PROJECT_RELEASE = "/admin/project/realease";
|
||||
export const ASYNC_STUDENT_STATUS = "/admin/cache/getStudentAsyncStatus";
|
||||
export const ONLINE_COURSE_TEACHER = "/admin/offcourse/getTeacherNamesByCourseId";
|
||||
//开课列表
|
||||
export const COURSE_PLAN_PAGE = "/admin/offcourse/planList post";
|
||||
//开课所有列表
|
||||
export const COURSE_PLAN_LIST = "/admin/offcourse/allPlanList post";
|
||||
//开课保存/编辑
|
||||
export const COURSE_PLAN_EDIT = "/admin/offcourse/editPlan post";
|
||||
//删除开课
|
||||
export const DEL_PLAN = id => `/admin/offcourse/deletePlan?offcoursePlanId=${id} delete`;
|
||||
//作业详情
|
||||
export const WORK_DETAIL = workId => `/work/queryWorkDetailById?workId=${workId} post`;
|
||||
//考试
|
||||
export const EXAM_DETAIL = examinationId => `/examination/queryExaminationDetailById?examinationId=${examinationId} post`;
|
||||
//评估
|
||||
export const ASSESSMENT_DETAIL = (assessmentId)=>`/assessment/queryAssessmentDetailById?assessmentId=${assessmentId} post`;
|
||||
81
src/api/config.js
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-21 14:32:52
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2023-01-04 13:49:54
|
||||
* @FilePath: /fe-manage/src/api/config.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import {message} from "ant-design-vue";
|
||||
import axios from "axios";
|
||||
import router from "@/router";
|
||||
// import { getCookie } from '../api/method'
|
||||
// const Qs = require("qs");
|
||||
|
||||
// axios.defaults.headers.post["Content-Type"] =
|
||||
// "application/x-www-form-urlencoded";
|
||||
export const FILE_UPLOAD_URL = process.env.VUE_APP_BASE_API + '/file/upload'
|
||||
export const BATCH_IMPORT_SCORE = process.env.VUE_APP_BASE_API + '/admin/offcourse/batchImportScore'
|
||||
axios.defaults.withCredentials = true;
|
||||
const http = axios.create({
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
timeout: 1000 * 15,
|
||||
// headers: { "Content-Type": "multipart/form-data" },
|
||||
headers: {"Content-Type": "application/json"},
|
||||
});
|
||||
|
||||
http.interceptors.request.use(
|
||||
(config) => {
|
||||
// console.log("config", config);
|
||||
// const token = localStorage.getItem("token");
|
||||
// // const token = getCookie('token')
|
||||
// // console.log('token', token)
|
||||
// if (token) {
|
||||
// config.headers.token = token; //测试1111
|
||||
// } else {
|
||||
// console.log("当前请求页面无token,请执行操作!!!");
|
||||
|
||||
// // 此处测试默认配置token
|
||||
// config.headers.token =
|
||||
// "eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NzAxNTMxMDMsImV4cCI6MTY3MDE2MDMwMywiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjZCMDQ5RkFGLUMzMTQtN0NDRi0wRDI4LTBEMjNGNEM0MjUzMSIsInVJZCI6Ijk2NTM0MjAyNzQ5NzYwNzE2OCIsInBlcm1pc3Npb24iOiIifQ==.c937b2d3a59cbab2136fdde55fd38f06bdff041212aab0fa6741bc4be41e28a7";
|
||||
// // }
|
||||
return config;
|
||||
},
|
||||
(err) => {
|
||||
console.log("登陆前拦截", err);
|
||||
return Promise.reject(err);
|
||||
}
|
||||
);
|
||||
|
||||
http.interceptors.response.use(
|
||||
(response) => {
|
||||
// console.log('response', response)
|
||||
const {
|
||||
data: {code, msg ,show},
|
||||
} = response;
|
||||
if (code === 0 || code === 200) {
|
||||
return response;
|
||||
}
|
||||
if (code === 1000) {
|
||||
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ?
|
||||
router.push({path: 'login', query: { returnUrl: router.currentRoute.value.fullPath }}) :
|
||||
(window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath))
|
||||
// TODO token过期后退出登录 清空当前用户标记 - 为了刷新页面使用
|
||||
localStorage.removeItem('refreshPage')
|
||||
return Promise.reject(response);
|
||||
}
|
||||
show ? message.error(msg):message.error('系统接口数据异常,请联系管理员');
|
||||
console.log("api %o", msg);
|
||||
return Promise.reject(response);
|
||||
},
|
||||
function (error) {
|
||||
if (error.message == "timeout of 1ms exceeded") {
|
||||
message.destroy();
|
||||
message.error("请求超时");
|
||||
}
|
||||
console.log("api error %o", error);
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
export default http;
|
||||
70
src/api/confign.js
Normal file
@@ -0,0 +1,70 @@
|
||||
|
||||
import {message} from "ant-design-vue";
|
||||
import axios from "axios";
|
||||
import router from "@/router";
|
||||
import Cookies from 'vue-cookies'
|
||||
// import { getCookie } from '../api/method'
|
||||
// const Qs = require("qs");
|
||||
|
||||
// axios.defaults.headers.post["Content-Type"] =
|
||||
// "application/x-www-form-urlencoded";
|
||||
// export const FILE_UPLOAD_URL = process.env.VUE_APP_BASE_API + '/file/upload'
|
||||
// export const BATCH_IMPORT_SCORE = process.env.VUE_APP_BASE_API + '/admin/offcourse/batchImportScore'
|
||||
axios.defaults.withCredentials = true;
|
||||
const http = axios.create({
|
||||
baseURL: '/userbasic',
|
||||
timeout: 1000 * 15,
|
||||
headers: {"Content-Type": "application/json",},
|
||||
});
|
||||
|
||||
http.interceptors.request.use(
|
||||
(config) => {
|
||||
const token = Cookies.get("token")
|
||||
if (token) {
|
||||
config.headers.token = token; //测试1111
|
||||
} else{
|
||||
message.error('未获取到登录信息,请先登录')
|
||||
}
|
||||
return config;
|
||||
},
|
||||
(err) => {
|
||||
console.log("登陆前拦截", err);
|
||||
return Promise.reject(err);
|
||||
}
|
||||
);
|
||||
|
||||
http.interceptors.response.use(
|
||||
(response) => {
|
||||
// console.log('response', response)
|
||||
const {
|
||||
data: {code},
|
||||
} = response;
|
||||
if (code === 0 || code === 200) {
|
||||
return response.data?response.data:response;
|
||||
}
|
||||
if(code==500){
|
||||
return message.error('请求失败');
|
||||
}
|
||||
if(code==601){
|
||||
message.error('token过期请重新登陆');
|
||||
}
|
||||
if (code === 1000) {
|
||||
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: 'login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL)
|
||||
return Promise.reject(response);
|
||||
}
|
||||
// show && message.error(msg);
|
||||
// console.log("api %o", msg);
|
||||
// return Promise.reject(response);
|
||||
return response
|
||||
},
|
||||
function (error) {
|
||||
if (error.message == "timeout of 1ms exceeded") {
|
||||
message.destroy();
|
||||
message.error("请求超时");
|
||||
}
|
||||
console.log("api error %o", error);
|
||||
return message.error(error.message);
|
||||
}
|
||||
);
|
||||
|
||||
export default http;
|
||||
72
src/api/configz.js
Normal file
@@ -0,0 +1,72 @@
|
||||
|
||||
import {message} from "ant-design-vue";
|
||||
import axios from "axios";
|
||||
import router from "@/router";
|
||||
import Cookies from 'vue-cookies'
|
||||
// import { getCookie } from '../api/method'
|
||||
// const Qs = require("qs");
|
||||
|
||||
// axios.defaults.headers.post["Content-Type"] =
|
||||
// "application/x-www-form-urlencoded";
|
||||
// export const FILE_UPLOAD_URL = process.env.VUE_APP_BASE_API + '/file/upload'
|
||||
// export const BATCH_IMPORT_SCORE = process.env.VUE_APP_BASE_API + '/admin/offcourse/batchImportScore'
|
||||
axios.defaults.withCredentials = true;
|
||||
const http = axios.create({
|
||||
baseURL: '/report',
|
||||
timeout: 1000 * 15,
|
||||
// headers: { "Content-Type": "multipart/form-data" },
|
||||
headers: {"Content-Type": "application/json"},
|
||||
});
|
||||
|
||||
http.interceptors.request.use(
|
||||
(config) => {
|
||||
const token = Cookies.get("token")
|
||||
if (token) {
|
||||
config.headers.token = token; //测试1111
|
||||
} else{
|
||||
message.error('未获取到登录信息,请先登录')
|
||||
}
|
||||
return config;
|
||||
},
|
||||
(err) => {
|
||||
console.log("登陆前拦截", err);
|
||||
return Promise.reject(err);
|
||||
}
|
||||
);
|
||||
|
||||
http.interceptors.response.use(
|
||||
(response) => {
|
||||
// console.log('response', response)
|
||||
const {
|
||||
data: {code},
|
||||
} = response;
|
||||
// console.log('code', response)
|
||||
if (code === 0 || code === 200) {
|
||||
return response.data?response.data:response;
|
||||
}
|
||||
if(code==500){
|
||||
return message.error('请求失败');
|
||||
}
|
||||
if(code==601){
|
||||
message.error('token过期请重新登陆');
|
||||
}
|
||||
if (code === 1000) {
|
||||
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: 'login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL)
|
||||
return Promise.reject(response);
|
||||
}
|
||||
// show && message.error(msg);
|
||||
// console.log("api %o", msg);
|
||||
// return Promise.reject(response);
|
||||
return response
|
||||
},
|
||||
function (error) {
|
||||
if (error.message == "timeout of 1ms exceeded") {
|
||||
message.destroy();
|
||||
message.error("请求超时");
|
||||
}
|
||||
console.log("api error %o", error);
|
||||
return message.error(error.message);
|
||||
}
|
||||
);
|
||||
|
||||
export default http;
|
||||
81
src/api/index.js
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-07 17:06:45
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-21 16:39:00
|
||||
* @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 projectStudentCount = (obj) => http.get('/admin/student/getStudentCount', {params: 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)
|
||||
//获取模版详细信息
|
||||
export const getTemplateDetail = (obj) => http.get('/admin/project/template/detail', {params: obj})
|
||||
|
||||
//获取项目统计
|
||||
export const getProjectCount = (projectId) => http.get('/admin/project/projectCount', {params: {projectId: projectId}})
|
||||
|
||||
export const login = (obj) => http.post('/admin/CheckUser/userLogin', obj)
|
||||
export const userInfo = () => http.get('/admin/CheckUser/userInfo')
|
||||
|
||||
242
src/api/index1.js
Normal file
@@ -0,0 +1,242 @@
|
||||
/*
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-04 22:45:31
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2023-02-13 23:09:53
|
||||
* @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";
|
||||
// import { getCookie } from '../api/method'
|
||||
/**
|
||||
* 接口传参数方式(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 getLearnCount = (routerId) =>
|
||||
http.get("/admin/router/getCount", { params: { routerId: routerId } });
|
||||
|
||||
//新建或编辑关卡
|
||||
export const editChapter = (obj) => http.post("/admin/router/editChapter", obj);
|
||||
// 编辑路径图设置
|
||||
export const setConfig = (obj) => http.post("/admin/router/setConfig", obj);
|
||||
//获取学员列表
|
||||
export const getStudent = (obj) => http.post("/admin/router/studentList", obj);
|
||||
//获取路径图详情-包含关卡及任务列表
|
||||
export const getRouterDetail = (routerId, useTask) =>
|
||||
http.get("/admin/router/detail", {
|
||||
params: {
|
||||
routerId: routerId,
|
||||
useTask: useTask
|
||||
},
|
||||
});
|
||||
//添加学员
|
||||
export const addStudent = (obj) => http.post("/admin/router/addStudent", obj);
|
||||
//删除学员
|
||||
export const delStudent = (obj) =>
|
||||
http.post("/admin/router/deleteStudent", obj);
|
||||
|
||||
// 获取学员路径图进度明细
|
||||
export const stuProgress = (params) => http.get('/admin/router/detail', { params });
|
||||
export const stuRouterProgress = (params) => http.get('/admin/router/stuDetail', { params });
|
||||
// export const stuProgress = (obj) =>http.post("/admin/router/studentProcess", obj);
|
||||
|
||||
//编辑学习路径基本信息
|
||||
export const editLearnInfo = (obj) => http.post('/admin/router/editInfo', obj)
|
||||
|
||||
|
||||
//项目基础信息-----------------------------------
|
||||
//项目积分榜单
|
||||
// export const scoreRank = (obj) => http.post("/admin/project/scoreRank", obj);
|
||||
export const scoreRank = (params) => http.get('/points/top/list', { params })
|
||||
// 项目进度排行
|
||||
export const completionRank = (params) => http.get('/stu/project/rank_list/completion_list', { params })
|
||||
// 项目学时排行榜
|
||||
export const studytimeRank = (params) => http.get('/stu/project/rank_list/study_time_list', { params })
|
||||
//排行榜
|
||||
export const billboard = (obj) => http.post("/admin/project/billboard", obj);
|
||||
//项目基础信息-----------------------------------
|
||||
|
||||
|
||||
//课程----------------------------------------------
|
||||
|
||||
// //提交审核
|
||||
// export const courseHandle = (obj) => http.post('/admin/offcourse/handle', obj)
|
||||
|
||||
//课程----------------------------------------------
|
||||
|
||||
//公共信息---------------------------------------------------
|
||||
// 获取字典信息
|
||||
export const getDict = (obj) => http.post('/dict/getList', obj)
|
||||
export const getDictTree = (params) => http.get('/dict', { params })
|
||||
//获取组织树一级列表
|
||||
export const getOrgTree = (obj) => http.post('/admin/router/orgList', obj)
|
||||
//根据id获取组织树一级元素下所有子元素
|
||||
export const orgTreeList = (obj) => http.post('/admin/router/orgTreeList', obj)
|
||||
//根据id获取部门下学员
|
||||
export const searchUsersByOrgId = (obj) => http.post('/admin/router/searchUsersByOrgId', obj)
|
||||
|
||||
//获取组织信息(修改版)
|
||||
export const getOrgInfo = (obj) => http.post('/admin/orgStruct/getOrgInfo', obj)
|
||||
export const getOrgTreeInfo = (obj) => http.get('/org/initOrg', { params: obj })
|
||||
//获取员工(修改版)
|
||||
export const getMemberInfo = (obj) => http.post('/admin/orgStruct/getMemberInfo', obj)
|
||||
//获取受众(修改版)
|
||||
export const getAudienceInfo = (obj) => http.post('/admin/orgStruct/getAudienceInfo', obj)
|
||||
//获取、添加授权(修改版)
|
||||
export const optionAuthPerm = (obj) => http.post('/admin/AuthPerm/optionAuthPerm', obj)
|
||||
//获取学员列表
|
||||
export const getStuList = (obj) => http.post('/admin/orgStruct/getStudentRef', obj)
|
||||
//获取用户登录
|
||||
export const getUser = () => http.post('/admin/CheckUser/login', { withCredentials: true })
|
||||
//公共信息---------------------------------------------------
|
||||
|
||||
//添加项目学员
|
||||
export const addStudentProject = (obj) => http.post('/admin/project/addStudent', obj)
|
||||
//添加课程学员
|
||||
export const addStudentCourse = (obj) => http.post("/admin/offcourse/addStudent", obj);
|
||||
|
||||
// 获取组织结构树
|
||||
export const orgtree = () => http.get("/org/tree");
|
||||
export const saveStu = obj => http.post("/admin/student/addStudent", obj);
|
||||
export const getAllStudentByProjectId = obj => http.get("/admin/student/getAllStudentByProjectId", { params: obj });
|
||||
export const moveStudent = obj => http.post("/admin/student/moveStudent", obj);
|
||||
export const getStuPage = obj => http.get("/admin/student/getStudent", { params: obj });
|
||||
export const delStudentList = obj => http.post("/admin/student/delStudent", obj);
|
||||
export const validateName = obj => http.post("/admin/validate/validateName", obj);
|
||||
|
||||
//获取积分列表
|
||||
export const noticeList = (projectId) =>
|
||||
http.post(
|
||||
`/admin/project/noticeList?projectId=` +
|
||||
projectId +
|
||||
``
|
||||
);
|
||||
|
||||
// 测试方法
|
||||
// import * as api from '../../api/index'
|
||||
// api.getLearnPath({}).then(res => {
|
||||
// console.log(res)
|
||||
// }).catch(err => {
|
||||
// console.log(err)
|
||||
// })
|
||||
|
||||
// export const choiceEvaluation = (obj) => http.post('/evaluation/choiceEvaluation', obj);
|
||||
|
||||
|
||||
// 获取任务学员的信息
|
||||
export const AssessmentManagementMessage = (obj) => http.get(`/admin/student/getTaskStudent`, { params: obj })
|
||||
|
||||
// 导出任务学员信息
|
||||
export const exportTaskStudent = (obj) => http.post('/admin/student/exportTaskStudent', obj)
|
||||
//导出任务作业
|
||||
export const exportHomeWork = (obj) => http.get('/admin/student/exportHomeWork', { params: obj })
|
||||
//导出任务作业模板
|
||||
export const exportHomeWorkTemplate = (obj) => http.get('/admin/student/exportHomeWorkTemplate', { params: obj })
|
||||
//签到
|
||||
export const attendanceSign = (obj) => http.post('/stu/task/attendance/sign', obj)
|
||||
//请假
|
||||
export const attendanceLeave = (obj) => http.post('/stu/task/attendance/leave', obj)
|
||||
|
||||
//批量标记完成
|
||||
export const batchFinishTask = (obj) => http.post('/admin/student/batchFinishTask', obj)
|
||||
//批量更新学员状态
|
||||
export const batchUpdateStatus = (obj) => http.post('/admin/student/batchUpdateStatus', obj)
|
||||
export const auditStudentBatch = (obj) => http.post('/admin/student/auditStudentBatch', obj)
|
||||
// //面授课批量导入成绩
|
||||
export const batchImportScore = (obj) =>
|
||||
http.post('/admin/student/importHomeWork', obj, {
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
});
|
||||
//数据导入状态
|
||||
export const getImportStatus = (uuid) => http.get('/admin/student/getImportStatus', { params: { uuid: uuid } })
|
||||
|
||||
//导出作业
|
||||
// export const exportHomeWork=(obj)=>http.get('admin/student/exportHomeWork',{params:obj})
|
||||
|
||||
// 面授课导入学员
|
||||
export const FaceTeachImportStudent = (obj) => http.post('/admin/student/importStudent', obj, { headers: { "Content-Type": "multipart/form-data" } })
|
||||
//成绩录入
|
||||
export const updateStudent = (obj) => http.post('/admin/student/homeWorkScoreEntry', obj)
|
||||
|
||||
|
||||
//获取证书列表
|
||||
export const certificate = (obj) => http.get('/admin/certificate/page', { params: obj })
|
||||
//添加证书
|
||||
export const saveupdatecertificate = (obj) => http.post('/admin/certificate/saveOrUpdate', obj)
|
||||
//删除证书
|
||||
export const certificatedel = (obj) => http.get('/admin/certificate/del', { params: obj })
|
||||
//证书详情
|
||||
export const certificatedetail = (obj) => http.get('/admin/certificate/get', { params: obj })
|
||||
//获取阶段列表
|
||||
export const getStageList = (obj) => http.get('/admin/project/getStageList', { params: obj })
|
||||
//获取任务列表
|
||||
export const getTaskList = (obj) => http.get('/admin/project/getTaskList', { params: obj })
|
||||
//查看证书学员列表
|
||||
export const stuCertList = (obj) => http.get('/admin/certificate/stuCertList', { params: obj })
|
||||
//更新学员证书
|
||||
export const cancelOrAuth = (obj) => http.post('/admin/certificate/cancelOrAuth', obj)
|
||||
//获取项目总积分
|
||||
export const allPoints = (obj) => http.get('/points/project/allPoints', { params: obj })
|
||||
export const updateStuCert = (obj) => http.post('/admin/certificate/updateStuCert', obj)
|
||||
|
||||
//添加外部考试
|
||||
export const createExamination = (obj) => http.post('/examination/createExamination', obj)
|
||||
//催促考试
|
||||
export const batchSendMessage = (obj) => http.post('/admin/taskmanage/batchSendMessage', obj)
|
||||
// 外部考试导入成绩
|
||||
export const ImportExternalExamScore = (obj) => http.post('/admin/external/exam/manage/importExternalExamScore', obj, { headers: { "Content-Type": "multipart/form-data" } })
|
||||
//分组
|
||||
export const changeGroupByStudentId = (obj) => http.post('/admin/student/changeGroupByStudentId', obj)
|
||||
//导入小组
|
||||
export const importGroup = (uuid) => http.post('/admin/studentGroup/importGroup/{pid}', { params: { uuid: uuid } })
|
||||
//添加小组学员
|
||||
export const addGroupMember = (obj) => http.post('/admin/studentGroup/addGroupMember', obj)
|
||||
//获取小组成员
|
||||
export const groupMemberList = (obj) => http.post('/admin/studentGroup/groupMemberList', obj)
|
||||
//删除小组成员
|
||||
export const delGroupStudent = (obj) => http.post('/admin/studentGroup/delStudent', obj)
|
||||
//随机分组
|
||||
export const randomGroup = (obj, projectId) => http.post(`/admin/studentGroup/randomGroup/${projectId}`, obj)
|
||||
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 });
|
||||
49
src/api/indexAudit.js
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-12-13 09:24:38
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2023-01-30 10:50:28
|
||||
* @FilePath: /fe-manage/src/api/indexAudit.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import http from "./config";
|
||||
|
||||
//获取待审核面授课列表
|
||||
export const list = (obj) => http.post('/admin/offcourse/listToBeReviewed', obj)
|
||||
// export const list = (obj) => http.post('/admin/offcourse/list', obj)
|
||||
|
||||
//获取待审核项目列表
|
||||
export const projlist = (obj) => http.post('/admin/project/list', obj)
|
||||
|
||||
//获取项目审核日志
|
||||
export const auditlist = (obj) => http.post('/admin/project/auditlist', obj)
|
||||
|
||||
//获取已审核项目列表
|
||||
export const auditedlist = (obj) => http.post('/admin/project/auditedlist', obj)
|
||||
|
||||
//获取已审核项目列表
|
||||
export const listView = (obj) => http.post('/admin/project/listView', obj)
|
||||
|
||||
//获取面授课已审核列表
|
||||
export const courseListView = (obj) => http.post('/admin/offcourse/listReview', obj)
|
||||
|
||||
//获取面授课详情
|
||||
export const courseDetail = (offcourseId) => http.post(`/admin/offcourse/detail?offcourseId=${offcourseId}`)
|
||||
|
||||
// 面授课转审邀请接口
|
||||
export const inviteAudit = (obj) => http.post('/admin/offcourse/inviteAudit', obj)
|
||||
|
||||
//项目审核日志
|
||||
export const auditList = (obj) => http.post('/admin/project/auditList', obj)
|
||||
|
||||
//项目审核
|
||||
export const auditView = (obj) => http.post('/admin/project/auditView', obj)
|
||||
|
||||
//面授课审核
|
||||
export const courseAuditView = (obj) => http.post('/admin/offcourse/auditView', obj)
|
||||
|
||||
//项目修改记录
|
||||
export const editRecord = (chooseProject) => http.get(`/modifyRecord/page?id=${chooseProject}&type=1&size=2`)
|
||||
|
||||
// 面授课的修改记录
|
||||
export const editCourseRecord = (chooseCourse) => http.get(`/modifyRecord/page?id=${chooseCourse}&type=2&size=100`)
|
||||
4
src/api/indexCase.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import http from "./config";
|
||||
|
||||
//获取案例信息
|
||||
export const queryCasesDetailList = (obj) => http.post("/cases/queryCasesDetailList", obj);
|
||||
62
src/api/indexCourse.js
Normal file
@@ -0,0 +1,62 @@
|
||||
import http from "./config";
|
||||
|
||||
/**
|
||||
* 1
|
||||
*/
|
||||
//1添加课程学员
|
||||
export const addStudent = (obj) =>
|
||||
http.post("/admin/offcourse/addStudent", obj);
|
||||
//2面授课审核?
|
||||
export const auditView = (obj) => http.post("/admin/offcourse/auditView", obj);
|
||||
//3删除开课
|
||||
export const deletePlan = (obj) =>
|
||||
http.delete(
|
||||
"/admin/offcourse/deletePlan",
|
||||
{ params: obj },
|
||||
{
|
||||
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||
}
|
||||
);
|
||||
//4获取面授课详情
|
||||
export const detail = (obj) =>
|
||||
http.post("/admin/offcourse/detail", obj, {
|
||||
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||
});
|
||||
//5获取面授课开课详情
|
||||
export const detailPlan = (obj) =>
|
||||
http.post("/admin/offcourse/detailPlan", obj, {
|
||||
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
||||
});
|
||||
//6新建或编辑面授课
|
||||
export const edit = (obj) => http.post("/admin/offcourse/edit", obj);
|
||||
//7新建或编辑面授课开课
|
||||
export const editPlan = (obj) => http.post("/admin/offcourse/editPlan", obj);
|
||||
export const copyCoursePlan = (params) => http.get("/admin/offcourse/copyCoursePlan", {params});
|
||||
export const copyCourse = (params) => http.get("/admin/offcourse/copyCourse", {params});
|
||||
//8课程导出
|
||||
export const exportP = (obj) => http.post("/admin/offcourse/export", obj);
|
||||
//9操作面授课(发布,撤回,删除,审核,停用)
|
||||
export const handle = (obj) => http.post("/admin/offcourse/handle", obj);
|
||||
//10学员操作-支持批量
|
||||
export const handleStudent = (obj) =>
|
||||
http.post("/admin/offcourse/handleStudent", obj);
|
||||
//11获取面授课列表
|
||||
export const list = (obj) => http.post("/admin/offcourse/list", obj);
|
||||
//12获取面授课已审核列表?
|
||||
export const listReview = (obj) =>
|
||||
http.post("/admin/offcourse/listReview", obj);
|
||||
//13面授课开课列表
|
||||
export const planList = (obj) => http.post("/admin/offcourse/planList", obj);
|
||||
//14学员导出
|
||||
export const studentExport = (obj) =>
|
||||
http.post("/admin/offcourse/studentExport", obj);
|
||||
//15获取学员列表
|
||||
export const studentList = (obj) =>
|
||||
http.post("/admin/offcourse/studentList", obj);
|
||||
//16学习记录列表?
|
||||
export const studyRecordList = (obj) =>
|
||||
http.post("/admin/offcourse/studyRecordList", obj);
|
||||
|
||||
// 获取员工信息
|
||||
export const getMemberInfoApi = (obj) =>
|
||||
http.post("/admin/orgStruct/getMemberInfo", 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)
|
||||
103
src/api/indexEval.js
Normal file
@@ -0,0 +1,103 @@
|
||||
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 baseVoteupload = (data) =>
|
||||
http.post("/vote/baseVoteupload", 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 queryEvaluationMessageById = (obj) =>
|
||||
http.post("/evaluation/queryEvaluationMessageById", 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",
|
||||
},
|
||||
});
|
||||
27
src/api/indexExam.js
Normal file
@@ -0,0 +1,27 @@
|
||||
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 queryUserAnswerDetail = (id) => http.get(`/examination/updateExamination?aloneId=${id}`);
|
||||
// 查询用户答卷列表-三方
|
||||
export const queryUserAnswerPageDetailList = (obj) => http.post('/examination/queryUserAnswerPageDetailList', obj);
|
||||
// 获取试卷列表接口-三方
|
||||
export const queryExaminationPaperList = (obj) => http.post('/examination/queryExaminationPaperList', obj);
|
||||
// 考试列表查询接三方
|
||||
export const queryExaminationList = (obj) => http.post('/examination/queryExaminationList', obj);
|
||||
// 获取考试任务列表的接口-三方
|
||||
export const queryExaminationAloneExtendList = (obj) => http.post('/examination/queryExaminationAloneExtendList', obj);
|
||||
// 对接三方考试任务保存接口-三方
|
||||
export const examinationTaskSave = (obj) => http.post('/examination/examinationTaskSave', obj);
|
||||
//编辑考试信息
|
||||
export const updateExamination = (obj) => http.post('/examination/updateExamination', obj);
|
||||
//编辑外部考试信息
|
||||
export const updateExternalExam = (obj) => http.post('/external/exam/updateExternalExam', obj);
|
||||
39
src/api/indexExternalChain.js
Normal file
@@ -0,0 +1,39 @@
|
||||
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.get('/link/getOne', {params: obj})
|
||||
|
||||
// 更新外链数据
|
||||
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'
|
||||
}
|
||||
})
|
||||
7
src/api/indexFace.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import http from "./config";
|
||||
|
||||
//获取面授课开课详情
|
||||
export const queryFaceDetailById = (offcoursePlanId) => http.post(`/admin/offcourse/detailPlan?offcoursePlanId=` + offcoursePlanId + ``)
|
||||
|
||||
//新建或编辑面授课开课
|
||||
export const editPlan = (obj) => http.post('/admin/offcourse/editPlan', obj)
|
||||
60
src/api/indexInvist.js
Normal file
@@ -0,0 +1,60 @@
|
||||
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()
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// 接口-请求
|
||||
|
||||
//创建评估
|
||||
|
||||
|
||||
//根据ID获取评估信息详情
|
||||
export const queryAppraiseDetailById = (obj) => http.post('/assessment/queryAssessmentDetailById', obj,{
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
}
|
||||
})
|
||||
|
||||
//获取全部评估信息接口
|
||||
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)
|
||||
// })
|
||||
15
src/api/indexLearningPath.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import http from "./config";
|
||||
|
||||
// 获取路径图概览
|
||||
export const getRouterOverview = (routerId) => http.get(`/admin/router/overview?routerId=${routerId}`)
|
||||
|
||||
//新建或编辑路径图
|
||||
export const editRoutered = (obj) => http.post('/admin/router/edit', obj)
|
||||
export const editRouterModel = (obj) => http.post('/admin/router/editModel', obj)
|
||||
export const editProjectModel = (obj) => http.post('/admin/project/editModel', obj)
|
||||
|
||||
// 路径图模式修改接口
|
||||
export const editRouteredModel = (obj) => http.post('/admin/router/editModel', obj)
|
||||
|
||||
// 新建或编辑路径图共享文档
|
||||
export const editRouteredDoc = (obj) => http.post('/admin/router/editShareRouter', obj)
|
||||
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);
|
||||
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)
|
||||
13
src/api/indexNotice.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import http from "./config";
|
||||
|
||||
//获取公告列表
|
||||
// export const noticeList = (projectId) => http.post('/admin/project/noticeList', {
|
||||
// params: {
|
||||
// projectId: projectId,
|
||||
// }
|
||||
// });
|
||||
export const noticeList = (obj) => http.post('/admin/project/noticeList', obj)
|
||||
|
||||
//发布项目公告
|
||||
export const publishNotice = (obj) => http.post('/admin/project/publishNotice', obj)
|
||||
|
||||
18
src/api/indexOnline.js
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-07 17:06:45
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-21 16:39:00
|
||||
* @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';
|
||||
|
||||
|
||||
// 接口-请求
|
||||
//查询在线课信息列表接口
|
||||
export const queryOnlinelList = (obj) => http.post('/onlineClasses/queryOnlineClassesDetailList', obj)
|
||||
|
||||
|
||||
|
||||
29
src/api/indexOvervoew.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import http from "./configz";
|
||||
import https from './confign'
|
||||
// 导出案例接口
|
||||
// export const boeuCaseExport = (obj,options) => http.get('/boeu/case/export', { params: obj },options)
|
||||
|
||||
//概览页面考试列表请求接口
|
||||
export const boeuExamPageList = (obj) => http.post('/boeu/exam/pageList', obj)
|
||||
//概览页面案例列表请求接口
|
||||
export const boeuCasePageList = (obj) => http.post('/boeu/case/pageList', obj)
|
||||
// 请求组织接口
|
||||
export const userGetUserOrg = (obj) => https.post('/user/getUserOrg', obj)
|
||||
// 请求所属组织接口
|
||||
export const userInfo = (obj) => https.post('/user/info', obj)
|
||||
// 课程列表接口
|
||||
export const boeuCoursePageList = (obj) => http.post('/boeu/course/pageList', obj)
|
||||
// 授课列表
|
||||
export const boeuTeachingPageList = (obj) => http.post('/boeu/teaching/pageList', obj)
|
||||
// 学习路径图页面
|
||||
export const boeuRoterPageList = (obj) => http.post('/boeu/router/pageList', obj)
|
||||
// 项目列表
|
||||
export const boeuProjectPageList = (obj) => http.post('/boeu/project/pageList', obj)
|
||||
// 学习数据列表
|
||||
export const boeuStudyDataPageList = (obj) => http.post('/boeu/studyData/pageList', obj)
|
||||
// 概览页面 tab头数据
|
||||
export const boeuAllTotal = (obj) => http.get('/boeu/all/total', obj)
|
||||
// 路径图列表
|
||||
export const boeuRouterPlatePageList = (obj) => http.post('/boeu/routerPlate/pageList', obj)
|
||||
// 案例列表
|
||||
export const boeuCasePlatePageList = (obj) => http.post('/boeu/case/pageList', obj)
|
||||
51
src/api/indexProjStu.js
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-18 14:09:43
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2023-02-11 18:55:44
|
||||
* @FilePath: /fe-manage/src/api/indexProjStu.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
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 removeGroupStudent = (obj) => http.post('/admin/project/removeGroupStudent', obj)
|
||||
//查看学员
|
||||
// export const studentProcess = (obj) => http.get('/admin/project/studentProcess', { params: obj })
|
||||
export const studentProcess = (obj) => http.get('/admin/project/detail', { params: obj })
|
||||
export const projectStudentProcess = (obj) => http.get('/admin/project/stuDetail', { params: obj })
|
||||
export const projectStudentRank = (obj) => http.get('/admin/project/studentRank', { params: obj })
|
||||
export const routerStudentRank = (obj) => http.get('/admin/router/studentRank', { params: obj })
|
||||
|
||||
//是否优秀学员
|
||||
export const topStudent = (obj) => http.post('/admin/project/topStudent', obj)
|
||||
export const updateStudent = (obj) => http.post('/admin/student/updateStudent', obj)
|
||||
export const auditStudentStatus = (obj) => http.post('/admin/student/auditStudent', 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)
|
||||
//获取组员名单
|
||||
export const groupMemberList = (obj) => http.post('/admin/studentGroup/groupMemberList', obj)
|
||||
22
src/api/indexProject.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import http from "./configz";
|
||||
import https from './confign'
|
||||
// 请求组织接口
|
||||
export const userGetUserOrg = (obj) => https.post('/user/getUserOrg', obj)
|
||||
// 请求所属组织接口
|
||||
export const userInfo = (obj) => https.post('/user/info', obj)
|
||||
// 项目列表
|
||||
export const boeuProjectPageList = (obj) => http.post('/boeu/project/pageList', obj)
|
||||
// 文章列表
|
||||
export const boeuArticlePageList = (obj) => http.post('/boeu/article/pageList', obj )
|
||||
// 课程分页列表
|
||||
export const boeuCourseListPageV2 = (obj) => http.post('/boeu/course/List/page/v2', obj )
|
||||
// 考试列表分页
|
||||
export const boeuExamPageListV2 = (obj) => http.post('/boeu/exam/pageList/v2', obj )
|
||||
// 问答分页列表
|
||||
export const boeuQuestionPageList= (obj) => http.post('/boeu/question/pageList', obj )
|
||||
//柱状体左侧获取数据接口
|
||||
export const dataStatisticsSelectV1= (obj) => http.post('/data/statistics/select/v1', obj )
|
||||
//柱状体右侧获取数据接口
|
||||
export const dataStatisticsSelectV2= (obj) => http.post('/data/statistics/select/v2', obj )
|
||||
// 图表2 学习情况数据接口
|
||||
export const boeuStudyDataGetStudyStaisticsList= (obj) => http.post('/boeu/studyData/getStudyStatisticsList', 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});
|
||||
13
src/api/indexStu.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import http from "./config";
|
||||
|
||||
/**
|
||||
* 1
|
||||
*/
|
||||
//获取受众信息
|
||||
// export const getAudienceInfoApi = (obj) => http.post("/admin/orgStruct/getAudienceInfo", obj);
|
||||
//获取员工信息
|
||||
export const getMemberInfoApi = (obj) =>
|
||||
http.post("/admin/orgStruct/getMemberInfo", obj);
|
||||
//获取所有组织
|
||||
export const getOrgInfoApi = (obj) =>
|
||||
http.post("/admin/orgStruct/getOrgInfo", 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 })
|
||||
31
src/api/indexTask.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import http from "./config";
|
||||
|
||||
|
||||
// 获取路径图详情-包含关卡及任务列表
|
||||
export const GetRouterDetail = (routerId="") => http.get(`/admin/router/detail?routerId=${routerId}`)
|
||||
export const GetRouterDraftDetail = (routerId="") => http.get(`/admin/router/detailDraft?routerId=${routerId}`)
|
||||
//
|
||||
export const changeChapterSort = (list) => http.post("/admin/router/changeChapterSort",list)
|
||||
|
||||
export const changeTasklistSort = (list) => http.post("/admin/router/changeTasklistSort",list)
|
||||
// 新建或编辑阶段任务
|
||||
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);
|
||||
// 发布路径下的全部关卡和任务
|
||||
export const releaseRouter = (obj)=> http.get(`/admin/router/release?routerId=${obj}`);
|
||||
|
||||
export const cancelRouterTask = (routerId)=>http.get(`/admin/router/cancelTask?routerId=${routerId}`);
|
||||
// 判断当前在线课是否已经添加到该路径图下
|
||||
export const IsExistence = (obj) => http.post('/admin/router/queryTaskDoesItExist',obj);
|
||||
// 判断当前在线课是否已经添加到该项目下
|
||||
export const IsExistenceProject = (obj) => http.post('/admin/project/queryTaskDoesItExistForProject',obj);
|
||||
// 判断当前在线课是否已经添加到该模板库下
|
||||
export const IsExistenceProjectTemplate = (obj) => http.post('/admin/project/template/queryTaskDoesItExistForTemplate',obj);
|
||||
|
||||
// 新建外部考试
|
||||
export const CreateExternalExam = (obj) => http.post('/external/exam/createExternalExam',obj);
|
||||
51
src/api/indexTaskManage.js
Normal file
@@ -0,0 +1,51 @@
|
||||
import http from "./config";
|
||||
|
||||
|
||||
|
||||
// 获取考试管理的信息
|
||||
export const ExamManagementMessage = (obj) => http.post('/admin/exam/manage/queryExamManagementMessage', obj)
|
||||
|
||||
// 获取评估管理的信息
|
||||
export const AssessmentManagementMessage = (obj) => http.get(`/admin/student/getTaskStudent`, { params: obj })
|
||||
|
||||
// 考试导出学员信息
|
||||
export const ExportExam = (obj) => http.post('/admin/exam/manage/exportExam', obj)
|
||||
|
||||
// 获取在线管理的信息
|
||||
export const QueryOnlineManagementDetail = (obj) => http.post('/admin/online/manage/queryOnlineManagementDetail', obj)
|
||||
|
||||
// 获取 课程库-面授管理-管理-学习记录 信息
|
||||
export const GetCourseStudent = (obj) => http.get('/admin/student/getCourseStudent', {params: obj})
|
||||
|
||||
// 查询评估管理-管理学员的学习信息
|
||||
export const QueryAssessmentManageMessage = (obj) => http.post('/admin/assessment/manage/queryAssessmentManageMessage', obj)
|
||||
|
||||
// 评估管理评估详情查看
|
||||
export const QueryAssessmentDetail = (obj) => http.post('/admin/assessment/manage/queryAssessmentDetail', obj)
|
||||
|
||||
// 下载中心
|
||||
export const DownLoadList = (obj) => http.get('/admin/download/page', {params: obj})
|
||||
|
||||
// 下载中心容量查询
|
||||
export const DownLoadTotalSize = (obj) => http.get('/admin/download/totalSize', {params: obj})
|
||||
|
||||
// 下载中心删除
|
||||
export const RemoveDownLoadHomeWork = (obj) => http.get('/admin/download/del', {params: obj})
|
||||
|
||||
// 获取投票管理的信息
|
||||
export const QueryVoteManagementDetail = (obj) => http.post('/admin/vote/manage/queryVoteManagementDetail', obj)
|
||||
|
||||
// 根据投票任务Id获取投票任务信息
|
||||
export const QueryVoteTaskDetailById = (obj) => http.post('/voteSubmit/queryVoteTaskDetailById', obj)
|
||||
|
||||
// 直播考勤请假
|
||||
export const AttendanceLeave = (obj) => http.post('/stu/task/attendance/leave', obj)
|
||||
|
||||
// 直播考勤签到
|
||||
export const AttendanceSign = (obj) => http.post('/stu/task/attendance/sign', obj)
|
||||
|
||||
// 查询项目管理的信息
|
||||
export const QueryProjectManageDetail = (obj) => http.post('/project/management/queryProjectManageDetail', obj)
|
||||
|
||||
// 获取外部考试信息的接口
|
||||
export const QueryExternalExamManageDetail = (obj) => http.post('/admin/external/exam/manage/queryExternalExamManageDetail', obj)
|
||||
37
src/api/indexTaskadd.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import http from "./config";
|
||||
//获取任务列表
|
||||
export const getTask = (obj) => http.get('/admin/project/detail', { params: obj })
|
||||
export const getDraftTask = (obj) => http.get('/admin/project/detailDraft', { params: obj })
|
||||
|
||||
//项目里的新建或编辑阶段任务
|
||||
export const addTask = (obj) => http.post('/admin/project/editTask', obj)
|
||||
|
||||
//模板库项目里的新建或编辑阶段任务
|
||||
export const addTaskTemplate = (obj) => http.post('/admin/project/template/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 editProjs = (obj) => http.post('/admin/project/editStatus', obj)
|
||||
//编辑项目共享文档
|
||||
export const editProjDoc = (obj) => http.post('/admin/project/editShareAttach', obj)
|
||||
|
||||
//路径图里的新建或编辑关卡任务
|
||||
export const editTask = (obj) => http.post('/admin/router/editTask', obj)
|
||||
|
||||
//项目里获取项目积分规则
|
||||
export const scoreRule = (obj) => http.get('/points/project/rule', { params: obj })
|
||||
|
||||
//项目里设置项目积分规则
|
||||
export const setScoreRule = (obj) => http.post('/points/project/rule/edit', obj)
|
||||
|
||||
//面授课开课列表
|
||||
export const planList = (obj) => http.post('/admin/offcourse/planList', obj)
|
||||
|
||||
//获取面授课列表
|
||||
export const list = (obj) => http.post('/admin/offcourse/list', obj)
|
||||
|
||||
export const addTempTask = (obj) => http.post('/admin/project/template/editTask', obj)
|
||||
25
src/api/indexTemplate.js
Normal file
@@ -0,0 +1,25 @@
|
||||
// 模板相关接口
|
||||
import http from "./config";
|
||||
|
||||
//编辑项目模板
|
||||
export const templateEdit = (obj) => http.post('/admin/project/template/edit', obj);
|
||||
// 模板详情
|
||||
export const templateDetail = (id) => http.get(`/admin/project/template/detail?projectTemplateId=${id}`);
|
||||
export const templateEditDetail = (id) => http.get(`/admin/project/template/detailEdit?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);
|
||||
// 操作模板(撤回,发布,删除)
|
||||
export const handleTemplates = (obj) => http.post('/admin/project/template/handle', obj);
|
||||
// 模板库列表
|
||||
export const templateList = (obj) => http.post(`/admin/project/template/list`, obj);
|
||||
// 发布项目公告
|
||||
export const publishNotice = (obj) => http.post(`/admin/project/template/publishNotice`, obj);
|
||||
|
||||
19
src/api/indexTest.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import http from "./config";
|
||||
|
||||
|
||||
//创建考试信息接口
|
||||
export const createExamination = (obj) => http.post('/examination/createExamination',obj);
|
||||
//根据Id删除考试信息
|
||||
export const deleteExaminationById = (obj) => http.post('/examination/deleteExaminationById',{params:obj});
|
||||
//根据ID获取考试信息详情
|
||||
export const queryExaminationDetailById = (obj) => http.post('/examination/queryExaminationDetailById',{params:obj});
|
||||
//获取考试试卷
|
||||
// export const queryExaminationPaper = (obj) => http.post('/examination/queryExaminationPaper',obj);
|
||||
export const queryExaminationPaper = (obj) => http.post('/examination/queryExaminationPaperList',obj);
|
||||
//修改考试信息接口
|
||||
export const updateExamination = (obj) => http.post('/examination/updateExamination',obj,{
|
||||
header:{
|
||||
'token': '123',
|
||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
}
|
||||
});
|
||||
94
src/api/indexVote.js
Normal file
@@ -0,0 +1,94 @@
|
||||
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, {
|
||||
headers: {
|
||||
token: "123",
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
//创建题干信息接口
|
||||
export const createStemMessage = (obj) =>
|
||||
http.post("/vote/createOrUpdateVote", obj);
|
||||
|
||||
//投票信息创建接口
|
||||
export const createVote = (obj) => http.post("/vote/createOrUpdateVote", obj);
|
||||
|
||||
//删除投票信息
|
||||
export const deleteVoteMessage = (obj) =>
|
||||
http.post("/vote/deleteVoteMessage", { params: obj });
|
||||
|
||||
//删除题干信息接口
|
||||
export const deleteVoteStem = (voteStemId) =>
|
||||
http.post(`/vote/deleteVoteStem?voteStemId=${voteStemId}`);
|
||||
|
||||
//删除题选项息接口
|
||||
export const deleteVoteStemOption = (optionId) =>
|
||||
http.post(`/vote/deleteVoteStemOption?optionId=${optionId}`);
|
||||
|
||||
//修改投票信息接口
|
||||
export const editVote = (obj) => http.post("/vote/editVote", obj);
|
||||
|
||||
//根据题干ID获取题干信息
|
||||
export const queryStemByStemId = (voteId) =>
|
||||
http.get(`/vote/queryVoteById?voteId=${voteId}`);
|
||||
|
||||
//修改题干信息接口
|
||||
export const updateStemMessage = (obj) =>
|
||||
http.post("/vote/updateStemMessage", obj);
|
||||
|
||||
//上传组件
|
||||
export const fileUp = (obj) =>
|
||||
http.post("/file/upload", obj, qs.stringify({ obj }));
|
||||
//根据题干ID获取投票任务
|
||||
export const queryVoteDetailById = (voteID) =>
|
||||
http.get(`/vote/queryVoteById?voteId=${voteID}`);
|
||||
|
||||
// 测试方法
|
||||
// import * as api from '../../api/index'
|
||||
// api.getLearnPath({}).then(res => {
|
||||
// console.log(res)
|
||||
// }).catch(err => {
|
||||
// console.log(err)
|
||||
// })
|
||||
6
src/api/indexWay.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import http from "./configz";
|
||||
import https from './confign'
|
||||
// 请求组织接口
|
||||
export const userGetUserOrg = (obj) => https.post('/user/getUserOrg', obj)
|
||||
// 路径图列表
|
||||
export const boeuRouterPlatePageList = (obj) => http.post('/boeu/routerPlate/pageList', obj)
|
||||
25
src/api/indexWork.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-17 21:25:14
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2023-01-30 11:32:33
|
||||
* @FilePath: /fe-manage/src/api/indexWork.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
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);
|
||||
//查看作业
|
||||
export const getWorkSubmitInfo = (workId, stuId) => http.get(`/admin/student/getWorkSubmitInfo?id=${workId}&stuId=${stuId}`)
|
||||
304
src/api/method.js
Normal file
@@ -0,0 +1,304 @@
|
||||
import * as api from './index1'
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
//节流
|
||||
function throttle(fn, delay = 200) {
|
||||
var timer = null;
|
||||
return function () {
|
||||
console.log('throttle')
|
||||
var context = this, args = arguments;
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(function () {
|
||||
fn.apply(context, args);
|
||||
}, delay);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//滚动加载信息
|
||||
const scrollLoad = (e) => {
|
||||
// console.log("滚动", e, b);
|
||||
const { target } = e;
|
||||
const scrllHeight = target.scrollHeight - target.scrollTop;
|
||||
const clientHeight = target.clientHeight;
|
||||
// console.log("scrllHeight", scrllHeight, clientHeight);
|
||||
if (scrllHeight === 0 && clientHeight === 0) {
|
||||
return 1
|
||||
} else if (scrllHeight - clientHeight == 0) {
|
||||
return 2
|
||||
}
|
||||
};
|
||||
|
||||
//添加归属权
|
||||
function changeOwnership(classify, selectProjectId, selectPeopleArr) {
|
||||
let obj = {
|
||||
keyWord: "",
|
||||
tag: 2, //归属权
|
||||
opt: 3, //修改
|
||||
type:
|
||||
classify === "project"
|
||||
? 2
|
||||
: classify === "learnPath"
|
||||
? 1
|
||||
: classify === "course"
|
||||
? 3
|
||||
: null,
|
||||
refId: selectProjectId, //项目id
|
||||
// refId: 64,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
// studentList: state.selectPeopleArr,
|
||||
deptList: [],
|
||||
groupList: [],
|
||||
studentList: selectPeopleArr,
|
||||
};
|
||||
console.log("修改归属权obj", obj);
|
||||
api
|
||||
.optionAuthPerm(obj)
|
||||
.then((res) => {
|
||||
console.log("修改授权成功", res);
|
||||
// closeDrawer();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("修改授权失败", err);
|
||||
});
|
||||
}
|
||||
|
||||
//name 字段名 value 字段值 perpetual 有效期
|
||||
const setCookie = (name, value, perpetual) => {
|
||||
console.log('存储token到cookie')
|
||||
let exdate = new Date()
|
||||
exdate.setDate(perpetual * 24 * 60 * 60 * 1000) //exdate.setDate(exdate.getDate() + 365)
|
||||
document.cookie = `${name}=${value};expires=${exdate.toGMTString()};path=/`
|
||||
//永久有效
|
||||
//document.cookie = name + '=' + value + ';expires=' + 'Fri, 31 Dec 9999 23:59:59 GMT'
|
||||
}
|
||||
//获取cookie数据
|
||||
//先写一个方法
|
||||
export function getCookieForName(name) {
|
||||
const cookie = document.cookie?.split(";").find(e => e.includes(name))?.replace(`${name}=`, '') || '';
|
||||
return decodeURIComponent(cookie);
|
||||
}
|
||||
|
||||
function getCookie(name) {
|
||||
//1.获取cookie字符串
|
||||
var cookies = document.cookie;
|
||||
//通过;来分割字符串
|
||||
var cookie = cookies.split("; ");
|
||||
// console.log('cookie', cookie)
|
||||
//遍历,使键值对匹配上
|
||||
for (var i = 0; i < cookie.length; i++) {
|
||||
var arr = cookie[i].split("token=");
|
||||
// console.log('arr', arr)
|
||||
console.log('name', name)
|
||||
// if (arr[0] == name) {
|
||||
// console.log('arr[1]', arr[1])
|
||||
// return arr[1];
|
||||
// }
|
||||
// console.log('arr[1]', arr[1])
|
||||
return arr[1]
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
//新建延迟
|
||||
const commonData = {
|
||||
timeout: 50,
|
||||
}
|
||||
// const organizationalTree = [// ]
|
||||
|
||||
//组织树
|
||||
const organizationalTree = []
|
||||
|
||||
//嵌套页面
|
||||
const iframeUrl = window.location.protocol + process.env.VUE_APP_IFRAME_URL
|
||||
//学员端路由
|
||||
const studentUrl = window.location.protocol + process.env.VUE_APP_IFRAME_STUDENT_URL
|
||||
const teacherUrl = window.location.protocol + process.env.VUE_APP_IFRAME_TEACHER_URL
|
||||
|
||||
//二维码
|
||||
const codeUrl = window.location.protocol + "//u-pre.boe.com"
|
||||
export {
|
||||
throttle,
|
||||
toDate,
|
||||
getWeek,
|
||||
autoComma,
|
||||
formatNumber,
|
||||
setCookie,
|
||||
getCookie,
|
||||
scrollLoad,
|
||||
changeOwnership,
|
||||
commonData,
|
||||
organizationalTree,
|
||||
iframeUrl,
|
||||
studentUrl,
|
||||
teacherUrl,
|
||||
codeUrl,
|
||||
}
|
||||
365
src/api/request.js
Normal file
@@ -0,0 +1,365 @@
|
||||
import {isRef, reactive, ref, toRefs, unref, watch, watchEffect} from "vue";
|
||||
import {getCookieForName, throttle} from "@/api/method";
|
||||
import JSONBigInt from "json-bigint";
|
||||
import router from "@/router";
|
||||
import {message} from "ant-design-vue";
|
||||
|
||||
const JSONBigIntStr = JSONBigInt({ storeAsString: true });
|
||||
|
||||
export function useBoeApiAuditPage(_url, params = {}) {
|
||||
return useBoeApiPage(_url, params, {
|
||||
init: true,
|
||||
result: (res) => res.result.audienceList.map((e) => ({ ...e, id: e.id + "" })),
|
||||
totalPage: (res) => res.result.totalPage,
|
||||
total: (res) => res.result.totalElement,
|
||||
});
|
||||
}
|
||||
|
||||
export function useBoeApiUserInfoPage(_url, params = {}) {
|
||||
return useBoeApiPage(_url, params, {
|
||||
init: false,
|
||||
result: (res) => res.result.userInfoList,
|
||||
totalPage: (res) => res.result.totalPage,
|
||||
total: (res) => res.result.totalElement,
|
||||
});
|
||||
}
|
||||
|
||||
export function useBoeApiPage(_url, params = {}, config = {
|
||||
init: true,
|
||||
result: res => res.result,
|
||||
totalPage: res => res.result.totalPage,
|
||||
total: res => res.result.totalElement
|
||||
}) {
|
||||
|
||||
const state = reactive({
|
||||
data: [],
|
||||
loading: false,
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
totalPage: 0,
|
||||
total: 0
|
||||
});
|
||||
|
||||
if (isRef(params)) {
|
||||
watch(params.value, () => {
|
||||
fetch();
|
||||
});
|
||||
}
|
||||
|
||||
if (isRef(_url)) {
|
||||
watchEffect(fetch);
|
||||
} else {
|
||||
fetch();
|
||||
}
|
||||
|
||||
function fetch() {
|
||||
state.loading = true;
|
||||
return boeRequest(unref(_url), unref(params)).then(r => {
|
||||
state.data = config.result(r);
|
||||
state.totalPage = config.totalPage(r);
|
||||
state.total = config.total(r);
|
||||
state.loading = false;
|
||||
state.page = params.page;
|
||||
});
|
||||
}
|
||||
|
||||
function reset() {
|
||||
state.data = [];
|
||||
state.loading = false;
|
||||
state.page = 1;
|
||||
state.totalPage = 0;
|
||||
state.total = 0;
|
||||
}
|
||||
|
||||
config.init && fetch();
|
||||
return {
|
||||
...toRefs(state),
|
||||
fetch,
|
||||
reset
|
||||
};
|
||||
}
|
||||
|
||||
export function useBoeApi(_url, params = {}, config = {
|
||||
init: true,
|
||||
result: res => res.result,
|
||||
}) {
|
||||
|
||||
const state = reactive({
|
||||
data: [],
|
||||
loading: false,
|
||||
});
|
||||
watch(() => params, () => {
|
||||
fetch();
|
||||
});
|
||||
|
||||
function fetch() {
|
||||
state.loading = true;
|
||||
return boeRequest(_url, params).then(r => {
|
||||
state.data = config.result(r);
|
||||
state.loading = false;
|
||||
});
|
||||
}
|
||||
|
||||
config.init && fetch();
|
||||
return {
|
||||
...toRefs(state),
|
||||
fetch,
|
||||
};
|
||||
}
|
||||
|
||||
export function useBoeUserListPage(_url, params = {}, init = true) {
|
||||
|
||||
const state = reactive({
|
||||
data: [],
|
||||
loading: false,
|
||||
total: 0,
|
||||
totalPage: 0,
|
||||
page: 1,
|
||||
...params
|
||||
});
|
||||
|
||||
watch(() => params.keyword, throttle(fetch, 600));
|
||||
watch(() => params.page, fetch);
|
||||
|
||||
function fetch() {
|
||||
state.loading = true;
|
||||
if (!params.keyword) {
|
||||
state.loading = false;
|
||||
return;
|
||||
}
|
||||
return boeRequest(_url, params).then(r => {
|
||||
state.data = params.page === 1 ? r.result.userInfoList : [...state.data, ...r.result.userInfoList];
|
||||
state.totalPage = r.result.totalPage;
|
||||
state.total = r.result.totalElement;
|
||||
state.loading = false;
|
||||
});
|
||||
}
|
||||
|
||||
init && fetch();
|
||||
return {
|
||||
...toRefs(state),
|
||||
fetch,
|
||||
};
|
||||
}
|
||||
|
||||
export function useRowsPageNoInit(_url, params) {
|
||||
const state = reactive({
|
||||
data: [],
|
||||
total: 1,
|
||||
current: 1,
|
||||
pages: 1,
|
||||
loading: false
|
||||
});
|
||||
|
||||
function reset() {
|
||||
state.data = [];
|
||||
state.loading = false;
|
||||
}
|
||||
|
||||
function fetch() {
|
||||
state.loading = true;
|
||||
return request(unref(_url), unref(params)).then(r => {
|
||||
state.data = r.data.rows || r.data.records;
|
||||
state.current = r.data.current || r.data.current;
|
||||
state.pages = r.data.pages;
|
||||
state.total = r.data.total;
|
||||
state.loading = false;
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
fetch,
|
||||
reset,
|
||||
};
|
||||
}
|
||||
|
||||
export function useRowsPage(_url, params, init = true) {
|
||||
|
||||
const state = reactive({
|
||||
data: [],
|
||||
total: 1,
|
||||
current: 1,
|
||||
pages: 1,
|
||||
loading: false
|
||||
});
|
||||
|
||||
if (isRef(params)) {
|
||||
watch(params.value, () => {
|
||||
fetch();
|
||||
});
|
||||
}
|
||||
|
||||
if (isRef(_url)) {
|
||||
watchEffect(fetch);
|
||||
} else {
|
||||
init && fetch();
|
||||
}
|
||||
|
||||
function reset() {
|
||||
state.data = [];
|
||||
state.loading = false;
|
||||
}
|
||||
|
||||
function fetch() {
|
||||
state.loading = true;
|
||||
return request(unref(_url), unref(params)).then(r => {
|
||||
state.data = r.data.rows;
|
||||
state.current = r.data.current;
|
||||
state.pages = r.data.pages;
|
||||
state.total = r.data.total;
|
||||
state.loading = false;
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
fetch,
|
||||
reset,
|
||||
};
|
||||
}
|
||||
|
||||
export function usePage(_url, params, init = true,listing = false) {
|
||||
|
||||
const state = reactive({
|
||||
data: [],
|
||||
total: 1,
|
||||
current: 1,
|
||||
pages: 1,
|
||||
loading: false
|
||||
});
|
||||
|
||||
if (isRef(params) && listing) {
|
||||
watch(params.value, () => {
|
||||
fetch();
|
||||
});
|
||||
}
|
||||
|
||||
if (isRef(_url)) {
|
||||
watchEffect(fetch);
|
||||
} else {
|
||||
init && fetch();
|
||||
}
|
||||
|
||||
function reset() {
|
||||
state.data = [];
|
||||
state.loading = false;
|
||||
}
|
||||
|
||||
function fetch() {
|
||||
state.loading = true;
|
||||
return request(unref(_url), unref(params)).then(r => {
|
||||
state.data = r.data.records;
|
||||
state.current = r.data.current;
|
||||
state.pages = r.data.pages;
|
||||
state.total = r.data.total;
|
||||
state.loading = false;
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
fetch,
|
||||
reset,
|
||||
};
|
||||
}
|
||||
|
||||
export function useRequest(_url, params, init = true) {
|
||||
|
||||
const data = ref({});
|
||||
const loading = ref(false);
|
||||
|
||||
if (isRef(params)) {
|
||||
watch(params.value, () => {
|
||||
fetchData();
|
||||
});
|
||||
}
|
||||
|
||||
function fetchData() {
|
||||
loading.value = true;
|
||||
request(_url, unref(params)).then(r => {
|
||||
data.value = r.data;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
init && fetchData();
|
||||
return {
|
||||
data,
|
||||
loading,
|
||||
fetchData,
|
||||
};
|
||||
}
|
||||
|
||||
export async function boeRequest(_url, params = {}) {
|
||||
const s = _url.split(" ");
|
||||
let url = s[0];
|
||||
const method = s[1]?.toLowerCase() || "get";
|
||||
if (method === "get") {
|
||||
url.includes("?") ? (url.endsWith("&") || (url += "&")) : (url += "?");
|
||||
url += Object.keys(params).map(key => key + "=" + params[key]).join("&");
|
||||
}
|
||||
const body = method !== "get" ? s[2] === "formData" ? formatFormData(params) : params : {};
|
||||
url = process.env.NODE_ENV === "development" ? url : window.location.protocol + process.env.VUE_APP_BOE_API_URL + url;
|
||||
return fetch(url, {
|
||||
method,
|
||||
headers: {
|
||||
token: getCookieForName("token"),
|
||||
...method !== "get" && s[2] !== "formData" ? { "Content-Type": "application/json" } : {}
|
||||
},
|
||||
...method !== "get" ? { body: s[2] === "formData" ? body : JSON.stringify(body) } : {}
|
||||
}).then(res => {
|
||||
return res.text();
|
||||
}).then(res => {
|
||||
return JSONBigIntStr.parse(res);
|
||||
});
|
||||
}
|
||||
|
||||
function formatFormData(data) {
|
||||
const formData = new FormData();
|
||||
Object.keys(data).forEach(k => formData.append(k, data[k]));
|
||||
return formData;
|
||||
}
|
||||
|
||||
export async function request(_url, params) {
|
||||
const s = _url.split(" ");
|
||||
let url = s[0];
|
||||
const method = s[1]?.toLowerCase() || "get";
|
||||
if (method === "get") {
|
||||
let paramsArray = [];
|
||||
if (params) {
|
||||
Object.keys(params).forEach(key => paramsArray.push(key + "=" + params[key]));
|
||||
if (url.search(/\?/) === -1) {
|
||||
url += "?" + paramsArray.join("&");
|
||||
} else {
|
||||
url += "&" + paramsArray.join("&");
|
||||
}
|
||||
}
|
||||
}
|
||||
const body = method !== "get" ? params || {} : {};
|
||||
return fetch(process.env.VUE_APP_BASE_API + url, {
|
||||
method,
|
||||
headers: {
|
||||
token: getCookieForName("token"),
|
||||
...method !== "get" ? { "Content-Type": "application/json" } : {}
|
||||
},
|
||||
...method !== "get" ? { body: JSON.stringify(body) } : {}
|
||||
}).then(res => {
|
||||
return res.text();
|
||||
}).then(res => {
|
||||
return JSONBigIntStr.parse(res);
|
||||
}).then(res => {
|
||||
if (res.code === 0 || res.code === 200) {
|
||||
return res;
|
||||
}
|
||||
if (res.code === 1000) {
|
||||
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ?
|
||||
router.push({path: 'login', query: { returnUrl: router.currentRoute.value.fullPath }}) :
|
||||
(window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath))
|
||||
localStorage.removeItem('refreshPage')
|
||||
return Promise.reject(res);
|
||||
}
|
||||
res.show ? message.error(res.msg):message.error('系统接口数据异常,请联系管理员');
|
||||
return Promise.reject(res);
|
||||
});
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
4
src/api/student.js
Normal file
@@ -0,0 +1,4 @@
|
||||
import http from "./config";
|
||||
|
||||
export const studentDelAll = (params) => http.get('/admin/student/del', {params})
|
||||
|
||||
BIN
src/assets/all.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
src/assets/del.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
src/assets/images/avatar.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
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/in2.png
Normal file
|
After Width: | Height: | Size: 581 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/downloadnodata.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
src/assets/images/courseManage/persion.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
src/assets/images/courseManage/position.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
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/reset4.png
Normal file
|
After Width: | Height: | Size: 489 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/courseManage/time.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
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/docpic.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
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/pdfpic.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |