Browse Source

消息推送状态

lihuilin/feature-20251104102812-现金二期
ZhangYong 1 week ago
parent
commit
66a1637e13
  1. 48
      src/views/home.vue

48
src/views/home.vue

@ -14,7 +14,7 @@ import goTop from '@/assets/SvgIcons/go-top.svg'
import {getOrderPage} from '@/utils/goToCheck.js'
import {groupMessages} from "@/utils/getMessage.js"
import {findMenuById,permissionMapping} from "@/utils/menuTreePermission.js"
import {useMessageStore} from '@/store/index.js'
// ------------------ ICONS ------------------
@ -128,13 +128,57 @@ const toggleFlag = () => {
const messageStore = useMessageStore()
const {messages} = storeToRefs(messageStore)
//id
const selectStatusById = () => {
//
const hasPermission = (permission) => findMenuById(menuTree.value, permission);
//
const status = [];
// ===== =====
//
if (hasPermission(permissionMapping.area_finance_collection_pending)) {
status.push(0);
}
//
else if (hasPermission(permissionMapping.area_manager_collection_pending)) {
status.push(0);
}
// ===== 退 =====
// 退
if (hasPermission(permissionMapping.audit_area_finance_refund)) {
status.push(10);
}
// 退
else if (hasPermission(permissionMapping.audit_area_manager_refund)) {
status.push(20);
}
// 退
else if (hasPermission(permissionMapping.audit_headquarters_refund)) {
status.push(30);
}
//
else if (hasPermission(permissionMapping.view_execution_details)) {
status.push(40);
}
//
return [...new Set(status)];
};
console.log('权限测试',selectStatusById());
//
const getMessage = async () => {
try {
let params = selectStatusById();
const res = await API({
url: '/getMessage',
method: 'POST',
data: {}
data: params
});
if (res?.data) {

Loading…
Cancel
Save