planDetails.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view class="details">
  3. <view class="details-content">
  4. <view class="details-content-title">{{ planInfo.title }}</view>
  5. <view class="details-content-createtime">{{ planInfo.createTime }}提交</view>
  6. <view class="details-content-reply" :class="planInfo.replyStatus === 0 ? 'waiting' : 'reply'">
  7. {{ planInfo.replyStatus === 0 ? '待专家回复' : '专家已回复' }}
  8. </view>
  9. <view class="details-content-description">
  10. <view class="title">描述</view>
  11. <view class="details-content-description-content">
  12. <u-parse :html="planInfo.description"></u-parse>
  13. </view>
  14. <view class="details-content-description-pdf" @click="jumpPage('pages/entrepreneurshipGuidelines/previewPdf/previewPdf', { fileUrl: planInfo.planBookUrl })">
  15. {{ planInfo.planBookName }}
  16. </view>
  17. </view>
  18. <view class="details-content-description" v-if="planInfo.replyStatus === 1">
  19. <view class="title">专家建议</view>
  20. <view class="details-content-description-content">
  21. <u-parse :html="planInfo.replyContent"></u-parse>
  22. </view>
  23. </view>
  24. </view>
  25. <u-toast ref="uToast" />
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. planId: '',
  33. planInfo: {}
  34. }
  35. },
  36. onLoad(page) {
  37. if (page.id) {
  38. this.planId = page.id
  39. }
  40. },
  41. onShow() {
  42. this.getDetails(this.planId)
  43. },
  44. methods: {
  45. getDetails(id) {
  46. this.$u.api.entrepreneurship.getEntrepreneurshipDetailsApi({ id }).then(res => {
  47. if (res.code === 200) {
  48. this.planInfo = res.data
  49. } else {
  50. this.$refs.uToast.show({
  51. title: res.msg,
  52. type: 'error'
  53. })
  54. }
  55. })
  56. },
  57. jumpPage(url, params) {
  58. this.$u.route({
  59. url, params
  60. })
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss">
  66. .details {
  67. padding: 26rpx 30rpx;
  68. font-family: PingFangSC-Regular, PingFang SC;
  69. &-content {
  70. &-title {
  71. color: #050505;
  72. font-size: 36rpx;
  73. margin-bottom: 18rpx;
  74. font-weight: 600;
  75. }
  76. &-createtime {
  77. color: #9F9F9F;
  78. font-size: 24rpx;
  79. margin-bottom: 18rpx;
  80. }
  81. .reply {
  82. color: #028DFE;
  83. font-size: 22rpx;
  84. }
  85. .waiting {
  86. color: #EF6622;
  87. font-size: 22rpx;
  88. }
  89. &-description {
  90. margin-top: 32rpx;
  91. margin-bottom: 72rpx;
  92. .title {
  93. color: #3F3F3F;
  94. font-weight: 600;
  95. font-size: 30rpx;
  96. margin-bottom: 30rpx;
  97. }
  98. &-content {
  99. color: #4D4D4D;
  100. }
  101. &-pdf {
  102. width: 100%;
  103. height: 59rpx;
  104. line-height: 59rpx;
  105. display: flex;
  106. justify-content: center;
  107. border: dashed 1px #0091FF;
  108. color: #008FFF;
  109. font-size: 28rpx;
  110. margin-top: 20rpx;
  111. }
  112. }
  113. }
  114. }
  115. </style>