Merge remote-tracking branch 'origin/master'

This commit is contained in:
曹磊 2024-05-21 09:02:46 +08:00
commit 81ef9abce3
22 changed files with 1163 additions and 55 deletions

View File

@ -3,7 +3,7 @@
<a-upload
:headers="headers"
:multiple="multiple"
:action="uploadUrl"
:action="uploadFn"
:fileList="fileList"
:disabled="disabled"
v-bind="bindProps"
@ -38,6 +38,7 @@
import { UploadTypeEnum } from './upload.data';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import UploadItemActions from './components/UploadItemActions.vue';
import { defHttp } from '/@/utils/http/axios';
const { createMessage, createConfirm } = useMessage();
const { prefixCls } = useDesign('j-upload');
@ -372,6 +373,21 @@
return path.substring(path.lastIndexOf('/') + 1);
}
function uploadFn(file){
let form = new FormData();
form.append('biz', props.bizPath);
form.append('file', file);
console.log(`🚀 -------------------------------------🚀`);
console.log(`🚀 ~ uploadFn ~ uploadUrl:`, uploadUrl);
console.log(`🚀 -------------------------------------🚀`);
// * * 60
defHttp.post({ url: '/sys/common/upload', formData: form }, { timeout: 60 * 60 * 1000, joinPrefix: false, apiUrl: 'http://localhost:8090/jeecg-boot'});//http://localhost:8090/jeecg-boot/sys/common/upload
}
defineExpose({
addActionsListener,
});

View File

@ -62,6 +62,23 @@ const stuzy: AppRouteModule = {
title: '通知公告',
},
},
{
path: 'stuJiaoXueDanYuanNeiRong',
name: 'stuJiaoXueDanYuanNeiRong',
component: () => import('/@/views/zy/jiaoXueDanYuanNeiRong/stuIndex.vue'),
meta: {
title: '教学单元内容',
},
},
{
path: 'stuTlq',
name: 'stuTlq',
component: () => import('/@/views/zy/zyTlq/StuZyTlqList.vue'),
meta: {
title: '通知公告',
},
},
]
}

View File

@ -39,7 +39,7 @@
</a-row>
<a-radio-group v-model:value="item.itemSelected" style="width: 100%" size="default" :disabled="!isShow">
<div style="width: 100%" v-for="(tmxx,index) in item.wjxWjxxTmxxList">
<a-radio :value="tmxx.itemIndex+``" style="width: 100%"><a-input placeholder="请填写标题" v-model:value="tmxx.itemTitle" :bordered="false" style="width:80%;"/>
<a-radio :value="tmxx.itemIndex+``" style="width: 100%"><a-input placeholder="请填写选项" v-model:value="tmxx.itemTitle" :bordered="false" style="width:80%;"/>
<a-tooltip placement="topLeft" title="在下方添加新的选项"><Icon icon="ant-design:plus-circle-outlined" style="cursor: pointer;margin:5px;font-size:20px;color: #1890ff;" @click="handleAddTmxx(tmxx,index,item.wjxWjxxTmxxList)" /></a-tooltip >
<a-tooltip placement="topLeft" title="删除选项" ><Icon icon="ant-design:minus-circle-outlined" style="cursor: pointer;margin:5px;font-size:20px;color: #1890ff;" @click="handleRemTmxx(tmxx,index,item.wjxWjxxTmxxList)" /></a-tooltip >
</a-radio>
@ -73,7 +73,7 @@
<a-checkbox-group v-model:value="item.itemSelected" style="width: 100%" :disabled="!isShow">
<a-row>
<a-col :span="24" v-for="(tmxx,index) in item.wjxWjxxTmxxList">
<a-checkbox :value="tmxx.itemIndex"><a-input placeholder="请填写标题" v-model:value="tmxx.itemTitle" :bordered="false" style="width:80%;"/></a-checkbox>
<a-checkbox :value="tmxx.itemIndex"><a-input placeholder="请填写选项" v-model:value="tmxx.itemTitle" :bordered="false" style="width:80%;"/></a-checkbox>
<a-tooltip placement="topLeft" title="在下方添加新的选项"><Icon icon="ant-design:plus-circle-outlined" style="cursor: pointer;margin:5px;font-size:20px;color: #1890ff;" @click="handleAddTmxx(tmxx,index,item.wjxWjxxTmxxList)"/></a-tooltip >
<a-tooltip placement="topLeft" title="删除选项" ><Icon icon="ant-design:minus-circle-outlined" style="cursor: pointer;margin:5px;font-size:20px;color: #1890ff;" @click="handleRemTmxx(tmxx,index,item.wjxWjxxTmxxList)"/></a-tooltip >
</a-col>

View File

@ -52,14 +52,11 @@
</a-col>
<a-col :xs="{ span: 0 }" :sm="{ span: 24 }" :lg="{ span: 24 }" v-if="getUserSf()=='S'">
<a-menu style="margin-top: 20px;" :selectable="false">
<a-menu-item key="1" >
<a class="abox" @click="toDom('ktsbDom')">听课笔记</a>
</a-menu-item>
<a-menu-item key="2" >
<a class="abox" @click="toDom('stujrkbDom')">今日课表</a>
</a-menu-item>
<a-menu-item key="3" >
<a class="abox" @click="toDom('stujlrkbDom')">六日课表</a>
<a class="abox" @click="toDom('stujlrkbDom')">六日课表</a>
</a-menu-item>
<a-menu-item key="4" >
<a class="abox" @click="toDom('stuwdkcDom')">我的课程</a>

View File

@ -55,7 +55,7 @@
</a-tabs>
</a-card>
<!-- 课堂随笔 -->
<ktsbPage v-if="getSysConfig().sfbmd=='n'"/>
<ktsbPage v-if="getSysConfig().sfbmd=='n'&&getUserSf()=='T'"/>
</a-layout-content>
<!-- 学生部分今日课表 -->

View File

