main
parent
6dd7eabba5
commit
9fdc400083
|
@ -53,9 +53,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin: 0 30px 30px 30px;
|
<div style="margin: 0 30px 30px 30px;height: 700px;
|
||||||
display: flex;flex-direction: row;justify-content: space-between;align-items: stretch">
|
display: flex;flex-direction: row;justify-content: space-between;align-items: stretch">
|
||||||
<div style="width: 60%; height: 100%;display: flex;flex-direction: column">
|
<div style="min-width: 60%; display: flex;flex-direction: column">
|
||||||
<div style="margin: 0 10px 0 10px;
|
<div style="margin: 0 10px 0 10px;
|
||||||
display: flex;flex-direction: row;justify-content: space-between">
|
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>
|
<p style="font-family: 'Segoe UI',sans-serif;font-size: 20px;font-weight: bold;color: #606266">详细信息</p>
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
<p>{{ project.projectCompany }}</p>
|
<p>{{ project.projectCompany }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row style="height: 160px">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<p class="p-subtitle">项目描述</p>
|
<p class="p-subtitle">项目描述</p>
|
||||||
<p>{{ project.projectDescription }}</p>
|
<p>{{ project.projectDescription }}</p>
|
||||||
|
@ -146,12 +146,58 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 1;margin-left: 30px;display: flex;flex-direction: column">
|
<div style="flex: 1;margin-left: 30px;display: flex;flex-direction: column;">
|
||||||
<p class="p-title" style="margin-left: 10px">公告</p>
|
|
||||||
<div style="flex:1;margin-top: 34px;padding: 20px;
|
<div>
|
||||||
display: flex;flex-direction: column; justify-content: space-between;background-color: white; border-radius: 10px;">
|
<p class="p-title" style="margin-left: 10px;width: 40%;float: left;">公告</p>
|
||||||
<p>{{ project.projectDescription }}</p>
|
<div style="width: 80px;height: 40px;float:right;">
|
||||||
|
<el-button @click="addggboxbtn()" type="primary">新增</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 公告具体内容 -->
|
||||||
|
<div
|
||||||
|
style="margin-top: 15px;padding: 8px;background-color: white; border-radius: 10px;flex:1;overflow: auto;position: relative;">
|
||||||
|
|
||||||
|
|
||||||
|
<div v-if="findGgBoxShow "
|
||||||
|
style="position: absolute;width:100%;height: 470px;left:0;top:0;background-color: #ffffff;z-index: 999;">
|
||||||
|
<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;"> < 返回</p>
|
||||||
|
<div style="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;">
|
||||||
|
删除
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
style="width:100%;height:7%;float:left;line-height: 250%;text-align: right;background:#EBEFF1;color: #898989;font-size:14px ">
|
||||||
|
日期:{{ findGgInfoContent.announcementPublishTime }}
|
||||||
|
发布人:{{ findGgInfoContent.announcementPublisherName }}
|
||||||
|
</div>
|
||||||
|
<div style="width:100%;height:80%;float:left;line-height: 120%;text-align: left;overflow: auto;">
|
||||||
|
{{ findGgInfoContent.announcementContent }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="!findGgBoxShow">
|
||||||
|
<el-timeline>
|
||||||
|
<el-timeline-item timestamp="" placement="top" v-for="(item, index) in ggList" :key="index">
|
||||||
|
<el-card @click="findggInfo(item.announcementId)">
|
||||||
|
<h3
|
||||||
|
style="white-space: nowrap;text-overflow: ellipsis;-o-text-overflow: ellipsis; overflow: hidden;width:524px;cursor: pointer;">
|
||||||
|
{{ item.announcementTitle }}</h3>
|
||||||
|
<p> {{ item.announcementPublisherName }} 发布于 {{ item.announcementPublishTime }}</p>
|
||||||
|
</el-card>
|
||||||
|
</el-timeline-item>
|
||||||
|
</el-timeline>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 公告具体内容结束 -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -171,6 +217,44 @@
|
||||||
:projectSubClasses="projectSubClasses"
|
:projectSubClasses="projectSubClasses"
|
||||||
:projectInfo="editProjectInfo"
|
:projectInfo="editProjectInfo"
|
||||||
@edited="onEdited"/>
|
@edited="onEdited"/>
|
||||||
|
<!-- 新增公告框开始 -->
|
||||||
|
|
||||||
|
<el-dialog title="添加项目公告" v-model="centerDialogVisible" width="40%" center>
|
||||||
|
<el-form ref="form" :model="form" :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>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="内容" prop="addggtextarea">
|
||||||
|
<el-input type="textarea" placeholder="请输入项目公告内容" v-model="form.addggtextarea" maxlength="1000" show-word-limit
|
||||||
|
:rows="10">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="addxtggsj('form')">确 定</el-button>
|
||||||
|
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 新增公告框结束 -->
|
||||||
|
<!-- 删除公告 -->
|
||||||
|
<el-dialog
|
||||||
|
title="提示"
|
||||||
|
v-model="dialogVisible"
|
||||||
|
width="30%"
|
||||||
|
:before-close="handleClose">
|
||||||
|
<div>确认删除该公告?</div>
|
||||||
|
<template #footer>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="delxtggsj()">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
@ -220,7 +304,29 @@ export default {
|
||||||
viewHeight: 0,
|
viewHeight: 0,
|
||||||
|
|
||||||
editProjectDialogVisible: false,
|
editProjectDialogVisible: false,
|
||||||
editProjectInfo: {}
|
editProjectInfo: {},
|
||||||
|
|
||||||
|
// 项目公告
|
||||||
|
ggList: [],
|
||||||
|
|
||||||
|
//表单
|
||||||
|
centerDialogVisible: false,
|
||||||
|
form: {
|
||||||
|
addggbttxt: "",
|
||||||
|
addggtextarea: '',
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
addggbttxt: [
|
||||||
|
{required: true, message: '请输入公告标题', trigger: 'blur'},
|
||||||
|
],
|
||||||
|
addggtextarea: [
|
||||||
|
{required: true, message: '请输入公告内容', trigger: 'blur'},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
findGgInfoContent: "",
|
||||||
|
findGgBoxShow: false,
|
||||||
|
dialogVisible: false,
|
||||||
|
delGGid: ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -279,7 +385,8 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.getProjectInfo();
|
this.getProjectInfo();
|
||||||
this.getProjectStats();
|
this.getProjectStats();
|
||||||
this.getProjectClass()
|
this.getProjectClass();
|
||||||
|
this.getannouncementList();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const that = this
|
const that = this
|
||||||
|
@ -289,13 +396,138 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 删除公告
|
||||||
|
delxtggsj() {
|
||||||
|
var that = this;
|
||||||
|
let projectId = this.$route.params.projectId;
|
||||||
|
let announcementId = that.delGGid;
|
||||||
|
request({
|
||||||
|
url: `project/${projectId}/announcement/${announcementId}`,
|
||||||
|
method: "DELETE",
|
||||||
|
})
|
||||||
|
.then((response) => {
|
||||||
|
if (response.data.code === 200) {
|
||||||
|
console.log("成功");
|
||||||
|
this.$message({
|
||||||
|
message: '删除成功',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
that.dialogVisible = false;
|
||||||
|
that.getannouncementList();
|
||||||
|
let data = response.data.data;
|
||||||
|
console.log(data);
|
||||||
|
//返回
|
||||||
|
that.gbGgBosShow();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
showDelbox(id) {
|
||||||
|
var that = this;
|
||||||
|
that.dialogVisible = true;
|
||||||
|
that.delGGid = id;
|
||||||
|
},
|
||||||
|
// 查看公告
|
||||||
|
findggInfo(announcementId) {
|
||||||
|
console.log("这里是查看公告")
|
||||||
|
var that = this;
|
||||||
|
let projectId = this.$route.params.projectId;
|
||||||
|
request({
|
||||||
|
url: `project/${projectId}/announcement/${announcementId}`,
|
||||||
|
method: "get",
|
||||||
|
})
|
||||||
|
.then((response) => {
|
||||||
|
if (response.data.code === 200) {
|
||||||
|
that.findGgBoxShow = true;
|
||||||
|
let data = response.data.data;
|
||||||
|
console.log(data);
|
||||||
|
data.announcementPublishTime = that.formatDate(data.announcementPublishTime)
|
||||||
|
that.findGgInfoContent = data;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
gbGgBosShow() {
|
||||||
|
this.findGgBoxShow = false;
|
||||||
|
},
|
||||||
|
// 提交新增公告
|
||||||
|
addxtggsj(formName) {
|
||||||
|
var that = this;
|
||||||
|
let projectId = this.$route.params.projectId;
|
||||||
|
this.$refs[formName].validate((valid) => {
|
||||||
|
|
||||||
|
if (valid) {
|
||||||
|
console.log('submit')
|
||||||
|
let {...form} = this.form
|
||||||
|
request({
|
||||||
|
url: `project/${projectId}/announcement`,
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
announcementContent: that.form.addggtextarea,
|
||||||
|
announcementTitle: that.form.addggbttxt,
|
||||||
|
}
|
||||||
|
}).then((response) => {
|
||||||
|
if (response.data.code === 200) {
|
||||||
|
console.log("成功");
|
||||||
|
this.$message({
|
||||||
|
message: '新增成功',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
that.getannouncementList();
|
||||||
|
that.centerDialogVisible = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('error submit!!')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 弹出新增公告框
|
||||||
|
addggboxbtn() {
|
||||||
|
this.centerDialogVisible = true;
|
||||||
|
console.log(this.centerDialogVisible)
|
||||||
|
|
||||||
|
},
|
||||||
|
// 查询公告
|
||||||
|
getannouncementList() {
|
||||||
|
var that = this;
|
||||||
|
let projectId = this.$route.params.projectId;
|
||||||
|
request({
|
||||||
|
url: `project/${projectId}/announcement`,
|
||||||
|
method: "get",
|
||||||
|
})
|
||||||
|
.then((response) => {
|
||||||
|
if (response.data.code === 200) {
|
||||||
|
|
||||||
|
let data = response.data.data;
|
||||||
|
console.log("公告");
|
||||||
|
data.records.forEach(item => {
|
||||||
|
item.announcementPublishTime = that.formatDate(item.announcementPublishTime)
|
||||||
|
})
|
||||||
|
that.ggList = data.records
|
||||||
|
console.log(that.ggList);
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
onEditProjectClick() {
|
onEditProjectClick() {
|
||||||
let {...copy} = this.project
|
let {...copy} = this.project
|
||||||
copy.projectStartDate = new Date(this.project.projectStartDate*1000)
|
copy.projectStartDate = new Date(this.project.projectStartDate * 1000)
|
||||||
copy.projectOnlineDate = new Date(this.project.projectOnlineDate*1000)
|
copy.projectOnlineDate = new Date(this.project.projectOnlineDate * 1000)
|
||||||
copy.projectFirstTestDate = new Date(this.project.projectFirstTestDate*1000)
|
copy.projectFirstTestDate = new Date(this.project.projectFirstTestDate * 1000)
|
||||||
copy.projectFinalTestDate = new Date(this.project.projectFinalTestDate*1000)
|
copy.projectFinalTestDate = new Date(this.project.projectFinalTestDate * 1000)
|
||||||
copy.projectEndDate = new Date(this.project.projectEndDate*1000)
|
copy.projectEndDate = new Date(this.project.projectEndDate * 1000)
|
||||||
|
|
||||||
this.editProjectInfo = copy
|
this.editProjectInfo = copy
|
||||||
//this.getProjectClass()
|
//this.getProjectClass()
|
||||||
|
@ -365,6 +597,31 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
// 公告开始
|
||||||
|
.gg-box {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
float: left;
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.gg-info-txt {
|
||||||
|
}
|
||||||
|
|
||||||
|
.gg-del-btn {
|
||||||
|
width: 12%;
|
||||||
|
height: 30px;
|
||||||
|
float: right;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 30px;
|
||||||
|
color: #409eff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 公告结束
|
||||||
|
|
||||||
.row-info {
|
.row-info {
|
||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue