diff --git a/.env.development b/.env.development index c5518361..ced17fe2 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,7 @@ # 开发环境配置 +NODE_ENV = 'development' ENV = 'development' +BASE_URL = '/pc/' # 管理系统/开发环境 VUE_APP_BASE_API = '/systemapi' @@ -16,6 +18,9 @@ VUE_APP_BOE_MOBILE_URL = 'http://192.168.0.10:8082/mobile' # File路径的基础url VUE_APP_FILE_BASE_URL = 'http://192.168.0.10:9090/cdn/upload' +# File路径的基础url的相对路径,加此项是为了不影响之前的路径配置 +VUE_APP_FILE_RELATIVE_PATH = '/upload' + # 登录地址 VUE_APP_LOGIN_URL='/pc/login' diff --git a/.env.preview b/.env.preview new file mode 100644 index 00000000..cd3581a0 --- /dev/null +++ b/.env.preview @@ -0,0 +1,28 @@ +# 生产环境配置 +ENV = 'preview' +NODE_ENV= 'preview' +BASE_URL= '/pc/' + +# 管理系统/生产环境 +VUE_APP_BASE_API = '/systemapi-release' + +# BOE管理系统/开发环境 +VUE_APP_BOE_BASE_API = '/uboeApi-release' + +# BOE系统网址,已经不再使用 +VUE_APP_BOE_WEB_URL = 'https://u.boe.com/preview' + +# BOE 移动端url +VUE_APP_BOE_MOBILE_URL = 'http://u.boe.com' + +# File路径的基础url +VUE_APP_FILE_BASE_URL='http://u.boe.com/upload' + +# File路径的基础url的相对路径,加此项是为了不影响之前的路径配置 +VUE_APP_FILE_RELATIVE_PATH = '/upload' + +# 虚拟目录的变量,结尾的/在vue.config.js中添加 +VUE_APP_PUBLIC_PATH='/pc-release' + +# 登录地址 +VUE_APP_LOGIN_URL='https://u.boe.com/web-release/' diff --git a/.env.production b/.env.production index d0939629..331b4205 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,7 @@ # 生产环境配置 ENV = 'production' +NODE_ENV = 'production' +BASE_URL = '/pc/' # 管理系统/生产环境 VUE_APP_BASE_API = '/systemapi' @@ -8,7 +10,7 @@ VUE_APP_BASE_API = '/systemapi' VUE_APP_BOE_BASE_API = '/uboeApi' # BOE系统网址 -VUE_APP_BOE_WEB_URL = 'https://u.boe.com' +VUE_APP_BOE_WEB_URL = 'https://u.boe.com/production' # BOE 移动端url VUE_APP_BOE_MOBILE_URL = 'http://u.boe.com' @@ -16,6 +18,9 @@ VUE_APP_BOE_MOBILE_URL = 'http://u.boe.com' # File路径的基础url VUE_APP_FILE_BASE_URL='http://u-pre.boe.com/upload' +# File路径的基础url的相对路径,加此项是为了不影响之前的路径配置 +VUE_APP_FILE_RELATIVE_PATH = '/upload' + # 虚拟目录的变量,结尾的/在vue.config.js中添加 VUE_APP_PUBLIC_PATH='/pc' diff --git a/.env.testing b/.env.testing new file mode 100644 index 00000000..89063e98 --- /dev/null +++ b/.env.testing @@ -0,0 +1,28 @@ +# 生产环境配置 +ENV = 'testing' +NODE_ENV = 'testing' +BASE_URL = '/pc/' + +# 管理系统/生产环境 +VUE_APP_BASE_API = '/systemapi' + +# BOE管理系统/开发环境 +VUE_APP_BOE_BASE_API = '/uboeApi' + +# BOE系统网址 +VUE_APP_BOE_WEB_URL = 'https://u-pre.boe.com/testing' + +# BOE 移动端url +VUE_APP_BOE_MOBILE_URL = 'http://u-pre.boe.com' + +# File路径的基础url +VUE_APP_FILE_BASE_URL='http://u-pre.boe.com/upload' + +# File路径的基础url的相对路径,加此项是为了不影响之前的路径配置 +VUE_APP_FILE_RELATIVE_PATH = '/upload' + +# 虚拟目录的变量,结尾的/在vue.config.js中添加 +VUE_APP_PUBLIC_PATH='/pc' + +# 登录地址 +VUE_APP_LOGIN_URL='https://u-pre.boe.com/web/' diff --git a/.gitignore b/.gitignore index 4e637713..07e6e472 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -node_modules -node_modules +/node_modules diff --git a/package.json b/package.json index edc3f42e..09f69ff6 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,12 @@ "scripts": { "dev": "vue-cli-service serve", "serve": "vue-cli-service serve", + "serve:testing": "vue-cli-service serve --mode testing", + "serve:preview": "vue-cli-service serve --mode preview", "build": "vue-cli-service build", "build:development": "vue-cli-service build --mode development", + "build:preview": "vue-cli-service build --mode preview", + "build:testing": "vue-cli-service build --mode testing", "lint": "vue-cli-service lint" }, "dependencies": { diff --git a/src/api/boe/teacher.js b/src/api/boe/teacher.js index 45b2fb0d..1568a2ca 100644 --- a/src/api/boe/teacher.js +++ b/src/api/boe/teacher.js @@ -26,6 +26,13 @@ import ajax from '@/api/boe/boeApiAjax.js' const editTeacher = function(data) { return ajax.postJson('/b1/system/teacher/add-and-edit-teacher',data); } +// api +/** + * 发薪地接口 + */ + const getPayrollPlace = function(id) { + return ajax.get('/b1/system/teacher/payroll-place'); + } /** * 教师体系和级别接口 * @param { @@ -141,5 +148,6 @@ export default { getCourseInfo, teacherUpgradePrecess, deleteModelTeacher, - editModelTeacher + editModelTeacher, + getPayrollPlace } diff --git a/src/api/modules/cases.js b/src/api/modules/cases.js index 0023e0c5..874fd257 100644 --- a/src/api/modules/cases.js +++ b/src/api/modules/cases.js @@ -3,7 +3,7 @@ import ajax from '@/utils/xajax.js' /**首页查询 * pageSize - * orderField + * orderField * orderAsc */ const indexList = function(query) { diff --git a/src/api/modules/course.js b/src/api/modules/course.js index aa531f6c..a647c86d 100644 --- a/src/api/modules/course.js +++ b/src/api/modules/course.js @@ -274,12 +274,41 @@ const countWaitAudit = function() { } /** + * 当前用户需要审核的课程列表 * @param {Object} query 同pageList */ const auditList = function(query) { return ajax.post('/xboe/m/course/manage/audit-pagelist', query); } +/** + * 指定审核人,转审核人 + * 点击“转审” 弹出教师查询窗口,查询教师,填写备注,提交,调用此接口 + * @param {Object} data + * {courseId:课程id,teacherId:指定的审核人教师的id,teacherName:教师名称,remark:备注} + */ +const auditAppoint = function(data) { + return ajax.post('/xboe/m/course/audit/appoint', data); +} + +/** + * 获取审核信息,上面教师点击审核课程时,用于查询,上面“转审”时,用户填写的备注信息 + * @param {courseId:'课程id',teacherId:'可以不填写,系统会查询当前人'} data + */ +const getAuditInfo = function(data) { + return ajax.post('/xboe/m/course/audit/infos', data); +} + +/** + * 获取审核日志,此功能是为了管理员查看课程的审核日志。 + * 为后续查看增加的接口 + * @param {courseId:'课程ID',teacherId:'可以不填写,系统会查询当前人'} data + */ +const getAuditLogs = function(data) { + return ajax.post('/xboe/m/course/audit/logs', data); +} + + /** * 管理员的课程审核处理 * @param {Object} query {id:课程id,title:课程的名称, Boolean pass 是否通过,remark 备注} @@ -337,19 +366,19 @@ const detailFew=function(id){ const sumbits=function(id){ return ajax.get('/xboe/m/course/manage/sumbits?id='+id); } -/* +/* 教师授课记录 */ const teacherCourse=function(teacherId){ return ajax.get('/xboe/m/course/manage/teacher-course?teacherId='+teacherId); } -/* +/* 教师授课记录导出 @param teacherId 教师id */ const exportTeacherCourse=function(teacherId){ return ajax.post('/xboe/m/course/manage/export-teacher-course?teacherId='+teacherId) -} +} /* *待审核课程记录导出 * resOwner1:资源归属一级的id @@ -401,6 +430,9 @@ export default { getHomework, countWaitAudit, auditList, + auditAppoint, + getAuditInfo, + getAuditLogs, audit, auditAndPublish, getAssess, @@ -420,5 +452,5 @@ export default { exportCourseAudit, exportCourse, queryCrowd - + } diff --git a/src/api/modules/dict.js b/src/api/modules/dict.js index b1252481..6e2b05bb 100644 --- a/src/api/modules/dict.js +++ b/src/api/modules/dict.js @@ -8,7 +8,7 @@ const items=function(key){ return ajax.get('/xboe/m/dictionary/items?key='+key); } -// 修改 +// 修改 //@param key 对应字段后缀 // // 案例的组织机构字典 org_domain key diff --git a/src/api/modules/favorites.js b/src/api/modules/favorites.js index 1273fcf2..165bc5c1 100644 --- a/src/api/modules/favorites.js +++ b/src/api/modules/favorites.js @@ -34,7 +34,7 @@ const casePageList=function(query){ /*分页查询 收藏的文章信息 *@param {Object} query @param Integer type 根据什么类型搜索,这块暂时不传 - @param pageIndex 第几页 pageSize 每页展示多少行 + @param pageIndex 第几页 pageSize 每页展示多少行 keyword:对应关键字查询 */ const articlePageList=function(query){ @@ -45,7 +45,7 @@ const articlePageList=function(query){ @param Integer type 根据什么类型搜索,暂时不传 @param pageIndex 第几页 pageSize 每页展示多少行 keyword:对应关键字查询 - + */ const coursePageList=function(query){ return ajax.post('/xboe/m/favorite/mycourselist',query); @@ -85,16 +85,23 @@ const has=function(objType,objId){ */ const findAll=function(query){ return ajax.post('/xboe/m/favorite/findAll',query); -} +} /* 我的收藏 全部 @param pageIndex 第几页 @param pageSize 每页行数 -@param keyword 关键字 +@param keyword 关键字 */ const queryAll=function(query){ return ajax.post('/xboe/m/favorite/queryAll',query); } +/** + * 查看是否已收藏 批量 + * @param {问答或者文章或者课程的id数组} data + * */ +const isNoFavorite=function(date){ + return ajax.postJson('/xboe/m/favorite/isNoFavorite',data); +} export default{ has, @@ -107,5 +114,6 @@ export default{ articlePageList, coursePageList, findAll, - queryAll + queryAll, + isNoFavorite } diff --git a/src/api/modules/shares.js b/src/api/modules/shares.js index 9af4635a..2dad7837 100644 --- a/src/api/modules/shares.js +++ b/src/api/modules/shares.js @@ -33,7 +33,7 @@ const remove=function(objId,objType){ // toAname 分享给人的名称 // const querylist=function(query){ - return ajax.post('/xboe/m/share/list',data); + return ajax.post('/xboe/m/share/list',query); } // 当前用户是否已分享 // // objType,点赞对象类型,, 1课程 2文章,3案例, 4问答 @@ -112,7 +112,7 @@ const mymearticlelist=function(query){ */ const updateIsRead=function(id){ return ajax.get(`/xboe/m/share/updateIsRead?id=${id}`); -} +} /* 撤回分享 @@ -121,6 +121,49 @@ const updateIsRead=function(id){ const deleteshares=function(id){ return ajax.get(`/xboe/m/share/delete-shares?id=${id}`); } +/** + * 我分享的全部 + * @param pageIndex 第几页 + * @param pageSize 每页多少行 + * @param keyword 关键字搜索 + * @param isRead 是否已读 + * */ +const findMeShare=function (query){ + return ajax.post('/xboe/m/share/findMeShare',query); +} +/** + * 分享给我的全部 + * @param pageIndex 第几页 + * @param pageSize 每页多少行 + * @param keyword 关键字搜索 + * @param isRead 是否已读 + * */ +const findShareMe=function (query){ + return ajax.post('/xboe/m/share/findShareMe',query); +} + +/** + * 我分享的案例 + * @param pageIndex 第几页 + * @param pageSize 每页多少行 + * @param isRead 是否已读 + * @param keyword 关键字搜索 + * */ +const myCaseList=function (query){ + return ajax.post('/xboe/m/share/myCaseList',query); +} +/** + * 分享给我的案例 + * @param pageIndex 第几页 + * @param pageSize 每页多少行 + * @param isRead 是否已读 + * @param keyword 关键字搜索 + * */ +const myMeCaseList=function (query){ + return ajax.post('/xboe/m/share/myMeCaseList',query); +} +/** + * */ export default{ save, has, @@ -134,5 +177,9 @@ const deleteshares=function(id){ mymecourselist, mymearticlelist, updateIsRead, - deleteshares + deleteshares, + findMeShare, + findShareMe, + myCaseList, + myMeCaseList } diff --git a/src/api/modules/teacher.js b/src/api/modules/teacher.js index 8c57901e..f0a1a76d 100644 --- a/src/api/modules/teacher.js +++ b/src/api/modules/teacher.js @@ -23,6 +23,10 @@ const getInfoById = function(id) { * pageIndex 起始页 * pageSize 每页条数 * name 姓名 + * tlevelId级别 + * salaryId发薪地 + * tsystemId + * } query * @returns */ @@ -104,7 +108,7 @@ const save = function(data) { * @param {teacherId->sysId : 原系统的id,接口返回} sysId */ const updateSysId = function(id,sysId) { - return ajax.postJson('/xboe/teacher/update-sysid',{id,sysId}); + return ajax.post('/xboe/teacher/update-sysid',{id,sysId}); } @@ -183,6 +187,17 @@ const exports=function(query){ const findAllCourses=function(query){ return ajax.post('/xboe/teacher/compose/find/courses',query); } +/** + * 内部讲师-删除模块讲师接口 + * @param { + courseId // 课程id + modId // 模块id + teacherId // 教师id + remark // 备注 + */ + const syncUpdate = function(data) { + return ajax.postJson('/xboe/teacher/update-sync',data); + } export default { findByName, @@ -197,5 +212,6 @@ export default { has, start, end, - exports + exports, + syncUpdate } diff --git a/src/components/Article/collectList.vue b/src/components/Article/collectList.vue index 0ec4cb2d..13c69315 100644 --- a/src/components/Article/collectList.vue +++ b/src/components/Article/collectList.vue @@ -7,11 +7,11 @@
{{ item.title }}
-
{{ item.summary }}
+
{{ item.summary || item.content}}
- 发布时间:{{ item.sysCreateTime | timeFilter }} - 收藏时间:{{ item.time | timeFilter }} + 发布时间:{{ item.sysCreateTime || item.publishTime | timeFilter }} + 收藏时间:{{ item.time || item.favoritesTime | timeFilter }} 取消收藏
@@ -46,9 +46,7 @@ export default { }, methods: { jump(item) { - // let routeData = this.$router.resolve({ path: '/article/detail?id=' + item.articleId }); // , query: { id: 1 } - // window.open(routeData.href, '_blank'); - this.$router.push({path:'/article/detail',query:{id:item.articleId}}) + this.$router.push({path:'/article/detail',query:{id:item.articleId || item.id}}) }, delItem(item) { this.$confirm('您确定要取消收藏所选文章吗?', '删除提示', { @@ -61,10 +59,10 @@ export default { }) .catch(() => {}); }, - jump(item){ - this.$router.push({path:'/article/detail',query:{id:item.articleId}}) - // window.open('/article/detail?id=' + item.articleId) - } + // jump(item){ + // this.$router.push({path:'/article/detail',query:{id:item.articleId}}) + // // window.open('/article/detail?id=' + item.articleId) + // } } }; diff --git a/src/components/Article/shareItems.vue b/src/components/Article/shareItems.vue index 19e694fb..8d926c64 100644 --- a/src/components/Article/shareItems.vue +++ b/src/components/Article/shareItems.vue @@ -6,9 +6,9 @@ 【已查看】 【未查看】 - + -
+
@@ -65,14 +65,25 @@ export default { }, methods: { jumpRouter(item){ - if(this.type!='myShare'){ + if(item.type){ + if(this.type!='myShare'){ + apiShares.updateIsRead(item.shareId).then(res=>{ + if(res.status==200){ + this.$emit('confirm',item) + } + }) + } + }else{ + if(this.type!='myShare'){ apiShares.updateIsRead(item.id).then(res=>{ if(res.status==200){ this.$emit('confirm',item) } }) } - this.$router.push({path:'/article/detail',query:{id:item.objId}}) + } + + this.$router.push({path:'/article/detail',query:{id:item.objId || item.id}}) // window.open(`${this.webBaseUrl}/article/detail?id=${item.objId}`) }, deleteshares(item){ @@ -129,7 +140,7 @@ export default { font-weight: 400; display: flex; justify-content: flex-start; - + align-items: center; .readed{ font-size: 18px; diff --git a/src/components/Case/caseItems.vue b/src/components/Case/caseItems.vue new file mode 100644 index 00000000..b968f451 --- /dev/null +++ b/src/components/Case/caseItems.vue @@ -0,0 +1,188 @@ + + + \ No newline at end of file diff --git a/src/components/Case/collectList.vue b/src/components/Case/collectList.vue index 085e9b3e..2393efd8 100644 --- a/src/components/Case/collectList.vue +++ b/src/components/Case/collectList.vue @@ -1,21 +1,24 @@