|
|
@@ -16,13 +16,16 @@
|
|
|
<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="200">
|
|
|
- <template #default="scope">
|
|
|
+ <el-table-column label="操作" width="360">
|
|
|
+ <template #default="scope">
|
|
|
<template v-if="scope.row.state === '0' || scope.row.state === 0">
|
|
|
<span class="report-pending">生成中</span>
|
|
|
</template>
|
|
|
<template v-else-if="scope.row.state === '1' || scope.row.state === 1 || scope.row.state === '2' || scope.row.state === 2">
|
|
|
- <el-button link type="text" size="mini" @click="handleReview(scope.row)">查看报告</el-button>
|
|
|
+ <el-button link type="text" size="mini" @click="handleReview(scope.row, 'personal')">个人报告</el-button>
|
|
|
+ <el-button link type="text" size="mini" @click="handleReview(scope.row, 'background')">背景报告</el-button>
|
|
|
+ <el-button link type="text" size="mini" @click="handleReview(scope.row, 'professional')">教练报告</el-button>
|
|
|
+ <el-button link type="text" size="mini" @click="handleReview(scope.row, 'public')">团队报告</el-button>
|
|
|
<el-button link type="text" size="mini" @click="handleDownload(scope.row)">下载报告</el-button>
|
|
|
</template>
|
|
|
<span v-else class="report-failed">生成失败</span>
|
|
|
@@ -54,9 +57,10 @@
|
|
|
});
|
|
|
import { ref, getCurrentInstance, onMounted } from 'vue'
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
- import {
|
|
|
- getUserReportList
|
|
|
- } from '@/api/agent/indexTwo.js'
|
|
|
+ import {
|
|
|
+ getUserReportList
|
|
|
+ } from '@/api/agent/indexTwo.js'
|
|
|
+ import { reportArtifactUrl } from '@/utils/reportArtifactLinks.js'
|
|
|
|
|
|
const queryParams = ref({
|
|
|
page: 1,
|
|
|
@@ -104,9 +108,14 @@
|
|
|
getList();
|
|
|
})
|
|
|
|
|
|
- const handleReview = (row) => {
|
|
|
- proxy.$emit('handleReview', row);
|
|
|
- }
|
|
|
+ const handleReview = (row, kind) => {
|
|
|
+ const url = reportArtifactUrl(row, kind)
|
|
|
+ if(!url) {
|
|
|
+ proxy.$message.error('该报告尚未生成,请生成后再查看!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ window.open(url, '_blank', 'noopener,noreferrer')
|
|
|
+ }
|
|
|
|
|
|
const handleDownload = async (row) => {
|
|
|
if(!row.fileUrl) {
|