|
@@ -37,7 +37,7 @@
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="JSON.stringify(currentTableData) === '{}'" style="display: flex;justify-content: center;">
|
|
|
+ <div v-if="JSON.stringify(notice) === '{}'" style="display: flex;justify-content: center;">
|
|
|
<label style="color: darkgray;"> 暂无新通知</label>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
@@ -83,10 +83,12 @@ const { data, query, search, reset, loading } = useGetList(api, true);
|
|
|
const currentTableData = computed(() => data.value?.data);
|
|
|
|
|
|
const readNotice = () => {
|
|
|
- noticeRead(notice.value.id).then(res => {
|
|
|
- // console.log(res);
|
|
|
- search();
|
|
|
- })
|
|
|
+ if(notice.value.id > 0 && notice.value.is_read == 0){
|
|
|
+ noticeRead(notice.value.id).then(res => {
|
|
|
+
|
|
|
+ })
|
|
|
+ search();
|
|
|
+ }
|
|
|
centerDialogVisible.value = false
|
|
|
}
|
|
|
const getFistNotice = async () => {
|
|
@@ -102,8 +104,8 @@ const getFistNotice = async () => {
|
|
|
}else{
|
|
|
notice.value = {};
|
|
|
}
|
|
|
-
|
|
|
})
|
|
|
+ query.value.limit = 10;
|
|
|
};
|
|
|
const initNoticeOtion = (params: object) => {
|
|
|
noticesTypesList(params).then(res => {
|
|
@@ -122,13 +124,17 @@ const go2page = () =>{
|
|
|
}
|
|
|
|
|
|
const titleClick = (e) => {
|
|
|
+ notice.value = e;
|
|
|
noticeDetail(e.id).then(res => {
|
|
|
console.log(res);
|
|
|
// centerDialogVisible.value = true;
|
|
|
notice.value.id = res.data.id
|
|
|
notice.value.title = res.data.title
|
|
|
notice.value.content = res.data.content
|
|
|
+
|
|
|
readNotice();
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -149,7 +155,7 @@ onMounted(async () => {
|
|
|
notice.value.content = res.data.content
|
|
|
}
|
|
|
})
|
|
|
- query.value.notice_type_id = activeName;
|
|
|
+ query.value.notice_type_id = activeName;
|
|
|
await search();
|
|
|
initNoticeOtion({})
|
|
|
getFistNotice();
|
|
@@ -188,7 +194,7 @@ onMounted(async () => {
|
|
|
}
|
|
|
.notice-item{
|
|
|
display: flex;
|
|
|
- margin-top: 5px;
|
|
|
+ margin-top: 15px;
|
|
|
}
|
|
|
.active{
|
|
|
color:#409EFF;
|