更新功能

This commit is contained in:
yangjun 2024-08-01 16:33:04 +08:00
parent fa77f0c470
commit 7f2aa6df5c
8 changed files with 608 additions and 64 deletions

View File

@ -78,6 +78,24 @@ const site: AppRouteModule = {
title: '公开课',
},
},
{
path: 'teacherYiyueMore',
name: 'teacherYiyueMore',
component: () => import('/@/views/site/studentWdkc/teacherYiyueMore.vue'),
meta: {
// affix: true,
title: '教师已读',
},
},
{
path: 'studentYiyueMore',
name: 'studentYiyueMore',
component: () => import('/@/views/site/studentWdkc/studentYiyueMore.vue'),
meta: {
// affix: true,
title: '学生已读',
},
},
{
path: 'ktsbMore',
name: 'ktsbMore',

View File

@ -147,11 +147,6 @@
* 操作栏
*/
function getTableAction(record) {
// <a-button type="primary" @click="handleDj(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.flag=='-1'"></a-button>
// <a-button type="primary" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);color:#ffffff" v-if="item.flag=='0'" disabled></a-button>
// <a-button type="primary" @click="handleDjjg(item)" style="margin-left:5px;padding: 0px 8px;background:rgb(28, 132, 198);" v-if="item.flag=='1'"></a-button>
if(record.flag == '-1'){
var list = [
{

View File

@ -3,12 +3,58 @@
<div style="margin-top: 20px;">
<span style="margin-left: 30px;font-size: 24px;font-weight: 600;">工作台</span>
</div>
<div style="min-height:70px;">
<a-tabs v-model:activeKey="activeKey" style="padding: 10px;">
<a-tab-pane key="1" tab="未读">
<div style="min-height:70px;">
<a-row>
<a-col :span="24" style="padding: 0 10px;margin-bottom: 10px;" v-for="(item,index2) in dataSource" :key="index2">
<a-row style="margin-top: 15px;">
<a-col :span="22" style="text-align:left;padding-left:15px;">
<div style="margin-top: 5px;">{{index2+1}}{{item.content}}</div>
</a-col>
<a-col :span="2" style="text-align:right">
<a-button type="primary" @click="openKecheng(item)" style="margin-left:10px;">查看</a-button>
</a-col>
</a-row>
</a-col>
<a-col :span="24" v-show="dataSource.length == 0" style="text-align: center;">
<span style="line-height:60px;">暂无提醒</span>
</a-col>
</a-row>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="已读" force-render>
<div style="width: 100%; text-align: right; ">
<RouterLink target='_blank' to="/site/studentYiyueMore">查看更多</RouterLink>
</div>
<div style="min-height:70px;">
<a-row>
<a-col :span="24" style="padding: 0 10px;margin-bottom: 10px;" v-for="(item,index2) in dataYySource" :key="index2">
<a-row style="margin-top: 15px;">
<a-col :span="22" style="text-align:left;padding-left:15px;">
<div style="margin-top: 5px;">{{index2+1}}{{item.content}}</div>
</a-col>
<a-col :span="2" style="text-align:right">
<a-button type="primary" @click="openKecheng(item)" style="margin-left:10px;">已读</a-button>
</a-col>
</a-row>
</a-col>
<a-col :span="24" v-show="dataYySource.length == 0" style="text-align: center;">
<span style="line-height:60px;">暂无提醒</span>
</a-col>
</a-row>
</div>
</a-tab-pane>
</a-tabs>
<!-- <div style="min-height:70px;">
<a-row>
<a-col :span="24" style="padding: 0 10px;margin-bottom: 10px;" v-for="(item,index2) in dataSource" :key="index2">
<a-row style="margin-top: 15px;">
<a-col :span="18" style="text-align:left;padding-left:15px;">
<!-- {{item.content}} -->
<div>{{index2+1}}{{item.content}}</div>
</a-col>
<a-col :span="6" style="text-align:right">
@ -18,11 +64,10 @@
</a-row>
</a-col>
<a-col :span="24" v-show="dataSource.length == 0" style="text-align: center;">
<!-- <a-empty/> -->
<span>暂无通知</span>
</a-col>
</a-row>
</div>
</div> -->
</div>
</template>
@ -34,6 +79,8 @@ import { getSysConfig } from '/@/views/site/utils/index';
import { useUserStore } from '/@/store/modules/user';
const userStore = useUserStore();
const dataSource = ref([]);
const dataYySource = ref([]);
const activeKey = ref('1');
//
onMounted(() => {
loaddata()
@ -42,9 +89,17 @@ onMounted(() => {
}, 60*1000);
});
function loaddata(){
defHttp.get({ url: '/zyDbtx/zyDbtx/list',params:{pageSize:10,pageNo:1,createBy:userStore.getUserInfo.username} }).then((res) => {
// defHttp.get({ url: '/zyDbtx/zyDbtx/list',params:{pageSize:10,pageNo:1,createBy:userStore.getUserInfo.username} }).then((res) => {
// dataSource.value = res.records;
// });
defHttp.get({ url: '/zyDbtx/zyDbtx/list',params:{pageSize:10,pageNo:1,createBy:userStore.getUserInfo.username,flag:'0'} }).then((res) => {
dataSource.value = res.records;
});
defHttp.get({ url: '/zyDbtx/zyDbtx/list',params:{pageSize:10,pageNo:1,createBy:userStore.getUserInfo.username,flag:'1'} }).then((res) => {
dataYySource.value = res.records;
});
}
function openKecheng(record){

View File

@ -0,0 +1,216 @@
<template>
<div id="siteMain">
<div id="maxSite">
<a-layout>
<!-- 页头 -->
<headerPage />
<!-- 主体部分 -->
<a-layout-content>
<a-card class="rowGutter" id="jcgkkDom">
<template #title>
<div style="font-size: 24px; font-weight: bold">教师已阅信息</div>
</template>
<a-row :gutter="[16, 16]" style="margin-top: 20px">
<a-col v-for="(item, index) in listData" :key="index" :span="24">
<a-row style="margin-top: 15px">
<a-col :span="22" style="text-align: left; padding-left: 15px">
<div style="margin-top: 5px">{{ index + 1 }}{{ item.content }}</div>
</a-col>
<a-col :span="2" style="text-align: right">
<a-button type="primary" @click="openKecheng(item)" style="margin-left: 10px">已读</a-button>
</a-col>
</a-row>
</a-col>
<a-col v-if="listData.length > 0">
<a-pagination v-model:current="pageNo" size="small" :total="current" show-quick-jumper @change="onPageChange" />
</a-col>
<a-col :span="24" style="line-height: 50px" v-if="listData.length == 0">
<div style="text-align: center"> 暂无数据 </div>
</a-col>
</a-row>
</a-card>
</a-layout-content>
<!-- 页尾 -->
<footerPage />
</a-layout>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { dateFormat } from '/@/utils/common/compUtils';
import { Image as AImage } from 'ant-design-vue';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { useMessage } from '/@/hooks/web/useMessage';
import { useUserStore } from '/@/store/modules/user';
import headerPage from '/@/views/site/common/header.vue';
import footerPage from '/@/views/site/common/footer.vue';
import { JDictSelectTag, JInput } from '/@/components/Form';
import { getSysConfig } from '/@/views/site/utils/index';
import { Pagination } from 'ant-design-vue';
const APagination = Pagination;
const userStore = useUserStore();
let listData = ref<any>([]);
const list = (params) => defHttp.get({ url: '/zyDbtx/zyDbtx/list', params });
const { createMessage } = useMessage();
const queryParam = ref<any>({});
const pageNo = ref(1);
let current = 0;
async function onPageChange() {
console.log('onPageChange', pageNo.value);
await loadData();
}
function openKecheng(record) {
var url = '/zy/zuoyeMain';
if (record.type == '5') {
//
url = '/zy/dqkcDqzy';
} else if (record.type == '6') {
//
url = '/zy/ceshiWenjuan';
} else if (record.type == '7') {
//
url = '/zy/dcwjWenjuan';
}
url = url + '?rwbh=' + record.rwbh + '&xqxn=' + getSysConfig().flag1 + '&teano=' + record.fbr;
window.open(url, '_blank');
}
//
onMounted(() => {
loadData();
});
/**
* 加载数据
*/
function loadData() {
queryParam.value.pageSize = 10;
queryParam.value.pageNo = pageNo;
queryParam.value.createBy = userStore.getUserInfo.username;
queryParam.value.flag = '1'
listData.value = [];
list(queryParam.value).then((res) => {
console.log('🤞', res);
var list = res.records;
listData.value = list;
current = res.total;
});
}
</script>
<style lang="less" scoped>
.ggkTimeClass {
display: inline-block;
width: 90%;
margin-bottom: 10px;
margin-left: 12px;
padding: 0 15px;
height: 40px;
font-size: 16px;
font-weight: 500;
line-height: 39px;
border-radius: 36px;
background-color: #f3f3f3;
text-align: center;
}
.ggkTitle {
line-height: 2rem;
font-size: 18px;
font-weight: 600;
color: black;
}
.ggkTwoTitle {
color: black;
font-size: 14px;
line-height: 25px;
}
.ggkThreeTitle {
font-size: 16px;
color: #337ab7;
font-weight: 700;
line-height: 50px;
}
.ggkFourTitle {
line-height: 40px;
color: black;
}
.ggkButton {
width: 100%;
height: 40px;
background: #1c84c6;
color: #fff;
font-weight: 600;
font-size: 18px;
border-radius: 5px;
line-height: 37px;
}
.ggkCcxs {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.redImgClass {
background: linear-gradient(45deg, #b23d59, #d3718a);
}
.blueImgClass {
background: linear-gradient(45deg, #53637a, #8590a6);
}
.greenImgClass {
background: linear-gradient(45deg, #7999fc, #79bdfc);
}
#siteMain {
// font-size: ;
// height: 100%;
background: #f3f3f4;
#maxSite {
//
max-width: 1170px;
//
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;
}
.dictBox :deep(.ant-select) {
width: 100%;
}
}
}
/**暗黑模式特殊配色*/
[data-theme='dark'] #siteMain #maxSite {
.ant-layout-header,
.ant-layout-footer {
background: #6aa0c7;
}
.ant-layout-content {
background: #107bcb;
}
.ant-layout-sider {
background: #3499ec;
}
}
</style>

View File

@ -1,79 +1,123 @@
<template>
<div class="indexBackClass" id="stuwdkcDom">
<div style="margin-top: 20px;">
<span style="margin-left: 30px;font-size: 24px;font-weight: 600;">提醒信息</span>
<div style="margin-top: 20px">
<span style="margin-left: 30px; font-size: 24px; font-weight: 600">提醒信息</span>
</div>
<div style="min-height:70px;">
<a-row>
<a-col :span="24" style="padding: 0 10px;margin-bottom: 10px;" v-for="(item,index2) in dataSource" :key="index2">
<a-row style="margin-top: 15px;">
<a-col :span="18" style="text-align:left;padding-left:15px;">
<div>{{index2+1}}{{item.content}}</div>
<a-tabs v-model:activeKey="activeKey" style="padding: 10px">
<a-tab-pane key="1" tab="未读">
<div style="min-height: 70px">
<a-row>
<a-col :span="24" style="padding: 0 10px; margin-bottom: 10px" v-for="(item, index2) in dataSource" :key="index2">
<a-row style="margin-top: 15px">
<a-col :span="22" style="text-align: left; padding-left: 15px">
<div style="margin-top: 5px">{{ index2 + 1 }}{{ item.content }}</div>
</a-col>
<a-col :span="2" style="text-align: right">
<a-button type="primary" @click="openKecheng(item)" style="margin-left: 10px">查看</a-button>
</a-col>
</a-row>
</a-col>
<a-col :span="6" style="text-align:right">
<span>提醒时间{{item.createTime}}</span>
<a-button type="primary" @click="openKecheng(item)" style="margin-left:10px;">查看</a-button>
<a-col :span="24" v-show="dataSource.length == 0" style="text-align: center">
<span style="line-height: 60px">暂无提醒</span>
</a-col>
</a-row>
</a-col>
<a-col :span="24" v-show="dataSource.length == 0" style="text-align: center;">
<span style="line-height:60px;">暂无提醒</span>
</a-col>
</a-row>
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="已读" force-render>
<div style="width: 100%; text-align: right; ">
<RouterLink target='_blank' to="/site/teacherYiyueMore">查看更多</RouterLink>
</div>
<div style="min-height: 70px">
<a-row>
<a-col :span="24" style="padding: 0 10px; margin-bottom: 10px" v-for="(item, index2) in dataYySource" :key="index2">
<a-row style="margin-top: 15px">
<a-col :span="22" style="text-align: left; padding-left: 15px">
<div style="margin-top: 5px">{{ index2 + 1 }}{{ item.content }}</div>
</a-col>
<a-col :span="2" style="text-align: right">
<a-button type="primary" @click="openKecheng(item)" style="margin-left: 10px">已读</a-button>
</a-col>
</a-row>
</a-col>
<a-col :span="24" v-show="dataYySource.length == 0" style="text-align: center">
<span style="line-height: 60px">暂无提醒</span>
</a-col>
</a-row>
</div>
</a-tab-pane>
</a-tabs>
</div>
</template>
<script lang="ts" setup>
import { defHttp } from '/@/utils/http/axios';
import { ref, onMounted } from 'vue';
import { ref, onMounted } from 'vue';
import { getSysConfig } from '/@/views/site/utils/index';
//
import { useUserStore } from '/@/store/modules/user';
const userStore = useUserStore();
const dataSource = ref([]);
//
const dataYySource = ref([]);
const activeKey = ref('1');
//
onMounted(() => {
loaddata()
loaddata();
setInterval(() => {
loaddata()
}, 60*1000);
loaddata();
}, 60 * 1000);
});
function loaddata(){
defHttp.get({ url: '/zyDbtx/zyDbtx/list',params:{pageSize:10,pageNo:1,createBy:userStore.getUserInfo.username} }).then((res) => {
dataSource.value = res.records;
});
function loaddata() {
defHttp
.get({ url: '/zyDbtx/zyDbtx/list', params: { pageSize: 10, pageNo: 1, createBy: userStore.getUserInfo.username, flag: '0' } })
.then((res) => {
dataSource.value = res.records;
});
defHttp
.get({ url: '/zyDbtx/zyDbtx/list', params: { pageSize: 10, pageNo: 1, createBy: userStore.getUserInfo.username, flag: '1' } })
.then((res) => {
dataYySource.value = res.records;
});
}
function openKecheng(record){
console.log(`🚀 ~ openKecheng ~ record:`, record)
defHttp.post({ url: '/zyDbtx/zyDbtx/deleteById',params:{id:record.id} }).then((res) => {
loaddata()
function handleMore() {
console.log('111111111111');
}
function openKecheng(record) {
console.log(`🚀 ~ openKecheng ~ record:`, record);
defHttp.post({ url: '/zyDbtx/zyDbtx/deleteById', params: { id: record.id } }).then((res) => {
loaddata();
});
var url = "/zy/zuoyeMain";
if(record.type=='5'){//
url = "/zy/dqkcDqzy";
}else if(record.type=='6'){//
url = "/zy/ceshiWenjuan";
}else if(record.type=='7'){//
url = "/zy/dcwjWenjuan";
var url = '/zy/zuoyeMain';
if (record.type == '5') {
//
url = '/zy/dqkcDqzy';
} else if (record.type == '6') {
//
url = '/zy/ceshiWenjuan';
} else if (record.type == '7') {
//
url = '/zy/dcwjWenjuan';
}
url = url +"?rwbh="+record.rwbh+"&xqxn="+getSysConfig().flag1+"&teano="+record.fbr;
window.open(url,'_blank')
url = url + '?rwbh=' + record.rwbh + '&xqxn=' + getSysConfig().flag1 + '&teano=' + record.fbr;
window.open(url, '_blank');
}
</script>
<style lang="less" scoped>
.indexBackClass{
.indexBackClass {
background: #fff;
margin: 20px 0;
padding-bottom: 20px;
}
.jtkcTitleClass{
background-image: linear-gradient(to right ,#1c84c6, #67b4e5);
.jtkcTitleClass {
background-image: linear-gradient(to right, #1c84c6, #67b4e5);
color: white;
line-height: 30px;
padding: 3px 0 0 10px;

View File

@ -0,0 +1,216 @@
<template>
<div id="siteMain">
<div id="maxSite">
<a-layout>
<!-- 页头 -->
<headerPage />
<!-- 主体部分 -->
<a-layout-content>
<a-card class="rowGutter" id="jcgkkDom">
<template #title>
<div style="font-size: 24px; font-weight: bold">教师已阅信息</div>
</template>
<a-row :gutter="[16, 16]" style="margin-top: 20px">
<a-col v-for="(item, index) in listData" :key="index" :span="24">
<a-row style="margin-top: 15px">
<a-col :span="22" style="text-align: left; padding-left: 15px">
<div style="margin-top: 5px">{{ index + 1 }}{{ item.content }}</div>
</a-col>
<a-col :span="2" style="text-align: right">
<a-button type="primary" @click="openKecheng(item)" style="margin-left: 10px">已读</a-button>
</a-col>
</a-row>
</a-col>
<a-col v-if="listData.length > 0">
<a-pagination v-model:current="pageNo" size="small" :total="current" show-quick-jumper @change="onPageChange" />
</a-col>
<a-col :span="24" style="line-height: 50px" v-if="listData.length == 0">
<div style="text-align: center"> 暂无数据 </div>
</a-col>
</a-row>
</a-card>
</a-layout-content>
<!-- 页尾 -->
<footerPage />
</a-layout>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
import { dateFormat } from '/@/utils/common/compUtils';
import { Image as AImage } from 'ant-design-vue';
import { getFileAccessHttpUrl } from '/@/utils/common/compUtils';
import { useMessage } from '/@/hooks/web/useMessage';
import { useUserStore } from '/@/store/modules/user';
import headerPage from '/@/views/site/common/header.vue';
import footerPage from '/@/views/site/common/footer.vue';
import { JDictSelectTag, JInput } from '/@/components/Form';
import { getSysConfig } from '/@/views/site/utils/index';
import { Pagination } from 'ant-design-vue';
const APagination = Pagination;
const userStore = useUserStore();
let listData = ref<any>([]);
const list = (params) => defHttp.get({ url: '/zyDbtx/zyDbtx/list', params });
const { createMessage } = useMessage();
const queryParam = ref<any>({});
const pageNo = ref(1);
let current = 0;
async function onPageChange() {
console.log('onPageChange', pageNo.value);
await loadData();
}
function openKecheng(record) {
var url = '/zy/zuoyeMain';
if (record.type == '5') {
//
url = '/zy/dqkcDqzy';
} else if (record.type == '6') {
//
url = '/zy/ceshiWenjuan';
} else if (record.type == '7') {
//
url = '/zy/dcwjWenjuan';
}
url = url + '?rwbh=' + record.rwbh + '&xqxn=' + getSysConfig().flag1 + '&teano=' + record.fbr;
window.open(url, '_blank');
}
//
onMounted(() => {
loadData();
});
/**
* 加载数据
*/
function loadData() {
queryParam.value.pageSize = 10;
queryParam.value.pageNo = pageNo;
queryParam.value.createBy = userStore.getUserInfo.username;
queryParam.value.flag = '1'
listData.value = [];
list(queryParam.value).then((res) => {
console.log('🤞', res);
var list = res.records;
listData.value = list;
current = res.total;
});
}
</script>
<style lang="less" scoped>
.ggkTimeClass {
display: inline-block;
width: 90%;
margin-bottom: 10px;
margin-left: 12px;
padding: 0 15px;
height: 40px;
font-size: 16px;
font-weight: 500;
line-height: 39px;
border-radius: 36px;
background-color: #f3f3f3;
text-align: center;
}
.ggkTitle {
line-height: 2rem;
font-size: 18px;
font-weight: 600;
color: black;
}
.ggkTwoTitle {
color: black;
font-size: 14px;
line-height: 25px;
}
.ggkThreeTitle {
font-size: 16px;
color: #337ab7;
font-weight: 700;
line-height: 50px;
}
.ggkFourTitle {
line-height: 40px;
color: black;
}
.ggkButton {
width: 100%;
height: 40px;
background: #1c84c6;
color: #fff;
font-weight: 600;
font-size: 18px;
border-radius: 5px;
line-height: 37px;
}
.ggkCcxs {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.redImgClass {
background: linear-gradient(45deg, #b23d59, #d3718a);
}
.blueImgClass {
background: linear-gradient(45deg, #53637a, #8590a6);
}
.greenImgClass {
background: linear-gradient(45deg, #7999fc, #79bdfc);
}
#siteMain {
// font-size: ;
// height: 100%;
background: #f3f3f4;
#maxSite {
//
max-width: 1170px;
//
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;
}
.dictBox :deep(.ant-select) {
width: 100%;
}
}
}
/**暗黑模式特殊配色*/
[data-theme='dark'] #siteMain #maxSite {
.ant-layout-header,
.ant-layout-footer {
background: #6aa0c7;
}
.ant-layout-content {
background: #107bcb;
}
.ant-layout-sider {
background: #3499ec;
}
}
</style>

View File

@ -641,10 +641,10 @@ function getTableAction(record) {
label: '撤回发布',
onClick: handleNoScoreFabu.bind(null, record),
},
{
label: '标记作业',
onClick: handleSzyb.bind(null, record),
},
// {
// label: '',
// onClick: handleSzyb.bind(null, record),
// },
{
label: '下载',
onClick: handleDown.bind(null, record.filePath),

View File

@ -150,12 +150,12 @@ export const newcolumns: BasicColumn[] = [
// sorter: true,
// },
{
title: '标记作业',
align: "center",
dataIndex: 'cdlx_dictText',
sorter: true,
},
// {
// title: '标记作业',
// align: "center",
// dataIndex: 'cdlx_dictText',
// sorter: true,
// },
];
//列表数据