RecruitStudentsIndex.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <!--
  2. * @Description: 招生简章
  3. * @Author: 空白格
  4. * @Date: 2022-08-26 17:56:21
  5. * @LastEditors: 空白格
  6. * @LastEditTime: 2022-08-29 14:05:10
  7. * @FilePath: \veterans_client_web\src\views\EducationPromote\RecruitStudents\RecruitStudentsIndex.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. {{ schoolName || "-" }}
  17. </div>
  18. <div class="details-box-content-subtitle">
  19. <p v-if="detainsInfo.regulation_file" @click="downloadFile">
  20. <span class="el-icon-paperclip"></span>
  21. <span>下载附件</span>
  22. </p>
  23. </div>
  24. <div class="details-box-content-des">
  25. <div class="dbcd-content ql-editor" v-html="detainsInfo.regulation"></div>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. </template>
  31. <script>
  32. import BannerBreadcrumb from "@/components/BannerBreadcrumb";
  33. import { getSchoolRecruitstudents } from "@/api/EducationPromote";
  34. export default {
  35. name: "WorkGuideDetailsIndex",
  36. components: {
  37. BannerBreadcrumb,
  38. },
  39. data() {
  40. return {
  41. detainsInfo: {},
  42. id: undefined,
  43. schoolName: "",
  44. };
  45. },
  46. created() {
  47. const { id, name } = this.$route.query;
  48. if (id) {
  49. this.id = id;
  50. this.schoolName = name;
  51. this.getDetails();
  52. }
  53. },
  54. methods: {
  55. /**
  56. * 获取详情
  57. * @date 2022-08-25
  58. * @returns {any}
  59. */
  60. getDetails() {
  61. getSchoolRecruitstudents({ id: this.id }).then((res) => {
  62. if (res.code === 200) {
  63. this.detainsInfo = res?.data;
  64. }
  65. });
  66. },
  67. /**
  68. * 预览pdf
  69. * @date 2022-08-25
  70. * @param {any} pdfUrl
  71. * @returns {any}
  72. */
  73. previewPdf(pdfUrl) {
  74. if (pdfUrl) {
  75. window.open("http://www.gjtool.cn/pdfh5/pdf.html?file=" + pdfUrl);
  76. }
  77. },
  78. /**
  79. * 下载附件
  80. * @date 2022-08-29
  81. * @returns {any}
  82. */
  83. downloadFile() {
  84. if (this.detainsInfo.regulation_file) {
  85. window.open(this.detainsInfo.regulation_file)
  86. }
  87. }
  88. },
  89. };
  90. </script>
  91. <style lang="scss" scoped>
  92. .details {
  93. &-box {
  94. margin: 0 auto;
  95. &-content {
  96. &-title {
  97. padding: 10px 0;
  98. text-align: center;
  99. font-size: 24px;
  100. color: #1a1a1a;
  101. border-bottom: 1px solid #d5d5d5;
  102. }
  103. &-subtitle {
  104. text-align: center;
  105. margin: 20px 0 40px;
  106. font-size: 14px;
  107. color: #999999;
  108. span {
  109. cursor: pointer;
  110. }
  111. .no-reply {
  112. color: #ef6622;
  113. }
  114. .has-reply {
  115. color: #3ca7fe;
  116. }
  117. }
  118. &-des {
  119. .dbcd-label {
  120. font-size: 20px;
  121. color: #1a1a1a;
  122. margin-bottom: 20px;
  123. font-family: SourceHanSansCN;
  124. }
  125. .dbcd-content {
  126. color: #666666;
  127. font-size: 14px;
  128. }
  129. }
  130. &-pdf {
  131. text-align: center;
  132. margin: 20px auto 30px;
  133. div {
  134. display: inline-block;
  135. padding: 0 100px;
  136. max-width: 700px;
  137. cursor: pointer;
  138. height: 50px;
  139. line-height: 50px;
  140. text-align: center;
  141. font-size: 14px;
  142. color: #008fff;
  143. border: dashed 1px #0091ff;
  144. border-radius: 5px;
  145. white-space: nowrap;
  146. overflow: hidden;
  147. text-overflow: ellipsis;
  148. word-break: break-all;
  149. }
  150. }
  151. &-reply {
  152. .dbcr-label {
  153. font-size: 20px;
  154. color: #1a1a1a;
  155. margin-bottom: 20px;
  156. font-family: SourceHanSansCN;
  157. }
  158. .dbcr-content {
  159. color: #666666;
  160. font-size: 14px;
  161. }
  162. }
  163. }
  164. }
  165. }
  166. </style>