Merge remote-tracking branch 'origin/test'
This commit is contained in:
commit
456270b346
Binary file not shown.
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 125 KiB |
@ -447,3 +447,7 @@ export const ProjectList = [
|
||||
{value: 'bjd', label: '北交大'},
|
||||
{value: 'urtss', label: '陪标项目'}
|
||||
];
|
||||
export const ProjectPostIdMap = {
|
||||
drts: 1,
|
||||
bjd: 2
|
||||
};
|
||||
|
@ -95,6 +95,8 @@ import unlike_icon from '@/assets/unlike.png';
|
||||
import reply_icon from '@/assets/reply.png';
|
||||
import delete_icon from '@/assets/delete.png';
|
||||
import { superAdmin } from '@/router/index_APP_TARGET';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { ProjectPostIdMap } from '@/scripts/ProjectConfig';
|
||||
export default {
|
||||
name: 'MessageBoard',
|
||||
data() {
|
||||
@ -126,6 +128,10 @@ export default {
|
||||
},
|
||||
superAdmin() {
|
||||
return this.$store.state.user.roles.includes(superAdmin);
|
||||
},
|
||||
postId() {
|
||||
const project = getSessionStorage('project');
|
||||
return ProjectPostIdMap[project];
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -157,7 +163,7 @@ export default {
|
||||
this.$message.error('留言内容不能为空!');
|
||||
return;
|
||||
}
|
||||
answerPost({postId: 1, content: this.content}).then(resp => {
|
||||
answerPost({postId: this.postId, content: this.content}).then(resp => {
|
||||
this.pageNum = Math.ceil(resp.data / this.pageSize);
|
||||
this.handleCurrentChange();
|
||||
this.content = '';
|
||||
@ -167,7 +173,7 @@ export default {
|
||||
});
|
||||
},
|
||||
handleCurrentChange() {
|
||||
queryPostPaging(1, {pageSize: this.pageSize, pageNum: this.pageNum}).then(resp => {
|
||||
queryPostPaging(this.postId, {pageSize: this.pageSize, pageNum: this.pageNum}).then(resp => {
|
||||
this.postCommentList = [];
|
||||
(resp.data.list || []).forEach(item => {
|
||||
const value = item.content.replace(/<img/g, '<img style="width: 100px;height: auto;cursor: zoom-in;" onclick="handleZoomImg()"');
|
||||
|
@ -25,8 +25,8 @@
|
||||
<!-- <el-button v-if="isContest" size="small" @click=" fieldTeach">实操教学</el-button> -->
|
||||
<!-- <el-button v-if="isContest" size="small" @click=" fieldExam">实操测验</el-button> -->
|
||||
<el-button v-if="isContest" size="small" @click="goTheoryQuiz">理论考试</el-button>
|
||||
<el-button v-if="isContest" size="small" @click="contectUs">联系方式</el-button>
|
||||
<el-button v-if="isContest" size="small" @click="messageBoardShow">留言板</el-button>
|
||||
<el-button v-if="isContest || project === 'bjd'" size="small" @click="contectUs">联系方式</el-button>
|
||||
<el-button v-if="isContest || project === 'bjd'" size="small" @click="messageBoardShow">留言板</el-button>
|
||||
<template v-if="project === 'bjd'">
|
||||
<el-button v-if="running" size="small" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
|
||||
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- 运行图加载 -->
|
||||
|
Loading…
Reference in New Issue
Block a user