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

136 lines
4.4 KiB
Vue
Raw Normal View History

2024-07-06 15:29:03 +08:00
<template>
<div class="indexBackClass" id="stuwdkcDom">
2024-08-01 16:33:04 +08:00
<div style="margin-top: 20px">
2024-08-12 10:32:04 +08:00
<span style="margin-left: 30px; font-size: 24px; font-weight: 600">工作台</span>
2024-07-06 15:29:03 +08:00
</div>
2024-08-01 16:33:04 +08:00
<a-tabs v-model:activeKey="activeKey" style="padding: 10px">
2024-08-12 10:32:04 +08:00
<a-tab-pane key="1" tab="待办">
2024-08-02 14:48:20 +08:00
<div style="width: 100%; text-align: right; ">
2024-08-05 10:02:34 +08:00
<RouterLink target='_blank' to="/site/teacherWeiduMore">查看更多</RouterLink>
2024-08-02 14:48:20 +08:00
</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>
2024-07-06 15:29:03 +08:00
</a-col>
2024-08-01 16:33:04 +08:00
<a-col :span="24" v-show="dataSource.length == 0" style="text-align: center">
<span style="line-height: 60px">暂无提醒</span>
2024-07-06 15:29:03 +08:00
</a-col>
</a-row>
2024-08-01 16:33:04 +08:00
</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-12 10:32:04 +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; ">
<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">
2024-08-12 10:32:04 +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>
2024-07-06 15:29:03 +08:00
</div>
</template>
<script lang="ts" setup>
import { defHttp } from '/@/utils/http/axios';
2024-08-01 16:33:04 +08:00
import { ref, onMounted } from 'vue';
2024-07-06 15:29:03 +08:00
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-07-06 15:29:03 +08:00
onMounted(() => {
2024-08-01 16:33:04 +08:00
loaddata();
2024-09-26 08:59:02 +08:00
// setInterval(() => {
// loaddata();
// }, 60 * 1000);
2024-07-06 15:29:03 +08:00
});
2024-08-01 16:33:04 +08:00
function loaddata() {
defHttp
2024-08-02 14:48:20 +08:00
.get({ url: '/zyDbtx/zyDbtx/list', params: { pageSize: 5, pageNo: 1, createBy: userStore.getUserInfo.username, flag: '0' } })
2024-08-01 16:33:04 +08:00
.then((res) => {
dataSource.value = res.records;
});
defHttp
2024-08-02 14:48:20 +08:00
.get({ url: '/zyDbtx/zyDbtx/list', params: { pageSize: 5, pageNo: 1, createBy: userStore.getUserInfo.username, flag: '1' } })
2024-08-01 16:33:04 +08:00
.then((res) => {
dataYySource.value = res.records;
});
2024-07-06 15:29:03 +08:00
}
2024-08-01 16:33:04 +08:00
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();
2024-07-06 15:29:03 +08:00
});
2024-08-01 16:33:04 +08:00
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';
2024-07-06 15:29:03 +08:00
}
2024-08-01 16:33:04 +08:00
url = url + '?rwbh=' + record.rwbh + '&xqxn=' + getSysConfig().flag1 + '&teano=' + record.fbr;
window.open(url, '_blank');
2024-07-06 15:29:03 +08:00
}
</script>
<style lang="less" scoped>
2024-08-01 16:33:04 +08:00
.indexBackClass {
2024-07-06 15:29:03 +08:00
background: #fff;
margin: 20px 0;
padding-bottom: 20px;
}
2024-08-01 16:33:04 +08:00
.jtkcTitleClass {
background-image: linear-gradient(to right, #1c84c6, #67b4e5);
2024-07-06 15:29:03 +08:00
color: white;
line-height: 30px;
padding: 3px 0 0 10px;
font-weight: 600;
height: 30px;
}
</style>