123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <template>
- <customNavbarVue title="成绩"></customNavbarVue>
- <custom-scroll-list-chengji ref="customChengjiRef" :refreshFn="currentRefreshFn" @tabChange="tabChange"
- :searchBarKey="searchBarKeyName" :tabList="tabData" :defaultTab="1">
- <template #default="{list}">
- <scroll-list-card-chengji v-show="currentTab =='1'" @lookShijuan="lookShijuan" @lookPaiming="lookPaiming" v-for="(item,index) in list"
- :key="item.ksId" :data="item"></scroll-list-card-chengji>
- <scroll-list-card-kechengji v-show="currentTab =='2'" @click="kechengChengjiClick(item)"
- v-for="(item,index) in list" :key="item.ksId" :data="item"></scroll-list-card-kechengji>
- </template>
- </custom-scroll-list-chengji>
- </template>
- <script setup>
- import {
- getKaoshichengjiList,
- getKcchengjiList
- } from "@/api/chengji.js";
- import customNavbarVue from "@/components/custom-navbar/custom-navbar.vue";
- import customScrollListChengji from "@/components/custom-scroll-list/custom-scroll-list-chengji.vue";
- import {
- onLoad,
- onReady,
- } from "@dcloudio/uni-app"
- import {
- reactive,
- ref,
- computed
- } from "vue";
- let currentTab = ref('1')
- let searchBarKeyName = ref('ksName')
- let customChengjiRef = ref(null)
- const tabData = [{
- label: "考试成绩",
- value: 1,
- }, {
- label: "课程成绩",
- value: 2
- }]
- const currentRefreshFn = computed(() =>
- currentTab.value == '1' ? getKaoshichengjiList : getKcchengjiList
- )
- function tabChange(data) {
- currentTab.value = data.value
- if (currentTab.value == 1) {
- searchBarKeyName.value = 'ksName'
- } else {
- searchBarKeyName.value = 'kcName'
- }
- // customChengjiRef.value.tabChangeSearch(data)
- }
- const lookShijuan = (data) => {
- console.log('data',data);
- uni.navigateTo({
- url: '/subpkgScore/pages/score/kaoshiChengjiInfo?hisId=' + data.hisId + '&name=' + data.ksName+ '&userScore=' + data.userScore+ '&ksScore=' + data.ksScore
- });
- }
- const lookPaiming = (data) => {
- console.log('datalookPaiming',data);
- uni.navigateTo({
- url: '/subpkgScore/pages/score/kaoshiChengjiInfo?kcId=' + data.kcId + '&name=' + data.name
- });
- }
- </script>
- <style lang="scss">
- </style>
|