|
@@ -0,0 +1,363 @@
|
|
|
|
+<template>
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="英语写作"
|
|
|
|
+ :visible.sync="engEvaDialogVisible"
|
|
|
|
+ :append-to-body="true"
|
|
|
|
+ width="800px"
|
|
|
|
+ :before-close="handleClose"
|
|
|
|
+ class="dialog_diy fullStyle"
|
|
|
|
+ >
|
|
|
|
+ <div class="engUpBox">
|
|
|
|
+ <div class="engUpTop">
|
|
|
|
+ <div class="engTitle">
|
|
|
|
+ <div>作文题目:</div>
|
|
|
|
+ <div>{{ evaEngJson.teacherJson.engTitle }}</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="engText">
|
|
|
|
+ <div>作文题目:</div>
|
|
|
|
+ <div
|
|
|
|
+ class="cont"
|
|
|
|
+ v-html="evaEngJson.teacherJson.englishText"
|
|
|
|
+ @click="checkImg(getImgList(evaEngJson.teacherJson.englishText))"
|
|
|
|
+ ></div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ class="correctBox"
|
|
|
|
+ :style="{ height: `calc(100% - ${topHeight}px)` }"
|
|
|
|
+ >
|
|
|
|
+ <div class="oldBox">
|
|
|
|
+ <div class="oldMes">原文( 作者:{{ evaEngJson.username }} )</div>
|
|
|
|
+ <div class="oldText">
|
|
|
|
+ <div class="detailBox">
|
|
|
|
+ <div class="oldDetail">
|
|
|
|
+ <div>标题:</div>
|
|
|
|
+ <div>{{ evaEngJson.studentJson.engTitle }}</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="oldDetail1">
|
|
|
|
+ <div>正文:</div>
|
|
|
|
+ <div v-html="evaEngJson.studentJson.engText"></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ class="oldDetail"
|
|
|
|
+ v-if="
|
|
|
|
+ evaEngJson.studentJson.imgList &&
|
|
|
|
+ evaEngJson.studentJson.imgList.length > 0
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ <div>图片:</div>
|
|
|
|
+ <div class="oldImg">
|
|
|
|
+ <img :src="evaEngJson.studentJson.imgList[0].url" alt="" />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="oldBox" style="position: relative">
|
|
|
|
+ <div
|
|
|
|
+ class="oldMes"
|
|
|
|
+ style="
|
|
|
|
+ background: rgb(224 236 255);
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ flex-wrap: nowrap;
|
|
|
|
+ align-items: center;
|
|
|
|
+ "
|
|
|
|
+ >
|
|
|
|
+ <div
|
|
|
|
+ class="allName"
|
|
|
|
+ :style="{ background: type == 0 ? '#aacaff' : '' }"
|
|
|
|
+ @click="setType(0)"
|
|
|
|
+ >
|
|
|
|
+ AI评价
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ class="allName"
|
|
|
|
+ :style="{ background: type == 1 ? '#aacaff' : '' }"
|
|
|
|
+ @click="setType(1)"
|
|
|
|
+ >
|
|
|
|
+ 教师评价
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="type == 0">
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="isPj = true"
|
|
|
|
+ v-if="!isPj"
|
|
|
|
+ style="margin: 10px 0 0 0"
|
|
|
|
+ >AI评价</el-button
|
|
|
|
+ >
|
|
|
|
+ <div class="oldText" style="margin-top: 10px" v-else>
|
|
|
|
+ <div class="detailBox" style="min-width: 300px">
|
|
|
|
+ <div class="oldDetail" style="min-width: 300px">
|
|
|
|
+ <div>作业批改:</div>
|
|
|
|
+ <el-input
|
|
|
|
+ type="textarea"
|
|
|
|
+ :rows="10"
|
|
|
|
+ resize="none"
|
|
|
|
+ v-model="aiList.engTitle"
|
|
|
|
+ disabled
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ <div class="oldDetail" style="min-width: 300px">
|
|
|
|
+ <div>作业评价:</div>
|
|
|
|
+ <el-input
|
|
|
|
+ type="textarea"
|
|
|
|
+ :rows="10"
|
|
|
|
+ resize="none"
|
|
|
|
+ v-model="aiList.engText"
|
|
|
|
+ disabled
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="isPj = false"
|
|
|
|
+ v-if="isPj"
|
|
|
|
+ style="position: absolute; top: 50px; right: 20px"
|
|
|
|
+ >返回评价</el-button
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="type == 1" style="margin: 10px 0 0 0">
|
|
|
|
+ <div class="oldText" style="margin-top: 10px">
|
|
|
|
+ <div class="detailBox" style="min-width: 300px">
|
|
|
|
+ <div class="oldDetail" style="min-width: 300px">
|
|
|
|
+ <div>作业批改:</div>
|
|
|
|
+ <el-input
|
|
|
|
+ type="textarea"
|
|
|
|
+ :rows="10"
|
|
|
|
+ resize="none"
|
|
|
|
+ v-model="teacherList.engTitle"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ <div class="oldDetail" style="min-width: 300px">
|
|
|
|
+ <div>作业评价:</div>
|
|
|
|
+ <el-input
|
|
|
|
+ type="textarea"
|
|
|
|
+ :rows="10"
|
|
|
|
+ resize="none"
|
|
|
|
+ v-model="teacherList.engText"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <span slot="footer" class="dialog-footer" style="z-index: 999;position: relative;">
|
|
|
|
+ <el-button @click="close()">取 消</el-button>
|
|
|
|
+ <el-button type="primary">确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+export default {
|
|
|
|
+ props: ["engEvaDialogVisible","evaEngJson"],
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ topHeight: 0,
|
|
|
|
+ type: 0,
|
|
|
|
+ isPj: false,
|
|
|
|
+ aiList: {
|
|
|
|
+ engTitle: "这是题目",
|
|
|
|
+ engText: "这是内容",
|
|
|
|
+ },
|
|
|
|
+ teacherList: {
|
|
|
|
+ engTitle: "",
|
|
|
|
+ engText: "",
|
|
|
|
+ },
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ handleClose(done) {
|
|
|
|
+ this.close()
|
|
|
|
+ done();
|
|
|
|
+ },
|
|
|
|
+ close(){
|
|
|
|
+ this.$emit("update:engEvaDialogVisible",false)
|
|
|
|
+ },
|
|
|
|
+ checkImg(list) {
|
|
|
|
+ if (!list.length) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.$hevueImgPreview({
|
|
|
|
+ multiple: true, // 开启多图预览模式
|
|
|
|
+ imgList: list, // 需要预览的多图数组
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ getImgList() {
|
|
|
|
+ return function (val) {
|
|
|
|
+ let srcList = []; // 定义一个数组用来接收后面的img地址
|
|
|
|
+
|
|
|
|
+ val.replace(
|
|
|
|
+ /<img [^>]*src=['"]([^'"]+)[^>]*>/g,
|
|
|
|
+ function (match, capture) {
|
|
|
|
+ // 查找匹配的元素 match为整个img标签 capture为src中的内容
|
|
|
|
+ srcList.push(capture);
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ return srcList;
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ setType(i) {
|
|
|
|
+ this.type = i;
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ this.topHeight = document.querySelectorAll(".engUpTop")[0].offsetHeight;
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style scoped>
|
|
|
|
+.dialog_diy >>> .el-dialog__header {
|
|
|
|
+ background: #454545 !important;
|
|
|
|
+ padding: 15px 20px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.dialog_diy >>> .el-dialog__title {
|
|
|
|
+ color: #fff;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.dialog_diy >>> .el-dialog__headerbtn {
|
|
|
|
+ top: 19px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
|
|
|
|
+ color: #fff;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
|
|
|
|
+ color: #fff;
|
|
|
|
+}
|
|
|
|
+.dialog_diy >>> .el-dialog__body,
|
|
|
|
+.dialog_diy >>> .el-dialog__footer {
|
|
|
|
+ background: #fafafa;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.fullStyle>>>.el-dialog__body {
|
|
|
|
+ height: calc(100% - 125px) !important;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding: 30px 0 !important;
|
|
|
|
+ background: #fff !important;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.fullStyle>>>.el-dialog {
|
|
|
|
+ width: 100% !important;
|
|
|
|
+ max-width: 100% !important;
|
|
|
|
+ height: 100% !important;
|
|
|
|
+ margin: 0 !important;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.fullStyle {
|
|
|
|
+ width: 100% !important;
|
|
|
|
+ max-width: 100% !important;
|
|
|
|
+ height: 100% !important;
|
|
|
|
+ margin: 0 auto !important;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.fullStyle>>>.el-dialog__footer{
|
|
|
|
+ background: #fff !important;
|
|
|
|
+}
|
|
|
|
+.engUpBox {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.engTitle,
|
|
|
|
+.engText {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ flex-wrap: nowrap;
|
|
|
|
+ align-items: flex-start;
|
|
|
|
+ padding: 0 20px 20px 20px;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.engTitle > .div:first-child,
|
|
|
|
+.engText > div:first-child {
|
|
|
|
+ min-width: 75px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.correctBox {
|
|
|
|
+ width: 100%;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ flex-wrap: nowrap;
|
|
|
|
+ align-items: flex-start;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.oldBox {
|
|
|
|
+ width: 50%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ flex-wrap: nowrap;
|
|
|
|
+ align-items: center;
|
|
|
|
+ border-top: 1px solid #d9d9d9;
|
|
|
|
+ border-left: 1px solid #d9d9d9;
|
|
|
|
+ border-right: 1px solid #d9d9d9;
|
|
|
|
+}
|
|
|
|
+.oldBox > div:first-child {
|
|
|
|
+ width: 100%;
|
|
|
|
+ text-align: center;
|
|
|
|
+ background: #d9d9d9;
|
|
|
|
+ height: 35px;
|
|
|
|
+ line-height: 35px;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.oldText {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ flex-wrap: nowrap;
|
|
|
|
+ align-content: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.detailBox {
|
|
|
|
+ width: 50%;
|
|
|
|
+ padding: 10px;
|
|
|
|
+ background: #f6f6f6;
|
|
|
|
+ border-radius: 5px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.oldDetail,
|
|
|
|
+.oldDetail1 {
|
|
|
|
+ padding-bottom: 30px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.oldDetail1 > div:last-child {
|
|
|
|
+ max-height: 200px;
|
|
|
|
+ overflow: auto;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.oldImg {
|
|
|
|
+ width: 30px;
|
|
|
|
+ height: 30px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.oldImg > img {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.allName {
|
|
|
|
+ min-width: 50%;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ word-break: break-word;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ text-align: center;
|
|
|
|
+ border: 1px solid #bcc2cc;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+}
|
|
|
|
+</style>
|