修改bug
This commit is contained in:
parent
705d30f85e
commit
72625bd4cd
|
@ -6,13 +6,16 @@
|
|||
<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">
|
||||
<div style="height: 330px;overflow-y: auto;">
|
||||
<div style="font-size: 16px;margin-left: 20px;margin-top: 10px;" v-for="(item,index) in listData">
|
||||
<div style="font-size: 14px;margin-left: 20px;margin-top: 10px;line-height: 20px;" v-for="(item,index) in listData">
|
||||
<div v-if="item.type == '1'">
|
||||
{{item.username}},听{{item.kkdw}}的课程。
|
||||
<i class="fas fa-users green" /> {{item.username}},听了 {{item.kkdw}} 的课程。
|
||||
<p style="font-size: 10px;"><i class="fas fa-history" /> {{item.tingketime}}</p>
|
||||
</div>
|
||||
<div v-else-if="item.type == '2'">
|
||||
{{item.username}}对{{item.kkdw}} 主讲《{{item.kcmc}}》提交了错误报告。
|
||||
<i class="fas fa-debug" /> {{item.username}}对{{item.kkdw}} 主讲《{{item.kcmc}}》提交了错误报告。
|
||||
<p style="font-size: 10px;"><i class="fas fa-history" /> {{item.tingketime}}</p>
|
||||
</div>
|
||||
<a-divider style="margin:12px 0;"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -72,4 +75,7 @@ function loadData(){
|
|||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.green {
|
||||
color: #1ab394;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -12,14 +12,16 @@
|
|||
<lunboPage/>
|
||||
<!-- 通知公告 -->
|
||||
<tongZhiGongGaoPage/>
|
||||
<!-- 任课教程 -->
|
||||
<renKeJiaoChengPage v-if="getUserSf()=='T'"/>
|
||||
<!-- 听课足迹 -->
|
||||
<tingKeZuJiPage v-if="getUserSf()=='T'"/>
|
||||
<!-- 任课教程 -->
|
||||
<renKeJiaoChengPage v-if="getUserSf()=='T'"/>
|
||||
<!-- 预约课程 -->
|
||||
<yuYueKeChengPage ref="yykcModeal" @orther-load="yykcLoad" v-if="getUserSf()=='T'"/>
|
||||
<!-- 精彩公开课 -->
|
||||
<jingCaiGongKaiKePage v-if="getUserSf()=='T'"/>
|
||||
<!-- 可线上听课课堂 -->
|
||||
<kxstkktPage v-if="getUserSf()=='T'"/>
|
||||
<!-- 今日课程列表 -->
|
||||
<a-card class="rowGutter" v-if="getUserSf()=='T'">
|
||||
<template #title>
|
||||
|
@ -72,6 +74,7 @@
|
|||
import tingKeZuJiPage from '/@/views/site/tingKeZuJi/index.vue'
|
||||
import yuYueKeChengPage from '/@/views/site/yuYueKeCheng/index.vue'
|
||||
import jingCaiGongKaiKePage from '/@/views/site/jingCaiGongKaiKe/index.vue'
|
||||
import kxstkktPage from '/@/views/site/kxstkkt/index.vue'
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
{{ item.skdd }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="listType == 1">
|
||||
<a-col :span="24" v-if="listType == 1 || listType == '1'">
|
||||
<a-row style="text-align: center;">
|
||||
<a-col :span="8">
|
||||
<a-button type="primary" class="yyyClass" @click="toLivePage(item)" :disabled="!item.jsbh || !item.zhjsId">听课</a-button>
|
||||
|
@ -106,10 +106,13 @@ function rkbLoadData() {
|
|||
newRow = props.queryParam;
|
||||
newRow.userid = getUserId();
|
||||
newRow.pageSize = -1
|
||||
console.log(`🚀 ~ file: kclbList.vue:109 ~ rkbLoadData ~ newRow:`, newRow)
|
||||
if(newRow.hh!=","){
|
||||
listType = newRow.type
|
||||
// listType.value = newRow.type
|
||||
// console.log(`🚀 ~ file: kclbList.vue:111 ~ rkbLoadData ~ listType:`, listType)
|
||||
list(newRow).then(res => {
|
||||
listData.value = res.records;
|
||||
console.log(`🚀 ~ file: kclbList.vue:113 ~ list ~ listData.value:`, listData.value)
|
||||
emit('setTotal', res.records.length);
|
||||
})
|
||||
}
|
||||
|
|
|
@ -0,0 +1,213 @@
|
|||
<template>
|
||||
<a-card class="rowGutter">
|
||||
<div>
|
||||
<div style="font-size: 24px;font-weight: bold;">可线上听课课堂</div>
|
||||
</div>
|
||||
<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: 40px;">
|
||||
<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: 30px;font-size: 16px;">{{ item.skjs }}</div>
|
||||
<div style="height: 30px;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="8">
|
||||
<a-button type="primary" class="yyyClass" @click="toLivePage(item)">听课</a-button>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<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">
|
||||
<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-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 { 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)
|
||||
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 } })
|
||||
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 });
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.yyyClass{
|
||||
background: #1c84c6;float: left;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;float: right;font-weight: 600;border-radius: 5px;line-height: 23px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue