289e50a6ec25d0cde8693cf5a00616bf8cccfe86.svn-base 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <el-dialog width="70%"
  3. :visible.sync="dialogVisible"
  4. title="通知公告"
  5. modal-append-to-body
  6. append-to-body
  7. @close="dialogClose">
  8. <div class="messageBox">
  9. <p class="messT">{{data.title}}</p>
  10. <p class="messTime">更新时间:{{formateDate(data.uptm)}} &nbsp;&nbsp;发布单位:{{data.pubDep}}</p>
  11. <div class="messC" v-html="data.des"></div>
  12. </div>
  13. </el-dialog>
  14. </template>
  15. <script>
  16. export default {
  17. props: ['data'],
  18. components: {
  19. },
  20. data(){
  21. return{
  22. dialogVisible:true,
  23. pdfsrc:""
  24. }
  25. },
  26. mounted(){
  27. this.dialogVisible=true
  28. },
  29. methods:{
  30. formateDate(date){
  31. if(date){
  32. var date = new Date(date);
  33. return date.getFullYear()+"-"+((date.getMonth()+1)>9?(date.getMonth()+1):"0"+(date.getMonth()+1))+"-"+(date.getDate()>9?date.getDate():"0"+date.getDate());
  34. }
  35. return "";
  36. },
  37. dialogClose(){
  38. this.$emit('closeDialog')
  39. },
  40. },
  41. }
  42. </script>
  43. <style scoped>
  44. .messageBox{
  45. color: #606266;
  46. height: 600px;
  47. overflow: auto;
  48. }
  49. .messT{
  50. width: 100%;
  51. height:30px;
  52. line-height: 30px;
  53. margin: 0;
  54. padding: 0;
  55. text-align: center;
  56. font-size: 16px;
  57. font-weight: bold;
  58. }
  59. .messTime{
  60. width: 100%;
  61. height:20px;
  62. line-height: 20px;
  63. margin: 0;
  64. padding: 0;
  65. border-bottom: 1px solid #cecece;
  66. font-size: 14px;
  67. text-align: center;
  68. }
  69. .messC{
  70. width: 100%;
  71. height:calc(100%- 70px);
  72. margin: 0;
  73. padding: 0;
  74. line-height: 30px;
  75. overflow: auto;
  76. }
  77. </style>