Prechádzať zdrojové kódy

加入一些统计 屏幕适配

于添 6 mesiacov pred
rodič
commit
b88b41c6c3

+ 3 - 0
src/api/notice/index.js

@@ -16,3 +16,6 @@ export const detail = (p) => request('disk/notice/detail', p, 'get')
 //收藏增加
 //资源列表 排除没权限得条目
 export const courceDownList = (p) => request('disk/notice/delete', p, 'post')
+
+export const publish = (p) => request('disk/notice/publish', p, 'get')
+export const cancel = (p) => request('disk/notice/cancel', p, 'get')

+ 5 - 0
src/router/portal.js

@@ -108,6 +108,11 @@ const portal = [
 		name: 'courseOpen',
 		path: '/courseOpen',
 		component: () => import('@/views/courseOpen/index.vue'),
+	},
+	{
+		name: 'statistics',
+		path: '/statistics',
+		component: () => import('@/views/statistics/index.vue'),
 	}
 
 ]

+ 4 - 0
src/router/whiteList.js

@@ -166,6 +166,10 @@ const constRouters = [
 		path: '/courseOpen',
 		component: () => import('@/views/courseOpen/index.vue')
 	},
+	{
+		path: '/statistics',
+		component: () => import('@/views/statistics/index.vue'),
+	}
 	// {
 	// 	path: '/answerManagement',
 	// 	component: () => import('@/views/exm/answerManagement/index.vue')

+ 50 - 11
src/views/announcementManagement/components/ListView.vue

@@ -27,16 +27,35 @@
 			</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="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">
+				<a-popover v-model:visible="popoverVisibles[record.noticeId]" title="确定发布?" trigger="click">
 					<template #content>
-						<a-button style="margin-right: 10px" type="primary" @click="handleShelf(record,1)">确定
+						<a-button style="margin-right: 10px" type="primary" @click="handlePulish(record)">确定
 						</a-button>
-						<a-button @click="()=>{	popoverVisibles[record.collegeId] = false}">取消</a-button>
+						<a-button @click="()=>{	popoverVisibles[record.noticeId] = 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-button v-if="record.noticeStatus == 0" size="small" style="margin-right: 5px">发布</a-button>
+				</a-popover>
+				<a-popover v-model:visible="popoverNotVisibles[record.noticeId]" title="确定取消?" trigger="click">
+					<template #content>
+						<a-button style="margin-right: 10px" type="primary" @click="handleNotPulish(record)">确定
+						</a-button>
+						<a-button @click="()=>{	popoverNotVisibles[record.noticeId] = false}">取消</a-button>
+					</template>
+					<!--					<a-button size="small" style="margin-right: 5px">选择</a-button>-->
+					<a-button v-if="record.noticeStatus == 1" size="small"  style="margin-right: 5px">取消发布</a-button>
+				</a-popover>
+
+				<a-popover v-model:visible="popoverDelVisibles[record.noticeId]" title="确定删除?" trigger="click">
+					<template #content>
+						<a-button style="margin-right: 10px" type="primary" @click="handleDelete(record)">确定
+						</a-button>
+						<a-button @click="()=>{	popoverDelVisibles[record.noticeId] = false}">取消</a-button>
+					</template>
+					<!--					<a-button size="small" style="margin-right: 5px">选择</a-button>-->
+					<a-button size="small" style="margin-right: 5px">删除</a-button>
 				</a-popover>
 			</template>
 		</template>
@@ -56,7 +75,7 @@
 import tool from '@/utils/tool'
 import {ref, onMounted} from 'vue'
 import {EyeOutlined, EditOutlined, SnippetsOutlined, DeleteOutlined} from '@ant-design/icons-vue'
-import {list} from '@/api/notice'
+import {list, courceDownList, publish, cancel} from '@/api/notice'
 import {useRouter} from 'vue-router'
 import collegeApi from '@/api/college'
 import {updateCourseStatus} from '@/api/course/courseDetail'
@@ -70,6 +89,8 @@ const loading = ref(false) // 列表loading
 const dataSources = ref([])
 const popoverVisible = ref({})
 const popoverVisibles = ref({})
