Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/portal

This commit is contained in:
dongruihua
2022-11-23 21:06:38 +08:00
47 changed files with 1040 additions and 279 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

196
src/api/boe/boeAjax.js Normal file
View File

@@ -0,0 +1,196 @@
import axios from 'axios'
import qs from 'qs'
import { Notification, MessageBox, Message } from 'element-ui'
import store from '@/store'
import { getToken } from '@/utils/token'
import errorCode from '@/utils/errorCode'
/**
*request请求 axios.request(config)
*requestJson请求 axios.request(config)
*get请求 axios.get(url[, config])
*post请求 axios.post(url[, data[, config]])
*postJson请求 axios.post(url[, data[, config]])
*put请求 axios.put(url[, data[, config]])
*putJson请求 axios.put(url[, data[, config]])
*patch请求 axios.patch(url[, data[, config]])
*patchJson请求 axios.patch(url[, data[, config]])
*delete请求 axios.delete(url[, config])
*/
// const ReLoginUrl=process.env.VUE_APP_LOGIN_URL;
const TokenName='token';
/**axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'**/
//只是用于发送json对象数据时使用post,put,patch
/**axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded'**/
//只是用于发送json对象数据时使用post,put,patch
//用于普通的发送请求
const formRequest=axios.create({
// headers:{'Content-Type':'application/x-www-form-urlencoded'},
// axios中请求配置有baseURL选项表示请求URL公共部分
// baseURL: process.env.VUE_APP_CESOURCE_BASE_API,
//超时
timeout: 10000,
})
//发送json对象的拦截器
formRequest.interceptors.request.use(config => {
//是否需要设置 token
const isToken = (config.headers || {}).isToken === false
let curToken=getToken();
//curToken='eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NjkxMDgyMDIsImV4cCI6MTY2OTExNTQwMiwiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjAxNTU1M0RELTQ0NUUtNjlENC0zNTFGLUREOUExQTU2NDIwRSIsInVJZCI6Ijk2NTM0MTk5OTY0MzIzNDMwNCIsInBlcm1pc3Npb24iOiIifQ==.152729feaf062a11e0c49dc657ca3f965e82228f818e31dfccd21abf0fb53fab'
if (curToken && !isToken) {
config.headers[TokenName] = curToken // 让每个请求携带自定义token 请根据实际情况自行修改
}
return config
}, error => {
console.log(error)
Promise.reject(error)
});
formRequest.interceptors.response.use(res => {
const code = res.data.status || 200;
if(code===200){
return res.data
}else{
if(code === 401){
store.dispatch('LogOut').then(() => {
location.href = this.webBaseUrl + ReLoginUrl;
})
}else if(code===403){
var msg='当前操作没有权限';
Message({message: msg, type: 'error'});
return Promise.reject(new Error(msg))
}else{
//Message({message: res.data.message, type: 'error'});
//console.log('err' + res.data.error);
return res.data
}
}
},
error => {
console.log('err' + error)
let { message } = error;
if (message == "Network Error") {
message = "网络异常,请稍后重试";
}
else if (message.includes("timeout")) {
message = "网络异常或接口错误,请求超时";
}
else if (message.includes("Request failed with status code")) {
message = "系统接口" + message.substr(message.length - 3) + "异常";
}
Message({
message: message,
type: 'error',
duration: 5 * 1000
})
return Promise.reject(error)
}
)
/**
* request请求,可以自定义参数
*/
const request=formRequest.request;
/**
* get请求 ,只有url
*/
const get = function(baseURL,url){
return request({
baseURL,
url: url,
method: 'get',
headers:{'Content-Type':'application/x-www-form-urlencoded'}
})
}
/**
* post请求
* @param {Object} url
* @param {Object} postData
*/
const post=function(baseURL,url,postData){
if(postData){
postData=qs.stringify(postData);
}
return request({
baseURL,
url: url,
method: 'post',
data:postData,
headers:{'Content-Type':'application/x-www-form-urlencoded'}
})
}
//post请求
const postForm=function(baseURL,url,data){
return request({
baseURL,
url,
data,
method: 'post',
headers:{'Content-Type':'application/x-www-form-urlencoded'}
});
}
// const postJson=jsonRequest.post;
const postJson=function(baseURL,url,postData){
return request({
baseURL,
url: url,
method: 'post',
data:postData,
headers:{'Content-Type':'application/json'},
})
}
// 导出文件请求定义
const postJsonToFile=function(baseURL,url,postData){
return request({
baseURL,
url: url,
method: 'post',
data:postData,
headers:{'Content-Type':'application/json;charset=utf-8'},
responseType: 'blob'
})
}
/**
* put请求
*/
const put=function(baseURL,url,data){
if(data){
data=qs.stringify(data);
}
return request({
baseURL,
url: url,
method: 'put',
data:data,
headers:{'Content-Type':'application/x-www-form-urlencoded'}
})
}
const putJson=function(baseURL,url,data){
return request({
baseURL,
url: url,
method: 'put',
data:data,
headers:{'Content-Type':'application/json;charset=utf-8'},
})
}
export default {
tokenName:TokenName,
request,
get,
post,
postJson,
postJsonToFile,
put,
putJson,
}

View File

@@ -1,7 +1,7 @@
import ajax from '../ajax';
/**对应用户中心新的接口*/
import ajax from './boeAjax';
//const baseURL = process.env.VUE_APP_CESOURCE_BASE_API;
const baseURL ="userbasic";
const baseURL ="/userbasic";
/**
* 获取用户的组织机构
@@ -11,7 +11,43 @@ const userParentOrg = function() {
return ajax.post(baseURL,'/org/userParentOrg',{});
}
//https://u-pre.boe.com/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});
}
/**根据用户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',{});
}
/**
* 获取hrbp数据
*/
const getOrgHrbpInfo = function(orgId) {
return ajax.postJson(baseURL,'/org/orgHrbpInfo',{orgId});
}
export default {
userParentOrg
userParentOrg,
findOrgsByKeyword,
findOrgTreeByOrgId,
getUserInfoById,
getUserCrowds,
getOrgHrbpInfo
}

View File

