| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <template>
- <el-dialog width="70%"
- :visible.sync="dialogVisible"
- title="通知公告"
- modal-append-to-body
- append-to-body
- @close="dialogClose">
- <div class="messageBox">
- <p class="messT">{{data.title}}</p>
- <p class="messTime">更新时间:{{formateDate(data.uptm)}} 发布单位:{{data.pubDep}}</p>
- <div class="messC" v-html="data.des"></div>
- </div>
- </el-dialog>
- </template>
- <script>
- export default {
- props: ['data'],
- components: {
- },
- data(){
- return{
- dialogVisible:true,
- pdfsrc:""
- }
- },
- mounted(){
- this.dialogVisible=true
- },
- methods:{
- formateDate(date){
- if(date){
- var date = new Date(date);
- return date.getFullYear()+"-"+((date.getMonth()+1)>9?(date.getMonth()+1):"0"+(date.getMonth()+1))+"-"+(date.getDate()>9?date.getDate():"0"+date.getDate());
- }
- return "";
- },
- dialogClose(){
- this.$emit('closeDialog')
- },
- },
- }
- </script>
- <style scoped>
- .messageBox{
- color: #606266;
- height: 600px;
- overflow: auto;
- }
- .messT{
- width: 100%;
- height:30px;
- line-height: 30px;
- margin: 0;
- padding: 0;
- text-align: center;
- font-size: 16px;
- font-weight: bold;
- }
- .messTime{
- width: 100%;
- height:20px;
- line-height: 20px;
- margin: 0;
- padding: 0;
- border-bottom: 1px solid #cecece;
- font-size: 14px;
- text-align: center;
- }
- .messC{
- width: 100%;
- height:calc(100%- 70px);
- margin: 0;
- padding: 0;
- line-height: 30px;
- overflow: auto;
- }
- </style>
|