|
@@ -1,45 +1,46 @@
|
|
|
<template>
|
|
<template>
|
|
|
|
|
+ <div v-if="visible">
|
|
|
|
|
+ <a-table
|
|
|
|
|
+ ref="table"
|
|
|
|
|
+ :columns="columns"
|
|
|
|
|
+ :data-source="dataSources"
|
|
|
|
|
+ bordered
|
|
|
|
|
+ :expand-row-by-click="true"
|
|
|
|
|
+ :pagination="false"
|
|
|
|
|
+ style="width: 100%; height: 600px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #bodyCell="{ column, text, record }">
|
|
|
|
|
+ <template v-if="column.dataIndex === 'action'">
|
|
|
|
|
+ <span style="cursor: pointer" @click="handleIn(record)">进入</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
|
|
|
- <a-table
|
|
|
|
|
- ref="table"
|
|
|
|
|
- :columns="columns"
|
|
|
|
|
- :data-source="dataSources"
|
|
|
|
|
- :row-key="(record) => record.courseId"
|
|
|
|
|
- bordered
|
|
|
|
|
- :expand-row-by-click="true"
|
|
|
|
|
- :pagination="false"
|
|
|
|
|
- size="small"
|
|
|
|
|
- >
|
|
|
|
|
- <template #bodyCell="{ column, text, record }">
|
|
|
|
|
-<!-- <template v-if="column.dataIndex === 'createTime'">-->
|
|
|
|
|
-<!-- <span>{{ formatDateTime(record.createTime) }}</span>-->
|
|
|
|
|
-<!-- </template>-->
|
|
|
|
|
-
|
|
|
|
|
-<!-- <template v-if="column.dataIndex === 'action'">-->
|
|
|
|
|
-<!-- <!– <a-button size="small" @click="handleDetail(record)" style="margin-right: 5px">详情</a-button>–>-->
|
|
|
|
|
-<!-- <!– <a-button size="small" @click="handleEdit(record)" style="margin-right: 5px">编辑</a-button>–>-->
|
|
|
|
|
-<!-- <a-popover v-model:visible="popoverVisibles[record.collegeId]" title="确定删除?" trigger="click">-->
|
|
|
|
|
-<!-- <template #content>-->
|
|
|
|
|
-<!-- <a-button style="margin-right: 10px" type="primary" @click="handleShelf(record,1)">确定-->
|
|
|
|
|
-<!-- </a-button>-->
|
|
|
|
|
-<!-- <a-button @click="()=>{ popoverVisibles[record.collegeId] = false}">取消</a-button>-->
|
|
|
|
|
-<!-- </template>-->
|
|
|
|
|
-<!-- <!– <a-button size="small" style="margin-right: 5px">选择</a-button>–>-->
|
|
|
|
|
-<!-- <a-button size="small" @click="handleDelete(record)" style="margin-right: 5px">删除</a-button>-->
|
|
|
|
|
-<!-- </a-popover>-->
|
|
|
|
|
-<!-- </template>-->
|
|
|
|
|
- </template>
|
|
|
|
|
- </a-table>
|
|
|
|
|
- <div style="display: flex; width: 100%; justify-content: flex-end; margin-top: 10px">
|
|
|
|
|
- <a-pagination
|
|
|
|
|
- v-model:current="pagination.current"
|
|
|
|
|
- v-model:pageSize="pagination.size"
|
|
|
|
|
- :total="total"
|
|
|
|
|
- show-less-items
|
|
|
|
|
- @change="handlerChange"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <!-- <template v-if="column.dataIndex === 'action'">-->
|
|
|
|
|
+ <!-- <!– <a-button size="small" @click="handleDetail(record)" style="margin-right: 5px">详情</a-button>–>-->
|
|
|
|
|
+ <!-- <!– <a-button size="small" @click="handleEdit(record)" style="margin-right: 5px">编辑</a-button>–>-->
|
|
|
|
|
+ <!-- <a-popover v-model:visible="popoverVisibles[record.collegeId]" title="确定删除?" trigger="click">-->
|
|
|
|
|
+ <!-- <template #content>-->
|
|
|
|
|
+ <!-- <a-button style="margin-right: 10px" type="primary" @click="handleShelf(record,1)">确定-->
|
|
|
|
|
+ <!-- </a-button>-->
|
|
|
|
|
+ <!-- <a-button @click="()=>{ popoverVisibles[record.collegeId] = false}">取消</a-button>-->
|
|
|
|
|
+ <!-- </template>-->
|
|
|
|
|
+ <!-- <!– <a-button size="small" style="margin-right: 5px">选择</a-button>–>-->
|
|
|
|
|
+ <!-- <a-button size="small" @click="handleDelete(record)" style="margin-right: 5px">删除</a-button>-->
|
|
|
|
|
+ <!-- </a-popover>-->
|
|
|
|
|
+ <!-- </template>-->
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </a-table>
|
|
|
|
|
+ <div style="display: flex; width: 100%; justify-content: flex-end; margin-top: 10px">
|
|
|
|
|
+ <a-pagination
|
|
|
|
|
+ v-model:current="pagination.current"
|
|
|
|
|
+ v-model:pageSize="pagination.size"
|
|
|
|
|
+ :total="total"
|
|
|
|
|
+ show-less-items
|
|
|
|
|
+ @change="handlerChange"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
@@ -50,55 +51,30 @@ import {parseTime} from "@/utils/exam";
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
//网络
|
|
//网络
|
|
|
-// import { overviewLearningProgressApi } from '@/api/statisticalAnalysis/overviewLearningProgress'
|
|
|
|
|
-const emit = defineEmits(['handleEdit'])
|
|
|
|
|
|
|
+import { getStudentTeacher } from '@/api/link'
|
|
|
|
|
+const emit = defineEmits(['handleIn'])
|
|
|
//发布按钮状态
|
|
//发布按钮状态
|
|
|
const releaseVisible = ref(false)
|
|
const releaseVisible = ref(false)
|
|
|
const loading = ref(false) // 列表loading
|
|
const loading = ref(false) // 列表loading
|
|
|
const dataSources = ref([])
|
|
const dataSources = ref([])
|
|
|
const popoverVisible = ref({})
|
|
const popoverVisible = ref({})
|
|
|
const popoverVisibles = ref({})
|
|
const popoverVisibles = ref({})
|
|
|
-const visible = ref(false)
|
|
|
|
|
|
|
+const visible = ref(true)
|
|
|
const formState = ref({
|
|
const formState = ref({
|
|
|
name: '',
|
|
name: '',
|
|
|
loacl: ''
|
|
loacl: ''
|
|
|
}) // 列表loading
|
|
}) // 列表loading
|
|
|
const columns = [
|
|
const columns = [
|
|
|
{
|
|
{
|
|
|
- title: '课程课时名称',
|
|
|
|
|
- dataIndex: 'courseHourName',
|
|
|
|
|
- // sorter: true,
|
|
|
|
|
- width: '15%'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '学生名称',
|
|
|
|
|
- dataIndex: 'userName',
|
|
|
|
|
|
|
+ title: '老师名称',
|
|
|
|
|
+ dataIndex: 'teacherName',
|
|
|
// sorter: true,
|
|
// sorter: true,
|
|
|
- width: '15%'
|
|
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- title: '观看次数',
|
|
|
|
|
- dataIndex: 'viewCount',
|
|
|
|
|
|
|
+ title: '操作',
|
|
|
|
|
+ dataIndex: 'action',
|
|
|
// sorter: true,
|
|
// sorter: true,
|
|
|
- width: '15%'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '课时id',
|
|
|
|
|
- dataIndex: 'hourId',
|
|
|
|
|
- // sorter: true,
|
|
|
|
|
- width: '15%'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '学生id',
|
|
|
|
|
- dataIndex: 'userId',
|
|
|
|
|
- // sorter: true,
|
|
|
|
|
- width: '15%'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- title: '创建日期',
|
|
|
|
|
- dataIndex: 'createDate',
|
|
|
|
|
- // sorter: true,
|
|
|
|
|
- width: '12%'
|
|
|
|
|
|
|
+ width: '5%'
|
|
|
},
|
|
},
|
|
|
]
|
|
]
|
|
|
// tool.formatTimestamp()
|
|
// tool.formatTimestamp()
|
|
@@ -119,6 +95,11 @@ const pagination = ref({
|
|
|
// path: '/' + current
|
|
// path: '/' + current
|
|
|
// })
|
|
// })
|
|
|
// }
|
|
// }
|
|
|
|
|
+const handleIn = (data) => {
|
|
|
|
|
+ console.log('进入', data)
|
|
|
|
|
+ emit("handleIn",data)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const handlerChange = (page, pageSize) => {
|
|
const handlerChange = (page, pageSize) => {
|
|
|
console.log('分页参数', page, pageSize)
|
|
console.log('分页参数', page, pageSize)
|
|
|
// pagination.value.size = pageSize
|
|
// pagination.value.size = pageSize
|
|
@@ -129,11 +110,14 @@ const handlerChange = (page, pageSize) => {
|
|
|
const handleOk = () => {
|
|
const handleOk = () => {
|
|
|
visible.value = false
|
|
visible.value = false
|
|
|
}
|
|
}
|
|
|
-const open = (id) => {
|
|
|
|
|
|
|
+const open = () => {
|
|
|
visible.value = true
|
|
visible.value = true
|
|
|
pagination.value.size = 10
|
|
pagination.value.size = 10
|
|
|
pagination.value.current = 1
|
|
pagination.value.current = 1
|
|
|
- getList(id)
|
|
|
|
|
|
|
+ getList()
|
|
|
|
|
+}
|
|
|
|
|
+const close = () => {
|
|
|
|
|
+ visible.value = false
|
|
|
}
|
|
}
|
|
|
const handleDetail = (record) => {
|
|
const handleDetail = (record) => {
|
|
|
console.log('查看详情', record)
|
|
console.log('查看详情', record)
|
|
@@ -176,18 +160,16 @@ const handleDelete = (record) => {
|
|
|
}
|
|
}
|
|
|
const getList = (id) => {
|
|
const getList = (id) => {
|
|
|
const params = {
|
|
const params = {
|
|
|
- courseId: id,
|
|
|
|
|
- startTime: undefined,
|
|
|
|
|
- endTime: undefined,
|
|
|
|
|
|
|
+ // courseId: id,
|
|
|
size : pagination.value.size,
|
|
size : pagination.value.size,
|
|
|
current : pagination.value.current
|
|
current : pagination.value.current
|
|
|
}
|
|
}
|
|
|
- overviewLearningProgressApi.getStudyDetailCourseView(params).then((data)=>{
|
|
|
|
|
|
|
+ getStudentTeacher(params).then((data)=>{
|
|
|
console.log('获取列表', data)
|
|
console.log('获取列表', data)
|
|
|
- dataSources.value = data.records
|
|
|
|
|
- pagination.value.current = data.current
|
|
|
|
|
- pagination.value.size = data.size
|
|
|
|
|
- total.value = data.total
|
|
|
|
|
|
|
+ dataSources.value = data.data.records
|
|
|
|
|
+ pagination.value.current = data.data.current
|
|
|
|
|
+ pagination.value.size = data.data.size
|
|
|
|
|
+ total.value = data.data.total
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
const setList = (search) => {
|
|
const setList = (search) => {
|
|
@@ -214,6 +196,9 @@ const setList = (search) => {
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
// getListData()
|
|
// getListData()
|
|
|
// getList()
|
|
// getList()
|
|
|
|
|
+ pagination.value.size = 10
|
|
|
|
|
+ pagination.value.current = 1
|
|
|
|
|
+ getList()
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
@@ -225,7 +210,7 @@ onMounted(() => {
|
|
|
// { deep: true, immediate: true }
|
|
// { deep: true, immediate: true }
|
|
|
// )
|
|
// )
|
|
|
defineExpose({
|
|
defineExpose({
|
|
|
- open
|
|
|
|
|
|
|
+ open,close
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|