|
|
@@ -0,0 +1,234 @@
|
|
|
+<template>
|
|
|
+ <div style="display: flex;">
|
|
|
+ <el-card style="width: 40%; height: 90vh; margin: 10px; position: relative;" shadow="never">
|
|
|
+ <div style="display: flex;justify-content: center;align-items: center;width: 100px; height: 50px; background-color:var(--system-color); position: absolute; top: 20px; left: 0; clip-path: polygon(0 0, 100% 0, 80% 50%, 100% 100%, 0 100%);">
|
|
|
+ <span style="margin-left: -20px;color: white">原文</span>
|
|
|
+ </div>
|
|
|
+ <div style="white-space: pre-wrap; margin-top: 80px; line-height: 30px">
|
|
|
+ <el-scrollbar height="800px">
|
|
|
+ <span style="position: relative;">
|
|
|
+ <span v-for="sentenceEvaluation in data.sentenceEvaluationList"
|
|
|
+ :key="sentenceEvaluation.id"
|
|
|
+ :style="{ 'text-decoration': 'underline', 'text-decoration-color': 'pink', 'text-decoration-thickness': '3px', 'text-decoration-style': 'dashed', 'background-color': sentenceEvaluation.id === highlightSentenceId? 'rgba(255, 192, 203, 0.3)' : 'transparent' }">
|
|
|
+ {{ sentenceEvaluation.sentence }}
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ </el-scrollbar>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ <div style="width: 40%; margin: 10px; height: 88vh;">
|
|
|
+ <div class="combined-box">
|
|
|
+ <div style="display: flex">
|
|
|
+ <div
|
|
|
+ class="trapezoid"
|
|
|
+ :class="{ active: selected === 'trapezoid' }"
|
|
|
+ @click="selected = 'trapezoid'"
|
|
|
+ >
|
|
|
+ 整体评价
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="trapezoid2"
|
|
|
+ :class="{ active: selected === 'trapezoid2' }"
|
|
|
+ @click="selected = 'trapezoid2'"
|
|
|
+ >
|
|
|
+ 逐句评价
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <template v-if="selected === 'trapezoid'">
|
|
|
+ <div class="rectangle">
|
|
|
+ <div style="display: flex;align-items: flex-start;margin-bottom: 15px;">
|
|
|
+ <div>
|
|
|
+ <!--展示头像-->
|
|
|
+ <el-avatar src="@/image/404.jpg" :size="32" :shape="'circle'">
|
|
|
+ </el-avatar>
|
|
|
+ </div>
|
|
|
+ <div style="margin-left: 15px">
|
|
|
+ <!--名字-->
|
|
|
+ <div style="margin-bottom: 2px">SEEAI系统</div>
|
|
|
+ <!--内容-->
|
|
|
+ <div style="background-color: #f0f0f0;padding: 8px 12px;border-radius: 16px;white-space: pre-line;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);">
|
|
|
+ {{ data.overallEvaluation }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="rectangle">
|
|
|
+ <el-scrollbar height="800px">
|
|
|
+ <div style="display: flex; flex-direction: column;">
|
|
|
+ <el-card v-for="sentenceEvaluation in data.sentenceEvaluationList"
|
|
|
+ :key="sentenceEvaluation.id"
|
|
|
+ style="cursor: pointer; margin-bottom: 10px; position: relative;" shadow="hover"
|
|
|
+ @mouseenter="highlightSentenceId = sentenceEvaluation.id"
|
|
|
+ @mouseleave="highlightSentenceId = sentenceEvaluation.id"
|
|
|
+ >
|
|
|
+ <div style="display: flex;justify-content: center;align-items: center;width: 20px; height: 100%; background-color: pink; position: absolute; top: 0; left: calc(100% - 20px)">
|
|
|
+ </div>
|
|
|
+ <div style="padding-right: 30px">
|
|
|
+ {{ sentenceEvaluation.evaluation }}
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
+ </el-scrollbar>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+<!-- <el-tabs style="width: 30%; margin: 10px; padding: 10px; background-color:#fff;" type="border-card">-->
|
|
|
+<!-- <el-tab-pane>-->
|
|
|
+<!-- <template #label>-->
|
|
|
+<!-- <span class="custom-tabs-label">-->
|
|
|
+<!-- <span>整体评价</span>-->
|
|
|
+<!-- </span>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- 整体评价-->
|
|
|
+<!-- </el-tab-pane>-->
|
|
|
+<!-- <el-tab-pane>-->
|
|
|
+<!-- <template #label>-->
|
|
|
+<!-- <span class="custom-tabs-label">-->
|
|
|
+<!-- <span>逐句评价</span>-->
|
|
|
+<!-- </span>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- <div style="display: flex; flex-direction: column;">-->
|
|
|
+<!-- <el-card v-for="sentenceEvaluation in data.sentenceEvaluationList"-->
|
|
|
+<!-- :key="sentenceEvaluation.id"-->
|
|
|
+<!-- style="cursor: pointer; margin-bottom: 10px; position: relative;" shadow="hover"-->
|
|
|
+<!-- @mouseenter="highlightSentenceId = sentenceEvaluation.id"-->
|
|
|
+<!-- @mouseleave="highlightSentenceId = sentenceEvaluation.id"-->
|
|
|
+<!-- >-->
|
|
|
+<!-- <div style="display: flex;justify-content: center;align-items: center;width: 20px; height: 100%; background-color: pink; position: absolute; top: 0; left: calc(100% - 20px)">-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- <div style="padding-right: 30px">-->
|
|
|
+<!-- {{ sentenceEvaluation.evaluation }}-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </el-card>-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </el-tab-pane>-->
|
|
|
+<!-- </el-tabs>-->
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+ import {onMounted, reactive, ref, watch} from "vue";
|
|
|
+ import useApis from "@/apis";
|
|
|
+ import MyComponent from "@/views/AIEvaluationPage/MyComponent.vue";
|
|
|
+
|
|
|
+ const apis = useApis()
|
|
|
+ const highlightSentenceId = ref(-1)
|
|
|
+ const selected = ref('trapezoid');
|
|
|
+
|
|
|
+
|
|
|
+ const toEvaluation = () => {
|
|
|
+ apis.overAllEvaluation(16, 15)
|
|
|
+ .then(res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ })
|
|
|
+ apis.sentenceEvaluation(16,15)
|
|
|
+ .then(res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const data = reactive<{
|
|
|
+ overallEvaluation: OverallEvaluation | null;
|
|
|
+ sentenceEvaluationList: SentenceEvaluation[];
|
|
|
+ }>({
|
|
|
+ overallEvaluation: null,
|
|
|
+ sentenceEvaluationList: []
|
|
|
+ })
|
|
|
+
|
|
|
+ const getEvaluation = () => {
|
|
|
+ apis.getOverall(16,15,2)
|
|
|
+ .then(res => {
|
|
|
+ console.log(res)
|
|
|
+ data.overallEvaluation = res.data.data
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ })
|
|
|
+ apis.getSentence(16,15,2)
|
|
|
+ .then(res => {
|
|
|
+ console.log(res)
|
|
|
+ data.sentenceEvaluationList = res.data.data
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ onMounted(() => {
|
|
|
+ toEvaluation()
|
|
|
+ getEvaluation()
|
|
|
+ })
|
|
|
+</script>
|
|
|
+
|
|
|
+<script lang="ts">
|
|
|
+export default {
|
|
|
+ name: "AIEvaluationPage"
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.tip1 {
|
|
|
+ background-color: rgba(255, 192, 203, 0.5)
|
|
|
+}
|
|
|
+.tip2 {
|
|
|
+ background-color: rgba(255, 165, 0, 0.5)
|
|
|
+}
|
|
|
+.combined-box {
|
|
|
+ width: 100%; /* 整体宽度 */
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+.trapezoid {
|
|
|
+ width: 100px; /* 梯形底边长度 */
|
|
|
+ height: 0;
|
|
|
+ border-bottom: 30px solid #cfcfcf; /* 梯形高度和颜色 */
|
|
|
+ border-right: 20px solid transparent;
|
|
|
+ line-height: 30px; /* 与 border-bottom 高度相等 */
|
|
|
+ text-align: center; /* 水平居中 */
|
|
|
+ z-index: 1;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.trapezoid2 {
|
|
|
+ width: 100px; /* 梯形底边长度 */
|
|
|
+ height: 0;
|
|
|
+ border-bottom: 30px solid #cfcfcf; /* 梯形高度和颜色 */
|
|
|
+ border-right: 20px solid transparent;
|
|
|
+ border-left: 20px solid transparent;
|
|
|
+ margin-left: -20px;
|
|
|
+ z-index: 2;
|
|
|
+ line-height: 30px; /* 与 border-bottom 高度相等 */
|
|
|
+ text-align: center; /* 水平居中 */
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.trapezoid.active {
|
|
|
+ border-bottom: 30px solid #fff;
|
|
|
+ z-index: 10;
|
|
|
+}
|
|
|
+
|
|
|
+.trapezoid2.active {
|
|
|
+ border-bottom: 30px solid #fff;
|
|
|
+ z-index: 10;
|
|
|
+}
|
|
|
+
|
|
|
+.rectangle {
|
|
|
+ width: 100%; /* 长方形宽度 */
|
|
|
+ height: calc(100% - 30px - 2vh); /* 长方形高度 */
|
|
|
+ border-top: none; /* 去掉顶部边框,使其与梯形无缝连接 */
|
|
|
+ /* 长方形底部的圆角 */
|
|
|
+ align-items: center;
|
|
|
+ padding: 20px;
|
|
|
+ background-color: #fff; /* 长方形的背景颜色 */
|
|
|
+ border-radius: 0 5px 5px 5px;
|
|
|
+}
|
|
|
+</style>
|