master
Your Name 2 months ago
parent 46904b36c5
commit 85ba65f018
  1. 2
      teaching_integration_platform_admin_template/src/api/user/news.js
  2. 4
      teaching_integration_platform_admin_template/src/views/message/components/messageContent.vue
  3. 4
      teaching_integration_platform_admin_template/src/views/message/components/receiveContentList.vue
  4. 4
      teaching_integration_platform_admin_template/src/views/message/components/sendMessage.vue
  5. 4
      teaching_integration_platform_admin_template/src/views/message/components/sendMessageList.vue
  6. 15
      teaching_integration_platform_admin_template/src/views/message/index.vue
  7. 14
      teaching_integration_platform_admin_template/src/views/myMessage/index.vue
  8. 118
      teaching_integration_platform_admin_template/src/views/news/components/newsContentManage.vue
  9. 15
      teaching_integration_platform_admin_template/src/views/news/index.vue
  10. 114
      teaching_integration_platform_template/src/views/pedagogicalReform/index.vue
  11. 67
      teaching_integration_platform_template/src/views/scientificResearch/index.vue

@ -32,10 +32,12 @@ export function queryEssay(category_id) {
return request.get(`/api/cms-essay/query?category_id=${category_id}`);
}
//添加新闻文章
// export function addEssay(params){
// const str = parseParams(params)
// return request.post(`/api/cms-essay/add${str}`)
// }
export function addEssay(params) {
return request.post(`/api/cms-essay/add`, params);
}

@ -68,7 +68,9 @@
</div>
</el-dialog>
<template #footer>
<p>发送此站内信函即表示您已阅读并接受<el-link href="" target="_blank" type="primary">用户协议</el-link></p>
<div style="text-align: center;">
<p>发送此站内信函即表示您已阅读并接受<el-link href="" target="_blank" type="primary">用户协议</el-link></p>
</div>
</template>
</el-card>
</el-main>

