dbsd_kczx/src/views/kc/tktj/zxdt/zxdt.vue

127 lines
4.4 KiB
Vue
Raw Normal View History

2023-04-01 18:17:41 +08:00
<template>
<div class="tktjClass">
2024-06-18 19:48:24 +08:00
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="最新动态">
<a-row>
<!-- <a-col :span="24"><strong style="font-size: 16px;margin-left: 20px;">最新动态</strong></a-col> -->
<!-- <a-col :span="24"><p style="width:100%;height:1px;margin:0px auto;padding:0px;background-color:#D5D5D5;overflow:hidden;margin-top: 5px;"></p></a-col> -->
2023-04-10 21:26:47 +08:00
<a-col :span="24" style="text-align: center;" v-show="listData.length==0"><strong style="font-size: 16px;margin-left: 20px;margin-top: 10px;">暂无数据</strong></a-col>
<a-col :span="24" v-show="listData.length>0">
2024-06-18 19:48:24 +08:00
<div style="height: 305px;overflow-y: auto;">
2023-05-19 21:31:41 +08:00
<div style="font-size: 14px;margin-left: 20px;margin-top: 10px;line-height: 20px;" v-for="(item,index) in listData" :key="index">
2023-04-10 21:26:47 +08:00
<div v-if="item.type == '1'">
2023-05-15 15:38:06 +08:00
<i class="fas fa-users green" /> {{item.username}},听了 {{item.kkdw}} 的课程
<p style="font-size: 10px;"><i class="fas fa-history" /> {{item.tingketime}}</p>
2023-04-10 21:26:47 +08:00
</div>
<div v-else-if="item.type == '2'">
2023-05-15 15:38:06 +08:00
<i class="fas fa-debug" /> {{item.username}}{{item.kkdw}} 主讲{{item.kcmc}}提交了错误报告
<p style="font-size: 10px;"><i class="fas fa-history" /> {{item.tingketime}}</p>
2023-04-10 21:26:47 +08:00
</div>
2023-05-15 15:38:06 +08:00
<a-divider style="margin:12px 0;"/>
2023-04-10 21:26:47 +08:00
</div>
</div>
2023-05-19 21:31:41 +08:00
2023-04-10 21:26:47 +08:00
<div style="text-align: center;margin-top: 10px;" v-show="pageNo>0">
<a @click="funMore">更多</a>
</div>
</a-col>
2023-05-19 21:31:41 +08:00
2024-06-18 19:48:24 +08:00
</a-row></a-tab-pane>
<a-tab-pane key="2" tab="活跃信息" force-render>
<a-row>
<a-col :span="24" style="text-align: center;" v-show="listLogData.length==0"><strong style="font-size: 16px;margin-left: 20px;margin-top: 10px;">暂无数据</strong></a-col>
<a-col :span="24" v-show="listLogData.length>0">
<div style="height: 305px;overflow-y: auto;">
<div style="font-size: 14px;margin-left: 20px;margin-top: 10px;line-height: 20px;" v-for="(item,index) in listLogData" :key="index">
<div>
<i class="fas fa-users green" /> {{item.logContent}}
<p style="font-size: 10px;"><i class="fas fa-history" /> {{item.createTime}}</p>
</div>
<a-divider style="margin:12px 0;"/>
</div>
</div>
<div style="text-align: center;margin-top: 10px;" v-show="pageNo>0">
<a @click="handlLoginLog">统计</a>
</div>
</a-col>
</a-row>
</a-tab-pane>
</a-tabs>
<BlLoginLogModal ref="BlLoginLogModalPage"/>
2023-05-19 21:31:41 +08:00
2023-04-01 18:17:41 +08:00
</div>
</template>
<script lang="ts" name="kcTingke-zxdt" setup>
2023-04-10 21:26:47 +08:00
import { ref, reactive, onMounted } from 'vue';
import { defHttp } from '/@/utils/http/axios';
2023-04-10 23:14:07 +08:00
import { getSysConfig } from '/@/views/site/utils/index';
2024-06-18 19:48:24 +08:00
import BlLoginLogModal from '/@/views/kc/blLoginLog/BlLoginLogModal.vue'
2023-04-10 21:26:47 +08:00
enum Api {
list = '/kcTingke/kcTingke/getHtindexTkmxlist',
}
2023-04-01 18:17:41 +08:00
2023-04-10 21:26:47 +08:00
const list = (params) => defHttp.get({ url: Api.list, params });
2023-04-01 18:17:41 +08:00
2023-04-10 21:26:47 +08:00
const queryParam = ref<any>({});
let listData = ref<any>([]);
2024-06-18 19:48:24 +08:00
let listLogData = ref<any>([]);
2023-04-10 21:26:47 +08:00
let lslist = ref<any>([]);
let pageKs = ref<any>(0);
let pageJs = ref<any>(5);
let pageNo = ref<any>(1);
2024-06-18 19:48:24 +08:00
let activeKey = ref<any>('1');
const BlLoginLogModalPage = ref();
2023-04-10 21:26:47 +08:00
//进入就加载
onMounted(() => {
2023-04-10 23:14:07 +08:00
queryParam.value.skrq = getSysConfig().bxqkssj
2023-04-10 21:26:47 +08:00
queryParam.value.pageKs = pageKs.value
queryParam.value.pageJs = pageJs.value
2024-06-18 19:48:24 +08:00
loadData();
loadLogData();
2023-04-10 21:26:47 +08:00
});
function funMore(){
let djy = pageNo.value
queryParam.value.pageKs = djy*5
queryParam.value.pageJs = pageJs.value
console.log(`🚀 ~ file: zxdt.vue:55 ~ funMore ~ queryParam:`, queryParam)
loadData()
}
2024-06-18 19:48:24 +08:00
function handlLoginLog(){
BlLoginLogModalPage.value.disableSubmit = true;
BlLoginLogModalPage.value.add();
}
2023-04-10 21:26:47 +08:00
function loadData(){
list(queryParam.value).then(res => {
lslist = res
console.log(`🚀 ~ file: zxdt.vue:31 ~ list ~ lslist:`, lslist)
if(lslist.length==5){
pageNo.value++;
} else{
pageNo.value = 0;
}
listData.value.push(...lslist)
console.log(`🚀 ~ file: zxdt.vue:43 ~ list ~ listData:`, listData)
})
}
2024-06-18 19:48:24 +08:00
function loadLogData(){
defHttp.get({url:'/blLoginLog/blLoginLog/list',params:{pageNo:1,pageSize:5}}).then(res=>{
console.log(`🚀 ~ defHttp.get ~ res:`, res.records)
listLogData.value = res.records;
})
}
2023-04-01 18:17:41 +08:00
</script>
<style lang="less" scoped>
2023-05-15 15:38:06 +08:00
.green {
color: #1ab394;
}
2023-04-01 18:17:41 +08:00
</style>