diff --git a/.env b/.env index fe53215a..decbd46b 100644 --- a/.env +++ b/.env @@ -2,25 +2,29 @@ VUE_APP_BASE=/manage # api项目基础url VUE_APP_BASE_API=/manageApi +# systemApi +VUE_APP_NEW_API=/systemapi #文件路径 VUE_APP_FILE_PATH=/upload/ # 代理url 本地调试,不可以用在其他地方 VUE_APP_PROXY_URL=//43.143.139.204/manageApi # 登录url -VUE_APP_LOGIN_URL=//u-pre.boe.com/web?returnUrl= +VUE_APP_LOGIN_URL=//pretest.zcwytd.com/web?returnUrl= # boe域名 -VUE_APP_BOE_API_URL=//u-pre.boe.com +VUE_APP_BOE_API_URL=//pretest.zcwytd.com #打包路径 VUE_APP_OUTPUT_DIR=./dist # iframe嵌套url -VUE_APP_IFRAME_URL=//u-pre.boe.com/pc/iframe +VUE_APP_IFRAME_URL=//pretest.zcwytd.com/pc/iframe +# 本地 +# VUE_APP_IFRAME_URL=//localhost:1024/pc/iframe # 学员端路由 -VUE_APP_IFRAME_STUDENT_URL=//u-pre.boe.com/pc/loading -VUE_APP_IFRAME_TEACHER_URL=//u-pre.boe.com/pc/need/waitaudit +VUE_APP_IFRAME_STUDENT_URL=//pretest.zcwytd.com/pc/loading +VUE_APP_IFRAME_TEACHER_URL=//pretest.zcwytd.com/pc/need/waitaudit # 课程二维码 -VUE_APP_COURSE_STUDY=//u-pre.boe.com/pc/course/studyindex?id= +VUE_APP_COURSE_STUDY=//pretest.zcwytd.com/pc/course/studyindex?id= # 导入学员模板 VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx @@ -28,16 +32,16 @@ VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE=外部考试学员成绩导入模板-1676551319283.xlsx #在线 -VUE_APP_ONLINE_CLASS_URL=//u-pre.boe.com/mobile/pages/study/courseStudy?id= +VUE_APP_ONLINE_CLASS_URL=//pretest.zcwytd.com/mobile/pages/study/courseStudy?id= #案例 -VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id= +VITE_BOE_CASS_DETAIL_URL=//pretest.zcwytd.com/pc/case/detail?id= #考试 -VUE_APP_EXAM_DETAIL_URL=//u-pre.boe.com/mobile/pages/exam/exam?id= +VUE_APP_EXAM_DETAIL_URL=//pretest.zcwytd.com/mobile/pages/exam/exam?id= #h5的基本url -VUE_APP_H5=//u-pre.boe.com/student-h5 +VUE_APP_H5=//pretest.zcwytd.com/student-h5 #用户头像 VUE_APP_AVATAR_PATH=/upload/ # 旧版管理员界面 -VUE_APP_OLD_MANAGE=//u-pre.boe.com/resource/index.html +VUE_APP_OLD_MANAGE=//pretest.zcwytd.com/resource/index.html # 批量面授报名模板 VUE_APP_FACE_STUDENT_TEMPLATE=批量面授报名模版-1673963663229.xlsx \ No newline at end of file diff --git a/src/api/case.js b/src/api/case.js new file mode 100644 index 00000000..8c28874b --- /dev/null +++ b/src/api/case.js @@ -0,0 +1,12 @@ +import http from "./configSys"; + +// 案例列表 +const RECOMMEND_PAGE = "/systemapi/xboe/m/boe/cases/recommend/page post"; + +//下载失败数据 +const downloadErrorData = (params = {}) => http.post("/xboe/m/boe/cases/recommend/launch", params); + +export { + RECOMMEND_PAGE, + downloadErrorData +} \ No newline at end of file diff --git a/src/api/configSys.js b/src/api/configSys.js new file mode 100644 index 00000000..641ec2eb --- /dev/null +++ b/src/api/configSys.js @@ -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: process.env.VUE_APP_NEW_API, + 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; diff --git a/src/components/drawers/InitiateRecommend.vue b/src/components/drawers/InitiateRecommend.vue new file mode 100644 index 00000000..6d4fa556 --- /dev/null +++ b/src/components/drawers/InitiateRecommend.vue @@ -0,0 +1,719 @@ + + + + + + + + + + + + + + + 搜索 + + + + 重置 + + + + 导入 + + + + + 已选择 {{ state.selectedRowKeys.length }} 条案例 + + + + + + + + + + + + 已选 + + + + + + + + + {{ item.studentName }} + + + + + + + {{ item.studentName }} + + + + + + + 查看更多> + + + 收起< + + + + + + + 取消 + 下一步 + + + + + + + 导入 + + + 下载导入模版 + + + + + 下载最新案例模版 + + + + + + + 上传文件 + + + 支持文件格式:.xls/.xlsx + + + + {{ state.fileName }} + 上传完成 + + + + + 导入 1039 条,成功 1007 条,失败 32 条。 + + + 下载失败数据 + + + + + + + + + + + diff --git a/src/views/case/CaseRecommended.vue b/src/views/case/CaseRecommended.vue index 83f1249d..06487f5d 100644 --- a/src/views/case/CaseRecommended.vue +++ b/src/views/case/CaseRecommended.vue @@ -1,22 +1,22 @@ - + - - 创建时间: - + + - + 搜索 @@ -36,40 +36,169 @@ -就哈哈哈哈 - + + + + 信息下载 + + handleOper(record, 'withdraw')" type="link">撤回 + + 删除 + + + + + + + +