mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-15 13:56:43 +08:00
Merge branch 'dev' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/portal into dev
This commit is contained in:
@@ -65,13 +65,24 @@ 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 || item.id}})
|
||||
// window.open(`${this.webBaseUrl}/article/detail?id=${item.objId}`)
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="article-info" @click="jumpRouter(item)">
|
||||
<div class="article-info-title">
|
||||
<span v-if="item.isRead" class="readed">【已查看】</span>
|
||||
<span class="noRead" v-else>【未查看】</span>
|
||||
<span v-else class="noRead" >【未查看】</span>
|
||||
<span class="title one-line-ellipsis" v-html="$keywordActiveShow(item.cases.title,keyword)"></span>
|
||||
|
||||
</div>
|
||||
@@ -52,13 +52,35 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
jumpRouter(item){
|
||||
if(this.type!='myShare'){
|
||||
apiShares.updateIsRead(item.id).then(res=>{
|
||||
if(item.type){
|
||||
if(this.type!='myShare'){
|
||||
apiShares.updateIsRead(item.shareId).then(res=>{
|
||||
if(res.status==200){
|
||||
this.$emit('confirm',item)
|
||||
}else{
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.message,
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}else{
|
||||
if(this.type!='myShare'){
|
||||
apiShares.updateIsRead(item.id).then(res=>{
|
||||
if(res.status==200){
|
||||
this.$emit('confirm',item)
|
||||
}else{
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.message,
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
console.log(item)
|
||||
|
||||
this.$router.push({path:'/case/detail',query:{id:item.cases.id}})
|
||||
// window.open(`${this.webBaseUrl}/article/detail?id=${item.objId}`)
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="article-info ">
|
||||
<div class="article-info-title " >
|
||||
<div style="width:85%" class="title-line-ellipsis">
|
||||
<router-link :to="'/case/detail?id='+item.cases.id" target="_blank" >{{item.cases.title}}</router-link>
|
||||
<router-link :to="'/case/detail?id='+item.cases.id" >{{item.cases.title}}</router-link>
|
||||
|
||||
</div>
|
||||
<div class="article-info-date">
|
||||
@@ -12,7 +12,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="article-info-summary three-line-ellipsis">
|
||||
<router-link :to="'/case/detail?id='+item.cases.id" target="_blank" > {{item.cases.summary}}</router-link>
|
||||
<router-link :to="'/case/detail?id='+item.cases.id" > {{item.cases.summary}}</router-link>
|
||||
</div>
|
||||
<div class="article-info-tools">
|
||||
<authorInfo :avatar="item.avatar" :name="item.name" :info="item.orgInfo"></authorInfo>
|
||||
|
||||
@@ -106,13 +106,24 @@ export default {
|
||||
return obj;
|
||||
},
|
||||
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)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if(item.contentType == 20) {
|
||||
this.$router.push({path:'/course/detail',query:{id:item.objId || item.id}})
|
||||
} else {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div style="display: flex;justify-content: space-around;margin-left: 20px;">
|
||||
<div class="top-nav" :class="current == 'index' ? 'current-nav' : ''"><router-link to="/index">首页</router-link></div>
|
||||
<div class="top-nav" :class="current == 'course' ? 'current-nav' : ''"><router-link to="/course">课程</router-link></div>
|
||||
<div class="top-nav" :class="current == 'case' ? 'current-nav' : ''"><router-link to="/case">案例</router-link></div>
|
||||
<div class="top-nav" v-if="caseShow" :class="current == 'case' ? 'current-nav' : ''"><router-link to="/case">案例</router-link></div>
|
||||
<div class="top-nav" :class="current == 'article' ? 'current-nav' : ''"><router-link to="/article">文章</router-link></div>
|
||||
<div class="top-nav" :class="current == 'qa' ? 'current-nav' : ''"><router-link to="/qa">问答</router-link></div>
|
||||
<div class="top-nav">
|
||||
@@ -29,7 +29,7 @@
|
||||
<el-input v-show="!hideSearch" placeholder="请输入标题搜索" style="width: 260px;" @keyup.enter.native="searchJump()" clearable maxlength="20" v-model="keyword" class="input-with-select">
|
||||
<el-select v-if="current == 'index'" v-model="findType" style="width: 75px;" slot="prepend" placeholder="请选择">
|
||||
<el-option label="课程" value="1"></el-option>
|
||||
<el-option label="案例" value="2"></el-option>
|
||||
<el-option v-if="caseShow" label="案例" value="2"></el-option>
|
||||
<el-option label="文章" value="3"></el-option>
|
||||
<el-option label="问答" value="4"></el-option>
|
||||
<!-- <el-option label="专区" value="5"></el-option> -->
|
||||
@@ -113,7 +113,7 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters(['userInfo', 'userMsg']),
|
||||
...mapGetters(['userInfo', 'userMsg','caseShow']),
|
||||
|
||||
avatarText(){
|
||||
return userAvatarText(this.userInfo.name);
|
||||
@@ -128,7 +128,6 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//console.log(this.userInfo,'111');
|
||||
this.sex = this.userInfo.sex;
|
||||
this.$store.dispatch('refrashMsg');
|
||||
this.loadBoeData();
|
||||
|
||||
@@ -73,13 +73,24 @@ 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:'/qa/answer',query:{id:item.question.id}})
|
||||
// window.open(`${this.webBaseUrl}/qa/answer?id=${item.question.id}`)
|
||||
},
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<el-tabs v-model="tabName" @tab-click="handleTabClick">
|
||||
<el-tab-pane label="报名管理" name="second">
|
||||
<div>已报名{{study.list.length}}人,共有0人报名未成功,共有{{study.list.length}}人通过审核</div>
|
||||
<el-row style="margin: 20px 0;">
|
||||
<el-row style="margin: 20px 0;" :gutter="20">
|
||||
<!-- <el-col :span="4">
|
||||
<div class="grid-content bg-purple"><el-input v-model="input" placeholder="手动添加:姓名/工号" /></div>
|
||||
</el-col>
|
||||
@@ -30,7 +30,7 @@
|
||||
<el-button type="primary" >导入学员</el-button>
|
||||
</div>
|
||||
</el-col> -->
|
||||
<el-col :offset="16" :span="3">
|
||||
<el-col :offset="13" :span="4">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-select v-model="signup.status" placeholder="状态" clearable>
|
||||
<el-option label="未审核" :value="1"></el-option>
|
||||
@@ -39,12 +39,12 @@
|
||||
</el-select>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-col :span="4">
|
||||
<div class="grid-content bg-purple"><el-input v-model="signup.name" clearable placeholder="姓名" /></div>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div class="grid-content bg-purple">
|
||||
<el-button type="primary" style="margin-left: 20px;" @click="getSignupList()" >搜ssz索</el-button>
|
||||
<el-button type="primary" @click="getSignupList()" >搜 索</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
<!-- <el-col :span="2"> -->
|
||||
@@ -55,7 +55,7 @@
|
||||
</el-row>
|
||||
<div class="tab-content">
|
||||
<!-- @selection-change="handleSelectionChange" -->
|
||||
<el-table max-height="500" border :data="study.list" style="width: 100%">
|
||||
<el-table max-height="400" border :data="study.list" style="width: 100%">
|
||||
<!-- <el-table-column type="selection" width="55"></el-table-column> -->
|
||||
<el-table-column prop="name" label="姓名"></el-table-column>
|
||||
<el-table-column prop="code" label="工号">
|
||||
@@ -78,7 +78,7 @@
|
||||
<!-- <el-button type="primary" >发送邮件</el-button>
|
||||
<el-button type="primary" >群发邮件</el-button>
|
||||
<el-button type="primary" >存为受众</el-button> -->
|
||||
<div style="float:right">
|
||||
<div style="text-align:center">
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
@@ -714,7 +714,7 @@ export default {
|
||||
line-height: 30px;
|
||||
}
|
||||
.tab-content {
|
||||
min-height: 500px;
|
||||
height: 450px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="xtop-nav">
|
||||
<div><a :href="`${webBaseUrl}/index`">首页</a></div>
|
||||
<div><a :href="`${webBaseUrl}/course`">课程</a></div>
|
||||
<div><a :href="`${webBaseUrl}/case`">案例</a></div>
|
||||
<div v-if="caseShow"><a :href="`${webBaseUrl}/case`">案例</a></div>
|
||||
<div><a :href="`${webBaseUrl}/article`">文章</a></div>
|
||||
<div><a :href="`${webBaseUrl}/qa`">问答</a></div>
|
||||
<div>
|
||||
@@ -134,7 +134,7 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userInfo', 'userMsg']),
|
||||
...mapGetters(['userInfo', 'userMsg','caseShow']),
|
||||
showName: function() {
|
||||
//console.log('name='+this.name);
|
||||
//console.log('loginName='+this.loginName);
|
||||
|
||||
@@ -7,6 +7,7 @@ const getters = {
|
||||
cachedViews: state => state.tagsView.cachedViews,
|
||||
avatar: state => state.user.info.avatar,
|
||||
userInfo: state => state.user.info,
|
||||
caseShow: state => state.user.caseShow,
|
||||
newslist: state => state.user.newslist,
|
||||
orgId: state => state.user.orgId,
|
||||
permissions: state => state.user.permissions,
|
||||
|
||||
@@ -5,6 +5,7 @@ import apiMessage from '@/api/system/message.js'
|
||||
import apiCourse from "@/api/modules/course.js";
|
||||
import apiBoeCourse from "@/api/boe/course.js";
|
||||
import apiBoeLogout from "@/api/boe/login.js";
|
||||
import caseUser from "@/utils/caseShow.js"
|
||||
|
||||
const user = {
|
||||
state: {
|
||||
@@ -14,7 +15,8 @@ const user = {
|
||||
messagesBeReviewed: 0,//待审核的消息
|
||||
studyTaskCount:0,//学习任务数
|
||||
curIdentity: sessionStorage.getItem("curIdentity") == null ? 1 : sessionStorage.getItem("curIdentity"), // 用户当前选择的身份 1学员 2教师 3管理员
|
||||
permissions: []
|
||||
permissions: [],
|
||||
caseShow:false,
|
||||
},
|
||||
mutations: {
|
||||
SET_Identity: (state, iden) => {
|
||||
@@ -28,7 +30,6 @@ const user = {
|
||||
},
|
||||
SET_StudyTaskCount: (state, m) => {
|
||||
state.studyTaskCount = m
|
||||
//console.log(state)
|
||||
},
|
||||
SET_CurIdentity: (state, iden) => {
|
||||
state.curIdentity = iden
|
||||
@@ -39,7 +40,10 @@ const user = {
|
||||
},
|
||||
SET_PERMISSIONS: (state, permissions) => {
|
||||
state.permissions = permissions
|
||||
}
|
||||
},
|
||||
SET_caseShow:(state, iden) => {
|
||||
state.caseShow = iden
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
refrashMsg({ commit }) {
|
||||
@@ -112,7 +116,6 @@ const user = {
|
||||
InitData({ commit, state }) {
|
||||
let token = getToken();
|
||||
return new Promise((resolve, reject) => {
|
||||
//console.log(token);
|
||||
app.initData().then(res =>{
|
||||
let studyTotalH = 0;// 小时显示
|
||||
let t1=parseFloat(res.result.studyTotal);
|
||||
@@ -130,6 +133,13 @@ const user = {
|
||||
dfn = res.result.departFullName;
|
||||
}
|
||||
}
|
||||
if (res.result.userNo != '') {
|
||||
for(let key in caseUser){
|
||||
if(res.result.userNo == key) {
|
||||
commit('SET_caseShow',true);
|
||||
}
|
||||
}
|
||||
}
|
||||
const user = {
|
||||
aid: res.result.aid,
|
||||
sysId:res.result.sysId,
|
||||
|
||||
16
src/utils/caseShow.js
Normal file
16
src/utils/caseShow.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/**页面设置的一些常量*/
|
||||
const caseUser={
|
||||
'00004409': '李玉冰',
|
||||
'101215': '徐涛',
|
||||
'00005011': '邱炜玮',
|
||||
'107863': '苗怡',
|
||||
'00004928': '夏辉',
|
||||
'110858': '毛继禹',
|
||||
'10726944': '王芮',
|
||||
'boeutest': '测试小助手',
|
||||
'boeuadmin': '运营小助手',
|
||||
'10181457': '董瑞华',
|
||||
}
|
||||
|
||||
export default caseUser;
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 推荐案例2版 -->
|
||||
<div class="modules">
|
||||
<div class="modules" v-if="caseShow">
|
||||
<div class="modules-title">
|
||||
|
||||
<span class="modules-text">推荐案例</span>
|
||||
@@ -336,7 +336,7 @@ export default {
|
||||
name: 'index',
|
||||
components: { portalHeader,ad, portalFooter, articleImage, portalFloatTools, authorInfo, interactRowBar, interactBar, courseImage },
|
||||
computed: {
|
||||
...mapGetters(['userInfo'])
|
||||
...mapGetters(['userInfo','caseShow'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!--课程管理-->
|
||||
<el-dialog custom-class="g-dialog" title="课程学习管理" width="80%" :visible.sync="manageStudy.dlgShow">
|
||||
<el-dialog custom-class="g-dialog" title="课程学习管理" width="900px" :visible.sync="manageStudy.dlgShow" :close-on-click-modal="false">
|
||||
<manager :manageStudyData="manageStudyData"></manager>
|
||||
<template #footer>
|
||||
<el-button @click="manageStudy.dlgShow = false">关闭</el-button>
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
|
||||
<!-- <el-cascader :options="resOwnerListMap" v-model="ownership" placeholder="资源归属" clearable :props="resourceProps"></el-cascader> -->
|
||||
<div style="display: flex;justify-content:flex-start;">
|
||||
<div style="padding-right: 5px;">
|
||||
<!-- <div style="padding-right: 5px;">
|
||||
<el-select placeholder="试卷类型" v-model="params.paperType" style="width: 110px;" clearable>
|
||||
<el-option label="考试卷" :value="1"></el-option>
|
||||
<el-option label="测试卷" :value="2"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div> -->
|
||||
<div style="padding: 0px 5px;"><el-input placeholder="关键词" v-model="params.keyWord" clearable></el-input></div>
|
||||
<div style="padding: 0px 5px;"><el-button icon="el-icon-search" @click="getsearch" type="primary" >搜索</el-button></div>
|
||||
<div style="padding: 0px 5px;"><el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button></div>
|
||||
@@ -39,7 +39,7 @@
|
||||
{{resOwnerName(scope.row.resOwner1)}}/{{resOwnerName(scope.row.resOwner2)}}{{scope.row.resOwner3? '/' : ''}}{{resOwnerName(scope.row.resOwner3)}}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="最后更新" prop="sysCreateTime" width="150px"></el-table-column>
|
||||
<el-table-column label="最后更新" prop="sysCreateTime" width="160px"></el-table-column>
|
||||
<!-- <el-table-column label="试卷类型" prop="content">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.paperType == 1? '考试卷':'测试卷'}}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="title">{{ caseDetail.title }}</div>
|
||||
<div class="label">
|
||||
<author :onlyAvatar="true" :avatar="authorInfo.avatar" :sex="authorInfo.sex" ></author>
|
||||
<span>作者:{{ authorInfo.name }}</span>
|
||||
<span>案主:{{ authorInfo.name }}</span>
|
||||
<span>工号:{{ authorInfo.code }}</span>
|
||||
<span>组织:{{ authorInfo.orgInfo }}</span>
|
||||
<span style="text-align: right;" v-if="caseDetail.sysCreateTime">{{ caseDetail.sysCreateTime.substring(0,10) }}</span>
|
||||
@@ -25,8 +25,9 @@
|
||||
</div> -->
|
||||
<!-- <div class="case-summary"><span>{{ caseDetail.summary }}</span></div> -->
|
||||
<div class="btn-div clearfix" >
|
||||
<div style="color:#666" v-if="caseDetail.orgDomain" class="item">{{ caseDetail.orgDomain }}</div>
|
||||
<div style="color:#666" v-if="caseDetail.majorType" class="item">{{ caseDetail.majorType }}</div>
|
||||
<div style="color:#666" v-if="caseDetail.orgDomain" class="item">{{ orgDomainTranslate(caseDetail.orgDomain) }}</div>
|
||||
<div style="color:#666" class="item" v-if="caseDetail.orgDomain == '' && caseDetail.orgDomainParent">{{ orgDomainTranslate(caseDetail.orgDomainParent) }}</div>
|
||||
<div style="color:#666" v-if="caseDetail.majorType" class="item">{{ majorTypeTranslate(caseDetail.majorType) }}</div>
|
||||
<div v-if="caseDetail.keyword1" class="item">{{ caseDetail.keyword1 }}</div>
|
||||
<div v-if="caseDetail.keyword2" class="item">{{ caseDetail.keyword2 }}</div>
|
||||
<div v-if="caseDetail.keyword3" class="item">{{ caseDetail.keyword3 }}</div>
|
||||
@@ -197,7 +198,10 @@ export default {
|
||||
filePath:''
|
||||
},
|
||||
ankingList:[],
|
||||
authorInfo:{ aid: '', name: '', orgInfo: '', avatar: '', code: '',sex:null}
|
||||
authorInfo:{ aid: '', name: '', orgInfo: '', avatar: '', code: '',sex:null},
|
||||
domain: [],
|
||||
Profess: [],
|
||||
orgData: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -207,6 +211,8 @@ export default {
|
||||
if (this.resolveId) {
|
||||
this.getCaseData();
|
||||
}
|
||||
this.getdomain();
|
||||
this.getProfess();
|
||||
this.getAnkingData();
|
||||
this.getPopularity();
|
||||
this.getPositive();
|
||||
@@ -216,6 +222,59 @@ export default {
|
||||
);
|
||||
},
|
||||
methods: {
|
||||
getdomain() {
|
||||
let key = "org_domain";
|
||||
apiDict.items(key).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.domain = res.result;
|
||||
if(res.result.length > 0) {
|
||||
this.orgDomainLevel(res.result)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getProfess() {
|
||||
let key = "major_type";
|
||||
apiDict.items(key).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.Profess = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
orgDomainLevel(organization) {
|
||||
this.orgData = [];
|
||||
organization.forEach(item=>{
|
||||
this.orgData.push(item);
|
||||
if(item.list && item.list != "" && item.list.length > 0){
|
||||
item.list.forEach(it =>{
|
||||
this.orgData.push(it);
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
orgDomainTranslate(code){ // 组织领域翻译
|
||||
if(code == '') {
|
||||
return
|
||||
}
|
||||
let name = '';
|
||||
let data = this.orgData.find(item => item.code == code);
|
||||
if(data == undefined){
|
||||
name = '';
|
||||
} else {
|
||||
name = data.name;
|
||||
}
|
||||
return name;
|
||||
},
|
||||
majorTypeTranslate(code){ // 专业分类翻译
|
||||
let name = '';
|
||||
let data = this.Profess.find(item => item.code == code);
|
||||
if(data == undefined){
|
||||
name = '';
|
||||
} else {
|
||||
name = data.name;
|
||||
}
|
||||
return name;
|
||||
},
|
||||
zoomBox(){
|
||||
this.zoomShow = !this.zoomShow;
|
||||
},
|
||||
@@ -303,6 +362,8 @@ export default {
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="searchbar" v-if="searchTags.length > 0">
|
||||
<div style="line-height: 30px;">
|
||||
<span class="item-title">搜索条件</span>
|
||||
<el-tag closable v-for="(tag, tagIdx) in searchTags" :key="tagIdx" @close="tagsClose(tag,tagIdx)">{{ tag }}</el-tag>
|
||||
<el-tag closable v-for="(tag, tagIdx) in searchTags" :key="tagIdx" @close="tagsClose(tag,tagIdx)">{{ tag.value }}</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
<el-row class="search-item">
|
||||
@@ -32,7 +32,7 @@
|
||||
<div style="flex:1;">
|
||||
<el-radio-group v-model="queryCondition.orgDomain" size="mini" @change="search()">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button v-for="item in domain" :key="item.code" :label="item.name"> {{ item.name}}</el-radio-button>
|
||||
<el-radio-button v-for="item in domain" :key="item.code" :label="item.code"> {{ item.name}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
@@ -48,9 +48,9 @@
|
||||
</div>
|
||||
<div style="flex:1" id="searchBox">
|
||||
<el-radio-group v-model="queryCondition.majorType" size="mini" @change="search()">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button v-for="item in Profess" :key="item.code" :label="item.name" > {{ item.name }} </el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button v-for="item in Profess" :key="item.code" :label="item.code" > {{ item.name }} </el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -90,8 +90,9 @@
|
||||
<author :avatar="item.authorInfo.avatar" :name="item.authorInfo.name" :info="item.authorInfo.orgInfo" :sex="item.authorInfo.sex"></author>
|
||||
</div>
|
||||
<div class="keyword-text clearfix">
|
||||
<div style="color:#666" v-if="item.orgDomain">{{ item.orgDomain }}</div>
|
||||
<div style="color:#666" v-if="item.majorType">{{ item.majorType }}</div>
|
||||
<div style="color:#666" v-if="item.orgDomain">{{ orgDomainTranslate(item.orgDomain) }}</div>
|
||||
<div style="color:#666" v-if="item.orgDomain == '' && item.orgDomainParent">{{ orgDomainTranslate(item.orgDomainParent) }}</div>
|
||||
<div style="color:#666" v-if="item.majorType">{{ majorTypeTranslate(item.majorType) }}</div>
|
||||
<div v-if="item.keyword1">{{ item.keyword1 }}</div>
|
||||
<div v-if="item.keyword2">{{ item.keyword2 }}</div>
|
||||
<div v-if="item.keyword3">{{ item.keyword3 }}</div>
|
||||
@@ -306,12 +307,12 @@ export default {
|
||||
type2: 0,
|
||||
type3: 0,
|
||||
isFind: false,
|
||||
searchTags: []
|
||||
searchTags: [],
|
||||
orgData: [],
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
this.$nextTick(function() {
|
||||
this.closeSearch();
|
||||
});
|
||||
@@ -390,7 +391,6 @@ export default {
|
||||
apiCase.usernameList(5).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.ankingList = res.result;
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -416,6 +416,9 @@ export default {
|
||||
apiDict.items(key).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.domain = res.result;
|
||||
if(res.result.length > 0) {
|
||||
this.orgDomainLevel(res.result)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -427,6 +430,40 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
orgDomainLevel(organization) {
|
||||
this.orgData = [];
|
||||
organization.forEach(item=>{
|
||||
this.orgData.push(item);
|
||||
if(item.list && item.list != "" && item.list.length > 0){
|
||||
item.list.forEach(it =>{
|
||||
this.orgData.push(it);
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
orgDomainTranslate(code){ // 组织领域翻译
|
||||
if(code == '') {
|
||||
return
|
||||
}
|
||||
let name = '';
|
||||
let data = this.orgData.find(item => item.code == code);
|
||||
if(data == undefined){
|
||||
name = '';
|
||||
} else {
|
||||
name = data.name;
|
||||
}
|
||||
return name;
|
||||
},
|
||||
majorTypeTranslate(code){ // 专业分类翻译
|
||||
let name = '';
|
||||
let data = this.Profess.find(item => item.code == code);
|
||||
if(data == undefined){
|
||||
name = '';
|
||||
} else {
|
||||
name = data.name;
|
||||
}
|
||||
return name;
|
||||
},
|
||||
emitInput(val) {
|
||||
this.keyWord = val;
|
||||
this.isSeach = true;
|
||||
@@ -548,15 +585,24 @@ export default {
|
||||
caseData[i] !== null &&
|
||||
caseData[i] !== undefined
|
||||
) {
|
||||
if (caseData[i] !== "0") {
|
||||
this.searchTags.push(caseData[i]);
|
||||
if (caseData[i] == "0") {
|
||||
return;
|
||||
}
|
||||
if(i == 'majorType'){
|
||||
this.searchTags.push({ type:'majorType',value:this.majorTypeTranslate(caseData[i])})
|
||||
}
|
||||
if(i == 'orgDomain'){
|
||||
this.searchTags.push({type:'orgDomain',value:this.orgDomainTranslate(caseData[i])})
|
||||
}
|
||||
if(i == 'keyWord'){
|
||||
this.searchTags.push({type:'keyWord',value:caseData[i]})
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
tagsClose(tag, index) {
|
||||
for (let i in this.queryCondition) {
|
||||
if (tag === this.queryCondition[i]) {
|
||||
if (tag.type === i) {
|
||||
if (i == "majorType") {
|
||||
this.queryCondition.majorType = null;
|
||||
}
|
||||
|
||||
@@ -135,12 +135,18 @@
|
||||
</div>
|
||||
<div style="display: flex;align-items: center;padding-top: 15px;">
|
||||
<div @click="praiseContent" style="cursor: pointer;">
|
||||
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')">
|
||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/praise.png')"><span style="margin-left: 5px;color: #666666;font-size: 18px;">{{courseInfo.praises}}</span>
|
||||
<el-tooltip class="item" effect="light" :content="isPraise?'取消点赞':'点赞'" placement="top-start">
|
||||
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')">
|
||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/praise.png')">
|
||||
</el-tooltip>
|
||||
<span style="margin-left: 5px;color: #666666;font-size: 18px;">{{courseInfo.praises}}</span>
|
||||
</div>
|
||||
<div style="margin-left: 15px;cursor: pointer;" @click="treadContent">
|
||||
<img class="icon-small" v-if="isTrample" :src="require('@/assets/images/icon/trample-active.png')">
|
||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/trample.png')"><span style="margin-left: 5px;color: #666666;font-size: 18px;">{{courseInfo.trampleCount}}</span>
|
||||
<el-tooltip class="item" effect="light" :content="isTrample?'取消踩':'踩'" placement="top-start">
|
||||
<img class="icon-small" v-if="isTrample" :src="require('@/assets/images/icon/trample-active.png')">
|
||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/trample.png')">
|
||||
</el-tooltip>
|
||||
<span style="margin-left: 5px;color: #666666;font-size: 18px;">{{courseInfo.trampleCount}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
</div>
|
||||
<div style="display: flex;">
|
||||
<div style="flex: 83%" class="qa-info-summary two-line-ellipsis" @click="jumpDetail(qa)" v-html="$keywordActiveShow(qa.content,queryKeyWord)"></div>
|
||||
<div style="flex: 17% ;text-align: right;" v-if="qa.images!==''">
|
||||
<div style="flex: 17% ; cursor: pointer; text-align: right;cursor: pointer;" v-if="qa.images!==''" @click="jumpDetail(qa)">
|
||||
<img style="width: 156px;height: 105px;" :src="fileBaseUrl + qa.images" alt="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
<el-button style="margin-left:0px" type="success" @click="setEssence('set')" >设置精华</el-button>
|
||||
<el-button type="warning" @click="setEssence('cancel')" >取消精华</el-button>
|
||||
<div style="padding-left:10px"><el-checkbox v-model="queryObj.isEssence">精华问题</el-checkbox></div>
|
||||
<div style="padding-left:10px"><el-checkbox v-model="queryObj.isEssence" @change="isEssenceChange()">精华问题</el-checkbox></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -52,34 +52,34 @@
|
||||
border stripe
|
||||
@selection-change="handleSelectionChange"
|
||||
:row-key="getRowKeys">
|
||||
<el-table-column type="selection" width="55" :reserve-selection="true"></el-table-column>
|
||||
<el-table-column label="标题" width="200px" show-overflow-tooltip prop="title" :reserve-selection="true">
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column label="标题" width="200px" show-overflow-tooltip prop="title">
|
||||
<template slot-scope="scope">
|
||||
<span @click="viewTopic(scope.row)" :class="scope.row.isEssence ? 'isSelect' : 'previewStyle'">{{ scope.row.title }}</span>
|
||||
<!-- <a :style="cursor:pointer;" target="_blank" :href="`${webBaseUrl}/qa/answer`">{{scope.row.name}}</a> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="浏览" width="60px" prop="views" :reserve-selection="true"></el-table-column>
|
||||
<el-table-column label="点赞" width="60px" prop="praises" :reserve-selection="true"></el-table-column>
|
||||
<el-table-column label="收藏" width="60px" prop="favorites" :reserve-selection="true"></el-table-column>
|
||||
<el-table-column label="回复" width="60px" prop="answers" :reserve-selection="true"></el-table-column>
|
||||
<el-table-column width="100px" label="发布时间" prop="sysCreateTime" :reserve-selection="true">
|
||||
<el-table-column label="浏览" width="60px" prop="views"></el-table-column>
|
||||
<el-table-column label="点赞" width="60px" prop="praises"></el-table-column>
|
||||
<el-table-column label="收藏" width="60px" prop="favorites"></el-table-column>
|
||||
<el-table-column label="回复" width="60px" prop="answers"></el-table-column>
|
||||
<el-table-column width="100px" label="发布时间" prop="sysCreateTime">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.sysCreateTime | sysCreateTimeFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="作者" prop="sysCreateBy" :reserve-selection="true"></el-table-column>
|
||||
<el-table-column label="状态" prop="status" :reserve-selection="true">
|
||||
<el-table-column label="作者" prop="sysCreateBy"></el-table-column>
|
||||
<el-table-column label="状态" prop="status">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.isResolve ? '已解决' : '待解决' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核状态" prop="status" :reserve-selection="true">
|
||||
<el-table-column label="审核状态" prop="status">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status === 0 ? '待审核' : scope.row.status === 1 ? '已通过' : scope.row.status === 2 ? '未通过' : '已撤销' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="120px" :reserve-selection="true">
|
||||
<el-table-column label="操作" fixed="right" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-button-group>
|
||||
<el-button type="text" v-if="scope.row.status==0" icon="el-icon-s-check" @click="aduit(scope.row)" size="small">审核</el-button>
|
||||
@@ -163,6 +163,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isEssenceChange(){
|
||||
this.getQaList();
|
||||
},
|
||||
search(){
|
||||
this.queryObj.pageIndex = 1;
|
||||
this.getQaList();
|
||||
|
||||
@@ -132,13 +132,17 @@
|
||||
</div>
|
||||
<div style="display: flex;justify-content: flex-end;cursor: pointer;">
|
||||
<div @click="praiseContent">
|
||||
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')" />
|
||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/praise.png')" />
|
||||
<el-tooltip class="item" effect="light" :content="isPraise?'取消点赞':'点赞'" placement="top-start">
|
||||
<img class="icon-small" v-if="isPraise" :src="require('@/assets/images/icon/praise-active.png')" />
|
||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/praise.png')" />
|
||||
</el-tooltip>
|
||||
{{ courseInfo.praises }}
|
||||
</div>
|
||||
<div style="margin-left: 15px;" @click="treadContent">
|
||||
<el-tooltip class="item" effect="light" :content="isTrample?'取消踩':'踩'" placement="top-start">
|
||||
<img class="icon-small" v-if="isTrample" :src="require('@/assets/images/icon/trample-active.png')" />
|
||||
<img class="icon-small" v-else :src="require('@/assets/images/icon/trample.png')" />
|
||||
</el-tooltip>
|
||||
{{ courseInfo.trampleCount }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -257,8 +261,8 @@ import pdfPreview from '@/components/PdfPreview/index.vue';
|
||||
import audioPlayer from '@/components/AudioPlayer/index.vue';
|
||||
import videoPlayer from '@/components/VideoPlayer/index.vue';
|
||||
import hyperLink from '@/components/Course/hyperLink.vue';
|
||||
import studyUtil from '@/utils/study.js';
|
||||
import {encrypt} from '@/utils/jsencrypt.js';
|
||||
import studyUtil from '@/utils/study.js';
|
||||
import {encrypt} from '@/utils/jsencrypt.js';
|
||||
import cookies from 'vue-cookies'
|
||||
export default {
|
||||
name: 'ucStudyIndex',
|
||||
@@ -345,22 +349,22 @@ export default {
|
||||
return treeList;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
createPlayUrl(fid,u){
|
||||
let nowDate=new Date();
|
||||
let ctime=parseInt(nowDate.getTime()/1000);
|
||||
let beforeUrl=parseInt(nowDate.getTime()/1000)+'/'+fid;
|
||||
//console.log(beforeUrl,'beforeUrl');
|
||||
let urlSign=encodeURIComponent(encrypt(beforeUrl));
|
||||
//console.log(urlSign,'urlSign');
|
||||
cookies.set('PLAYSIGN_TIME', ctime);//写客户端的cookie保存
|
||||
//以下判断是为了区分本地环境和服务器环境
|
||||
if(process.env.NODE_ENV == 'development'){
|
||||
this.blobUrl=process.env.VUE_APP_FILE_BASE_URL+u;
|
||||
}else{
|
||||
this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/m/course/cware/resource?sign='+urlSign;
|
||||
}
|
||||
console.log(this.blobUrl,'this.blobUrl');
|
||||
methods: {
|
||||
createPlayUrl(fid,u){
|
||||
let nowDate=new Date();
|
||||
let ctime=parseInt(nowDate.getTime()/1000);
|
||||
let beforeUrl=parseInt(nowDate.getTime()/1000)+'/'+fid;
|
||||
//console.log(beforeUrl,'beforeUrl');
|
||||
let urlSign=encodeURIComponent(encrypt(beforeUrl));
|
||||
//console.log(urlSign,'urlSign');
|
||||
cookies.set('PLAYSIGN_TIME', ctime);//写客户端的cookie保存
|
||||
//以下判断是为了区分本地环境和服务器环境
|
||||
if(process.env.NODE_ENV == 'development'){
|
||||
this.blobUrl=process.env.VUE_APP_FILE_BASE_URL+u;
|
||||
}else{
|
||||
this.blobUrl=process.env.VUE_APP_BASE_API+'/xboe/m/course/cware/resource?sign='+urlSign;
|
||||
}
|
||||
console.log(this.blobUrl,'this.blobUrl');
|
||||
},
|
||||
widthOpen(url) {
|
||||
window.open(url, '_blank');
|
||||
@@ -822,14 +826,14 @@ export default {
|
||||
// if (r.content != '' && r.content.indexOf('.pdf') == -1) {
|
||||
apiCourseFile.detail(r.contentRefId).then(cfrs => {
|
||||
if (cfrs.status == 200) {
|
||||
r.content = cfrs.result.previewFilePath;
|
||||
r.content = cfrs.result.previewFilePath;
|
||||
this.curCFile = cfrs.result;
|
||||
if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('pdf') > -1) {
|
||||
r.content = cfrs.result.filePath;
|
||||
r.content = cfrs.result.filePath;
|
||||
this.curCFile.converStatus=2;
|
||||
}
|
||||
if(r.content && r.content.indexOf('.pdf')>-1){
|
||||
this.curCFile.converStatus=2;
|
||||
}
|
||||
if(r.content && r.content.indexOf('.pdf')>-1){
|
||||
this.curCFile.converStatus=2;
|
||||
}
|
||||
} else {
|
||||
$this.$message.error('加载pdf课件文件失败');
|
||||
|
||||
Reference in New Issue
Block a user