@ -22,7 +22,7 @@
<!-- <div class="content">-->
<!-- 内容{{ Message.content }}-->
<el-form-item label="文章内容">
<textarea style="width: 100%;height:50vh" v-model="Message.content"></textarea>
<textarea style="width: 100%;height:55vh;border: 2px solid #d3d3d3;" v-model="Message.content"></textarea>
<!-- <el-input class="brief_text" type="textarea" /> -->
</el-form-item>
<!-- </div>-->
@ -62,7 +62,7 @@ const Message = ref(route.query)
.container {
padding: 10px; /* 容器内边距 */
margin-top: 10px; /* 容器上边距 */
height: 65vh;
height: 70vh;
}
.header_content {
margin-bottom: 10px; /* 与下面的收件人信息保持一定间距 */

@ -23,7 +23,7 @@
<div class="message-content" @click="handleClick(item)">
<h2 class="message-title">{{item.title}}</h2>
<div class="message-details">
<div>收件人:<span class="sender" v-for="o in item.receiveUsers" :key="o.id">{{o.receiverName}}</span></div>
<div>收件人:<span class="sender" v-for="receive in item.receiveUsers" :key="receive.id">{{receive.receiverName}}</span></div>
<span class="read-status">阅读人数{{item.readUserNum}}</span>
</div>
<div class="message-time">发送时间{{item.sendTime}}</div>
@ -229,6 +229,6 @@ li{
cursor: pointer; /* 鼠标悬停时显示手指形状,表示可点击 */
}
.message-list-item:hover{
background-image: linear-gradient(60deg,powderblue,darkgrey,snow);
background-image: linear-gradient(60deg,snow,darkgrey,snow);
}
</style>

@ -23,7 +23,7 @@
<!-- 内容{{ sendMessage.content }}-->
<!-- </div>-->
<el-form-item label="文章内容">
<textarea style="width: 100%;height:50vh" v-model="sendMessage.content"></textarea>
<textarea style="width: 100%;height:55vh;border: 2px solid #d3d3d3;" v-model="sendMessage.content"></textarea>
</el-form-item>
</div>
<!-- <template #footer>Footer content</template>-->
@ -86,7 +86,7 @@ const sendMessage = ref(item || {})
.container {
padding: 10px; /* 容器内边距 */
margin-top: 10px; /* 容器上边距 */
height: 65vh;
height: 70vh;
}
.header_content {
margin-bottom: 10px; /* 与下面的收件人信息保持一定间距 */

@ -31,15 +31,15 @@
<h2 class="message-title">{{item.title}}</h2>
<div class="message-details">
<span class="sender">发件人{{item.senderName}}</span>
<span class="read-status" style="margin-right: 40px">是否已读{{ item.isRead ? '已读' : '未读' }}</span>
<span class="read-status" style="margin-right: 40px">状态{{ item.isRead ? '已读' : '未读' }}</span>
<span class="read-status">已读人数{{item.readUserNum}} / {{item.userNum}}</span>
</div>
<div class="message-time">发送时间{{item.sendTime}}</div>
</div>
<!-- 删除按钮默认不显示hover时显示 -->
<div v-if="!item.isRead" style="margin-right: 10px">
<el-button v-if="hoveringOver === item.id" @click="readMessage(item.id)" type="warning" round>点击已读</el-button>
</div>
<!-- <div v-if="!item.isRead" style="margin-right: 10px">-->
<!-- <el-button v-if="hoveringOver === item.id" @click="readMessage(item.id)" type="warning" round>点击已读</el-button> -->
<!-- </div>-->
<el-button v-if="hoveringOver === item.id" @click="deleteMessage(item.id)" type="danger" round>删除</el-button>
</div>
<el-divider/>
@ -121,13 +121,14 @@ function isSelected(id) {
return selectedIds.value.includes(id);
}
//
//
const getMessageList = async () => {
loading.value = true
const res = await getMessagesListApi(params.value)
Message.value = res.data.list
total.value = res.data.total
loading.value = false
// console.log(Message.value,'')
}
//
onMounted(() => {
@ -159,7 +160,7 @@ const deleteMessage = async (id: any) => {
}
//
const readMessage = async (id:any) =>{
console.log(id,userStore.data.id,'dddddd')
// console.log(id,userStore.data.id,'dddddd')
await readMessagesBatch({
messageIds:id,
userId:userStore.data.id
@ -294,6 +295,6 @@ li{
}
.message-list-item:hover{
background-image: linear-gradient(60deg,powderblue,darkgrey,snow);
background-image: linear-gradient(60deg,snow,darkgrey,snow);
}
</style>

@ -31,15 +31,15 @@
<h2 class="message-title">{{item.title}}</h2>
<div class="message-details">
<span class="sender">发件人{{item.senderName}}</span>
<span class="read-status" style="margin-right: 40px">是否已读{{ item.isRead ? '已读' : '未读' }}</span>
<span class="read-status" style="margin-right: 40px">状态{{ item.isRead ? '已读' : '未读' }}</span>
<span class="read-status">已读人数{{item.readUserNum}} / {{item.userNum}}</span>
</div>
<div class="message-time">发送时间{{item.sendTime}}</div>
</div>
<!-- 删除按钮默认不显示hover时显示 -->
<div v-if="!item.isRead" style="margin-right: 10px">
<el-button v-if="hoveringOver === item.id" @click="readMessage(item.id)" type="warning" round>点击已读</el-button>
</div>
<!-- <div v-if="!item.isRead" style="margin-right: 10px">-->
<!-- <el-button v-if="hoveringOver === item.id" @click="readMessage(item.id)" type="warning" round>点击已读</el-button>-->
<!-- </div>-->
<el-button v-if="hoveringOver === item.id" @click="deleteMessage(item.id)" type="danger" round>删除</el-button>
</div>
<el-divider/>
@ -194,6 +194,10 @@ const sendContent = ()=>{
//
const handleClick = (item)=> {
// console.log(item)
//
if(!item.isRead){
readMessage(item.id)
}
//
router.push({ path: '/messageContentList', query: item })
}
@ -291,6 +295,6 @@ li{
}
.message-list-item:hover{
background-image: linear-gradient(60deg,powderblue,darkgrey,snow);
background-image: linear-gradient(60deg,snow,darkgrey,snow);
}
</style>

@ -47,44 +47,44 @@
<el-card class="container">
<template #header>
<div class="card-header">
<span>栏目添加新闻信息</span>
<span>添加当前栏目新闻信息</span>
</div>
</template>
<!-- 栏目内添加新闻-->
<el-form v-model="newsForm">
<el-form-item label="所属栏目id" label-width="140px">
<el-input v-model="newsForm.categoryId" autocomplete="off" readonly/>
</el-form-item>
<el-form-item label="所属栏目名称" label-width="140px">
<el-form-item label="所属栏目名称" label-width="120px">
<el-input v-model="newsForm.categoryName" autocomplete="off" readonly/>
</el-form-item>
<el-form-item label="文章内容" label-width="140px">
<textarea style="width: 100%;height:320px" v-model="newsForm.content"></textarea>
<!-- <el-input class="brief_text" type="textarea" /> -->
<el-form-item label="文章标题" label-width="120px">
<el-input v-model="newsForm.title" autocomplete="off" />
</el-form-item>
<el-form-item label="文章内容" label-width="120px">
<textarea style="width: 100%;
height:320px;
border: 2px solid #d3d3d3;"
v-model="newsForm.content"
></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 label="所属栏目id" label-width="120px">
<el-input v-model="newsForm.categoryId" autocomplete="off" style="width: 200px" readonly/>
</el-form-item>
<el-form-item label="发布状态" label-width="140px">
<el-input v-model="newsForm.status" placeholder="1:已发布 2:未发布" autocomplete="off" />
<el-form-item label="浏览次数" label-width="120px">
<el-input v-model="newsForm.readingNumber" autocomplete="off" style="width: 200px"/>
</el-form-item>
<el-form-item label="文章标题" label-width="140px">
<el-input v-model="newsForm.title" autocomplete="off" />
<el-form-item label="发布状态" label-width="120px">
<el-select v-model="newsForm.status" placeholder="请选择发布状态" style="width: 200px">
<el-option label="已发布" value="1" />
<el-option label="未发布" value="2" />
</el-select>
</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 label="当前用户id" label-width="120px">
<el-input v-model="newsForm.userId" autocomplete="off" style="width: 200px" readonly/>
</el-form-item>
</el-form>
<template #footer>
@ -127,24 +127,15 @@
<el-form-item label="栏目父id" label-width="140px">
<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"/>-->
<!-- </el-form-item>-->
<el-form-item label="创建该栏目的用户id" label-width="140px">
<el-input v-model="form.creatorId" autocomplete="off" readonly disabled/>
</el-form-item>
<!-- <el-form-item label="栏目id" label-width="140px">-->
<!-- <el-input v-model="form.id" autocomplete="off" />-->
<!-- </el-form-item>-->
<el-form-item label="排序" label-width="140px">
<el-input v-model="form.sort" autocomplete="off" />
</el-form-item>
<el-form-item label="是否显示" label-width="140px">
<el-input v-model="form.status" autocomplete="off" />
</el-form-item>
<!-- <el-form-item label="更新时间" label-width="140px">-->
<!-- <el-input v-model="form.updateTime" autocomplete="off" type="date"/>-->
<!-- </el-form-item>-->
</el-form>
<template #footer>
<div class="dialog-footer">
@ -158,39 +149,33 @@
<!-- 修改新闻-->
<el-drawer v-model="editNewsDialogFormVisible" title="修改新闻" width="500px">
<el-form v-model="nowTimeNewsData">
<el-form-item label="所属栏目id" label-width="140px">
<el-input v-model="nowTimeNewsData.categoryId" autocomplete="off" readonly disabled/>
<el-form-item label="文章标题" label-width="140px">
<el-input v-model="nowTimeNewsData.title" autocomplete="off" />
</el-form-item>
<el-form-item label="文章内容" label-width="140px">
<textarea style="width: 100%;height: 300px" v-model="nowTimeNewsData.content"></textarea>
<textarea style="width: 100%;height: 450px;border: 1px solid #d3d3d3;" v-model="nowTimeNewsData.content"></textarea>
<!-- <el-input class="brief_text" type="textarea" /> -->
</el-form-item>
<el-form-item label="所属栏目id" label-width="140px">
<el-input v-model="nowTimeNewsData.categoryId" autocomplete="off" style="width: 200px" readonly disabled/>
</el-form-item>
<!-- <el-form-item label="文章文件" label-width="140px">-->
<!-- <el-input v-model="nowTimeNewsData.file" autocomplete="off" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="文章id" label-width="140px">-->
<!-- <el-input v-model="nowTimeNewsData.id" autocomplete="off" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="标题图片" label-width="140px">-->
<!-- <el-input v-model="nowTimeNewsData.pic" autocomplete="off" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="发布时间" label-width="140px">-->
<!-- <el-input v-model="nowTimeNewsData.publishTime" autocomplete="off" type="date"/>-->
<!-- </el-form-item>-->
<el-form-item label="浏览次数" label-width="140px">
<el-input v-model="nowTimeNewsData.readingNumber" autocomplete="off" />
<el-input v-model="nowTimeNewsData.readingNumber" autocomplete="off" style="width: 200px" />
</el-form-item>
<el-form-item label="发布状态" label-width="140px">
<el-input v-model="nowTimeNewsData.status" placeholder="1:已发布 2:未发布" autocomplete="off" />
</el-form-item>
<el-form-item label="文章标题" label-width="140px">
<el-input v-model="nowTimeNewsData.title" autocomplete="off" />
<el-select v-model="nowTimeNewsData.status" placeholder="请选择发布状态" style="width: 200px">
<el-option label="已发布" value="1" />
<el-option label="未发布" value="2" />
</el-select>
</el-form-item>
<!-- <el-form-item label="更新时间" label-width="140px">-->
<!-- <el-input v-model="nowTimeNewsData.updateTime" autocomplete="off" type="date"/>-->
<!-- </el-form-item>-->
<el-form-item label="发布文章的用户id" label-width="140px">
<el-input v-model="nowTimeNewsData.userId" autocomplete="off" readonly disabled/>
<el-input v-model="nowTimeNewsData.userId" autocomplete="off" style="width: 200px" readonly disabled/>
</el-form-item>
</el-form>
<template #footer>
@ -207,10 +192,10 @@
<span>关于我们</span>
<el-divider/>
<el-form-item label="发布时间" label-width="100px">
<el-input v-model="aboutEssay.updateTime" autocomplete="off" readonly disabled/>
<el-input v-model="aboutEssay.updateTime" autocomplete="off" readonly/>
</el-form-item>
<el-form-item label="文章内容" label-width="100px">
<textarea v-model="aboutEssay.content" style="width: 100%;height: 75vh"></textarea>
<textarea v-model="aboutEssay.content" style="width: 100%;height: 75vh;border: 2px solid #d3d3d3;"></textarea>
<!-- <el-input class="brief_text" type="textarea" /> -->
</el-form-item>
<el-button @click="editConfirm" style="margin-left:45vh" type="primary" round>提交修改</el-button>
@ -252,7 +237,7 @@ const addNewsButton = (item)=>{
nowCategoryName.value = item.categoryName
}
const nowTimeNewsData = ref({})
console.log(userStore.data,'当前用户数据')
//
const newViews = (listObject)=> {
nowTimeNewsData.value = { ...listObject }
@ -376,6 +361,7 @@ const newsForm = ref({
title:'',
updateTime:'',
userId:userStore.data.id,
nickName:userStore.data.nickName
})
//
const addNewsContentConfirm = async (id)=>{
@ -404,7 +390,7 @@ const aboutContent = async (essay_id)=>{
aboutContentDrawer.value = true
const responseEssay = await queryEssayById('1')
aboutEssay.value = responseEssay.data
console.log(aboutEssay.value,'关于我们文章')
// console.log(aboutEssay.value,'')
}
//
const editConfirm =async ()=>{
@ -474,13 +460,6 @@ const editConfirm =async ()=>{
text-align: center; /* 居中按钮 */
width: 100%;
}
.contentTitle{
color: firebrick;
font-size: 30px;
text-align: center;
display: block;
width: 100%; /* 或者设置一个具体的宽度 */
}
.flex-container {
display: flex;
justify-content: space-between; /* 将内容平均分布,按钮自动靠右 */
@ -497,15 +476,6 @@ const editConfirm =async ()=>{
position:absolute;
margin-left: 180px;
}
.news-flex-container {
display: flex; /* 使用 Flexbox 布局 */
justify-content: space-between; /* 平均分配空间 */
align-items: center; /* 垂直居中对齐 */
}
.news-flex-container p {
flex: 1; /* 平均分配剩余空间 */
text-align: center; /* 文本居中显示 */
}
.flex-container p {
flex-grow: 1; /* 扩展剩余空间 */
margin-right: 10px; /* 添加一些右侧间距以避免按钮与文本直接接触 */
@ -516,16 +486,6 @@ const editConfirm =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;
}
.card-header {
display: flex; /* 使用 Flexbox */
justify-content: space-between; /* 主轴上平均分配剩余空间 */

@ -15,7 +15,7 @@
<template #dropdown>
<el-dropdown-menu>
<ul>
<li class="flex-container" @click="newViews(listObject)" v-for="listObject in essay" style="margin-bottom: 15px">
<li class="flex-container" @click="newViews(listObject)" v-for="listObject in essay">
<el-dropdown-item>
<el-tag type="info" size="large" style="height: 30px;font-size: 15px">
<p >{{listObject.title}}</p>
@ -50,7 +50,7 @@
<div style="text-align: center">
<el-scrollbar class="scrollbarContent">
<!-- <span>{{ nowTimeNewsData.content }}</span>-->
<textarea v-model="nowTimeNewsData.content" style="width: 100%;height: 65vh;border: none;"></textarea>
<textarea v-model="nowTimeNewsData.content" style="width: 100%;height: 65vh;border: none;" readonly></textarea>
</el-scrollbar>
</div>
</el-main>
@ -74,7 +74,6 @@ const column =ref([])
const CategoryList = async () => {
const res = await queryCategory()
column.value = res.data
console.log('栏目数组长度:',column.value.length)
//
if (column.value.length > 0) {
await EssayList(column.value[0].id);
@ -88,7 +87,11 @@ onMounted(() => {
})
const essay = ref([])
const nowTimeNewsData = ref({})
// console.log(nowTimeNewsData,'dsdsd')
//
const newViews = (listObject)=> {
nowTimeNewsData.value = { ...listObject }
}
//
const EssayList = async (id)=>{
const response = await queryEssay(id)
@ -97,10 +100,6 @@ const EssayList = async (id)=>{
newViews(essay.value[0]); //
}
}
//
const newViews = (listObject)=> {
nowTimeNewsData.value = { ...listObject }
}
</script>
<style scoped>
.header_title{

@ -1,14 +1,116 @@
<template>
<div>
111
<div class="header_title">
<span>资讯新闻</span>
<el-divider style="width: 800px"/>
</div>
<div class="container">
<div class="left">
<ul>
<li v-for="category in column" :key="category.id">
<div class="box">
<div class="categorySty">
<span>· {{category.categoryName}}</span>
</div>
<div style="margin-left: 10px">
<ul v-if="category.essays">
<li class="essaySty" v-for="essay in category.essays" :key="essay.id" @click="selectEssay(essay)">
<span>{{essay.title}}</span>
<span>{{essay.publishTime}}</span>
</li>
</ul>
</div>
</div>
</li>
</ul>
<el-divider/>
</div>
</div>
</template>
<script lang='ts' setup>
// import { onMounted, reactive, ref, toRefs, watch } from 'vue'
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
import {queryCategory,queryEssay} from '@/api/news'
const column = ref([])
const essayContent = ref({})
//
const CategoryList = async () => {
const res = await queryCategory()
column.value = res.data
// console.log(column.value,'')
}
const selectEssay =async (essay)=>{
essayContent.value = essay
// console.log(essayContent,'')
};
//
const fetchCategoriesAndEssays = async () => {
try {
const categoriesResponse = await queryCategory();
column.value = categoriesResponse.data;
//
for (const category of column.value) {
const essaysResponse = await queryEssay(category.id);
category.essays = essaysResponse.data || [];
console.log(category.essays,'s')
}
} catch (error) {
console.error('查找信息失败', error);
}
}
onMounted(() => {
CategoryList()
fetchCategoriesAndEssays()
})
</script>
<style lang='scss' scoped>
<style scoped>
.header_title{
font-size: 20px;
color: dodgerblue;
font-weight: bold;
margin-left:490px;
margin-top: 30px;
}
.left{
margin-left: 600px;
margin-top: 10px;
height: 85vh;
overflow-y: auto;
}
.left::-webkit-scrollbar {
width: 0px;
}
.box{
width: 502px;
margin-bottom: 5px;
}
.categorySty{
margin-bottom: 10px;
font-size: 25px;
font-weight: 550;
width: 560px;
height: 50px;
line-height: 50px;
/*background: #FFB21E;*/
}
.categorySty:hover{
background: gainsboro;
cursor: pointer;
}
.essaySty{
display: flex; /* 启用Flexbox布局 */
justify-content: space-between; /* 水平方向两端对齐 */
align-items: center; /* 垂直居中对齐 */
height: 40px;
line-height: 40px;
margin-bottom: 5px;
width:520px;
font-size: 20px;
margin-left: 30px;
/*background: #FFB21E;*/
}
.essaySty:hover{
background: gainsboro;
cursor: pointer;
}
</style>

@ -1,14 +1,67 @@
<template>
<div>
111
<div class="content">
<el-card style="max-width:800px;height: 80vh">
<template #header>
<div class="card-header">
<span>关于我们</span>
</div>
</template>
<div class="news_main">
<!-- {{ aboutEssay.content }}-->
<textarea v-model="aboutEssay.content" class="textSty"></textarea>
</div>
<!-- <template #footer>-->
<!-- <span>...</span>-->
<!-- </template>-->
</el-card>
</div>
</template>
<script lang='ts' setup>
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
<script setup>
import {ref,onMounted} from 'vue'
import {queryEssayById} from '@/api/news'
//
const aboutEssay = ref('')
const aboutContent = async (essay_id)=>{
const responseEssay = await queryEssayById('1')
aboutEssay.value = responseEssay.data
console.log(aboutEssay.value,'关于我们文章')
}
onMounted(()=>{
aboutContent()
})
</script>
<style lang='scss' scoped>
<style scoped>
.content{
display: flex;
justify-content: center;
}
.el-card{
width: 800px;
height: 80vh;
margin-top: 30px;
margin-bottom: 30px;
}
.card-header{
font-size: 25px;
color: #6da0ff;
text-align: center;
font-weight: bold;
}
.news_main{
padding: 20px;
height: 80vh;
font-size: 20px;
line-height: 1.5;
overflow-y: auto;
}
.textSty{
width: 100%;
height:65vh;
border: none;
}
.textSty::-webkit-scrollbar{
width: 0px;
}
</style>

Loading…
Cancel
Save