|
@@ -6,7 +6,7 @@
|
|
<noticeBlock></noticeBlock>
|
|
<noticeBlock></noticeBlock>
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
|
- <el-card shadow="always" style="margin-top: 20px;">
|
|
|
|
|
|
+ <el-card shadow="always" v-action="'statistic.HomeStatistics.statistics'" v-ac style="margin-top: 20px;">
|
|
<todayData></todayData>
|
|
<todayData></todayData>
|
|
</el-card>
|
|
</el-card>
|
|
</div>
|
|
</div>
|
|
@@ -70,7 +70,7 @@ import { Bell } from '@element-plus/icons-vue';
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
|
|
|
|
import type { TabsPaneContext } from 'element-plus'
|
|
import type { TabsPaneContext } from 'element-plus'
|
|
-import { noticesTypesList, noticeDetail, noticeRead, noticePopup } from '@/api/notice/index';
|
|
|
|
|
|
+import {noticeListMine, noticesTypesList, noticeDetail, noticeRead, noticePopup } from '@/api/notice/index';
|
|
import showVue from '@/components/admin/buttons/show.vue';
|
|
import showVue from '@/components/admin/buttons/show.vue';
|
|
const api = 'system/notices/notice/mine';
|
|
const api = 'system/notices/notice/mine';
|
|
|
|
|
|
@@ -81,14 +81,30 @@ const activeName = ref(0)
|
|
const showAll = ref(false)
|
|
const showAll = ref(false)
|
|
const { data, query, search, reset, loading } = useGetList(api, true);
|
|
const { data, query, search, reset, loading } = useGetList(api, true);
|
|
const currentTableData = computed(() => data.value?.data);
|
|
const currentTableData = computed(() => data.value?.data);
|
|
|
|
+
|
|
const readNotice = () => {
|
|
const readNotice = () => {
|
|
noticeRead(notice.value.id).then(res => {
|
|
noticeRead(notice.value.id).then(res => {
|
|
- console.log(res);
|
|
|
|
|
|
+ // console.log(res);
|
|
search();
|
|
search();
|
|
})
|
|
})
|
|
centerDialogVisible.value = false
|
|
centerDialogVisible.value = false
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+const getFistNotice = async () => {
|
|
|
|
+ let param = query.value;
|
|
|
|
+ param.limit = 1;
|
|
|
|
+ await noticeListMine(param).then(res => {
|
|
|
|
+ let temp = res.data.shift(0);
|
|
|
|
+ if(temp){
|
|
|
|
+ if(showAll.value == true){
|
|
|
|
+ titleClick(temp);
|
|
|
|
+ }
|
|
|
|
+ notice.value = temp;
|
|
|
|
+ }else{
|
|
|
|
+ notice.value = {};
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+};
|
|
const initNoticeOtion = (params: object) => {
|
|
const initNoticeOtion = (params: object) => {
|
|
noticesTypesList(params).then(res => {
|
|
noticesTypesList(params).then(res => {
|
|
noticesTypes.value = res.data
|
|
noticesTypes.value = res.data
|
|
@@ -97,6 +113,12 @@ const initNoticeOtion = (params: object) => {
|
|
}
|
|
}
|
|
const go2page = () =>{
|
|
const go2page = () =>{
|
|
showAll.value = !showAll.value;
|
|
showAll.value = !showAll.value;
|
|
|
|
+ if(showAll.value == true){
|
|
|
|
+ if(notice.value.id){
|
|
|
|
+ titleClick(notice.value);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
const titleClick = (e) => {
|
|
const titleClick = (e) => {
|
|
@@ -115,9 +137,10 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
|
|
activeName.value = Number(tab?.props?.name)
|
|
activeName.value = Number(tab?.props?.name)
|
|
query.value.notice_type_id = tab.props.name;
|
|
query.value.notice_type_id = tab.props.name;
|
|
search();
|
|
search();
|
|
|
|
+ getFistNotice();
|
|
}
|
|
}
|
|
|
|
|
|
-onMounted(() => {
|
|
|
|
|
|
+onMounted(async () => {
|
|
noticePopup().then(res => {
|
|
noticePopup().then(res => {
|
|
if (res.data.id) {
|
|
if (res.data.id) {
|
|
centerDialogVisible.value = true;
|
|
centerDialogVisible.value = true;
|
|
@@ -127,8 +150,9 @@ onMounted(() => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
query.value.notice_type_id = activeName;
|
|
query.value.notice_type_id = activeName;
|
|
- search();
|
|
|
|
- initNoticeOtion({})
|
|
|
|
|
|
+ await search();
|
|
|
|
+ initNoticeOtion({})
|
|
|
|
+ getFistNotice();
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
|