走通消息管理接口调用
Showing
6 changed files
with
23 additions
and
18 deletions
| ... | @@ -68,7 +68,7 @@ VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service | ... | @@ -68,7 +68,7 @@ VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service |
| 68 | VITE_API_DATA_SYNC = ms-swzl-data-sync-service | 68 | VITE_API_DATA_SYNC = ms-swzl-data-sync-service |
| 69 | 69 | ||
| 70 | #消息接口 | 70 | #消息接口 |
| 71 | VITE_API_MESSAGE = ms-swzl-message-notification-service | 71 | VITE_API_MESSAGE = ms-daop-message-service |
| 72 | 72 | ||
| 73 | #新门户接口 | 73 | #新门户接口 |
| 74 | VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service | 74 | VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service | ... | ... |
| ... | @@ -109,7 +109,7 @@ VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service | ... | @@ -109,7 +109,7 @@ VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service |
| 109 | VITE_API_DATA_SYNC = ms-swzl-data-sync-service | 109 | VITE_API_DATA_SYNC = ms-swzl-data-sync-service |
| 110 | 110 | ||
| 111 | #消息接口 | 111 | #消息接口 |
| 112 | VITE_API_MESSAGE = ms-swzl-message-notification-service | 112 | VITE_API_MESSAGE = ms-daop-message-service |
| 113 | 113 | ||
| 114 | #企业信息接口 | 114 | #企业信息接口 |
| 115 | VITE_APP_PERSONAL_URL = ms-daop-personel-service | 115 | VITE_APP_PERSONAL_URL = ms-daop-personel-service | ... | ... |
| ... | @@ -159,9 +159,9 @@ export const getAllMessageList = (params) => request({ | ... | @@ -159,9 +159,9 @@ export const getAllMessageList = (params) => request({ |
| 159 | 159 | ||
| 160 | /** 获取消息数目 */ | 160 | /** 获取消息数目 */ |
| 161 | export const getMessageCount = (params) => request({ | 161 | export const getMessageCount = (params) => request({ |
| 162 | url: `${import.meta.env.VITE_API_MESSAGE}/message/data/message-cnt`, | 162 | url: `${import.meta.env.VITE_API_MESSAGE}/message/get-message-count`, |
| 163 | method: 'post', | 163 | method: 'get', |
| 164 | data: params | 164 | params |
| 165 | }) | 165 | }) |
| 166 | 166 | ||
| 167 | /** 将消息状态更新为已读 */ | 167 | /** 将消息状态更新为已读 */ | ... | ... |
| ... | @@ -10,7 +10,7 @@ import useKeepAliveStore from '@/store/modules/keepAlive' | ... | @@ -10,7 +10,7 @@ import useKeepAliveStore from '@/store/modules/keepAlive' |
| 10 | import useKeepAliveCompCache from '@/store/modules/keepAliveCompCache' | 10 | import useKeepAliveCompCache from '@/store/modules/keepAliveCompCache' |
| 11 | import useMenuStore from '@/store/modules/menu' | 11 | import useMenuStore from '@/store/modules/menu' |
| 12 | import { markRaw } from "vue"; | 12 | import { markRaw } from "vue"; |
| 13 | import { commonPageConfig } from "@/utils/enum"; | 13 | import { commonPageConfig, SystemGuid } from "@/utils/enum"; |
| 14 | import { | 14 | import { |
| 15 | Close | 15 | Close |
| 16 | } from "@element-plus/icons-vue"; | 16 | } from "@element-plus/icons-vue"; |
| ... | @@ -215,7 +215,9 @@ const getMessageList = (type = 1) => { | ... | @@ -215,7 +215,9 @@ const getMessageList = (type = 1) => { |
| 215 | pageIndex: type == 1 ? dealPageInfo.value.curr : pageInfo.value.curr, | 215 | pageIndex: type == 1 ? dealPageInfo.value.curr : pageInfo.value.curr, |
| 216 | pageSize: 50, | 216 | pageSize: 50, |
| 217 | tenantGuid: userData.tenantGuid, | 217 | tenantGuid: userData.tenantGuid, |
| 218 | staffGuid: userData.staffGuid | 218 | staffGuid: userData.staffGuid, |
| 219 | systemGuid: SystemGuid, | ||
| 220 | appSide: 1 | ||
| 219 | }; | 221 | }; |
| 220 | if (type == 1) { | 222 | if (type == 1) { |
| 221 | param.isFinish = 'N'; | 223 | param.isFinish = 'N'; |
| ... | @@ -254,7 +256,7 @@ const messageAllRead = () => { | ... | @@ -254,7 +256,7 @@ const messageAllRead = () => { |
| 254 | } | 256 | } |
| 255 | 257 | ||
| 256 | const createServerConnect = () => { | 258 | const createServerConnect = () => { |
| 257 | const websocketUrl = 'websocket-prod.zgsjzc.com'; //正式环境的 | 259 | const websocketUrl = 'http://192.168.6.20:29203/'; //测试环境的 |
| 258 | const ws = new WebSocket(`wss://${websocketUrl}/websocket/${userData.staffGuid}`); | 260 | const ws = new WebSocket(`wss://${websocketUrl}/websocket/${userData.staffGuid}`); |
| 259 | ws.onopen = function () { | 261 | ws.onopen = function () { |
| 260 | console.log('Connected to server.'); | 262 | console.log('Connected to server.'); |
| ... | @@ -272,15 +274,15 @@ const createServerConnect = () => { | ... | @@ -272,15 +274,15 @@ const createServerConnect = () => { |
| 272 | 274 | ||
| 273 | const getMsgCnt = () => { | 275 | const getMsgCnt = () => { |
| 274 | msgCntPromise.value = getMessageCount({ | 276 | msgCntPromise.value = getMessageCount({ |
| 275 | tenantGuid: userData.tenantGuid, | 277 | // tenantGuid: userData.tenantGuid, |
| 276 | staffGuid: userData.staffGuid | 278 | staffGuid: userData.staffGuid |
| 277 | }).then((res: any) => { | 279 | }).then((res: any) => { |
| 278 | msgCntPromise.value = null; | 280 | msgCntPromise.value = null; |
| 279 | if (res.code === proxy.$passCode) { | 281 | if (res.code === proxy.$passCode) { |
| 280 | let data = res.data || {}; | 282 | let data = res.data || {}; |
| 281 | noFinishCnt.value = (data['1'] || 0) + (data['2'] || 0); | 283 | noFinishCnt.value = (data.waitApproveCount || 0) + (data.receiveCount || 0); |
| 282 | dealTotalRows.value = data['1'] || 0; | 284 | dealTotalRows.value = data.waitApproveCount || 0; |
| 283 | messageTotalRows.value = data['2'] || 0; | 285 | messageTotalRows.value = data.receiveCount || 0; |
| 284 | } else { | 286 | } else { |
| 285 | proxy.$ElMessage.error(res.msg); | 287 | proxy.$ElMessage.error(res.msg); |
| 286 | } | 288 | } |
| ... | @@ -288,8 +290,8 @@ const getMsgCnt = () => { | ... | @@ -288,8 +290,8 @@ const getMsgCnt = () => { |
| 288 | } | 290 | } |
| 289 | 291 | ||
| 290 | onMounted(() => { | 292 | onMounted(() => { |
| 291 | //getMsgCnt(); | 293 | getMsgCnt(); |
| 292 | //createServerConnect(); | 294 | createServerConnect(); |
| 293 | }); | 295 | }); |
| 294 | 296 | ||
| 295 | </script> | 297 | </script> | ... | ... |
| ... | @@ -43,4 +43,7 @@ export const commonPageConfig = { | ... | @@ -43,4 +43,7 @@ export const commonPageConfig = { |
| 43 | { label: "150", value: 150 }, | 43 | { label: "150", value: 150 }, |
| 44 | { label: "200", value: 200 }, | 44 | { label: "200", value: 200 }, |
| 45 | ] | 45 | ] |
| 46 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 46 | } | ||
| 47 | |||
| 48 | /** 通用的系统guid */ | ||
| 49 | export const SystemGuid = '32774fcfdf5e43e8b866660374d8bced'; | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -675,7 +675,7 @@ const rejectDialogInfo = ref({ | ... | @@ -675,7 +675,7 @@ const rejectDialogInfo = ref({ |
| 675 | footer: { | 675 | footer: { |
| 676 | btns: [ | 676 | btns: [ |
| 677 | { type: "default", label: "取消", value: "cancel" }, | 677 | { type: "default", label: "取消", value: "cancel" }, |
| 678 | { type: "primary", label: "确定", value: "submit" }, | 678 | { type: "primary", label: "确定", value: "submit", loading: false }, |
| 679 | ], | 679 | ], |
| 680 | }, | 680 | }, |
| 681 | }); | 681 | }); |
| ... | @@ -687,7 +687,7 @@ const rejectDialogBtnClick = (btn, info) => { | ... | @@ -687,7 +687,7 @@ const rejectDialogBtnClick = (btn, info) => { |
| 687 | return | 687 | return |
| 688 | } | 688 | } |
| 689 | let row = currTableData.value; | 689 | let row = currTableData.value; |
| 690 | tableInfo.value.loading = true; | 690 | rejectDialogInfo.value.footer.btns[1].loading = true; |
| 691 | let params = { | 691 | let params = { |
| 692 | guid: row.approveVO.approveGuid, | 692 | guid: row.approveVO.approveGuid, |
| 693 | flowType: row.approveVO.flowType, | 693 | flowType: row.approveVO.flowType, |
| ... | @@ -695,7 +695,7 @@ const rejectDialogBtnClick = (btn, info) => { | ... | @@ -695,7 +695,7 @@ const rejectDialogBtnClick = (btn, info) => { |
| 695 | approveSuggest: info.approveSuggest | 695 | approveSuggest: info.approveSuggest |
| 696 | } | 696 | } |
| 697 | rejectFlowData(params).then((res: any) => { | 697 | rejectFlowData(params).then((res: any) => { |
| 698 | tableInfo.value.loading = false; | 698 | rejectDialogInfo.value.footer.btns[1].loading = false; |
| 699 | if (res?.code == proxy.$passCode) { | 699 | if (res?.code == proxy.$passCode) { |
| 700 | if (res.data) { | 700 | if (res.data) { |
| 701 | ElMessage.success('驳回成功'); | 701 | ElMessage.success('驳回成功'); | ... | ... |
-
Please register or sign in to post a comment