xzzxXiazaizhongxin.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. <view class="dljt-breadcrumb-box">
  8. <view class="breadcrumb-text" @click="handleGo()">首页</view>
  9. <icon class="breadcrumb-jt"></icon>
  10. <view class="breadcrumb-active">下载中心</view>
  11. </view>
  12. <view>
  13. <!-- 查询 -->
  14. <view>
  15. <uni-data-select v-model="data.activeId" :localdata="data.treeList"></uni-data-select>
  16. <button @click="handleClick">查询</button>
  17. </view>
  18. <view>
  19. <view>序号</view>
  20. <view>类别</view>
  21. <view>文件</view>
  22. <view>文件下载</view>
  23. </view>
  24. <MtaScrollViewVue ref="myRef" :refreshFn="getList" :size="10"
  25. :otherOption="{classifyId: data.activeId}">
  26. <template v-slot="{ list }">
  27. <view class="xyry-item-row" v-for="(item,index) in list" :key="item.id">
  28. <view>{{index+1}}</view>
  29. <view>{{item.classifyName}}</view>
  30. <view>{{item.title}}</view>
  31. <view @click="handleDownFile(item)">下载</view>
  32. </view>
  33. </template>
  34. </MtaScrollViewVue>
  35. </view>
  36. </view>
  37. <!-- 底部导航 -->
  38. <MtaFooter></MtaFooter>
  39. </view>
  40. </view>
  41. </template>
  42. <script setup>
  43. import {
  44. ref,
  45. reactive
  46. } from "vue";
  47. import {
  48. onLoad
  49. } from "@dcloudio/uni-app"
  50. import * as httpApi from "@/api/common.js"
  51. import MtaScrollViewVue from "@/components/MtaScrollView/MtaScrollView.vue";
  52. import MtaFooter from "@/components/MtaFooter.vue"
  53. const myRef = ref(null);
  54. const data = reactive({
  55. content: '',
  56. activeId: null,
  57. treeList: []
  58. })
  59. onLoad(() => {
  60. pageInit();
  61. })
  62. function handleDownFile(item) {
  63. window.location.href = item.pdfUrl
  64. }
  65. function getList(data) {
  66. return httpApi.getCommonZsjyXXazaiList(data)
  67. }
  68. function handleClick() {
  69. myRef.value.onRefresh()
  70. }
  71. function pageInit() {
  72. httpApi.getCommonZsjyXXazaiTree().then(res => {
  73. data.treeList = res.data.children.map(item => {
  74. return {
  75. value: item.id,
  76. text: item.lable
  77. }
  78. });
  79. })
  80. httpApi.getCommonZsjyXXazaiList(data).then(res => {})
  81. }
  82. </script>
  83. <style>
  84. </style>