修改可线上听课部分
This commit is contained in:
parent
877286e870
commit
b8728ad43b
|
@ -41,7 +41,12 @@
|
|||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="评课身份">
|
||||
<j-dict-select-tag placeholder="请输入评课身份" v-model:value="queryParam.tksf" style="width: 100%;" dictCode="kc_tksfrzb,ZWMC,ZWMC,true group by ZWMC" />
|
||||
<j-dict-select-tag placeholder="请选择评课身份" v-model:value="queryParam.tksf" style="width: 100%;" dictCode="kc_tksfrzb,ZWMC,ZWMC,true group by ZWMC" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
<a-form-item label="评课身份">
|
||||
<a-input placeholder="请输入评课身份" v-model:value="queryParam.tksfLike"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="8">
|
||||
|
@ -133,7 +138,7 @@ const queryParam:Ref<any> = ref({});
|
|||
const { createMessage } = useMessage();
|
||||
|
||||
onMounted(() => {
|
||||
loadData();
|
||||
loadData(1);
|
||||
});
|
||||
|
||||
const roleList = computed(() => getUserInfo()?.roleList??[]);
|
||||
|
@ -176,7 +181,7 @@ watch(() => xqDictTag.value?.dictOptions,(d) => {
|
|||
if(d){
|
||||
queryParam.value.xqxn = d[0]?.value
|
||||
nextTick(() => {
|
||||
loadData();
|
||||
loadData(1);
|
||||
})
|
||||
}
|
||||
},{
|
||||
|
@ -184,11 +189,14 @@ watch(() => xqDictTag.value?.dictOptions,(d) => {
|
|||
immediate:true,
|
||||
});
|
||||
|
||||
function loadData(){
|
||||
function loadData(pageNo?){
|
||||
loading.value = true;
|
||||
let params = { pageNo: 0, pageSize: 10 };
|
||||
params.pageNo = ipagination.value.current;
|
||||
params.pageSize = ipagination.value.pageSize;
|
||||
if(pageNo === 1){
|
||||
params.pageNo = 1;
|
||||
}
|
||||
list({ ...params, ...queryParam.value }).then(res => {
|
||||
dataSource.value = (res?.records) ?? [];
|
||||
ipagination.value.total = res.total;
|
||||
|
@ -207,7 +215,7 @@ function tableChange(pagination) {
|
|||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
loadData();
|
||||
loadData(1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -216,7 +224,7 @@ function searchQuery() {
|
|||
function searchReset() {
|
||||
queryParam.value = {};
|
||||
//刷新数据
|
||||
loadData();
|
||||
loadData(1);
|
||||
}
|
||||
|
||||
//导入导出方法
|
||||
|
|
|
@ -124,7 +124,7 @@ defineExpose({
|
|||
onMounted(() => {
|
||||
jclist(queryParam.value).then(res=>{
|
||||
var list = res
|
||||
queryParam.value.ywTime = list[1].kssj
|
||||
queryParam.value.ywTime = list[0].kssj
|
||||
zbLoadData()
|
||||
})
|
||||
});
|
||||
|
|
|
@ -3,209 +3,33 @@
|
|||
<template #title>
|
||||
<span class="titleName">可线上听课课堂</span>
|
||||
</template>
|
||||
<a-row class="rowGutter" :gutter="[16, 16]">
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 6 }" v-for="(item, index) in listData"
|
||||
:key="index" style="margin-bottom: 0;">
|
||||
<div style="border: 2px #eef1f2 solid;">
|
||||
<div>
|
||||
<div style="width: 100%;height: 20px;background-color: #1c84c6;"></div>
|
||||
<div style="width:100%;white-space:normal; word-break:break-all;overflow:hidden;padding: 10px;height: 70px;font-weight: 600;font-size: 16px;">
|
||||
{{ item.kcmc }}
|
||||
</div>
|
||||
</div>
|
||||
<a-divider style="margin: 0px;color: #eef1f2;" />
|
||||
<div style="padding: 20px;font-weight: 600;">
|
||||
<a-row>
|
||||
<a-col :span="16">
|
||||
<div style="height: 38px;font-size: 16px;">{{ item.skjs }}</div>
|
||||
<div style="font-size: 14px;">{{ item.kkdw }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8" style="text-align: center;height: 70px;">
|
||||
<div style="color: #1c84c6;font-size: 24px;font-weight: 600;">{{ item.xkrs }}</div>
|
||||
<div style="font-size: 14px;">选课人数</div>
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top:20px;">
|
||||
<div>
|
||||
第<span>{{ item.hh }}</span>节
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="width:100%;text-align: center;">
|
||||
—————线下上课地点—————
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="height: 60px;">
|
||||
{{ item.skdd }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" >
|
||||
<a-row style="text-align: center;">
|
||||
<a-col :span="12" style="text-align: center;">
|
||||
<a-button type="primary" class="yyyClass" @click="toLivePage(item)">听课</a-button>
|
||||
</a-col>
|
||||
<a-col :span="12" style="text-align: center;">
|
||||
<a-button type="primary" class="yyClass" @click="funpingjia(item)" >评价</a-button>
|
||||
</a-col>
|
||||
<!-- <a-col :span="8">
|
||||
<a-button type="primary" class="bcClass" @click="handleBaocuo(item)">报错</a-button>
|
||||
</a-col> -->
|
||||
</a-row>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="25" style="line-height: 50px;">
|
||||
<div v-show="1 == pageNo && current>0">
|
||||
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
|
||||
</div>
|
||||
<div v-show="current==0">
|
||||
<div style="text-align: center;"><a @click="funMore">暂无课堂</a></div>
|
||||
</div>
|
||||
<div v-show="1 < pageNo && pageNo < current">
|
||||
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
|
||||
<div style="text-align: right;margin-top: -51px;"><a @click="funShouqi">收起</a></div>
|
||||
</div>
|
||||
<!-- <div v-show="current == pageNo">
|
||||
<div style="text-align: center;"><a @click="funShouqi">收起</a></div>
|
||||
</div> -->
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- 报错列表 -->
|
||||
<KcErrorreportIndexModal ref="kcErrorreportIndexModal"></KcErrorreportIndexModal>
|
||||
<addModalPage ref="tingKeZuJiAddModal"/>
|
||||
<a-tabs type="card">
|
||||
<a-tab-pane key="zzsk">
|
||||
<template #tab>
|
||||
<div style="font-weight: 600;font-size: 16px;">正在上课</div>
|
||||
</template>
|
||||
<zzsk></zzsk>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="xyjk">
|
||||
<template #tab>
|
||||
<div style="font-weight: 600;font-size: 16px;">下一节课</div>
|
||||
</template>
|
||||
<xyjk></xyjk>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="rkb">
|
||||
<template #tab>
|
||||
<div style="font-weight: 600;font-size: 16px;">日课表</div>
|
||||
</template>
|
||||
<rkb></rkb>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref,watch,reactive,defineExpose,onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import KcErrorreportIndexModal from '/@/views/kc/kcErrorreport/components/KcErrorreportIndexModal.vue'
|
||||
import { addTingKeLog, getUserId } from '/@/views/site/utils/index';
|
||||
import addModalPage from '/@/views/site/tingKeZuJi/components/addModal.vue';
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
//用户相关
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const userStore = useUserStore();
|
||||
const kcErrorreportIndexModal = ref();
|
||||
const tingKeZuJiAddModal = ref();
|
||||
const route = useRouter();
|
||||
|
||||
|
||||
let pageNo = 1
|
||||
let current = 0
|
||||
const emit = defineEmits(['setTotal']);
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
let listData = ref<any>([]);
|
||||
let listType = ref<any>(String);
|
||||
const list = (params) => defHttp.get({ url: '/ktgl/kcKetangbiao/getKclblist', params });
|
||||
const jclist = (queryParam) => defHttp.get({ url: '/kcJieci/kcJieci/getIndexJcList', params:queryParam });
|
||||
const queryParam = ref<any>({});
|
||||
|
||||
|
||||
//进入就加载
|
||||
onMounted(() => {
|
||||
jclist(queryParam.value).then(res=>{
|
||||
var list = res
|
||||
queryParam.value.ywTime = list[0].kssj
|
||||
queryParam.value.jieci = list[0].jieci
|
||||
rkbLoadData()
|
||||
})
|
||||
});
|
||||
|
||||
//查询数据
|
||||
function rkbLoadData() {
|
||||
queryParam.value.pageSize = '4'
|
||||
queryParam.value.pageNo = pageNo
|
||||
queryParam.value.sfyzhjs = '1'
|
||||
queryParam.value.hh = queryParam.value.jieci+","+queryParam.value.jieci.split("、").join(',')
|
||||
queryParam.value.skrq = queryParam.value.ywTime
|
||||
queryParam.value.userid = getUserId()
|
||||
queryParam.value.skxs = 1
|
||||
queryParam.value.type = 1
|
||||
console.log(`🚀 ~ file: index.vue:112 ~ rkbLoadData ~ newRow:`, queryParam)
|
||||
|
||||
if(queryParam.value.hh!=","){
|
||||
list(queryParam.value).then(res => {
|
||||
// console.log(`🚀 ~ file: index.vue:104 ~ list ~ res:`, res)
|
||||
listData.value.push(...res.records)
|
||||
current = res.pages
|
||||
// listData.value = res.records;
|
||||
// console.log(`🚀 ~ file: kclbList.vue:113 ~ list ~ listData.value:`, listData.value)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function funpingjia(record){
|
||||
var item = {ketangbiaoid:record.id}
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
}
|
||||
/**
|
||||
* 报错事件
|
||||
*/
|
||||
function handleBaocuo(item) {
|
||||
kcErrorreportIndexModal.value.disableSubmit = false;
|
||||
kcErrorreportIndexModal.value.add(item);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 公开课收起
|
||||
*/
|
||||
function funShouqi(){
|
||||
listData.value = []
|
||||
pageNo = 1
|
||||
rkbLoadData()
|
||||
}
|
||||
/**
|
||||
* 加载更多公开课
|
||||
*/
|
||||
function funMore(){
|
||||
console.log(`🚀 ~ file: index.vue:83 ~ funMore ~ current>pageNo:`, current,pageNo)
|
||||
if(current>pageNo){
|
||||
pageNo ++;
|
||||
rkbLoadData()
|
||||
}else{
|
||||
createMessage.error("没有更多数据了!");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 听课按钮
|
||||
* @param item
|
||||
*/
|
||||
function toLivePage(item){
|
||||
// route.push({ path:'/site/liveRoom',query:{ id: item.jsbh } })
|
||||
//添加听课日志
|
||||
addTingKeLog(getUserId(),item.id);
|
||||
let routeData = route.resolve({ path:'/site/liveRoom',query:{ id: item.jsbh, ktId: item.id } });
|
||||
window.open(routeData.href, '_blank');
|
||||
};
|
||||
|
||||
enum Api {
|
||||
list = '/kcYuyue/kcYuyue/list',
|
||||
save='/kcYuyue/kcYuyue/add',
|
||||
edit='/kcYuyue/kcYuyue/edit',
|
||||
deleteOne = '/kcYuyue/kcYuyue/delete',
|
||||
deleteBatch = '/kcYuyue/kcYuyue/deleteBatch',
|
||||
importExcel = '/kcYuyue/kcYuyue/importExcel',
|
||||
exportXls = '/kcYuyue/kcYuyue/exportXls',
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
rkbLoadData
|
||||
});
|
||||
//提交报错信息
|
||||
const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
console.log(`🚀 ~ file: kclbList.vue:107 ~ saveOrUpdate ~ url:`, url)
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
import zzsk from './zzsk.vue';
|
||||
import xyjk from './xyjk.vue';
|
||||
import rkb from './rkb.vue';
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -214,13 +38,4 @@ const saveOrUpdate = (params, isUpdate) => {
|
|||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.yyyClass{
|
||||
background: #1c84c6;font-weight: 600;color:#fff;border-radius: 5px;line-height: 23px;
|
||||
}
|
||||
.yyClass{
|
||||
background-color: #1c84c6;font-weight: 600;color:#fff;border-radius: 5px;line-height: 23px;
|
||||
}
|
||||
.bcClass{
|
||||
background-color: #1c84c6;font-weight: 600;border-radius: 5px;line-height: 23px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
<template>
|
||||
<div style="border: 2px #eef1f2 solid;">
|
||||
<div>
|
||||
<div style="width: 100%;height: 20px;background-color: #1c84c6;"></div>
|
||||
<div style="width:100%;white-space:normal; word-break:break-all;overflow:hidden;padding: 10px;height: 70px;font-weight: 600;font-size: 16px;">
|
||||
{{ item.kcmc }}
|
||||
</div>
|
||||
</div>
|
||||
<a-divider style="margin: 0px;color: #eef1f2;" />
|
||||
<div style="padding: 20px;font-weight: 600;">
|
||||
<a-row>
|
||||
<a-col :span="16">
|
||||
<div style="height: 38px;font-size: 16px;">{{ item.skjs }}</div>
|
||||
<div style="font-size: 14px;">{{ item.kkdw }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8" style="text-align: center;height: 70px;">
|
||||
<div style="color: #1c84c6;font-size: 24px;font-weight: 600;">{{ item.xkrs }}</div>
|
||||
<div style="font-size: 14px;">选课人数</div>
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top:20px;">
|
||||
<div>
|
||||
第<span>{{ item.hh }}</span>节
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="width:100%;text-align: center;">
|
||||
—————线下上课地点—————
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div style="height: 60px;">
|
||||
{{ item.skdd }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" >
|
||||
<a-row style="text-align: center;" v-if="!isNow(item)">
|
||||
<a-col :span="12" style="text-align: center;">
|
||||
<a-button type="primary" class="yyyClass" @click="toLivePage(item)">听课</a-button>
|
||||
</a-col>
|
||||
<a-col :span="12" style="text-align: center;">
|
||||
<a-button type="primary" class="yyClass" @click="funpingjia(item)">评价</a-button>
|
||||
</a-col>
|
||||
<!-- <a-col :span="8">
|
||||
<a-button type="primary" class="bcClass" @click="handleBaocuo(item)">报错</a-button>
|
||||
</a-col> -->
|
||||
</a-row>
|
||||
<a-row style="text-align: center;" v-else>
|
||||
<a-col :span="12" style="text-align: center;">
|
||||
<a-button type="primary" class="yyyClass" @click="toLivePage(item)" disabled>听课</a-button>
|
||||
</a-col>
|
||||
<a-col :span="12" style="text-align: center;">
|
||||
<a-button type="primary" class="yyClass" @click="funpingjia(item)" disabled>评价</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref,watch,reactive,defineExpose,onMounted,computed } from 'vue';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const props = defineProps({
|
||||
data: { type: Object },
|
||||
});
|
||||
|
||||
const item = ref<any>(computed(() => props.data));
|
||||
|
||||
const emit = defineEmits(['toLivePage', 'funpingjia']);
|
||||
|
||||
function toLivePage(item){
|
||||
emit('toLivePage',item);
|
||||
}
|
||||
|
||||
function funpingjia(item){
|
||||
emit('funpingjia',item);
|
||||
}
|
||||
|
||||
function isNow(item){
|
||||
const jssj = dayjs(item.skrq + " " +item.jssj, 'YYYY-MM-DD hh:mm:ss');
|
||||
const dqsj = dayjs(new Date());
|
||||
if(jssj.unix() < dqsj.unix()){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.yyyClass{
|
||||
background: #1c84c6;font-weight: 600;color:#fff;border-radius: 5px;line-height: 23px;
|
||||
}
|
||||
.yyClass{
|
||||
background-color: #1c84c6;font-weight: 600;color:#fff;border-radius: 5px;line-height: 23px;
|
||||
}
|
||||
.bcClass{
|
||||
background-color: #1c84c6;font-weight: 600;border-radius: 5px;line-height: 23px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,201 @@
|
|||
<template>
|
||||
<a-row style="margin-top:20px;">
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }">
|
||||
<a-form-item label="" style="padding: 10px;">
|
||||
<a-date-picker :showTime="false" valueFormat="YYYY-MM-DD" :placeholder="'请选择结束时间'" style="width:100%;" v-model:value="queryParam.ywTime"></a-date-picker>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }">
|
||||
<a-form-item label="" style="padding: 10px;">
|
||||
<JDictSelectTag placeholder="请选择院系" v-model:value="queryParam.kkdw" :dictCode="`kc_kkdw_view,kkdw,kkdw`" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }">
|
||||
<a-form-item label="" style="padding: 10px;">
|
||||
<JDictSelectTag placeholder="请选择节次" v-model:value="queryParam.jieci" :dictCode="`kc_jieci_view,jieciname,jieci`" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }">
|
||||
<a-form-item label="" style="padding: 10px;">
|
||||
<JDictSelectTag placeholder="请选择课程性质" v-model:value="queryParam.kcxz" dictCode="kcxz" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 3 }">
|
||||
<a-form-item label="" style="padding: 10px;">
|
||||
<JDictSelectTag placeholder="请选择教学楼" v-model:value="queryParam.jzwh" :dictCode="`xxhbjxljbxx,jzwmc,jzwh`" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 5 }">
|
||||
<a-form-item label="" style="padding: 10px;">
|
||||
<a-input-search placeholder="请输入课程或教师名称" v-model:value="queryParam.ywmc" enter-button="查询" @search="loadData(1)"></a-input-search>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row class="rowGutter" :gutter="[16, 16]">
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 6 }" v-for="(item, index) in listData" :key="index" style="margin-bottom: 0;">
|
||||
<itemPage :data="item" @to-live-page="toLivePage" @funpingjia="funpingjia"></itemPage>
|
||||
</a-col>
|
||||
<a-col :span="25" style="line-height: 50px;">
|
||||
<div v-show="1 == pageNo && current>0">
|
||||
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
|
||||
</div>
|
||||
<div v-show="current==0">
|
||||
<div style="text-align: center;"><a @click="funMore">暂无课堂</a></div>
|
||||
</div>
|
||||
<div v-show="1 < pageNo && pageNo < current">
|
||||
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
|
||||
<div style="text-align: right;margin-top: -51px;"><a @click="funShouqi">收起</a></div>
|
||||
</div>
|
||||
<!-- <div v-show="current == pageNo">
|
||||
<div style="text-align: center;"><a @click="funShouqi">收起</a></div>
|
||||
</div> -->
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- 报错列表 -->
|
||||
<KcErrorreportIndexModal ref="kcErrorreportIndexModal"></KcErrorreportIndexModal>
|
||||
<addModalPage ref="tingKeZuJiAddModal"/>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref,watch,reactive,defineExpose,onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import KcErrorreportIndexModal from '/@/views/kc/kcErrorreport/components/KcErrorreportIndexModal.vue'
|
||||
import { addTingKeLog, getUserId } from '/@/views/site/utils/index';
|
||||
import addModalPage from '/@/views/site/tingKeZuJi/components/addModal.vue';
|
||||
import itemPage from './itemPage.vue';
|
||||
import { useRouter } from 'vue-router'
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
|
||||
//用户相关
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const userStore = useUserStore();
|
||||
const kcErrorreportIndexModal = ref();
|
||||
const tingKeZuJiAddModal = ref();
|
||||
const route = useRouter();
|
||||
|
||||
|
||||
let pageNo = 1
|
||||
let current = 0
|
||||
const emit = defineEmits(['setTotal']);
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
let listData = ref<any>([]);
|
||||
let listType = ref<any>(String);
|
||||
const list = (params) => defHttp.get({ url: '/ktgl/kcKetangbiao/getKclblist', params });
|
||||
const jclist = (queryParam) => defHttp.get({ url: '/kcJieci/kcJieci/getIndexJcList', params:queryParam });
|
||||
const queryParam = ref<any>({});
|
||||
|
||||
|
||||
//进入就加载
|
||||
onMounted(() => {
|
||||
jclist(queryParam.value).then(res=>{
|
||||
var list = res
|
||||
queryParam.value.ywTime = list[0].kssj
|
||||
// queryParam.value.jieci = list[1].jieci
|
||||
loadData(1)
|
||||
})
|
||||
});
|
||||
|
||||
//查询数据
|
||||
function loadData(num?) {
|
||||
if(num == 1){
|
||||
pageNo = 1
|
||||
listData.value = [];
|
||||
}
|
||||
queryParam.value.pageSize = '4'
|
||||
queryParam.value.pageNo = pageNo
|
||||
queryParam.value.sfyzhjs = '1'
|
||||
// queryParam.value.hh = queryParam.value.jieci+","+queryParam.value.jieci.split("、").join(',')
|
||||
if(queryParam.value.jieci){
|
||||
queryParam.value.hh = queryParam.value.jieci+","+queryParam.value.jieci.split("、").join(',')
|
||||
}
|
||||
queryParam.value.skrq = queryParam.value.ywTime
|
||||
queryParam.value.userid = getUserId()
|
||||
queryParam.value.skxs = 1
|
||||
queryParam.value.type = 1
|
||||
console.log(`🚀 ~ file: index.vue:112 ~ rkbLoadData ~ newRow:`, queryParam)
|
||||
|
||||
|
||||
if(queryParam.value.hh!=","){
|
||||
list(queryParam.value).then(res => {
|
||||
// console.log(`🚀 ~ file: index.vue:104 ~ list ~ res:`, res)
|
||||
listData.value.push(...res.records)
|
||||
current = res.pages
|
||||
// listData.value = res.records;
|
||||
// console.log(`🚀 ~ file: kclbList.vue:113 ~ list ~ listData.value:`, listData.value)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function funpingjia(record){
|
||||
var item = {ketangbiaoid:record.id}
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
}
|
||||
/**
|
||||
* 报错事件
|
||||
*/
|
||||
function handleBaocuo(item) {
|
||||
kcErrorreportIndexModal.value.disableSubmit = false;
|
||||
kcErrorreportIndexModal.value.add(item);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 公开课收起
|
||||
*/
|
||||
function funShouqi(){
|
||||
listData.value = []
|
||||
pageNo = 1
|
||||
loadData()
|
||||
}
|
||||
/**
|
||||
* 加载更多公开课
|
||||
*/
|
||||
function funMore(){
|
||||
console.log(`🚀 ~ file: index.vue:83 ~ funMore ~ current>pageNo:`, current,pageNo)
|
||||
if(current>pageNo){
|
||||
pageNo ++;
|
||||
loadData()
|
||||
}else{
|
||||
createMessage.error("没有更多数据了!");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 听课按钮
|
||||
* @param item
|
||||
*/
|
||||
function toLivePage(item){
|
||||
// route.push({ path:'/site/liveRoom',query:{ id: item.jsbh } })
|
||||
//添加听课日志
|
||||
addTingKeLog(getUserId(),item.id);
|
||||
let routeData = route.resolve({ path:'/site/liveRoom',query:{ id: item.jsbh, ktId: item.id } });
|
||||
window.open(routeData.href, '_blank');
|
||||
};
|
||||
|
||||
enum Api {
|
||||
list = '/kcYuyue/kcYuyue/list',
|
||||
save='/kcYuyue/kcYuyue/add',
|
||||
edit='/kcYuyue/kcYuyue/edit',
|
||||
deleteOne = '/kcYuyue/kcYuyue/delete',
|
||||
deleteBatch = '/kcYuyue/kcYuyue/deleteBatch',
|
||||
importExcel = '/kcYuyue/kcYuyue/importExcel',
|
||||
exportXls = '/kcYuyue/kcYuyue/exportXls',
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
loadData
|
||||
});
|
||||
//提交报错信息
|
||||
const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
console.log(`🚀 ~ file: kclbList.vue:107 ~ saveOrUpdate ~ url:`, url)
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
</style>
|
|
@ -0,0 +1,186 @@
|
|||
<template>
|
||||
<a-row style="margin-top:20px;">
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }">
|
||||
<a-form-item label="" style="padding: 10px;">
|
||||
<JDictSelectTag placeholder="请选择院系" v-model:value="queryParam.kkdw" :dictCode="`kc_kkdw_view,kkdw,kkdw`" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }">
|
||||
<a-form-item label="" style="padding: 10px;">
|
||||
<JDictSelectTag placeholder="请选择教学楼" v-model:value="queryParam.jzwh" :dictCode="`xxhbjxljbxx,jzwmc,jzwh`" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }">
|
||||
<a-form-item label="" style="padding: 10px;">
|
||||
<a-input placeholder="请输入课程或教师名称" v-model:value="queryParam.ywmc"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }" style="padding: 10px;">
|
||||
<a-button type="primary" @click="loadData(1)" style="background-color: rgb(26, 179, 148);">查询</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row class="rowGutter" :gutter="[16, 16]">
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 6 }" v-for="(item, index) in listData" :key="index" style="margin-bottom: 0;">
|
||||
<itemPage :data="item" @to-live-page="toLivePage" @funpingjia="funpingjia"></itemPage>
|
||||
</a-col>
|
||||
<a-col :span="25" style="line-height: 50px;">
|
||||
<div v-show="1 == pageNo && current>0">
|
||||
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
|
||||
</div>
|
||||
<div v-show="current==0">
|
||||
<div style="text-align: center;"><a @click="funMore">暂无课堂</a></div>
|
||||
</div>
|
||||
<div v-show="1 < pageNo && pageNo < current">
|
||||
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
|
||||
<div style="text-align: right;margin-top: -51px;"><a @click="funShouqi">收起</a></div>
|
||||
</div>
|
||||
<!-- <div v-show="current == pageNo">
|
||||
<div style="text-align: center;"><a @click="funShouqi">收起</a></div>
|
||||
</div> -->
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- 报错列表 -->
|
||||
<KcErrorreportIndexModal ref="kcErrorreportIndexModal"></KcErrorreportIndexModal>
|
||||
<addModalPage ref="tingKeZuJiAddModal"/>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref,watch,reactive,defineExpose,onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import KcErrorreportIndexModal from '/@/views/kc/kcErrorreport/components/KcErrorreportIndexModal.vue'
|
||||
import { addTingKeLog, getUserId } from '/@/views/site/utils/index';
|
||||
import addModalPage from '/@/views/site/tingKeZuJi/components/addModal.vue';
|
||||
import itemPage from './itemPage.vue';
|
||||
import { useRouter } from 'vue-router'
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
|
||||
//用户相关
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const userStore = useUserStore();
|
||||
const kcErrorreportIndexModal = ref();
|
||||
const tingKeZuJiAddModal = ref();
|
||||
const route = useRouter();
|
||||
|
||||
|
||||
let pageNo = 1
|
||||
let current = 0
|
||||
const emit = defineEmits(['setTotal']);
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
let listData = ref<any>([]);
|
||||
let listType = ref<any>(String);
|
||||
const list = (params) => defHttp.get({ url: '/ktgl/kcKetangbiao/getKclblist', params });
|
||||
const jclist = (queryParam) => defHttp.get({ url: '/kcJieci/kcJieci/getIndexJcList', params:queryParam });
|
||||
const queryParam = ref<any>({});
|
||||
|
||||
|
||||
//进入就加载
|
||||
onMounted(() => {
|
||||
jclist(queryParam.value).then(res=>{
|
||||
var list = res
|
||||
queryParam.value.ywTime = list[1].kssj
|
||||
queryParam.value.jieci = list[1].jieci
|
||||
loadData(1)
|
||||
})
|
||||
});
|
||||
|
||||
//查询数据
|
||||
function loadData(num?) {
|
||||
if(num == 1){
|
||||
pageNo = 1
|
||||
listData.value = [];
|
||||
}
|
||||
|
||||
queryParam.value.pageSize = '4'
|
||||
queryParam.value.pageNo = pageNo
|
||||
queryParam.value.sfyzhjs = '1'
|
||||
queryParam.value.hh = queryParam.value.jieci+","+queryParam.value.jieci.split("、").join(',')
|
||||
queryParam.value.skrq = queryParam.value.ywTime
|
||||
queryParam.value.userid = getUserId()
|
||||
queryParam.value.skxs = 1
|
||||
queryParam.value.type = 0
|
||||
console.log(`🚀 ~ file: index.vue:112 ~ rkbLoadData ~ newRow:`, queryParam)
|
||||
|
||||
if(queryParam.value.hh!=","){
|
||||
list(queryParam.value).then(res => {
|
||||
// console.log(`🚀 ~ file: index.vue:104 ~ list ~ res:`, res)
|
||||
listData.value.push(...res.records)
|
||||
current = res.pages
|
||||
// listData.value = res.records;
|
||||
// console.log(`🚀 ~ file: kclbList.vue:113 ~ list ~ listData.value:`, listData.value)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function funpingjia(record){
|
||||
var item = {ketangbiaoid:record.id}
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
}
|
||||
/**
|
||||
* 报错事件
|
||||
*/
|
||||
function handleBaocuo(item) {
|
||||
kcErrorreportIndexModal.value.disableSubmit = false;
|
||||
kcErrorreportIndexModal.value.add(item);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 公开课收起
|
||||
*/
|
||||
function funShouqi(){
|
||||
listData.value = []
|
||||
pageNo = 1
|
||||
loadData()
|
||||
}
|
||||
/**
|
||||
* 加载更多公开课
|
||||
*/
|
||||
function funMore(){
|
||||
console.log(`🚀 ~ file: index.vue:83 ~ funMore ~ current>pageNo:`, current,pageNo)
|
||||
if(current>pageNo){
|
||||
pageNo ++;
|
||||
loadData()
|
||||
}else{
|
||||
createMessage.error("没有更多数据了!");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 听课按钮
|
||||
* @param item
|
||||
*/
|
||||
function toLivePage(item){
|
||||
// route.push({ path:'/site/liveRoom',query:{ id: item.jsbh } })
|
||||
//添加听课日志
|
||||
addTingKeLog(getUserId(),item.id);
|
||||
let routeData = route.resolve({ path:'/site/liveRoom',query:{ id: item.jsbh, ktId: item.id } });
|
||||
window.open(routeData.href, '_blank');
|
||||
};
|
||||
|
||||
enum Api {
|
||||
list = '/kcYuyue/kcYuyue/list',
|
||||
save='/kcYuyue/kcYuyue/add',
|
||||
edit='/kcYuyue/kcYuyue/edit',
|
||||
deleteOne = '/kcYuyue/kcYuyue/delete',
|
||||
deleteBatch = '/kcYuyue/kcYuyue/deleteBatch',
|
||||
importExcel = '/kcYuyue/kcYuyue/importExcel',
|
||||
exportXls = '/kcYuyue/kcYuyue/exportXls',
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
loadData
|
||||
});
|
||||
//提交报错信息
|
||||
const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
console.log(`🚀 ~ file: kclbList.vue:107 ~ saveOrUpdate ~ url:`, url)
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
</style>
|
|
@ -0,0 +1,185 @@
|
|||
<template>
|
||||
<a-row style="margin-top:20px;">
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }">
|
||||
<a-form-item label="" style="padding: 10px;">
|
||||
<JDictSelectTag placeholder="请选择院系" v-model:value="queryParam.kkdw" :dictCode="`kc_kkdw_view,kkdw,kkdw`" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }">
|
||||
<a-form-item label="" style="padding: 10px;">
|
||||
<JDictSelectTag placeholder="请选择教学楼" v-model:value="queryParam.jzwh" :dictCode="`xxhbjxljbxx,jzwmc,jzwh`" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }">
|
||||
<a-form-item label="" style="padding: 10px;">
|
||||
<a-input placeholder="请输入课程或教师名称" v-model:value="queryParam.ywmc"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 4 }" style="padding: 10px;">
|
||||
<a-button type="primary" @click="loadData(1)" style="background-color: rgb(26, 179, 148);">查询</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row class="rowGutter" :gutter="[16, 16]">
|
||||
<a-col :xs="{ span: 24 }" :sm="{ span: 8 }" :lg="{ span: 6 }" v-for="(item, index) in listData" :key="index" style="margin-bottom: 0;">
|
||||
<itemPage :data="item" @to-live-page="toLivePage" @funpingjia="funpingjia"></itemPage>
|
||||
</a-col>
|
||||
<a-col :span="25" style="line-height: 50px;">
|
||||
<div v-show="1 == pageNo && current>0">
|
||||
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
|
||||
</div>
|
||||
<div v-show="current==0">
|
||||
<div style="text-align: center;"><a @click="funMore">暂无课堂</a></div>
|
||||
</div>
|
||||
<div v-show="1 < pageNo && pageNo < current">
|
||||
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
|
||||
<div style="text-align: right;margin-top: -51px;"><a @click="funShouqi">收起</a></div>
|
||||
</div>
|
||||
<!-- <div v-show="current == pageNo">
|
||||
<div style="text-align: center;"><a @click="funShouqi">收起</a></div>
|
||||
</div> -->
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- 报错列表 -->
|
||||
<KcErrorreportIndexModal ref="kcErrorreportIndexModal"></KcErrorreportIndexModal>
|
||||
<addModalPage ref="tingKeZuJiAddModal"/>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref,watch,reactive,defineExpose,onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import KcErrorreportIndexModal from '/@/views/kc/kcErrorreport/components/KcErrorreportIndexModal.vue'
|
||||
import { addTingKeLog, getUserId } from '/@/views/site/utils/index';
|
||||
import addModalPage from '/@/views/site/tingKeZuJi/components/addModal.vue';
|
||||
import itemPage from './itemPage.vue';
|
||||
import { useRouter } from 'vue-router'
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
|
||||
//用户相关
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const userStore = useUserStore();
|
||||
const kcErrorreportIndexModal = ref();
|
||||
const tingKeZuJiAddModal = ref();
|
||||
const route = useRouter();
|
||||
|
||||
|
||||
let pageNo = 1
|
||||
let current = 0
|
||||
const emit = defineEmits(['setTotal']);
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
let listData = ref<any>([]);
|
||||
let listType = ref<any>(String);
|
||||
const list = (params) => defHttp.get({ url: '/ktgl/kcKetangbiao/getKclblist', params });
|
||||
const jclist = (queryParam) => defHttp.get({ url: '/kcJieci/kcJieci/getIndexJcList', params:queryParam });
|
||||
const queryParam = ref<any>({});
|
||||
|
||||
|
||||
//进入就加载
|
||||
onMounted(() => {
|
||||
jclist(queryParam.value).then(res=>{
|
||||
var list = res
|
||||
queryParam.value.ywTime = list[0].kssj
|
||||
queryParam.value.jieci = list[0].jieci
|
||||
loadData(1)
|
||||
})
|
||||
});
|
||||
|
||||
//查询数据
|
||||
function loadData(num?) {
|
||||
if(num == 1){
|
||||
pageNo = 1
|
||||
listData.value = [];
|
||||
}
|
||||
queryParam.value.pageSize = '4'
|
||||
queryParam.value.pageNo = pageNo
|
||||
queryParam.value.sfyzhjs = '1'
|
||||
queryParam.value.hh = queryParam.value.jieci+","+queryParam.value.jieci.split("、").join(',')
|
||||
queryParam.value.skrq = queryParam.value.ywTime
|
||||
queryParam.value.userid = getUserId()
|
||||
queryParam.value.skxs = 1
|
||||
queryParam.value.type = 1
|
||||
console.log(`🚀 ~ file: index.vue:112 ~ rkbLoadData ~ newRow:`, queryParam)
|
||||
|
||||
if(queryParam.value.hh!=","){
|
||||
list(queryParam.value).then(res => {
|
||||
// console.log(`🚀 ~ file: index.vue:104 ~ list ~ res:`, res)
|
||||
listData.value.push(...res.records)
|
||||
current = res.pages
|
||||
// listData.value = res.records;
|
||||
// console.log(`🚀 ~ file: kclbList.vue:113 ~ list ~ listData.value:`, listData.value)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function funpingjia(record){
|
||||
var item = {ketangbiaoid:record.id}
|
||||
tingKeZuJiAddModal.value.view(item)
|
||||
}
|
||||
/**
|
||||
* 报错事件
|
||||
*/
|
||||
function handleBaocuo(item) {
|
||||
kcErrorreportIndexModal.value.disableSubmit = false;
|
||||
kcErrorreportIndexModal.value.add(item);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 公开课收起
|
||||
*/
|
||||
function funShouqi(){
|
||||
listData.value = []
|
||||
pageNo = 1
|
||||
loadData()
|
||||
}
|
||||
/**
|
||||
* 加载更多公开课
|
||||
*/
|
||||
function funMore(){
|
||||
console.log(`🚀 ~ file: index.vue:83 ~ funMore ~ current>pageNo:`, current,pageNo)
|
||||
if(current>pageNo){
|
||||
pageNo ++;
|
||||
loadData()
|
||||
}else{
|
||||
createMessage.error("没有更多数据了!");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 听课按钮
|
||||
* @param item
|
||||
*/
|
||||
function toLivePage(item){
|
||||
// route.push({ path:'/site/liveRoom',query:{ id: item.jsbh } })
|
||||
//添加听课日志
|
||||
addTingKeLog(getUserId(),item.id);
|
||||
let routeData = route.resolve({ path:'/site/liveRoom',query:{ id: item.jsbh, ktId: item.id } });
|
||||
window.open(routeData.href, '_blank');
|
||||
};
|
||||
|
||||
enum Api {
|
||||
list = '/kcYuyue/kcYuyue/list',
|
||||
save='/kcYuyue/kcYuyue/add',
|
||||
edit='/kcYuyue/kcYuyue/edit',
|
||||
deleteOne = '/kcYuyue/kcYuyue/delete',
|
||||
deleteBatch = '/kcYuyue/kcYuyue/deleteBatch',
|
||||
importExcel = '/kcYuyue/kcYuyue/importExcel',
|
||||
exportXls = '/kcYuyue/kcYuyue/exportXls',
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
loadData
|
||||
});
|
||||
//提交报错信息
|
||||
const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
console.log(`🚀 ~ file: kclbList.vue:107 ~ saveOrUpdate ~ url:`, url)
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
</style>
|
Loading…
Reference in New Issue