1 line
3.1 KiB
JSON
1 line
3.1 KiB
JSON
{"remainingRequest":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\system\\notice\\NoticeIcon.vue?vue&type=script&lang=js","dependencies":[{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\src\\views\\system\\notice\\NoticeIcon.vue","mtime":1732871026791},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\babel-loader\\lib\\index.js","mtime":1732872825017},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1732872824662},{"path":"D:\\data\\hanguodoushan\\acs2\\nladmin-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":1732872825835}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport crudNotice from './sysNotice'\r\nimport { NOTICE_MESSAGE_UPDATE, NOTICE_SHOW_MESSAGE } from './VueBaseCode'\r\nexport default {\r\n dicts: ['deal_status', 'have_read_type', 'notice_type'],\r\n name: 'NoticeIcon',\r\n data() {\r\n return {\r\n loading: false,\r\n visible: false,\r\n activeName: '1',\r\n // 未读消息数量\r\n notReadMsgCount: 0,\r\n // 消息内容\r\n notReadMsgList: []\r\n }\r\n },\r\n beforeMount() {\r\n this.getMessage()\r\n },\r\n mounted() {\r\n this.getMessage()\r\n this.receivedCount()\r\n this.$bus.on(NOTICE_MESSAGE_UPDATE, this.receivedCount) // 监听事件\r\n },\r\n destroyed() {\r\n this.$bus.off(NOTICE_MESSAGE_UPDATE)\r\n },\r\n methods: {\r\n /**\r\n * 打开列表页\r\n */\r\n fetchNotice() {\r\n if (this.visible) {\r\n this.visible = false\r\n this.loading = false\r\n } else {\r\n this.visible = true\r\n this.loading = true\r\n // 消息列表\r\n this.getMessage()\r\n }\r\n },\r\n getMessage() {\r\n crudNotice.pageByReceive().then(res => {\r\n this.notReadMsgList = res\r\n this.loading = false\r\n })\r\n },\r\n /**\r\n * 未读的消息数量\r\n */\r\n receivedCount() {\r\n // 查询当前用户的未读消息数量\r\n crudNotice.countByReceiveNotRead().then(res => {\r\n this.notReadMsgCount = res\r\n })\r\n },\r\n /**\r\n * 查看消息\r\n */\r\n showMessage(message) {\r\n // 标记已读\r\n crudNotice.read(message.notice_id).then(() => {\r\n this.receivedCount()\r\n })\r\n this.$bus.emit(NOTICE_SHOW_MESSAGE, message)\r\n this.visible = false\r\n },\r\n /**\r\n * 跳转到站内信界面\r\n */\r\n toSiteMessage() {\r\n this.$router.push({\r\n path: '/monitor/sysNotice'\r\n })\r\n this.visible = false\r\n },\r\n handleClick(tab, event) {\r\n // console.log(this.dict.notice_type)\r\n // console.log(tab, event)\r\n }\r\n }\r\n}\r\n",null]} |