Merge branch 'master' of http://47.115.223.229:8888/yangjun/dbsd_kczx
This commit is contained in:
commit
387813728f
|
@ -1,10 +1,20 @@
|
|||
<template>
|
||||
<div>
|
||||
<a-row>
|
||||
<a-col :span="5">
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleKhcl" style="margin-left: 8px">上传考核材料</a-button>
|
||||
</a-col>
|
||||
<a-col :span="18">
|
||||
<span style="color:red;font-weight: 700;">温馨提示:学生未完成的测验和教师还未评分(如文件题)的测验无法上传,如需上传,需所有学生完成测验且教师完成评分(如文件题)</span>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleKhcl" style="margin-left: 8px">上传考核材料</a-button>
|
||||
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
|
@ -52,7 +62,7 @@
|
|||
const { currentRoute } = useRouter();
|
||||
const { query } = unref(currentRoute);
|
||||
const { rwbh,xqxn,type,teano } = query;//获取传递参数
|
||||
const queryParam = ref<any>({qpublish:'2',rwbh});
|
||||
const queryParam = ref<any>({qpublish:'1,2',rwbh});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const { createConfirm, createMessage } = useMessage();
|
||||
const registerModal = ref();
|
||||
|
|
|
@ -296,49 +296,49 @@ function edit(record) {
|
|||
handleKcnr(formData.kcnr);
|
||||
|
||||
|
||||
const parts = record.stuFilePath.split('.');
|
||||
const filetype = parts[parts.length - 1];
|
||||
console.log(`🚀 ~ nextTick ~ filetype:`, filetype)
|
||||
let wpsType = "w";
|
||||
if(filetype=='doc' || filetype=='docx'){
|
||||
showType.value = '1';
|
||||
wpsType = "w";
|
||||
}else if(filetype=='pdf'){
|
||||
showType.value = '1';
|
||||
wpsType = "f";
|
||||
}else if(filetype=='ppt' || filetype=='pptx' ){
|
||||
showType.value = '1';
|
||||
wpsType = "p";
|
||||
}else if(filetype=='xls' || filetype=='xlsx' ){
|
||||
showType.value = '1';
|
||||
wpsType = "s";
|
||||
}
|
||||
// const parts = record.stuFilePath.split('.');
|
||||
// const filetype = parts[parts.length - 1];
|
||||
// console.log(`🚀 ~ nextTick ~ filetype:`, filetype)
|
||||
// let wpsType = "w";
|
||||
// if(filetype=='doc' || filetype=='docx'){
|
||||
// showType.value = '1';
|
||||
// wpsType = "w";
|
||||
// }else if(filetype=='pdf'){
|
||||
// showType.value = '1';
|
||||
// wpsType = "f";
|
||||
// }else if(filetype=='ppt' || filetype=='pptx' ){
|
||||
// showType.value = '1';
|
||||
// wpsType = "p";
|
||||
// }else if(filetype=='xls' || filetype=='xlsx' ){
|
||||
// showType.value = '1';
|
||||
// wpsType = "s";
|
||||
// }
|
||||
|
||||
if(showType.value == '1'){
|
||||
const element = document.getElementById('wpsiframeid');
|
||||
// 清空内容
|
||||
element.innerHTML = '';
|
||||
const jssdk = WebOfficeSDK.init({
|
||||
officeType: wpsType,
|
||||
appId: 'SX20241118WSUGQN',
|
||||
fileId: formData.stuId,
|
||||
mount:document.querySelector('.wps-iframe'),
|
||||
commonOptions: {
|
||||
isShowDocMap: false, //是否开启目录功能,默认开启
|
||||
isShowTopArea: false, // 隐藏顶部区域(头部和工具栏)
|
||||
isShowHeader: false, // 隐藏头部区域
|
||||
isBrowserViewFullscreen: true, // 是否在浏览器区域全屏
|
||||
isIframeViewFullscreen: true, // 是否在 iframe 区域内全屏
|
||||
acceptVisualViewportResizeEvent: true // 控制 WebOffice 是否接受外部的 VisualViewport
|
||||
},
|
||||
wordOptions: {
|
||||
isShowDocMap: false, // 是否开启目录功能,默认开启
|
||||
isBestScale: true, // 打开文档时,默认以最佳比例显示
|
||||
isShowBottomStatusBar: false, // 是否展示底部状态栏
|
||||
}
|
||||
//token: getToken()
|
||||
})
|
||||
}
|
||||
// if(showType.value == '1'){
|
||||
// const element = document.getElementById('wpsiframeid');
|
||||
// // 清空内容
|
||||
// element.innerHTML = '';
|
||||
// const jssdk = WebOfficeSDK.init({
|
||||
// officeType: wpsType,
|
||||
// appId: 'SX20241118WSUGQN',
|
||||
// fileId: formData.stuId,
|
||||
// mount:document.querySelector('.wps-iframe'),
|
||||
// commonOptions: {
|
||||
// isShowDocMap: false, //是否开启目录功能,默认开启
|
||||
// isShowTopArea: false, // 隐藏顶部区域(头部和工具栏)
|
||||
// isShowHeader: false, // 隐藏头部区域
|
||||
// isBrowserViewFullscreen: true, // 是否在浏览器区域全屏
|
||||
// isIframeViewFullscreen: true, // 是否在 iframe 区域内全屏
|
||||
// acceptVisualViewportResizeEvent: true // 控制 WebOffice 是否接受外部的 VisualViewport
|
||||
// },
|
||||
// wordOptions: {
|
||||
// isShowDocMap: false, // 是否开启目录功能,默认开启
|
||||
// isBestScale: true, // 打开文档时,默认以最佳比例显示
|
||||
// isShowBottomStatusBar: false, // 是否展示底部状态栏
|
||||
// }
|
||||
// //token: getToken()
|
||||
// })
|
||||
// }
|
||||
|
||||
});
|
||||
}
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<div v-show="showType=='1'">
|
||||
<div class="wps-iframe" id="wpsiframeid" style="width:100%;height: 500px;"></div>
|
||||
<div v-if="showType=='1'">
|
||||
<iframe id="pdfPreviewIframe" :src="ylurl" frameborder="0" width="100%" height="550px" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<div v-if="showType=='2'">
|
||||
<div v-else-if="showType=='2'">
|
||||
<div style="padding: 10px 20px;">
|
||||
<a-button type="primary" @click="rotateImage">顺时针旋转</a-button>
|
||||
<a-button type="primary" @click="rotateImage2" style="margin-left: 20px;">逆时针旋转</a-button>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<img :src="ylurl" :style="{ transform: 'rotate(' + rotationAngle + 'deg)' }" class="rotated-image"/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="showType=='3'">
|
||||
<div v-else-if="showType=='3'">
|
||||
<div class="video-container">
|
||||
<video
|
||||
ref="videoPlayer"
|
||||
|
@ -29,9 +29,9 @@
|
|||
</video>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div v-else>
|
||||
<div v-else>
|
||||
<a-button type="primary">下载文件</a-button>
|
||||
</div> -->
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-row>
|
||||
|
@ -86,7 +86,6 @@
|
|||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||
import { getToken } from '/@/utils/auth';
|
||||
import WebOfficeSDK from './wpsApi/web-office-sdk-solution-v2.0.7.es'
|
||||
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
|
@ -106,7 +105,7 @@ import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
|||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
const showType = ref<string>('1');
|
||||
const showType = ref<string>('0');
|
||||
const ylurl = ref<string>('');
|
||||
const rotationAngle = ref(0);
|
||||
const zyInfo = ref<any>({});
|
||||
|
@ -119,7 +118,6 @@ const videoOpen = ref<boolean>(false);
|
|||
const autoplay = ref(false)
|
||||
const loop = ref(false);
|
||||
const videoUrl = ref<String>('');
|
||||
const jssdkInfo = ref<any>({});
|
||||
|
||||
|
||||
//表单验证
|
||||
|
@ -184,7 +182,6 @@ function rotateImage2() {
|
|||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
showType.value = '1';
|
||||
formData.pyContent = ''
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
|
@ -196,69 +193,33 @@ function rotateImage2() {
|
|||
const parts = record.filePath.split('.');
|
||||
const filetype = parts[parts.length - 1];
|
||||
console.log(`🚀 ~ nextTick ~ filetype:`, filetype)
|
||||
// var file = getFileAccessHttpUrl(record.filePath);
|
||||
// ylurl.value = file;
|
||||
let wpsType = "w";
|
||||
var file = getFileAccessHttpUrl(record.filePath);
|
||||
ylurl.value = file;
|
||||
if(filetype=='jpg' || filetype=='png' || filetype=='jpeg' || filetype=='xls' || filetype=='xlsx' || filetype=='text' ){
|
||||
showType.value = '2';
|
||||
var file = getFileAccessHttpUrl(record.filePath);
|
||||
ylurl.value = file;
|
||||
}else if(filetype=='doc' || filetype=='docx'){
|
||||
}else if(filetype=='doc' || filetype=='docx' || filetype=='pdf'){
|
||||
showType.value = '1';
|
||||
wpsType = "w";
|
||||
}else if(filetype=='pdf'){
|
||||
showType.value = '1';
|
||||
wpsType = "f";
|
||||
}else if(filetype=='ppt' || filetype=='pptx' ){
|
||||
showType.value = '1';
|
||||
wpsType = "p";
|
||||
}else if(filetype=='xls' || filetype=='xlsx' ){
|
||||
showType.value = '1';
|
||||
wpsType = "s";
|
||||
var file2 = getFileAccessHttpUrl(record.pdfPath);
|
||||
let url2 = baseApiUrl + '/generic/web/viewer.html?file=' + encodeURIComponent(file2);
|
||||
ylurl.value = url2;
|
||||
}else if(filetype=='mp4'|| filetype=='avi'|| filetype=='mp3'|| filetype=='wav'){
|
||||
showType.value = '3';
|
||||
|
||||
let url = getFileAccessHttpUrl(record.filePath);
|
||||
console.log('视频预览-----》',url);
|
||||
// videoOpen.value = true;
|
||||
videoUrl.value = url;
|
||||
|
||||
|
||||
}else{
|
||||
showType.value = '0';
|
||||
}
|
||||
//赋值
|
||||
Object.assign(formData, record);
|
||||
|
||||
// formData.id = '1858776554910433282';
|
||||
|
||||
console.log("🚀 ~ nextTick ~ formData.id:", formData.id)
|
||||
if(showType.value == '1'){// 获取元素
|
||||
const element = document.getElementById('wpsiframeid');
|
||||
// 清空内容
|
||||
element.innerHTML = '';
|
||||
const jssdk = WebOfficeSDK.init({
|
||||
officeType: wpsType,
|
||||
appId: 'SX20241118WSUGQN',
|
||||
fileId: formData.id,
|
||||
mount:document.querySelector('.wps-iframe'),
|
||||
commonOptions: {
|
||||
isShowDocMap: false, //是否开启目录功能,默认开启
|
||||
// isShowTopArea: false, // 隐藏顶部区域(头部和工具栏)
|
||||
// isShowHeader: false, // 隐藏头部区域
|
||||
isBrowserViewFullscreen: true, // 是否在浏览器区域全屏
|
||||
isIframeViewFullscreen: true, // 是否在 iframe 区域内全屏
|
||||
acceptVisualViewportResizeEvent: true // 控制 WebOffice 是否接受外部的 VisualViewport
|
||||
},
|
||||
wordOptions: {
|
||||
isShowDocMap: false, // 是否开启目录功能,默认开启
|
||||
isBestScale: true, // 打开文档时,默认以最佳比例显示
|
||||
isShowBottomStatusBar: false, // 是否展示底部状态栏
|
||||
}
|
||||
//token: getToken()
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// --------------------------视频------------------------------
|
||||
const playVideo = () => {
|
||||
videoPlayer.value.play();
|
||||
|
|
Loading…
Reference in New Issue