feat:锁定选中阶段 面授获取 公告 历史公告 项目积分规则 项目共享文档

This commit is contained in:
宋文超
2022-11-21 15:12:23 +08:00
parent 0680168b75
commit 8dd1053fb4
9 changed files with 790 additions and 475 deletions

View File

@@ -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,
};
},
};