mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 13:56:45 +08:00
feat:锁定选中阶段 面授获取 公告 历史公告 项目积分规则 项目共享文档
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
<script>
|
||||
import { reactive, toRefs, onMounted } from "vue";
|
||||
import { getTask } from "../../api/indexTaskadd";
|
||||
import { noticeList } from "../../api/indexNotice";
|
||||
// import { toDate } from "../../api/method";
|
||||
export default {
|
||||
name: "NoticeHis",
|
||||
props: {
|
||||
@@ -35,11 +37,6 @@ export default {
|
||||
// "jwlfwefefweffjwofiewjffwefwowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefweffjwofiewjfowefjwlfwefwefwefwef",
|
||||
// pubtime: "2022-11-7 12:23:00",
|
||||
// },
|
||||
// {
|
||||
// id: 2,
|
||||
// content: "fjwofiewjfowefjwlfwefwefwefwef",
|
||||
// pubtime: "2022-11-7 12:23:00",
|
||||
// },
|
||||
],
|
||||
projectInfo: {},
|
||||
});
|
||||
@@ -50,12 +47,42 @@ export default {
|
||||
//下一步是把公告赋值给state.notice
|
||||
});
|
||||
};
|
||||
const setNoticeData = (tableData) => {
|
||||
let data = tableData;
|
||||
let array = [];
|
||||
data.map((item) => {
|
||||
let obj = {
|
||||
id: item.noticeId,
|
||||
content: item.notice,
|
||||
createId: item.createId,
|
||||
pubtime: item.createTime,
|
||||
};
|
||||
array.push(obj);
|
||||
});
|
||||
state.notice = array;
|
||||
};
|
||||
const getNotice = () => {
|
||||
noticeList(props.projectId)
|
||||
.then((res) => {
|
||||
console.log("获取公告列表成功");
|
||||
let result = res.data.data;
|
||||
if (result.length > 0) {
|
||||
setNoticeData(result);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取公告列表失败", err);
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
getTaskInfo();
|
||||
getNotice();
|
||||
});
|
||||
return {
|
||||
...toRefs(state),
|
||||
getTaskInfo,
|
||||
getNotice,
|
||||
setNoticeData,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user