|
|
@@ -1,21 +1,21 @@
|
|
|
<template>
|
|
|
<div class="page">
|
|
|
- <el-table :data="list" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无报告记录" max-height="578px" style="margin-top: 18px;">
|
|
|
+ <el-table :data="dataList" border cell-class-name="vertical-top-cell" v-loading="loading" empty-text="暂无报告记录" max-height="578px" style="margin-top: 18px;">
|
|
|
<el-table-column label="序号" width="50">
|
|
|
<template #default="scope">
|
|
|
{{ scope.$index + 1 }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="报告名称" prop="xx"></el-table-column>
|
|
|
+ <el-table-column label="报告名称" prop="reportName"></el-table-column>
|
|
|
<el-table-column label="报告类型" prop="xx">
|
|
|
- <template #default="scope"></template>
|
|
|
+ <template #default="scope">{{ typeDict[scope.row.type]||'' }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="报告状态" prop="xx">
|
|
|
+ <!-- <el-table-column label="报告状态" prop="xx">
|
|
|
<template #default="scope"></template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="发送人" prop="xx"></el-table-column>
|
|
|
- <el-table-column label="团队名称" prop="xx"></el-table-column>
|
|
|
- <el-table-column label="创建时间" prop="xx"></el-table-column>
|
|
|
+ <el-table-column label="发送人" prop="xx"></el-table-column> -->
|
|
|
+ <el-table-column label="团队名称" prop="teamName"></el-table-column>
|
|
|
+ <el-table-column label="创建时间" prop="createDate"></el-table-column>
|
|
|
<el-table-column label="操作" width="150">
|
|
|
<template #default="scope">
|
|
|
<el-button link type="text" size="mini" @click="handleReview(scope.row)">查看</el-button>
|
|
|
@@ -39,23 +39,34 @@
|
|
|
|
|
|
<script setup name="">
|
|
|
const props = defineProps({
|
|
|
- list:{
|
|
|
- typeof:Array,
|
|
|
- default:()=>[]
|
|
|
+ userId:{
|
|
|
+ typeof:'String',
|
|
|
+ default:''
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
- import { ref, getCurrentInstance } from 'vue'
|
|
|
+ import { ref, getCurrentInstance, onMounted } from 'vue'
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
+ import {
|
|
|
+ getUserReportList
|
|
|
+ } from '@/api/agent/indexTwo.js'
|
|
|
|
|
|
const queryParams = ref({
|
|
|
page: 1,
|
|
|
- pageSize: 10
|
|
|
+ limit: 10,
|
|
|
+ coachId:''
|
|
|
+ })
|
|
|
+ const typeDict = ref({
|
|
|
+ 1:'基础版',
|
|
|
+ 2:'专业版',
|
|
|
+ 3:'专家版'
|
|
|
})
|
|
|
+ const dataList = ref([])
|
|
|
const total = ref(0)
|
|
|
const loading = ref(false)
|
|
|
|
|
|
const handleSizeChange = (val) => {
|
|
|
- queryParams.value.pageSize = val;
|
|
|
+ queryParams.value.limit = val;
|
|
|
proxy.$emit('handleSizeChange', queryParams);
|
|
|
}
|
|
|
|
|
|
@@ -63,6 +74,19 @@
|
|
|
queryParams.value.page = val;
|
|
|
proxy.$emit('handleCurrentChange', queryParams);
|
|
|
}
|
|
|
+ const getList = async () => {
|
|
|
+ let query = JSON.parse(JSON.stringify(queryParams.value));
|
|
|
+ loading.value = true;
|
|
|
+ const res = await getUserReportList(query);
|
|
|
+ dataList.value = res.data.list;
|
|
|
+ total.value = res.data.total;
|
|
|
+ loading.value = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ onMounted(() => {
|
|
|
+ queryParams.value.coachId = props.userId;
|
|
|
+ getList();
|
|
|
+ })
|
|
|
|
|
|
const handleReview = (row) => {
|
|
|
proxy.$emit('handleReview', row);
|