develoop
fwb 3 months ago
commit 971304bb30
  1. 10
      .env.development
  2. 14075
      pnpm-lock.yaml
  3. 45
      src/api/configuration.ts
  4. 6
      src/api/user/chapter.js
  5. 4
      src/api/user/messag.js
  6. 6
      src/api/user/object.js
  7. 4
      src/api/user/send.js
  8. 81
      src/layout/menu/index copy.vue
  9. 56
      src/layout/menu/index.vue
  10. 2
      src/layout/tabbar/setting/index.vue
  11. 491
      src/router/routers copy.ts
  12. 295
      src/router/routers.ts
  13. 51
      src/views/configurationPage/MyUpdate.vue
  14. 93
      src/views/configurationPage/index.vue
  15. 63
      src/views/course/basicCourseInformation.vue
  16. 37
      src/views/course/components/course-brief.vue
  17. 39
      src/views/course/components/course-chapters.vue
  18. 243
      src/views/course/components/course-object.vue
  19. 70
      src/views/course/components/courseEdit.vue
  20. 199
      src/views/course/components/knowledge-statistic.vue
  21. 76
      src/views/message/components/messageContent.vue
  22. 2
      src/views/message/components/receiveContentList.vue
  23. 68
      src/views/message/components/sendMessage.vue
  24. 10
      src/views/message/components/sendMessageList.vue
  25. 8
      src/views/message/index.vue
  26. 101
      src/views/news/components/newsContentDetails.vue
  27. 113
      src/views/news/index.vue

@ -1,15 +1,5 @@
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
NODE_ENV = 'development'
VITE_APP_TITLE = '无糖运营平台'
<<<<<<< HEAD
# VITE_APP_BASE_API = 'http://127.0.0.1:8080'
VITE_APP_BASE_API = 'http://39.106.16.162:8080'
<<<<<<< HEAD
=======
http://localhost:5173/#/courseResourcesManagement/courseResources
>>>>>>> b0c11f6676b1ee245db7ea30ff02485e14c91a32
=======
# VITE_APP_BASE_API = 'http://127.0.0.1:8080'
VITE_APP_BASE_API = 'http://39.106.16.162:8080'
http://localhost:5173/#/courseResourcesManagement/courseResources
>>>>>>> 72be77b12b37cb07a7dd807572ca24163c368ce0

File diff suppressed because it is too large Load Diff

@ -0,0 +1,45 @@
import request from '@/utils/request'
import { tool } from '../utils/alioss.js'
import { ElLoading, ElMessage } from 'element-plus'
enum Api {
get系统配置 = '/api/systemSettings/save',
put系统配置 = '/api/systemSettings',
}
// 提示批量处理
const initOptions = { text: '加载中', success: '成功', error: '失败' }
function proxRequest(request, options: any = initOptions) {
return async (...arg) => {
if (!options) return request(...arg)
const loadingInstance = ElLoading.service({ text: options.text })
try {
await request(...arg)
ElMessage.success(options.success)
} catch (error) {
ElMessage.error(options.error)
} finally {
loadingInstance.close()
}
return request
}
}
export function uploadApi(file: File) {
if (file instanceof Object) return tool.oss.upload(file).then(res => res.url)
else return Promise.resolve(file)
}
export function getSysSettingApi() {
return request.get(Api.get系统配置)
}
export const proxGetSysSettingApi = proxRequest(getSysSettingApi)
export function putSysSettingApi(params: any) {
return request.put(Api.put系统配置, params)
}
export const proxPutSysSettingApi = proxRequest(putSysSettingApi, { success: '保存成功', error: '保存失败' })

@ -1,11 +1,11 @@
import request from '@/utils/request'
// 获取课程章节列表
export const getChaptersListApi = (params) => {
return request.get(`/chapter2/chapter?courseId=${params.id}`)
return request.get(`api/chapter2/chapter?courseId=${params.id}`)
}
// 添加课程章节
export const addChaptersApi = (params) => request.post('/chapter2/add', params)
export const addChaptersApi = (params) => request.post('api/chapter2/add', params)
// 删除课程章节
export const delChaptersApi = (id) => {
return request.delete(`/chapter2/delete/${id}`)
return request.delete(`api/chapter2/delete/${id}`)
}

@ -33,6 +33,6 @@ export const readMessagesBatch = (params) => {
return request.put(`/user-inbox/readmessagesbatch${parseParams(params)}`)
}
//发送邮件
export const SendMessageApi = (params) => {
return request.post(`/messages/addmessage${parseParams(params)}`)
export const SendMessageApi = (data) => {
return request.post(`/messages/addmessage`,data)
}

@ -1,6 +1,8 @@
import request from '@/utils/request'
// 获取目标类型
export const getObjectType = () => request.get(`/api/objectives_type/list`)
// 添加显示目标类型
export const getObjectType = (id) => {
return request.get(`/api/course_objectives/objectiveslist/${id}`)
}
// 修改目标内容
export const updateContents = (params) => {
return request.put(`/api/objective_contents/update`, params)

@ -5,3 +5,7 @@ export const sendMessagesApi = (params) => {
params,
})
}
//获取课程学生列表
export function getUserInfByCourse(userId) {
return request.get(`/api/coursesteacher/page/courseusers?userId=${userId}`);
}

@ -0,0 +1,81 @@
<template>
<!-- 根据路由动态生成菜单 -->
<template v-for="item in menuList" :key="item.path">
<!-- 没有子路由 -->
<template v-if="!item.children">
<el-menu-item
v-if="!item.meta.hidden"
:index="item.path"
@click="goToRoute"
>
<el-icon>
<component :is="item.meta.icon"></component>
</el-icon>
<template #title>
<!-- <el-icon>
<component :is="item.meta.icon"></component>
</el-icon> -->
<span v-show="!fold">{{ item.meta.title }}</span>
</template>
</el-menu-item>
</template>
<!-- 有子路由但是只有一个子路由 -->
<template v-if="item.children && item.children.length === 1">
<el-menu-item
v-if="!item.children[0].meta.hidden"
:index="item.children[0].path"
@click="goToRoute"
>
<el-icon>
<component :is="item.children[0].meta.icon"></component>
</el-icon>
<template #title>
<span v-show="!fold">{{ item.children[0].meta.title }}</span>
</template>
</el-menu-item>
</template>
<!-- 有子路由且有多个 -->
<el-sub-menu
:index="item.path"
v-if="item.children && item.children.length > 1"
>
<template #title>
<el-icon>
<component :is="item.meta.icon"></component>
</el-icon>
<span v-show="!fold">{{ item.meta.title }}</span>
</template>
<Menu :menuList="item.children" />
</el-sub-menu>
</template>
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router'
import { watch, ref } from 'vue'
import useLayoutSettingStoe from '@/store/modules/setting'
const LayoutSettingStoe = useLayoutSettingStoe()
// import { onMounted, reactive, ref, toRefs, watch } from 'vue'
//
const props = defineProps(['menuList'])
console.log(props.menuList);
const $router = useRouter()
const goToRoute = (vc: any) => {
$router.push(vc.index)
}
const fold = ref(false)
watch(
() => LayoutSettingStoe.fold,
(newVal) => {
setTimeout(() => {
fold.value = newVal
}, 200)
},
)
</script>
<script lang="ts">
export default {
name: 'Menu',
}
</script>
<style lang="scss" scoped></style>

