WorkGuideDetailsIndex.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <!--
  2. * @Description: 创业指引详情
  3. * @Author: 空白格
  4. * @Date: 2022-08-25 13:30:07
  5. * @LastEditors: 空白格
  6. * @LastEditTime: 2022-08-25 17:01:01
  7. * @FilePath: \veterans_client_web\src\views\WorkGuide\WorkGuideDetails\WorkGuideDetailsIndex.vue
  8. * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
  9. -->
  10. <template>
  11. <div class="app-main details">
  12. <BannerBreadcrumb title="创业指引" :isRouter="true" />
  13. <div class="app-main-box details-box">
  14. <div class="app-main-box-content details-box-content">
  15. <div class="details-box-content-title">
  16. {{ detainsInfo.title || "-" }}
  17. </div>
  18. <div class="details-box-content-subtitle">
  19. <span>{{ detainsInfo.createTime }}提交</span>
  20. <span class="no-reply" v-if="detainsInfo.replyStatus === 0"
  21. >待专家回复</span
  22. >
  23. <span class="has-reply" v-else>专家已回复</span>
  24. </div>
  25. <div class="details-box-content-des">
  26. <div class="dbcd-label">描述</div>
  27. <div class="dbcd-content" v-html="detainsInfo.description"></div>
  28. </div>
  29. <div class="details-box-content-pdf" v-if="detainsInfo.planBookName">
  30. <div class="btn" @click="previewPdf(detainsInfo.planBookUrl)">{{ detainsInfo.planBookName }}</div>
  31. <view-pdf ref="viewPdf"/>
  32. </div>
  33. <div
  34. class="details-box-content-reply"
  35. v-if="detainsInfo.replyStatus === 1"
  36. >
  37. <div class="dbcr-label">专家建议</div>
  38. <div class="dbcr-content" v-html="detainsInfo.replyContent"></div>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. </template>
  44. <script>
  45. import BannerBreadcrumb from "@/components/BannerBreadcrumb";
  46. import ViewPdf from '@/components/ViewPdf'
  47. import { getWorkGuideDetails } from "@/api/WorkGuide";
  48. export default {
  49. name: "WorkGuideDetailsIndex",
  50. components: {
  51. BannerBreadcrumb,
  52. ViewPdf
  53. },
  54. data() {
  55. return {
  56. detainsInfo: {},
  57. id: undefined,
  58. };
  59. },
  60. created() {
  61. const { id } = this.$route.query;
  62. if (id) {
  63. this.id = id;
  64. this.getDetails();
  65. }
  66. },
  67. methods: {
  68. /**
  69. * 获取详情
  70. * @date 2022-08-25
  71. * @returns {any}
  72. */
  73. getDetails() {
  74. getWorkGuideDetails({ id: this.id }).then((res) => {
  75. if (res.code === 200) {
  76. this.detainsInfo = res?.data;
  77. }
  78. });
  79. },
  80. /**
  81. * 预览pdf
  82. * @date 2022-08-25
  83. * @param {any} pdfUrl
  84. * @returns {any}
  85. */
  86. previewPdf(pdfUrl) {
  87. if (pdfUrl) {
  88. // window.open('http://www.gjtool.cn/pdfh5/pdf.html?file=' + pdfUrl)
  89. this.$refs['viewPdf'].openDialog(pdfUrl)
  90. }
  91. }
  92. },
  93. };
  94. </script>
  95. <style lang="scss" scoped>
  96. .details {
  97. &-box {
  98. margin: 0 auto;
  99. &-content {
  100. &-title {
  101. padding: 10px 0;
  102. text-align: center;
  103. font-size: 24px;
  104. color: #1a1a1a;
  105. border-bottom: 1px solid #d5d5d5;
  106. }
  107. &-subtitle {
  108. text-align: center;
  109. margin: 20px 0 40px;
  110. font-size: 14px;
  111. color: #999999;
  112. span {
  113. &:last-child {
  114. margin-left: 40px;
  115. }
  116. }
  117. .no-reply {
  118. color: #ef6622;
  119. }
  120. .has-reply {
  121. color: #3ca7fe;
  122. }
  123. }
  124. &-des {
  125. .dbcd-label {
  126. font-size: 20px;
  127. color: #1a1a1a;
  128. margin-bottom: 20px;
  129. font-family: SourceHanSansCN;
  130. }
  131. .dbcd-content {
  132. color: #666666;
  133. font-size: 14px;
  134. }
  135. }
  136. &-pdf {
  137. text-align: center;
  138. margin: 20px auto 30px;
  139. .btn {
  140. display: inline-block;
  141. padding: 0 100px;
  142. max-width: 700px;
  143. cursor: pointer;
  144. height: 50px;
  145. line-height: 50px;
  146. text-align: center;
  147. font-size: 14px;
  148. color: #008fff;
  149. border: dashed 1px #0091ff;
  150. border-radius: 5px;
  151. white-space: nowrap;
  152. overflow: hidden;
  153. text-overflow: ellipsis;
  154. word-break: break-all;
  155. }
  156. }
  157. &-reply {
  158. .dbcr-label {
  159. font-size: 20px;
  160. color: #1a1a1a;
  161. margin-bottom: 20px;
  162. font-family: SourceHanSansCN;
  163. }
  164. .dbcr-content {
  165. color: #666666;
  166. font-size: 14px;
  167. }
  168. }
  169. }
  170. }
  171. }
  172. </style>