jyjxZhuanyejianshe.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <view class="dljt-page-box zhuanye-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-text">教育教学</view>
  11. <icon class="breadcrumb-jt"></icon>
  12. <view class="breadcrumb-active">专业建设</view>
  13. </view>
  14. <view class="zhuanye-list-box">
  15. <view class="zhuanye-item" :class="{active: data.type == 1}" @click="changeType(1)"><icon></icon><text>专业发展</text></view>
  16. <view class="zhuanye-item" :class="{active: data.type == 2}" @click="changeType(2)"><icon></icon><text>人培方案</text></view>
  17. <view class="zhuanye-item" :class="{active: data.type == 3}" @click="changeType(3)"><icon></icon><text>课程标准</text></view>
  18. <view class="zhuanye-item" :class="{active: data.type == 4}" @click="changeType(4)"><icon></icon><text>实训安全</text></view>
  19. <view class="zhuanye-item" :class="{active: data.type == 5}" @click="changeType(5)"><icon></icon><text>教材管理</text></view>
  20. </view>
  21. <MtaScrollViewVue :refreshFn="getList" :size="10" :other-option="{type: data.type}" ref="listRef">
  22. <template v-slot="{ list }">
  23. <view class="data-content-item" v-for="item in list" :key="item.id" @click="handleClick(item)">
  24. <view class="list-time-box">
  25. <view class="time-data">{{formatDateToYearMonthDay(item.createTime)[1]}}</view>
  26. <view class="time-year">{{formatDateToYearMonthDay(item.createTime)[0]}}</view>
  27. </view>
  28. <view class="list-title-box"> {{item.title}} </view>
  29. </view>
  30. </template>
  31. </MtaScrollViewVue>
  32. </view>
  33. <!-- 底部导航 -->
  34. <MtaFooter></MtaFooter>
  35. </view>
  36. </view>
  37. </template>
  38. <script setup>
  39. import {
  40. ref,
  41. reactive,
  42. nextTick
  43. } from "vue";
  44. import {
  45. onLoad
  46. } from "@dcloudio/uni-app"
  47. import * as httpApi from "@/api/common.js"
  48. import MtaScrollViewVue from "@/components/MtaScrollView/MtaScrollView.vue";
  49. import {
  50. formatDateToYearMonthDay,
  51. getStringByHtml3
  52. } from "@/utils/common.js"
  53. import MtaFooter from "@/components/MtaFooter.vue"
  54. const data = reactive({
  55. list: '',
  56. total: '',
  57. page: 1,
  58. size: 5,
  59. type: 1
  60. })
  61. const listRef = ref(null)
  62. onLoad(({type}) => {
  63. data.type = type || 1;
  64. })
  65. function handleClick(data) {
  66. uni.navigateTo({
  67. url: `/pages/jyjxZhuanyejiansheInfo/jyjxZhuanyejiansheInfo?id=${data.id}&type=${data.type}`
  68. })
  69. }
  70. function getList(data) {
  71. return httpApi.getJiaoyuZhuanyejiansheList(data)
  72. }
  73. function handleGo() {
  74. uni.navigateTo({
  75. url: '/pages/index/index'
  76. })
  77. }
  78. function changeType(code) {
  79. data.type = code;
  80. data.page = 1;
  81. nextTick(() => {
  82. listRef.value.onRefresh()
  83. })
  84. }
  85. function pageInit() {
  86. httpApi.getJiaoyuZhuanyejiansheList({page:data.page,size:data.size,type: data.type}).then(res => {
  87. data.list = res.data.data;
  88. data.total = res.data.total;
  89. })
  90. }
  91. </script>
  92. <style>
  93. </style>