Compare commits
No commits in common. "ffd41214f8b8dfa03533fce24eedf10d440d5081" and "10fa81228132e08d50703a91328e723acc44e2fc" have entirely different histories.
ffd41214f8
...
10fa812281
@ -2994,16 +2994,14 @@ params【字段属性】=值
|
|||||||
if (btnConfig.customParams) {
|
if (btnConfig.customParams) {
|
||||||
if (btnConfig.customParams.indexOf(',') == -1) {
|
if (btnConfig.customParams.indexOf(',') == -1) {
|
||||||
if (this.props.data && this.props.data.record && this.props.data.record.ID) {
|
if (this.props.data && this.props.data.record && this.props.data.record.ID) {
|
||||||
if (btnConfig.customParams != 'reset') {
|
let rule = [
|
||||||
let rule = [
|
{
|
||||||
{
|
field: btnConfig.customParams,
|
||||||
field: btnConfig.customParams,
|
operator: 1,
|
||||||
operator: 1,
|
value: this.props.data.record.ID
|
||||||
value: this.props.data.record.ID
|
}
|
||||||
}
|
];
|
||||||
];
|
tempData.rules = [...rule];
|
||||||
tempData.rules = [...rule];
|
|
||||||
}
|
|
||||||
} else if (btnConfig.customParams != null && btnConfig.customParams.indexOf('parentRecord') > -1) {
|
} else if (btnConfig.customParams != null && btnConfig.customParams.indexOf('parentRecord') > -1) {
|
||||||
//wyw BS057 弹窗 BS077 传递父项信息 到页面
|
//wyw BS057 弹窗 BS077 传递父项信息 到页面
|
||||||
let rule = [
|
let rule = [
|
||||||
|
|||||||
@ -39,11 +39,11 @@ const Search = (props) => {
|
|||||||
const menuForms = [];
|
const menuForms = [];
|
||||||
const menuDatas = [];
|
const menuDatas = [];
|
||||||
function traverseChild(item) {
|
function traverseChild(item) {
|
||||||
if (!item?.Menu?.Nav_MenuForm || item.ChildMenus?.length) {
|
if (!item.Menu.Nav_MenuForm || item.ChildMenus?.length) {
|
||||||
item.ChildMenus?.forEach((x) => {
|
item.ChildMenus.forEach((x) => {
|
||||||
traverseChild(x);
|
traverseChild(x);
|
||||||
});
|
});
|
||||||
} else if (item.Menu?.Nav_MenuForm) {
|
} else if (item.Menu.Nav_MenuForm) {
|
||||||
menuForms.push({
|
menuForms.push({
|
||||||
MenuName: item.Menu.NAME,
|
MenuName: item.Menu.NAME,
|
||||||
...item.Menu.Nav_MenuForm,
|
...item.Menu.Nav_MenuForm,
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import * as appService from '../services/app'
|
import * as appService from '../services/app'
|
||||||
import { getEnums } from '../utils/common'
|
import { getEnums } from '../utils/common'
|
||||||
import storage from '../utils/storage'
|
|
||||||
import * as roleEditService from "../services/FM/roleEdit"
|
import * as roleEditService from "../services/FM/roleEdit"
|
||||||
import { routerRedux } from 'dva/router'
|
import { routerRedux } from 'dva/router'
|
||||||
import config from '../config'
|
import config from '../config'
|
||||||
@ -8,7 +7,7 @@ export default {
|
|||||||
namespace: 'app',
|
namespace: 'app',
|
||||||
state: {
|
state: {
|
||||||
orgId: '',
|
orgId: '',
|
||||||
enums: storage('lacal').getItem('enums').val || {},
|
enums: {},
|
||||||
alarmId: '', // 显示报警面板
|
alarmId: '', // 显示报警面板
|
||||||
currVersion: null,
|
currVersion: null,
|
||||||
addedTab: null, // 用于在其他页面添加 tab
|
addedTab: null, // 用于在其他页面添加 tab
|
||||||
@ -146,7 +145,6 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
yield put({ type: 'save', payload: { enums: enums } })
|
yield put({ type: 'save', payload: { enums: enums } })
|
||||||
storage('lacal').setItem('enums', enums)
|
|
||||||
return ret
|
return ret
|
||||||
},
|
},
|
||||||
*addLoginOut ({ payload, onComplete }, { call, put }) {
|
*addLoginOut ({ payload, onComplete }, { call, put }) {
|
||||||
|
|||||||
@ -66,20 +66,17 @@ function hideLoading() {
|
|||||||
export default {
|
export default {
|
||||||
namespace: "login",
|
namespace: "login",
|
||||||
state: {
|
state: {
|
||||||
loginInfo: { Menus: storage("lacal").getItem("menus").val || [] },
|
loginInfo: {},
|
||||||
OrgId: storage("lacal").getItem("webOrgId").val || "",
|
OrgId: "",
|
||||||
baseConfig: storage("lacal").getItem("baseConfig").val || {},
|
baseConfig: {},
|
||||||
userId: (storage("lacal").getItem("webUserInfo").val || {}).ID || "",
|
userId: "",
|
||||||
user: storage("lacal").getItem("webUserInfo").val || {},
|
user: {},
|
||||||
Tenant: storage("lacal").getItem("Tenant").val,
|
Tenant: storage("lacal").getItem("Tenant").val,
|
||||||
Notifications: [],
|
Notifications: [],
|
||||||
screenLocked: false, // 是否锁屏
|
screenLocked: false, // 是否锁屏
|
||||||
flatMenus: storage("lacal").getItem("flatMenus").val || [],
|
flatMenus: [],
|
||||||
currActivatedTab: null, // 用于面包屑导航,同步于 model app
|
currActivatedTab: null, // 用于面包屑导航,同步于 model app
|
||||||
currActivatedMenu: null, // 当前选中的菜单项,同步于 model app
|
currActivatedMenu: null, // 当前选中的菜单项,同步于 model app
|
||||||
roles: storage("lacal").getItem("roles").val || [],
|
|
||||||
rolePerm: storage("lacal").getItem("rolePerm").val || {},
|
|
||||||
userType: storage("lacal").getItem("UserType").val || 0,
|
|
||||||
},
|
},
|
||||||
subscriptions: {
|
subscriptions: {
|
||||||
setup({ dispatch, history }) {
|
setup({ dispatch, history }) {
|
||||||
@ -261,9 +258,6 @@ export default {
|
|||||||
storage("lacal").setItem("departmentId", ret.User.DEPARTMENT_ID);
|
storage("lacal").setItem("departmentId", ret.User.DEPARTMENT_ID);
|
||||||
storage("lacal").setItem("MineType", ret.User.MineType);
|
storage("lacal").setItem("MineType", ret.User.MineType);
|
||||||
storage("lacal").setItem("UserType", ret.UserType);
|
storage("lacal").setItem("UserType", ret.UserType);
|
||||||
storage("lacal").setItem("baseConfig", ret.BaseConfig);
|
|
||||||
storage("lacal").setItem("roles", ret.Roles || []);
|
|
||||||
storage("lacal").setItem("rolePerm", ret.Nav_RolePerm || {});
|
|
||||||
const localStorage = window.localStorage;
|
const localStorage = window.localStorage;
|
||||||
ret.FormConfigVersion &&
|
ret.FormConfigVersion &&
|
||||||
storage("lacal").setItem("formConfigVersion", ret.FormConfigVersion);
|
storage("lacal").setItem("formConfigVersion", ret.FormConfigVersion);
|
||||||
@ -272,11 +266,6 @@ export default {
|
|||||||
const copyMenus = cloneDeep(ret.Menus);
|
const copyMenus = cloneDeep(ret.Menus);
|
||||||
recurseMenu(copyMenus, undefined, flatMenus);
|
recurseMenu(copyMenus, undefined, flatMenus);
|
||||||
ret.Menus = copyMenus;
|
ret.Menus = copyMenus;
|
||||||
const safeFlatMenus = flatMenus.map(m => ({ ID: m.ID, NAME: m.NAME, CODE: m.CODE, MENU_LEVEL: m.MENU_LEVEL, idLevels: m.idLevels, nameLevels: m.nameLevels, menuLevels: m.menuLevels, Nav_MenuForm: m.Nav_MenuForm }));
|
|
||||||
const pruneMenus = (arr) => arr.map(it => ({ Node: { ID: it.Node.ID, NAME: it.Node.NAME, CODE: it.Node.CODE, MENU_LEVEL: it.Node.MENU_LEVEL, MineType: it.Node.MineType, Nav_MenuForm: it.Node.Nav_MenuForm }, Children: (it.Children && it.Children.length) ? pruneMenus(it.Children) : [] }));
|
|
||||||
const safeMenus = pruneMenus(copyMenus);
|
|
||||||
storage("lacal").setItem("menus", safeMenus);
|
|
||||||
storage("lacal").setItem("flatMenus", safeFlatMenus);
|
|
||||||
|
|
||||||
const currentMineType = localStorage.getItem("currentMineType");
|
const currentMineType = localStorage.getItem("currentMineType");
|
||||||
if (currentMineType) {
|
if (currentMineType) {
|
||||||
@ -359,40 +348,13 @@ export default {
|
|||||||
if (!OrgId) {
|
if (!OrgId) {
|
||||||
const webOrgId = storage("lacal").getItem("webOrgId").val || storage("lacal").getItem("Orgid").val;
|
const webOrgId = storage("lacal").getItem("webOrgId").val || storage("lacal").getItem("Orgid").val;
|
||||||
const userInfo = storage("lacal").getItem("webUserInfo").val;
|
const userInfo = storage("lacal").getItem("webUserInfo").val;
|
||||||
const flatMenus = storage("lacal").getItem("flatMenus").val;
|
|
||||||
const menus = storage("lacal").getItem("menus").val;
|
|
||||||
const enums = storage("lacal").getItem("enums").val;
|
|
||||||
const baseConfig = storage("lacal").getItem("baseConfig").val;
|
|
||||||
const roles = storage("lacal").getItem("roles").val;
|
|
||||||
const rolePerm = storage("lacal").getItem("rolePerm").val;
|
|
||||||
if (webOrgId) {
|
if (webOrgId) {
|
||||||
const payload = { OrgId: webOrgId };
|
const payload = { OrgId: webOrgId };
|
||||||
if (userInfo) {
|
if (userInfo) {
|
||||||
payload.user = userInfo;
|
payload.user = userInfo;
|
||||||
payload.userId = userInfo.ID;
|
payload.userId = userInfo.ID;
|
||||||
}
|
}
|
||||||
if (flatMenus) {
|
|
||||||
payload.flatMenus = flatMenus;
|
|
||||||
}
|
|
||||||
if (baseConfig) {
|
|
||||||
payload.baseConfig = baseConfig;
|
|
||||||
}
|
|
||||||
if (menus) {
|
|
||||||
const tmpFlatMenus = [];
|
|
||||||
recurseMenu(menus, undefined, tmpFlatMenus);
|
|
||||||
payload.loginInfo = { Menus: menus };
|
|
||||||
payload.flatMenus = payload.flatMenus && payload.flatMenus.length ? payload.flatMenus : tmpFlatMenus;
|
|
||||||
}
|
|
||||||
if (roles) {
|
|
||||||
payload.roles = roles;
|
|
||||||
}
|
|
||||||
if (rolePerm) {
|
|
||||||
payload.rolePerm = rolePerm;
|
|
||||||
}
|
|
||||||
yield put({ type: "save", payload });
|
yield put({ type: "save", payload });
|
||||||
if (enums) {
|
|
||||||
yield put({ type: "app/save", payload: { enums } });
|
|
||||||
}
|
|
||||||
onSuccess instanceof Function && onSuccess();
|
onSuccess instanceof Function && onSuccess();
|
||||||
} else {
|
} else {
|
||||||
onFail instanceof Function && onFail();
|
onFail instanceof Function && onFail();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user