index.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <view>
  3. 成绩
  4. </view>
  5. </template>
  6. <script setup>
  7. import {
  8. getKaoshichengjiList,
  9. getKcchengjiList
  10. } from "@/api/chengji.js";
  11. import customScrollListChengji from "@/components/custom-scroll-list/custom-scroll-list-chengji.vue";
  12. import {
  13. onLoad,
  14. onReady,
  15. } from "@dcloudio/uni-app"
  16. import {
  17. reactive,
  18. ref,
  19. computed
  20. } from "vue";
  21. let currentTab = ref('1')
  22. let searchBarKeyName = ref('ksName')
  23. let customChengjiRef = ref(null)
  24. const tabData = [{
  25. label: "考试成绩",
  26. value: 1,
  27. }, {
  28. label: "课程成绩",
  29. value: 2
  30. }]
  31. const currentRefreshFn = computed(() =>
  32. currentTab.value == '1' ? getKaoshichengjiList : getKcchengjiList
  33. )
  34. function tabChange(data) {
  35. currentTab.value = data.value
  36. if (currentTab.value == 1) {
  37. searchBarKeyName.value = 'ksName'
  38. } else {
  39. searchBarKeyName.value = 'kcName'
  40. }
  41. // customChengjiRef.value.tabChangeSearch(data)
  42. }
  43. const lookShijuan = (data) => {
  44. console.log('data',data);
  45. uni.navigateTo({
  46. url: '/pages/score/kaoshiChengjiInfo?lxId=' + data.lxId + '&name=' + data.name
  47. });
  48. }
  49. const lookPaiming = (data) => {
  50. console.log('datalookPaiming',data);
  51. // uni.navigateTo({
  52. // url: '/pages/score/kaoshiChengjiInfo?kcId=' + data.kcId + '&name=' + data.name
  53. // });
  54. }
  55. </script>
  56. <style lang="scss">
  57. </style>