zsjyShengxue.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="dljt-page-box">
  3. <MtaNavbar></MtaNavbar>
  4. <view class="dljt-container-box">
  5. <view class="dljt-page-title">机构设置</view>
  6. <view class="dljt-page-content-box">
  7. <!-- 导航 -->
  8. <view class="dljt-breadcrumb-box">
  9. <view class="breadcrumb-text" @click="handleGo('shouye')">首页</view>
  10. <icon class="breadcrumb-jt"></icon>
  11. <view class="breadcrumb-text">招生就业</view>
  12. <icon class="breadcrumb-jt"></icon>
  13. <view class="breadcrumb-active">升学</view>
  14. </view>
  15. <view class="dljt-detail-box">
  16. <view class="dljt-editor-box">
  17. <view class="dljt-classify-box">
  18. <view class="classify-item" :class="{active: data.activeId == item.id}" v-for="item in data.list" :key="item.title" @click="handleSelect(item)">{{item.title}}</view>
  19. </view>
  20. <!-- 富文本 -->
  21. <MtaMpHtml class="dljt-editor-box" :content="data.activeData.content" ></MtaMpHtml>
  22. <!-- 链接 -->
  23. <view class="dljt-link-box">
  24. <view class="link-item-box" v-for="cItem in data.activeData.link">
  25. <icon></icon>
  26. <a :href="cItem.url">{{cItem.name}}</a>
  27. <a class="link-text" :href="cItem.url">{{cItem.url}}</a>
  28. </view>
  29. </view>
  30. <!-- table -->
  31. <view class="dljt-table-box">
  32. <view class="table-th-row">
  33. <view style="width: 15%">序号</view>
  34. <view style="width: 60%">资料名称</view>
  35. <view style="width: 25%">下载</view>
  36. </view>
  37. <view class="table-td-row" v-for="(ccIte,index) in data.activeData.ziliao">
  38. <view style="width: 15%" class="item-center"><view>{{index+1}}</view></view>
  39. <view style="width: 60%"><view>{{ccIte.name}}</view></view>
  40. <view style="width: 25%">
  41. <a class="table-btn" @click="handleDownFile(ccIte)" >文件下载</a>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. <!-- 底部导航 -->
  50. <MtaFooter></MtaFooter>
  51. </view>
  52. </template>
  53. <script setup>
  54. import {
  55. ref,
  56. reactive
  57. } from "vue";
  58. import {
  59. onLoad
  60. } from "@dcloudio/uni-app"
  61. import * as httpApi from "@/api/common.js"
  62. import MtaFooter from "@/components/MtaFooter.vue"
  63. import MtaMpHtml from "@/components/MTAMpHtml/MtaMpHtml.vue"
  64. const data = reactive({
  65. list: null,
  66. activeId: null,
  67. activeData: {}
  68. })
  69. onLoad(() => {
  70. pageInit();
  71. })
  72. function handleGo(code) {
  73. if (code == 'shouye') {
  74. uni.navigateTo({
  75. url: '/pages/index/index'
  76. })
  77. }
  78. }
  79. function handleSelect(item) {
  80. data.activeId = item.id;
  81. httpApi.getCommonZSJYZhuanyeInfo({id: data.activeId}).then(res => {
  82. data.activeData = res.data;
  83. })
  84. }
  85. function handleDownFile(ccite) {
  86. window.location.href = ccite.url;
  87. }
  88. function pageInit() {
  89. httpApi.getCommonZSJYShengxueList({page:data.page,size:data.size}).then(res => {
  90. data.list = res.data.data;
  91. data.total = res.data.total;
  92. data.activeId = data.list[0].id;
  93. httpApi.getCommonZSJYZhuanyeInfo({id: data.activeId}).then(res => {
  94. data.activeData = res.data;
  95. })
  96. })
  97. }
  98. </script>
  99. <style>
  100. </style>