feat:公告 历史公告 更改是否优秀 分页 组员名单对接 组员名单各操作

This commit is contained in:
songwc
2022-11-11 18:14:45 +08:00
parent ee03a13e6e
commit 6690a69d80
7 changed files with 752 additions and 276 deletions

View File

@@ -0,0 +1,105 @@
<!--发布公告-->
<template>
<!-- <div class="split"></div> -->
<div class="noticeconTitle">
<!-- <div class="notitle"><span class="titlespan">公告</span></div> -->
<div>公告内容</div>
<div>发布时间</div>
</div>
<div class="noticeContent">
<div v-for="item in notice" :key="item.id" class="item">
<div class="itemcontent">{{ item.content }}</div>
<div class="itemtime">{{ item.pubtime }}</div>
</div>
</div>
</template>s
<script>
import { reactive, toRefs, onMounted } from "vue";
import { getTask } from "../../api/indexTaskadd";
export default {
name: "NoticeHis",
props: {
projectId: {
type: Number,
default: null,
},
},
setup(props) {
const state = reactive({
noticeChecked: true,
notice: [
// {
// id: 1,
// content:
// "jwlfwefefweffjwofiewjffwefwowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefwef",
// pubtime: "2022-11-7 12:23:00",
// },
// {
// id: 2,
// content: "fjwofiewjfowefjwlfwefwefwefwef",
// pubtime: "2022-11-7 12:23:00",
// },
],
projectInfo: {},
});
const getTaskInfo = () => {
getTask({ projectId: props.projectId }).then((res) => {
console.log("公告获取项目", res.data.data.projectInfo);
state.projectInfo = res.data.data.projectInfo;
//下一步是把公告赋值给state.notice
});
};
onMounted(() => {
getTaskInfo();
});
return {
...toRefs(state),
getTaskInfo,
};
},
};
</script>
<style lang="scss">
.noticeconTitle {
// margin-left: 32px;
// margin-right: 32px;
// padding-top: 20px;
margin: 20px 32px 0 32px;
width: 70%;
// background-color: #bfa;
display: flex;
justify-content: space-between;
}
.noticeContent {
margin-top: 20px;
margin-left: 32px;
.item {
height: 66px;
width: 74%;
display: flex;
justify-content: space-between;
margin-bottom: 20px;
.itemcontent {
width: 500px;
word-break: break-all;
word-wrap: break-word;
// overflow: hidden;
// text-overflow: ellipsis;
white-space: wrap;
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 22px;
}
.itemtime {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 22px;
display: flex;
align-items: center;
}
}
}
</style>