+const popoverNotVisibles = ref({})
+const popoverDelVisibles = ref({})
 const formState = ref({
 	name: '',
 	loacl: ''
@@ -78,25 +99,25 @@ const columns = [
 	{
 		title: '公告标题',
 		dataIndex: 'title',
-		sorter: true,
+		// sorter: true,
 		width: '15%'
 	},
 	{
 		title: '内容',
 		dataIndex: 'content',
-		sorter: true,
+		// sorter: true,
 		width: '15%'
 	},
 	{
 		title: '发布时间',
 		dataIndex: 'createTime',
-		sorter: true,
+		// sorter: true,
 		width: '12%'
 	},
 	{
 		title: '操作',
 		dataIndex: 'action',
-		sorter: true,
+		// sorter: true,
 		width: '10%'
 	}
 ]
@@ -140,11 +161,25 @@ const handleEdit = (record) => {
 
 	emit('handleEdit', record)
 }
+const handlePulish = (record) => {
+	console.log('编辑记录', record)
+	popoverVisibles.value[record.noticeId] = false
+	publish({noticeId :record.noticeId }).then((res)=>{
+		getList()
+	})
+}
+const handleNotPulish = (record) => {
+	console.log('编辑记录', record)
+	popoverNotVisibles.value[record.noticeId] = false
+	cancel({noticeId :record.noticeId }).then((res)=>{
+		getList()
+	})
+}
 
 // 上架按钮点击事件
 const handleShelf = (record,num) => {
 	console.log('上架记录', record)
-	popoverVisible.value[record.collegeId] = false
+	popoverVisible.value[record.noticeId] = false
 	// 在这里添加上架记录的逻辑
 	// {
 	// 	"courseId": "1948183431150227458",
@@ -159,6 +194,10 @@ const handleShelf = (record,num) => {
 // 删除按钮点击事件
 const handleDelete = (record) => {
 	console.log('删除记录', record)
+	popoverDelVisibles.value[record.noticeId] = false
+	courceDownList({noticeId :record.noticeId }).then((res)=>{
+		getList()
+	})
 	// 在这里添加删除记录的逻辑
 }
 const getList = () => {

+ 14 - 11
src/views/answerManagement/components/ListView.vue

@@ -18,14 +18,14 @@
 <!--				<a-button size="small" @click="handleDetail(record)" style="margin-right: 5px">详情</a-button>-->
 <!--				<a-button v-if="record.haveAnswer == 1" size="small" @click="handleEdit(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">
+				<a-popover v-model:visible="popoverVisibles[record.id]" title="确定删除?" trigger="click">
 					<template #content>
-						<a-button style="margin-right: 10px" type="primary" @click="handleShelf(record,1)">确定
+						<a-button style="margin-right: 10px" type="primary" @click="handleDelete(record)">确定
 						</a-button>
-						<a-button @click="()=>{	popoverVisibles[record.collegeId] = false}">取消</a-button>
+						<a-button @click="()=>{	popoverVisibles[record.id] = 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-button size="small"  style="margin-right: 5px">删除</a-button>
 				</a-popover>
 			</template>
 		</template>
@@ -45,7 +45,7 @@
 import tool from '@/utils/tool'
 import {ref, onMounted} from 'vue'
 import {EyeOutlined, EditOutlined, SnippetsOutlined, DeleteOutlined} from '@ant-design/icons-vue'
-import {list} from '@/api/answer'
+import {list,del} from '@/api/answer'
 import {useRouter} from 'vue-router'
 import {updateCourseStatus} from '@/api/course/courseDetail'
 
@@ -66,32 +66,32 @@ const columns = [
 	{
 		title: '课时名称',
 		dataIndex: 'hourIdName',
-		sorter: true,
+		// sorter: true,
 		width: '15%'
 	},
 	{
 		title: '内容',
 		dataIndex: 'info',
-		sorter: true,
+		// sorter: true,
 		width: '15%'
 	},
 	{
 		title: '课程名',
 		dataIndex: 'courseIdName',
-		sorter: true,
+		// sorter: true,
 		width: '15%'
 	},
 	{
 		title: '是否回复',
 		dataIndex: 'haveAnswer',
-		sorter: true,
+		// sorter: true,
 		width: '12%'
 	},
 	{
 		title: '操作',
 		dataIndex: 'action',
-		sorter: true,
-		width: '10%'
+		// sorter: true,
+		width: '7%'
 	}
 ]
 // tool.formatTimestamp()
@@ -155,6 +155,9 @@ const handleShelf = (record,num) => {
 const handleDelete = (record) => {
 	console.log('删除记录', record)
 	// 在这里添加删除记录的逻辑
+	del([{id : record.id}]).then((res)=>{
+		getList()
+	})
 }
 const getList = () => {
 	console.log('获取列表 getList')

+ 6 - 6
src/views/classManagement/components/ListView.vue

@@ -66,32 +66,32 @@ const columns = [
 	{
 		title: '班级名称',
 		dataIndex: 'gradesName',
-		sorter: true,
+		// sorter: true,
 		width: '12%'
 	},
 	{
 		title: '学院',
 		dataIndex: 'collegeName',
-		sorter: true,
+		// sorter: true,
 		width: '10%'
 	},
 	{
 		title: '专业',
 		dataIndex: 'majoreName',
-		sorter: true,
+		// sorter: true,
 		width: '8%'
 	},
 	{
 		title: '发布时间',
 		dataIndex: 'createTime',
-		sorter: true,
+		// sorter: true,
 		width: '10%'
 	},
 	{
 		title: '操作',
 		dataIndex: 'action',
-		sorter: true,
-		width: '10%'
+		// sorter: true,
+		width: '7%'
 	}
 ]
 // tool.formatTimestamp()

+ 8 - 8
src/views/courseManagement/components/ListView.vue

@@ -76,44 +76,44 @@ const columns = [
 	{
 		title: '课程名称',
 		dataIndex: 'courseName',
-		sorter: true,
+		// sorter: true,
 		width: '12%'
 	},
 	{
 		title: '状态',
 		dataIndex: 'putawayStatusName',
-		sorter: true,
+		// sorter: true,
 		width: '5%'
 	},
 	{
 		title: '院系',
 		dataIndex: 'collegeTwoIdName',
-		sorter: true,
+		// sorter: true,
 		width: '8%'
 	},
 	{
 		title: '课程类型',
 		dataIndex: 'courseTypeName',
-		sorter: true,
+		// sorter: true,
 		width: '8%'
 	},
 	{
 		title: '课时数量',
 		dataIndex: 'hourCount',
-		sorter: true,
+		// sorter: true,
 		width: '7%'
 	},
 	{
 		title: '发布时间',
 		dataIndex: 'publishTime',
-		sorter: true,
+		// sorter: true,
 		width: '10%'
 	},
 	{
 		title: '操作',
 		dataIndex: 'action',
-		sorter: true,
-		width: '20%'
+		// sorter: true,
+		width: '15%'
 	}
 ]
 // tool.formatTimestamp()

+ 6 - 6
src/views/courseManagement/components/QueryView.vue

@@ -2,10 +2,10 @@
 	<div style="display: flex; justify-content: space-between; align-items: center">
 		<div>
 			<a-form layout="inline" :model="formState">
-				<a-form-item label="" style="width: 20%">
+				<a-form-item label="" style="width: 30%">
 					<a-input v-model:value="formState.courseName" placeholder="请输入课程名称" allowClear />
 				</a-form-item>
-				<a-form-item label="" style="width: 15%">
+				<a-form-item label="" style="width: 30%">
 <!--					<a-cascader-->
 <!--						v-model:value="formState.loacl"-->
 <!--						:options="options"-->
@@ -22,7 +22,7 @@
 						allowClear
 					/>
 				</a-form-item>
-				<a-form-item label="" style="width: 20%">
+				<a-form-item label="" style="width: 30%">
 <!--					<a-input v-model:value="formState.type" placeholder="选择课程类型" allowClear />-->
 					<a-select
 						ref="select"
@@ -33,9 +33,9 @@
 						allowClear
 					></a-select>
 				</a-form-item>
-				<a-form-item label="" style="width: 30%">
-					<a-range-picker 	v-model:value="formState.time" allowClear />
-				</a-form-item>
+<!--				<a-form-item label="" style="width: 30%">-->
+<!--					<a-range-picker 	v-model:value="formState.time" allowClear />-->
+<!--				</a-form-item>-->
 			</a-form>
 		</div>
 		<div>

+ 14 - 14
src/views/portal/components/Header.vue

@@ -41,21 +41,21 @@
 		<div v-if="userInfo.eduIdentity == 1" style="display: flex; width: 100vw; justify-content: space-between; align-items: center">
 			<div style="display: flex; padding-left: 10%">
 				<a-menu v-model:selectedKeys="current" mode="horizontal" theme="light" style="line-height: 55px">
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="portal/resourceCenter">资源中心</a-menu-item>
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="portal/personalResources">个人资源</a-menu-item>
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="portal/courseManagement">课程管理</a-menu-item>
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="answerManagement">问答管理</a-menu-item>
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="classManagement">班级管理</a-menu-item>
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="examinationManagement">考试管理</a-menu-item>
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="questionnaireManagement">问卷管理</a-menu-item>
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="exampaper">试题管理</a-menu-item>
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="student/record/">考试记录</a-menu-item>
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="portal/courseManagement">统计分析</a-menu-item>
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="usercenter">个人中心</a-menu-item>
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="forum">论坛</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="portal/resourceCenter">资源中心</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="portal/personalResources">个人资源</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="portal/courseManagement">课程管理</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="answerManagement">问答管理</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="classManagement">班级管理</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="examinationManagement">考试管理</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="questionnaireManagement">问卷管理</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="exampaper">试题管理</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="student/record/">考试记录</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="statistics">统计分析</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="usercenter">个人中心</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="forum">论坛</a-menu-item>
 <!--					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="portal/courseManagement">站内信</a-menu-item>-->
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="announcementManagement">课程公告发布</a-menu-item>
-					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="userfileconvert">资源转换</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="announcementManagement">课程公告发布</a-menu-item>
+					<a-menu-item style="margin-left: 1px; margin-right: 1px" key="userfileconvert">资源转换</a-menu-item>
 <!--					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="courseOpen">课程开课</a-menu-item>-->
 				</a-menu>
 			</div>

+ 4 - 1
src/views/statisticalAnalysis/analysisLearningBehaviors/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<div class="learning-behavior-analysis">
+	<div class="learning-behavior-analysis" style="height: 100vh; overflow-y: auto">
 		<!-- 页面头部 -->
 		<div class="header">
 			<h1>📊 学习行为分析</h1>
@@ -170,6 +170,9 @@
 				</div>
 			</div>
 		</div>
+		<div style="height: 100px">
+
+		</div>
 	</div>
 </template>
 

+ 4 - 1
src/views/statisticalAnalysis/analysisTeachingActivities/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<div class="teaching-activity-analysis">
+	<div class="teaching-activity-analysis" style="height: 100vh; overflow-y: auto">
 		<!-- 页面头部 -->
 		<div class="header">
 			<h1>📚 教学活动分析</h1>
@@ -108,6 +108,9 @@
 			<h3>📚 文档观看详细统计</h3>
 			<a-table :columns="documentColumns" :data-source="documentData" :pagination="{ pageSize: 10 }" row-key="id" />
 		</div>
+		<div style="height: 100px">
+
+		</div>
 	</div>
 </template>
 

+ 4 - 1
src/views/statisticalAnalysis/overviewLearningProgress/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<div class="p-6 flex justify-center min-h-screen">
+	<div class="p-6 flex justify-center min-h-screen" style="overflow-y: auto;  height: 100vh;">
 		<div class="w-full mx-auto">
 			<!-- 顶部筛选区 -->
 			<div class="bg-white rounded-lg shadow-sm p-6 mb-6 h-25 flex items-center">
@@ -118,6 +118,9 @@
 					</template>
 				</a-table>
 			</div>
+			<div style="height: 100px">
+
+			</div>
 		</div>
 	</div>
 </template>

+ 4 - 1
src/views/statisticalAnalysis/videoAnalysis/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<div class="video-analysis-container">
+	<div class="video-analysis-container" style="height: 100vh; overflow-y: auto">
 		<!-- 页面头部 -->
 		<div class="header">
 			<h1>📊 视频分析</h1>
@@ -148,6 +148,9 @@
 				</template>
 			</a-table>
 		</div>
+		<div style="height: 100px">
+
+		</div>
 	</div>
 </template>
 

+ 88 - 0
src/views/statistics/index.vue

@@ -0,0 +1,88 @@
+<template>
+
+	<a-menu v-model:selectedKeys="current" mode="horizontal" theme="light" style="line-height: 55px">
+		<a-menu-item style="margin-left: 10px; margin-right: 10px" key="">学习行为分析</a-menu-item>
+		<a-menu-item style="margin-left: 10px; margin-right: 10px" key="AnalysisTeachingActivities">教学活动分析</a-menu-item>
+		<a-menu-item style="margin-left: 10px; margin-right: 10px" key="OverviewLearningProgress">学习明细数据</a-menu-item>
+		<a-menu-item style="margin-left: 10px; margin-right: 10px" key="VideoAnalysis">视频分析</a-menu-item>
+		<!--					<a-menu-item style="margin-left: 10px; margin-right: 10px" key="courseOpen">课程开课</a-menu-item>-->
+	</a-menu>
+
+	<AnalysisLearningBehaviors v-if="current == ''"></AnalysisLearningBehaviors>
+	<AnalysisTeachingActivities v-if="current == 'AnalysisTeachingActivities'"></AnalysisTeachingActivities>
+	<OverviewLearningProgress v-if="current == 'OverviewLearningProgress'"></OverviewLearningProgress>
+	<VideoAnalysis v-if="current == 'VideoAnalysis'"></VideoAnalysis>
+
+</template>
+
+<script setup>
+	import { ref, onMounted } from 'vue'
+	import { PlusOutlined } from '@ant-design/icons-vue'
+	import tool from '@/utils/tool'
+	import AnalysisLearningBehaviors from '@/views/statisticalAnalysis/analysisLearningBehaviors/index.vue'
+	import AnalysisTeachingActivities from '@/views/statisticalAnalysis/analysisTeachingActivities/index.vue'
+	import OverviewLearningProgress from '@/views/statisticalAnalysis/overviewLearningProgress/index.vue'
+	import VideoAnalysis from '@/views/statisticalAnalysis/videoAnalysis/index.vue'
+	import { useRouter } from 'vue-router'
+	const router = useRouter()
+	//发布按钮状态
+	const current = ref('')
+	const loading = ref(false) // 列表loading
+
+	const isState = ref(0) // 列表loading
+	const listViewRef = ref(null)
+	const dialogViewRef = ref(null)
+
+	// 搜索值
+	const searchValue = ref('')
+	const open = ref(false)
+
+	const handleNewCourse = () => {
+		// 在这里添加新建课程的逻辑
+		dialogViewRef.value.open()
+	}
+	const handleAddItem = () => {
+		console.log('要去刷新',listViewRef.value)
+		// 在这里添加新建课程的逻辑
+		listViewRef.value.getList()
+	}
+	const handlerSearch = (data) => {
+		console.log('新建课程')
+		// 在这里添加新建课程的逻辑
+		listViewRef.value.setList(data)
+	}
+	const handleEdit = (item) => {
+		dialogViewRef.value.edit(item)
+	}
+
+	const pagination = reactive({
+		pageSize: 10,
+		pageNum: 1,
+		total: 0
+	})
+	const onChangeCurrent = (current) => {
+		router.push({
+			path: '/' + current
+		})
+	}
+	const publishedData = ref()
+	//发布确定
+
+	// 上传资源模态框
+	const uploadModalVisible = ref(false)
+
+	onMounted(() => {
+		// getListData()
+
+		nextTick(()=>{
+				// current.value = "AnalysisLearningBehaviors"
+
+		})
+	})
+</script>
+
+<style scoped>
+	.desc p {
+		margin-bottom: 1em;
+	}
+</style>