xsydZizhuguanliInfo.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <view class="dljt-page-box" v-if="data.info">
  3. <MtaNavbar></MtaNavbar>
  4. <view class="dljt-container-box">
  5. <!-- 详情页面 -->
  6. <view class="dljt-page-title">党群工作</view>
  7. <view class="dljt-page-content-box">
  8. <!-- 导航 -->
  9. <view class="dljt-breadcrumb-box">
  10. <view class="breadcrumb-text" @click="handleGo('shouye')">首页</view>
  11. <icon class="breadcrumb-jt"></icon>
  12. <view class="breadcrumb-text" >学生园地</view>
  13. <icon class="breadcrumb-jt"></icon>
  14. <view class="breadcrumb-text" @click="handleGo('zzgl')">资助管理</view>
  15. <icon class="breadcrumb-jt"></icon>
  16. <view class="breadcrumb-active">详情</view>
  17. </view>
  18. <view class="dljt-detail-box">
  19. <!-- 标题 -->
  20. <view class="detail-title">{{data.info.title}}</view>
  21. <!-- 时间 -->
  22. <view class="detail-data">{{formatDate.join('-') }}</view>
  23. <!-- 富文本 -->
  24. <MtaMpHtml class="dljt-editor-box" :content="data.info.content" ></MtaMpHtml>
  25. <!-- PDF -->
  26. <!-- <MtaPDFVue class="dljt-pdf-box" :pdfUrl="pdfUrl"></MtaPDFVue> -->
  27. <!-- 文件下载 -->
  28. <!-- <div class="return-footer-box" v-if="">
  29. <view class="dljt-down-btn" @click="handleDownFile"></view>
  30. </div> -->
  31. </view>
  32. </view>
  33. </view>
  34. <!-- 底部导航 -->
  35. <MtaFooter></MtaFooter>
  36. </view>
  37. </template>
  38. <script setup>
  39. import {
  40. ref,
  41. reactive,
  42. computed,
  43. onMounted,
  44. onUnmounted
  45. } from "vue";
  46. import {
  47. onLoad
  48. } from "@dcloudio/uni-app"
  49. import * as httpApi from "@/api/common.js"
  50. import {formatDateToYearMonthDay } from "@/utils/common.js"
  51. import MtaMpHtml from "@/components/MTAMpHtml/MtaMpHtml.vue"
  52. import MtaPDFVue from "@/components/MtaPDF.vue";
  53. import MtaFooter from "@/components/MtaFooter.vue"
  54. const data = reactive({
  55. info: null,
  56. id: null
  57. })
  58. const formatDate = computed(() => {
  59. if (data.info && data.info.createTime) {
  60. return formatDateToYearMonthDay(data.info.createTime)
  61. }
  62. return []
  63. })
  64. onLoad(({
  65. id
  66. }) => {
  67. data.id = id;
  68. pageInit();
  69. })
  70. function handleGo(code) {
  71. if (code == 'shouye') {
  72. uni.navigateTo({
  73. url: '/pages/index/index'
  74. })
  75. }
  76. if (code == 'zzgl') {
  77. uni.navigateTo({
  78. url: '/pages/xsydZizhuguanli/xsydZizhuguanli'
  79. })
  80. }
  81. }
  82. function handleDownFile() {
  83. window.location.href = pdfUrl;
  84. }
  85. function pageInit() {
  86. httpApi.getXueshengZizhuInfo({id: data.id}).then(res => {
  87. data.info = res.data;
  88. })
  89. }
  90. </script>
  91. <style>
  92. </style>