develoop
fwb 3 months ago
parent 9106635460
commit 6775ac3bfc
  1. 2
      src/views/message/components/messageContent.vue
  2. 4
      src/views/message/components/receiveContentList.vue
  3. 2
      src/views/message/components/sendMessage.vue
  4. 4
      src/views/message/components/sendMessageList.vue
  5. 13
      src/views/message/index.vue
  6. 50
      src/views/news/components/newsContentManage.vue
  7. 2
      src/views/news/index.vue

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

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

@ -229,6 +229,6 @@ li{
cursor: pointer; /* 鼠标悬停时显示手指形状,表示可点击 */ cursor: pointer; /* 鼠标悬停时显示手指形状,表示可点击 */
} }
.message-list-item:hover{ .message-list-item:hover{
background-image: linear-gradient(60deg,powderblue,darkgrey,snow); background-image: linear-gradient(60deg,snow,darkgrey,snow);
} }
</style> </style>

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

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

@ -52,14 +52,18 @@
</template> </template>
<!-- 栏目内添加新闻--> <!-- 栏目内添加新闻-->
<el-form v-model="newsForm"> <el-form v-model="newsForm">
<el-form-item label="所属栏目id" label-width="140px"> <el-form-item label="所属栏目id" label-width="120px">
<el-input v-model="newsForm.categoryId" autocomplete="off" readonly/> <el-input v-model="newsForm.categoryId" autocomplete="off" readonly/>
</el-form-item> </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-input v-model="newsForm.categoryName" autocomplete="off" readonly/>
</el-form-item> </el-form-item>
<el-form-item label="文章内容" label-width="140px"> <el-form-item label="文章内容" label-width="120px">
<textarea style="width: 100%;height:320px" v-model="newsForm.content"></textarea> <textarea style="width: 100%;
height:320px;
border: 2px solid #d3d3d3;"
v-model="newsForm.content"
></textarea>
<!-- <el-input class="brief_text" type="textarea" /> --> <!-- <el-input class="brief_text" type="textarea" /> -->
</el-form-item> </el-form-item>
<!-- <el-form-item label="文章id" label-width="140px">--> <!-- <el-form-item label="文章id" label-width="140px">-->
@ -71,19 +75,19 @@
<!-- <el-form-item label="发布时间" label-width="140px">--> <!-- <el-form-item label="发布时间" label-width="140px">-->
<!-- <el-input v-model="newsForm.publishTime" autocomplete="off" type="date"/>--> <!-- <el-input v-model="newsForm.publishTime" autocomplete="off" type="date"/>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="浏览次数" label-width="140px"> <el-form-item label="浏览次数" label-width="120px">
<el-input v-model="newsForm.readingNumber" autocomplete="off" /> <el-input v-model="newsForm.readingNumber" autocomplete="off" />
</el-form-item> </el-form-item>
<el-form-item label="发布状态" label-width="140px"> <el-form-item label="发布状态" label-width="120px">
<el-input v-model="newsForm.status" placeholder="1:已发布 2:未发布" autocomplete="off" /> <el-input v-model="newsForm.status" placeholder="1:已发布 2:未发布" autocomplete="off" />
</el-form-item> </el-form-item>
<el-form-item label="文章标题" label-width="140px"> <el-form-item label="文章标题" label-width="120px">
<el-input v-model="newsForm.title" autocomplete="off" /> <el-input v-model="newsForm.title" autocomplete="off" />
</el-form-item> </el-form-item>
<!-- <el-form-item label="更新时间" label-width="140px">--> <!-- <el-form-item label="更新时间" label-width="140px">-->
<!-- <el-input v-model="newsForm.updateTime" autocomplete="off" type="date"/>--> <!-- <el-input v-model="newsForm.updateTime" autocomplete="off" type="date"/>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="发布文章的用户id" label-width="140px"> <el-form-item label="当前用户id" label-width="120px">
<el-input v-model="newsForm.userId" autocomplete="off" readonly disabled/> <el-input v-model="newsForm.userId" autocomplete="off" readonly disabled/>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -207,10 +211,10 @@
<span>关于我们</span> <span>关于我们</span>
<el-divider/> <el-divider/>
<el-form-item label="发布时间" label-width="100px"> <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>
<el-form-item label="文章内容" label-width="100px"> <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-input class="brief_text" type="textarea" /> -->
</el-form-item> </el-form-item>
<el-button @click="editConfirm" style="margin-left:45vh" type="primary" round>提交修改</el-button> <el-button @click="editConfirm" style="margin-left:45vh" type="primary" round>提交修改</el-button>
@ -474,13 +478,6 @@ const editConfirm =async ()=>{
text-align: center; /* 居中按钮 */ text-align: center; /* 居中按钮 */
width: 100%; width: 100%;
} }
.contentTitle{
color: firebrick;
font-size: 30px;
text-align: center;
display: block;
width: 100%; /* 或者设置一个具体的宽度 */
}
.flex-container { .flex-container {
display: flex; display: flex;
justify-content: space-between; /* 将内容平均分布,按钮自动靠右 */ justify-content: space-between; /* 将内容平均分布,按钮自动靠右 */
@ -497,15 +494,6 @@ const editConfirm =async ()=>{
position:absolute; position:absolute;
margin-left: 180px; 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-container p {
flex-grow: 1; /* 扩展剩余空间 */ flex-grow: 1; /* 扩展剩余空间 */
margin-right: 10px; /* 添加一些右侧间距以避免按钮与文本直接接触 */ margin-right: 10px; /* 添加一些右侧间距以避免按钮与文本直接接触 */
@ -516,16 +504,6 @@ const editConfirm =async ()=>{
.flex-container p:last-child { .flex-container p:last-child {
margin-right: 0; 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 { .card-header {
display: flex; /* 使用 Flexbox */ display: flex; /* 使用 Flexbox */
justify-content: space-between; /* 主轴上平均分配剩余空间 */ justify-content: space-between; /* 主轴上平均分配剩余空间 */

@ -50,7 +50,7 @@
<div style="text-align: center"> <div style="text-align: center">
<el-scrollbar class="scrollbarContent"> <el-scrollbar class="scrollbarContent">
<!-- <span>{{ nowTimeNewsData.content }}</span>--> <!-- <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> </el-scrollbar>
</div> </div>
</el-main> </el-main>

Loading…
Cancel
Save