@ -1,52 +1,16 @@
<template>
<!-- 根据路由动态生成菜单 -->
<template v-for="item in menuList" :key="item.path">
<!-- 没有子路由 -->
<template v-if="!item.children">
<el-menu-item
v-if="!item.meta.hidden"
:index="item.path"
@click="goToRoute"
>
<el-icon>
<component :is="item.meta.icon"></component>
</el-icon>
<template #title>
<!-- <el-icon>
<component :is="item.meta.icon"></component>
</el-icon> -->
<span v-show="!fold">{{ item.meta.title }}</span>
</template>
</el-menu-item>
</template>
<!-- 有子路由但是只有一个子路由 -->
<template v-if="item.children && item.children.length === 1">
<el-menu-item
v-if="!item.children[0].meta.hidden"
:index="item.children[0].path"
@click="goToRoute"
>
<el-icon>
<component :is="item.children[0].meta.icon"></component>
</el-icon>
<template #title>
<span v-show="!fold">{{ item.children[0].meta.title }}</span>
</template>
</el-menu-item>
</template>
<!-- 有子路由且有多个 -->
<el-sub-menu
:index="item.path"
v-if="item.children && item.children.length > 1"
>
<template v-for="(item, index) in menuList[0].children" :key="item.path">
<el-menu-item v-if="!item.meta.hidden" :index="item.path" @click="goToRoute">
<el-icon>
<component :is="item.meta.icon"></component>
</el-icon>
<template #title>
<el-icon>
<!-- <el-icon>
<component :is="item.meta.icon"></component>
</el-icon>
</el-icon> -->
<span v-show="!fold">{{ item.meta.title }}</span>
</template>
<Menu :menuList="item.children" />
</el-sub-menu>
</el-menu-item>
</template>
</template>
<script lang="ts" setup>
@ -56,7 +20,9 @@ import useLayoutSettingStoe from '@/store/modules/setting'
const LayoutSettingStoe = useLayoutSettingStoe()
// import { onMounted, reactive, ref, toRefs, watch } from 'vue'
//
defineProps(['menuList'])
const props = defineProps(['menuList'])
console.log(props.menuList)
const $router = useRouter()
const goToRoute = (vc: any) => {
$router.push(vc.index)

@ -11,7 +11,7 @@
/> -->
<el-button size="small" icon="refresh" circle @click="refresh" />
<el-button size="small" icon="FullScreen" circle @click="fullScreen" />
<el-button size="small" icon="Setting" circle />
<el-button size="small" icon="Setting" circle @click="$router.push('/configurationPage')"/>
<el-button
size="small"
icon="Link"

@ -0,0 +1,491 @@
import component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs';
import { pa } from 'element-plus/es/locales.mjs';
export const constantRoute: any = [
{
path: '/',
component: () => import('@/layout/index.vue'),
name: 'layout',
meta: {
title: '',
hidden: false,
icon: 'HomeFilled', // 菜单图标
},
// redirect: '/home',
// children: [
// {
// path: '/home',
// component: () => import('@/views/home/index.vue'),
// name: 'Home',
// meta: {
// title: '个人中心',
// hidden: false,
// icon: 'HomeFilled',
// },
// },
// ],
redirect: '/home',
children: [
{
path: '/home',
component: () => import('@/views/home/index.vue'),
name: 'Home',
meta: {
title: '个人中心',
hidden: false,
icon: 'HomeFilled',
},
},
{
path: '/configurationPage',
component: () => import('@/views/configurationPage/index.vue'),
name: 'configurationPage',
meta: {
title: '系统设置',
hidden: true,
icon: 'HomeFilled',
},
},
{
path: '/curriculumCenter/basicCourseInformation',
component: () => import('@/views/course/basicCourseInformation.vue'),
name: 'BasicCourseInformation',
meta: {
title: '课程基本信息',
hidden: false,
icon: 'Notebook',
},
},
{
path: '/curriculumCenter/courseDetails',
component: () => import('@/views/course/courseDetails.vue'),
name: 'CourseDetails',
meta: {
title: '课程详情',
hidden: false,
icon: 'Notebook',
},
},
{
path: '/curriculumCenter/CourseObjectives',
component: () => import('@/views/course/CourseObjectives.vue'),
name: 'CourseObjectives',
meta: {
title: '课程目标',
hidden: false,
icon: 'Notebook',
},
},
{
path: '/curriculumCenter/courseChapters',
component: () => import('@/views/course/courseChapters.vue'),
name: 'CourseChapters',
meta: {
title: '课程章节',
hidden: false,
icon: 'Notebook',
},
},
{
path: '/curriculumCenter/knowledgePoints',
component: () => import('@/views/course/knowledgePoints.vue'),
name: 'KnowledgePoints', // name 要与权限一致
meta: {
title: '知识点',
hidden: false,
icon: 'Notebook',
},
},
{
path: '/curriculumCenter/curriculumMap',
component: () => import('@/views/course/curriculumMap.vue'),
name: 'CurriculumMap', // name 要与权限一致
meta: {
title: '课程图谱',
hidden: false,
icon: 'Notebook',
},
},
],
},
{
path: '/knowledgeAtlas',
component: () => import('@/views/course/knowledgeAtlas.vue'),
name: 'knowledgeAtlas',
meta: {
title: '知识图谱',
hidden: true,
icon: 'Notebook',
},
},
// {
// path: '/mssageManagement',
// component: () => import('@/layout/index.vue'),
// name: 'MssageManagement',
// meta: {
// title: '',
// hidden: false,
// icon: 'HomeFilled', // 菜单图标
// },
// children: [
// {
// path: '/mssageManagement/message',
// component: () => import('@/views/message/index.vue'),
// name: 'Message',
// meta: {
// title: '消息',
// hidden: false,
// icon: 'ChatDotSquare',
// },
// },
// ],
// },
{
path: '/curriculumCenter',
redirect: '/curriculumCenter/basicCourseInformation',
component: () => import('@/layout/index.vue'),
name: 'CurriculumCenter',
meta: {
title: '课程',
hidden: false,
icon: 'HomeFilled', // 菜单图标
},
children: [
{
path: '/curriculumCenter/basicCourseInformation',
component: () => import('@/views/course/basicCourseInformation.vue'),
name: 'BasicCourseInformation',
meta: {
title: '课程基本信息',
hidden: false,
icon: 'Notebook',
},
},
{
path: '/curriculumCenter/courseDetails',
component: () => import('@/views/course/courseDetails.vue'),
name: 'CourseDetails',
meta: {
title: '课程详情',
hidden: false,
icon: 'Notebook',
},
},
{
path: '/curriculumCenter/CourseObjectives',
component: () => import('@/views/course/CourseObjectives.vue'),
name: 'CourseObjectives',
meta: {
title: '课程目标',
hidden: false,
icon: 'Notebook',
},
},
{
path: '/curriculumCenter/courseChapters',
component: () => import('@/views/course/courseChapters.vue'),
name: 'CourseChapters',
meta: {
title: '课程章节',
hidden: false,
icon: 'Notebook',
},
},
{
path: '/curriculumCenter/knowledgePoints',
component: () => import('@/views/course/knowledgePoints.vue'),
name: 'KnowledgePoints', // name 要与权限一致
meta: {
title: '知识点',
hidden: false,
icon: 'Notebook',
},
},
{
path: '/curriculumCenter/curriculumMap',
component: () => import('@/views/course/curriculumMap.vue'),
name: 'CurriculumMap', // name 要与权限一致
meta: {
title: '课程图谱',
hidden: false,
icon: 'Notebook',
},
},
],
},
{
path: '/studentManagement',
component: () => import('@/layout/index.vue'),
name: 'StudentManagement',
meta: {
title: '',
hidden: false,
icon: 'HomeFilled', // 菜单图标
},
children: [
{
path: '/studentManagement/student',
component: () => import('@/views/student/index.vue'),
name: 'Student',
meta: {
title: '学生',
hidden: false,
icon: 'User',
},
},
],
},
{
path: '/messageManagement',
component: () => import('@/layout/index.vue'),
name: 'MessageManagement',
meta: {
title: '消息',
hidden: false,
icon: 'ChatLineRound', // 菜单图标
},
children: [
{
path: '/messageManagement/message',
component: () => import('@/views/message/index.vue'),
name: 'Message',
meta: {
title: '消息详情',
hidden: false,
icon: 'ChatDotSquare',
}
},
{
path: '/messageManagement/sendMessage',
component: () => import('@/views/message/components/sendMessage.vue'),
name: 'SendMessage',
meta: {
title: '个人发出',
hidden: true,
icon: '',
}
},
{
path: '/messageContentList',
component: () => import('@/views/message/components/receiveContentList.vue'),
name: 'MessageContentList',
meta: {
title: '收到信息详情',
hidden: true,
icon: ''
}
},
{
path: '/sendMessageList',
component: () => import('@/views/message/components/sendMessageList.vue'),
name: 'SendMessageList',
meta: {
title: '发送信息详情',
hidden: true,
icon: ''
}
},
],
},
{
path: '/messageContent',
component: () => import('@/views/message/components/messageContent.vue'),
name: 'MessageContent',
meta: {
title: '写栈内信函',
hidden: true,
icon: 'EditPen',
}
},
{
path: '/news',
component: () => import('@/layout/index.vue'),
name: 'NewsManagement',
meta: {
title: '资讯',
hidden: false,
icon: 'BellFilled'
},
children: [
{
path: '/news/newsContent',
component: () => import('@/views/news/index.vue'),
name: 'NewsContent',
meta: {
title: '资讯管理',
hidden: false,
icon: 'BellFilled'
}
},
{
path: '/news/newsContentDetails',
component:()=>import('@/views/news/components/newsContentDetails.vue'),
name:'NewsContentDetails',
meta: {
title: '栏目添加新闻信息',
hidden: true,
icon: 'Promotion'
},
},
]
},
{
path: '/myCourseStudyManagement',
component: () => import('@/layout/index.vue'),
name: 'MyCourseStudyManagement',
meta: {
title: '学习过程',
hidden: false,
icon: 'HomeFilled', // 菜单图标
},
children: [
{
path: '/myCourseStudyManagement/learningProcess',
component: () => import('@/views/MyCourseStudy/learningProcess.vue'),
name: 'LearningProcess',
meta: {
title: '课程学习记录',
hidden: false,
icon: 'StarFilled',
},
},
{
path: '/myCourseStudyManagement/learningProcess1',
component: () =>
import('@/views/MyCourseStudy/knowledgeLearningProcess.vue'),
name: 'LearningProcess1',
meta: {
title: '知识点学习记录',
hidden: false,
icon: 'StarFilled',
},
},
{
path: '/myCourseStudyManagement/learningProcess2',
component: () => import('@/views/MyCourseStudy/resourceLearning.vue'),
name: 'LearningProcess2',
meta: {
title: '资源学习记录',
hidden: false,
icon: 'StarFilled',
},
},
{
path: '/myCourseStudyManagement/courseCollections',
component: () => import('@/views/MyCourseStudy/courseCollections.vue'),
name: 'CourseCollections',
meta: {
title: '课程收藏',
hidden: false,
icon: 'StarFilled',
},
},
{
path: '/myCourseStudyManagement/Courselikes',
component: () => import('@/views/MyCourseStudy/Courselikes.vue'),
name: 'Courselikes',
meta: {
title: '课程点赞',
hidden: false,
icon: 'StarFilled',
},
},
],
},
{
path: '/courseResourcesManagement',
component: () => import('@/layout/index.vue'),
name: 'CourseResourcesManagement',
meta: {
title: '课程资源',
hidden: false,
icon: 'HomeFilled', // 菜单图标
},
children: [
{
path: '/courseResourcesManagement/courseResources',
component: () => import('@/views/courseResources/index.vue'),
name: 'CourseResources',
meta: {
title: '课程资源',
hidden: false,
icon: 'Reading',
},
},
],
},
{
path: '/portal',
component: () => import('@/views/portal/view.vue'),
name: 'Portal',
meta: {
title: '门户',
hidden: false,
icon: 'HomeFilled', // 菜单图标
},
children: [
{
path: '/portal/webHome',
component: () => import('@/views/portal/index.vue'),
name: 'WebHome',
meta: {
title: '网站首页',
hidden: false,
icon: 'Reading',
},
},
{
path: '/portal/courseHome',
component: () => import('@/views/portal/courseHomepage.vue'),
name: 'CourseHome',
meta: {
title: '课程首页',
hidden: false,
icon: 'Reading',
},
},
{
path: '/portal/LearningPathRecommendations',
component: () =>
import('@/views/portal/LearningPathRecommendations.vue'),
name: 'LearningPathRecommendations',
meta: {
title: '学习路径推荐',
hidden: false,
icon: 'Reading',
},
},
{
path: '/portal/knowledgePointLearning',
component: () => import('@/views/portal/knowledgePointLearning.vue'),
name: 'KnowledgePointLearning',
meta: {
title: '知识点学习',
hidden: false,
icon: 'Reading',
},
},
{
path: '/portal/courseReports',
component: () => import('@/views/portal/courseReports.vue'),
name: 'CourseReports',
meta: {
title: '课程报告',
hidden: false,
icon: 'Reading',
},
},
],
},
{
path: '/curriculumCenter/largeScreen',
component: () => import('@/views/course/largeScreen.vue'),
name: 'LargeScreen', // name 要与权限一致
meta: {
title: '课程图谱',
hidden: true,
icon: 'Notebook',
},
},
]

@ -1,29 +1,13 @@
import component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs';
import { pa } from 'element-plus/es/locales.mjs';
export const constantRoute: any = [
{
path: '/',
component: () => import('@/layout/index.vue'),
name: 'layout',
meta: {
title: '',
title: '1',
hidden: false,
icon: 'HomeFilled', // 菜单图标
},
// redirect: '/home',
// children: [
// {
// path: '/home',
// component: () => import('@/views/home/index.vue'),
// name: 'Home',
// meta: {
// title: '个人中心',
// hidden: false,
// icon: 'HomeFilled',
// },
// },
// ],
redirect: '/home',
children: [
{
@ -36,51 +20,26 @@ export const constantRoute: any = [
icon: 'HomeFilled',
},
},
],
},
{
path: '/knowledgeAtlas',
component: () => import('@/views/course/knowledgeAtlas.vue'),
name: 'knowledgeAtlas',
meta: {
title: '知识图谱',
hidden: true,
icon: 'Notebook',
},
},
// {
// path: '/mssageManagement',
// component: () => import('@/layout/index.vue'),
// name: 'MssageManagement',
// meta: {
// title: '',
// hidden: false,
// icon: 'HomeFilled', // 菜单图标
// },
// children: [
// {
// path: '/mssageManagement/message',
// component: () => import('@/views/message/index.vue'),
// name: 'Message',
// meta: {
// title: '消息',
// hidden: false,
// icon: 'ChatDotSquare',
// },
// },
// ],
// },
{
path: '/curriculumCenter',
redirect: '/curriculumCenter/basicCourseInformation',
component: () => import('@/layout/index.vue'),
name: 'CurriculumCenter',
meta: {
title: '课程',
hidden: false,
icon: 'HomeFilled', // 菜单图标
},
children: [
{
path: '/configurationPage',
component: () => import('@/views/configurationPage/index.vue'),
name: 'configurationPage',
meta: {
title: '系统设置',
hidden: true,
icon: 'HomeFilled',
},
},
{
path: '/knowledgeAtlas',
component: () => import('@/views/course/knowledgeAtlas.vue'),
name: 'knowledgeAtlas',
meta: {
title: '知识图谱',
hidden: true,
icon: 'Notebook',
},
},
{
path: '/curriculumCenter/basicCourseInformation',
component: () => import('@/views/course/basicCourseInformation.vue'),
@ -97,7 +56,7 @@ export const constantRoute: any = [
name: 'CourseDetails',
meta: {
title: '课程详情',
hidden: false,
hidden: true,
icon: 'Notebook',
},
},
@ -107,7 +66,7 @@ export const constantRoute: any = [
name: 'CourseObjectives',
meta: {
title: '课程目标',
hidden: false,
hidden: true,
icon: 'Notebook',
},
},
@ -117,7 +76,7 @@ export const constantRoute: any = [
name: 'CourseChapters',
meta: {
title: '课程章节',
hidden: false,
hidden: true,
icon: 'Notebook',
},
},
@ -127,7 +86,7 @@ export const constantRoute: any = [
name: 'KnowledgePoints', // name 要与权限一致
meta: {
title: '知识点',
hidden: false,
hidden: true,
icon: 'Notebook',
},
},
@ -137,22 +96,10 @@ export const constantRoute: any = [
name: 'CurriculumMap', // name 要与权限一致
meta: {
title: '课程图谱',
hidden: false,
hidden: true,
icon: 'Notebook',
},
},
],
},
{
path: '/studentManagement',
component: () => import('@/layout/index.vue'),
name: 'StudentManagement',
meta: {
title: '',
hidden: false,
icon: 'HomeFilled', // 菜单图标
},
children: [
{
path: '/studentManagement/student',
component: () => import('@/views/student/index.vue'),
@ -163,19 +110,6 @@ export const constantRoute: any = [
icon: 'User',
},
},
],
},
{
path: '/messageManagement',
component: () => import('@/layout/index.vue'),
name: 'MessageManagement',
meta: {
title: '消息',
hidden: false,
icon: 'ChatLineRound', // 菜单图标
},
children: [
{
path: '/messageManagement/message',
component: () => import('@/views/message/index.vue'),
@ -184,92 +118,72 @@ export const constantRoute: any = [
title: '消息详情',
hidden: false,
icon: 'ChatDotSquare',
}
},
},
{
path: '/messageManagement/sendMessage',
component: ()=>import('@/views/message/components/sendMessage.vue'),
name:'SendMessage',
component: () => import('@/views/message/components/sendMessage.vue'),
name: 'SendMessage',
meta: {
title: '个人发出',
hidden: true,
icon: '',
}
},
},
{
path: '/messageContentList',
component:()=>import('@/views/message/components/indexContentList.vue'),
name:'MessageContentList',
component: () =>
import('@/views/message/components/receiveContentList.vue'),
name: 'MessageContentList',
meta: {
title: '收到信息详情',
hidden: true,
icon: ''
}
icon: '',
},
},
{
path: '/sendMessageList',
component:()=>import('@/views/message/components/sendMessageList.vue'),
name:'SendMessageList',
component: () =>
import('@/views/message/components/sendMessageList.vue'),
name: 'SendMessageList',
meta: {
title: '发送信息详情',
hidden: true,
icon: ''
}
icon: '',
},
},
{
path: '/messageContent',
component: () =>
import('@/views/message/components/messageContent.vue'),
name: 'MessageContent',
meta: {
title: '写栈内信函',
hidden: true,
icon: 'EditPen',
},
},
],
},
{
path: '/messageContent',
component: () => import('@/views/message/components/messageContent.vue'),
name: 'MessageContent',
meta:{
title: '写栈内信函',
hidden: true,
icon: 'EditPen',
}
},
{
path: '/news',
component: () => import('@/layout/index.vue'),
name:'NewsManagement',
meta: {
title: '资讯',
hidden: true,
icon: 'BellFilled'
},
children: [
{
path: '/news/newsContent',
component:()=>import('@/views/news/index.vue'),
name:'NewsContent',
component: () => import('@/views/news/index.vue'),
name: 'NewsContent',
meta: {
title: '资讯管理',
title: '资讯',
hidden: false,
icon: 'BellFilled'
}
icon: 'BellFilled',
},
},
{
path: '/news/newsContentDetails',
component:()=>import('@/views/news/components/newsContentDetails.vue'),
name:'NewsContentDetails',
component: () =>
import('@/views/news/components/newsContentDetails.vue'),
name: 'NewsContentDetails',
meta: {
title: '栏目添加新闻信息',
hidden: true,
icon: 'Promotion'
hidden: false,
icon: 'Promotion',
},
},
]
},
{
path: '/myCourseStudyManagement',
component: () => import('@/layout/index.vue'),
name: 'MyCourseStudyManagement',
meta: {
title: '学习过程',
hidden: false,
icon: 'HomeFilled', // 菜单图标
},
children: [
{
path: '/myCourseStudyManagement/learningProcess',
component: () => import('@/views/MyCourseStudy/learningProcess.vue'),
@ -283,7 +197,7 @@ export const constantRoute: any = [
{
path: '/myCourseStudyManagement/learningProcess1',
component: () =>
import('@/views/MyCourseStudy/knowledgeLearningProcess.vue'),
import('@/views/MyCourseStudy/knowledgeLearningProcess.vue'),
name: 'LearningProcess1',
meta: {
title: '知识点学习记录',
@ -321,18 +235,6 @@ export const constantRoute: any = [
icon: 'StarFilled',
},
},
],
},
{
path: '/courseResourcesManagement',
component: () => import('@/layout/index.vue'),
name: 'CourseResourcesManagement',
meta: {
title: '课程资源',
hidden: false,
icon: 'HomeFilled', // 菜单图标
},
children: [
{
path: '/courseResourcesManagement/courseResources',
component: () => import('@/views/courseResources/index.vue'),
@ -345,77 +247,4 @@ export const constantRoute: any = [
},
],
},
{
path: '/portal',
component: () => import('@/views/portal/view.vue'),
name: 'Portal',
meta: {
title: '门户',
hidden: false,
icon: 'HomeFilled', // 菜单图标
},
children: [
{
path: '/portal/webHome',
component: () => import('@/views/portal/index.vue'),
name: 'WebHome',
meta: {
title: '网站首页',
hidden: false,
icon: 'Reading',
},
},
{
path: '/portal/courseHome',
component: () => import('@/views/portal/courseHomepage.vue'),
name: 'CourseHome',
meta: {
title: '课程首页',
hidden: false,
icon: 'Reading',
},
},
{
path: '/portal/LearningPathRecommendations',
component: () =>
import('@/views/portal/LearningPathRecommendations.vue'),
name: 'LearningPathRecommendations',
meta: {
title: '学习路径推荐',
hidden: false,
icon: 'Reading',
},
},
{
path: '/portal/knowledgePointLearning',
component: () => import('@/views/portal/knowledgePointLearning.vue'),
name: 'KnowledgePointLearning',
meta: {
title: '知识点学习',
hidden: false,
icon: 'Reading',
},
},
{
path: '/portal/courseReports',
component: () => import('@/views/portal/courseReports.vue'),
name: 'CourseReports',
meta: {
title: '课程报告',
hidden: false,
icon: 'Reading',
},
},
],
},
{
path: '/curriculumCenter/largeScreen',
component: () => import('@/views/course/largeScreen.vue'),
name: 'LargeScreen', // name 要与权限一致
meta: {
title: '课程图谱',
hidden: true,
icon: 'Notebook',
},
},
]

@ -0,0 +1,51 @@
<template>
<el-upload ref="upload" class="upload-demo" action="#" :on-change="change" v-model:file-list="fileList" :limit="1"
:on-exceed="handleExceed" :auto-upload="false" list-type="picture-card">
<el-icon>
<Plus />
</el-icon>
<template #file="{ file }">
<div>
<img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
<span class="el-upload-list__item-actions">
<span class="el-upload-list__item-delete" @click="handleRemove">
<el-icon>
<Delete />
</el-icon>
</span>
</span>
</div>
</template>
</el-upload>
</template>
<script setup lang="ts">
import { ref, watch } from 'vue'
import type { UploadUserFile } from 'element-plus'
import { genFileId } from 'element-plus'
import { Delete, Plus } from '@element-plus/icons-vue'
const props = defineProps(['modelValue'])
const emit = defineEmits(['update:modelValue'])
watch(() => props.modelValue, newVal => {
if (!newVal) return
fileList.value.length = 0
fileList.value.push({ url: props.modelValue })
}, { once: true })
const fileList = ref<UploadUserFile[]>([])
const handleRemove = () => {
fileList.value.length = 0
change({ raw: false })
}
function change(file: any) {
emit('update:modelValue', file.raw)
}
const upload = ref()
const handleExceed = (files) => {
upload.value!.clearFiles()
const file = files[0]
file.uid = genFileId()
upload.value!.handleStart(file)
}
</script>

@ -0,0 +1,93 @@
<template>
<div class="configuration-page">
<el-form :model="form" label-width="auto" style="max-width: 600px">
<el-form-item label="LOGO">
<my-update v-model="form.logo"></my-update>
</el-form-item>
<el-form-item label="项目名称">
<el-input v-model="form.name" />
</el-form-item>
<p>门户宣传图配置</p>
<el-form-item label="门户头部宣传大图">
<my-update v-model="form.promotionalImages"></my-update>
</el-form-item>
<el-form-item label="门户首页">
<el-input v-model="form.home" />
</el-form-item>
<el-form-item label="后台登陆首页地址">
<el-input v-model="form.loginAddress" />
</el-form-item>
<el-form-item label="系统标题">
<el-input v-model="form.title" />
</el-form-item>
<el-form-item label="版权信息">
<el-input v-model="form.copyrightInformation" />
</el-form-item>
<el-form-item label="备案号">
<el-input v-model="form.recordNumber" />
</el-form-item>
<el-form-item label="qq">
<el-input v-model="form.qqNumber" />
</el-form-item>
<el-form-item label="邮箱">
<el-input v-model="form.mailbox" />
</el-form-item>
<el-form-item label="电话">
<el-input v-model="form.phone" />
</el-form-item>
<el-form-item label="联系地址">
<el-input v-model="form.address" />
</el-form-item>
<el-form-item label="二维码">
<my-update v-model="form.qrCode"></my-update>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">保存</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script lang="ts" setup>
import { getSysSettingApi, proxPutSysSettingApi, uploadApi } from '@/api/configuration';
import { ref, reactive } from 'vue'
import MyUpdate from './MyUpdate.vue';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore()
// do not use same name with ref
const form = reactive({
address: '',
copyrightInformation: '',
id: userStore.data.id,
loginAddress: '',
logo: '',
name: '',
phone: '',
promotionalImages: '',
qqNumber: '',
qrCode: '',
recordNumber: '',
title: '',
mailbox: '',
home:''
})
const ran = ref(false)
getSysSettingApi().then((res) => {
Object.assign(form, res.data)
ran.value = true
})
const onSubmit = async () => {
form.logo = await uploadApi(form.logo)
form.promotionalImages = await uploadApi(form.promotionalImages)
form.qrCode = await uploadApi(form.qrCode)
await proxPutSysSettingApi(form)
}
</script>
<style lang="scss" scoped>
.configuration-page {
width: 600px;
margin: auto;
}
</style>

@ -52,6 +52,7 @@ const getCourseList = async () => {
const res = await getCourseListApi(params.value)
courseList.value = res.data.list
total.value = res.data.total
console.log(res, 'courseres')
console.log(courseList.value, 'courseList.value')
loading.value = false
// console.log(userStore.userName, '1111')
@ -209,11 +210,7 @@ const CloseCouresNameChangeEvent = () => {
</el-form>
<div class="course">
<ul class="course_list">
<li
v-if="userStore.userInfo.roleId[0] === '1'"
@click="onAddCourse()"
class="add_course"
>
<li v-if="userStore.userInfo.roleId[0] === '1'" @click="onAddCourse()" class="add_course">
<div class="plus">
<el-icon class="avatar-uploader-icon">
<Plus />
@ -222,17 +219,8 @@ const CloseCouresNameChangeEvent = () => {
<h2 class="course_name">{{ course_name }}</h2>
</li>
<li v-for="item in courseList" :key="item.id">
<img
title="点击查看课程详情"
:src="item.img"
alt=""
@click="onGetCourseObject(item.id)"
/>
<h2
title="点击查看课程基本信息"
class="course_name"
@click="onEditCourse(item)"
>
<img title="点击查看课程详情" :src="item.img" alt="" @click="onGetCourseObject(item.id)" />
<h2 title="点击查看课程基本信息" class="course_name">
{{ item.name }}
</h2>
<p class="teacher_name">讲师{{ item.teacher }}</p>
@ -245,36 +233,22 @@ const CloseCouresNameChangeEvent = () => {
<el-icon class="del" @click="onDeleteCourse(item.id)">
<Delete />
</el-icon>
<el-button
class="object"
round
plain
@click="onGetCourseObject(item.id)"
>
查看课程详情
<el-button class="object" round plain @click="onGetCourseObject(item.id)">
详情
</el-button>
<el-button class="object1" round plain @click="onEditCourse(item)">
编辑
</el-button>
</li>
</ul>
</div>
<el-pagination
v-model:current-page="params.pageNo"
v-model:page-size="params.pageSize"
:page-sizes="[2, 5, 7, 10]"
:background="true"
layout="jumper,total, sizes, prev, pager, next "
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
style="margin-top: 10px; justify-content: center"
/>
<el-pagination v-model:current-page="params.pageNo" v-model:page-size="params.pageSize"
:page-sizes="[2, 5, 7, 10]" :background="true" layout="jumper,total, sizes, prev, pager, next " :total="total"
@size-change="handleSizeChange" @current-change="handleCurrentChange"
style="margin-top: 10px; justify-content: center" />
</div>
<course-edit
ref="drawer"
@success="onSuccess"
@couresNameChange="couresNameChangeEvent"
@CloseCouresNameChange="CloseCouresNameChangeEvent"
:flog="flog"
></course-edit>
<course-edit ref="drawer" @success="onSuccess" @couresNameChange="couresNameChangeEvent"
@CloseCouresNameChange="CloseCouresNameChangeEvent" :flog="flog"></course-edit>
</div>
</div>
</template>
@ -320,6 +294,7 @@ const CloseCouresNameChangeEvent = () => {
}
.course {
// display: flex;
// flex: 0 0 25%;
// justify-content: space-between;
@ -399,6 +374,12 @@ const CloseCouresNameChangeEvent = () => {
margin-left: 180px;
margin-top: -29px;
}
.object1 {
position: absolute;
margin-left: 250px;
margin-top: -29px;
}
}
.plus {

@ -26,20 +26,23 @@ onMounted(() => {
</script>
<template>
<div class="grid-content course-brief" style="height: 350px">
<h1 style="text-align:">课程基本信息</h1>
<h1 style="text-align:">
{{ courseDetails.name }}
<span>主讲教师{{ courseDetails.teacher }}</span>
</h1>
<div class="box">
<div class="image">
<img :src="courseDetails.img" alt="" />
</div>
<div class="text">
<h2 class="title">
<!-- <h2 class="title">
{{ courseDetails.name }}
<span>主讲教师{{ courseDetails.teacher }}</span>
</h2>
</h2> -->
<div>
<h3>
课程简介:
<el-scrollbar height="70px">
<el-scrollbar height="143px">
<p class="pp">{{ courseDetails.description }}</p>
</el-scrollbar>
<!-- <textarea name="" id=""></textarea> -->
@ -87,9 +90,16 @@ onMounted(() => {
// display: block;
padding-top: 20px;
text-align: center;
font-size: 24px;
font-size: 26px;
font-weight: 700;
color: #333333ff;
span {
margin-left: 40px;
font-size: 18px;
line-height: 30px;
color: #8a8b99;
}
}
.box {
@ -135,13 +145,6 @@ onMounted(() => {
margin-bottom: 20px;
font-family: Inter, Inter;
color: #333333ff;
span {
margin-left: 40px;
font-size: 18px;
line-height: 30px;
color: #8a8b99;
}
}
h3 {
@ -161,23 +164,27 @@ onMounted(() => {
.brief {
border-radius: 4px;
width: 100%;
height: 50%;
height: 80%;
.ull {
display: flex;
flex-wrap: wrap;
margin-top: 10px;
align-content: space-around;
justify-content: space-between;
}
li {
// margin-top: 10px;
// padding-left: 10px;
margin-right: 80px;
font-size: 14px;
text-align: center;
margin-bottom: 15px;
margin-bottom: 10px;
p {
margin-top: 10px;
margin-top: 6px;
font-size: 16px;
}

@ -9,14 +9,15 @@ import {
delChaptersApi,
} from '@/api/user/chapter'
import { onMounted } from 'vue'
// const route = useRoute()
const route = useRoute()
// const router = useRouter()
// const courseId = ref()
const courseId = '719f91586a64413898253c5b7d046fd8'
const courseId = ref()
// const courseId = '719f91586a64413898253c5b7d046fd8'
onMounted(() => {
// courseId.value = route.query.id
// courseId.value = '719f91586a64413898253c5b7d046fd8'
courseId.value = route.query.id
console.log(courseId.value, 'route.query.id');
// courseId.value = '719f91586a64413898253c5b7d046fd8'
getChaptersList()
})
@ -106,7 +107,7 @@ const remove = async (node: Node, data: Tree) => {
})
}
//
const getDetails = (id: any) => {}
const getDetails = (id: any) => { }
const dataSource = ref<Tree[]>([
{
id,
@ -134,36 +135,18 @@ const dataSource = ref<Tree[]>([
<h1>课程章节</h1>
<!-- <button @click="getChaptersList">获取</button> -->
<div class="custom-tree-container">
<el-tree
style="max-width: 600px"
:data="dataSource"
node-key="id"
default-expand-all
:expand-on-click-node="false"
empty-text="暂无章节"
>
<el-tree style="max-width: 600px" :data="dataSource" node-key="id" default-expand-all
:expand-on-click-node="false" empty-text="暂无章节">
<template #default="{ node, data }">
<span class="custom-tree-node">
<span @click="getDetails(data.id)">{{ data.name }}</span>
<span>
<el-button
@click="append(data)"
circle
size="small"
type="primary"
plain
>
<el-button @click="append(data)" circle size="small" type="primary" plain>
<el-icon :size="15">
<Plus />
</el-icon>
</el-button>
<el-button
@click="remove(node, data)"
circle
size="small"
type="danger"
plain
>
<el-button @click="remove(node, data)" circle size="small" type="danger" plain>
<el-icon :size="15">
<Delete />
</el-icon>

@ -8,54 +8,67 @@ import {
delObjectContents,
addObjectContents,
getObjectContent,
getObjectType,
} from '@/api/user/object'
import { useRoute } from 'vue-router'
import { ITEM_RENDER_EVT } from 'element-plus/es/components/virtual-list/src/defaults.mjs'
const route = useRoute()
// const router = useRouter()
const courseId = ref(0)
const courseId = ref()
//
const data = ref({})
//
const params = ref({
content: '',
content: '请添加整体目标',
id: '',
objectiveId: '',
})
//
const list = ref([])
const getObject = async () => {
const res = await getObjectList({ id: courseId.value })
console.log(res, 'objectres')
data.value = res.data[0].courseObjectivesTrees
params.value = res.data[0].contents[0]
console.log(params.value, 'params.value')
console.log(data, 'data');
console.log(res.data, 'res.data[0].contents[0]');
Object.assign(params.value, res.data[0].contents[0])
// params.value = res.data[0].contents[0]
list.value = data.value.map(item => item.contents).flat()
console.log(list.value, 'list.value ');
console.log(data.value, 'data.value')
// content.value = res.data[0].contents[0].content
}
// console.log(content.value, 'content.value')
}
//
// const type = ref({
// id: '',
// typeName: '',
// })
// const getType = async () => {
// const res = await getObjectType()
// type.value = res.data.slice(1, 5)
// console.log(type.value, 'typeres')
// }
const type = ref({
id: '',
name: '',
})
const getType = async () => {
console.log(courseId, 'typecourse')
const res = await getObjectType(courseId.value)
type.value = res.data
console.log(res, 'typeres')
}
onMounted(() => {
courseId.value = route.query.id
console.log(courseId.value, 'courseid.vlue')
getObject()
getType()
})
//
const isEditing = ref(false)
const content = ref('')
const updateContent = () => {
isEditing.value = true
content.value = params.value.content
}
const content = ref('')
//
const saveContent = async () => {
console.log(params.value.content, ' params.value.content')
@ -73,6 +86,9 @@ const saveContent = async () => {
})
.then(async () => {
params.value.content = content.value
const res = await updateContents({
id: params.value.id,
objectiveId: params.value.objectiveId,
@ -81,8 +97,10 @@ const saveContent = async () => {
console.log(res, 'res')
ElMessage.success('保存成功!')
isEditing.value = false
})
.catch(() => {
}, () => {
//
ElMessage.info('您已取消操作')
})
@ -101,6 +119,9 @@ const delObject = async (id: any) => {
await delObjectContents(id).then(() => {
ElMessage.success('删除成功')
getObject()
}).catch((err: any) => {
// console.log(id, 'id')
ElMessage.error(err.response.data.message)
})
}
//
@ -126,7 +147,9 @@ const objectiveIds = ref(0)
const addObject = (item: any) => {
// console.log(id, 'id')
dialogVisible.value = true
flog.value = false
type.value.name = ''
formData.value.description = ''
// updateDisabledStatus()
objectiveIds.value = item.id
@ -157,6 +180,7 @@ const submit = async () => {
} else {
console.log(objectiveIds, 'objectiveIds')
await addObjectContents({
// id: type.value.id,
objectiveId: objectiveIds.value,
content: formData.value.description,
})
@ -181,13 +205,7 @@ const submit = async () => {
<template #header>
<div class="card-header">
<span>整体目标</span>
<el-button
type="primary"
:icon="Edit"
circle
plain
@click="updateContent"
></el-button>
<el-button type="primary" :icon="Edit" circle plain @click="updateContent"></el-button>
</div>
</template>
<div class="el-card__body" style="">
@ -204,7 +222,7 @@ const submit = async () => {
</div>
</div>
<div class="typeObject">
<ul v-for="item in data" :key="item.id">
<!-- <ul v-for="item in data" :key="item.id">
<li>
<div class="all">
<div class="left">
@ -243,24 +261,36 @@ const submit = async () => {
</div>
<el-divider style="margin: 0; width: 100%" />
</li>
</ul>
<el-dialog
v-if="dialogVisible"
v-model="dialogVisible"
:title="flog ? '编辑' : '新增'"
width="500"
:before-close="handleClose"
>
<el-form
:model="formData"
label-width="auto"
style="max-width: 600px"
>
<el-form-item label="内容" prop="description">
<el-input
v-model="formData.description"
placeholder="请输入内容"
></el-input>
</ul> -->
<el-scrollbar>
<li v-for="(obj, i) in list" :key="obj.id">
<span>目标{{ i + 1 }}{{ obj.content }}</span>
<div class="icon">
<el-button type="primary" :icon="Edit" circle size="small" plain @click="updateObjectContent(obj.id)" />
<el-button type="danger" :icon="Delete" circle size="small" plain @click="delObject(obj.id)" />
<span>{{ data.name }}</span>
</div>
</li>
</el-scrollbar>
<el-button @click="addObject" circle size="small" type="primary" plain class="addbutton">
<el-icon :size="15">
<Plus />
</el-icon>
</el-button>
<el-dialog v-if="dialogVisible" v-model="dialogVisible" :title="flog ? '编辑' : '新增'" width="500"
:before-close="handleClose">
<el-form :model="type">
<el-form-item label="目标类别">
<el-select v-model="type.name" placeholder="请选择目标类别">
<el-option v-for="item in type" :key="item.id" :label="item.name" :value="item.name"></el-option>
</el-select>
</el-form-item>
</el-form>
<el-form :model="formData" label-width="auto" style="max-width: 600px">
<el-form-item label="目标内容" prop="description">
<el-input v-model="formData.description" placeholder="请输入内容"></el-input>
</el-form-item>
</el-form>
<template #footer>
@ -268,6 +298,7 @@ const submit = async () => {
<el-button @click="close">取消</el-button>
<el-button type="primary" @click="submit">确定</el-button>
</div>
</template>
</el-dialog>
</div>
@ -275,6 +306,10 @@ const submit = async () => {
</div>
</template>
<style lang="scss" scoped>
li {
list-style-type: none; //
}
.el-tabs__item {
padding: 0 50px;
}
@ -367,65 +402,81 @@ const submit = async () => {
}
.typeObject {
width: 70%;
// height: 80%;
text-align: center;
width: 60%;
height: 80%;
// text-align: center;
border: 1px solid #dcdfe6;
margin-right: 35px;
padding: 20px;
position: relative;
// align-items: center;
ul:nth-child(-n + 3) {
border-bottom: none;
.icon {
margin-left: 700px;
// display: inline-block;
// position: absolute;
}
ul {
width: 90%;
border: 1px solid #dcdfe6;
// box-shadow: 1px -5px 6px rgba(153, 150, 150, 0.5);
.addbutton {
position: absolute;
right: 20px;
bottom: 20px;
}
.all {
display: flex;
width: 100%;
// box-shadow: 1px 1px 6px rgba(153, 150, 150, 0.5);
// align-content: center;
.left {
width: 20%;
display: flex;
justify-content: center;
border-right: 1px solid #dcdfe6;
flex-wrap: wrap;
align-content: center;
letter-spacing: 1px;
// align-items: center;
// ul:nth-child(-n + 3) {
// border-bottom: none;
// }
.icon {
margin-left: 10px;
}
// ul {
// width: 90%;
// border: 1px solid #dcdfe6;
.icon:hover {
cursor: pointer;
color: red;
}
}
// // box-shadow: 1px -5px 6px rgba(153, 150, 150, 0.5);
// }
.objectdetails {
padding-right: 20px;
width: 100%;
// border: 1px solid #8a8b99;
li {
width: 100%;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
// align-content: center;
align-items: center;
line-height: 1;
margin-top: 2px;
letter-spacing: 1px;
}
}
}
// .all {
// display: flex;
// width: 100%;
// // box-shadow: 1px 1px 6px rgba(153, 150, 150, 0.5);
// // align-content: center;
// .left {
// width: 20%;
// display: flex;
// justify-content: center;
// border-right: 1px solid #dcdfe6;
// flex-wrap: wrap;
// align-content: center;
// letter-spacing: 1px;
// .icon {
// margin-left: 10px;
// }
// .icon:hover {
// cursor: pointer;
// color: red;
// }
// }
// .objectdetails {
// padding-right: 20px;
// width: 100%;
// // border: 1px solid #8a8b99;
// li {
// width: 100%;
// display: flex;
// justify-content: space-between;
// flex-wrap: wrap;
// // align-content: center;
// align-items: center;
// line-height: 1;
// margin-top: 2px;
// letter-spacing: 1px;
// }
// }
// }
}
}
}

@ -28,13 +28,13 @@ const defaultForm = {
teacher: userStore.data.id,
img: '',
name: '',
category: ref(0),
nature: ref(0),
category: '',
nature: '',
code: '',
credit: '',
classhours: '',
assessmenttype: ref(0),
assessmentway: ref(0),
assessmenttype: '',
assessmentway: '',
teachermethod: '',
teacherway: '',
description: '',
@ -127,6 +127,14 @@ const rules = {
trigger: 'change',
},
],
description: [
{
required: true,
message: '请输入课程简介',
trigger: 'blur',
},
{ max: 500, message: '不能超过500个字符', trigger: 'blur' }
]
}
//
@ -243,20 +251,11 @@ const upload = async (option: any) => {
</script>
<template>
<el-drawer
:before-close="handleClose"
v-model="visibleDrawer"
direction="rtl"
:title="formModel.id ? '编辑课程' : '添加课程'"
>
<el-drawer :before-close="handleClose" v-model="visibleDrawer" direction="rtl"
:title="formModel.id ? '编辑课程' : '添加课程'">
<el-form :model="formModel" :rules="rules" ref="formRef">
<el-form-item label="课程封面" prop="img">
<el-upload
v-model="formModel.img"
class="avatar-uploader"
:http-request="upload"
:show-file-list="false"
>
<el-upload v-model="formModel.img" class="avatar-uploader" :http-request="upload" :show-file-list="false">
<img v-if="imgUrl" :src="imgUrl" class="avatar" />
<el-icon v-else class="avatar-uploader-icon">
<Plus />
@ -295,12 +294,8 @@ const upload = async (option: any) => {
</el-upload> -->
</el-form-item>
<el-form-item label="课程名称" prop="name">
<el-input
:disabled="nameDisabled"
style="width: 200px"
v-model="formModel.name"
@input="courseNameInput"
></el-input>
<el-input :disabled="nameDisabled" style="width: 200px" v-model="formModel.name"
@input="courseNameInput"></el-input>
</el-form-item>
<el-form-item label="课程类别" prop="category">
<el-radio-group v-model="formModel.category">
@ -316,25 +311,18 @@ const upload = async (option: any) => {
</el-radio-group>
</el-form-item>
<el-form-item label="课程编码" prop="code">
<el-input
style="width: 200px"
v-model="formModel.code"
:disabled="codeDisabled"
></el-input>
<el-input style="width: 200px" v-model="formModel.code" :disabled="codeDisabled"></el-input>
</el-form-item>
<el-form-item label="课程学分" prop="credit">
<el-input style="width: 200px" v-model="formModel.credit"></el-input>
</el-form-item>
<el-form-item label="课程学时" prop="classhours">
<el-input
style="width: 200px"
v-model="formModel.classhours"
></el-input>
<el-input style="width: 200px" v-model="formModel.classhours"></el-input>
</el-form-item>
<el-form-item label="考核类型" prop="assessmenttype">
<el-radio-group v-model="formModel.assessmenttype">
<el-radio value="1">考试</el-radio>
<el-radio value="2"></el-radio>
<el-radio value="2"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="考核方式" prop="assessmentway">
@ -344,14 +332,15 @@ const upload = async (option: any) => {
<el-radio value="3">其他</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="教学方法" prop="teachermethod">
<!-- <el-form-item label="教学方法" prop="teachermethod">
<el-input type="textarea" v-model="formModel.teachermethod" />
</el-form-item>
<el-form-item label="教学方式" prop="teacherway">
<el-input type="textarea" v-model="formModel.teacherway" />
</el-form-item>
</el-form-item> -->
<el-form-item label="课程简介" prop="description">
<el-input type="textarea" v-model="formModel.description" />
<textarea name="" id="" v-model="formModel.description"></textarea>
<!-- <el-input class="brief_text" type="textarea" /> -->
</el-form-item>
</el-form>
@ -367,6 +356,17 @@ const upload = async (option: any) => {
</el-drawer>
</template>
<style lang="scss" scoped>
textarea {
width: 400px;
height: 180px;
resize: none;
border: 1px solid #dcdfe6;
color: #606266;
line-height: 1.3;
letter-spacing: 1px;
border-radius: 6px;
}
.avatar-uploader {
:deep() {
.avatar {

@ -2,63 +2,174 @@
import { ref, onMounted } from 'vue'
import * as echarts from 'echarts'
import 'echarts-liquidfill'
const liquidechart3 = ref(null) //
const liquidechart1 = ref(null) //
const liquidechart2 = ref(null) //
onMounted(() => {
const myChart3 = echarts.init(liquidechart3.value) // 使 ref
myChart3.setOption({
title: {
text: '目标完成度',
textStyle: {
color: '#888',
fontFamily: 'microsoft yahei',
fontSize: 24,
fontWeight: '400',
align: 'center',
verticalAlign: 'middle',
let chartDom = document.getElementById('main')
let myChart = echarts.init(chartDom)
let option
option = {
radar: [
{
nameGap: 10,
indicator: [
{
text: '目标一\n',
max: 100,
},
{
text: '目标五\n\n',
max: 100,
},
{
text: '目标四\n\n',
max: 100,
},
{
text: '目标三\n\n',
max: 100,
},
{
text: '目标二\n\n',
max: 100,
},
],
//
center: ['50%', '60%'],
//
radius: 100,
//
startAngle: 90,
//
splitNumber: 5,
shape: 'circle',
name: {
formatter: '{value}',
textStyle: {
color: '#333333',
fontSize: 16,
},
gap: 10,
},
splitArea: {
areaStyle: {
color: [
'transparent',
'transparent',
'rgba(114, 172, 209, 0)',
'transparent',
'rgba(114, 172, 209, 0)',
],
},
},
// 线
axisLine: {
lineStyle: {
color: '#C8D9FF',
},
},
splitLine: {
lineStyle: {
color: '#DADADA',
width: 2,
type: 'dashed', //dashed solid dotted 线线 线
},
},
},
left: 'center',
top: '20%',
},
series: [
{
type: 'liquidFill',
radius: '95%',
waveAnimation: true,
data: [0.3], //
direction: 'left',
itemStyle: {
normal: {
color: '#1890ff',
nameGap: 10,
indicator: [
{
text: '达成度',
max: 100,
},
{
text: '达成度',
max: 100,
},
{
text: '达成度',
max: 100,
},
{
text: '达成度',
max: 100,
},
{
text: '达成度',
max: 100,
},
],
center: ['50%', '60%'],
radius: 100,
startAngle: 90,
splitNumber: 1,
shape: 'circle',
splitArea: {
show: false,
},
outline: {
borderDistance: 3,
itemStyle: {
borderColor: '#4984ff',
borderWidth: 10,
axisLine: {
show: false,
},
name: {
formatter: '{value}',
textStyle: {
color: 'rgba(0,0,0,0.4)',
fontSize: 16,
},
},
itemStyle: {
opacity: 0.9,
splitLine: {
lineStyle: {
color: '#6093FF',
type: 'solid',
width: 8,
},
},
backgroundStyle: {
color: '#fff',
},
],
series: [
{
type: 'radar',
emphasis: {
lineStyle: {
width: 20,
},
},
label: {
show: true,
color: '#000',
insideColor: '#fff',
fontSize: 24,
fontWeight: 400,
align: 'center',
verticalAlign: 'middle',
symbol: 'none',
data: [
{
value: [74, 60, 80, 60, 74],
name: 'Data C',
areaStyle: {
color: '#DBE4F9',
},
},
],
},
{
type: 'radar',
emphasis: {
lineStyle: {
width: 20,
},
},
symbol: 'none',
data: [
{
value: [74, 60, 80, 40, 74],
name: 'Data B',
areaStyle: {
color: '#0052FF',
},
},
],
},
],
})
}
option && myChart.setOption(option)
const myChart1 = echarts.init(liquidechart1.value) // 使 ref
myChart1.setOption({
title: {
@ -170,7 +281,7 @@ onMounted(() => {
<div class="grid-content knowledge-statistic" style="height: 300px">
<!-- <h1>知识点统计</h1> -->
<div class="box">
<div style="width: 300px; height: 250px" ref="liquidechart3"></div>
<div style="width: 300px; height: 250px" id="main" class="radarmap"></div>
<div style="width: 300px; height: 250px" ref="liquidechart1"></div>
<div style="width: 300px; height: 250px" ref="liquidechart2"></div>
</div>
@ -181,6 +292,8 @@ onMounted(() => {
.knowledge-statistic {
display: flex;
align-content: center;
flex-direction: column;
align-items: center;
.box {
margin-top: 20px;

@ -18,8 +18,9 @@
<!-- 输入框内容-->
<el-input
v-model="inputPerson"
size="large"
placeholder="收件人:"
placeholder="收件人id:"
>
<template #append>
<el-button @click="addPerson = true">
@ -39,6 +40,11 @@
type="textarea"
placeholder="内容:"
/>
<el-input
v-model="userStore.data.id"
disabled
style="margin-top: 20px"
/>
<!--添加收件人信息-->
<el-dialog class="dialogType" v-model="addPerson" title="选择收件人">
<el-divider/>
@ -68,7 +74,7 @@
</div>
</div>
<div class="right-panel" style="flex: 1;">
<p>已选人:</p>
<p>已选人id:</p>
<el-divider/>
<li v-for="item in inputPerson">
<p>{{item}}</p>
@ -90,42 +96,53 @@
</div>
</template>
<script setup lang="ts">
import { ref} from 'vue'
// import { Search } from '@element-plus/icons-vue'
import { ref,onMounted,watch} from 'vue'
import { useRouter } from 'vue-router';
import { userStudentListService } from '@/api/user/user'
import { getUserInfByCourse } from '@/api/user/send.js'
import useUserStore from '@/store/modules/user'
import { ElMessageBox, ElMessage } from 'element-plus'
import {SendMessageApi} from "@/api/user/messag";
const inputPerson = ref([])
const inputPerson = ref('')
const inputText = ref('')
const textarea = ref('')
// const inputSearch = ref('')
const addPerson = ref(false)
const router = useRouter()
//
const userStore = useUserStore()
// console.log(userStore.userInfo.id,userStore.data.id,'dddddddd')
const stuList = ref([])
const formattedData = ref([])
//
const getStuList = async () => {
const res = await userStudentListService(userStore.data.id)
const res = await getUserInfByCourse(userStore.data.id)
stuList.value = res.data
// console.log(stuList.value, 'rrr')
dataForTree(stuList.value);//
};
//
const dataForTree = (data) => {
// name
const formatted = data.map(student => ({
label: student.name,
value: student.name, // value
// children: [],
}));
formattedData.value = formatted;
};
getStuList()
onMounted(async () => {
try {
await getStuList();
formattedData.value = formatData(stuList.value);
} catch (error) {
ElMessage.error('加载数据失败');
}
});
//
function formatData(data) {
return data.map(course => ({
label: course.courseName,
children: course.usersInf.filter(student => !inputPerson.value.includes(student.id)).map(student => ({
label: student.receiverName,
value: student.id, // 使 id
})),
}));
}
// selectedStudents
watch(inputPerson, (newVal, oldVal) => {
inputPerson.value = newVal;
// formattedData
formattedData.value = formatData(stuList.value);
}, { deep: true });
//
const back= ()=>{
router.push('/messageManagement/message')
@ -133,6 +150,7 @@ const back= ()=>{
//
const confirm = ()=>{
addPerson.value = false
console.log(inputPerson.value,'inputPerson内容')
}
//
const disappoint = ()=>{
@ -145,11 +163,17 @@ const send = async () => {
cancelButtonText: '取消',
type: 'warning',
})
// console.log(inputPerson,'ddddd')
await SendMessageApi({
receiverId:inputPerson.id,
title:inputText,
content:textarea,
senderId:userStore.userInfo.id
receiverId: inputPerson.value,
title:inputText.value,
content:textarea.value,
senderId:userStore.data.id
}).then(()=>{
ElMessage({
message:'发送成功',
type:'success'
})
})
}
</script>
@ -165,7 +189,7 @@ const send = async () => {
margin-bottom: 30px;
}
.header p{
color: gainsboro;
color: white;
}
li{
list-style: none;

@ -15,7 +15,7 @@
<div class="header_content">
<span class="sender">发送人{{ Message.senderName }}</span>
<span class="time">发送时间{{ Message.sendTime }}</span>
<span class="read-status">是否阅读{{Message.isRead}}</span>
<span class="read-status">是否阅读{{Message.isRead ? '已读' : '未读' }}</span>
</div>
<div class="recipient">标题{{ Message.title }}</div>
<div class="content">

@ -11,12 +11,7 @@
<input type="checkbox" class="custom-checkbox" @change="toggleAll" :checked="allSelected" />
<p class="selected-count">已选 {{ selectedCount }} 条记录</p>
</div>
<li v-for="item in sendMessage"
:key="item.title"
class="message-list-item"
>
<!--添加悬浮删除按钮-->
<!-- <div class="message-list" @mouseover="hoveringOver = item.id" @mouseleave="hoveringOver = null">-->
<li v-for="item in sendMessage" :key="item.title" class="message-list-item">
<div class="message-list">
<!-- 添加勾选框 -->
<div class="message-check">
@ -28,7 +23,7 @@
<div class="message-content" @click="handleClick(item)">
<h2 class="message-title">{{item.title}}</h2>
<div class="message-details">
<span class="sender">收件人:{{item.receiverName}}</span>
<span class="sender">收件人:{{item.receiverUsers}}</span>
<span class="read-status">阅读人数{{item.readUserNum}}</span>
</div>
<div class="message-time">发送时间{{item.sendTime}}</div>
@ -44,7 +39,7 @@
<el-pagination
v-model:current-page="params.pageNo"
v-model:page-size="params.pageSize"
:page-sizes="[2,3, 5, 7, 10]"
:page-sizes="[4,3, 5, 7, 10]"
:background="true"
layout="jumper,total, sizes, prev, pager, next "
:total="total"
@ -64,7 +59,7 @@ import { ElMessageBox, ElMessage } from 'element-plus'
const userStore = useUserStore()
//
const params = ref({
userId: userStore.userInfo.id,
userId: userStore.data.id,
// userId: 4,
isAsc:true,
isDelete:0,
@ -72,13 +67,26 @@ const params = ref({
isSend:1,
// messageId:false,
pageNo:1,
pageSize:3,
sortBy:false,//
pageSize:4,
sortBy:false//
})
const total = ref(0)
const sendMessage = ref([])
const loading = ref(false)
// const hoveringOver = ref(null)
//
const getSendMessageList = async () => {
loading.value = true
const res = await getSendMessagesListApi(params.value)
sendMessage.value = res.data.list
total.value = res.data.total
loading.value = false
console.log(sendMessage.value,'消息消息消息消息')
}
//
onMounted(() => {
getSendMessageList()
})
//
const selectedIds = ref([]); // ID
const allSelected = computed(() => {
@ -115,42 +123,7 @@ function toggleSelection(id: number) {
function isSelected(id) {
return selectedIds.value.includes(id);
}
//
const getSendMessageList = async () => {
loading.value = true
const res = await getSendMessagesListApi(params.value)
sendMessage.value = res.data.list
total.value = res.data.total
loading.value = false
}
//
onMounted(() => {
getSendMessageList()
})
//
// const deleteSendMessage = async (id: any) => {
// await ElMessageBox.confirm('', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning',
// })
// await deleteSendMessageApi({
// messageIds:id,
// userId:userStore.userInfo.id
// })
// .then(() => {
// console.log(id, 'id')
// getSendMessageList() //
// ElMessage.success('')
// // console.log(res)
// })
// .catch((err: any) => {
// console.log(id, 'id')
// ElMessage.error(err.response.data.message)
// })
//
// await getSendMessageList()
// }
//
const handleSizeChange = (size: any) => {
@ -246,7 +219,6 @@ li{
margin-left: auto; /* 发送时间靠右显示 */
font-size: 15px; /* 发送时间字体大小 */
color: #666; /* 发送时间颜色 */
position: absolute;
}
.message-list-item {
cursor: pointer; /* 鼠标悬停时显示手指形状,表示可点击 */

@ -13,9 +13,9 @@
</template>
<div class="container">
<div class="header_content">
<span class="sender">收件人{{ sendMessage.receiverName }}</span>
<span class="sender">收件人{{ sendMessage.receiveUsers}}</span>
<span class="time">发送时间{{ sendMessage.sendTime }}</span>
<span class="read-status">是否阅读{{sendMessage.isRead}}</span>
<!-- <span class="read-status">是否阅读{{sendMessage.isRead}}</span>-->
</div>
<div class="recipient">标题{{ sendMessage.title }}</div>
<div class="content">
@ -30,8 +30,11 @@
</template>
<script setup lang="ts">
import {useRouter,useRoute} from "vue-router";
import {ref} from "vue";
const router = useRouter()
const route = useRoute()
const receiveName = ref([])
// console.log(route.query.id,'id')
//
if(!Object.keys(route.query).length){
router.go(-1)
@ -40,10 +43,9 @@ if(!Object.keys(route.query).length){
const back = ()=>{
router.push('/messageManagement/sendMessage')
}
import {ref} from "vue";
//
const sendMessage = ref(route.query)
console.log(route.query.receiveUsers,'内容')
</script>
<style scoped>

@ -68,7 +68,7 @@ import {getMessagesListApi,deleteSendMessageApi,readMessagesBatch} from "@/api/u
import { ElMessageBox, ElMessage } from 'element-plus'
const userStore = useUserStore()
const params = ref({
userId: userStore.userInfo.id,
userId: userStore.data.id,
// userId: 4,
isAsc:true,
isDelete:0,
@ -142,7 +142,7 @@ const deleteMessage = async (id: any) => {
})
await deleteSendMessageApi({
messageIds:id,
userId:userStore.userInfo.id
userId:userStore.data.id
})
.then(() => {
console.log(id, '删除id')
@ -159,10 +159,10 @@ const deleteMessage = async (id: any) => {
}
//
const readMessage = async (id:any) =>{
console.log(id,userStore.userInfo.id,'dddddd')
console.log(id,userStore.data.id,'dddddd')
await readMessagesBatch({
messageIds:id,
userId:userStore.userInfo.id
userId:userStore.data.id
})
await getMessageList()
}

@ -6,17 +6,107 @@
<el-button type="primary" @click="back" plain round>返回</el-button>
</div>
</template>
<p v-for="o in 4" :key="o" class="text item">{{ 'List item ' + o }}</p>
<template #footer>Footer content</template>
<!-- 栏目内添加新闻-->
<el-form v-model="newsForm">
<el-form-item label="所属栏目id" label-width="140px">
<el-input v-model="newsForm.categoryId" autocomplete="off" />
</el-form-item>
<el-form-item label="文章内容" label-width="140px">
<el-input
v-model="newsForm.content"
style="font-size: 20px"
:rows="5"
type="textarea"
/>
</el-form-item>
<!-- <el-form-item label="文章id" label-width="140px">-->
<!-- <el-input v-model="newsForm.id" autocomplete="off" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="标题图片" label-width="140px">-->
<!-- <el-input v-model="newsForm.pic" autocomplete="off" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="发布时间" label-width="140px">-->
<!-- <el-input v-model="newsForm.publishTime" autocomplete="off" type="date"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="浏览次数" label-width="140px">-->
<!-- <el-input v-model="newsForm.readingNumber" autocomplete="off" />-->
<!-- </el-form-item>-->
<el-form-item label="发布状态" label-width="140px">
<el-input v-model="newsForm.status" placeholder="1:已发布 2:未发布" autocomplete="off" />
</el-form-item>
<el-form-item label="文章标题" label-width="140px">
<el-input v-model="newsForm.title" autocomplete="off" />
</el-form-item>
<!-- <el-form-item label="更新时间" label-width="140px">-->
<!-- <el-input v-model="newsForm.updateTime" autocomplete="off" type="date"/>-->
<!-- </el-form-item>-->
<el-form-item label="发布文章的用户id" label-width="140px">
<el-input v-model="newsForm.userId" autocomplete="off" readonly disabled/>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<!-- <el-button>取消</el-button>-->
<el-button type="primary" @click="addNewsContentConfirm">
提交
</el-button>
</div>
</template>
</el-card>
</template>
<script setup lang="ts">
import {useRouter} from "vue-router";
import {
addEssay,
} from "@/api/user/news.js"
import {ref} from 'vue';
import {ElButton,ElMessage,ElMessageBox } from 'element-plus'
import type { UploadProps, UploadUserFile } from 'element-plus'
import useUserStore from "@/store/modules/user";
const userStore = useUserStore()
import {useRouter,useRoute} from "vue-router";
const router = useRouter();
//routeid
const route = useRoute();
// console.log(route.query.id,'id')
const back = ()=>{
router.push('/news/newsContent')
}
//
const newsForm = ref({
categoryId:route.query.id,
content:'',
// file:'',
// id:'',
// pic:'',
publishTime:'',
readingNumber:'',
status:'',
title:'',
updateTime:'',
userId:userStore.data.id,
})
//
const addNewsContentConfirm = async (id)=>{
await addEssay({
categoryId:newsForm.value.categoryId,
content:newsForm.value.content,
// file:newsForm.value.file,
// id:newsForm.value.id,
// pic:newsForm.value.pic,
publishTime:newsForm.value.publishTime,
readingNumber:newsForm.value.readingNumber,
status:newsForm.value.status,
title:newsForm.value.title,
updateTime:newsForm.value.updateTime,
userId:newsForm.value.userId
}).then(()=>{
ElMessage({
message:'添加成功',
type:'success'
})
})
}
</script>
<style scoped>
@ -33,5 +123,10 @@ const back = ()=>{
.card-header span {
flex: 1; /* 使 span 占用可用空间,实现居中效果 */
text-align: center; /* 文本居中 */
font-size: 20px;
}
.dialog-footer{
display: flex;
justify-content: flex-end;
}
</style>

@ -5,14 +5,18 @@
<div class="common-layout">
<el-container>
<el-aside>
<div>
<el-button class="button-container_column" name="editColumnButton" @click="editHandle" round>栏目管理</el-button>
</div>
<div class="header-flex-container">
<ul class="header-list">
<li v-for="item in column">
<el-dropdown placement="right">
<div class="header-column" type="primary">
<span @mouseenter="EssayList(item.id)">{{ item.categoryName }}</span> <!-- 使用span代替p -->
</div>
<!-- 当前栏目新闻管理-->
<!--当前栏目新闻管理-->
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item>
@ -36,12 +40,11 @@
</el-dropdown>
</li>
</ul>
<div>
<el-button class="button-container_column" name="editColumnButton" @click="editHandle" round>栏目管理</el-button>
</div>
</div>
</el-aside>
<!-- 右侧-->
<!-- 新闻内容-->
<el-main>
<div class="mainContainer">
<div class="card-header">
@ -60,13 +63,10 @@
</el-card>
</div>
<div style="text-align: center">
<el-input
v-model="nowTimeNewsData.content"
style="font-size: 20px"
:rows="18"
type="textarea"
readonly
/>
<el-scrollbar class="scrollbarContent">
<span>{{ nowTimeNewsData.content }}</span>
<!-- <p>{{ nowTimeNewsData.content }}</p>-->
</el-scrollbar>
</div>
<el-card style="text-align: center">
<el-link href="https://element-plus.org" target="_blank" style="margin-right: 30px;font-size: 19px">关于我们</el-link>
@ -101,7 +101,7 @@
<el-input v-model="form.categoryName" autocomplete="off" />
</el-form-item>
<el-form-item label="栏目父id" label-width="140px">
<el-input v-model="form.categoryPid" autocomplete="off" />
<el-input v-model="form.categoryPid" autocomplete="off" readonly/>
</el-form-item>
<!-- <el-form-item label="创建时间" label-width="140px">-->
<!-- <el-input v-model="form.createTime" autocomplete="off" type="date"/>-->
@ -131,18 +131,6 @@
</div>
</template>
</el-dialog>
<!-- 新闻内容-->
<!-- 栏目内添加新闻-->
<el-dialog v-model="addNewsDialogFormVisible" title="添加新闻" width="500px">
<template #footer>
<div class="dialog-footer">
<el-button @click="addNewsDialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="addNewsContentConfirm">
提交
</el-button>
</div>
</template>
</el-dialog>
<!-- 修改新闻-->
<el-dialog v-model="editNewsDialogFormVisible" title="修改新闻" width="500px">
<el-form v-model="nowTimeNewsData">
@ -150,7 +138,13 @@
<el-input v-model="nowTimeNewsData.categoryId" autocomplete="off" readonly disabled/>
</el-form-item>
<el-form-item label="文章内容" label-width="140px">
<el-input v-model="nowTimeNewsData.content" autocomplete="off" />
<!-- <el-input v-model="nowTimeNewsData.content" autocomplete="off" />-->
<el-input
v-model="nowTimeNewsData.content"
style="font-size: 13px"
:rows="5"
type="textarea"
/>
</el-form-item>
<!-- <el-form-item label="文章文件" label-width="140px">-->
<!-- <el-input v-model="nowTimeNewsData.file" autocomplete="off" />-->
@ -221,7 +215,7 @@ const editNewsDialogFormVisible = ref(false)
const addNewsDialogFormVisibleButton = (id)=>{
// addNewsDialogFormVisible.value = true
router.push(`/news/newsContentDetails?id=${id}`)
columnId.value = id
// columnId.value = id
}
const nowTimeNewsData = ref({})
//
@ -231,28 +225,15 @@ const newViews = (listObject)=> {
//
const form = ref({
categoryName:'',
categoryPid:'',
categoryPid:0,
createTime:'',
creatorId:userStore.userInfo.id,
creatorId:userStore.data.id,
id:'',
sort:'',
status:'',
updateTime:''
})
//
const newsForm = ref({
categoryId:columnId,
content:'',
file:'',
id:'',
pic:'',
publishTime:'',
readingNumber:'',
status:'',
title:'',
updateTime:'',
userId:userStore.userInfo.id,
})
//
const CategoryList = async () => {
const res = await queryCategory()
@ -312,32 +293,7 @@ const EssayList = async (id)=>{
}
// console.log(essay.value,'essay')
}
//
const addNewsContentConfirm = async (id)=>{
addNewsDialogFormVisible.value = false
await addEssay({
categoryId:newsForm.value.categoryId,
content:newsForm.value.content,
// file:newsForm.value.file,
// id:newsForm.value.id,
// pic:newsForm.value.pic,
publishTime:newsForm.value.publishTime,
readingNumber:newsForm.value.readingNumber,
status:newsForm.value.status,
title:newsForm.value.title,
updateTime:newsForm.value.updateTime,
userId:newsForm.value.userId
}).then(()=>{
EssayList(id);
ElMessage({
message:'添加成功',
type:'success'
})
})
}
// mounted((id)=>{
// EssayList(id);
// })
//
const deleteNewsList = async (id)=>{
// console.log(id)
@ -392,6 +348,10 @@ const editNewsContentConfirm = async ()=>{
background: white;
margin-top: 20px;
height: 81vh;
overflow-y: auto;
}
.header-flex-container::-webkit-scrollbar {
width: 0px; /* 滚动条宽度 */
}
.header-list {
/*display: flex; !* 使li元素水平排列 *!*/
@ -425,7 +385,7 @@ const editNewsContentConfirm = async ()=>{
width: 100%;
}
.contentTitle{
color: red;
color: firebrick;
font-size: 30px;
text-align: center;
display: block;
@ -445,6 +405,8 @@ const editNewsContentConfirm = async ()=>{
}
.button-container_column{
position:absolute;
margin-top: 30px;
margin-left: 200px;
}
.news-flex-container {
display: flex; /* 使用 Flexbox 布局 */
@ -465,5 +427,14 @@ const editNewsContentConfirm = async ()=>{
.flex-container p:last-child {
margin-right: 0;
}
.scrollbarContent{
height:60vh;
border: 1px;
background: white;
border-radius: 1%;
font-size: 20px;
padding: 10px;
overflow-y: auto;
line-height: 2.0;
}
</style>
Loading…
Cancel
Save