feat: 触控项目评价
This commit is contained in:
parent
992195273a
commit
81024c0e3c
@ -236,6 +236,20 @@ export const dynamicRoutes = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/is/evaluate",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ["is:project:list"],
|
||||
children: [
|
||||
{
|
||||
path: "index/:id",
|
||||
component: () => import("@/views/is/project/evaluate/index"),
|
||||
name: "isProjectEvaluate",
|
||||
meta: { title: "触控评价", activeMenu: "/is/evaluate" },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/vi/evaluate",
|
||||
component: Layout,
|
||||
@ -245,8 +259,8 @@ export const dynamicRoutes = [
|
||||
{
|
||||
path: "index/:id",
|
||||
component: () => import("@/views/vi/testProject/evaluate/index"),
|
||||
name: "ProjectEvaluate",
|
||||
meta: { title: "评价", activeMenu: "/vi/evaluate" },
|
||||
name: "viProjectEvaluate",
|
||||
meta: { title: "语音评价", activeMenu: "/vi/evaluate" },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
124
src/views/is/project/evaluate/index.vue
Normal file
124
src/views/is/project/evaluate/index.vue
Normal file
@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<Info :infoData="projectData" />
|
||||
<div class="test-container">
|
||||
<div class="title">测试结果</div>
|
||||
<div>
|
||||
<el-button>生成报告</el-button>
|
||||
<el-button>导出结果</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="id" label="结果ID" />
|
||||
<el-table-column prop="time" label="时间" />
|
||||
<el-table-column prop="text" label="语料文本" />
|
||||
<el-table-column prop="responseTime" label="响应时间" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.responseTime">{{ row.responseTime }}</div>
|
||||
<div v-else><el-tag type="primary">未测试</el-tag></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rate" label="字识别率" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.rate">{{ row.rate }}</div>
|
||||
<div v-else><el-tag type="info">未测试</el-tag></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="result" label="测试结果">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="row.result ? 'success' : 'warning'">{{ row.result ? '通过' : '分析中' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="can" label="CAN结果">
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.rate">{{ row.can }}</div>
|
||||
<div v-else><el-tag type="danger">未测试</el-tag></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="flag" label="结果标记 " />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import Info from './info.vue';
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
const projectData = route.query.data
|
||||
? JSON.parse(route.query.data)
|
||||
: {};
|
||||
|
||||
const tableData = ref([]);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.btn-container {
|
||||
background: #fff;
|
||||
margin: 4px 0;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.test-container {
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.title {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.context-container {
|
||||
height: calc(100% - 200px);
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
|
||||
.left {
|
||||
width: 300px;
|
||||
|
||||
.title {
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
padding-left: 12px;
|
||||
border: 1px solid #e4e7ed;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.schemaList {
|
||||
height: calc(100% - 40px);
|
||||
overflow-y: auto;
|
||||
background: #fff;
|
||||
border: 1px solid #e4e7ed;
|
||||
|
||||
.schema {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px;
|
||||
|
||||
&:hover {
|
||||
background: #f0ecec;
|
||||
}
|
||||
}
|
||||
|
||||
.activeItem {
|
||||
background: #f0ecec;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
69
src/views/is/project/evaluate/info.vue
Normal file
69
src/views/is/project/evaluate/info.vue
Normal file
@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<div class="info">
|
||||
<div class="item">
|
||||
<div class="label">项目名称:</div>
|
||||
<div class="text">{{ infoData.projectName }}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">项目编号:</div>
|
||||
<div class="text">{{ infoData.projectId }}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">测试人员:</div>
|
||||
<div class="text">{{ infoData.tester }}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">计划测试时间:</div>
|
||||
<div class="text">{{ parseTime(infoData.planStart) }}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">样品名称:</div>
|
||||
<div class="text">{{ infoData.sampleName }}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">委托单位:</div>
|
||||
<div class="text">{{ infoData.entrustUnit }}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">送样日期:</div>
|
||||
<div class="text">{{ parseTime(infoData.sampleDate) }}</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="label">项目描述:</div>
|
||||
<div class="text">{{ infoData.remark }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
infoData: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
padding: 12px;
|
||||
background: #fff;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 8px;
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
.item {
|
||||
flex: 0 0 25%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.label {
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -125,6 +125,13 @@
|
||||
@click="handleExecute(row)"
|
||||
>执行
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.status == 0"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleEvaluate(row)"
|
||||
>评价
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -582,6 +589,17 @@ const handleExecute = (row) => {
|
||||
executeProjectId.value = row.projectId;
|
||||
}
|
||||
|
||||
const router = useRouter()
|
||||
const handleEvaluate = (row) => {
|
||||
router.push({
|
||||
path: "/is/evaluate/index/" + row.projectId, // 目标路由路径
|
||||
// 对象序列化为 JSON 字符串(关键)
|
||||
query: {
|
||||
data: JSON.stringify(row)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
getTreeData();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user