@ -20,9 +20,18 @@
<a-button type="primary" style="margin-left:10px;" @click="openPdf(jxdgInfo)">预览</a-button>
</span>
</div>
<!-- <div>
<JeecgPdfView/>
</div> -->
</a-card>
<a-card>
<div>
<span style="float: left;line-height: 30px; font-size: 18px; font-weight: bold;">教学日历</span>
<span style="width:300px;float: left;">
<span style="float:left;"><j-upload v-model:value="jxdgInfo.jxrlFilePath" maxCount="1" accept=".doc,.docx,.pdf" :forceAcceptVerify="true"></j-upload></span>
</span>
<span style="float: right;">
<a-button type="primary" @click="addKcjsHandle(3)">提交</a-button>
<a-button type="primary" style="margin-left:10px;" @click="openJxrlPdf(jxdgInfo)">预览</a-button>
</span>
</div>
</a-card>
<a-card>
<div style="line-height: 30px; font-size: 18px; font-weight: bold;width:100%;">
@ -105,6 +114,7 @@ const baseApiUrl = globSetting.domainUrl;
const jxdgInfo = ref({
id:'',
filePath:null,
jxrlFilePath:null,
kcjs:''
});
@ -140,6 +150,14 @@ const baseApiUrl = globSetting.domainUrl;
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
window.open(url,"_blank")
}
function openJxrlPdf(record){
var url2 = getFileAccessHttpUrl(record.jxrlPdfPath)
console.log(`🚀 ~ openPdf ~ url2:`, url2)
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
window.open(url,"_blank")
}
//

View File

@ -14,7 +14,7 @@
<a-menu-item key="3" @click="gotoPageByName('jiaoXueDanYuanNeiRong')">教学单元内容</a-menu-item>
</a-sub-menu>
<a-sub-menu key="sub2">
<template #title>测验/作业</template>
<template #title>作业/测验</template>
<a-menu-item key="4" @click="getGzt('dqzy')">课程作业</a-menu-item>
<a-menu-item key="5" @click="getGzt('kcjc')">课程测验</a-menu-item>
</a-sub-menu>

View File

@ -14,7 +14,7 @@
<a-menu-item key="3" @click="getGzt('jxdynr')">教学单元内容</a-menu-item>
</a-sub-menu>
<a-sub-menu key="sub2">
<template #title>测验/作业</template>
<template #title>作业/测验</template>
<a-menu-item key="4" @click="getGzt('kczy')">课程作业</a-menu-item>
<a-menu-item key="5" @click="getGzt('kccy')">课程测验</a-menu-item>
</a-sub-menu>

View File

@ -1,7 +1,7 @@
<template>
<div class="indexBackClass" id="stujlrkbDom">
<div style="margin-top: 20px;">
<span style="margin-left: 30px;font-size: 24px;font-weight: 600;">六日课表</span>
<span style="margin-left: 30px;font-size: 24px;font-weight: 600;">六日课表</span>
<span style="margin-left: 10px;"><a href="javascript:void(0);" @click="openChangeKcPage">修改课程提醒</a></span>
</div>
<a-divider></a-divider>

View File

@ -11,16 +11,19 @@
<template #title>课程介绍</template>
<a-menu-item key="1" @click="getGzt('kcjs')">课程介绍</a-menu-item>
<a-menu-item key="2" @click="getGzt('tzgg')">通知公告</a-menu-item>
<a-menu-item key="3">教学单元</a-menu-item>
<a-menu-item key="3" @click="getGzt('stuJiaoXueDanYuanNeiRong')">教学单元</a-menu-item>
</a-sub-menu>
<a-sub-menu key="sub4">
<template #title>测验/作业</template>
<template #title>作业/测验</template>
<a-menu-item key="4" @click="getGzt('dqzy')">课程作业</a-menu-item>
<a-menu-item key="5" @click="getGzt('kcjc')">课程测验</a-menu-item>
</a-sub-menu>
<a-menu-item key="sub5">
<span @click="getGzt('dcwj')">问卷调查</span>
</a-menu-item>
<a-menu-item key="sub6">
<span @click="getGzt('tlq')">讨论区</span>
</a-menu-item>
<!-- <a-menu-item key="sub6">
<span>讨论区</span>
</a-menu-item>
@ -65,6 +68,11 @@
href = "/stuzy/studentMain";
}else if(zytype=='tzgg'){//
href = "/stuzy/StudentGonggaoList";
}else if(zytype=='tlq'){//
href = "/stuzy/stuTlq";
}else if(zytype == 'stuJiaoXueDanYuanNeiRong'){//
router.push({ name: 'stuJiaoXueDanYuanNeiRong', query: { rwbh,xqxn,type } });
return;
}
router.push({path:href,query: {rwbh,xqxn,type}});

View File

@ -21,9 +21,20 @@
<a-button type="primary" style="margin-left:10px;" @click="openPdf(jxdgInfo)">预览</a-button>
</span>
</div>
<!-- <div>
<JeecgPdfView/>
</div> -->
</a-card>
<a-card>
<div>
<span style="float: left;line-height: 30px; font-size: 18px; font-weight: bold;">教学日历</span>
<span style="width:300px;float: left;margin-top: 3px;">
<span v-if="jxdgInfo.jxrlFilePath">
<a-button :ghost="true" type="primary" preIcon="ant-design:download" size="small" @click="downloadFile(jxdgInfo.jxrlFilePath)"> 下载 </a-button>
</span>
<span v-else>暂无内容</span>
</span>
<span style="float: right;" v-if="jxdgInfo.jxrlFilePath">
<a-button type="primary" style="margin-left:10px;" @click="openJxrlPdf(jxdgInfo)">预览</a-button>
</span>
</div>
</a-card>
<a-card>
<div style="line-height: 30px; font-size: 18px; font-weight: bold;width:100%;">
@ -131,11 +142,18 @@ const baseApiUrl = globSetting.domainUrl;
}
function openPdf(record){
var url2 = getFileAccessHttpUrl(record.filePath)
var url2 = getFileAccessHttpUrl(record.pdfPath)
console.log(`🚀 ~ openPdf ~ url2:`, url2)
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
window.open(url,"_blank")
}
function openJxrlPdf(record){
var url2 = getFileAccessHttpUrl(record.jxrlPdfPath)
console.log(`🚀 ~ openPdf ~ url2:`, url2)
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
window.open(url,"_blank")
}
//

