|
@@ -9,8 +9,8 @@ const state = {
|
|
|
activeIndex: "",
|
|
activeIndex: "",
|
|
|
username: "",
|
|
username: "",
|
|
|
password: "",
|
|
password: "",
|
|
|
- // api: "/hotel/ihotel/auto", // 线上
|
|
|
|
|
- api: "/ihotel/auto", // 测试
|
|
|
|
|
|
|
+ api: "/hotel/ihotel/auto", // 线上
|
|
|
|
|
+ // api: "/ihotel/auto", // 测试
|
|
|
islogin: 1,
|
|
islogin: 1,
|
|
|
hasRoutes: false,
|
|
hasRoutes: false,
|
|
|
level: 1,
|
|
level: 1,
|
|
@@ -251,6 +251,312 @@ const mutations = {
|
|
|
state.level = value;
|
|
state.level = value;
|
|
|
console.log("设置level", value);
|
|
console.log("设置level", value);
|
|
|
},
|
|
},
|
|
|
|
|
+ ADDROUTE: async (state, value) => {
|
|
|
|
|
+ let roleList = JSON.parse(sessionStorage.getItem("roleList"));
|
|
|
|
|
+ console.log(roleList);
|
|
|
|
|
+ if (roleList) {
|
|
|
|
|
+ router.addRoute({
|
|
|
|
|
+ path: "/hotel",
|
|
|
|
|
+ name: "hotel",
|
|
|
|
|
+ component: Layout,
|
|
|
|
|
+ children: [],
|
|
|
|
|
+ });
|
|
|
|
|
+ roleList.forEach((item) => {
|
|
|
|
|
+ let list = item.route.split("/");
|
|
|
|
|
+ let arr = {
|
|
|
|
|
+ path: list[2],
|
|
|
|
|
+ name: list[2],
|
|
|
|
|
+ meta: { isAuth: true, title: item.name },
|
|
|
|
|
+ component: () => import(`../../views/${list[2]}/${list[2]}.vue`),
|
|
|
|
|
+ };
|
|
|
|
|
+ router.addRoute("hotel", arr);
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log("动态添加路由");
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ ROLELIST: async (state, value) => {
|
|
|
|
|
+ let datas = {
|
|
|
|
|
+ permissionSettingId: value,
|
|
|
|
|
+ };
|
|
|
|
|
+ let ress = await axios({
|
|
|
|
|
+ method: "get",
|
|
|
|
|
+ url: state.api + "/login/menuBar",
|
|
|
|
|
+ params: datas,
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log(ress, "菜单权限");
|
|
|
|
|
+ let roleList = [];
|
|
|
|
|
+ let arrFlag = {};
|
|
|
|
|
+ ress.data.data.forEach((i) => {
|
|
|
|
|
+ if (i.name == "房态管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "房态管理",
|
|
|
|
|
+ path: "roomStatus",
|
|
|
|
|
+ route: "/hotel/roomStatus",
|
|
|
|
|
+ });
|
|
|
|
|
+ let roomStatus = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "预定") {
|
|
|
|
|
+ roomStatus.yuding = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "退房") {
|
|
|
|
|
+ roomStatus.tuifang = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "维修") {
|
|
|
|
|
+ roomStatus.weixiu = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "关房") {
|
|
|
|
|
+ roomStatus.guanfang = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "置脏") {
|
|
|
|
|
+ roomStatus.zhizang = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "置净") {
|
|
|
|
|
+ roomStatus.zhijing = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "退款") {
|
|
|
|
|
+ roomStatus.tuikuan = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "入住") {
|
|
|
|
|
+ roomStatus.ruzhu = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "锁房") {
|
|
|
|
|
+ roomStatus.suofang = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "换房") {
|
|
|
|
|
+ roomStatus.huanfang = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "开房") {
|
|
|
|
|
+ roomStatus.kaifang = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.roomStatus = roomStatus;
|
|
|
|
|
+ // sessionStorage.setItem("roomStatus", JSON.stringify(roomStatus));
|
|
|
|
|
+ } else if (i.name == "房型管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "房型管理",
|
|
|
|
|
+ path: "roomType",
|
|
|
|
|
+ route: "/hotel/roomType",
|
|
|
|
|
+ });
|
|
|
|
|
+ let roomType = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "添加") {
|
|
|
|
|
+ roomType.tianjia = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "修改") {
|
|
|
|
|
+ roomType.xiugai = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "删除") {
|
|
|
|
|
+ roomType.shanchu = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "批量改价") {
|
|
|
|
|
+ roomType.pilianggaijia = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "改价记录") {
|
|
|
|
|
+ roomType.gaijiajilu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.roomType = roomType;
|
|
|
|
|
+ // sessionStorage.setItem("roomType", JSON.stringify(roomType));
|
|
|
|
|
+ } else if (i.name == "房价管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "房价管理",
|
|
|
|
|
+ path: "roomPrice",
|
|
|
|
|
+ route: "/hotel/roomPrice",
|
|
|
|
|
+ });
|
|
|
|
|
+ let roomPrice = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "批量改价") {
|
|
|
|
|
+ roomPrice.pilianggaijia = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "改价记录") {
|
|
|
|
|
+ roomPrice.gaijiajilu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.roomPrice = roomPrice;
|
|
|
|
|
+ // sessionStorage.setItem("roomPrice", JSON.stringify(roomPrice));
|
|
|
|
|
+ } else if (i.name == "订单管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "订单管理",
|
|
|
|
|
+ path: "order",
|
|
|
|
|
+ route: "/hotel/order",
|
|
|
|
|
+ });
|
|
|
|
|
+ let order = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "取消") {
|
|
|
|
|
+ order.quxiao = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "详情") {
|
|
|
|
|
+ order.xiangqing = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "入住") {
|
|
|
|
|
+ order.ruzhu = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "退款") {
|
|
|
|
|
+ order.tuikuan = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "退房") {
|
|
|
|
|
+ order.tuifang = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "换房") {
|
|
|
|
|
+ order.huanfang = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "导出") {
|
|
|
|
|
+ order.daochu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.order = order;
|
|
|
|
|
+ // sessionStorage.setItem("order", JSON.stringify(order));
|
|
|
|
|
+ } else if (i.name == "课表管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "课表管理",
|
|
|
|
|
+ path: "class",
|
|
|
|
|
+ route: "/hotel/class",
|
|
|
|
|
+ });
|
|
|
|
|
+ let classs = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "导入值班") {
|
|
|
|
|
+ classs.daoruzhiban = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "导出") {
|
|
|
|
|
+ classs.daochu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.classs = classs;
|
|
|
|
|
+ // sessionStorage.setItem("classs", JSON.stringify(classs));
|
|
|
|
|
+ } else if (i.name == "流程管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "流程管理",
|
|
|
|
|
+ path: "process",
|
|
|
|
|
+ route: "/hotel/process",
|
|
|
|
|
+ });
|
|
|
|
|
+ let process = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "同意") {
|
|
|
|
|
+ process.tongyi = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "驳回") {
|
|
|
|
|
+ process.bohui = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "规则设置") {
|
|
|
|
|
+ process.guizeshezhi = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.process = process;
|
|
|
|
|
+ // sessionStorage.setItem("process", JSON.stringify(process));
|
|
|
|
|
+ } else if (i.name == "统计报表") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "统计报表",
|
|
|
|
|
+ path: "statement",
|
|
|
|
|
+ route: "/hotel/statement",
|
|
|
|
|
+ });
|
|
|
|
|
+ let statement = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "导出") {
|
|
|
|
|
+ statement.daochu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.statement = statement;
|
|
|
|
|
+ // sessionStorage.setItem("statement", JSON.stringify(statement));
|
|
|
|
|
+ } else if (i.name == "门锁管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "门锁管理",
|
|
|
|
|
+ path: "doorLock",
|
|
|
|
|
+ route: "/hotel/doorLock",
|
|
|
|
|
+ });
|
|
|
|
|
+ let doorLock = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "导入") {
|
|
|
|
|
+ doorLock.daoru = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "钥匙管理") {
|
|
|
|
|
+ doorLock.yaoshiguanli = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "消息列表") {
|
|
|
|
|
+ doorLock.xiaoxiliebiao = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "远程开锁") {
|
|
|
|
|
+ doorLock.yuanchengkaisuo = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "解绑设备") {
|
|
|
|
|
+ doorLock.jiesuoshebei = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "NFC设置") {
|
|
|
|
|
+ doorLock.nfcshezhi = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.doorLock = doorLock;
|
|
|
|
|
+ // sessionStorage.setItem("doorLock", JSON.stringify(doorLock));
|
|
|
|
|
+ } else if (i.name == "水电表管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "水电表管理",
|
|
|
|
|
+ path: "meter",
|
|
|
|
|
+ route: "/hotel/meter",
|
|
|
|
|
+ });
|
|
|
|
|
+ let meter = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "导出") {
|
|
|
|
|
+ meter.daochu = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "导入") {
|
|
|
|
|
+ meter.daoru = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.meter = meter;
|
|
|
|
|
+ // sessionStorage.setItem("meter", JSON.stringify(meter));
|
|
|
|
|
+ } else if (i.name == "用户管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "用户管理",
|
|
|
|
|
+ path: "user",
|
|
|
|
|
+ route: "/hotel/user",
|
|
|
|
|
+ });
|
|
|
|
|
+ let user = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "添加") {
|
|
|
|
|
+ user.tianjia = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "编辑") {
|
|
|
|
|
+ user.bianji = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "删除") {
|
|
|
|
|
+ user.shanchu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.user = user;
|
|
|
|
|
+ // sessionStorage.setItem("user", JSON.stringify(user));
|
|
|
|
|
+ } else if (i.name == "角色管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "角色管理",
|
|
|
|
|
+ path: "userRoles",
|
|
|
|
|
+ route: "/hotel/userRoles",
|
|
|
|
|
+ });
|
|
|
|
|
+ let userRoles = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "添加") {
|
|
|
|
|
+ userRoles.tianjia = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "编辑") {
|
|
|
|
|
+ userRoles.bianji = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "删除") {
|
|
|
|
|
+ userRoles.shanchu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.userRoles = userRoles;
|
|
|
|
|
+ // sessionStorage.setItem("userRoles", JSON.stringify(userRoles));
|
|
|
|
|
+ } else if (i.name == "账号管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "账号管理",
|
|
|
|
|
+ path: "account",
|
|
|
|
|
+ route: "/hotel/account",
|
|
|
|
|
+ });
|
|
|
|
|
+ let account = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "添加") {
|
|
|
|
|
+ account.tianjia = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "编辑") {
|
|
|
|
|
+ account.bianji = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "删除") {
|
|
|
|
|
+ account.shanchu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.account = account;
|
|
|
|
|
+ // sessionStorage.setItem("account", JSON.stringify(account));
|
|
|
|
|
+ } else if (i.name == "系统管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "系统管理",
|
|
|
|
|
+ path: "system",
|
|
|
|
|
+ route: "/hotel/system",
|
|
|
|
|
+ });
|
|
|
|
|
+ let system = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "退房设置") {
|
|
|
|
|
+ system.tuifangshezhi = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "公寓设置") {
|
|
|
|
|
+ system.gongyushezhi = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "补助设置") {
|
|
|
|
|
+ system.buzhushezhi = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "催缴设置") {
|
|
|
|
|
+ system.cuijiaoshezhi = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "设施服务设置") {
|
|
|
|
|
+ system.sheshifuwushezhi = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.system = system;
|
|
|
|
|
+ // sessionStorage.setItem("system", JSON.stringify(system));
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log(arrFlag,"按钮权限");
|
|
|
|
|
+
|
|
|
|
|
+ sessionStorage.setItem("roleList", JSON.stringify(roleList));
|
|
|
|
|
+ sessionStorage.setItem("btnflag", JSON.stringify(arrFlag));
|
|
|
|
|
+ // window.location.reload();
|
|
|
|
|
+ },
|
|
|
};
|
|
};
|
|
|
// mutations的值由actions传入(异步)
|
|
// mutations的值由actions传入(异步)
|
|
|
const actions = {
|
|
const actions = {
|
|
@@ -291,13 +597,286 @@ const actions = {
|
|
|
);
|
|
);
|
|
|
sessionStorage.setItem("username", res.data.data.userName);
|
|
sessionStorage.setItem("username", res.data.data.userName);
|
|
|
console.log(res.data.data.userName, "名字账号");
|
|
console.log(res.data.data.userName, "名字账号");
|
|
|
-
|
|
|
|
|
- // commit("LEVEL", res.data.data.level);
|
|
|
|
|
-
|
|
|
|
|
- // commit("userName", data.user);
|
|
|
|
|
-
|
|
|
|
|
- // commit("roles", asyncRouter);
|
|
|
|
|
- // sessionStorage.setItem("roles", JSON.stringify(asyncRouter));
|
|
|
|
|
|
|
+ let datas = {
|
|
|
|
|
+ permissionSettingId: res.data.data.permissionSettingId,
|
|
|
|
|
+ };
|
|
|
|
|
+ let ress = await axios({
|
|
|
|
|
+ method: "get",
|
|
|
|
|
+ url: state.api + "/login/menuBar",
|
|
|
|
|
+ params: datas,
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log(ress, "菜单权限");
|
|
|
|
|
+ let roleList = [];
|
|
|
|
|
+ let arrFlag = {};
|
|
|
|
|
+ ress.data.data.forEach((i) => {
|
|
|
|
|
+ if (i.name == "房态管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "房态管理",
|
|
|
|
|
+ path: "roomStatus",
|
|
|
|
|
+ route: "/hotel/roomStatus",
|
|
|
|
|
+ });
|
|
|
|
|
+ let roomStatus = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "预定") {
|
|
|
|
|
+ roomStatus.yuding = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "退房") {
|
|
|
|
|
+ roomStatus.tuifang = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "维修") {
|
|
|
|
|
+ roomStatus.weixiu = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "关房") {
|
|
|
|
|
+ roomStatus.guanfang = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "置脏") {
|
|
|
|
|
+ roomStatus.zhizang = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "置净") {
|
|
|
|
|
+ roomStatus.zhijing = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "退款") {
|
|
|
|
|
+ roomStatus.tuikuan = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "入住") {
|
|
|
|
|
+ roomStatus.ruzhu = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "锁房") {
|
|
|
|
|
+ roomStatus.suofang = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "换房") {
|
|
|
|
|
+ roomStatus.huanfang = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "开房") {
|
|
|
|
|
+ roomStatus.kaifang = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.roomStatus = roomStatus;
|
|
|
|
|
+ // sessionStorage.setItem("roomStatus", JSON.stringify(roomStatus));
|
|
|
|
|
+ } else if (i.name == "房型管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "房型管理",
|
|
|
|
|
+ path: "roomType",
|
|
|
|
|
+ route: "/hotel/roomType",
|
|
|
|
|
+ });
|
|
|
|
|
+ let roomType = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "添加") {
|
|
|
|
|
+ roomType.tianjia = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "修改") {
|
|
|
|
|
+ roomType.xiugai = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "删除") {
|
|
|
|
|
+ roomType.shanchu = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "批量改价") {
|
|
|
|
|
+ roomType.pilianggaijia = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "改价记录") {
|
|
|
|
|
+ roomType.gaijiajilu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.roomType = roomType;
|
|
|
|
|
+ // sessionStorage.setItem("roomType", JSON.stringify(roomType));
|
|
|
|
|
+ } else if (i.name == "房价管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "房价管理",
|
|
|
|
|
+ path: "roomPrice",
|
|
|
|
|
+ route: "/hotel/roomPrice",
|
|
|
|
|
+ });
|
|
|
|
|
+ let roomPrice = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "批量改价") {
|
|
|
|
|
+ roomPrice.pilianggaijia = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "改价记录") {
|
|
|
|
|
+ roomPrice.gaijiajilu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.roomPrice = roomPrice;
|
|
|
|
|
+ // sessionStorage.setItem("roomPrice", JSON.stringify(roomPrice));
|
|
|
|
|
+ } else if (i.name == "订单管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "订单管理",
|
|
|
|
|
+ path: "order",
|
|
|
|
|
+ route: "/hotel/order",
|
|
|
|
|
+ });
|
|
|
|
|
+ let order = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "取消") {
|
|
|
|
|
+ order.quxiao = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "详情") {
|
|
|
|
|
+ order.xiangqing = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "入住") {
|
|
|
|
|
+ order.ruzhu = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "退款") {
|
|
|
|
|
+ order.tuikuan = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "退房") {
|
|
|
|
|
+ order.tuifang = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "换房") {
|
|
|
|
|
+ order.huanfang = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "导出") {
|
|
|
|
|
+ order.daochu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.order = order;
|
|
|
|
|
+ // sessionStorage.setItem("order", JSON.stringify(order));
|
|
|
|
|
+ } else if (i.name == "课表管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "课表管理",
|
|
|
|
|
+ path: "class",
|
|
|
|
|
+ route: "/hotel/class",
|
|
|
|
|
+ });
|
|
|
|
|
+ let classs = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "导入值班") {
|
|
|
|
|
+ classs.daoruzhiban = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "导出") {
|
|
|
|
|
+ classs.daochu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.classs = classs;
|
|
|
|
|
+ // sessionStorage.setItem("classs", JSON.stringify(classs));
|
|
|
|
|
+ } else if (i.name == "流程管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "流程管理",
|
|
|
|
|
+ path: "process",
|
|
|
|
|
+ route: "/hotel/process",
|
|
|
|
|
+ });
|
|
|
|
|
+ let process = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "同意") {
|
|
|
|
|
+ process.tongyi = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "驳回") {
|
|
|
|
|
+ process.bohui = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "规则设置") {
|
|
|
|
|
+ process.guizeshezhi = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.process = process;
|
|
|
|
|
+ // sessionStorage.setItem("process", JSON.stringify(process));
|
|
|
|
|
+ } else if (i.name == "统计报表") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "统计报表",
|
|
|
|
|
+ path: "statement",
|
|
|
|
|
+ route: "/hotel/statement",
|
|
|
|
|
+ });
|
|
|
|
|
+ let statement = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "导出") {
|
|
|
|
|
+ statement.daochu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.statement = statement;
|
|
|
|
|
+ // sessionStorage.setItem("statement", JSON.stringify(statement));
|
|
|
|
|
+ } else if (i.name == "门锁管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "门锁管理",
|
|
|
|
|
+ path: "doorLock",
|
|
|
|
|
+ route: "/hotel/doorLock",
|
|
|
|
|
+ });
|
|
|
|
|
+ let doorLock = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "导入") {
|
|
|
|
|
+ doorLock.daoru = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "禁用门锁") {
|
|
|
|
|
+ doorLock.jinyongmensuo = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "钥匙管理") {
|
|
|
|
|
+ doorLock.yaoshiguanli = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "消息列表") {
|
|
|
|
|
+ doorLock.xiaoxiliebiao = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "远程开锁") {
|
|
|
|
|
+ doorLock.yuanchengkaisuo = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "解绑设备") {
|
|
|
|
|
+ doorLock.jiesuoshebei = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "NFC设置") {
|
|
|
|
|
+ doorLock.nfcshezhi = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.doorLock = doorLock;
|
|
|
|
|
+ // sessionStorage.setItem("doorLock", JSON.stringify(doorLock));
|
|
|
|
|
+ } else if (i.name == "水电表管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "水电表管理",
|
|
|
|
|
+ path: "meter",
|
|
|
|
|
+ route: "/hotel/meter",
|
|
|
|
|
+ });
|
|
|
|
|
+ let meter = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "导出") {
|
|
|
|
|
+ meter.daochu = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "导入") {
|
|
|
|
|
+ meter.daoru = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.meter = meter;
|
|
|
|
|
+ // sessionStorage.setItem("meter", JSON.stringify(meter));
|
|
|
|
|
+ } else if (i.name == "用户管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "用户管理",
|
|
|
|
|
+ path: "user",
|
|
|
|
|
+ route: "/hotel/user",
|
|
|
|
|
+ });
|
|
|
|
|
+ let user = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "添加") {
|
|
|
|
|
+ user.tianjia = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "编辑") {
|
|
|
|
|
+ user.bianji = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "删除") {
|
|
|
|
|
+ user.shanchu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.user = user;
|
|
|
|
|
+ // sessionStorage.setItem("user", JSON.stringify(user));
|
|
|
|
|
+ } else if (i.name == "角色管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "角色管理",
|
|
|
|
|
+ path: "userRoles",
|
|
|
|
|
+ route: "/hotel/userRoles",
|
|
|
|
|
+ });
|
|
|
|
|
+ let userRoles = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "添加") {
|
|
|
|
|
+ userRoles.tianjia = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "编辑") {
|
|
|
|
|
+ userRoles.bianji = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "删除") {
|
|
|
|
|
+ userRoles.shanchu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.userRoles = userRoles;
|
|
|
|
|
+ // sessionStorage.setItem("userRoles", JSON.stringify(userRoles));
|
|
|
|
|
+ } else if (i.name == "账号管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "账号管理",
|
|
|
|
|
+ path: "account",
|
|
|
|
|
+ route: "/hotel/account",
|
|
|
|
|
+ });
|
|
|
|
|
+ let account = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "添加") {
|
|
|
|
|
+ account.tianjia = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "编辑") {
|
|
|
|
|
+ account.bianji = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "删除") {
|
|
|
|
|
+ account.shanchu = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.account = account;
|
|
|
|
|
+ // sessionStorage.setItem("account", JSON.stringify(account));
|
|
|
|
|
+ } else if (i.name == "系统管理") {
|
|
|
|
|
+ roleList.push({
|
|
|
|
|
+ name: "系统管理",
|
|
|
|
|
+ path: "system",
|
|
|
|
|
+ route: "/hotel/system",
|
|
|
|
|
+ });
|
|
|
|
|
+ let system = {};
|
|
|
|
|
+ i.functionPoints.forEach((j) => {
|
|
|
|
|
+ if (j.functionPoint == "退房设置") {
|
|
|
|
|
+ system.tuifangshezhi = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "公寓设置") {
|
|
|
|
|
+ system.gongyushezhi = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "补助设置") {
|
|
|
|
|
+ system.buzhushezhi = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "催缴设置") {
|
|
|
|
|
+ system.cuijiaoshezhi = j.status;
|
|
|
|
|
+ } else if (j.functionPoint == "设施服务设置") {
|
|
|
|
|
+ system.sheshifuwushezhi = j.status;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ arrFlag.system = system;
|
|
|
|
|
+ // sessionStorage.setItem("system", JSON.stringify(system));
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ sessionStorage.setItem("roleList", JSON.stringify(roleList));
|
|
|
|
|
+ sessionStorage.setItem("btnflag", JSON.stringify(arrFlag));
|
|
|
|
|
|
|
|
resolve("success");
|
|
resolve("success");
|
|
|
} else {
|
|
} else {
|