|
|
@@ -1,11 +1,12 @@
|
|
|
<template>
|
|
|
- <div class="studentWorkPreviewDialog">
|
|
|
+ <div>
|
|
|
<el-dialog
|
|
|
:visible.sync="show"
|
|
|
width="100%"
|
|
|
height="100%"
|
|
|
fullscreen
|
|
|
:modal="true"
|
|
|
+ class="studentWorkPreviewDialog"
|
|
|
:close-on-click-modal="false"
|
|
|
:show-close="false"
|
|
|
>
|
|
|
@@ -271,7 +272,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="s_b_m_tool40" v-if="[72].includes(tool)">
|
|
|
- <template v-if="JSON.parse(studentWork.works).length && JSON.parse(studentWork.works)[0].messages.length">
|
|
|
+ <template v-if="JSON.parse(studentWork.works).length && showListData(JSON.parse(studentWork.works))">
|
|
|
<div v-for="(item,index) in JSON.parse(studentWork.works)" :key="index">
|
|
|
<div class="BodyCon" v-if="item.imageUrls && item.imageUrls.length">
|
|
|
<div class="BodyConTit">节点{{ index + 1}}</div>
|
|
|
@@ -286,7 +287,7 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="BodyCon" v-if="item.messages.length" >
|
|
|
+ <div class="BodyCon" v-if="item.messages && item.messages.length" >
|
|
|
<div class="BodyConTit">节点{{ index + 1}}</div>
|
|
|
<div class="BodyConChat" v-for="(po, index2) in item.messages" :key="index+'-'+index2">
|
|
|
<div class="left" v-if="po.role == 'assistant'">
|
|
|
@@ -316,21 +317,21 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- 图片预览对话框 -->
|
|
|
- <el-dialog
|
|
|
- :visible.sync="imagePreviewVisible"
|
|
|
- width="90%"
|
|
|
- :close-on-click-modal="true"
|
|
|
- :show-close="true"
|
|
|
- class="image-preview-dialog"
|
|
|
- @close="imagePreviewVisible = false">
|
|
|
- <div style="text-align: center;">
|
|
|
- <img
|
|
|
- :src="previewImageUrl"
|
|
|
- alt="预览图片"
|
|
|
- style="max-width: 100%; max-height: 80vh; object-fit: contain;"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="imagePreviewVisible"
|
|
|
+ width="90%"
|
|
|
+ :close-on-click-modal="true"
|
|
|
+ :show-close="true"
|
|
|
+ class="image-preview-dialog"
|
|
|
+ @close="imagePreviewVisible = false">
|
|
|
+ <div style="text-align: center;">
|
|
|
+ <img
|
|
|
+ :src="previewImageUrl"
|
|
|
+ alt="预览图片"
|
|
|
+ style="max-width: 100%; max-height: 80vh; object-fit: contain;"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -492,6 +493,16 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
computed: {
|
|
|
+ showListData(){
|
|
|
+ return function (val) {
|
|
|
+ let kk = val.map(e=> e.messages).flat()
|
|
|
+ console.log('kk',kk);
|
|
|
+ if (kk.length == 0) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ return true
|
|
|
+ };
|
|
|
+ },
|
|
|
renderedFormula() {
|
|
|
return function(val){
|
|
|
try {
|
|
|
@@ -1037,6 +1048,8 @@ export default {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
+ height: auto;
|
|
|
+ width: 90%;
|
|
|
}
|
|
|
|
|
|
.image-preview-dialog >>> .el-dialog {
|
|
|
@@ -1047,6 +1060,7 @@ export default {
|
|
|
.image-preview-dialog >>> .el-dialog__header {
|
|
|
background: transparent;
|
|
|
border: none;
|
|
|
+ display: block;
|
|
|
}
|
|
|
|
|
|
.image-preview-dialog >>> .el-dialog__close {
|