View File

@ -0,0 +1,44 @@
<template>
<div class="ant-upload-list ant-upload-list-text">
<div class="ant-upload-list-text-container">
<div class="ant-upload-list-item ant-upload-list-item-done ant-upload-list-item-list-type-text" v-if="getFilePath()">
<div class="ant-upload-list-item-info">
<span class="ant-upload-span">
<div class="ant-upload-text-icon">
<Icon icon="ant-design:paper-clip-outlined"/>
</div>
<a target="_blank" rel="noopener noreferrer" class="ant-upload-list-item-name" :title="getFileName()" :href="getFilePath()">{{ getFileName() }}</a>
</span>
</div>
<div class="ant-upload-list-item-progress" style="display: none;"></div>
</div>
<a-empty v-else/>
</div>
</div>
</template>
<script lang="ts" name="jiaoXueDanYuanNeiRongIndexDownload" setup>
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils'
const props = defineProps({
filePath: { type: String },
fileName: { type: String },
});
function getFileName(){
if(props.fileName){
return props.fileName;
}else{
if(!props.filePath) return '';
let pathList = props.filePath?.replaceAll('\\','/').split('/');
if(pathList.length){
return pathList[pathList.length-1] || '';
}
return '';
}
}
function getFilePath(){
if(!props.filePath) return null;
return getFileAccessHttpUrl(props.filePath);
}
</script>

View File

