dbsd_kczx/src/views/site/studentWdkc/studentDbtx.vue

154 lines
5.5 KiB
Vue
Raw Normal View History

2024-06-26 21:57:51 +08:00
<template>
<div class="indexBackClass" id="stuwdkcDom">
<div style="margin-top: 20px;">
<span style="margin-left: 30px;font-size: 24px;font-weight: 600;">工作台</span>
</div>
2024-08-01 16:33:04 +08:00
<a-tabs v-model:activeKey="activeKey" style="padding: 10px;">
2024-08-08 22:11:15 +08:00
<a-tab-pane key="1" tab="待办">
2024-08-02 14:48:20 +08:00
<div style="width: 100%; text-align: right; ">
<RouterLink target='_blank' to="/site/studentWeiduMore">查看更多</RouterLink>
</div>
2024-08-01 16:33:04 +08:00
<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>
2024-08-02 14:48:20 +08:00
<a-tab-pane key="2" force-render >
<template #tab>
<span style="color: black;">
2024-08-08 22:11:15 +08:00
已办
2024-08-02 14:48:20 +08:00
</span>
</template>
2024-08-01 16:33:04 +08:00
<div style="width: 100%; text-align: right; ">
2024-08-02 14:48:20 +08:00
<RouterLink target='_blank' to="/site/teacherYiyueMore">查看更多</RouterLink>
2024-08-01 16:33:04 +08:00
</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">
2024-08-12 09:14:57 +08:00
<a-button type="primary" @click="openKecheng(item)" style="margin-left:10px;">已办</a-button>
2024-08-01 16:33:04 +08:00
</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;">
2024-06-26 21:57:51 +08:00
<a-row>
2024-07-06 15:29:03 +08:00
<a-col :span="24" style="padding: 0 10px;margin-bottom: 10px;" v-for="(item,index2) in dataSource" :key="index2">
2024-06-26 21:57:51 +08:00
<a-row style="margin-top: 15px;">
<a-col :span="18" style="text-align:left;padding-left:15px;">
<div>{{index2+1}}{{item.content}}</div>
</a-col>
<a-col :span="6" style="text-align:right">
2024-07-06 15:29:03 +08:00
<span>提醒时间{{item.createTime}}</span>
<a-button type="primary" @click="openKecheng(item)" style="margin-left:10px;">查看</a-button>
2024-06-26 21:57:51 +08:00
</a-col>
</a-row>
</a-col>
<a-col :span="24" v-show="dataSource.length == 0" style="text-align: center;">
<span>暂无通知</span>
</a-col>
</a-row>
2024-08-01 16:33:04 +08:00
</div> -->
2024-06-26 21:57:51 +08:00
</div>
</template>
<script lang="ts" setup>
import { defHttp } from '/@/utils/http/axios';
import { ref, onMounted } from 'vue';
import { getSysConfig } from '/@/views/site/utils/index';
//用户相关
import { useUserStore } from '/@/store/modules/user';
const userStore = useUserStore();
const dataSource = ref([]);
2024-08-01 16:33:04 +08:00
const dataYySource = ref([]);
const activeKey = ref('1');
2024-06-26 21:57:51 +08:00
//进入就加载
onMounted(() => {
loaddata()
2024-07-06 15:29:03 +08:00
setInterval(() => {
loaddata()
}, 60*1000);
2024-06-26 21:57:51 +08:00
});
function loaddata(){
2024-08-01 16:33:04 +08:00
// defHttp.get({ url: '/zyDbtx/zyDbtx/list',params:{pageSize:10,pageNo:1,createBy:userStore.getUserInfo.username} }).then((res) => {
// dataSource.value = res.records;
// });
2024-08-02 14:48:20 +08:00
defHttp.get({ url: '/zyDbtx/zyDbtx/list',params:{pageSize:5,pageNo:1,createBy:userStore.getUserInfo.username,flag:'0'} }).then((res) => {
2024-06-26 21:57:51 +08:00
dataSource.value = res.records;
});
2024-08-01 16:33:04 +08:00
2024-08-02 14:48:20 +08:00
defHttp.get({ url: '/zyDbtx/zyDbtx/list',params:{pageSize:5,pageNo:1,createBy:userStore.getUserInfo.username,flag:'1'} }).then((res) => {
2024-08-01 16:33:04 +08:00
dataYySource.value = res.records;
});
2024-06-26 21:57:51 +08:00
}
function openKecheng(record){
2024-08-08 22:11:15 +08:00
//通知类型0发布作业 1评分 2测验 3问卷 4讨论 9通知公告
if(record.type=='9'||record.type=='4'||record.type=='1'){
defHttp.post({ url: '/zyDbtx/zyDbtx/deleteById',params:{id:record.id} }).then((res) => {
loaddata()
});
}
2024-06-26 21:57:51 +08:00
var url = "/stuzy/studentMain";
if(record.type=='0'||record.type=='1'){//当前作业+评分
url = "/stuzy/studentDqzy";
}else if(record.type=='2'){//测验消息
url = "/stuzy/stuCeshiWenjuan";
}else if(record.type=='3'){//问卷消息
url = "/stuzy/stuDcwjWenjuan";
}else if(record.type=='4'){//讨论区
url = "/stuzy/stuTlq";
}else if(record.type=='9'){//通知公告
url = "/stuzy/StudentGonggaoList";
}
url = url +"?rwbh="+record.rwbh+"&xqxn="+getSysConfig().flag1+"&teano="+record.fbr;
window.open(url,'_blank')
}
</script>
<style lang="less" scoped>
.indexBackClass{
background: #fff;
margin: 20px 0;
padding-bottom: 20px;
}
.jtkcTitleClass{
background-image: linear-gradient(to right ,#1c84c6, #67b4e5);
color: white;
line-height: 30px;
padding: 3px 0 0 10px;
font-weight: 600;
height: 30px;
}
</style>