Compare commits

..

2 Commits

1 changed files with 31 additions and 18 deletions

View File

@ -64,7 +64,7 @@
</div>
<div style="margin: 0 30px 30px 30px;height: 700px;
display: flex;flex-direction: row;justify-content: space-between;align-items: stretch">
<div style="min-width: 60%; display: flex;flex-direction: column">
<div style="width: 60%; display: flex;flex-direction: column">
<div style="margin: 0 10px 0 10px;
display: flex;flex-direction: row;justify-content: space-between">
<p style="font-family: 'Segoe UI',sans-serif;font-size: 20px;font-weight: bold;color: #606266">详细信息</p>
@ -157,7 +157,7 @@
</div>
</div>
<div style="flex: 1;margin-left: 30px;display: flex;flex-direction: column;">
<div style="min-width: 40%;flex: 1;margin-left: 30px;display: flex;flex-direction: column;">
<div>
<p class="p-title" style="margin-left: 10px;width: 40%;float: left;">公告</p>
@ -175,7 +175,7 @@
<div style="width:100%;height:10%;float:left;">
<p @click="gbGgBosShow()"
style="width:20%;height:100%;float:left;color: #606266;line-height: 250%;cursor: pointer;"> &lt;&nbsp;返回</p>
<div style="width:60%;height:100%;float:left;line-height: 250%;text-align: center;">
<div style="min-width:60%;height:100%;float:left;line-height: 250%;text-align: center;">
<h3>{{ findGgInfoContent.announcementTitle }} </h3></div>
<div @click="showDelbox(findGgInfoContent.announcementId)"
style="width:20%;height:100%;float:right;color: #409EFF;line-height: 250%;text-align: center;cursor: pointer;">
@ -197,12 +197,20 @@
<div v-if="!findGgBoxShow">
<el-timeline>
<el-timeline-item timestamp="" placement="top" v-for="(item, index) in ggList" :key="index">
<el-row :gutter="12">
<el-card @click="findggInfo(item.announcementId)">
<h3
style="white-space: nowrap;text-overflow: ellipsis;-o-text-overflow: ellipsis; overflow: hidden;width:524px;cursor: pointer;">
style="white-space: nowrap;text-overflow: ellipsis;-o-text-overflow: ellipsis; overflow: hidden;width:524px;cursor: pointer;height:100%">
{{ item.announcementTitle }}</h3>
<p> {{ item.announcementPublisherName }} 发布于 {{ item.announcementPublishTime }}</p>
</el-card>
</el-row>
<!-- <el-card @click="findggInfo(item.announcementId)">
<h3
style="white-space: nowrap;text-overflow: ellipsis;-o-text-overflow: ellipsis; overflow: hidden;width:524px;cursor: pointer;height:100%">
{{ item.announcementTitle }}</h3>
<p> {{ item.announcementPublisherName }} 发布于 {{ item.announcementPublishTime }}</p>
</el-card> -->
</el-timeline-item>
</el-timeline>
</div>
@ -230,14 +238,14 @@
@edited="onEdited"/>
<!-- 新增公告框开始 -->
<el-dialog title="添加项目公告" v-model="centerDialogVisible" width="40%" center>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-dialog title="添加项目公告" :model-value="centerDialogVisible" @close="centerDialogVisible = false" width="40%" center>
<el-form ref="form" :model="messageForm" :rules="rules" label-width="100px">
<el-form-item label="标题" prop="addggbttxt">
<el-input type="text" placeholder="请输入项目公告标题" v-model="form.addggbttxt" maxlength="45" show-word-limit>
<el-input type="text" placeholder="请输入项目公告标题" v-model="messageForm.addggbttxt" maxlength="45" show-word-limit>
</el-input>
</el-form-item>
<el-form-item label="内容" prop="addggtextarea">
<el-input type="textarea" placeholder="请输入项目公告内容" v-model="form.addggtextarea" maxlength="1000" show-word-limit
<el-input type="textarea" placeholder="请输入项目公告内容" v-model="messageForm.addggtextarea" maxlength="1000" show-word-limit
:rows="10">
</el-input>
</el-form-item>
@ -255,7 +263,7 @@
<!-- 删除公告 -->
<el-dialog
title="提示"
v-model="dialogVisible"
:model-value="dialogVisible"
width="30%"
>
<div>确认删除该公告?</div>
@ -306,9 +314,9 @@ export default {
//
centerDialogVisible: false,
form: {
addggbttxt: "",
addggtextarea: '',
messageForm: {
addggbttxt:"",
addggtextarea:'',
},
rules: {
addggbttxt: [
@ -503,7 +511,7 @@ export default {
that.findGgBoxShow = true;
let data = response.data.data;
console.log(data);
data.announcementPublishTime = that.formatDate(data.announcementPublishTime)
data.announcementPublishTime = that.formatAnnouncementDate(data.announcementPublishTime)
that.findGgInfoContent = data;
}
})
@ -522,13 +530,13 @@ export default {
if (valid) {
console.log('submit')
let {...form} = this.form
// let {...form} = messageForm
request({
url: `project/${projectId}/announcement`,
method: 'post',
data: {
announcementContent: that.form.addggtextarea,
announcementTitle: that.form.addggbttxt,
announcementContent: that.messageForm.addggtextarea,
announcementTitle: that.messageForm.addggbttxt,
}
}).then((response) => {
if (response.data.code === 200) {
@ -570,7 +578,7 @@ export default {
let data = response.data.data;
console.log("公告");
data.records.forEach(item => {
item.announcementPublishTime = that.formatDate(item.announcementPublishTime)
item.announcementPublishTime = that.formatAnnouncementDate(item.announcementPublishTime)
})
that.ggList = data.records
console.log(that.ggList);
@ -602,6 +610,11 @@ export default {
return moment(date * 1000).format("yyyy年MM月DD日")
return '无'
},
formatAnnouncementDate(date) {
if (date)
return moment(date * 1000).format("yyyy年MM月DD日 HH:mm")
return '无'
},
getProjectInfo() {
const that = this
request({