64 lines
1.9 KiB
Vue
64 lines
1.9 KiB
Vue
|
<template>
|
|||
|
<a-list item-layout="horizontal" :data-source="list">
|
|||
|
<template #renderItem="{ item }">
|
|||
|
<a-list-item>
|
|||
|
<a-list-item-meta>
|
|||
|
<template #title>
|
|||
|
<div class="wenZiJiaCu">
|
|||
|
听了 {{ item.kkdw }} {{item.skjs}} {{ item.kcmc }}
|
|||
|
</div>
|
|||
|
</template>
|
|||
|
<template #description>
|
|||
|
<span v-if="item.score" style="color: #337ab7;">已评分:{{ item.score }}分</span>
|
|||
|
<span v-else style="color: #337ab7;"><FormOutlined/>填写评价</span>
|
|||
|
</template>
|
|||
|
<template #avatar>
|
|||
|
<div class="wenZiJuZhong">
|
|||
|
<TeamOutlined/>
|
|||
|
<div>{{ item.shijian }}</div>
|
|||
|
<div style="color: #1ab394;">{{ item.tkrq }}</div>
|
|||
|
</div>
|
|||
|
</template>
|
|||
|
</a-list-item-meta>
|
|||
|
</a-list-item>
|
|||
|
</template>
|
|||
|
</a-list>
|
|||
|
</template>
|
|||
|
<script setup lang="ts">
|
|||
|
import { ref, onMounted } from 'vue';
|
|||
|
import { TeamOutlined, FormOutlined } from '@ant-design/icons-vue';
|
|||
|
import { getUserId } from '/@/views/site/utils/index';
|
|||
|
|
|||
|
import { defHttp } from '/@/utils/http/axios';
|
|||
|
enum Api {
|
|||
|
list = '/kcTingke/kcTingke/findTingKeZuJiBytingketimeAndUserId'
|
|||
|
}
|
|||
|
|
|||
|
/**
|
|||
|
* 列表接口
|
|||
|
* @param params
|
|||
|
*/
|
|||
|
const listApi = (params) => defHttp.get({ url: Api.list, params });
|
|||
|
|
|||
|
const list = ref<any>([]);
|
|||
|
onMounted(() => {
|
|||
|
listApi({ userid: getUserId(), tingketime: '2023-02-19' }).then(res => {
|
|||
|
|
|||
|
console.log(`🚀 ---------------------------------------------🚀`);
|
|||
|
console.log(`🚀 ~ file: index.vue:57 ~ listApi ~ res:`, res);
|
|||
|
console.log(`🚀 ---------------------------------------------🚀`);
|
|||
|
|
|||
|
list.value = res ?? [];
|
|||
|
});
|
|||
|
});
|
|||
|
|
|||
|
</script>
|
|||
|
<style lang="less" scoped>
|
|||
|
.wenZiJuZhong {
|
|||
|
text-align: center;
|
|||
|
}
|
|||
|
.wenZiJiaCu {
|
|||
|
font-weight: 700;
|
|||
|
}
|
|||
|
|
|||
|
</style>
|