xzzxXiazaizhongxin.vue 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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)">
  33. <a class="table-btn">下载</a>
  34. </view>
  35. </view>
  36. </template>
  37. </MtaScrollViewVue>
  38. </view>
  39. </view>
  40. </view>
  41. <!-- 底部导航 -->
  42. <MtaFooter></MtaFooter>
  43. </view>
  44. </view>
  45. </template>
  46. <script setup>
  47. import {
  48. ref,
  49. reactive
  50. } from "vue";
  51. import {
  52. onLoad
  53. } from "@dcloudio/uni-app"
  54. import * as httpApi from "@/api/common.js"
  55. import MtaScrollViewVue from "@/components/MtaScrollView/MtaScrollView.vue";
  56. import MtaFooter from "@/components/MtaFooter.vue"
  57. const myRef = ref(null);
  58. const data = reactive({
  59. content: '',
  60. activeId: null,
  61. treeList: []
  62. })
  63. onLoad(() => {
  64. pageInit();
  65. })
  66. function handleDownFile(item) {
  67. window.location.href = item.pdfUrl
  68. }
  69. function getList(data) {
  70. return httpApi.getCommonZsjyXXazaiList(data)
  71. }
  72. function handleClick() {
  73. myRef.value.onRefresh()
  74. }
  75. function pageInit() {
  76. httpApi.getCommonZsjyXXazaiTree().then(res => {
  77. data.treeList = res.data.children.map(item => {
  78. return {
  79. value: item.id,
  80. text: item.lable
  81. }
  82. });
  83. })
  84. httpApi.getCommonZsjyXXazaiList(data).then(res => {})
  85. }
  86. </script>
  87. <style>
  88. </style>