修改功能
This commit is contained in:
parent
a7aa31a923
commit
fa77f0c470
|
@ -160,7 +160,21 @@ import {ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted,
|
|||
}
|
||||
}
|
||||
}
|
||||
model.public = "0"
|
||||
model.public = "0";
|
||||
|
||||
|
||||
var endTime = model.endTime;
|
||||
var startTime = model.startTime;
|
||||
if (endTime && startTime) {
|
||||
var endTimestamp = Date.parse(endTime);
|
||||
var startTimestamp = Date.parse(startTime);
|
||||
if (endTimestamp < startTimestamp) {
|
||||
createMessage.warning('开始时间不能小于结束时间!');
|
||||
confirmLoading.value = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"
|
||||
class="addBtn"
|
||||
title="预览"
|
||||
><Icon icon="ant-design:fund-view-outlined" />预览</a-button
|
||||
><Icon icon="ant-design:menu-unfold-outlined" />预览</a-button
|
||||
>
|
||||
<!-- <a-button @click="reload"><Icon icon="ant-design:reload-outlined"/>刷新</a-button> -->
|
||||
</a-space>
|
||||
|
@ -229,7 +229,7 @@
|
|||
class="addBtn"
|
||||
><Icon icon="ant-design:video-camera-add-outlined"
|
||||
/></a-button>
|
||||
<a-button
|
||||
<!-- <a-button
|
||||
type="primary"
|
||||
size="small"
|
||||
title="查看"
|
||||
|
@ -237,7 +237,7 @@
|
|||
@click="viewImage(three.filePath)"
|
||||
class="addBtn"
|
||||
><Icon icon="ant-design:file-pdf-outlined"
|
||||
/></a-button>
|
||||
/></a-button> -->
|
||||
<a-button
|
||||
type="primary"
|
||||
size="small"
|
||||
|
@ -278,32 +278,6 @@
|
|||
<!-- <a-button @click="sureChange" type="primary" style="margin-top: 100px">确定</a-button> -->
|
||||
<!-- </template> -->
|
||||
</draggable>
|
||||
<a-modal
|
||||
title="视频播放"
|
||||
:width="800"
|
||||
:visible="videoOpen"
|
||||
:maskClosable="false"
|
||||
:okButtonProps="{ class: { 'jee-hidden': true } }"
|
||||
@cancel="videoHandleCancel"
|
||||
cancelText="关闭"
|
||||
>
|
||||
<div style="text-align: center;width:100%;">
|
||||
<video
|
||||
style="text-align: center;"
|
||||
ref="videoPlayer"
|
||||
:controls="controls"
|
||||
:autoplay="autoplay"
|
||||
:loop="loop"
|
||||
@loadedmetadata="playVideoInFullscreen"
|
||||
>
|
||||
<source :src="videoUrl" type="video/mp4" />
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
|
||||
<!-- <button @click="playVideo">开始播放</button>
|
||||
<button @click="pauseVideo">停止播放</button> -->
|
||||
</div>
|
||||
</a-modal>
|
||||
<a-modal
|
||||
:title="threePageTitle"
|
||||
:width="800"
|
||||
|
@ -326,7 +300,13 @@
|
|||
style="border: 1px solid #dbdbdb; width: 80%"
|
||||
/>
|
||||
<div v-else>{{ threePageData.three.title }}</div>
|
||||
<a-button v-if="!threePageDisableSubmit && (threePageData.three.type == 'video' || threePageData.three.type == 'document')" type="primary" @click="handleYinyong" style="float: right">引用</a-button>
|
||||
<a-button
|
||||
v-if="!threePageDisableSubmit && (threePageData.three.type == 'video' || threePageData.three.type == 'document')"
|
||||
type="primary"
|
||||
@click="handleYinyong"
|
||||
style="float: right"
|
||||
>引用</a-button
|
||||
>
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<template v-if="threePageData.three.type == 'video'">
|
||||
|
@ -361,20 +341,47 @@
|
|||
</a-modal>
|
||||
</div>
|
||||
</div>
|
||||
<zykYylistPage ref="zykYylistPageRef" @success="handleYyOk"/>
|
||||
<a-modal
|
||||
title="视频播放"
|
||||
:width="800"
|
||||
:visible="videoOpen"
|
||||
:maskClosable="false"
|
||||
:okButtonProps="{ class: { 'jee-hidden': true } }"
|
||||
@cancel="videoHandleCancel"
|
||||
cancelText="关闭"
|
||||
>
|
||||
<div style="text-align: center; width: 100%">
|
||||
<video
|
||||
style="text-align: center"
|
||||
ref="videoPlayer"
|
||||
:controls="controls"
|
||||
:autoplay="autoplay"
|
||||
:loop="loop"
|
||||
@loadedmetadata="playVideoInFullscreen"
|
||||
:src="videoUrl"
|
||||
>
|
||||
<!-- <source :src="videoUrl" type="video/mp4" />
|
||||
Your browser does not support the video tag. -->
|
||||
</video>
|
||||
|
||||
<!-- <button @click="playVideo">开始播放</button>
|
||||
<button @click="pauseVideo">停止播放</button> -->
|
||||
</div>
|
||||
</a-modal>
|
||||
<zykYylistPage ref="zykYylistPageRef" @success="handleYyOk" />
|
||||
<div class="example">
|
||||
<a-spin :spinning="spinning" size="large" tip="下载中..." />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="jiaoXueDanYuanNeiRongIndex" setup>
|
||||
import { ref, reactive, onMounted,onUnmounted, unref, nextTick } from 'vue';
|
||||
import { ref, reactive, onMounted, onUnmounted, unref, nextTick } from 'vue';
|
||||
import { Input, Popover, Pagination, Empty, Affix as aAffix } from 'ant-design-vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { randomString, simpleDebounce, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||
import { useFileList } from '/@/components/jeecg/comment/useComment';
|
||||
import { useFileList } from '/@/components/jeecg/comment/useComment';
|
||||
|
||||
import draggable from 'vuedraggable';
|
||||
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
|
||||
|
@ -406,11 +413,13 @@ const threePageDisableSubmit = ref<boolean>(false);
|
|||
const threePageData = ref<Object>(null);
|
||||
const videoPlayer = ref(null);
|
||||
const videoOpen = ref<boolean>(false);
|
||||
const controls = ref(true);
|
||||
const autoplay = ref(false)
|
||||
const loop = ref(false);
|
||||
const controls = ref(true);
|
||||
const autoplay = ref(false);
|
||||
const loop = ref(false);
|
||||
|
||||
const playVideoInFullscreen = async () => {
|
||||
const playVideoInFullscreen = async () => {
|
||||
console.log('💋', videoPlayer);
|
||||
console.log('🧵', videoPlayer.value);
|
||||
if (videoPlayer.value) {
|
||||
try {
|
||||
// 使用原生DOM方法请求全屏
|
||||
|
@ -421,7 +430,6 @@ const videoOpen = ref<boolean>(false);
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
const stuIndexRef = ref<any>();
|
||||
const zykYylistPageRef = ref();
|
||||
|
||||
|
@ -489,17 +497,17 @@ function handleYinyong() {
|
|||
zykYylistPageRef.value.open();
|
||||
}
|
||||
|
||||
function handleYyOk(record){
|
||||
console.log(`🚀 ~ handleYyOk ~ record:`, record)
|
||||
console.log(`🚀 ~ handleYyOk ~ threePageData:`, threePageData)
|
||||
var fileName = record.substring(record.lastIndexOf('.')+1,record.length);
|
||||
if(threePageData.value.three.type == 'video' ){
|
||||
if(fileName == 'mp4' || fileName == 'webm' || fileName == 'ogv' ){
|
||||
function handleYyOk(record) {
|
||||
console.log(`🚀 ~ handleYyOk ~ record:`, record);
|
||||
console.log(`🚀 ~ handleYyOk ~ threePageData:`, threePageData);
|
||||
var fileName = record.substring(record.lastIndexOf('.') + 1, record.length);
|
||||
if (threePageData.value.three.type == 'video') {
|
||||
if (fileName == 'mp4' || fileName == 'webm' || fileName == 'ogv') {
|
||||
threePageData.value.three.filePath = record;
|
||||
}else{
|
||||
} else {
|
||||
createMessage.error('请引用视频文件,格式为:.mp4,.webm,.ogv');
|
||||
}
|
||||
}else if(threePageData.value.three.type == 'document' ){
|
||||
} else if (threePageData.value.three.type == 'document') {
|
||||
threePageData.value.three.filePath = record;
|
||||
}
|
||||
}
|
||||
|
@ -512,7 +520,7 @@ function reloadStn() {
|
|||
stuIndexRef.value.reload();
|
||||
}
|
||||
|
||||
function videoHandleCancel(){
|
||||
function videoHandleCancel() {
|
||||
pauseVideo();
|
||||
videoOpen.value = false;
|
||||
}
|
||||
|
@ -543,21 +551,19 @@ onUnmounted(() => {
|
|||
});
|
||||
|
||||
//视频预览
|
||||
function handleVideo(three){
|
||||
function handleVideo(three) {
|
||||
let url = getFileAccessHttpUrl(three.filePath);
|
||||
console.log('视频预览-----》',url);
|
||||
console.log('视频预览-----》', url);
|
||||
videoOpen.value = true;
|
||||
videoUrl.value = url;
|
||||
playVideoInFullscreen();
|
||||
setTimeout(() => {
|
||||
playVideo();
|
||||
}, 1000);
|
||||
|
||||
}
|
||||
|
||||
// --------------------------视频------------------------------
|
||||
|
||||
|
||||
async function loadData() {
|
||||
dataSource.value = [];
|
||||
let params = {
|
||||
|
@ -660,7 +666,7 @@ function changeInput(e, pdata, key) {
|
|||
function addOne() {
|
||||
//调用后台保存(创建个新的)
|
||||
let nowData = createNoneData();
|
||||
nowData.fabu=0;
|
||||
nowData.fabu = 0;
|
||||
dataSource.value.push(nowData);
|
||||
refreshDataSort();
|
||||
addOneFetch(nowData).then((res) => {
|
||||
|
@ -818,8 +824,6 @@ function downloadFile(three) {
|
|||
openWindowWithLoading(url);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function openWindowWithLoading(url) {
|
||||
spinning.value = true;
|
||||
let fileName = url.substring(url.lastIndexOf('/') + 1);
|
||||
|
|
|
@ -75,6 +75,17 @@
|
|||
<a-space>
|
||||
<a-button type="primary" size="small" title="下载" v-if="three.type == 'video' || three.type == 'document'" @click="downloadFile(three)" class="addBtn"><Icon icon="ant-design:vertical-align-bottom-outlined"/></a-button>
|
||||
<a-button type="primary" size="small" title="查看" v-if="three.type == 'richText'" @click="viewThreePage(three)" class="addBtn"><Icon icon="ant-design:fund-view-outlined"/></a-button>
|
||||
|
||||
|
||||
<a-button
|
||||
type="primary"
|
||||
size="small"
|
||||
title="查看"
|
||||
v-if="three.type == 'video'"
|
||||
@click="handleVideo(three)"
|
||||
class="addBtn"
|
||||
><Icon icon="ant-design:video-camera-add-outlined"
|
||||
/></a-button>
|
||||
</a-space>
|
||||
</span>
|
||||
|
||||
|
@ -163,6 +174,33 @@
|
|||
</a-card>
|
||||
</a-modal>
|
||||
|
||||
<a-modal
|
||||
title="视频播放"
|
||||
:width="800"
|
||||
:visible="videoOpen"
|
||||
:maskClosable="false"
|
||||
:okButtonProps="{ class: { 'jee-hidden': true } }"
|
||||
@cancel="videoHandleCancel"
|
||||
cancelText="关闭"
|
||||
>
|
||||
<div style="text-align: center;width:100%;">
|
||||
<video
|
||||
style="text-align: center;"
|
||||
ref="videoPlayer"
|
||||
:controls="controls"
|
||||
:autoplay="autoplay"
|
||||
:loop="loop"
|
||||
:src="videoUrl"
|
||||
@loadedmetadata="playVideoInFullscreen"
|
||||
>
|
||||
<!-- <source type="video/mp4" /> -->
|
||||
<!-- Your browser does not support the video tag. -->
|
||||
</video>
|
||||
|
||||
<!-- <button @click="playVideo">开始播放</button>
|
||||
<button @click="pauseVideo">停止播放</button> -->
|
||||
</div>
|
||||
</a-modal>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -170,7 +208,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" name="jiaoXueDanYuanNeiRongIndex" setup>
|
||||
import { ref, reactive, onMounted, unref, nextTick, watch } from 'vue';
|
||||
import { ref, reactive, onMounted,onUnmounted, unref, nextTick, watch } from 'vue';
|
||||
import { Input, Popover, Pagination, Empty, Affix as aAffix } from 'ant-design-vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
@ -200,6 +238,27 @@
|
|||
|
||||
|
||||
|
||||
const stuIndexRef = ref<any>();
|
||||
const videoPlayer = ref(null);
|
||||
const videoOpen = ref<boolean>(false);
|
||||
const controls = ref(true);
|
||||
const autoplay = ref(false)
|
||||
const loop = ref(false);
|
||||
const videoUrl = ref<String>('');
|
||||
|
||||
|
||||
const playVideoInFullscreen = async () => {
|
||||
if (videoPlayer.value) {
|
||||
try {
|
||||
// 使用原生DOM方法请求全屏
|
||||
await videoPlayer.value.requestFullscreen();
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const { createConfirm, createMessage } = useMessage();
|
||||
const queryParam = ref<any>({});
|
||||
const dataSource = ref<any>([]);
|
||||
|
@ -251,6 +310,58 @@
|
|||
loadData();
|
||||
}
|
||||
|
||||
|
||||
function reloadStn() {
|
||||
stuIndexRef.value.reload();
|
||||
}
|
||||
|
||||
function videoHandleCancel(){
|
||||
pauseVideo();
|
||||
videoOpen.value = false;
|
||||
}
|
||||
|
||||
// --------------------------视频------------------------------
|
||||
const playVideo = () => {
|
||||
videoPlayer.value.play();
|
||||
};
|
||||
|
||||
const pauseVideo = () => {
|
||||
videoPlayer.value.pause();
|
||||
};
|
||||
const handleFullScreenChange = () => {
|
||||
if (!document.fullscreenElement) {
|
||||
console.log('Video exited fullscreen');
|
||||
// 这里可以执行取消全屏后的逻辑
|
||||
videoOpen.value = false;
|
||||
videoPlayer.value.pause();
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
document.addEventListener('fullscreenchange', handleFullScreenChange);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener('fullscreenchange', handleFullScreenChange);
|
||||
});
|
||||
|
||||
//视频预览
|
||||
function handleVideo(three){
|
||||
let url = getFileAccessHttpUrl(three.filePath);
|
||||
console.log('视频预览-----》',url);
|
||||
videoOpen.value = true;
|
||||
videoUrl.value = url;
|
||||
playVideoInFullscreen();
|
||||
setTimeout(() => {
|
||||
playVideo();
|
||||
}, 1000);
|
||||
|
||||
}
|
||||
|
||||
// --------------------------视频------------------------------
|
||||
|
||||
|
||||
|
||||
async function loadData() {
|
||||
dataSource.value = [];
|
||||
let params = {
|
||||
|
|
|
@ -62,14 +62,14 @@
|
|||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<span v-else >
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:copy-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
</span>
|
||||
</template>
|
||||
<template #fileSlot2="{text,record}">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<span v-else >
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:copy-outlined" size="small" @click="openPdf(record.jxrlPdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(record.jxrlPdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
</span>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
|
|
@ -62,14 +62,14 @@
|
|||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<span v-else >
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:copy-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
</span>
|
||||
</template>
|
||||
<template #fileSlot2="{text,record}">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<span v-else >
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:copy-outlined" size="small" @click="openPdf(record.jxrlPdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(record.jxrlPdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
</span>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
|
|
@ -62,14 +62,14 @@
|
|||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<span v-else >
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:copy-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
</span>
|
||||
</template>
|
||||
<template #fileSlot2="{text,record}">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<span v-else >
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:copy-outlined" size="small" @click="openPdf(record.jxrlPdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(record.jxrlPdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
</span>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
|
|
@ -62,14 +62,14 @@
|
|||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<span v-else >
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:copy-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
</span>
|
||||
</template>
|
||||
<template #fileSlot2="{text,record}">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<span v-else >
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:copy-outlined" size="small" @click="openPdf(record.jxrlPdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(record.jxrlPdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
</span>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<span v-else >
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:copy-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
</span>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<span v-else >
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:copy-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
</span>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<span v-else >
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:copy-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
<a-button :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(record.pdfPath)" style="margin-left:5px;">预览</a-button>
|
||||
</span>
|
||||
</template>
|
||||
<template #wwsftgaction="{text,record}">
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined" style="margin-left: 8px"> 新增</a-button>
|
||||
<a-button type="primary" @click="handleZtyl(0)" preIcon="ant-design:menu-unfold-outlined" style="margin-left: 8px"> 预览</a-button>
|
||||
<a-button type="primary" @click="handleZtyl(0)" preIcon="ant-design:menu-unfold-outlined" style="margin-left: 8px"> 预览学生页面</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-col>
|
||||
|
@ -26,7 +26,7 @@
|
|||
<a-col :span="24" v-for="(item, index) in tableData" :key="index" style="padding:10px;overflow:hidden;border-bottom: 1px solid #f0f0f0;">
|
||||
<div>
|
||||
<a-row style="padding:10px;line-height: 30px;">
|
||||
<a-col :span="item.ggStatus==0||item.ggStatus==2?20:24">
|
||||
<a-col :span="20">
|
||||
<span style="font-size: 16px;color: #515151 ;font-weight: bold; ">{{item.title}}</span>
|
||||
<span v-if="item.ggStatus==0" style="margin-left:15px;"><a-tag color="blue">草稿</a-tag></span>
|
||||
<span v-if="item.ggStatus==2" style="margin-left:15px;">
|
||||
|
@ -35,14 +35,19 @@
|
|||
<a @click="handleEdit(item)" style="margin-left:5px;padding: 0px 8px;" v-if="item.ggStatus==0||item.ggStatus==2" title="编辑"><Icon icon="ant-design:form-outlined"/></a>
|
||||
<a-divider type="vertical" style="height: 30px; background-color: #7cb305" v-if="item.ggStatus==0||item.ggStatus==2"/>
|
||||
<a @click="handleDelete(item)" style="margin-left:5px;padding: 0px 8px;" v-if="item.ggStatus==0||item.ggStatus==2" title="删除"><Icon icon="ant-design:delete-outlined" /></a>
|
||||
<a @click="handleCh(item)" style="margin-left:5px;padding: 0px 8px;" v-if="item.ggStatus==1" title="撤回"><Icon icon="ant-design:rollback-outlined" /></a>
|
||||
<!-- <a @click="handleCh(item)" style="margin-left:5px;padding: 0px 8px;" v-if="item.ggStatus==1" title="撤回"><Icon icon="ant-design:rollback-outlined" /></a> -->
|
||||
</span>
|
||||
</a-col>
|
||||
<a-col :span="item.ggStatus==0||item.ggStatus==2?4:24">
|
||||
<div v-if="item.ggStatus==0||item.ggStatus==2" style="text-align: right;color:#9e9e9e;">
|
||||
<a-col :span="4" v-if="item.ggStatus==0||item.ggStatus==2">
|
||||
<div style="text-align: right;color:#9e9e9e;">
|
||||
<a-button type="primary" @click="handleFabu(item)">发布</a-button>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="4" v-if="item.ggStatus==1">
|
||||
<div style="text-align: right;color:#9e9e9e;">
|
||||
<a-button type="primary" @click="handleCh(item)">撤回</a-button>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row style="padding:10px;">
|
||||
<a-col :span="24">
|
||||
|
|
|
@ -36,12 +36,12 @@
|
|||
<div style="float: left">评分:{{ item.stuscore ? item.stuscore : '未评' }}分</div>
|
||||
</a-col>
|
||||
<a-col :span="24" class="zyCon">
|
||||
<div style="float: left" :title="item.wwsftg">网络查重:{{ getCctype(item, '1') }}</div>
|
||||
<div style="float: right" :title="item.nwsftg">作业查重:{{ getCctype(item, '2') }}</div>
|
||||
<div style="float: left" class="wpopen" :title="item.wwsftg" @click="handleOpenCcjg(item, '0')">网络查重:{{ getCctype(item, '1') }}</div>
|
||||
<div style="float: right" class="wpopen" :title="item.nwsftg" @click="handleOpenCcjg(item, '1')">作业查重:{{ getCctype(item, '2') }}</div>
|
||||
</a-col>
|
||||
<a-col :span="24" class="zyCon">
|
||||
<div style="float: left" :title="item.aigcsftg">Aigc查重:{{ getCctype(item, '3') }}</div>
|
||||
<div style="float: right" :title="item.xnsftg">校内查重:{{ getCctype(item, '4') }}</div>
|
||||
<div style="float: left" class="wpopen" :title="item.aigcsftg" @click="handleOpenCcjg(item, '2')">Aigc查重:{{ getCctype(item, '3') }}</div>
|
||||
<div style="float: right" class="wpopen" :title="item.xnsftg" @click="handleOpenCcjg(item, '3')">校内查重:{{ getCctype(item, '4') }}</div>
|
||||
</a-col>
|
||||
<a-col :span="24" style="text-align: center; margin-top: 20px">
|
||||
<a-button type="primary" @click="handleDetail(item)" style="margin-left: 5px; background: rgb(28, 132, 198)">详情</a-button>
|
||||
|
@ -99,6 +99,7 @@ import ZyInfoDetailModal from './components/ZyInfoDetailModal.vue';
|
|||
import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue';
|
||||
import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue';
|
||||
import XxhbbksListModal from '/@/views/kc/xxhbbks/XxhbbksListModal.vue';
|
||||
import { def } from '@vue/shared';
|
||||
|
||||
//当前路由信息
|
||||
const { currentRoute } = useRouter();
|
||||
|
@ -130,12 +131,54 @@ const wrapperCol = reactive({
|
|||
sm: { span: 16 },
|
||||
});
|
||||
|
||||
function handleSfkshp(record){
|
||||
function handleOpenCcjg(record, type) {
|
||||
var text = "0";
|
||||
if (type == '0') {
|
||||
if (record.wwcc == 'true') {
|
||||
text = '1';
|
||||
} else {
|
||||
text = '0';
|
||||
}
|
||||
} else if (type == '1') {
|
||||
if (record.nwcc == 'true') {
|
||||
text = '1';
|
||||
} else {
|
||||
text = '0';
|
||||
}
|
||||
} else if (type == '2') {
|
||||
if (record.aigccc == 'true') {
|
||||
text = '1';
|
||||
} else {
|
||||
text = '0';
|
||||
}
|
||||
} else if (type == '3') {
|
||||
if (record.xncc == 'true') {
|
||||
text = '1';
|
||||
} else {
|
||||
text = '0';
|
||||
}
|
||||
}
|
||||
if(text == '0'){
|
||||
createMessage.error("此项不查重,请更换查询");
|
||||
return;
|
||||
}
|
||||
defHttp.get({ url: '/zyCcjg/zyCcjg/getCcjg', params: { zyStuId: record.stuId, ccType: type } }).then((res) => {
|
||||
console.log('🧙♂️', res);
|
||||
var url = res.paperviewurl;
|
||||
if(url){
|
||||
window.open(url, '_blank');
|
||||
}else{
|
||||
createMessage.error("当前暂无结果");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleSfkshp(record) {
|
||||
var sfkshp = record.xshpkg;
|
||||
var xshpkssj = new Date(record.xshpkssj);
|
||||
var xshpjssj = new Date(record.xshpjssj);
|
||||
var nowTime = new Date();
|
||||
if(sfkshp == '1' && nowTime.getTime()>=xshpkssj.getTime() && nowTime.getTime()<=xshpjssj.getTime()){
|
||||
if (sfkshp == '1' && nowTime.getTime() >= xshpkssj.getTime() && nowTime.getTime() <= xshpjssj.getTime()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -381,4 +424,8 @@ onMounted(() => {
|
|||
text-align: center;
|
||||
font-size: 11px;
|
||||
}
|
||||
.wpopen:hover{
|
||||
cursor: pointer;
|
||||
color:#18a689;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -254,9 +254,7 @@
|
|||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQueryZyxq">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" style="margin-left: 8px"> 导出</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleFabu" style="margin-left: 8px">
|
||||
一键发布评分</a-button
|
||||
>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="batchHandleFabu" style="margin-left: 8px">一键发布评分</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="reloadZy" style="margin-left: 8px"> 返回</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
@ -484,6 +482,10 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
columns: newcolumns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
pagination: {
|
||||
current: 1,
|
||||
pageSize: 1000,
|
||||
},
|
||||
actionColumn: {
|
||||
width: '300px',
|
||||
// fixed: 'right',
|
||||
|
@ -1108,6 +1110,32 @@ function handleDetail(record: Recordable) {
|
|||
|
||||
//查看作业信息
|
||||
function handleZyxx(record, type) {
|
||||
|
||||
|
||||
if(type == '1'){
|
||||
if(!record.wtjnum || record.wtjnum == '0'){
|
||||
createMessage.error("当前人数为0,不能进行查询")
|
||||
return;
|
||||
}
|
||||
}else if(type == '2'){
|
||||
if(!record.ytjnum || record.ytjnum == '0'){
|
||||
createMessage.error("当前人数为0,不能进行查询")
|
||||
return;
|
||||
}
|
||||
}else if(type == '3'){
|
||||
if(!record.wpynum || record.wpynum == '0'){
|
||||
createMessage.error("当前人数为0,不能进行查询")
|
||||
return;
|
||||
}
|
||||
}else if(type == '4'){
|
||||
if(!record.ypynum || record.ypynum == '0'){
|
||||
createMessage.error("当前人数为0,不能进行查询")
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
zyInfo.value = record;
|
||||
handleShowType(3);
|
||||
queryType.value = type;
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
<a-spin :spinning="confirmLoading">
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row>
|
||||
<a-col :span="24" style="text-align: center;margin-top: 50px;">
|
||||
<span>说明:可标记作业为【优秀】【良好】【及格】的作业结果</span>
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top:30px;">
|
||||
<a-form-item label="存档类型" v-bind="validateInfos.cdlx">
|
||||
<a-form-item label="标记作业" v-bind="validateInfos.cdlx">
|
||||
<JDictSelectTag v-model:value="formData.cdlx" dictCode="cdlx" placeholder="请选择" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
title.value = '标记作业';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<a-spin :spinning="confirmLoading">
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-col :span="24">
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row>
|
||||
|
@ -74,11 +73,25 @@
|
|||
</div>
|
||||
</a-form-item>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="!isYl">
|
||||
<a-form-item label="上传作业" v-bind="validateInfos.filePath">
|
||||
<j-upload v-model:value="formData.filePath" :disabled="disabled" maxCount="1" accept=".doc,.docx,.pdf" :forceAcceptVerify="true" ></j-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="isYl">
|
||||
<span style="width:300px;float: left;">
|
||||
<span style="float:left;">
|
||||
<j-upload v-model:value="formData.stuFilePath" maxCount="1" accept=".doc,.docx,.pdf" :forceAcceptVerify="true"></j-upload>
|
||||
</span>
|
||||
</span>
|
||||
<span style="float: right;">
|
||||
<a-button type="primary" style="margin-left:10px;" @click="openPdf(formData)">预览</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-col>
|
||||
</a-col>
|
||||
|
||||
<!-- <a-col :span="24" style="padding: 30px 0 0 75px;">
|
||||
<div style="line-height:40px;">作业名称:{{zyInfo.title}}</div>
|
||||
|
@ -89,21 +102,7 @@
|
|||
<div v-if="zyInfo.filePath">附件:
|
||||
<a-button type="primary" style="margin-left: 10px" @click="downLoad(zyInfo.filePath)">下载</a-button></div>
|
||||
</a-col> -->
|
||||
<a-col :span="24" style="margin-top:30px;" v-if="!isYl">
|
||||
<a-form-item label="上传作业" v-bind="validateInfos.filePath">
|
||||
<j-upload v-model:value="formData.filePath" :disabled="disabled" maxCount="1" accept=".doc,.docx,.pdf" :forceAcceptVerify="true" ></j-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top:30px;" v-if="isYl">
|
||||
<span style="width:300px;float: left;">
|
||||
<span style="float:left;">
|
||||
<j-upload v-model:value="formData.stuFilePath" maxCount="1" accept=".doc,.docx,.pdf" :forceAcceptVerify="true"></j-upload>
|
||||
</span>
|
||||
</span>
|
||||
<span style="float: right;">
|
||||
<a-button type="primary" style="margin-left:10px;" @click="openPdf(formData)">预览</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<!-- <a-col :span="24">
|
||||
<span style="margin-left: 8%;line-height:60px;">预设作业分值:{{zyInfo.score?zyInfo.score+"分 评分不能高于预设分值":'未设置 评分不能高于100分'}}</span>
|
||||
</a-col> -->
|
||||
<a-col :span="24">
|
||||
<a-col :span="24" style="margin-top: 40px;">
|
||||
<a-form-item label="评分" v-bind="validateInfos.score">
|
||||
<a-input-number v-model:value="formData.score" :max="100" :min="0" :disabled="disabled" style="width:100%;" @change="handleJyfz" ></a-input-number>
|
||||
</a-form-item>
|
||||
|
@ -166,7 +166,7 @@
|
|||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
min-height: 300px !important;
|
||||
min-height: 150px !important;
|
||||
overflow-y: auto;
|
||||
padding: 24px 24px 24px 24px;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
</template>-->
|
||||
<template #fileSlot="{ text }">
|
||||
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
|
||||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="openPdf(text)">预览</a-button>
|
||||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(text)">预览</a-button>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
</template>-->
|
||||
<template #fileSlot="{ text }">
|
||||
<span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
|
||||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="openPdf(text)">预览</a-button>
|
||||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:menu-unfold-outlined" size="small" @click="openPdf(text)">预览</a-button>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
|
|
Loading…
Reference in New Issue