planDetails.vue 3.0 KB

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