2024年5月24日 修改问题

This commit is contained in:
bai 2024-05-24 01:27:08 +08:00
parent e3e6e1c4ca
commit d844d6b7c1
5 changed files with 310 additions and 62 deletions

View File

@ -4,7 +4,7 @@ import { isArray } from '/@/utils/is';
import { FormSchema } from '/@/components/Form'; import { FormSchema } from '/@/components/Form';
const globSetting = useGlobSetting(); const globSetting = useGlobSetting();
const baseApiUrl = globSetting.domainUrl; export const baseApiUrl = globSetting.domainUrl;
/** /**
* 访 * 访
* @param fileUrl * @param fileUrl

View File

@ -199,9 +199,10 @@ export const transform: AxiosTransform = {
* @description: * @description:
*/ */
responseInterceptorsCatch: (error: any) => { responseInterceptorsCatch: (error: any) => {
//console.log('报错了!',error,error.config,error.request,error.response,error.isAxiosError,error.toJSON(),); console.log('报错了!',error,error.message,error.config,error.request,error.response,error.isAxiosError,error.toJSON(),);
if(error.message?.includes('Network Error')){
if (!error?.response?.status) {//找不到返回值,也找不到状态码,则认为是重定向后跨域了, return Promise.reject(error);
}else if (!error?.response?.status) {//找不到返回值,也找不到状态码,则认为是重定向后跨域了,
//window.location.href = error?.config?.url || window.location.href;//跳转不正常。。。 //window.location.href = error?.config?.url || window.location.href;//跳转不正常。。。
//window.location.href = window.location.href; //window.location.href = window.location.href;
//useSso().ssoLoginOut(); //useSso().ssoLoginOut();

View File

@ -17,13 +17,37 @@
</span> </span>
<span style="float: right;margin-left: 10px;background: #1c84c6;color: #fff;padding: 9px;border-radius: 5px;font-size: 16px;" @click="() => tingKeZuJiAddModal.view({ ketangbiaoid: route.query.ktId })">填写评价表</span> <span style="float: right;margin-left: 10px;background: #1c84c6;color: #fff;padding: 9px;border-radius: 5px;font-size: 16px;" @click="() => tingKeZuJiAddModal.view({ ketangbiaoid: route.query.ktId })">填写评价表</span>
<div style="font-size: 12px;"> <div style="font-size: 12px;">
{{ ktangInfo.zc || ' ' }}&nbsp;&nbsp;{{ ktangInfo.skjs || ' ' }}&nbsp;&nbsp;学分{{ ktangInfo.xf || ' ' }}&nbsp;&nbsp;选课人数{{ ktangInfo.xkrs || ' ' }}&nbsp;&nbsp;课程性质{{ ktangInfo.kcxz || ' ' }}&nbsp;&nbsp;开课单位{{ ktangInfo.kkdw || ' ' }} {{ ktangInfo.zc || ' ' }}&nbsp;&nbsp;{{ ktangInfo.skjs || ' ' }}&nbsp;&nbsp;学分{{ ktangInfo.xf || ' ' }}
&nbsp;&nbsp;选课人数{{ ktangInfo.xkrs || ' ' }}
&nbsp;&nbsp;课程性质{{ ktangInfo.kcxz || ' ' }}
&nbsp;&nbsp;开课单位{{ ktangInfo.kkdw || ' ' }}
&nbsp;&nbsp;节次{{ ktangInfo.hh || ' ' }}
</div>
<div style="font-size: 12px;">
课程介绍{{ ktangInfo?.zyJxdg?.kcjs }}
</div> </div>
</template> </template>
<div style="padding: 1rem;"> <div style="padding: 1rem;">
<div style="font-size: 16px;float: left;">{{ mainVideoCardBoxTitle || '' }}</div> <div style="font-size: 16px;float: left;">{{ mainVideoCardBoxTitle || '' }}</div>
<div style="float: right;"><template v-if="ktangInfo?.jiaoshirongliang?.jsrl">本教室容量{{ktangInfo?.jiaoshirongliang?.jsrl}}座位</template></div> <div style="float: right;">
AI识别出勤率{{ calcPercentage((ktangInfo?.detectionMain?.averageNum || 0),(ktangInfo?.jiaoshirongliang?.jsrl || 0))}}
<template v-if="ktangInfo?.jiaoshirongliang?.jsrl">本教室容量{{ktangInfo?.jiaoshirongliang?.jsrl}}座位</template>
</div>
<bVideo ref="mainVideo" videoId="mainVideo" :videoOption="{ autoplay: true }" @load-end="mainVideoLoadEnd"/> <bVideo ref="mainVideo" videoId="mainVideo" :videoOption="{ autoplay: true }" @load-end="mainVideoLoadEnd"/>
<div class="jxDiv">
<a-space>
<div v-if="ktangInfo?.zyJxdg?.filePath">
教学大纲:
<a-button type="primary" size="small" style="margin-left:10px;" @click="openPdf(ktangInfo?.zyJxdg?.filePath)">预览</a-button>
<a-button type="primary" size="small" style="margin-left:10px;" @click="downloadFile(ktangInfo?.zyJxdg?.filePath)">下载</a-button>
</div>
<div v-if="ktangInfo?.zyJxdg?.filePath">
教学日历:
<a-button type="primary" size="small" style="margin-left:10px;" @click="openPdf(ktangInfo?.zyJxdg?.jxrlFilePath)">预览</a-button>
<a-button type="primary" size="small" style="margin-left:10px;" @click="downloadFile(ktangInfo?.zyJxdg?.jxrlFilePath)">下载</a-button>
</div>
</a-space>
</div>
<div style="width: 100%;margin-top:10px;"> <div style="width: 100%;margin-top:10px;">
<a-textarea style="width: calc(100% - 7rem);height:120px;float: left;" v-model:value="model.notes" placeholder="您可以填写听课笔记"></a-textarea> <a-textarea style="width: calc(100% - 7rem);height:120px;float: left;" v-model:value="model.notes" placeholder="您可以填写听课笔记"></a-textarea>
<div style="width: 7rem;height: 100%;float: right;"> <div style="width: 7rem;height: 100%;float: right;">
@ -103,6 +127,7 @@ import KcErrorreportIndexModal from '/@/views/kc/kcErrorreport/components/KcErro
import videojs from "video.js"; import videojs from "video.js";
import { getSysConfig } from '/@/views/site/utils/index'; import { getSysConfig } from '/@/views/site/utils/index';
import { useMessage } from '/@/hooks/web/useMessage'; import { useMessage } from '/@/hooks/web/useMessage';
import { baseApiUrl, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
const { createMessage, createInfoModal, createErrorModal } = useMessage(); const { createMessage, createInfoModal, createErrorModal } = useMessage();
@ -114,6 +139,7 @@ const tingKeZuJiAddModal = ref<any>({});
const curentPlayerVideo = ref<any>({}); const curentPlayerVideo = ref<any>({});
const kcCardBoxTitle = ref<any>(''); const kcCardBoxTitle = ref<any>('');
const ktangInfo = ref<any>({}); const ktangInfo = ref<any>({});
// const jxdgInfo = ref<any>({});
const mainVideoCardBoxTitle = ref<any>(''); const mainVideoCardBoxTitle = ref<any>('');
const tableData = ref<Recordable>([]) const tableData = ref<Recordable>([])
const suibiList = ref<Recordable>([]) const suibiList = ref<Recordable>([])
@ -130,7 +156,7 @@ enum Api {
querySuibi = '/kc/kcKetangSuibi/list', querySuibi = '/kc/kcKetangSuibi/list',
addSuibi = '/kc/kcKetangSuibi/add', addSuibi = '/kc/kcKetangSuibi/add',
// editSuibi = '/kc/kcKetangSuibi/edit' // editSuibi = '/kc/kcKetangSuibi/edit'
getKtangInfo = '/ktgl/kcKetangbiao/queryById', getKtangInfo = '/ktgl/kcKetangbiao/queryAllDataById',
savePlayLog = '/jiaoshi/kcZhihuijiaoshiAccessLog/savePlayLog', savePlayLog = '/jiaoshi/kcZhihuijiaoshiAccessLog/savePlayLog',
changeAvyLiveByJsbhsApi = '/httpinterface/runAvyApiByJsbhs', changeAvyLiveByJsbhsApi = '/httpinterface/runAvyApiByJsbhs',
} }
@ -289,6 +315,13 @@ function getKcxx(){
console.log(res); console.log(res);
ktangInfo.value = res; ktangInfo.value = res;
kcCardBoxTitle.value = res.kcmc; kcCardBoxTitle.value = res.kcmc;
// defHttp.get({ url: '/zyJxdg/zyJxdg/getKcjsJxdg', params: { rwbh: res.rwbh,xqxn: res.xnxq } }).then((res) => {
// if(res){
// jxdgInfo.value = res;
// }
// });
}); });
} }
function savePlayLogFn(item){ function savePlayLogFn(item){
@ -342,11 +375,34 @@ function openAllSuiBi(){
}).finally(() => { }).finally(() => {
// //
}); });
} }
function calcPercentage(averageNum, zrs) {
if(averageNum === 0 || zrs === 0){
return '0%';
}else{
return (averageNum / zrs * 100).toFixed(2);
}
}
function openPdf(miniUrl) {
let url2 = getFileAccessHttpUrl(miniUrl)
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
window.open(url,"_blank");
}
function downloadFile(miniUrl) {
let url = getFileAccessHttpUrl(miniUrl);
window.open(url,"_blank");
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.jxDiv {
padding-top: .5rem;
}
#siteMain { #siteMain {
// font-size: ; // font-size: ;
height: 100%; height: 100%;

View File

@ -43,8 +43,8 @@
<template #extra> <template #extra>
<span v-show="one.showBtn"> <span v-show="one.showBtn">
<a-space> <a-space>
<div><a-button type="primary" @click="addTwo($event, one)" class="twoBtn addBtn" title="新增二级"><Icon icon="ant-design:plus-outlined"/>新增章节</a-button></div> <div><a-button type="primary" size="small" @click="addTwo($event, one)" class="twoBtn addBtn" title="新增二级"><Icon icon="ant-design:plus-outlined"/></a-button></div>
<div><a-button type="primary" danger @click="delOne($event, one)" class="addBtn" title="删除此项及以下"><Icon icon="ant-design:delete"/>删除</a-button></div> <div><a-button type="primary" size="small" danger @click="delOne($event, one)" class="addBtn" title="删除此项及以下"><Icon icon="ant-design:delete"/></a-button></div>
</a-space> </a-space>
</span> </span>
</template> </template>
@ -70,66 +70,101 @@
<template #extra> <template #extra>
<span v-show="two.showBtn"> <span v-show="two.showBtn">
<a-space> <a-space>
<a-button type="primary" class="addBtn" title="展开收起"><Icon icon="ant-design:plus-outlined"/>上传资源</a-button> <a-button type="primary" size="small" class="addBtn" title="展开收起"><Icon icon="ant-design:plus-outlined"/></a-button>
<a-button type="primary" danger @click="delTwo($event, one, two)" class="addBtn" title="删除此项及以下"><Icon icon="ant-design:delete"/>删除</a-button> <a-button type="primary" size="small" danger @click="delTwo($event, one, two)" class="addBtn" title="删除此项及以下"><Icon icon="ant-design:delete"/></a-button>
</a-space> </a-space>
</span> </span>
</template> </template>
<div style="padding-top: 1rem;"> <div style="padding-top: 1rem;">
<a-space> <a-space>
<div><a-button type="primary" @click="addThree($event, two, 'video')" class="addBtn"><Icon icon="ant-design:video-camera-outlined"/>视频</a-button></div> <div><a-button type="primary" size="small" @click="addThree($event, two, 'video')" class="addBtn"><Icon icon="ant-design:video-camera-outlined"/>视频</a-button></div>
<div><a-button type="primary" @click="addThree($event, two, 'document')" class="addBtn"><Icon icon="ant-design:file-outlined"/>文档</a-button></div> <div><a-button type="primary" size="small" @click="addThree($event, two, 'document')" class="addBtn"><Icon icon="ant-design:file-outlined"/>文档</a-button></div>
<div><a-button type="primary" @click="addThree($event, two, 'richText')" class="addBtn"><Icon icon="ant-design:file-text-outlined"/>富文本</a-button></div> <div><a-button type="primary" size="small" @click="addThree($event, two, 'richText')" class="addBtn"><Icon icon="ant-design:file-text-outlined"/>富文本</a-button></div>
<!-- <div><a-button type="primary" @click="addThree($event, two, 'classroomTest')" class="addBtn"><Icon icon="ant-design:plus-outlined"/>随堂测试</a-button></div> <!-- <div><a-button type="primary" @click="addThree($event, two, 'classroomTest')" class="addBtn"><Icon icon="ant-design:plus-outlined"/>随堂测试</a-button></div>
<div><a-button type="primary" @click="addThree($event, two, 'discuss')" class="addBtn"><Icon icon="ant-design:plus-outlined"/>讨论</a-button></div> --> <div><a-button type="primary" @click="addThree($event, two, 'discuss')" class="addBtn"><Icon icon="ant-design:plus-outlined"/>讨论</a-button></div> -->
</a-space> </a-space>
</div> </div>
<draggable v-bind="draggableBind" v-model="two.childrenList"> <draggable v-bind="draggableBind" v-model="two.childrenList">
<template #item="{ element: three }"> <template #item="{ element: three, index: threeIndex }">
<div class="box" @mouseenter="() => three.showBtn = true" @mouseleave="() => three.showBtn = false"> <div class="box" @mouseenter="() => three.showBtn = true" @mouseleave="() => three.showBtn = false">
<a-card> <Icon icon="ant-design:holder-outlined"/>
{{ one.sort }}.{{ two.sort }}.{{ three.sort }}
<a-tag class="hand" @click="viewThreePage(three)">
<template v-if="three.type == 'video'"><Icon icon="ant-design:video-camera-outlined" />视频</template>
<template v-if="three.type == 'document'"><Icon icon="ant-design:file-outlined" />文档</template>
<template v-if="three.type == 'richText'"><Icon icon="ant-design:file-text-outlined" />富文本</template>
</a-tag>
<span class="hand" @click="viewThreePage(three)">{{ three.title }}</span>
<span v-show="three.showBtn">
<a-space>
<a-button type="primary" size="small" @click="viewThreePage(three)" class="addBtn"><Icon icon="ant-design:fund-view-outlined"/></a-button>
<a-button type="primary" size="small" @click="editThreePage(two, Object.assign({},three), threeIndex)" class="addBtn"><Icon icon="ant-design:edit"/></a-button>
<a-button type="primary" size="small" danger @click="delThree($event, two, three)" class="addBtn"><Icon icon="ant-design:delete"/></a-button>
</a-space>
</span>
<a-card v-if="false">
<template #title> <template #title>
<Icon icon="ant-design:holder-outlined"/> <div>
{{ one.sort }}.{{ two.sort }}.{{ three.sort }} <Icon icon="ant-design:holder-outlined"/>
<template v-if="three.type == 'video'"> {{ one.sort }}.{{ two.sort }}.{{ three.sort }}
<Icon icon="ant-design:video-camera-outlined" />视频 <template v-if="three.type == 'video'">
</template> <a-tag>
<template v-else-if="three.type == 'document'"> <Icon icon="ant-design:video-camera-outlined" />视频
<Icon icon="ant-design:file-outlined" />文档 </a-tag>
</template> </template>
<template v-else-if="three.type == 'richText'"> <template v-else-if="three.type == 'document'">
<Icon icon="ant-design:file-text-outlined" />富文本 <a-tag>
</template> <Icon icon="ant-design:file-outlined" />文档
</a-tag>
</template>
<template v-else-if="three.type == 'richText'">
<a-tag>
<Icon icon="ant-design:file-text-outlined" />富文本
</a-tag>
</template>
</div>
<div>
<a-input v-if="three.isEdit" :value="three.title" @change="changeInput($event, three, 'title')" @click="stop" class="ainput"/>
<div v-else class="ainput ainputNoEdit">&nbsp;{{ three.title }}</div>
</div>
</template> </template>
<template #extra> <template #extra>
<span v-show="three.showBtn"> <span v-show="three.showBtn">
<a-space> <a-space>
<a-button type="primary" v-if="three.isEdit" @click="() => three.isEdit = false" class="addBtn"><Icon icon="ant-design:edit"/>确认</a-button> <a-button type="primary" size="small" v-if="three.isEdit" @click="() => three.isEdit = false" class="addBtn"><Icon icon="ant-design:form-outlined"/></a-button>
<a-button type="primary" v-if="!three.isEdit" @click="() => three.isEdit = true" class="addBtn"><Icon icon="ant-design:edit"/>编辑</a-button> <a-button type="primary" size="small" v-if="!three.isEdit" @click="() => three.isEdit = true" class="addBtn"><Icon icon="ant-design:edit"/></a-button>
<a-button type="primary" danger @click="delThree($event, two, three)" class="addBtn"><Icon icon="ant-design:delete"/>删除</a-button> <a-button type="primary" size="small" danger @click="delThree($event, two, three)" class="addBtn"><Icon icon="ant-design:delete"/></a-button>
</a-space> </a-space>
</span> </span>
</template> </template>
<div class="topDiv"> <div class="threeDiv">
<template v-if="three.type == 'video'"> <div>
<!-- <j-upload v-model:value="three.filePath" maxCount="1" suffixList="avi,mov,mkv,mpeg,asf,3gp,wmv,mp4,flv,rmvb"/> video/mp4,video/webm,video/ogv--> <!-- <a-input v-if="three.isEdit" :value="three.title" @change="changeInput($event, three, 'title')" @click="stop" class="ainput"/>
<j-upload v-if="three.isEdit" v-model:value="three.filePath" :maxCount="1" text="上传视频" accept=".mp4,.webm,.ogv" :forceAcceptVerify="true"/> <div v-else class="ainput ainputNoEdit">&nbsp;{{ three.title }}</div> -->
<downloadAssembly v-else :filePath="three.filePath"/> </div>
</template> <div>
<template v-if="three.type == 'document'"> <template v-if="three.type == 'video'">
<j-upload v-if="three.isEdit" v-model:value="three.filePath" :maxCount="1"/> <!-- <j-upload v-model:value="three.filePath" maxCount="1" suffixList="avi,mov,mkv,mpeg,asf,3gp,wmv,mp4,flv,rmvb"/> video/mp4,video/webm,video/ogv-->
<downloadAssembly v-else :filePath="three.filePath"/> <j-upload v-if="three.isEdit" v-model:value="three.filePath" :maxCount="1" text="上传视频" accept=".mp4,.webm,.ogv" :forceAcceptVerify="true"/>
</template> <downloadAssembly v-else :filePath="three.filePath"/>
<template v-if="three.type == 'richText'"> </template>
<j-editor v-if="three.isEdit" v-model:value="three.richText"/> <template v-if="three.type == 'document'">
<div v-else class="richText" v-html="three.richText"></div> <j-upload v-if="three.isEdit" v-model:value="three.filePath" :maxCount="1"/>
</template> <downloadAssembly v-else :filePath="three.filePath"/>
<!-- <template v-if="three.type == 'classroomTest'"> </template>
随堂测试 <template v-if="three.type == 'richText'">
</template> <j-editor v-if="three.isEdit" v-model:value="three.richText"/>
<template v-if="three.type == 'discuss'"> <div v-else class="richText" v-html="three.richText"></div>
讨论 </template>
</template> --> <!-- <template v-if="three.type == 'classroomTest'">
随堂测试
</template>
<template v-if="three.type == 'discuss'">
讨论
</template> -->
</div>
</div> </div>
</a-card> </a-card>
</div> </div>
@ -150,6 +185,29 @@
<!-- <a-button @click="sureChange" type="primary" style="margin-top: 100px">确定</a-button> --> <!-- <a-button @click="sureChange" type="primary" style="margin-top: 100px">确定</a-button> -->
<!-- </template> --> <!-- </template> -->
</draggable> </draggable>
<a-modal :title="threePageTitle" :width="800" :visible="threePageOpen" @ok="threePageHandleOk" :okButtonProps="{ class: { 'jee-hidden': threePageDisableSubmit } }" @cancel="threePageHandleCancel" cancelText="关闭">
<a-card>
<div>
标题
<a-input v-if="!threePageDisableSubmit" :value="threePageData.three.title" @change="changeInput($event, threePageData.three, 'title')" @click="stop" class="ainput"/>
<div v-else>{{ threePageData.three.title }}</div>
</div>
<div>
<template v-if="threePageData.three.type == 'video'">
<j-upload v-if="!threePageDisableSubmit" v-model:value="threePageData.three.filePath" :maxCount="1" text="上传视频" accept=".mp4,.webm,.ogv" :forceAcceptVerify="true"/>
<downloadAssembly v-else :filePath="threePageData.three.filePath"/>
</template>
<template v-if="threePageData.three.type == 'document'">
<j-upload v-if="!threePageDisableSubmit" v-model:value="threePageData.three.filePath" :maxCount="1"/>
<downloadAssembly v-else :filePath="threePageData.three.filePath"/>
</template>
<template v-if="threePageData.three.type == 'richText' && threePageOpen">
<j-editor v-if="!threePageDisableSubmit" v-model:value="threePageData.three.richText"/>
<div v-else class="richText" v-html="threePageData.three.richText"></div>
</template>
</div>
</a-card>
</a-modal>
</div> </div>
</div> </div>
@ -183,6 +241,11 @@
const saveLoading = ref<boolean>(false); const saveLoading = ref<boolean>(false);
const isPreview = ref<boolean>(false); const isPreview = ref<boolean>(false);
const threePageTitle = ref<String>('详细');
const threePageOpen = ref<boolean>(false);
const threePageDisableSubmit = ref<boolean>(false);
const threePageData = ref<Object>(null);
const stuIndexRef = ref<any>(); const stuIndexRef = ref<any>();
// //
@ -389,15 +452,29 @@
data.type = type; data.type = type;
data.richText = null; data.richText = null;
data.filePath = null; data.filePath = null;
if(two.childrenList){ // if(two.childrenList){
two.childrenList.push(data); // two.childrenList.push(data);
}else{ // }else{
two.childrenList = [ data ]; // two.childrenList = [ data ];
} // }
createMessage.success('新增成功!'); //createMessage.success('');
nextTick(() => { // nextTick(() => {
refreshDataSort(); // refreshDataSort();
}) // })
editThreePage(two, data, null);
}
function editThreePage(two, three, threeIndex) {
threePageOpen.value = true;
threePageDisableSubmit.value = false;
threePageData.value = { two, three, threeIndex, };
}
function viewThreePage(three) {
threePageOpen.value = true;
threePageDisableSubmit.value = true;
threePageData.value = { three };
} }
function delThree(e, two, three){ function delThree(e, two, three){
@ -423,6 +500,55 @@
}) })
} }
function threePageHandleOk(){
let { two, three, threeIndex, } = threePageData.value;
//
if(!three.title){
createMessage.warn('请填写标题!');
return;
} else if(three.type == 'video'){
if(!three.filePath){
createMessage.warn('请上传视频!');
return;
}
} else if(three.type == 'document'){
if(!three.filePath){
createMessage.warn('请上传视频!');
return;
}
} else if(three.type == 'richText'){
if(!three.filePath){
createMessage.warn('请填写富文本!');
return;
}
}
if(!threeIndex){
//
if(two.childrenList){
two.childrenList.push(three);
}else{
two.childrenList = [ three ];
}
createMessage.success('新增成功!');
}else{
//
two.childrenList[threeIndex] = three;
createMessage.success('修改成功!');
}
nextTick(() => {
refreshDataSort();
})
threePageOpen.value = false;
}
function threePageHandleCancel(){
threePageOpen.value = false;
}
// //
// function chooseDraggable(){ // function chooseDraggable(){
// // isNotMove.value = false; // // isNotMove.value = false;
@ -474,6 +600,9 @@
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.hand {
cursor:pointer;
}
.max { .max {
height: calc(100vh - 225px); height: calc(100vh - 225px);
//height: calc(-132px + 100vh); //height: calc(-132px + 100vh);

View File

@ -64,8 +64,22 @@
</a-space> </a-space>
</div> --> </div> -->
<div v-for="(three, threeIndex) in two.childrenList" :key="threeIndex"> <div v-for="(three, threeIndex) in two.childrenList" :key="threeIndex">
<div class="box"> <div class="box" @mouseenter="() => three.showBtn = true" @mouseleave="() => three.showBtn = false">
<a-card> <Icon icon="ant-design:holder-outlined"/>
{{ one.sort }}.{{ two.sort }}.{{ three.sort }}
<a-tag class="hand" @click="viewThreePage(three)">
<template v-if="three.type == 'video'"><Icon icon="ant-design:video-camera-outlined" />视频</template>
<template v-if="three.type == 'document'"><Icon icon="ant-design:file-outlined" />文档</template>
<template v-if="three.type == 'richText'"><Icon icon="ant-design:file-text-outlined" />富文本</template>
</a-tag>
<span class="hand" @click="viewThreePage(three)">{{ three.title }}</span>
<span v-show="three.showBtn">
<a-space>
<a-button type="primary" size="small" @click="viewThreePage(three)" class="addBtn"><Icon icon="ant-design:fund-view-outlined"/></a-button>
</a-space>
</span>
<a-card v-if="false">
<template #title> <template #title>
{{ one.sort }}.{{ two.sort }}.{{ three.sort }} {{ one.sort }}.{{ two.sort }}.{{ three.sort }}
<template v-if="three.type == 'video'"> <template v-if="three.type == 'video'">
@ -125,6 +139,32 @@
<!-- </template> --> <!-- </template> -->
</div> </div>
</div> </div>
<a-modal :title="threePageTitle" :width="800" :visible="threePageOpen" @ok="threePageHandleOk" :okButtonProps="{ class: { 'jee-hidden': threePageDisableSubmit } }" @cancel="threePageHandleCancel" cancelText="关闭">
<a-card>
<div>
标题
<a-input v-if="!threePageDisableSubmit" :value="threePageData.three.title" @change="changeInput($event, threePageData.three, 'title')" @click="stop" class="ainput"/>
<div v-else>{{ threePageData.three.title }}</div>
</div>
<div>
<template v-if="threePageData.three.type == 'video'">
<j-upload v-if="!threePageDisableSubmit" v-model:value="threePageData.three.filePath" :maxCount="1" text="上传视频" accept=".mp4,.webm,.ogv" :forceAcceptVerify="true"/>
<downloadAssembly v-else :filePath="threePageData.three.filePath"/>
</template>
<template v-if="threePageData.three.type == 'document'">
<j-upload v-if="!threePageDisableSubmit" v-model:value="threePageData.three.filePath" :maxCount="1"/>
<downloadAssembly v-else :filePath="threePageData.three.filePath"/>
</template>
<template v-if="threePageData.three.type == 'richText' && threePageOpen">
<j-editor v-if="!threePageDisableSubmit" v-model:value="threePageData.three.richText"/>
<div v-else class="richText" v-html="threePageData.three.richText"></div>
</template>
</div>
</a-card>
</a-modal>
</div> </div>
@ -168,6 +208,11 @@
const isNotMove = ref<boolean>(true); const isNotMove = ref<boolean>(true);
const saveLoading = ref<boolean>(false); const saveLoading = ref<boolean>(false);
const threePageTitle = ref<String>('详细');
const threePageOpen = ref<boolean>(false);
const threePageDisableSubmit = ref<boolean>(false);
const threePageData = ref<Object>(null);
// //
const draggableBind = ref<Object>({ const draggableBind = ref<Object>({
sort: false, sort: false,
@ -392,6 +437,20 @@
}) })
} }
function viewThreePage(three) {
threePageOpen.value = true;
threePageDisableSubmit.value = true;
threePageData.value = { three };
}
function threePageHandleOk(){
threePageOpen.value = false;
}
function threePageHandleCancel(){
threePageOpen.value = false;
}
//, //,
function endDraggable(){ function endDraggable(){
@ -458,6 +517,9 @@
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.hand {
cursor:pointer;
}
.max { .max {
height: calc(100vh - 225px); height: calc(100vh - 225px);
//height: calc(-132px + 100vh); //height: calc(-132px + 100vh);