135cddba by lihua

走通消息管理接口调用

1 parent a764f068
......@@ -68,7 +68,7 @@ VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service
VITE_API_DATA_SYNC = ms-swzl-data-sync-service
#消息接口
VITE_API_MESSAGE = ms-swzl-message-notification-service
VITE_API_MESSAGE = ms-daop-message-service
#新门户接口
VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service
......
......@@ -109,7 +109,7 @@ VITE_API_ASSET_BASEURL = ms-swzl-data-dam-service
VITE_API_DATA_SYNC = ms-swzl-data-sync-service
#消息接口
VITE_API_MESSAGE = ms-swzl-message-notification-service
VITE_API_MESSAGE = ms-daop-message-service
#企业信息接口
VITE_APP_PERSONAL_URL = ms-daop-personel-service
......
......@@ -159,9 +159,9 @@ export const getAllMessageList = (params) => request({
/** 获取消息数目 */
export const getMessageCount = (params) => request({
url: `${import.meta.env.VITE_API_MESSAGE}/message/data/message-cnt`,
method: 'post',
data: params
url: `${import.meta.env.VITE_API_MESSAGE}/message/get-message-count`,
method: 'get',
params
})
/** 将消息状态更新为已读 */
......
......@@ -10,7 +10,7 @@ import useKeepAliveStore from '@/store/modules/keepAlive'
import useKeepAliveCompCache from '@/store/modules/keepAliveCompCache'
import useMenuStore from '@/store/modules/menu'
import { markRaw } from "vue";
import { commonPageConfig } from "@/utils/enum";
import { commonPageConfig, SystemGuid } from "@/utils/enum";
import {
Close
} from "@element-plus/icons-vue";
......@@ -215,7 +215,9 @@ const getMessageList = (type = 1) => {
pageIndex: type == 1 ? dealPageInfo.value.curr : pageInfo.value.curr,
pageSize: 50,
tenantGuid: userData.tenantGuid,
staffGuid: userData.staffGuid
staffGuid: userData.staffGuid,
systemGuid: SystemGuid,
appSide: 1
};
if (type == 1) {
param.isFinish = 'N';
......@@ -254,7 +256,7 @@ const messageAllRead = () => {
}
const createServerConnect = () => {
const websocketUrl = 'websocket-prod.zgsjzc.com'; //正式环境的
const websocketUrl = 'http://192.168.6.20:29203/'; //测试环境的
const ws = new WebSocket(`wss://${websocketUrl}/websocket/${userData.staffGuid}`);
ws.onopen = function () {
console.log('Connected to server.');
......@@ -272,15 +274,15 @@ const createServerConnect = () => {
const getMsgCnt = () => {
msgCntPromise.value = getMessageCount({
tenantGuid: userData.tenantGuid,
// tenantGuid: userData.tenantGuid,
staffGuid: userData.staffGuid
}).then((res: any) => {
msgCntPromise.value = null;
if (res.code === proxy.$passCode) {
let data = res.data || {};
noFinishCnt.value = (data['1'] || 0) + (data['2'] || 0);
dealTotalRows.value = data['1'] || 0;
messageTotalRows.value = data['2'] || 0;
noFinishCnt.value = (data.waitApproveCount || 0) + (data.receiveCount || 0);
dealTotalRows.value = data.waitApproveCount || 0;
messageTotalRows.value = data.receiveCount || 0;
} else {
proxy.$ElMessage.error(res.msg);
}
......@@ -288,8 +290,8 @@ const getMsgCnt = () => {
}
onMounted(() => {
//getMsgCnt();
//createServerConnect();
getMsgCnt();
createServerConnect();
});
</script>
......
......@@ -44,3 +44,6 @@ export const commonPageConfig = {
{ label: "200", value: 200 },
]
}
/** 通用的系统guid */
export const SystemGuid = '32774fcfdf5e43e8b866660374d8bced';
\ No newline at end of file
......
......@@ -675,7 +675,7 @@ const rejectDialogInfo = ref({
footer: {
btns: [
{ type: "default", label: "取消", value: "cancel" },
{ type: "primary", label: "确定", value: "submit" },
{ type: "primary", label: "确定", value: "submit", loading: false },
],
},
});
......@@ -687,7 +687,7 @@ const rejectDialogBtnClick = (btn, info) => {
return
}
let row = currTableData.value;
tableInfo.value.loading = true;
rejectDialogInfo.value.footer.btns[1].loading = true;
let params = {
guid: row.approveVO.approveGuid,
flowType: row.approveVO.flowType,
......@@ -695,7 +695,7 @@ const rejectDialogBtnClick = (btn, info) => {
approveSuggest: info.approveSuggest
}
rejectFlowData(params).then((res: any) => {
tableInfo.value.loading = false;
rejectDialogInfo.value.footer.btns[1].loading = false;
if (res?.code == proxy.$passCode) {
if (res.data) {
ElMessage.success('驳回成功');
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!