|
1
|
<template>
|
|
2
3
|
<j-modal
:title="title"
|
|
4
|
:width="modelStyle.width"
|
|
5
6
|
:visible="visible"
:bodyStyle ="bodyStyle"
|
|
7
|
:switchFullscreen="switchFullscreen"
|
|
8
|
@cancel="handleCancel"
|
|
9
|
>
|
|
10
11
|
<template slot="footer">
<a-button key="back" @click="handleCancel">关闭</a-button>
|
|
12
|
<a-button v-if="record.openType==='url'" type="primary" @click="toHandle">去处理</a-button>
|
|
13
|
</template>
|
|
14
|
<a-card class="daily-article" :loading="loading">
|
|
15
16
|
<a-card-meta
:title="record.titile"
|
|
17
18
|
:description="'发布人:'+record.sender + ' 发布时间: ' + record.sendTime">
</a-card-meta>
|
|
19
20
21
|
<a-divider />
<span v-html="record.msgContent" class="article-content"></span>
</a-card>
|
|
22
|
</j-modal>
|
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
</template>
<script>
export default {
name: "SysAnnouncementModal",
components: {
},
data () {
return {
title:"通知消息",
record: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
visible: false,
|
|
43
|
switchFullscreen: true,
|
|
44
45
46
47
|
loading: false,
bodyStyle:{
padding: "0",
height:(window.innerHeight*0.8)+"px",
|
|
48
49
|
"overflow-y":"auto",
|
|
50
|
},
|
|
51
52
53
54
55
|
modelStyle:{
width: '60%',
style: { top: '20px' },
fullScreen: false
}
|
|
56
57
58
59
60
61
62
63
64
65
66
67
|
}
},
created () {
},
methods: {
detail (record) {
this.visible = true;
this.record = record;
},
handleCancel () {
this.visible = false;
},
|
|
68
69
70
71
72
73
74
75
76
77
78
|
/** 切换全屏显示 */
handleClickToggleFullScreen() {
let mode = !this.modelStyle.fullScreen
if (mode) {
this.modelStyle.width = '100%'
this.modelStyle.style.top = '20px'
} else {
this.modelStyle.width = '60%'
this.modelStyle.style.top = '50px'
}
this.modelStyle.fullScreen = mode
|
|
79
80
|
},
toHandle(){
|
|
81
|
if(this.record.openType==='url'){
|
|
82
83
84
85
86
|
this.visible = false;
//链接跳转
this.$router.push({path: this.record.openPage})
}
},
|
|
87
88
89
90
|
}
}
</script>
|
|
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
<style lang="less">
.announcementCustomModal{
.ant-modal-header {
border: none;
display: inline-block;
position: absolute;
z-index: 1;
right: 56px;
padding: 0;
.ant-modal-title{
.custom-btn{
width: 56px;
height: 56px;
border: none;
box-shadow: none;
}
}
}
.daily-article{
border-bottom: 0;
}
}
</style>
|
|
114
115
|
<style scoped lang="less">
.daily-article {
|
|
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
.article-button {
font-size: 1.2rem !important;
}
.ant-card-body {
padding: 18px !important;
}
.ant-card-head {
padding: 0 1rem;
}
.ant-card-meta {
margin-bottom: 1rem;
}
.article-content {
p {
word-wrap: break-word;
word-break: break-all;
text-overflow: initial;
white-space: normal;
font-size: .9rem !important;
margin-bottom: .8rem;
}
}
|
|
138
|
}
|
|
139
|
</style>
|