@@ -142,32 +142,32 @@ const exportPdfPre=function (data){
* */
const exportPdf=function (udata){
// return ajax.postJson(baseURL,'/xboe/subgroup/m/noteinfo/exportPdf',data);
//return ajax.post(baseURL,'/xboe/subgroup/m/noteinfo/exportPdf',data);
var url = baseURL + '/xboe/subgroup/m/noteinfo/exportPdf';
axios({
method: 'POST',
url: url,
data:udata,
responseType: 'blob',
headers: { 'XBOE-Access-Token':getToken(),'Content-Type':'application/pdf;charset=utf-8'}
}).then(res => {
//resolveBlob(res, mimeMap.zip);
console.log(res);
const aLink = document.createElement('a')
var blob = new Blob([res.request.response], { type: 'application/pdf' })
return ajax.postJson(baseURL,'/xboe/subgroup/m/noteinfo/expPdf',udata);
// var url = baseURL + '/xboe/subgroup/m/noteinfo/exportPdf';
// axios({
// method: 'POST',
// url: url,
// data:udata,
// responseType: 'blob',
// headers: { 'XBOE-Access-Token':getToken(),'Content-Type':'application/pdf;charset=utf-8'}
// }).then(res => {
// //resolveBlob(res, mimeMap.zip);
// console.log(res);
// const aLink = document.createElement('a')
// var blob = new Blob([res.request.response], { type: 'application/pdf' })
// //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名;
//var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
//var contentDisposition = decodeURI(res.headers['content-disposition'])
//var result = patt.exec(contentDisposition)
//var fileName = result[1]
//fileName = fileName.replace(/\"/g, '')
aLink.href = URL.createObjectURL(blob)
aLink.setAttribute('download','我的笔记.pdf') // 设置下载文件名称
document.body.appendChild(aLink)
aLink.click()
document.body.removeChild(aLink)
// aLink.href = URL.createObjectURL(blob)
// aLink.setAttribute('download','我的笔记.pdf') // 设置下载文件名称
// document.body.appendChild(aLink)
// aLink.click()
// document.body.removeChild(aLink)
})
// })
}
/**

View File

@@ -43,7 +43,7 @@ const page=function (query){
}
/**
* 关注的人列表
* 关注的人列表
* @param{
* pageIndex
* pageSize,

View File

@@ -437,6 +437,9 @@
}
// boe-index
@media screen and (max-width: 1366px){
.xindex-case .case-conent .cast-time{
font-size: 13px !important;
}
.portal-index-title{
font-size: 14px;
font-weight: 500;
@@ -448,7 +451,7 @@
width: 260px;
}
.case-inter-orgin{
width: 56%;
// width: 56%;
}
.btn-user{
width: 70px;
@@ -482,11 +485,11 @@
padding: 10px 40px;
.personal-box {
margin-left: 0px;
margin-top: 10px;
// margin-top: 10px;
margin-bottom: 0px;
}
.personal-ul{
margin-top: 7px;
margin-top: 0px;
}
}
@@ -499,7 +502,7 @@
margin-bottom: 20px;
.xindex-course-image{
width: 220px;
width: 213px;
height: 123px;
::v-deep .course-image{
height: 100% !important;
@@ -550,7 +553,7 @@
height: 69px;
}
.case-conent{
width: 200px;
width: 220px;
height: 169px;
// top:20px;
// left:25px;
@@ -711,7 +714,7 @@
}
@media screen and (max-width: 1680px) and (min-width:1367px){
.case-inter-orgin{
width: 47%;
// width: 47%;
}
.portal-index-title{
font-size: 16px;

View File

@@ -7,7 +7,7 @@ body {margin: 0px;padding: 0px;}
::-webkit-scrollbar {
width: 8px;
height: 10px;
scrollbar-color: #009cea #f7f7f9; /* 滑块颜色 滚动条背景颜色 */
scrollbar-color: #c1c1c1 #f7f7f9; /* 滑块颜色 滚动条背景颜色 */
scrollbar-width: thin; /* 滚动条宽度有三种thin、auto、none */
}
@@ -15,7 +15,7 @@ body {margin: 0px;padding: 0px;}
::-webkit-scrollbar-thumb {
//background-color: #D8D8D8;
border-radius: 3px;
background-color: rgb(103, 197, 255);
background-color: #c1c1c1;
}
::-webkit-scrollbar-thumb:hover {
@@ -367,6 +367,15 @@ body {margin: 0px;padding: 0px;}
padding-bottom:10px
}
}
.title-myqalist{
margin-right: 5px !important;
}
.btn-right{
.btn{
width: 120px !important;
height: 40px !important;
}
}
.course-card {
padding:20px;
margin-right: 20px;
@@ -381,6 +390,17 @@ body {margin: 0px;padding: 0px;}
height: 122px;
}
}
.course-tit{
float: none !important;
}
.sysType-box{
margin-top: 10px;
float: none !important;
}
.tit-float{
height: 45px !important;
}
}
@media screen and (max-width: 1680px) and (min-width:1367px){

View File

@@ -0,0 +1,125 @@
<template>
<!--弹出窗口设置-->
<div>
<el-dialog :close-on-press-escape="false" :close-on-click-modal="false" class="medalbox" :visible.sync="showGonggao" :append-to-body="true" >
<div class="dlg-box" :style="`width:${config.width};height:${config.height}; background: url(${webBaseUrl}/images/gonggao/${config.bgImage}.png) no-repeat;`">
<span class="dlg-close" @click="showGonggao = false"><i style="font-size: 28px;color: #999;" class="el-icon-close"></i></span>
<div style="text-align:left;">
<div class="dlg-title" v-html="config.title"></div>
<div class="dlg-content" v-html="config.content"></div>
</div>
<div v-if="config.btnText"><a :href="config.pcUrl" @click="showGonggao = false" target="_blank" :style="{'background-color':config.btnColor}" class="dlg-button">{{config.btnText}}</a> </div>
<div v-if="config.author" style="text-align: right;padding-top: 20px;"><span>{{config.author}}</span> </div>
</div>
</el-dialog>
</div>
</template>
<script>
export default{
props:{
config: {
type:Object,
default(){
return{
id:'',//数据id
closeable:false,//不可以关闭
width:'500px',//宽度
height:'500px',
title:'公告',//标题
content:'',//文字内容
bgImage:'dlg_bg',//背景图
pcUrl:'',//点击后打开的地址,最好是使用相对地址
h5Url:'',
btnText:'立即参与',//
btnColor:'#008BFF',
author:'',
type:0,//0表不控制
}
}
},
},
data() {
return {
showGonggao:false,
sessionKey:'alertpopup',
};
},
mounted() {
let loadNum = localStorage.getItem(this.sessionKey);
let hasFlag = sessionStorage.getItem(this.sessionKey);
let $this=this;
if(!hasFlag){
let times=0;
if(loadNum){
times=Number(loadNum);
}
if(times<3){
let now=new Date();
let min=new Date(2022,10,9,0,0,0);
let max=new Date(2022,11,1,0,0,0);
//console.log(now,min,max);
//console.log(now.getTime(),min.getTime(),max.getTime());
if(now.getTime()>min.getTime() && now.getTime()<max.getTime()){
//console.log('open')
this.showGonggao=true;
times++;
localStorage.setItem(this.sessionKey,times);
sessionStorage.setItem(this.sessionKey,1);
}
}
}
}
}
</script>
<style scoped lang="scss">
.dlg-box{
text-align: center;
//background: transparent !important;
padding:120px 60px 20px 50px;
}
.dlg-title{
color: #333333;
font-size: 26px;
padding: 30px 0px;
text-align: center;
font-weight: 600;
}
.dlg-content{
color: #333333;font-size: 18px;height: 150px;
}
.dlg-button{
border-radius: 22px;
display: inline-block;
font-size: 18px;
padding: 10px;
width: 300px;
height: 46px;
text-align: center;
color: #fff;
}
.dlg-close{
float: right;
margin-top: -90px;
cursor: pointer;
}
.medalbox {
::v-deep .el-dialog{
background: transparent !important;
box-shadow:none !important;
.el-dialog__header{
display: none !important;
}
.el-dialog__body{
// width: 320px !important;
// height: 420px !important;
background: transparent !important;
}
}
}
</style>

View File

@@ -14,7 +14,11 @@
<div class="share-time">{{ item.time }}</div>
</div>
<div class="coures-content">
<span>文章</span>{{item.title}}
<div style="width: 100%;">文章{{item.title}}</div>
<div style="color: #999999;font-size: 12px;font-weight: normal; cursor: pointer;width: 50px;" v-if="!item.isRead&&type=='myShare'" @click.stop="deleteshares(item)">
<svg-icon icon-class="withdraw" style="margin-right: 5px;font-size: 14px;" ></svg-icon>
撤回
</div>
</div>
</div>
<!-- 旧版 -->
@@ -130,11 +134,15 @@ export default {
width: 100%;
padding: 30px 0;
border-bottom:1px solid #e9e9e9 ;
.coures-content{
margin-top: 20px;
font-size: 16px;
color: #333333;
font-weight: 600;
word-break:break-all;
display: flex;
justify-content: space-between;
span{
font-size: 16px;
margin-left: -9px;
@@ -142,10 +150,12 @@ export default {
}
.coures-head{
display: flex;
.share-name{
font-size: 14px;
color: #666666;
margin-right: 17px;
cursor: pointer;
}
.share-time{
font-size: 14px;

View File

@@ -14,7 +14,10 @@
<div class="share-time">{{ item.time }}</div>
</div>
<div class="coures-content">
<span>案例</span>{{item.title}}
<div style="width: 100%;">案例{{item.title}}</div>
<div v-if="!item.isRead&&type=='myShare'" @click.stop="deleteshares(item)" style="color: #999999;font-size: 12px;font-weight: normal;width: 50px;">
<svg-icon icon-class="withdraw" style="margin-right: 5px;font-size: 14px;" ></svg-icon>
撤回</div>
</div>
</div>
@@ -121,6 +124,9 @@ export default {
font-size: 16px;
color: #333333;
font-weight: 600;
word-break:break-all;
display: flex;
justify-content: space-between;
span{
font-size: 16px;
margin-left: -9px;

View File

@@ -109,8 +109,8 @@
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
</el-form-item>
<el-form-item label="受众" v-if="!weike.onlyRequired">
<el-select value-key="key" style="width: 100%;" v-model="courseCrowds" filterable multiple placeholder="请选择">
<el-option v-for="item in userGroupList" :key="item.key" :label="item.value" :value="item"></el-option>
<el-select value-key="id" style="width: 100%;" v-model="courseCrowds" filterable multiple :clearable="false" @remove-tag="removeCrowd" placeholder="请选择">
<el-option v-for="item in userGroupList" :key="item.id" :disabled="item.disabled" :label="item.name" :value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="课程价值" v-if="!weike.onlyRequired">
@@ -259,8 +259,8 @@
<el-input maxlength="50" v-model="courseInfo.forUsers" show-word-limit placeholder="目标人群(限50字以内)"></el-input>
</el-form-item>
<el-form-item label="受众"><!--:disabled="item.disabled"-->
<el-select value-key="key" style="width: 100%;" v-model="courseCrowds" filterable multiple placeholder="请选择">
<el-option v-for="item in userGroupList" :key="item.key" :label="item.value" :value="item"></el-option>
<el-select value-key="id" style="width: 100%;" v-model="courseCrowds" filterable multiple placeholder="请选择">
<el-option v-for="item in userGroupList" :key="item.id" :label="item.name" :value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="课程价值"><el-input maxlength="200" v-model="courseInfo.value" show-word-limit placeholder="课程价值(限200字以内)"></el-input></el-form-item>
@@ -550,12 +550,24 @@ export default {
showChooseOrg(){
this.$refs.refChooseOrg.dlgShow = true;
},
removeCrowd(e){
//console.log(e);
if(e.disabled){
this.$message.error("您不能移除创建人加的受众");
this.courseCrowds.push(e);
return false;
}
},
confirmChooseOrg(orgInfo){
//console.log(orgInfo,'orgInfo');
this.orgName=orgInfo.name;
this.orgKid=orgInfo.kid;
this.courseInfo.orgId=orgInfo.id;
this.$refs.refChooseOrg.dlgShow = false;
//console.log(orgInfo,'orgInfo');
// if(!orgInfo.hrbpId || orgInfo.hrbpId=='0'){
// this.$message.error("此机构无HRBP审核人信息请重新选择");
// return;
// }
this.orgName=orgInfo.name;
this.orgKid=orgInfo.kid; //kid已不存在
this.courseInfo.orgId=orgInfo.id;
this.$refs.refChooseOrg.dlgShow = false;
},
getTeacherList(res) {
this.teacherValues = res;
@@ -585,11 +597,31 @@ export default {
loadSysTypes: 'sysType/loadSysTypes'
}),
loadUserGroup(){
let $this=this;
apiUserGroup.findByName('').then(rs=>{
if(rs.status==200){
this.userGroupList=rs.result;
let crowdList=[];
rs.result.forEach(item=>{
crowdList.push({
id:item.key,
name:item.value,
disabled:false
})
})
this.userGroupList=crowdList;
}
});
// apiUserBasic.getUserCrowds().then(rs=>{
// if(rs.status==200){
// let crowdList=[];
// rs.result.forEach(item=>{
// crowdList.push({
// id:item.kid,
// name:item.audienceName
// })
// })
// }
// })
},
resOwnerName(code) {
if (code == '') {
@@ -780,6 +812,7 @@ export default {
},
async getDetail(id) {
this.curCourseId = id;
this.orgName='';
let $this = this;
try {
const { result, status } = await apiCourse.detail(id);
@@ -801,10 +834,13 @@ export default {
$this.orgName=rrs.result.name;
$this.orgKid=rrs.result.kid;
$this.orgNamePath=rrs.result.namePath;
}else{
this.courseInfo.orgId='';
//this.$message.error('资源归属已变更,请重新选择');
}
})
}else{
//
//this.$message.error('无机构关联,不需要提示');
}
})
@@ -814,6 +850,9 @@ export default {
$this.orgName=rrs.result.name;
$this.orgKid=rrs.result.kid;
$this.orgNamePath=rrs.result.namePath;
}else{
$this.courseInfo.orgId='';
$this.$message.error('资源归属已变更,请重新选择');
}
})
}
@@ -844,14 +883,13 @@ export default {
if(result.crowds && result.crowds.length>0){
result.crowds.forEach(crowd=>{
let newCrowd={
key:crowd.groupId,
value:crowd.groupName,
disabled:false,
text:''
id:crowd.groupId,
name:crowd.groupName,
disabled:false
}
crowdList.push(newCrowd);
let hasUG=$this.userGroupList.some(ug=>{
return ug.key==crowd.groupId;
return ug.id==crowd.groupId;
});
if(!hasUG){
newCrowd.disabled=true;
@@ -1088,8 +1126,8 @@ export default {
let crowds=[];
this.courseCrowds.forEach(item=>{
crowds.push({
groupId:item.key,
groupName:item.value
groupId:item.id,
groupName:item.name
})
});
//以下是老师内容的处理
@@ -1238,10 +1276,10 @@ export default {
this.$message.error('请选择资源归属');
return;
}
if(!this.orgKid){
this.$message.error('资源归属无关联HRBP信息');
return;
}
// if(!this.orgKid){
// this.$message.error('资源归属无关联HRBP信息');
// return;
// }
//console.log(this.resOwnerListMap[0],'this.resOwnerListMap[0]');
//return;
@@ -1327,8 +1365,8 @@ export default {
let crowds=[];
this.courseCrowds.forEach(item=>{
crowds.push({
groupId:item.key,
groupName:item.value
groupId:item.id,
groupName:item.name
})
});
@@ -1343,7 +1381,19 @@ export default {
};
this.btnLoading = true;
let $this = this;
//先获取课程内容
console.log(this.courseInfo.orgId,'this.courseInfo.orgId')
//先获取HRBP审核 人员信息,姓名,机构路径,工号,用于邮件中的信息
// apiUserBasic.getOrgHrbpInfo(this.courseInfo.orgId).then(rs=>{
// if(rs.status==200 && rs.result){
// postData.auditUser={
// email:rs.result.email,
// code:rs.result.userNo,
// name:rs.result.name,
// aid:rs.result.id,
// orgId:rs.result.orgId
// }
// postData.course.orgName=rs.result.orgNamePath+'/'+rs.result.orgName;
apiHRBP.getHRBP(this.orgKid).then(rs=>{
if(rs.status==200 && rs.result.length>0){
let hrbpUser=rs.result[0];
@@ -1355,6 +1405,7 @@ export default {
orgId:hrbpUser.orgnization_id
}
postData.course.orgName=hrbpUser.orgnization_name_path+'/'+$this.orgName;
apiCourse.submitCourse(postData).then(res => {
//this.btnLoading=false;
setTimeout(function() {

View File

@@ -161,7 +161,6 @@ export default {
//$this.controlHeight=h-
this.listHeight=val-95;
this.inputHeight=(val-220);
this.inputRows=parseInt(this.inputHeight/30);
if(this.inputRows>20){
this.inputRows=20;
@@ -492,6 +491,8 @@ export default {
.newcote-text {
// margin-top: 24px;
word-break: break-all;
word-wrap: break-word;
font-size: 14px;
color: #333333;
height: 100%;
@@ -560,15 +561,12 @@ export default {
.mynote-tab {
width: 180px;
margin-top: 17px;
display: flex;
div {
font-size: 16px;
color: #666666;
flex: 1;
}
.noteactive span {
font-weight: 600;
color: #333333;

View File

@@ -14,7 +14,10 @@
<div class="share-time">{{ item.time }}</div>
</div>
<div class="coures-content">
<span>课程</span>{{item.title}}
<div style="width: 100%;">课程{{item.title}}</div>
<div v-if="!item.isRead&&type=='myShare'" @click.stop="deleteshares(item)" style="color: #999999;font-size: 12px;font-weight: normal;width: 50px;">
<svg-icon icon-class="withdraw" style="margin-right: 5px;font-size: 14px;" ></svg-icon>
撤回</div>
</div>
</div>
@@ -166,6 +169,9 @@ export default {
font-size: 16px;
color: #333333;
font-weight: 600;
word-break:break-all;
display: flex;
justify-content: space-between;
span{
font-size: 16px;
margin-left: -9px;

View File

@@ -66,7 +66,7 @@
</div>
</div>
</div>
<div style="margin-top:35px;text-align: center;"> <el-button type="primary" @click="saveContent(1)" size="mini">保存</el-button> </div>
<div style="margin-top:35px;text-align: center;"> <el-button :loading="loading" type="primary" @click="saveContent(1)" size="mini">保存</el-button> </div>
</div>
<!--音频-->
<div v-if="cware.content.contentType==20">
@@ -92,7 +92,7 @@
<br/>
</div>
</div>
<div style="margin-top:35px;text-align: center;"> <el-button type="primary" @click="saveContent(1)" size="mini">保存</el-button> </div>
<div style="margin-top:35px;text-align: center;"> <el-button :loading="loading" type="primary" @click="saveContent(1)" size="mini">保存</el-button> </div>
</div>
</div>
<!--图片-->
@@ -125,7 +125,7 @@
<div>
<div><WxEditor v-model="cware.content.content" :minHeight="300"></WxEditor></div>
<div style="text-align: center;padding-top: 20px;">
<el-button @click="saveContent(1)" type="primary">保存</el-button>
<el-button :loading="loading" @click="saveContent(1)" type="primary">保存</el-button>
<!-- <el-button @click="deleteContent(1)" type="danger">删除</el-button> -->
</div>
</div>
@@ -231,7 +231,7 @@
</el-form-item>
</el-form>
<div style="text-align: center;padding: 10px;">
<el-button type="primary" @click="saveContent(2)">保存</el-button>
<el-button :loading="loading" type="primary" @click="saveContent(2)">保存</el-button>
<el-button type="danger" @click="deleteContent(2)">删除</el-button>
</div>
</div>
@@ -308,7 +308,7 @@
<div>自定义考试</div>
<div>
<el-checkbox v-model="exam.onlyQuestion">只显示试题</el-checkbox>
<el-button style="margin-left: 10px;" @click="saveContent(3)" type="primary" > </el-button>
<el-button :loading="loading" style="margin-left: 10px;" @click="saveContent(3)" type="primary" > </el-button>
<el-button style="margin-left: 10px;" @click="deleteContent(3)" type="danger" > </el-button>
</div>
</div>
@@ -322,7 +322,7 @@
-->
<el-form-item label="考试时长">
<el-col :span="8">
<el-input v-model="exam.info.testDuration" placeholder="20-120">
<el-input size="mini" v-model="exam.info.testDuration" placeholder="20-120">
<template slot="append">分钟</template>
</el-input>
</el-col>
@@ -331,9 +331,9 @@
<el-input-number v-model="exam.info.times" :min="0" :max="10" label="0表不限制"></el-input-number>
</el-form-item>
</el-col> -->
<el-col :span="9">
<el-col :span="12">
<el-form-item label="及格线">
<el-input placeholder="20-120" v-model="exam.info.passLine">
<el-input size="mini" placeholder="20-100" :maxlength="3" v-model="exam.info.passLine">
<template slot="append">%</template>
</el-input>
</el-form-item>
@@ -376,9 +376,9 @@
<el-radio :label="2">最后一次</el-radio>
</el-radio-group>
</el-col>
<el-col :span="15">
<el-col :span="16">
<el-form-item label="百分制">
<el-checkbox v-model="exam.info.percentScore">按百分制显示成绩实际成绩*100/实际总分</el-checkbox>
<el-checkbox v-model="exam.info.percentScore">实际成绩*100/实际总分</el-checkbox>
</el-form-item>
</el-col>
</el-form-item>
@@ -559,6 +559,7 @@
},
data(){
return {
loading:false,
converStatus:4,
courseFileShow:false,
curContent:{id:'',contentType:0,contenRefId:''},
@@ -683,13 +684,14 @@
testDuration:30,
showAnalysis:false,
showAnswer:false,
times:1,
times:0,
qnum:0,//试题数量,只是模式是随机生成试题时才会有
arrange:0,
scoringType:1,
passLine:60,
randomMode:false,
percentScore:true,
passLine:60,
paperType:1,//自定义试卷
paperId:'',//试卷的id,只有paperType为2的时间才会有值
info:'',//考试说明
@@ -945,6 +947,7 @@
this.$message.error("请先保存课程信息再添加课件等信息");
return;
}
this.loading=true;
let postData={
type:10,
content:null,
@@ -1036,6 +1039,9 @@
}else{
this.$message.error(res.message);
}
this.loading=false;
}).catch(err=>{
this.loading=false;
})
},
deleteContent(index){

View File

@@ -9,6 +9,7 @@
<script>
import { mapGetters} from 'vuex';
import apiFollow from "@/api/phase2/userfollow.js"
import apiUser from "@/api/system/user.js";
export default{
name:"followButton",
props:{
@@ -50,14 +51,15 @@
watch:{
has(newVal,oldVal){
this.has=newVal;
console.log(newVal,oldVal,'测试问题');
this.hasFollow=newVal;
if(newVal!=oldVal && this.auto){
this.autoCheck();
}
},
aid(newVal){
this.aid=newVal;
aid(newVal,oldVal){
//this.aid=newVal;
}
},
methods: {
@@ -105,7 +107,28 @@
if(res.status == 200) {
$this.hasFollow=true;
$this.$message.success("关注成功");
$this.$emit('add',$this.aid,$this.data);
// $this.$emit('add',$this.aid,$this.data);
let pageId = this.$xpage.getHomeId(this.$route);
if(pageId == this.userInfo.aid) {
apiUser.getByIds([this.aid]).then(rs => {
if (res.status == 200) {
let data = {
has:true,
userFollow:{
aid:res.result.aid,
followId:res.result.followId,
followTime:res.result.followTime,
id:res.result.id,
authorInfo:rs.result[0],
}
}
$this.$emit('add',data);
} else {
this.$message.error(res.message);
}
});
}
} else {
$this.$message.error("关注失败:"+res.message);
$this.$emit('error',$this.aid);
@@ -120,6 +143,7 @@
<style scoped>
.follow-btn{
cursor: pointer;
/* margin-top: 18px;
height: 40px;
width: 140px; */

View File

@@ -15,26 +15,28 @@
<course-image width="254px" height="144px" :course="item.info"></course-image>
</div>
<div class="data-cen pointer" @click="jumpDetail(item)">
<h6 class="course-tit portal-title-tow">{{item.info.courseName || item.contentInfo}}
<span class="sysType-name" v-if="item.info.sysType1 !='' && item.info.sysType1 != 0">{{sysTypeName(item.info.sysType1)}}</span>
<span class="sysType-name" v-if="item.info.sysType2 !='' && item.info.sysType2 != 0">{{sysTypeName(item.info.sysType2)}}</span>
<span class="sysType-name" v-if="item.info.sysType3 !='' && item.info.sysType3 != 0">{{sysTypeName(item.info.sysType3)}}</span>
<span class="score-info" v-if="toScore(item.info.lastScore) > 0">{{toScore(item.info.lastScore)}}</span>
<div class="tit-float" >
<h6 class="course-tit portal-title-tow">{{item.info.courseName || item.contentInfo}}
</h6>
<div class="sysType-box">
<span class="sysType-name" v-if="item.info.sysType1 !='' && item.info.sysType1 != 0">{{sysTypeName(item.info.sysType1)}}</span>
<span class="sysType-name" v-if="item.info.sysType2 !='' && item.info.sysType2 != 0">{{sysTypeName(item.info.sysType2)}}</span>
<span class="sysType-name" v-if="item.info.sysType3 !='' && item.info.sysType3 != 0">{{sysTypeName(item.info.sysType3)}}</span>
<span class="score-info" v-if="toScore(item.info.lastScore) > 0">{{toScore(item.info.lastScore)}}</span>
</div>
</div>
<p class="title-info">{{item.info.summary}}</p>
<div class="pro-line"> <div>当前进度</div> <div style="width:200px"><el-progress :percentage="item.info.progress"></el-progress></div></div>
<p class="portal-time">最新一次学习时间{{item.eventTime}}</p>
</div>
<div style="width:150px">
<!-- <div class="follow-hide pointer" style="text-align: right;" v-if="!isDynamic && personal">
<span v-if="item.hidden">已隐藏</span>
<span v-else @click="emitHide(item.id)"> <svg-icon style="margin-right: 10px;font-size:22px;padding-top: 4px;" icon-class="eyes"></svg-icon>隐藏 </span>
</div> -->
<div class="btn-right">
<!-- <el-button class="btn" type="primary" @click="jumpDetail(item)">{{item.eventKey == 'Praise' ? '我也去学' : item.aid == userInfo.aid? '继续学习' : '我也去学'}}</el-button> -->
<el-button class="btn" type="primary" @click="jumpDetail(item)">{{personal? '继续学习' : '我也去学'}}</el-button>
</div>
</div>
<div class="btn-box">
<div class="btn-right">
<el-button class="btn" type="primary" @click="jumpDetail(item)">{{personal? '继续学习' : '我也去学'}}</el-button>
</div>
</div>
</div>
</li>
@@ -98,18 +100,34 @@
if(!data.contentId){
return;
}
console.log(data.info,'data.info')
if(!data.info.enabled || data.info.deleted){
this.$message.warning("此课程已停用或已删除");
return;
}
this.$router.push({ path: '/course/detail?id=', query: { id: data.contentId } });
this.$router.push({ path: '/course/studyindex?id=', query: { id: data.contentId } });
}
}
}
</script>
<style lang="scss" scoped>
.tit-float{
height: 25px;
}
.sysType-box{
float: left;
}
.sysType-name{
display: inline-block;
padding:0px 8px;
line-height: 24px;
font-size: 12px;
border-radius:2px;
margin-right: 8px;
color: #2C68FF;
height: 24px;
background: rgba(44,104,255,0.06);
}
.data-info-ul{
margin: 0;
// padding-top: 32px;
@@ -125,18 +143,7 @@
margin: 0;
font-size: 18px !important;
line-height: 25px;
.sysType-name{
display: inline-block;
padding:0px 8px;
// margin-top: 5px;
line-height: 24px;
font-size: 12px;
border-radius:2px;
margin-right: 8px;
color: #2C68FF;
height: 24px;
background: rgba(44,104,255,0.06);
}
float: left;
}
.title-info{
font-size: 14px;
@@ -144,7 +151,7 @@
margin-top: 14px;
}
.pro-line{
margin: 30px 0 16px 0;
margin: 22px 0 16px 0;
font-size: 14px;
color: #333333;
display: flex;

View File

@@ -1,11 +1,11 @@
<template>
<div>
<ul class="follow-top-tabs">
<li class="follow-home-title tabs-index" @click="tagTab(1)">{{userInfo.aid == pageId ?'我关注的人':'关注的人'}}<span v-if="active == 1" class="line"></span></li>
<li class="follow-home-title tabs-index" @click="tagTab(2)">{{userInfo.aid == pageId ?'关注我的人':'关注的人'}}<span v-if="active == 2" class="line"></span></li>
<li class="follow-home-title tabs-index" @click="tagTab(1)">{{userInfo.aid == pageId ?'我关注的人':'TA关注的人'}}<span v-if="active == 1" class="line"></span></li>
<li class="follow-home-title tabs-index" @click="tagTab(2)">{{userInfo.aid == pageId ?'关注我的人':'关注TA的人'}}<span v-if="active == 2" class="line"></span></li>
</ul>
<div v-show="active ==1">
<div class="follow-list" v-for="(item,index) in follow.list" :key="index">
<div class="follow-list" v-for="(item,index) in follow.list" :key="item.userFollow.id">
<div style="width:60px;height:60" @click="toHome(item.userFollow.authorInfo)">
<el-avatar shape="circle" style="width:60px;height:60px" size="small" :src="baseUrl+item.userFollow.authorInfo.avatar" v-if="item.userFollow.authorInfo.avatar"></el-avatar>
<div v-else class="uavatar">
@@ -37,7 +37,7 @@
-->
</div>
<!--分页没有加-->
<div style="text-align: center; margin-top:57px;" v-show="follow.count > 0">
<div style="text-align: center; margin-top:57px;" v-show="follow.count > follow.pageSize">
<el-pagination
background
@size-change="handleSizeChange"
@@ -74,7 +74,7 @@
<p class="portal-summary-text">{{maPage.userFollow.authorInfo.sign}}</p>
</div>
<div>
<followButton :has="maPage.has" :aid="maPage.userFollow.aid"></followButton>
<followButton data="maPage.userFollow" :has="maPage.has" :aid="maPage.userFollow.aid" @add="myFollowAdd" @cancel="myFollowCancel"></followButton>
</div>
<!--
<div v-if="pageId == userInfo.aid">
@@ -89,7 +89,7 @@
-->
</div>
<!--分页没有加-->
<div style="text-align: center; margin-top:57px;" v-show="page.count > 0">
<div style="text-align: center; margin-top:57px;" v-show="followMe.count > followMe.pageSize">
<el-pagination
background
@size-change="handleSizeChange"
@@ -149,73 +149,97 @@ import apiUser from "@/api/system/user.js";
count:0,
pageIndex:1,
pageSize:10
},
page:{
pageIndex:1,
pageSize:10,
aid:'',
count:0
}
}
},
mounted() {
this.pageId = this.$xpage.getHomeId(this.$route);
this.$bus.$on('followIndex',(num)=>{
this.active = num;
})
this.pageId = this.$xpage.getHomeId(this.$route);
this.$bus.$on('followIndex',(num)=>{
this.active = num;
})
},
methods:{
toHome(ava) {
this.$router.push({path:this.$xpage.getHomePath(ava.aid)})
},
myCancelFollow(dataIndex){ //我关注的,我取消关注
//this.follow.list.splice(dataIndex,1);
},
myAddFollow(dataIndex){ //我关注的,取消关注
//this.follow.list.splice(dataIndex,1);
myCancelFollow(aid,delIdx){ //我关注的,取消关注操作
this.followMe.pageIndex=1;
this.getMyPage();
// console.log(aid,delIdx,'参数值');
// //先从我关注的人中员列表中移除
// //this.$nextTick(()=>{
// this.follow.list.splice(delIdx,1);
// //})
// // this.follow.list.forEach(one=>{
// // console.log(one.has,one.followId,'存在的用户');
// // })
// //检查“关注我的”人列表中是否有此人,有此设置设置关注状态
// this.followMe.list.some((fme,idx)=>{
// //console.log('关注我的:',fme.userFollow.aid,aid);
// if(fme.userFollow.aid==aid){
// fme.has=false;
// //console.log('设置关注状态');
// //this.$forceUpdate();
// return true
// }
// return false;
// });
},
myAddFollow(data){ //我关注的,添加关注
this.followMe.pageIndex=1;
this.getMyPage();
//检查“关注我的”人列表中是否有此人,有此设置设置关注状态
// this.followMe.list.some((item,idx)=>{
// //console.log('我关注的用户:'+item.userFollow.followId);
// if(item.userFollow.aid==data.userFollow.followId){
// item.has=true;
// return true
// }
// return false;
// });
},
myFollowAdd(data) { //关注我的,添加关注
//直接刷新“我关注的”人员列表
this.follow.pageIndex=1;
this.getPage();
// 因为转移到新的列表,所以这里需要转化一下
// let check=this.follow.list.some((item,idx)=>{
// console.log('我关注的用户:'+item.userFollow.followId,data.userFollow.followId);
// if(item.userFollow.followId==data.userFollow.followId){
// item.has=true;
// return true
// }
// return false;
// });
// if(!check){
// this.follow.list.push(data);//同步添加“我关注的”列表中
// }
},
myFollowCancel(aid){ //关注我的,取消关注
//同步,从我关注的列表中移除
this.follow.pageIndex=1;
this.getPage();
//console.log('移除用户:'+aid);
// let delIdx=-1;
// this.follow.list.forEach((item,idx)=>{
// //console.log('我关注的用户:'+item.userFollow.followId);
// if(item.userFollow.followId==aid){
// delIdx=idx;
// }
// });
// if(delIdx>-1){
// this.follow.list.splice(delIdx,1);
// }
},
toFollow(item) {
let id = '';
if(this.active == 2) {
id = item.userFollow.aid;
} else {
id = item.userFollow.followId;
}
apiFollow.save(id).then(res=>{
if(res.status == 200) {
// this.$message.success("关注成功");
this.getMyPage();
} else {
this.$message.error(res.message);
}
})
},
resetActive(){
// this.active=1;
this.follow={list:[],count:0,pageIndex:1,pageSize:10},
this.followMe={list:[],count:0,pageIndex:1,pageSize:10},
this.tagTab(this.active);
},
cancel(item,idx) {
let $this=this;
let id = '';
if(idx == 2) {
id = item.userFollow.aid;
} else {
id = item.userFollow.followId;
}
apiFollow.remove(id).then(res=>{
if(res.status == 200) {
if(idx == 2) {
this.getMyPage()
} else {
this.getPage();
}
// $this.follow.list.splice(idx,1);
}
})
},//展示全部
tagTab(num) {
this.active = num;
if(num == 1) {
@@ -250,37 +274,41 @@ import apiUser from "@/api/system/user.js";
},
getMyPage() {//关注我的,关注他的
this.page.aid = this.pageId;
this.page.pageIndex=this.followMe.pageIndex;
this.page.pageSize=this.followMe.pageSize;
let params={
aid:this.pageId,
pageIndex:this.followMe.pageIndex,
pageSize:this.followMe.pageSize
}
let $this=this;
apiFollow.mypage(this.page).then(res=>{
apiFollow.mypage(params).then(res=>{
if(res.status== 200) {
$this.followMe.count = res.result.count;
res.result.list.forEach(item=>{
item.userFollow.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null ,sign:''}
})
this.followMe.list = res.result.list;
$this.followMe.list = res.result.list;
//console.log(this.mypageList,'this.mypageList');
this.getUserData(res.result.list,2);
$this.getUserData(res.result.list,2);
}else{
console.log('加载关注我数据错误:'+res.message);
}
})
},
getPage() { //我关注的,他关注的
this.page.aid = this.pageId;
this.page.pageIndex=this.follow.pageIndex;
this.page.pageSize=this.follow.pageSize;
let params={
aid:this.pageId,
pageIndex:this.follow.pageIndex,
pageSize:this.follow.pageSize
}
let $this=this;
apiFollow.page(this.page).then(res=>{
apiFollow.page(params).then(res=>{
if(res.status== 200) {
$this.follow.count = res.result.count;
res.result.list.forEach(item=>{
item.userFollow.authorInfo = { aid: "",name: "",orgInfo: "",avatar: "",sex: null ,sign:''}
})
this.follow.list = res.result.list;
this.getUserData(res.result.list, 1);
$this.follow.list = res.result.list;
$this.getUserData(res.result.list, 1);
}
})
},
@@ -305,8 +333,9 @@ import apiUser from "@/api/system/user.js";
} else {
return false;
}
});
});
});
});
this.$forceUpdate()
} else {
this.$message.error(res.message);
}

View File

@@ -23,7 +23,7 @@
<router-link v-if="pageId == userInfo.aid" to="/user/Setting"><span class="content-one-info pointer" style="line-height: 30px;">个人设置</span></router-link>
<span v-if="pageId == userInfo.aid" style="margin-left:10px;line-height: 30px;" class="content-one-info" ><router-link to="/uc/study/courses" class="pointer" style="color:#0060FF;">个人中心</router-link></span>
<span class="content-one-info" v-if="pageId != userInfo.aid && !isFollowHas" @click="toFollow()">关注TA</span>
<spap class="Followed" @click="cancelFollow()" v-if="isFollowHas">已关注</spap>
<span class="Followed" @click="cancelFollow()" v-if="isFollowHas">已关注</span>
<el-button type="text" round class="btn-user" > <router-link :to="'/home/'+pageId+'/leaving'">{{pageId == userInfo.aid ? '留言板':'去留言'}}<i class="el-icon-arrow-right"></i> </router-link> </el-button>
<!-- <div style="height: 30px;margin-top: 10px;"> -->
@@ -119,6 +119,7 @@
}
},
mounted() {
this.pageId = this.$xpage.getHomeId(this.$route);
this.sex = this.userInfo.sex;
// 判断路由是进入的学员默认页面就重置setCurIdentity
@@ -131,6 +132,7 @@
if(this.pageId !== this.userInfo.aid) {
this.followHas();
}
},
methods:{
cancelFollow() {
@@ -350,6 +352,7 @@
}
}
.content-one-info{
cursor: pointer;
display: inline-block;
line-height: 30px;
width: 80px;

View File

@@ -50,7 +50,7 @@
</div>
<div v-if="views" style="cursor: default;" :style="`min-width: ${nodeWidth};margin-left:${data.views>1000? '40px':'20px'}`" class="interact-bar-btn" :class="{cursor:!readonly}">
<el-tooltip effect="light" content="浏览量" placement="top" :visible-arrow="false" popper-class="text-tooltip">
<svg-icon style="margin-right: 0;font-size:22px;" icon-class="eyes"></svg-icon>
<svg-icon style="margin-right: 0; font-size:22px;" icon-class="eyes"></svg-icon>
</el-tooltip>
<span class="interact-bar-value"> {{ formatNum(data.views)}}</span>
</div>

View File

@@ -15,7 +15,7 @@
<div class="comment" v-for="(com,comIdx) in list" :key="com.id">
<div class="comment-top">
<div class="comment-author">
<authorInfo :avatar="com.avatar" :name="com.name" :sex="com.sex" :info="com.orgInfo" :sign="com.sign"></authorInfo>
<authorInfo :avatar="com.avatar" :name="com.name" :sex="com.sex" :info="com.orgInfo" :sign="com.sign" :aid="com.sysCreateAid"></authorInfo>
</div>
</div>
<div class="comment-body" >
@@ -23,7 +23,7 @@
<div class="comment-content" @click="cancelReply()">
<span class="play-time" v-if="com.playTime>0"><img :src="`${webBaseUrl}/images/coteplay.png`" alt=""> {{ getHMS(com.playTime) }}</span>
<span class="portal-summary-text" style="color: #666666;" v-html="displayAll(com)"></span>
<span v-if="com.content.length>170" @click="changeIsAll(com)">
<span v-if="com.content.length>170 || com.content.split('\n').length>3" @click="changeIsAll(com)">
{{com.isAll?'收起':'全文'}}
</span>
</div>
@@ -47,7 +47,7 @@
<div class="comment" v-for="(reply,replyIdx) in com.replyList" :key="reply.id" v-if="com.showAll || replyIdx<3" :class="replyIdx===com.replyList.length-1 ? 'comment-last' : ''">
<div class="comment-top">
<div class="comment-author">
<authorInfo :avatar="reply.avatar" :name="reply.sysCreateBy" :sex="reply.sex" :info="reply.orgInfo" :sign="reply.sign"></authorInfo>
<authorInfo :avatar="reply.avatar" :aid="reply.sysCreateAid" :name="reply.sysCreateBy" :sex="reply.sex" :info="reply.orgInfo" :sign="reply.sign"></authorInfo>
<span style="margin-left: 10px;color: #8590A6;font-size:14px; ">
<!-- <svg-icon style="font-size: 10px;margin-right: 0;" icon-class="triangle"></svg-icon> -->
<span>回复了</span>
@@ -59,7 +59,7 @@
<div class="comment-info" >
<div class="comment-content" @click="cancelReply()">
<span class="portal-summary-text" style="color: #666666;" v-html="displayAll(reply)"></span>
<span v-if="reply.content.length>170" @click="changeIsAll(reply)">
<span v-if="reply.content.length>170 || com.content.split('\n').length>3" @click="changeIsAll(reply)">
{{reply.isAll?'收起':'全文'}}
</span>
</div>
@@ -371,7 +371,7 @@
objType:6,
objId:item.id
}
//console.log(item,'item'); 去读取回复
//console.log(item,'item'); 去读取回复
//2022-11-2日与产品润博确认笔记回复只显示一级不显示二级: "value",
//直接修改后台,查询全部
apiComment.listQuery(query).then(res2=>{
@@ -474,6 +474,8 @@
let content = '';
content = item.content.replace(/(\n){2,}/,'<br>');
item.content = content;
var hlength = item.content.split("\n").length;
if(!item.isAll && hlength > 3 ) {return item.content.slice(0, 5) + "...";}
if(!item.isAll && item.content && item.content.length > 150) {
return item.content.slice(0, 150) + "...";
}

View File

@@ -124,13 +124,13 @@
</div>
</div>
</div>
<gonggao></gonggao>
<popup v-if="popupConfig.id" :config="popupConfig"></popup>
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import apiMessage from '@/api/system/message.js';
import gonggao from '@/components/Gonggao.vue';
import popup from '@/components/AlertPopup.vue';
import apiBoeCourse from '@/api/boe/course.js';
import {userAvatarText} from "@/utils/tools.js";
export default {
@@ -153,7 +153,7 @@ export default {
}
},
components:{gonggao},
components:{popup},
computed: {
...mapGetters(['userInfo', 'userMsg','identity','studyTaskCount']),
@@ -169,7 +169,7 @@ export default {
},
data() {
return {
showGonggao:true,
popupConfig:{},
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
findType: '1',
keyword: '',
@@ -181,8 +181,26 @@ export default {
this.sex = this.userInfo.sex;
this.$store.dispatch('refrashMsg');
this.loadBoeData();
this.loadPopupConfig();
},
methods: {
loadPopupConfig(){
this.popupConfig={
id:'123',//数据id
closeable:false,//不可以关闭
width:'500px',//宽度
height:'500px',
title:'用户体验调研',//标题
content:'<div style="font-size:20px;font-weight: 600;padding-bottom:10px">亲爱的校友:</div><div> 诚邀您对11月4日上线的学习平台V2.0的使用体验进行测评,我们将以您的意见反馈为输入,不断的优化和改进。</div>',//文字内容
bgImage:'dlg_bg_pen',//背景图
pcUrl:'https://boehrsurvey.wjx.cn/vm/O5XcWrk.aspx',//点击后打开的地址,最好是使用相对地址
h5Url:'',
btnText:'立即参与',//
btnColor:'#008BFF',
author:'BOEU学习平台产品团队',
type:0,//0表不控制
}
},
setCurIdentity(iden){
this.$store.dispatch('SetCurIdentity',iden);
},

View File

@@ -14,7 +14,10 @@
<div class="share-time">{{ item.time }}</div>
</div>
<div class="coures-content">
<span>问答</span>{{item.title}}
<div style="width: 100%;">问答{{item.title}}</div>
<div v-if="!item.isRead&&type=='myShare'" @click.stop="deleteshares(item)" style="color: #999999;font-size: 12px;font-weight: normal;width: 50px;">
<svg-icon icon-class="withdraw" style="margin-right: 5px;font-size: 14px;" ></svg-icon>
撤回</div>
</div>
</div>
<!-- 旧版 -->
@@ -136,6 +139,9 @@ export default {
font-size: 16px;
color: #333333;
font-weight: 600;
word-break:break-all;
display: flex;
justify-content: space-between;
span{
font-size: 16px;
margin-left: -9px;

View File

@@ -33,6 +33,7 @@
<script>
import usergroupApi from "@/api/modules/usergroup";
import orgApi from "@/api/system/organiza";
import apiUserBasic from "@/api/boe/userbasic";
export default{
props:{
@@ -42,12 +43,16 @@
dlgShow:false,
orgName:'',
chooseOrg:{},
treeData:[],
departData:[],
departProps: {
children: 'children',
label: 'name'
}
}
},
mounted() {
},
methods:{
handleClose(){
@@ -63,17 +68,82 @@
}else{
return (<span class="custom-tree-node"> <span>{node.label}</span></span>);
}
},
initTree(){
apiUserBasic.findOrgsByKeyword('').then(rs=>{
rs.result.forEach(item=>{
let node={
id:item.id,
name:item.name,
children:[]
}
if(item.treeChildList){
node.children=[];
}
this.treeData.push(node)
});
});
},
readTreeNode(treeNode,listData){//递归加载组织机构树信息
let $this=this;
listData.forEach(item=>{
let node={
id:item.id,
name:item.name,
hrbpId:item.hrbpId,
children:[]
}
if(item.treeChildList){
$this.readTreeNode(node,item.treeChildList);
}
treeNode.children.push(node);
})
},
loadNode(node, resolve) {
var parentId = null;
if (node.level === 0) {
resolve([{name:'组织机构树',id:'-1'}]);
}else{
let $this=this;
if(node.level === 1){
parentId = '-1';
// apiUserBasic.findOrgsByKeyword('').then(rs=>{
// let treeList=[];
// rs.result.forEach(item=>{
// let node={
// id:item.id,
// name:item.name,
// hrbpId:item.hrbpId,
// children:[]
// }
// treeList.push(node);
// });
// resolve(treeList);
// });
}else{
parentId = node.data.id;
// apiUserBasic.findOrgTreeByOrgId(parentId).then(rs=>{
// if(rs.status==200){
// let treeList=[];
// if(rs.result.length>0 && rs.result[0].treeChildList){
// rs.result[0].treeChildList.forEach(item=>{
// let node={
// id:item.id,
// name:item.name,
// hrbpId:item.hrbpId,
// children:[]
// }
// if(item.treeChildList){
// $this.readTreeNode(node,item.treeChildList);
// }
// treeList.push(node);
// });
// }
// resolve(treeList);
// }else{
// resolve([]);
// }
// });
}
usergroupApi.userOrgs(parentId).then(res =>{
if (res.status == 200) {
@@ -92,9 +162,7 @@
this.multipleSelection = val;
},
handleDepartNodeClick(data){
this.chooseOrg.id = data.id;
this.chooseOrg.name=data.name;
this.chooseOrg.kid=data.kid;
this.chooseOrg = data;
},
confirm(){
if(!this.chooseOrg.id){

View File

@@ -128,6 +128,9 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
//this.orgInfo=cutFullName(testName,1);
this.orgInfo=cutFullName(this.userInfo.departFullName,1);
this.loadUserStat();
this.$bus.$on('u-Currency',(num)=>{
this.statData.uvalue = num;
})
},
methods:{

View File

@@ -399,7 +399,7 @@ export default {
// if(item.courseType==10){
// return this.webBaseUrl+'/course/micro?id='+item.courseId;
// }else if(item.courseType==20){
return this.webBaseUrl+'/course/detail?id='+item.courseId;
return this.webBaseUrl+'/course/studyindex?id='+item.courseId;
// }
}

View File

@@ -76,6 +76,7 @@ export const pages=[
{title:'编辑笔记',path:'Noteedit',component:'user/Noteedit',hidden:true},
{title:'我的测评',path:'myassess',component:'user/MyAssess',hidden:true},
{title:'我的收藏',path:'favorites',component:'user/MyFavorites',hidden:false},
{title:'用户调研',path:'research',component:'user/Myresearch',hidden:false},
{title:'我的关注',path:'follows',component:'user/MyFollow',hidden:false},
{title:'我的草稿',path:'mydraft',component:'user/MyDraft',hidden:false},
{title:'个人设置',path:'setting',component:'user/Setting',hidden:false},

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="19px" height="18px" viewBox="0 0 19 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>编组 19</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="我分享的" transform="translate(-1721.000000, -465.000000)" stroke-width="2">
<g id="编组-19" transform="translate(1721.644444, 465.000000)">
<path d="M2.6077919,5.0612599 L12.0876493,5.39622409 C14.7185321,5.48918451 16.8032826,7.64889926 16.8032826,10.2814239 C16.8032826,12.8874215 14.6907041,15 12.0847064,15 L4.93033545,15 L4.93033545,15" id="路径-76" stroke="#999999"></path>
<polyline id="路径-77" stroke="#979797" points="6.36367768 1 2 5.8476065 6.36367768 9.03062995"></polyline>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 901 B

View File

@@ -189,7 +189,7 @@
</div>
</div>
<div class="list-bottom">
<interactBar :type="1" :data="item" :couseViews="true" :shares="false" :views="false"></interactBar>
<interactBar :type="1" :data="item" :couseViews="false" :shares="false" :views="false"></interactBar>
</div>
</div>
</a>
@@ -802,7 +802,6 @@
toCourseDetail(item) {
//二期调整,直接改成一个地址
//return this.webBaseUrl + '/course/detail?id=' + item.id;
console.log(item,"item");
let $this=this;
if (item.type == 10) {
//return this.webBaseUrl + "/course/studyindex?id=" + item.id;
@@ -1112,6 +1111,10 @@
</script>
<style scoped lang="scss">
.xindex-course-image:hover{
transform: scale(1.3);
transition: all 0.6s;
}
.Recent{
vertical-align: top;
width: 22px;
@@ -1167,7 +1170,7 @@
.case-inter-orgin{
// width: 45%;
float: left;
// float: left;
margin-left: 5px;
line-height: 30px;
font-size: 14px;
@@ -1583,7 +1586,7 @@
width: 100%;
.case-inter-box{
display: flex;
margin-right: 35px;
margin-right: 46px;
.case-inter-left{
flex: 1;
@@ -1591,6 +1594,9 @@
}
.interact-bar-index{
margin-left: auto;
::v-deep .svg-icon{
padding-top: 6px;
}
}
}

View File

@@ -115,6 +115,7 @@ import { courseType } from '@/utils/tools.js';
import apiAudit from '@/api/system/audit.js';
import apiHRBP from '@/api/boe/HRBP.js';
import apiOrg from '@/api/system/organiza.js';
import apiUserBasic from '@/api/boe/userbasic.js';
export default {
name: 'ucStudyIndex',
components: { studyItem, courseForm, courseImage },
@@ -206,6 +207,34 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(()=>{
//新的提交流程
// apiUserBasic.getOrgHrbpInfo(row.orgId).then(rs=>{
// if(rs.status==200 && rs.result){
// let req={
// courseId:row.id,
// email:rs.result.email,
// courseUser:row.sysCreateBy,
// courseName:row.name,
// ucode:rs.result.userNo,
// auditUser:rs.result.name,
// //ukid:hrbpUser.user_id,
// orgId:row.orgId,
// orgName:rs.result.orgNamePath +'/'+rs.result.name
// }
// apiCourse.sumbits(req).then(res=>{
// if(res.status==200){
// $this.$message.success('提交成功');
// row.status=2
// }
// if(res.status==400){
// $this.$message.error('提交失败:'+res.message);
// }
// })
// }else{
// $this.$message.error("获取HRBP审核人员失败:"+rs.message);
// }
// });
apiOrg.getSimple(row.orgId).then(rrs=>{
if(rrs.status==200){
apiHRBP.getHRBP(rrs.result.kid).then(rs=>{

View File

@@ -12,7 +12,7 @@
<h6>对不起系统无法连接请检查网络或咨询管理人员</h6>
<ul class="list-unstyled">
<li class="link-type">
<a href="/pc/login">转向登录</a>
<a :href="loginUrl">转向登录</a>
</li>
</ul>
</el-col>
@@ -33,7 +33,7 @@ export default {
components: { portalHeader, portalFooter},
data() {
return {
loginUrl:process.env.VUE_APP_LOGIN_URL
}
},
methods: {

View File

@@ -181,15 +181,16 @@
font-size: 14px;
margin-top: 18px;
display: flex;
div{
margin-right: 40px;
}
justify-content: space-between;
// div{
// margin-right: 40px;
// }
}
}
.task-btns {
text-align: right;
margin-top: 40px;
width: 100px;
width: 150px;
// height: 44px;
}
}

View File

@@ -242,6 +242,8 @@ export default {
toScoreTow,
examId:'',//考试的id
taskId:'',//考试任务的id
refId:'',//关联的id
refType:'1',//关联的类型,1表默认的独立考试
lastId:'',//最后一次提交的答卷
canExam:false,//能否参加考试
noExam:false,//不能参加考试
@@ -296,7 +298,14 @@ export default {
...mapGetters(['userInfo'])
},
mounted() {
this.examId = this.$route.query.id
this.examId = this.$route.query.id;
if(this.$route.query.refId){
this.refId = this.$route.query.refId;
}
if(this.$route.query.refType){
this.refType = this.$route.query.refType;
}
if(this.examId) {
this.loadData()
}else{
@@ -506,6 +515,7 @@ export default {
}
let that = this;
let data = {};
data.aloneId=this.taskId;
data.testId = this.testPaper.id;
data.testName = this.testPaper.testName;
data.testDuration = this.testPaper.testDuration;

View File

@@ -259,7 +259,7 @@
this.$bus.$on('followIndex',(num)=>{
this.activeName = "7";
this.$refs.followList.resetActive();
this.$refs.followList.getPage();
//this.$refs.followList.getPage();
})
},
methods:{
@@ -676,7 +676,7 @@
}else if(this.activeName == '7'){
//单独的分页,所以这里不与当前页面的分页共用
this.$refs.followList.resetActive();
this.$refs.followList.getPage();
//this.$refs.followList.getPage();
return
}
if(this.activeName == '8') {

View File

@@ -59,7 +59,6 @@
<p class="ranking-title">贡献榜</p>
<ul class="ranking-data">
<li class="index-one-line-ellipsis" v-for="(item, index) in ankingList" :key="index" style="margin-top:30px;line-height: 22px;cursor: pointer;">
<router-link :to="'article/detail?id=' + item.id">
<span class="portal-right-text orange-one" v-if="index==0" style="margin-right:20px">
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
</span>
@@ -76,7 +75,6 @@
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
</span>
<span class="portal-title-desc">{{ item.sysCreateUname }} <span class="orinfo-text"> {{ item.orinfo }}</span> </span>
</router-link>
</li>
</ul>
</div>

View File

@@ -104,8 +104,7 @@
<div class="portal-ranking ranking-bg">
<p class="ranking-title">好评榜</p>
<ul class="ranking-data">
<li v-for="(item, index) in Positive" :key="index" class="title-line-ellipsis" style="cursor: pointer;margin-top:30px;line-height: 22px;">
<router-link :to="'case/detail?id='+item.id">
<li v-for="(item, index) in Positive" :key="index" class="title-line-ellipsis" style="cursor: pointer;margin-top:30px;line-height: 22px;" @click="jumpRouter(item)">
<span class="portal-right-text blue-one" v-if="index==0">
<img :src="`${webBaseUrl}/images/listblue01.png`" alt="">
</span>
@@ -122,15 +121,13 @@
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
</span>
<span class="portal-title-desc" style="font-size: 14px;">{{ item.title }}</span>
</router-link>
</li>
</ul>
</div>
<div style="margin-top:26px" class="portal-ranking ranking-bg1">
<p class="ranking-title">人气榜</p>
<ul class="ranking-data">
<li v-for="(item, index) in Popularity" :key="index" class="title-line-ellipsis" style="cursor: pointer;margin-top:30px;line-height: 22px;">
<router-link :to="'case/detail?id='+item.id">
<li v-for="(item, index) in Popularity" :key="index" class="title-line-ellipsis" style="cursor: pointer;margin-top:30px;line-height: 22px;" @click="jumpRouter(item)">
<span class="portal-right-text orange-one" v-if="index==0">
<img :src="`${webBaseUrl}/images/list-01.png`" alt="">
</span>
@@ -147,7 +144,6 @@
<img :src="`${webBaseUrl}/images/list05.png`" alt="">
</span>
<span class="portal-title-desc" style="font-size: 14px;">{{ item.title }}</span>
</router-link>
</li>
</ul>
</div>

View File

@@ -78,9 +78,11 @@
</div>
</div>
</div>
</router-link>
<div style="height:58px;padding-top:14px ">
<author :avatar="item.authorInfo.avatar" :name="item.authorInfo.name" :info="item.authorInfo.orgInfo" :sex="item.authorInfo.sex"></author>
<author :avatar="item.authorInfo.avatar" :name="item.authorInfo.name" :info="item.authorInfo.orgInfo" :sex="item.authorInfo.sex" :aid="item.authorInfo.aid"></author>
</div>
<router-link :to="'/case/detail?id='+item.id">
<div class="keyword-text clearfix">
<div style="color:#2974D6;font-weight: 450;" v-if="item.orgDomain">{{ orgDomainTranslate(item.orgDomain) }}</div>
<div style="color:#2974D6;font-weight: 450;" v-if="item.orgDomain == '' && item.orgDomainParent">{{ orgDomainTranslate(item.orgDomainParent) }}</div>
@@ -91,7 +93,7 @@
<div v-if="item.keyword4">{{ item.keyword4 }}</div>
<div v-if="item.keyword5">{{ item.keyword5 }}</div>
</div>
</router-link>
</router-link>
<div class="case-info-summary two-line-ellipsis" @click="jumcasedet(item)">
{{ item.summary }}
<!-- <router-link :to="'/case/detail?id='+item.id"> -->
@@ -112,11 +114,11 @@
<div class="pagination-div">
<span class="pag-text" @click="loadMore()" v-if="moreState == 1">加载更多</span>
<span class="pag-text-msg" v-else-if="moreState == 2">数据加载中</span>
<span class="notcoures" v-else-if="moreState == 3 && !isSeach && caseList.count>0">
<img :src="`${webBaseUrl}/images/nocase.png`" alt="">
<span class="notcoures" v-else-if="caseList.list.length == 0">
<img :src="`${webBaseUrl}/images/nocase.png`" alt="">
<h5>暂无案例请优先学习其它案例吧</h5>
</span>
<span class="pag-text-msg" v-else-if="isSeach">没有查询到相关内容</span>
<!-- <span class="pag-text-msg" v-else-if="isSeach">没有查询到相关内容</span> -->
</div>
<div v-if="isSeach" style="height:382px">
</div>

View File

@@ -965,19 +965,12 @@ export default {
border-radius: 8px;
}
}
::v-deep .course-image-box :hover .el-image{
// transition: all 0.5s;
//z-index: 999;
//position: absolute;
//top: -50px;
//left: -35px;
//width: 420px !important;
//height: 236px !important;
.course-image-box:hover{
transform: scale(1.3);
transition: all 0.6s;
}
.list-active{
display: none;
// width: 458px;

View File

@@ -734,7 +734,6 @@ export default {
if (res.status == 200) {
this.messageSave("set");
//消息
console.log(data,'data');
let event = {
key: "AnswerBest",//设置为最佳答案
title: "回答被选为最佳答案",//
@@ -747,7 +746,6 @@ export default {
aname: this.userInfo.name,//当前人的姓名
status: 1 //状态直接写1
}
console.log(event,'event');
this.$store.dispatch("userTrigger", event);
this.loadAnswer();
this.getQuestionDetail();

View File

@@ -35,7 +35,7 @@
<div class="qa-info-box">
<div class="qa-info">
<div class="qa-info-title" @click="jumpDetail(qa)">
<div class="portal-title-tow one-line-ellipsis">
<div class="qa-titleft portal-title-tow one-line-ellipsis">
<span class="qa-solve" v-if="qa.isResolve == false" @click="searchData()">待解决</span>
<span class="qa-basic qa-unSolve" v-if="qa.isResolve == true" @click="searchData()">已解决</span>
<span v-html="$keywordActiveShow(qa.title,queryKeyWord)"></span>
@@ -637,6 +637,12 @@ export default {
margin-right: 5px;
}
}
.qa-titleft{
flex: 1;
}
.portal-time{
margin-left: auto;
}
}
.qa-info-re{
color: #3e7fff;

View File

@@ -43,6 +43,23 @@
<!-- 临时增加上线一段时间后删除 结束 -->
<div class="msg-list">
<a href="javascript:void(0);">
<div class="msg-top">
<div>
<span style="padding-right: 10px;"><el-checkbox disabled></el-checkbox></span>
<!-- <router-link to="../../user/Myresearch.vue" > -->
<span @click="jumResearch()">系统消息</span>
<!-- </router-link> -->
</div>
</div>
<div class="msg-body" @click="jumResearch()">
<div class="msg-body-content">学习平台 V2.0邀您进行用户调研体验</div>
</div>
<div class="msg-time">2022-11-23 12:40:50</div>
</a>
</div>
<div class="msg-list" v-for="(item, index) in data" :key="index">
<div class="msg-top">
@@ -136,6 +153,10 @@ export default {
this.isReadChooseList();
},
methods: {
jumResearch(){
this.$router.push('/user/research');
// return this.webBaseUrl + '/src/views/user/myResearch.vue';
},
queryMessage(flag) {
this.showMessage = '加载中...';
if (flag) {

View File

@@ -4,7 +4,7 @@
<div>
<div style="display: flex;justify-content:space-around;padding: 12px 22px 10px 18px;">
<!--<div style="padding: 0px 5px;"><el-cascader clearable v-model="params.type" :options="typeList"></el-cascader></div>-->
<div class="uc-center-page" style="margin-right:30px">我的提问</div>
<span class="title-myqalist">我的提问</span>
<div style="padding: 0px 5px;">
<el-select v-model="queryObj.isResolve" class="uc-select" clearable placeholder="状态">
<el-option label="全部" value=""></el-option>
@@ -122,6 +122,13 @@ export default {
</script>
<style scoped lang="scss">
.title-myqalist{
font-size: 18px;
color: #333333;
font-weight: 600;
line-height: 35px;
margin-right: 30px;
}
.uc-badge {
margin-top: 10px;
margin-right: 40px;

View File

@@ -1,9 +1,9 @@
<template>
<div>
<div style="display: flex;justify-content:space-between; padding: 12px 32px 10px 22px;">
<div style="display: flex;justify-content:space-between; padding: 12px 32px 10px 18px;">
<div style="display: flex;justify-content: flex-start;">
<div class="uc-center-page">我报名的</div>
<div style="margin-left:32px">
<span class="title-myqalist">我报名的</span>
<div style="margin-left:5px">
<el-select v-model="courseType" class="uc-select" clearable placeholder="类型">
<el-option label="全部类型" value='1'></el-option>
<!-- <el-option label="微课" :value="10"></el-option> -->
@@ -316,11 +316,11 @@ computed: {
// this.$router.push({path:'/course/micro',query:{id:item.courseId}})
// }
// if(item.courseType==20){
if(item.progress>0 && item.progress<100) {
// if(item.progress>0 && item.progress<100) {
this.$router.push({path:'/course/studyindex',query:{id:item.courseId}})
} else {
this.$router.push({path:'/course/detail',query:{id:item.courseId}})
}
// } else {
// this.$router.push({path:'/course/detail',query:{id:item.courseId}})
// }
// }
}
@@ -412,6 +412,13 @@ computed: {
</script>
<style scoped lang="scss">
.title-myqalist{
font-size: 18px;
color: #333333;
font-weight: 600;
line-height: 35px;
margin-right: 30px;
}
.uc-title{
word-break:break-all;
float: left;

View File

@@ -752,6 +752,12 @@
return;
}
this.interactRuning = true;
let teacherId='';
if(this.teachers.length>0){
teacherId=this.teachers[0].teacherId;
}else{
teacherId=this.courseInfo.sysCreateAid
}
let postData = {
objType: 1,
objId: this.courseId,
@@ -767,7 +773,7 @@
let event = {
key: "CancelPraise",//点赞
title: "取消点赞",//事件的标题
parameters:"author:"+this.courseInfo.sysCreateAid,//用户自定义参数 name:value,name:value
parameters:"author:"+teacherId,//用户自定义参数 name:value,name:value
content: "取消点赞课程",//事件的内容
objId: this.courseId,//关联的id
objType: "1",//关联的类型
@@ -791,7 +797,7 @@
let event = {
key: "Praise",//点赞
title: "点赞",//事件的标题
parameters:"author:"+this.courseInfo.sysCreateAid,//用户自定义参数 name:value,name:value
parameters:"author:"+teacherId,//用户自定义参数 name:value,name:value
content: "点赞了课程",//事件的内容
objId: this.courseId,//关联的id
objType: "1",//关联的类型
@@ -1070,7 +1076,7 @@
},
audioPause() {
//console.log("暂停");
this.stopStudyTime();//启动追加学习时长
this.stopStudyTime();//停止追加学习时长
},
audioEnd() {
//console.log("播放结束");
@@ -1342,35 +1348,13 @@
let sen = parseInt(m / 1000); //计算秒数
duration = duration + $this.appentInterval/1000;//追加的是秒
if (sen>=60) { //一分钟保存一次
this.saveStudyDuration(duration);
// if (duration > 0) {
// let postData = {
// id: this.appentId,
// studyId: this.studyId,
// courseId: this.courseInfo.id,
// contentId: this.contentData.id,
// studyInfo: this.courseInfo.name +
// "-" +
// this.contentData.contentName,
// duration: duration
// };
// apiStudy.appendStudyTime(postData).then(rs => {
// if (rs.status == 200) {
// $this.appentId = rs.result;
// $this.appendStartTime = new Date(); //重置开始时间
// studyUtil.clearStudyDuration(); //清除本地存储
// //this.appendHandle=setTimeout(function() {$this.appendStudyTime();}, $this.appentInterval);
// } else {
// console.log(rs.message);
// }
// });
// }
this.saveStudyDuration(duration);
} else {
studyUtil.setStudyDuration(duration); //添加到本地存储中
studyUtil.setStudyDuration(duration); //添加到本地存储中
}
//启动下次追加学习时长
this.appendHandle = setTimeout(function() {
$this.appendStudyTime();
$this.appendStudyTime();
}, $this.appentInterval);
},

View File

@@ -6,7 +6,7 @@
<i class="el-icon-arrow-right"></i> </span>
<el-button icon="el-icon-document" @click="exportRecord()">导出记录</el-button>
</div>
<div style="max-height:600px;overflow-y:auto;padding-right:30px">
<div style="max-height:600px;overflow-y:auto;padding-right:30px;min-width: 370px;">
<div class="Ubi-hist">
<h6>U币历史记录</h6><span>最多保留近7天的记录</span>
<div v-show="isShowChart" >
@@ -441,7 +441,7 @@
},
legend: {
top: 'center',
right: 100,
right: 60,
orient: 'vertical',
itemWidth: 8,
itemHeight: 8,
@@ -541,6 +541,7 @@
apiStat.getUserStatTotalInfo(this.userInfo.aid).then(res => {
if (res.status == 200) {
this.uinfo.uCurrency = res.result.uvalue;
this.$bus.$emit('u-Currency',res.result.uvalue)
}
});
},

View File

@@ -6,9 +6,9 @@
<el-dropdown style="margin-left:15px" @command="exportCommand">
<el-button>导出<i class="el-icon-arrow-down el-icon--right"></i></el-button>
<el-dropdown-menu slot="dropdown">
<!--
<el-dropdown-item command="1">PDF</el-dropdown-item>
-->
<!-- <el-dropdown-item command="1">PDF</el-dropdown-item> -->
<el-dropdown-item command="2">Excel</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@@ -329,12 +329,12 @@ export default {
})
},
exportStart(){
let ids = this.datalist.map(item=>{
if(item.contentType !=3) {
return item.id;
}
})
let data = {
name:this.userData.name,
sign:this.userData.sign,
@@ -344,10 +344,30 @@ export default {
type:this.num,
startTime:this.startTime,
endTime:this.endTime,
author:this.userData.avatar,//this.userInfo.avatar,
currentUserHeadImgUrl: this.fileBaseUrl + this.userData.avatar,
currentUserSign: this.userData.sign,
currentUserName: this.userData.name,
currentUserDepartName:this.userInfo.departFullName
}
if(this.exportType == '1') {
apiNote.exportPdf(data).then(res=>{
console.log("导出pdf完成");
const link = document.createElement('a');// 创建a标签
// let blob = new Blob([res],{type: 'application/vnd.ms-pdf;charset=UTF-8'}); // 设置文件类型
let blob = new Blob([res],{type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'}); // 设置文件类型
link.style.display = "none";
link.href = URL.createObjectURL(blob); // 创建URL
link.setAttribute("download", "我的笔记.pdf");
document.body.appendChild(link);
link.click();
link.remove(); // 一次性的用完就删除a标签
this.dialogVisible = false;
})
//apiNote.exportPdf(data);
// apiNote.exportPdf(data).then(res=>{
// if(res.status) {

View File

@@ -0,0 +1,52 @@
<template>
<div>
<div class="title">学习平台 V2.0邀您进行用户体验调研</div>
<div style="margin-bottom:20px;">亲爱的校友您好</div>
<div class="content">学习平台V2.0已于11月4日上线V2.0 围绕学习激励学习社交学习偏好等用户关注的学习体验进行了改进优化现诚邀您对本次升级后的使用体验进行测评我们将以您的意见反馈为输入不断优化和改进</div>
<div class="button-box">
<a href="https://boehrsurvey.wjx.cn/vm/O5XcWrk.aspx" target="_blank"><el-button type="primary" round>立即参与</el-button></a>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import portalHeader from '@/components/PortalHeader.vue';
import portalFooter from '@/components/PortalFooter.vue';
export default {
components: {
portalHeader,
portalFooter
},
computed: {
...mapGetters(['userInfo'])
},
}
</script>
<style lang="scss" scoped>
.button-box{
width: 100%;
margin-top: 30px;
text-align: center;
button{
width: 180px;
padding: 0;
height: 30px;
font-size: #fff;
font-weight: normal;
text-align: center;
background-color: #0078FC;
}
}
.content{
font-size: 15px;
color: #000;
}
.title{
text-align: center;
margin-top: 20px;
margin-bottom: 15px;
}
</style>