@ -3,15 +3,22 @@
<!-- <a-affix :offset-top="0" :target="() => doctomen"> -->
<div class="topButton">
<a-space>
<a-button type="primary" @click="save" :loading="saveLoading">保存</a-button>
<a-button @click="reload">刷新</a-button>
<a-button type="primary" @click="addOne()" class="addBtn" title="新增一级"><Icon icon="ant-design:plus-outlined"/>新增标题</a-button>
<a-space v-if="!isPreview">
<a-button type="primary" @click="save" :loading="saveLoading" title="保存"><Icon icon="ant-design:save-outlined"/>保存</a-button>
<a-button @click="reload"><Icon icon="ant-design:reload-outlined"/>刷新</a-button>
<a-button type="primary" @click="addOne()" class="addBtn" title="新增标题"><Icon icon="ant-design:plus-outlined"/>新增标题</a-button>
<a-button type="" v-if="!isPreview" @click="() => isPreview = true" class="addBtn" title="预览"><Icon icon="ant-design:fund-view-outlined"/>预览</a-button>
</a-space>
<template v-else>
<a-space>
<a-button @click="reload"><Icon icon="ant-design:reload-outlined"/>刷新</a-button>
<a-button type="" @click="() => isPreview = false" class="addBtn" title="返回"><Icon icon="ant-design:fund-view-outlined"/>返回</a-button>
</a-space>
</template>
</div>
<!-- </a-affix> -->
<div class="maxDiv">
<stuIndex v-show="isPreview" :hiddenBtn="true"/>
<div v-show="!isPreview" class="maxDiv">
<a-empty v-if="!dataSource || !dataSource.length"/>
<draggable v-bind="draggableBind" v-model="dataSource">
<template #item="{ element: one }">
@ -19,7 +26,7 @@
<!-- 下一层 -->
<a-card>
<a-collapse ghost expandIconPosition="right">
<a-collapse-panel :key="one._id">
<a-collapse-panel :key="one._id" forceRender>
<template #header>
<div class="topDiv">
<div>{{ one.sort }}</div>
@ -41,7 +48,7 @@
<!-- 下一层 -->
<a-card>
<a-collapse ghost expandIconPosition="right">
<a-collapse-panel :key="two._id" :showArrow="false">
<a-collapse-panel :key="two._id" :showArrow="false" forceRender>
<template #header>
<div class="twoTopDiv">
<div class="topDiv">
@ -55,9 +62,9 @@
</template>
<template #extra>
<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-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-space>
</template>
<div style="padding-top: 1rem;">
<a-space>
@ -95,11 +102,11 @@
<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"/>
<div v-else class="ainput">&nbsp;{{ three.filePath }}</div>
<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"/>
<div v-else class="ainput">&nbsp;{{ three.filePath }}</div>
<downloadAssembly v-else :filePath="three.filePath"/>
</template>
<template v-if="three.type == 'richText'">
<j-editor v-if="three.isEdit" v-model:value="three.richText"/>
@ -148,6 +155,8 @@
import draggable from 'vuedraggable';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import JEditor from '/@/components/Form/src/jeecg/components/JEditor.vue';
import downloadAssembly from '/@/views/zy/jiaoXueDanYuanNeiRong/downloadAssembly.vue';
import stuIndex from './stuIndex.vue';
//
const { currentRoute } = useRouter();
@ -160,6 +169,7 @@
const isNotMove = ref<boolean>(true);
const saveLoading = ref<boolean>(false);
const isPreview = ref<boolean>(false);
//
const draggableBind = ref<Object>({
@ -199,16 +209,30 @@
loadData();
}
function loadData() {
async function loadData() {
dataSource.value = [];
let params = {
rwbh,
xqxn,
}
listAll(params).then(res => {
await listAll(params).then(res => {
dataRecursion(res, (x) => x._id = x.id);
dataSource.value = res;
});
nextTick(() => {
// setTimeout(() => {
expandAllTable();
// nextTick(() => {
// expandAllTable();
// });
// }, 1000);
});
}
function expandAllTable() {
document.querySelectorAll('.max .ant-collapse-header').forEach(x => {
if(x.getAttribute('aria-expanded') == 'false') x.click()
});
}
//

View File

@ -0,0 +1,509 @@
<template>
<div class="max">
<!-- <a-affix :offset-top="0" :target="() => doctomen"> -->
<div class="topButton" v-if="!props.hiddenBtn">
<a-space>
<!-- <a-button type="primary" @click="save" :loading="saveLoading">保存</a-button> -->
<a-button @click="reload"><Icon icon="ant-design:reload-outlined"/>刷新</a-button>
<!-- <a-button type="primary" @click="addOne()" class="addBtn" title="新增一级"><Icon icon="ant-design:plus-outlined"/>新增标题</a-button> -->
</a-space>
</div>
<!-- </a-affix> -->
<div class="maxDiv">
<a-empty v-if="!dataSource || !dataSource.length"/>
<div v-for="(one, oneIndex) in dataSource" :key="oneIndex">
<div class="box">
<!-- 下一层 -->
<a-card>
<a-collapse ghost expandIconPosition="right">
<a-collapse-panel :key="one._id" forceRender>
<template #header>
<div class="topDiv">
<div>{{ one.sort }}</div>
<div class="inputd">
<div class="ainput ainputNoEdit" @click="(e) => { stop(e); }">&nbsp;{{ one.title }}</div>
</div>
</div>
</template>
<!-- <template #extra>
<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>
</a-space>
</template> -->
<div v-for="(two, twoIndex) in one.childrenList" :key="twoIndex">
<div class="box">
<!-- 下一层 -->
<a-card>
<a-collapse ghost expandIconPosition="right">
<a-collapse-panel :key="two._id" forceRender>
<template #header>
<div class="twoTopDiv">
<div class="topDiv">
<div>{{ one.sort }}.{{ two.sort }}</div>
<div class="twoInputd">
<!-- <a-input v-if="two.isEdit" :value="two.title" @change="changeInput($event, two, 'title')" @blur="() => { two.isEdit = false }" @click="stop" class="ainput"/> -->
<div class="ainput ainputNoEdit" @click="(e) => { stop(e); }" >&nbsp;{{ two.title }}</div>
</div>
</div>
</div>
</template>
<!-- <template #extra>
<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-space>
</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>
</a-space>
</div> -->
<div v-for="(three, threeIndex) in two.childrenList" :key="threeIndex">
<div class="box">
<a-card>
<template #title>
{{ 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>
</template>
<!-- <template #extra>
<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-space>
</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"/> -->
<!-- <div class="ainput">&nbsp;{{ getFileAccessHttpUrl(three.filePath) }}</div> -->
<!-- <downloadAssembly :filePath="three.filePath"/> -->
<downloadAssembly :filePath="three.filePath"/>
</template>
<template v-if="three.type == 'document'">
<!-- <j-upload v-if="three.isEdit" v-model:value="three.filePath" maxCount="1"/> -->
<downloadAssembly :filePath="three.filePath"/>
</template>
<template v-if="three.type == 'richText'">
<!-- <j-editor v-if="three.isEdit" v-model:value="three.richText"/> -->
<div class="richText" v-html="three.richText"></div>
</template>
<!-- <template v-if="three.type == 'classroomTest'">
随堂测试
</template>
<template v-if="three.type == 'discuss'">
讨论
</template> -->
</div>
</a-card>
</div>
</div>
</a-collapse-panel>
</a-collapse>
</a-card>
</div>
</div>
</a-collapse-panel>
</a-collapse>
</a-card>
</div>
<!-- <template #footer> -->
<!-- <a-button @click="sureChange" type="primary" style="margin-top: 100px">确定</a-button> -->
<!-- </template> -->
</div>
</div>
</div>
</template>
<script lang="ts" name="jiaoXueDanYuanNeiRongIndex" setup>
import { ref, reactive, onMounted, 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";
import { useRouter } from 'vue-router';
import { randomString, simpleDebounce } from '/@/utils/common/compUtils'
import draggable from 'vuedraggable';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import JEditor from '/@/components/Form/src/jeecg/components/JEditor.vue';
import downloadAssembly from '/@/views/zy/jiaoXueDanYuanNeiRong/downloadAssembly.vue';
//
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh, xqxn, type } = query;//
const props = defineProps({
hiddenBtn: { type: Boolean, default: false },
});
// watch(() => props.hiddenBtn, () => {
// reload();
// });
const { createConfirm, createMessage } = useMessage();
const queryParam = ref<any>({});
const dataSource = ref<any>([]);
const isNotMove = ref<boolean>(true);
const saveLoading = ref<boolean>(false);
//
const draggableBind = ref<Object>({
sort: false,
//
itemKey: '_id',
// onStart: moveDraggable,
// onAdd: onAddFn,
// onRemove: onRemoveFn,
// onUpdate: onUpdateFn,
//
onEnd: endDraggable,
//
// onChoose: simpleDebounce(chooseDraggable, 500),
// onChoose: chooseDraggable,
//
// onUnchoose: unchooseDraggable,
// onSort: onSortFn,
// onFilter: onFilterFn,
// onClone: onCloneFn,
// onMove: onMoveFn,
});
enum Api {
list = '/teachingunitcontent/kcTeachingUnitContentOne/allList',
edit = '/teachingunitcontent/kcTeachingUnitContentOne/edit',
}
/**
* 列表接口
* @param params
*/
const listAll = (params) => defHttp.get({ url: Api.list, params });
const editAll = (params) => defHttp.post({ url: Api.edit, params }, { isTransformResponse: true });
function reload() {
loadData();
}
async function loadData() {
dataSource.value = [];
let params = {
rwbh,
xqxn,
}
await listAll(params).then(res => {
dataRecursion(res, (x) => x._id = x.id);
dataSource.value = res;
});
nextTick(() => {
// setTimeout(() => {
expandAllTable();
// nextTick(() => {
// expandAllTable();
// });
// }, 1000);
});
}
function expandAllTable() {
document.querySelectorAll('.max .ant-collapse-header').forEach(x => {
if(x.getAttribute('aria-expanded') == 'false') x.click()
});
}
//
function dataRecursion(list, fn){
let _list = list;
_list.forEach((x,i) => {
fn(x,i);
if(x.childrenList && x.childrenList.length){
dataRecursion(x.childrenList, fn);
}
})
}
//
function refreshDataSort(){
dataRecursion(dataSource.value, (x, i) => x.sort = i+1);
}
//
function createNoneData(){
let data = {
//ID
_id: randomString(32),
title: null,
sort: 0,
childrenList: [],
}
return data;
}
function stop(e) {
e?.stopPropagation();
}
function changeInput(e, pdata, key) {
let { target } = e;
let { value } = target;
pdata[key] = value;
}
function addOne(){
dataSource.value.push(createNoneData());
createMessage.success('添加标题成功!');
nextTick(() => {
refreshDataSort();
})
}
function delOne(e, one){
stop(e);
let index = dataSource.value.findIndex(x => x == one);
if(index == -1) return;
dataSource.value.splice(index, 1);
createMessage.success('删除标题成功!');
nextTick(() => {
refreshDataSort();
})
}
// function insertOne(index){
// dataSource.value.splice(index,0, createNoneData());
// }
//
function getBtnEle(e, className){
if(e){
//
if(e?.classList?.contains(className)){
return e;
} else {
//
return getBtnEle(e.parentElement, className);
}
// //
// if(!e.parentElement.classList.contains(className)){
// //
// console.log('111111',e.parentElement);
// }else{
// console.log('2222',e.parentElement);
// return e.parentElement;
// }
}
}
function addTwo(e, one){
let btn = getBtnEle(e.target, 'twoBtn');
if(btn == null){
console.error('出大事了!');
return;
}
let tab = null;
document.querySelectorAll('.maxDiv .box .ant-collapse-header').forEach(x => {
let twoBtn = x.querySelector('.twoBtn');
if(twoBtn == btn){
tab = x;
}
});
let ariaExpanded = tab.getAttribute('aria-expanded');
if(ariaExpanded == 'false') {
}else{
stop(e);
}
if(one.childrenList){
one.childrenList.push(createNoneData());
}else{
one.childrenList = [ createNoneData() ];
}
createMessage.success('添加章节成功!');
nextTick(() => {
refreshDataSort();
})
}
function delTwo(e, one, two){
stop(e);
let index = one.childrenList.findIndex(x => x == two);
if(index == -1) return;
one.childrenList.splice(index, 1);
createMessage.success('删除章节成功!');
nextTick(() => {
refreshDataSort();
})
}
// function insertTwo(one, index){
// one.childrenList.splice(index,0, createNoneData());
// }
function addThree(e, two, type){
stop(e);
let data = createNoneData();
delete data.title;
data.type = type;
data.richText = null;
data.filePath = null;
if(two.childrenList){
two.childrenList.push(data);
}else{
two.childrenList = [ data ];
}
createMessage.success('新增成功!');
nextTick(() => {
refreshDataSort();
})
}
function delThree(e, two, three){
stop(e);
let index = two.childrenList.findIndex(x => x == three);
if(index == -1) return;
two.childrenList.splice(index, 1);
createMessage.success('删除成功!');
nextTick(() => {
refreshDataSort();
})
}
//,
function endDraggable(){
//
isNotMove.value = false;
nextTick(() => {
isNotMove.value = true;
refreshDataSort();
})
}
//
// function chooseDraggable(){
// // isNotMove.value = false;
// }
//
// function unchooseDraggable(){
// // isNotMove.value = true;
// }
// function onAddFn() { console.log('onAddFn'); }
// function onRemoveFn() { console.log('onRemoveFn'); }
// function onUpdateFn() { console.log('onUpdateFn'); }
// function onChooseFn() { console.log('onChooseFn'); }
// function onUnchooseFn() { console.log('onUnchooseFn'); }
// function onSortFn() { console.log('onSortFn'); }
// function onFilterFn() { console.log('onFilterFn'); }
// function onCloneFn() { console.log('onCloneFn'); }
// function onMoveFn() { console.log('onMoveFn'); }
// //
// function moveDraggable() {
// console.log('move');
// isNotMove.value = false;
// }
async function save(){
saveLoading.value = true;
console.log(unref(dataSource));
let saveData = {
rwbh,
xqxn,
teachingUnitContentOneList: unref(dataSource),
}
if(!saveData.rwbh || !saveData.xqxn){
createMessage.error('无法保存!');
saveLoading.value = false;
return;
}else if(!saveData.teachingUnitContentOneList || !saveData.teachingUnitContentOneList.length){
createMessage.warn('请添加数据!');
saveLoading.value = false;
return;
}
await editAll(saveData);
saveLoading.value = false;
}
loadData();
</script>
<style lang="less" scoped>
.max {
height: calc(-142px + 100vh);
min-height: calc(-142px + 100vh);
max-height: calc(-142px + 100vh);
overflow: hidden;
.maxDiv {
height: calc(-170px + 100vh);
overflow-y: auto;
}
}
.box {
margin: .5rem 0 0 0;
.itemTop {
width: 100%;
}
}
.topButton {
padding-top: 10px;
}
.ainput {
width: 100%;
}
.ainputNoEdit {
border: #d9d9d9 solid 1px;
}
.inputd {
width: calc(100% - 35px);
}
.topDiv {
width: 100%;
display: flex;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: center;
}
.twoInputd {
width: calc(100% - 45px);
}
.twoTopDiv {
width: 100%;
}
.richText {
max-height: 400px;
overflow: auto;
}
:deep(.maxDiv) .ant-collapse-header{
align-items: center;
}
</style>

View File

@ -158,7 +158,7 @@ export const formSchema: FormSchema[] = [
},
},
{
label: '网通过率',
label: '通过率',
field: 'wwtgl',
component: 'InputNumber',
dynamicRules: ({model,schema}) => {

View File

@ -6,7 +6,7 @@
<a-row :gutter="24">
<a-col :lg="8">
<a-form-item label="作业名称">
<a-input placeholder="请输入作业名称" v-model:value="queryParam.title"></a-input>
<j-input placeholder="请输入作业名称" v-model:value="queryParam.title"></j-input>
</a-form-item>
</a-col>
<a-col :lg="8">
@ -65,6 +65,7 @@
import { downloadFile } from '/@/utils/common/renderUtils';
import ZyInfoModal from './components/ZyInfoModal.vue'
import { useMessage } from "/@/hooks/web/useMessage";
import { JInput } from '/@/components/Form';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue';
import { defHttp } from '/@/utils/http/axios';

View File

@ -6,7 +6,7 @@
<a-row :gutter="24">
<a-col :lg="8">
<a-form-item label="作业名称">
<a-input placeholder="请输入作业名称" v-model:value="queryParam.title"></a-input>
<j-input placeholder="请输入作业名称" v-model:value="queryParam.title"></j-input>
</a-form-item>
</a-col>
<!-- <a-col :lg="8">
@ -84,6 +84,7 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
import { useRouter } from 'vue-router';
import { JInput } from '/@/components/Form';
import ZyInfoModal from './components/ZyInfoModal.vue';
import ZyInfoStudentListModal from '/@/views/zy/zyInfoStudent/ZyInfoStudentListModal.vue';
import ZyInfoStudentModal from '/@/views/zy/zyInfoStudent/components/ZyInfoStudentModal.vue';

View File

@ -40,7 +40,11 @@
</a-col>
<a-col :span="12">
<a-form-item label="网络通过率" v-bind="validateInfos.wwtgl">
<a-input-number v-model:value="formData.wwtgl" placeholder="请输入网络通过率" style="width: 100%" :disabled="disabled"/>
<a-input-number v-model:value="formData.wwtgl" placeholder="请输入网络通过率" style="width: 100%" :disabled="disabled">
<template #addonAfter>
%
</template>
</a-input-number>
</a-form-item>
</a-col>
@ -52,7 +56,11 @@
</a-col>
<a-col :span="12">
<a-form-item label="课程内通过率" v-bind="validateInfos.nwtgl">
<a-input-number v-model:value="formData.nwtgl" placeholder="请输入课程内通过率" style="width: 100%" :disabled="disabled"/>
<a-input-number v-model:value="formData.nwtgl" placeholder="请输入课程内通过率" style="width: 100%" :disabled="disabled">
<template #addonAfter>
%
</template>
</a-input-number>
</a-form-item>
</a-col>
<a-col :span="12">
@ -63,7 +71,11 @@
</a-col>
<a-col :span="12">
<a-form-item label="Aigc通过率" v-bind="validateInfos.aigctgl">
<a-input-number v-model:value="formData.aigctgl" placeholder="请输入Aigc通过率" style="width: 100%" :disabled="disabled"/>
<a-input-number v-model:value="formData.aigctgl" placeholder="请输入Aigc通过率" style="width: 100%" :disabled="disabled">
<template #addonAfter>
%
</template>
</a-input-number>
</a-form-item>
</a-col>
</a-row>
@ -189,7 +201,7 @@
if(model.wwcc=='1'){
if(!model.wwtgl){
createMessage.warning('网通过率不能为空');
createMessage.warning('通过率不能为空');
confirmLoading.value = false;
return;
}

View File

@ -0,0 +1,189 @@
<template>
<div style="margin-top:10px;background:#fff;">
<!--查询区域-->
<div class="jeecg-basic-table-form-container" >
<a-form @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="8" style="margin-top:10px;">
<a-form-item label="标题">
<j-input placeholder="请输入标题" v-model:value="queryParam.title"></j-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24" style="margin-top:10px;">
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
</a-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<a-row style="width:100%;display: block;padding:10px;min-height: 300px">
<a-col :span="24" v-for="(item,index) in dataSource" :key="index">
<!-- <a-card> -->
<a-row>
<a-col :span="24">
<span style="float: left;">{{index+1}}.{{item.title}}</span>
<span style="float: right;">
<a title="详情" @click="handleDetail(item)"><Icon icon="ant-design:snippets-outlined" /></a>
</span>
</a-col>
<a-col :span="24" v-if="item.picPath.length > 0">
<j-upload v-model:value="item.picPath" fileType="image" :isImageMode="false" :maxCount="1" :buttonVisible="false" disabled="true"></j-upload>
</a-col>
<a-col :span="24" v-if="item.filePath.length > 0">
<j-upload v-model:value="item.filePath" :maxCount="1" :buttonVisible="false" disabled="true"></j-upload>
</a-col>
</a-row>
<!-- <a-divider style="height: 1px; background-color: #7cb305" /> -->
<a-divider style="border-color: #7cb305" dashed />
<!-- </a-card> -->
</a-col>
<a-col :span="24" v-show="dataSource.length>0">
<a-pagination v-model="current" :total="total" @change="handlePageChange" :pageSize="pageSize" style="text-align: right;"/>
</a-col>
<a-col :span="24" v-show="dataSource.length==0">
<a-empty/>
</a-col>
</a-row>
<ZyTlqModal ref="registerModal" @success="handleSuccess" ></ZyTlqModal>
</div>
</template>
<script lang="ts" name="zyTlq-zyTlq" setup>
import { ref, reactive, onMounted, unref } from 'vue';
import { columns } from './ZyTlq.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZyTlq.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import ZyTlqModal from './components/ZyTlqModal.vue'
import { Pagination, Empty } from 'ant-design-vue';
import { defHttp } from '/@/utils/http/axios';
import { useRouter } from 'vue-router';
import { JInput } from '/@/components/Form';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const dataSource = ref<any>([]);
const current = ref<number>(0);
const total = ref<number>(0);
const pageNo = ref<number>(0);
const pageSize = ref<number>(3);
const APagination = Pagination;
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { rwbh,xqxn } = query;//
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 16 },
});
/**
* 发布
*/
function handleFabu(record) {
defHttp.post({ url: '/zyTlq/zyTlq/edit', params: { id: record.id,sffb: "6" } }).then(res => {
total.value = 1;
pageNo.value = 0;
loadData(1);
});
}
//
function handlePageChange(page: number) {
loadData(page);
}
/**
* 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
registerModal.value.disableSubmit = false;
registerModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
var url = "/site/dqkcTlqjh?id="+record.id;
window.open(url,"_blank")
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({ id: record.id }, handleSuccess);
}
/**
* 成功回调
*/
function handleSuccess() {
loadData(1);
}
/**
* 查询
*/
function searchQuery() {
loadData(1);
}
/**
* 重置
*/
function searchReset() {
queryParam.value = {};
//
loadData(1);
}
function loadData(arg){
defHttp.get({ url: '/zyTlq/zyTlq/list', params: { pageSize: 3,pageNo:arg, rwbh:rwbh,xqxn:xqxn,sffb:'1',column:'createTime',order:'desc' } }).then((res) => {
console.log(`🚀 ~ defHttp.get ~ res:`, res)
dataSource.value = res.records;
total.value = res.total;
});
}
//
onMounted(() => {
loadData(1);
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
</style>

View File

@ -16,23 +16,27 @@
</a-row>
<a-divider style="border-color: #7cb305" dashed />
</div>
<div style="width:98%;" v-for="index in 0">
<div style="width:98%;" v-for="(item,index) in dataSource">
<a-comment style="padding: 20px;">
<template #author>Han Solo</template>
<template #author>{{item.studentName}}</template>
<template #datetime>
<span>{{dayjs().format('YYYY-MM-DD HH:mm:ss')}}</span>
<span>{{item.createTime}}</span>
</template>
<template #content>
<p>
We supply a series of design principles, practical patterns and high quality design
resources (Sketch and Axure), to help people create their product prototypes beautifully and
efficiently.
{{item.content}}
</p>
<p v-if="item.picPath" style="margin-top: 20px;">
<j-upload v-model:value="item.picPath" fileType="image" :isImageMode="false" :maxCount="1" :buttonVisible="false" disabled="true" style="width:300px;"></j-upload>
</p>
<p v-if="item.filePath" style="margin-top: 20px;">
<j-upload v-model:value="item.filePath" :maxCount="1" :buttonVisible="false" disabled="true" ></j-upload>
</p>
</template>
</a-comment>
<a-divider style="border-color: #7cb305" dashed />
</div>
<div style="padding: 20px;background: #fafafa">
<div style="padding: 40px;background: #fafafa">
<a-row>
<a-col :span="24">
<div style="font-size: 18px;font-weight: 700;">发表内容</div>
@ -46,10 +50,10 @@
</a-col>
<a-col :span="12">
<div style="font-size: 18px;font-weight: 700;">附件</div>
<div><j-upload v-model:value="formData.picPath" :maxCount="9" ></j-upload></div>
<div><j-upload v-model:value="formData.filePath" :maxCount="9" ></j-upload></div>
</a-col>
<a-col :span="24">
<a-button type="primary">发表</a-button>
<a-button type="primary" @click="submitForm">发表</a-button>
</a-col>
</a-row>
</div>
@ -125,18 +129,25 @@ dayjs.extend(relativeTime);
console.log(`🚀 ~ awaitdefHttp.get ~ res:`, res)
tlqInfo.value = res;
});
// loadData(1)
}
async function loadData(arg){
await defHttp.get({ url: '/zyTlqContent/zyTlqContent/list', params: { pageSize: pageSize,pageNo:arg, mainId:id,column:'createTime',order:'desc' } }).then((res) => {
function loadData(arg){
defHttp.get({ url: '/zyTlqContent/zyTlqContent/list', params: { mainId:id+"",column:'createTime',order:'desc' } }).then((res) => {
console.log(`🚀 ~ defHttp.get ~ res:`, res)
dataSource.value = res.records;
total.value = res.total;
});
}
function submitForm(){
formData.value.mainId = id;
defHttp.post({ url: '/zyTlqContent/zyTlqContent/add', params: formData.value}).then((res) => {
loadData(1);
});
}
//
onMounted(() => {
getTlqInfo();
loadData(1);
});
@ -203,4 +214,17 @@ dayjs.extend(relativeTime);
margin: 0 8px 8px 0;
vertical-align: top;
}
/deep/.ant-upload.ant-upload-select-picture-card {
width: 80px;
height: 80px;
margin-right: 8px;
margin-bottom: 8px;
text-align: center;
vertical-align: top;
background-color: #fafafa;
border: 1px dashed #d9d9d9;
border-radius: 2px;
cursor: pointer;
transition: border-color 0.3s;
}
</style>

View File

@ -0,0 +1,230 @@
<template>
<div id="siteMain">
<div id="maxSite">
<a-layout style="height: calc(100vh - 30px)">
<headerPage/>
<div style="margin-top:10px;background:#fff;">
<div style="padding: 20px;width: 98%;">
<a-row>
<a-col :span="24"><span style="line-height:20px;font-size:18px;font-weight:bold;">{{tlqInfo.title}}</span></a-col>
<a-col :span="24" v-if="tlqInfo.picPath" style="margin-top:20px;">
<j-upload v-model:value="tlqInfo.picPath" fileType="image" :isImageMode="false" :maxCount="1" :buttonVisible="false" disabled="true" style="width:300px;"></j-upload>
</a-col>
<a-col :span="24" v-if="tlqInfo.filePath" style="margin-top:20px;">
<j-upload v-model:value="tlqInfo.filePath" :maxCount="1" :buttonVisible="false" disabled="true"></j-upload>
</a-col>
</a-row>
<a-divider style="border-color: #7cb305" dashed />
</div>
<div style="width:98%;" v-for="(item,index) in dataSource">
<a-comment style="padding: 20px;">
<template #author>{{item.studentName}}</template>
<template #datetime>
<span>{{item.createTime}}</span>
</template>
<template #content>
<p>
{{item.content}}
</p>
<p v-if="item.picPath" style="margin-top: 20px;">
<j-upload v-model:value="item.picPath" fileType="image" :isImageMode="false" :maxCount="1" :buttonVisible="false" disabled="true" style="width:300px;"></j-upload>
</p>
<p v-if="item.filePath" style="margin-top: 20px;">
<j-upload v-model:value="item.filePath" :maxCount="1" :buttonVisible="false" disabled="true" ></j-upload>
</p>
</template>
</a-comment>
<a-divider style="border-color: #7cb305" dashed />
</div>
<div style="padding: 40px;background: #fafafa">
<a-row>
<a-col :span="24">
<div style="font-size: 18px;font-weight: 700;">发表内容</div>
<div><a-textarea v-model:value="formData.content" style="height: 100px"></a-textarea></div>
</a-col>
<a-col :span="12">
<div style="font-size: 18px;font-weight: 700;">图片</div>
<div>
<j-upload v-model:value="formData.picPath" fileType="image" :maxCount="9" ></j-upload>
</div>
</a-col>
<a-col :span="12">
<div style="font-size: 18px;font-weight: 700;">附件</div>
<div><j-upload v-model:value="formData.filePath" :maxCount="9" ></j-upload></div>
</a-col>
<a-col :span="24">
<a-button type="primary" @click="submitForm">发表</a-button>
</a-col>
</a-row>
</div>
</div>
<footerPage style="margin-top:10px;"/>
</a-layout>
</div>
</div>
</template>
<script lang="ts" name="zyTlq-zyTlq" setup>
import { ref, reactive, onMounted, unref ,defineComponent } from 'vue';
import { Pagination, Empty } from 'ant-design-vue';
import { defHttp } from '/@/utils/http/axios';
import { useRouter } from 'vue-router';
import { LikeFilled, LikeOutlined, DislikeFilled, DislikeOutlined } from '@ant-design/icons-vue';
import headerPage from '/@/views/site/common/header.vue';
import footerPage from '/@/views/site/common/footer.vue';
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import { Comment } from 'ant-design-vue';
dayjs.extend(relativeTime);
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const dataSource = ref<any>([]);
const tlqInfo = ref<any>({});
const formData = ref<any>({});
const current = ref<number>(0);
const total = ref<number>(0);
const pageNo = ref<number>(0);
const pageSize = ref<number>(50);
const APagination = Pagination;
const AComment = Comment;
const { currentRoute } = useRouter();
const { query } = unref(currentRoute);
const { id } = query;//
const labelCol = reactive({
xs: { span: 24 },
sm: { span: 7 },
});
const wrapperCol = reactive({
xs: { span: 24 },
sm: { span: 4 },
});
const likes = ref<number>(0);
const dislikes = ref<number>(0);
const action = ref<string>();
const like = () => {
likes.value = 1;
dislikes.value = 0;
action.value = 'liked';
};
const dislike = () => {
likes.value = 0;
dislikes.value = 1;
action.value = 'disliked';
};
//
function handlePageChange(page: number) {
loadData(page);
}
async function getTlqInfo(){
await defHttp.get({ url: '/zyTlq/zyTlq/queryById', params: { id:id }}).then((res) => {
console.log(`🚀 ~ awaitdefHttp.get ~ res:`, res)
tlqInfo.value = res;
});
}
function loadData(arg){
defHttp.get({ url: '/zyTlqContent/zyTlqContent/list', params: { mainId:id+"",column:'createTime',order:'desc' } }).then((res) => {
console.log(`🚀 ~ defHttp.get ~ res:`, res)
dataSource.value = res.records;
total.value = res.total;
});
}
function submitForm(){
formData.value.mainId = id;
defHttp.post({ url: '/zyTlqContent/zyTlqContent/add', params: formData.value}).then((res) => {
loadData(1);
});
}
//
onMounted(() => {
getTlqInfo();
loadData(1);
});
</script>
<style lang="less" scoped>
#siteMain {
// font-size: ;
// height: 100%;
background: #f3f3f4;
#maxSite {
//
max-width: 1070px;
min-height: calc(100vh);
//
margin: 0 auto;
.rowGutter{
margin-top: 1rem;
margin-bottom: 1rem;
}
.ant-layout-header {
color: #fff;
background: #1ab394;
}
.ant-layout-footer {
line-height: 1.5;
background: #FFF;
}
.ant-layout-sider {
color: #fff;
line-height: 120px;
background: #3ba0e9;
}
.ant-layout-content {
min-height: 120px;
color: #000;
line-height: 120px;
background: #f3f3f4;
}
}
}
.jeecg-basic-table-form-container {
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
}
/deep/.ant-upload-list-picture-card-container {
display: inline-block;
width: 80px;
height: 80px;
margin: 0 8px 8px 0;
vertical-align: top;
}
/deep/.ant-upload.ant-upload-select-picture-card {
width: 80px;
height: 80px;
margin-right: 8px;
margin-bottom: 8px;
text-align: center;
vertical-align: top;
background-color: #fafafa;
border: 1px dashed #d9d9d9;
border-radius: 2px;
cursor: pointer;
transition: border-color 0.3s;
}
</style>

View File

@ -98,7 +98,7 @@
* 发布
*/
function handleFabu(record) {
defHttp.post({ url: '/zyTlq/zyTlq/edit', params: { id: record.id,sffb: "6" } }).then(res => {
defHttp.post({ url: '/zyTlq/zyTlq/edit', params: { id: record.id,sffb: "1" } }).then(res => {
total.value = 1;
pageNo.value = 0;
loadData(1);