xzzxXiazaizhongxin.vue 2.5 KB

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