留言板添加至新标签页

This commit is contained in:
fan 2020-11-27 09:55:33 +08:00
parent db6caa6591
commit a509af1e09
3 changed files with 53 additions and 34 deletions

View File

@ -133,6 +133,7 @@ const CompanyManage = () => import('@/views/system/companyManage/index');
const QuestionsRuleManage = () => import('@/views/system/questionsRuleManage/index');
const PreTheoryImport = () => import('@/views/competitionManage/bankList/preImport');
const PlanScheduleWicket = () => import('@/views/newMap/displayNew/demon/planSchedule');
const MessageBoard = () => import('@/views/messageBoard/index');
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth';
@ -404,6 +405,11 @@ export const publicAsyncRoute = [
path: '/practiceDisplay',
component: PracticeDisplay,
hidden: true
},
{
path: '/messageBoard',
component: MessageBoard,
hidden: true
}
];
// 城市轨道项目

View File

@ -1,13 +1,15 @@
<template>
<el-dialog
id="elDialog"
title="留言板"
:visible.sync="dialogVisible"
fullscreen
:show-close="false"
center
:before-close="handleClose"
>
<!--<el-dialog-->
<!--id="elDialog"-->
<!--title="留言板"-->
<!--:visible.sync="dialogVisible"-->
<!--fullscreen-->
<!--:show-close="false"-->
<!--center-->
<!--:before-close="handleClose"-->
<!--&gt;-->
<div id="elDialog" class="message-board-box">
<div class="message-board-title">留言板</div>
<div style="width: 80%;margin-left: 10%;padding: 20px;margin-bottom: 20px;background-color: rgba(255,255,255,0);border: 1px solid #ebeef5;border-radius: 4px;box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);">
<div v-if="postCommentList.length">
<template v-for="(item,i) in postCommentList">
@ -90,11 +92,13 @@
<el-button type="danger" @click="commitComment">留言</el-button>
</span>
<el-button size="mini" type="danger" style="position: fixed; right: 100px;top: 80px;width: 90px;" @click="goSlide">我要留言</el-button>
<el-button size="mini" style="position: fixed; right: 100px;top: 120px;width: 90px;" @click="dialogVisible = false">退出留言板</el-button>
<!--<el-button size="mini" style="position: fixed; right: 100px;top: 120px;width: 90px;" @click="dialogVisible = false">退出留言板</el-button>-->
<div v-show="imgShow" style="position: fixed;width: 100%;height: 100%;left: 0;top: 0;background: rgba(0,0,0,0.5);cursor: zoom-out;" @click="handelCloseImg">
<img id="targetImg" src="" style="position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);min-width: 500px;max-height: 80%;height: auto;">
</div>
</el-dialog>
</div>
<!--</el-dialog>-->
</template>
<script>
@ -105,13 +109,12 @@ 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 { ProjectCode } from '@/scripts/ProjectConfig';
export default {
name: 'MessageBoard',
data() {
return {
dialogVisible: false,
// dialogVisible: false,
content: '',
postCommentList: [],
pageSize: 10,
@ -140,7 +143,7 @@ export default {
return this.$store.state.user.roles.includes(superAdmin);
},
projectCode() {
const project = getSessionStorage('project');
const project = this.$route.query.project;
return ProjectCode[project];
}
},
@ -152,20 +155,18 @@ export default {
};
},
mounted() {
if (this.projectCode === 'DRTS' || this.projectCode === 'BJD') {
getPostByProjectCode(this.projectCode).then(resp => {
this.postId = resp.data.id;
});
}
this.handleCurrentChange();
},
methods: {
handleClose() {
this.dialogVisible = false;
},
doShow() {
this.handleCurrentChange();
this.dialogVisible = true;
},
// handleClose() {
// this.dialogVisible = false;
// },
// doShow() {
// this.dialogVisible = true;
// },
commitComment() {
const images = this.content.match(/<img/g);
const answerContent = this.handleEmojiContent(this.content);
@ -370,6 +371,7 @@ export default {
<style scoped>
.dialog-footer{
margin: 0 auto;
padding: 10px 0 30px;
display: flex;
justify-content: center;
}
@ -389,16 +391,22 @@ export default {
width: 100px;
height: auto;
}
/deep/ .el-dialog.is-fullscreen{
background-image:url('../../../../assets/bg_board.jpg');
.message-board-box{
width: 100%;
background-image:url('../../assets/bg_board.jpg');
background-size: 100% 100%;
}
/deep/.ql-container{
height: 80%;
}
/deep/.el-dialog__title{
.message-board-title{
font-size: 30px;
color: #F00;
font-family: 'fangsong';
font-weight: bolder;
width: 100%;
text-align: center;
height: 80px;
line-height: 80px;
}
</style>

View File

@ -46,7 +46,6 @@
<scheduling v-if="scheduleLoadShow" ref="scheduling" :group="group" />
<scheduling-view v-if="schedulePreviewShow" ref="schedulingView" :group="group" />
<qr-code ref="qrCode" />
<message-board ref="messageBoard" />
<contect-us ref="contectUs" />
</div>
</template>
@ -60,7 +59,6 @@ import SchedulingView from '@/views/newMap/displayNew/demon/schedulingView';
import { EventBus } from '@/scripts/event-bus';
import DistributeDraft from '@/views/components/limits/distribute';
import QrCode from '@/components/QrCode';
import MessageBoard from './demon/messageBoard';
import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs';
import { PermissionType } from '@/scripts/ConstDic';
export default {
@ -72,8 +70,7 @@ export default {
SchedulingView,
DistributeDraft,
QrCode,
ContectUs,
MessageBoard
ContectUs
},
props:{
isAllShow:{
@ -321,7 +318,15 @@ export default {
}
},
messageBoardShow() {
this.$refs.messageBoard.doShow();
// this.$refs.messageBoard.doShow();
const routeData = this.$router.resolve({
path:'/messageBoard',
query:{
project: this.$route.query.project,
noPreLogout: true
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
contectUs() {
this.$refs.contectUs.doShow();