articlemain.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <div class="articlemain">
  3. <div v-for="(item,index) in onefilelist" :key="index">
  4. <div class="title">
  5. <span class="title-m">文件标题:{{item.name}}</span>
  6. <span class="datatime">发布日期:{{ datanew }}</span>
  7. <span class="filetype">文件类型:{{ item.type }}</span>
  8. <span class="typetype">文号:{{ item.fileNo }}</span>
  9. </div>
  10. <div class="maincontent">
  11. <article-pdf :onefilelist="onefilelist"></article-pdf>
  12. <!-- <img :src="'http://121.40.214.80:81'+item.downloadUrl" alt="" /> -->
  13. </div>
  14. </div>
  15. </div>
  16. </template>
  17. <script>
  18. import ArticlePdf from './articlepdf.vue';
  19. export default {
  20. components: { ArticlePdf },
  21. name: "ArticleMain",
  22. props: {
  23. onefilelist: {
  24. type: Array,
  25. default() {
  26. return [];
  27. },
  28. },
  29. },
  30. computed: {
  31. // 发布日期转换
  32. datanew(){
  33. return this.onefilelist[0].publishOn.slice(0,10)
  34. }
  35. },
  36. };
  37. </script>
  38. <style scoped>
  39. .title-m{
  40. font-size: 18px;
  41. }
  42. .title {
  43. display: grid;
  44. padding-left: 5vw;
  45. }
  46. .title span {
  47. line-height: 7vw;
  48. height: auto;
  49. }
  50. .articlemain {
  51. background-color: #fff;
  52. border-radius: 2vw;
  53. margin-top: 5vw;
  54. padding-top: 4vw;
  55. padding-bottom: 4vw;
  56. }
  57. </style>