修改预览功能
This commit is contained in:
parent
ab73b84164
commit
400149a2ed
|
@ -50,7 +50,7 @@
|
||||||
<a-col :lg="0" :xs="{ span: 24 }" style="text-align: right;">
|
<a-col :lg="0" :xs="{ span: 24 }" style="text-align: right;">
|
||||||
<a-menu
|
<a-menu
|
||||||
v-model:selectedKeys="selectedKeys"
|
v-model:selectedKeys="selectedKeys"
|
||||||
style="width: 98%; margin: 10px 0; "
|
style="width: 98%; margin: 10px 0; height: 53px;"
|
||||||
mode="horizontal"
|
mode="horizontal"
|
||||||
>
|
>
|
||||||
<a-sub-menu key="min0">
|
<a-sub-menu key="min0">
|
||||||
|
|
|
@ -4,20 +4,20 @@
|
||||||
<a-col :span="24" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px; border-radius: 10px; overflow: hidden;">
|
<a-col :span="24" v-for="(item, index) in tableData" :key="index" style="padding: 0px 0px 5px 5px; border-radius: 10px; overflow: hidden;">
|
||||||
<div style="width: 100%; height:40px;border-radius: 10px 10px 0 0; background-color: #f7f7f7">
|
<div style="width: 100%; height:40px;border-radius: 10px 10px 0 0; background-color: #f7f7f7">
|
||||||
<!-- <a-col :span="24" style="height:40px; line-height:40px; padding-left:15px; color:#333; overflow: hidden;" > -->
|
<!-- <a-col :span="24" style="height:40px; line-height:40px; padding-left:15px; color:#333; overflow: hidden;" > -->
|
||||||
<div style="font-size: 18px; font-weight: bold">第{{ item.sort }}次作业(本次作业在总成绩中的占比:{{item.zyzb}}%)</div>
|
<div style="font-size: 18px; font-weight: bold" class="ellipsis">第{{ item.sort }}次作业(本次作业在总成绩中的占比:{{item.zyzb}}%)</div>
|
||||||
<!-- </a-col> -->
|
<!-- </a-col> -->
|
||||||
</div>
|
</div>
|
||||||
<a-card style="height: 240px; border: 1px solid #eeeeee">
|
<a-card style="min-height: 240px; border: 1px solid #eeeeee">
|
||||||
<div class="rotate" :style="classFun(item)">{{ callText(item) }}</div>
|
<div class="rotate" :style="classFun(item)">{{ callText(item) }}</div>
|
||||||
<a-row style="top: -60px; position: relative">
|
<a-row style="top: -60px; position: relative">
|
||||||
<a-col :span="24" class="zytitle" :title="item.title" @click="handleDetail(item)"
|
<a-col :span="24" class="zytitle" :title="item.title" @click="handleDetail(item)"
|
||||||
><span class="zytitle-back">{{ item.title }}</span></a-col
|
><span class="zytitle-back ellipsis">{{ item.title }}</span></a-col
|
||||||
>
|
>
|
||||||
<a-col :span="12" class="zyCon"
|
<a-col :lg="12" class="zyCon ellipsis"
|
||||||
><span class="zyCon-word">作业时间:</span>{{ dayjs(item.startTime).format('YYYY.MM.DD HH:mm') }} ~
|
><span class="zyCon-word">作业时间:</span>{{ dayjs(item.startTime).format('YYYY.MM.DD HH:mm') }} ~
|
||||||
{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</a-col
|
{{ dayjs(item.endTime).format('YYYY.MM.DD HH:mm') }}</a-col
|
||||||
>
|
>
|
||||||
<a-col :span="12" class="zyCon"
|
<a-col :lg="12" class="zyCon ellipsis"
|
||||||
><span class="zyCon-word">互评时间:</span
|
><span class="zyCon-word">互评时间:</span
|
||||||
><span v-if="item.xshpkg == '1'"
|
><span v-if="item.xshpkg == '1'"
|
||||||
>{{ dayjs(item.xshpkssj).format('YYYY.MM.DD HH:mm') }} ~ {{ dayjs(item.xshpjssj).format('YYYY.MM.DD HH:mm') }}</span
|
>{{ dayjs(item.xshpkssj).format('YYYY.MM.DD HH:mm') }} ~ {{ dayjs(item.xshpjssj).format('YYYY.MM.DD HH:mm') }}</span
|
||||||
|
@ -121,6 +121,7 @@ import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListM
|
||||||
import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue';
|
import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue';
|
||||||
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
|
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
|
||||||
import { def } from '@vue/shared';
|
import { def } from '@vue/shared';
|
||||||
|
import { encryptByBase64 } from '/@/utils/cipher';
|
||||||
|
|
||||||
//当前路由信息
|
//当前路由信息
|
||||||
const { currentRoute } = useRouter();
|
const { currentRoute } = useRouter();
|
||||||
|
@ -333,9 +334,20 @@ function handleShangchuan(record) {
|
||||||
|
|
||||||
//预览
|
//预览
|
||||||
function handlePreview(record) {
|
function handlePreview(record) {
|
||||||
var url2 = getFileAccessHttpUrl(record.stuPdfPath);
|
const parts = record.stuFilePath.split('.');
|
||||||
let url = baseApiUrl + '/generic/web/viewer.html?file=' + encodeURIComponent(url2);
|
const filetype = parts[parts.length - 1];
|
||||||
window.open(url, '_blank');
|
if(filetype=='jpg' || filetype=='png' || filetype=='jpeg' || filetype=='xls' || filetype=='xlsx' || filetype=='text' ){
|
||||||
|
var file = baseApiUrl + "/"+record.stuFilePath;
|
||||||
|
console.log('🤬', file);
|
||||||
|
window.open('https://fileview.jeecg.com/onlinePreview?url=' + encodeURIComponent(encryptByBase64(file)));
|
||||||
|
}else if(filetype=='doc' || filetype=='docx' || filetype=='pdf'){
|
||||||
|
var url2 = getFileAccessHttpUrl(record.stuPdfPath);
|
||||||
|
let url = baseApiUrl + '/generic/web/viewer.html?file=' + encodeURIComponent(url2);
|
||||||
|
window.open(url, '_blank');
|
||||||
|
}else{
|
||||||
|
createMessage.error('暂不支持该文件预览!');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDownload(record) {
|
function handleDownload(record) {
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" v-if="!isYl" style="text-align: left; margin-left:220px; margin-top:20px">
|
<a-col :span="24" v-if="!isYl" style="text-align: center; margin-top:20px">
|
||||||
<div v-if="zyInfo.sfcc == '1'">
|
<div v-if="zyInfo.sfcc == '1'">
|
||||||
<j-upload v-model:value="formData.filePath" :disabled="disabled" maxCount="1" accept=".doc,.docx,.pdf" :text="`上传作业`" style="background: #ededed; " :forceAcceptVerify="true" ></j-upload>
|
<j-upload v-model:value="formData.filePath" :disabled="disabled" maxCount="1" accept=".doc,.docx,.pdf" :text="`上传作业`" style="background: #ededed; " :forceAcceptVerify="true" ></j-upload>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue