planDetails.vue 2.7 KB

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