mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
Merge remote-tracking branch 'origin/cloud' into dev0731
This commit is contained in:
@@ -3,38 +3,52 @@ import ajax from './boeAjax';
|
||||
//const baseURL = process.env.VUE_APP_CESOURCE_BASE_API;
|
||||
const baseURL ="/userbasic";
|
||||
|
||||
/**【未使用】用于本地测试*/
|
||||
const login = function() {
|
||||
return ajax.post(baseURL,'/org/userParentOrg',{});
|
||||
}
|
||||
|
||||
/** 2023年6月新增加,退出接口*/
|
||||
const logout = function() {
|
||||
return ajax.postJson(baseURL,'/logout',{from:'pc'});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户的组织机构
|
||||
* 【此接口已经不再使用】获取用户的组织机构
|
||||
* organization_id
|
||||
*/
|
||||
const userParentOrg = function() {
|
||||
return ajax.post(baseURL,'/org/userParentOrg',{});
|
||||
}
|
||||
|
||||
//https://u-pre.boe.com/userbasic/org/list
|
||||
/**
|
||||
* /userbasic/org/list
|
||||
* 根据关键字查询机构
|
||||
*/
|
||||
const findOrgsByKeyword = function(keyword) {
|
||||
return ajax.postJson(baseURL,'/org/list',{keyword});
|
||||
}
|
||||
|
||||
/**
|
||||
* 【此接口已经不再使用】
|
||||
*/
|
||||
const findOrgTreeByOrgId = function(orgId) {
|
||||
return ajax.postJson(baseURL,'/org/childOrgs',{orgId});
|
||||
}
|
||||
|
||||
/** 获取机构信息 */
|
||||
const getOrgInfo = function(orgId) {
|
||||
return ajax.postJson(baseURL,'/org/info',{orgId});
|
||||
}
|
||||
|
||||
/**根据用户id获取用户的信息*/
|
||||
/**【已接口已经不再使用】根据用户id获取用户的信息*/
|
||||
const getUserInfoById = function(id) {
|
||||
return ajax.postJson(baseURL,'/user/list',{id});
|
||||
}
|
||||
|
||||
/**
|
||||
* https://u-pre.boe.com/userbasic/audience/userAudiences
|
||||
* 获取当前用户受众信息
|
||||
* 【当前代码中未查询到】获取当前用户受众信息
|
||||
*/
|
||||
const getUserCrowds = function() {
|
||||
return ajax.postJson(baseURL,'/audience/userAudiences',{});
|
||||
@@ -49,14 +63,15 @@ const getUserAudiences = function(data) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取hrbp数据
|
||||
* 重要接口,获取hrbp数据,课程审核。
|
||||
* 此接口中的问题,返回的机构名称,namePath要是orgId的,邮件中体现
|
||||
*/
|
||||
const getOrgHrbpInfo = function(orgId) {
|
||||
return ajax.postJson(baseURL,'/org/orgHrbpInfo',{orgId});
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改密码,不再使用,已转化为userbasic接口
|
||||
* 修改密码,已转化为userbasic接口
|
||||
* {newPassword:'',oldPassword:''}
|
||||
*/
|
||||
const modifyPassword = function(data) {
|
||||
@@ -68,6 +83,26 @@ const getInAudienceIds = function() {
|
||||
return ajax.post(baseURL,'/audience/audienceByUser',{});
|
||||
}
|
||||
|
||||
/**
|
||||
* 2023年6月新增加
|
||||
* 更新用户信息,当前只是列新三个信息,根据aid来更新
|
||||
* aid
|
||||
* avatar
|
||||
* sign
|
||||
*/
|
||||
const updateUser = function(data) {
|
||||
return ajax.postJson(baseURL,'/user/updateUserMessage',data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 2023年6月新增加
|
||||
* 根据用户的id集合,获取用户的姓名,工号,头像,组织机构,签名等信息
|
||||
* ids: 用户的id数组集合
|
||||
*/
|
||||
const getUsersByIds = function(ids) {
|
||||
return ajax.postJson(baseURL,'/user/getUserMessageToDai',ids);
|
||||
}
|
||||
|
||||
export default {
|
||||
userParentOrg,
|
||||
findOrgsByKeyword,
|
||||
@@ -78,5 +113,8 @@ export default {
|
||||
getUserAudiences,
|
||||
getOrgHrbpInfo,
|
||||
modifyPassword,
|
||||
getInAudienceIds
|
||||
getInAudienceIds,
|
||||
getUsersByIds,
|
||||
updateUser,
|
||||
logout
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* 课程的操作,课程的添加,修改,列表查询,课程的审核发布等操作。
|
||||
* 针对于管理员,教师的功能
|
||||
*
|
||||
*
|
||||
**/
|
||||
import ajax from '@/utils/xajax.js'
|
||||
|
||||
@@ -68,7 +68,7 @@ const revokeSubmit = function(id) {
|
||||
|
||||
/**
|
||||
* 复制课程
|
||||
* @param {Object}
|
||||
* @param {Object}
|
||||
*/
|
||||
const copyCourse = function(data) {
|
||||
return ajax.post('/xboe/m/course/manage/copy',data);
|
||||
@@ -330,7 +330,7 @@ const auditPageRecords = function(data) {
|
||||
* { courseId:必须}
|
||||
*/
|
||||
const auditCourseRecords = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/course-records', data);
|
||||
return ajax.post('/xboe/m/course/audit/course-records',data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -347,7 +347,7 @@ const auditAndPublish=function(data) {
|
||||
|
||||
/**
|
||||
* 设置top
|
||||
* @param {Object} query {ids:课程id,多个使用逗号分隔,title:课程的名称, Boolean top 是否置顶}
|
||||
* @param {Object} query {ids:课程id,多个使用逗号分隔,title:课程的名称,Boolean top 是否置顶}
|
||||
*/
|
||||
const setTop = function(data) {
|
||||
return ajax.post('/xboe/m/course/manage/top', data);
|
||||
|
||||
@@ -53,9 +53,11 @@ const formRequest=axios.create({
|
||||
return res.data
|
||||
}else{
|
||||
if(code === 401){
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = this.webBaseUrl + ReLoginUrl;
|
||||
})
|
||||
// store.dispatch('LogOut').then(() => {
|
||||
// location.href = this.webBaseUrl + ReLoginUrl;
|
||||
// })
|
||||
console.error('',res.data);
|
||||
return Promise.reject(new Error('接口返回未登录'))
|
||||
}else if(code===403){
|
||||
var msg='当前操作没有权限';
|
||||
Message({message: msg, type: 'error'});
|
||||
|
||||
@@ -1484,6 +1484,7 @@ export default {
|
||||
aid:rs.result.id,
|
||||
orgId:rs.result.orgId
|
||||
}
|
||||
//下面的机构名称,路径不对,应该取课程的资源归属(机构)的路径
|
||||
postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
|
||||
apiCourse.submitCourse(postData).then(res => {
|
||||
//this.btnLoading=false;
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item><router-link to="/index">学员</router-link></el-dropdown-item>
|
||||
<el-dropdown-item v-if="identity == 2 || identity == 5" @click.native="setCurIdentity(2)"><router-link to="/need/waitaudit">教师</router-link></el-dropdown-item>
|
||||
<el-dropdown-item v-if="identity == 3 || identity == 5" @click.native="setCurIdentity(3)"><router-link to="/course/manage">管理员</router-link></el-dropdown-item>
|
||||
<el-dropdown-item v-if="identity == 3 || identity == 5" ><a :href="managerPath+'/learningpath'">管理员</a></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
@@ -171,6 +171,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
popupConfig:{},
|
||||
ctx:process.env.VUE_APP_PUBLIC_PATH,
|
||||
managerPath:process.env.VUE_APP_MANAGER_PATH,
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
findType: '1',
|
||||
keyword: '',
|
||||
@@ -296,11 +298,10 @@ export default {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
}).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
//location.href = this.webBaseUrl + '/login';
|
||||
sessionStorage.setItem('dialog_session_show'+this.userInfo.aid,null); // 清除兴趣采集的"关闭"缓存
|
||||
sessionStorage.setItem('dialog_session_show'+this.userInfo.aid,null); // 清除兴趣采集的"关闭"缓存
|
||||
location.href = process.env.VUE_APP_LOGIN_URL;
|
||||
});
|
||||
})
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<div style="margin-top:10px">
|
||||
<router-link to="/study/index"><span :class="{identity:true,active:curIdentity==1}" @click="setCurIdentity(1)">学员</span></router-link>
|
||||
<router-link to="/teacher/index"><span v-if="identity == 2 || identity == 5" :class="{identity:true,active:curIdentity==2}" @click="setCurIdentity(2)">教师</span></router-link>
|
||||
<span v-if="identity == 3 || identity == 5" :class="{identity:true,active:curIdentity==3}" @click="setCurIdentity(3)">管理员</span>
|
||||
<span v-if="identity == 3 || identity == 5" :class="{identity:true,active:curIdentity==3}" ><a :href="managerPath+'/learningpath'">管理员</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -103,6 +103,8 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
ctx:process.env.VUE_APP_PUBLIC_PATH,
|
||||
managerPath:process.env.VUE_APP_MANAGER_PATH,
|
||||
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||
isTest:false,
|
||||
statData:{
|
||||
|
||||
@@ -8,18 +8,6 @@
|
||||
<template v-if="device!=='mobile'">
|
||||
<search id="header-search" class="right-menu-item" />
|
||||
|
||||
<el-tooltip content="源码地址" effect="dark" placement="bottom">
|
||||
<a href="https://gitee.com/joolun/JooLun-wx" target="_blank" class="right-menu-item hover-effect">
|
||||
<i class="el-icon-connection"></i>
|
||||
</a>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip content="访问官网" effect="dark" placement="bottom">
|
||||
<a href="http://www.joolun.com/" target="_blank" class="right-menu-item hover-effect">
|
||||
<i class="el-icon-house"></i>
|
||||
</a>
|
||||
</el-tooltip>
|
||||
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
|
||||
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item><router-link to="/index">学员</router-link></el-dropdown-item>
|
||||
<el-dropdown-item v-if="identity == 2 || identity == 5" @click.native="setCurIdentity(2)"><router-link to="/need/waitaudit">教师</router-link></el-dropdown-item>
|
||||
<el-dropdown-item v-if="identity == 3 || identity == 5" @click.native="setCurIdentity(3)"><router-link to="/course/manage">管理员</router-link></el-dropdown-item>
|
||||
<el-dropdown-item v-if="identity == 3 || identity == 5" @click.native="setCurIdentity(3)"><a :href="managerPath+'/learningpath'">管理员</a></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
@@ -182,6 +182,7 @@ export default {
|
||||
return {
|
||||
uClassShow: false,
|
||||
isTiao:false,
|
||||
managerPath:process.env.VUE_APP_MANAGER_PATH,
|
||||
interestShow:false,
|
||||
checked:true,
|
||||
signInShow: false,
|
||||
|
||||
@@ -41,7 +41,7 @@ router.beforeEach((to, from, next) => {
|
||||
// 判断当前控制台是否已拉取完数据
|
||||
store.dispatch('InitData').then(res => {
|
||||
//加载白名单信息
|
||||
testUser.init();
|
||||
//testUser.init();
|
||||
//加载信息资源归属,系统分类信息
|
||||
store.dispatch('resOwner/loadResOwners');
|
||||
store.dispatch('sysType/loadSysTypes');
|
||||
|
||||
@@ -7,6 +7,7 @@ import apiCourse from "@/api/modules/course.js";
|
||||
import apiBoeCourse from "@/api/boe/course.js";
|
||||
import apiBoeLogout from "@/api/boe/login.js";
|
||||
import apiStat from "@/api/phase2/stat.js";
|
||||
import apiUserbasic from '@/api/boe/userbasic.js';
|
||||
|
||||
const user = {
|
||||
state: {
|
||||
@@ -223,12 +224,11 @@ const user = {
|
||||
// 退出系统
|
||||
LogOut({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
apiBoeLogout.logout();
|
||||
commit('SET_PERMISSIONS', [])
|
||||
removeToken()
|
||||
//resolve()
|
||||
|
||||
apiLogin.logout().then(() => {
|
||||
//resolve()
|
||||
//apiLogin.logout();
|
||||
apiUserbasic.logout().then(() => {
|
||||
resolve()
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
|
||||
@@ -7,6 +7,7 @@ const TokenKey = 'token'
|
||||
export function getToken() {
|
||||
return Cookies.get(TokenKey)
|
||||
}
|
||||
|
||||
export function setToken(token) {
|
||||
return Cookies.set(TokenKey, token)
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
if (valid) {
|
||||
this.$store.dispatch("Login", this.form).then(rs => {
|
||||
if(rs.status == 200){
|
||||
// 记住密码
|
||||
//记住密码
|
||||
localStorage.setItem(this.$xpage.constants.newLoginKey,1);
|
||||
if(this.rememberMe){
|
||||
let rememberMeOjb = {rememberMe:true,loginName:this.form.loginName,password:this.form.password};
|
||||
|
||||
@@ -519,6 +519,16 @@
|
||||
this.form.sign = this.signData.sign;
|
||||
this.signData.isEdit = false;
|
||||
this.checkAndSendFinish();
|
||||
let upinfo={
|
||||
aid:this.userInfo.aid,
|
||||
sign:this.signData.sign,
|
||||
avatar:''
|
||||
}
|
||||
apiUserBasic.updateUser(upinfo).then(rs=>{
|
||||
if(rs.status!=200){
|
||||
console.error('更新用户中心用户像头失败');
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('保存失败:'+res.message);
|
||||
}
|
||||
@@ -658,6 +668,17 @@
|
||||
this.$message.success("保存图片成功")
|
||||
this.dialogVisibleAvatar=false;
|
||||
this.checkAndSendFinish();
|
||||
//同步保存到用户中心的数据库
|
||||
let upinfo={
|
||||
aid:this.userInfo.aid,
|
||||
sign:'',
|
||||
avatar:this.form.account.avatar
|
||||
}
|
||||
apiUserBasic.updateUser(upinfo).then(rs=>{
|
||||
if(rs.status!=200){
|
||||
console.error('更新用户中心用户像头失败');
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.$message.error("保存图片失败")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user