|
@@ -28,6 +28,7 @@
|
|
|
:tableData="tableData"
|
|
|
:pagination="pagination"
|
|
|
:onChange="onChange"
|
|
|
+ @open="open"
|
|
|
></MessageList>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -36,12 +37,19 @@
|
|
|
<script setup name="MessageReminder">
|
|
|
import { reactive, computed, ref } from 'vue';
|
|
|
import useFetchTable from '@/hooks/useFetchTable';
|
|
|
-import { getMyMessages } from '@/api/my-workbenches';
|
|
|
+import {getMyMessages, setMyMessagesRead} from '@/api/my-workbenches';
|
|
|
import { MESSAGE_TYPE } from '@/config/constants';
|
|
|
import { dictToOptionList } from '@/utils/tool';
|
|
|
import MessageList from './message-list.vue';
|
|
|
import { useWorkStore } from '@/store';
|
|
|
+import NoticeList from "@/views/my-workbenches/workbenches/notice/notice-list.vue";
|
|
|
|
|
|
+const open = (notice) => {
|
|
|
+ setMyMessagesRead(notice.id).then(()=> {
|
|
|
+ search()
|
|
|
+ workStore.updateWorkCounts();
|
|
|
+ })
|
|
|
+};
|
|
|
const workStore = useWorkStore();
|
|
|
const tabs = [
|
|
|
{
|
|
@@ -66,10 +74,8 @@ const params = reactive({
|
|
|
});
|
|
|
|
|
|
const transParams = computed(() => {
|
|
|
- let types = params.types.join(',');
|
|
|
- if (!types.length && params.status === 'undefined') {
|
|
|
- types = Object.keys(MESSAGE_TYPE).join();
|
|
|
- }
|
|
|
+ // let types = params.types.join(',');
|
|
|
+ let types = Object.keys(MESSAGE_TYPE).join();
|
|
|
let status = eval(params.status);
|
|
|
return { ...params, types, status };
|
|
|
});
|