2024年5月24日 修改问题
This commit is contained in:
parent
e3e6e1c4ca
commit
d844d6b7c1
|
@ -4,7 +4,7 @@ import { isArray } from '/@/utils/is';
|
|||
import { FormSchema } from '/@/components/Form';
|
||||
|
||||
const globSetting = useGlobSetting();
|
||||
const baseApiUrl = globSetting.domainUrl;
|
||||
export const baseApiUrl = globSetting.domainUrl;
|
||||
/**
|
||||
* 获取文件服务访问路径
|
||||
* @param fileUrl 文件路径
|
||||
|
|
|
@ -199,9 +199,10 @@ export const transform: AxiosTransform = {
|
|||
* @description: 响应错误处理
|
||||
*/
|
||||
responseInterceptorsCatch: (error: any) => {
|
||||
//console.log('报错了!',error,error.config,error.request,error.response,error.isAxiosError,error.toJSON(),);
|
||||
|
||||
if (!error?.response?.status) {//找不到返回值,也找不到状态码,则认为是重定向后跨域了,
|
||||
console.log('报错了!',error,error.message,error.config,error.request,error.response,error.isAxiosError,error.toJSON(),);
|
||||
if(error.message?.includes('Network Error')){
|
||||
return Promise.reject(error);
|
||||
}else if (!error?.response?.status) {//找不到返回值,也找不到状态码,则认为是重定向后跨域了,
|
||||
//window.location.href = error?.config?.url || window.location.href;//跳转不正常。。。
|
||||
//window.location.href = window.location.href;
|
||||
//useSso().ssoLoginOut();
|
||||
|
|
|
@ -17,13 +17,37 @@
|
|||
</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;">
|
||||
{{ ktangInfo.zc || ' ' }} {{ ktangInfo.skjs || ' ' }} 学分:{{ ktangInfo.xf || ' ' }} 选课人数:{{ ktangInfo.xkrs || ' ' }} 课程性质:{{ ktangInfo.kcxz || ' ' }} 开课单位:{{ ktangInfo.kkdw || ' ' }}
|
||||
{{ ktangInfo.zc || ' ' }} {{ ktangInfo.skjs || ' ' }} 学分:{{ ktangInfo.xf || ' ' }}
|
||||
选课人数:{{ ktangInfo.xkrs || ' ' }}
|
||||
课程性质:{{ ktangInfo.kcxz || ' ' }}
|
||||
开课单位:{{ ktangInfo.kkdw || ' ' }}
|
||||
节次:{{ ktangInfo.hh || ' ' }}
|
||||
</div>
|
||||
<div style="font-size: 12px;">
|
||||
课程介绍:{{ ktangInfo?.zyJxdg?.kcjs }}
|
||||
</div>
|
||||
</template>
|
||||
<div style="padding: 1rem;">
|
||||
<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"/>
|
||||
<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;">
|
||||
<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;">
|
||||
|
@ -103,6 +127,7 @@ import KcErrorreportIndexModal from '/@/views/kc/kcErrorreport/components/KcErro
|
|||
import videojs from "video.js";
|
||||
import { getSysConfig } from '/@/views/site/utils/index';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { baseApiUrl, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
|
||||
|
||||
const { createMessage, createInfoModal, createErrorModal } = useMessage();
|
||||
|
||||
|
@ -114,6 +139,7 @@ const tingKeZuJiAddModal = ref<any>({});
|
|||
const curentPlayerVideo = ref<any>({});
|
||||
const kcCardBoxTitle = ref<any>('');
|
||||
const ktangInfo = ref<any>({});
|
||||
// const jxdgInfo = ref<any>({});
|
||||
const mainVideoCardBoxTitle = ref<any>('');
|
||||
const tableData = ref<Recordable>([])
|
||||
const suibiList = ref<Recordable>([])
|
||||
|
@ -130,7 +156,7 @@ enum Api {
|
|||
querySuibi = '/kc/kcKetangSuibi/list',
|
||||
addSuibi = '/kc/kcKetangSuibi/add',
|
||||
// editSuibi = '/kc/kcKetangSuibi/edit'
|
||||
getKtangInfo = '/ktgl/kcKetangbiao/queryById',
|
||||
getKtangInfo = '/ktgl/kcKetangbiao/queryAllDataById',
|
||||
savePlayLog = '/jiaoshi/kcZhihuijiaoshiAccessLog/savePlayLog',
|
||||
changeAvyLiveByJsbhsApi = '/httpinterface/runAvyApiByJsbhs',
|
||||
}
|
||||
|
@ -289,6 +315,13 @@ function getKcxx(){
|
|||
console.log(res);
|
||||
ktangInfo.value = res;
|
||||
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){
|
||||
|
@ -342,11 +375,34 @@ function openAllSuiBi(){
|
|||
}).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>
|
||||
<style lang="less" scoped>
|
||||
.jxDiv {
|
||||
padding-top: .5rem;
|
||||
}
|
||||
#siteMain {
|
||||
// font-size: ;
|
||||
height: 100%;
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
<template #extra>
|
||||
<span v-show="one.showBtn">
|
||||
<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" danger @click="delOne($event, one)" class="addBtn" title="删除此项及以下"><Icon icon="ant-design:delete"/>删除</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" size="small" danger @click="delOne($event, one)" class="addBtn" title="删除此项及以下"><Icon icon="ant-design:delete"/></a-button></div>
|
||||
</a-space>
|
||||
</span>
|
||||
</template>
|
||||
|
@ -70,66 +70,101 @@
|
|||
<template #extra>
|
||||
<span v-show="two.showBtn">
|
||||
<a-space>
|
||||
<a-button type="primary" 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" class="addBtn" title="展开收起"><Icon icon="ant-design:plus-outlined"/></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>
|
||||
</span>
|
||||
</template>
|
||||
<div style="padding-top: 1rem;">
|
||||
<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" @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, 'video')" class="addBtn"><Icon icon="ant-design:video-camera-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" 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, 'discuss')" class="addBtn"><Icon icon="ant-design:plus-outlined"/>讨论</a-button></div> -->
|
||||
</a-space>
|
||||
</div>
|
||||
<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">
|
||||
<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>
|
||||
<Icon icon="ant-design:holder-outlined"/>
|
||||
{{ one.sort }}.{{ two.sort }}.{{ three.sort }}
|
||||
<template v-if="three.type == 'video'">
|
||||
<Icon icon="ant-design:video-camera-outlined" />视频
|
||||
</template>
|
||||
<template v-else-if="three.type == 'document'">
|
||||
<Icon icon="ant-design:file-outlined" />文档
|
||||
</template>
|
||||
<template v-else-if="three.type == 'richText'">
|
||||
<Icon icon="ant-design:file-text-outlined" />富文本
|
||||
</template>
|
||||
<div>
|
||||
<Icon icon="ant-design:holder-outlined"/>
|
||||
{{ one.sort }}.{{ two.sort }}.{{ three.sort }}
|
||||
<template v-if="three.type == 'video'">
|
||||
<a-tag>
|
||||
<Icon icon="ant-design:video-camera-outlined" />视频
|
||||
</a-tag>
|
||||
</template>
|
||||
<template v-else-if="three.type == 'document'">
|
||||
<a-tag>
|
||||
<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"> {{ three.title }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #extra>
|
||||
<span v-show="three.showBtn">
|
||||
<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" 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" v-if="three.isEdit" @click="() => three.isEdit = false" class="addBtn"><Icon icon="ant-design:form-outlined"/></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" size="small" danger @click="delThree($event, two, three)" class="addBtn"><Icon icon="ant-design:delete"/></a-button>
|
||||
</a-space>
|
||||
</span>
|
||||
</template>
|
||||
<div class="topDiv">
|
||||
<template v-if="three.type == 'video'">
|
||||
<!-- <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-->
|
||||
<j-upload v-if="three.isEdit" v-model:value="three.filePath" :maxCount="1" text="上传视频" accept=".mp4,.webm,.ogv" :forceAcceptVerify="true"/>
|
||||
<downloadAssembly v-else :filePath="three.filePath"/>
|
||||
</template>
|
||||
<template v-if="three.type == 'document'">
|
||||
<j-upload v-if="three.isEdit" v-model:value="three.filePath" :maxCount="1"/>
|
||||
<downloadAssembly v-else :filePath="three.filePath"/>
|
||||
</template>
|
||||
<template v-if="three.type == 'richText'">
|
||||
<j-editor v-if="three.isEdit" v-model:value="three.richText"/>
|
||||
<div v-else class="richText" v-html="three.richText"></div>
|
||||
</template>
|
||||
<!-- <template v-if="three.type == 'classroomTest'">
|
||||
随堂测试
|
||||
</template>
|
||||
<template v-if="three.type == 'discuss'">
|
||||
讨论
|
||||
</template> -->
|
||||
<div class="threeDiv">
|
||||
<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"> {{ three.title }}</div> -->
|
||||
</div>
|
||||
<div>
|
||||
<template v-if="three.type == 'video'">
|
||||
<!-- <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-->
|
||||
<j-upload v-if="three.isEdit" v-model:value="three.filePath" :maxCount="1" text="上传视频" accept=".mp4,.webm,.ogv" :forceAcceptVerify="true"/>
|
||||
<downloadAssembly v-else :filePath="three.filePath"/>
|
||||
</template>
|
||||
<template v-if="three.type == 'document'">
|
||||
<j-upload v-if="three.isEdit" v-model:value="three.filePath" :maxCount="1"/>
|
||||
<downloadAssembly v-else :filePath="three.filePath"/>
|
||||
</template>
|
||||
<template v-if="three.type == 'richText'">
|
||||
<j-editor v-if="three.isEdit" v-model:value="three.richText"/>
|
||||
<div v-else class="richText" v-html="three.richText"></div>
|
||||
</template>
|
||||
<!-- <template v-if="three.type == 'classroomTest'">
|
||||
随堂测试
|
||||
</template>
|
||||
<template v-if="three.type == 'discuss'">
|
||||
讨论
|
||||
</template> -->
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
|
@ -150,6 +185,29 @@
|
|||
<!-- <a-button @click="sureChange" type="primary" style="margin-top: 100px">确定</a-button> -->
|
||||
<!-- </template> -->
|
||||
</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>
|
||||
|
||||
|
@ -183,6 +241,11 @@
|
|||
const saveLoading = 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>();
|
||||
|
||||
//公共的拖动排序组件绑定数据
|
||||
|
@ -389,15 +452,29 @@
|
|||
data.type = type;
|
||||
data.richText = null;
|
||||
data.filePath = null;
|
||||
if(two.childrenList){
|
||||
two.childrenList.push(data);
|
||||
}else{
|
||||
two.childrenList = [ data ];
|
||||
}
|
||||
createMessage.success('新增成功!');
|
||||
nextTick(() => {
|
||||
refreshDataSort();
|
||||
})
|
||||
// if(two.childrenList){
|
||||
// two.childrenList.push(data);
|
||||
// }else{
|
||||
// two.childrenList = [ data ];
|
||||
// }
|
||||
//createMessage.success('新增成功!');
|
||||
// nextTick(() => {
|
||||
// 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){
|
||||
|
@ -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(){
|
||||
// // isNotMove.value = false;
|
||||
|
@ -474,6 +600,9 @@
|
|||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.hand {
|
||||
cursor:pointer;
|
||||
}
|
||||
.max {
|
||||
height: calc(100vh - 225px);
|
||||
//height: calc(-132px + 100vh);
|
||||
|
|
|
@ -64,8 +64,22 @@
|
|||
</a-space>
|
||||
</div> -->
|
||||
<div v-for="(three, threeIndex) in two.childrenList" :key="threeIndex">
|
||||
<div class="box">
|
||||
<a-card>
|
||||
<div class="box" @mouseenter="() => three.showBtn = true" @mouseleave="() => three.showBtn = false">
|
||||
<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>
|
||||
{{ one.sort }}.{{ two.sort }}.{{ three.sort }}
|
||||
<template v-if="three.type == 'video'">
|
||||
|
@ -125,6 +139,32 @@
|
|||
<!-- </template> -->
|
||||
</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>
|
||||
|
||||
|
||||
|
@ -168,6 +208,11 @@
|
|||
const isNotMove = ref<boolean>(true);
|
||||
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>({
|
||||
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(){
|
||||
|
@ -458,6 +517,9 @@
|
|||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.hand {
|
||||
cursor:pointer;
|
||||
}
|
||||
.max {
|
||||
height: calc(100vh - 225px);
|
||||
//height: calc(-132px + 100vh);
|
||||
|
|
Loading…
Reference in New Issue