sso登录的关闭

This commit is contained in:
朱豫宸 2025-04-27 18:03:09 +08:00
parent 45537fcaa2
commit a4108d591e
8 changed files with 773 additions and 258 deletions

View File

@ -1,215 +1,742 @@
[
{
"code": 0,
"msg": "success",
"data": [
"QX": [
{
"name": "奉贤区",
"month": null,
"huanjie": null,
"street": "金汇镇",
"value": 91.7,
"xzcf": 87.5,
"xxzs": 85.5,
"tsjb": 99.6,
"zfjc": 91.3,
"cckh": 85.4,
"cjjc": 96.4,
"zhx": 98.6,
"score": 91.7,
"weight_add": 1.0000999970
"id": 1,
"name": "基础信息管理",
"xiao": [
{
"floor": [],
"cid": 101,
"url": "app.YBLB",
"isshow": true,
"name": "样品类别管理"
},
{
"name": "奉贤区",
"month": null,
"huanjie": null,
"street": "四团镇",
"value": 93.7,
"xzcf": 98.1,
"xxzs": 88.9,
"tsjb": 99.6,
"zfjc": 91.2,
"cckh": 85.4,
"cjjc": 97.6,
"zhx": 98.6,
"score": 93.7,
"weight_add": 1.0000999970
"floor": [],
"cid": 102,
"url": "app.JCXM",
"isshow": true,
"name": "检测项目管理"
},
{
"name": "奉贤区",
"month": null,
"huanjie": null,
"street": "西渡街道",
"value": 92.1,
"xzcf": 95.8,
"xxzs": 77.8,
"tsjb": 97.4,
"zfjc": 96.9,
"cckh": 85.4,
"cjjc": 96.3,
"zhx": 98.6,
"score": 92.1,
"weight_add": 1.0000999970
"floor": [],
"cid": 103,
"url": "app.JCXMNEW",
"isshow": true,
"name": "新检测项目管理"
},
{
"name": "奉贤区",
"month": null,
"huanjie": null,
"street": "金海街道",
"value": 92.8,
"xzcf": 83.3,
"xxzs": 93.2,
"tsjb": 99.8,
"zfjc": 94.6,
"cckh": 85.4,
"cjjc": 97.3,
"zhx": 98.6,
"score": 92.8,
"weight_add": 1.0000999970
"floor": [],
"cid": 104,
"url": "app.JCBZ",
"isshow": true,
"name": "检测标准管理"
},
{
"name": "奉贤区",
"month": null,
"huanjie": null,
"street": "奉城镇",
"value": 92.0,
"xzcf": 91.0,
"xxzs": 87.1,
"tsjb": 99.9,
"zfjc": 91.5,
"cckh": 85.4,
"cjjc": 92.7,
"zhx": 98.6,
"score": 92.0,
"weight_add": 1.0000999970
"floor": [],
"cid": 105,
"url": "app.PJBZ",
"isshow": true,
"name": "评价标准管理"
},
{
"name": "奉贤区",
"month": null,
"huanjie": null,
"street": "海湾镇",
"value": 93.0,
"xzcf": 94.7,
"xxzs": 85.4,
"tsjb": 98.1,
"zfjc": 95.1,
"cckh": 85.4,
"cjjc": 97.1,
"zhx": 98.6,
"score": 93.0,
"weight_add": 1.0000999970
"floor": [],
"cid": 106,
"url": "app.JLDW",
"isshow": true,
"name": "计量单位管理"
},
{
"name": "奉贤区",
"month": null,
"huanjie": null,
"street": "奉浦街道",
"value": 93.8,
"xzcf": 95.9,
"xxzs": 89.9,
"tsjb": 94.4,
"zfjc": 98.1,
"cckh": 85.4,
"cjjc": 98.1,
"zhx": 98.6,
"score": 93.8,
"weight_add": 1.0000999970
"floor": [],
"cid": 107,
"url": "app.DWHS",
"isshow": true,
"name": "单位换算管理"
},
{
"name": "奉贤区",
"month": null,
"huanjie": null,
"street": "柘林镇",
"value": 93.1,
"xzcf": 91.7,
"xxzs": 89.0,
"tsjb": 100,
"zfjc": 93.3,
"cckh": 85.4,
"cjjc": 96.3,
"zhx": 98.6,
"score": 93.1,
"weight_add": 1.0000999970
"floor": [],
"cid": 108,
"url": "app.CYDD",
"isshow": false,
"name": "采样地点管理"
},
{
"name": "奉贤区",
"month": null,
"huanjie": null,
"street": "上海海港综合经济开发区",
"value": 96.8,
"xzcf": 100,
"xxzs": 100,
"tsjb": 100,
"zfjc": 100,
"cckh": 85.4,
"cjjc": 98.9,
"zhx": 98.6,
"score": 96.8,
"weight_add": 1.0000999970
"floor": [],
"cid": 109,
"url": "app.JZJG",
"isshow": true,
"name": "检测机构管理"
},
{
"name": "奉贤区",
"month": null,
"huanjie": null,
"street": "上海市奉贤区海湾旅游区",
"value": 93.2,
"xzcf": 100,
"xxzs": 77.4,
"tsjb": 100,
"zfjc": 97.1,
"cckh": 85.4,
"cjjc": 98.9,
"zhx": 98.6,
"score": 93.2,
"weight_add": 1.0000999970
"floor": [],
"cid": 110,
"url": "app.XFLDB",
"isshow": true,
"name": "消费量数据管理"
},
{
"name": "奉贤区",
"month": null,
"huanjie": null,
"street": "庄行镇",
"value": 93.1,
"xzcf": 95.3,
"xxzs": 85.0,
"tsjb": 99.9,
"zfjc": 94.4,
"cckh": 85.4,
"cjjc": 96.5,
"zhx": 98.6,
"score": 93.1,
"weight_add": 1.0000999970
"floor": [],
"cid": 111,
"url": "app.JKZDZ",
"isshow": true,
"name": "健康指导值管理"
},
{
"name": "奉贤区",
"month": null,
"huanjie": null,
"street": "青村镇",
"value": 91.7,
"xzcf": 97.5,
"xxzs": 78.0,
"tsjb": 99.9,
"zfjc": 88.9,
"cckh": 85.4,
"cjjc": 96.8,
"zhx": 98.6,
"score": 91.7,
"weight_add": 1.0000999970
"floor": [],
"cid": 112,
"url": "app.XLZ",
"isshow": true,
"name": "限量值基础库"
},
{
"name": "奉贤区",
"month": null,
"huanjie": null,
"street": "南桥镇",
"value": 92.8,
"xzcf": 85.9,
"xxzs": 93.9,
"tsjb": 99.8,
"zfjc": 89.8,
"cckh": 85.4,
"cjjc": 97.9,
"zhx": 98.6,
"score": 92.8,
"weight_add": 1.0000999970
"name": "人口数量统计",
"isshow": true,
"url": "app.RenKouManage",
"cid": 113,
"floor": []
},
{
"name": "食品生产经营许可",
"isshow": true,
"url": "app.ShiPinShengChanJingYingXuKe",
"cid": 114,
"floor": []
},
{
"name": "样品信息分类库",
"isshow": true,
"url": "app.YangPinXinXiFenLeiKu",
"cid": 115,
"floor": []
},
{
"name": "投诉举报基础库",
"isshow": true,
"url": "app.TSJB",
"cid": 116,
"floor": []
},
{
"name": "信息追溯基础库",
"isshow": true,
"url": "app.XXZS",
"cid": 117,
"floor": []
},
{
"name": "样品农药残留信息",
"isshow": true,
"url": "app.YPXXNYCL",
"cid": 118,
"floor": []
}
]
},
{
"id": 2,
"name": "计划任务管理",
"xiao": [
{
"floor": [],
"cid": 201,
"url": "app.PlanCustomize",
"isshow": true,
"name": "计划任务定制"
},
{
"floor": [],
"cid": 202,
"url": "app.PlanControl",
"isshow": true,
"name": "计划任务监控"
},
{
"floor": [],
"cid": 203,
"url": "app.PlanCheck({id:0})",
"isshow": true,
"name": "计划任务查看"
}
]
},
{
"id": 3,
"name": "检测任务管理",
"xiao": [
{
"floor": [],
"cid": 301,
"url": "app.SampleRegister({id:0})",
"isshow": true,
"name": "样品登记管理"
},
{
"floor": [],
"cid": 302,
"url": "app.SampleControl",
"isshow": true,
"name": "样品检验管理"
},
{
"floor": [],
"cid": 303,
"url": "app.SampleAutio",
"isshow": true,
"name": "样品审核管理"
},
{
"floor": [],
"cid": 304,
"url": "app.SampleApprove",
"isshow": true,
"name": "样品批准管理"
}
]
},
{
"id": 4,
"name": "综合查询",
"xiao": [
{
"floor": [],
"cid": 401,
"url": "app.CustomQuery",
"isshow": false,
"name": "MGO查询"
},
{
"floor": [],
"cid": 402,
"url": "app.CustomQuery2",
"isshow": true,
"name": "SQL查询"
},
{
"floor": [],
"cid": 403,
"url": "app.HLZH",
"isshow": false,
"name": "行列转换"
},
{
"floor": [],
"cid": 404,
"url": "app.SHDT",
"isshow": false,
"name": "上海地图"
},
{
"floor": [],
"cid": 405,
"url": "app.QGDT",
"isshow": false,
"name": "全国地图"
},
{
"floor": [],
"cid": 406,
"url": "app.QQDT",
"isshow": false,
"name": "全球地图"
},
{
"floor": [],
"cid": 407,
"url": "app.QGDT_YPCD",
"isshow": false,
"name": "全国地图-样品产地"
},
{
"floor": [],
"cid": 408,
"url": "app.SHDT_YPCD",
"isshow": false,
"name": "上海地图-样品产地"
},
{
"floor": [],
"cid": 409,
"url": "app.OperateLog",
"isshow": true,
"name": "操作日志"
},
{
"floor": [],
"cid": 410,
"url": "app.BackLog",
"isshow": false,
"name": "备份记录"
},
{
"floor": [],
"cid": 411,
"url": "app.CJHuiLuoNew",
"isshow": false,
"name": "抽检监测数据回落库"
}
]
},
{
"id": 5,
"name": "统计分析",
"xiao": [
{
"floor": [],
"cid": 501,
"url": "app.Sample",
"isshow": false,
"name": "不合格率"
},
{
"floor": [],
"cid": 502,
"url": "app.JYXM",
"isshow": false,
"name": "检验项目统计分析"
},
{
"floor": [],
"cid": 503,
"url": "app.Overproof",
"isshow": true,
"name": "居民覆盖率"
},
{
"floor": [],
"cid": 504,
"url": "app.TongJiHeGeLv",
"isshow": true,
"name": "统计合格率"
},
{
"floor": [],
"cid": 505,
"url": "app.ZhuTiFuGaiLv",
"isshow": true,
"name": "主体覆盖率"
},
{
"floor": [],
"cid": 506,
"url": "app.Problem",
"isshow": false,
"name": "问题率分析"
},
{
"floor": [],
"cid": 507,
"url": "app.Qualified",
"isshow": false,
"name": "合格率分析"
},
{
"floor": [],
"cid": 508,
"url": "app.TouSuJuBao",
"isshow": true,
"name": "投诉举报率"
},
{
"floor": [],
"cid": 509,
"url": "app.ZhiFaJianCha",
"isshow": true,
"name": "执法检查率"
},
{
"floor": [],
"cid": 510,
"url": "app.XinXiZhuiSuLv",
"isshow": true,
"name": "信息追溯率"
},
{
"floor": [],
"cid": 511,
"url": "app.ChouChaKaohe",
"isshow": true,
"name": "抽查考核率"
},
{
"floor": [],
"cid": 512,
"url": "app.XingZhengChuFa",
"isshow": true,
"name": "行政处罚率"
},
{
"floor": [],
"cid": 513,
"url": "app.MXYZ",
"isshow": false,
"name": "数据验证"
}
]
},
{
"id": 6,
"name": "风险评估",
"xiao": [
{
"floor": [],
"cid": 601,
"url": "app.pingGuPesticide",
"isshow": true,
"name": "农药MEP评估"
},
{
"floor": [],
"cid": 602,
"url": "app.JianCeXiangMu4",
"isshow": true,
"name": "大类评估"
},
{
"floor": [],
"cid": 603,
"url": "app.JianCeXiangMu3",
"isshow": true,
"name": "亚类评估"
},
{
"floor": [],
"cid": 604,
"url": "app.JianCeXiangMu2",
"isshow": true,
"name": "品种评估"
},
{
"floor": [],
"cid": 605,
"url": "app.JianCeXiangMu",
"isshow": true,
"name": "细类评估"
},
{
"floor": [],
"cid": 606,
"url": "app.FengXianPingGu",
"isshow": false,
"name": "评估(2018)"
},
{
"floor": [],
"cid": 607,
"url": "app.chinaRiskAssessmentMap",
"isshow": false,
"name": "中国风险评估展示"
},
{
"floor": [],
"cid": 608,
"url": "app.shanghaiRiskAssessmentMap",
"isshow": false,
"name": "上海风险评估展示"
},
{
"floor": [],
"cid": 609,
"url": "app.nianfenzhanshi",
"isshow": false,
"name": "年份风险评估展示"
},
{
"floor": [],
"cid": 610,
"url": "app.ShiPinLeiBiePingGuZhanShi",
"isshow": false,
"name": "食品类别评估展示"
},
{
"floor": [],
"cid": 611,
"url": "app.ShiPinFengXianMapZhanShi",
"isshow": false,
"name": "风险评估地图展示(上海)"
},
{
"floor": [],
"cid": 612,
"url": "app.ShiPinFengXianMap_QuanGuoZhanShi",
"isshow": false,
"name": "风险评估地图展示(全国)"
}
]
},
{
"id": 7,
"name": "风险预警",
"xiao": [
{
"floor": [],
"cid": 701,
"url": "app.zhinengYujing",
"isshow": true,
"name": "指数智能预警"
},
{
"floor": [],
"cid": 702,
"url": "app.JiedaoHegelv",
"isshow": true,
"name": "街道合格率"
},
{
"floor": [],
"cid": 703,
"url": "app.dataBuhegelv",
"isshow": true,
"name": "首页预警"
},
{
"floor": [
{
"cid": 44,
"url": "app.Buhegelv",
"isshow": true,
"name": "首次不合格预警"
}
],
"count": null
"cid": 704,
"url": "",
"isshow": true,
"name": "首发预警"
},
{
"floor": [
{
"cid": 45,
"url": "app.Buhegelv2",
"isshow": true,
"name": "不合格率上升预警"
},
{
"cid": 48,
"url": "app.Buhegelv4",
"isshow": true,
"name": "被抽样单位多件不合格预警"
},
{
"cid": 57,
"url": "app.Buhegelv7",
"isshow": true,
"name": "被抽样单位多次不合格预警"
},
{
"cid": 50,
"url": "app.Buhegelv6",
"isshow": true,
"name": "生产企业多件不合格预警"
}
],
"cid": 705,
"url": "",
"isshow": true,
"name": "频发预警"
},
{
"floor": [
{
"cid": 46,
"url": "app.Buhegelv3",
"isshow": true,
"name": "不合格率偏高预警"
},
{
"cid": 52,
"url": "app.Buhegelv8",
"isshow": true,
"name": "产地省份不合格率预警"
},
{
"cid": 53,
"url": "app.Buhegelv9",
"isshow": true,
"name": "进口食品不合格率预警"
},
{
"cid": 51,
"url": "app.Buhegelv12",
"isshow": true,
"name": "网络平台不合格率预警"
}
],
"cid": 706,
"url": "",
"isshow": true,
"name": "高发预警"
},
{
"floor": [
{
"cid": 49,
"url": "app.Buhegelv5",
"isshow": true,
"name": "检测值异常预警"
}
],
"cid": 707,
"url": "",
"isshow": true,
"name": "污染预警"
},
{
"floor": [
{
"floor": [],
"cid": 55,
"url": "app.Buhegelv11",
"isshow": true,
"name": "污染物总膳食暴露量预警"
}
],
"cid": 708,
"url": "",
"isshow": true,
"name": "风险评估预警"
}
]
},
{
"id": 8,
"name": "食品安全综合指数",
"xiao": [
{
"floor": [],
"cid": 801,
"url": "app.zhinengMain",
"isshow": true,
"name": "大屏主界面"
},
{
"floor": [],
"cid": 802,
"url": "app.DaPingYanShi",
"isshow": false,
"name": "大屏演示"
},
{
"floor": [],
"cid": 803,
"url": "app.StreetDaPingYanShi",
"isshow": false,
"name": "街道大屏"
}
]
},
{
"id": 9,
"name": "智能化数据",
"xiao": [
{
"floor": [],
"cid": 901,
"url": "app.ShuJuZhuanHuan",
"isshow": false,
"name": "数据转换工具"
},
{
"floor": [],
"cid": 902,
"url": "app.ZhiNengTuiJian",
"isshow": false,
"name": "智能化数据管理"
},
{
"floor": [],
"cid": 903,
"url": "app.ZhiNengTuiJianCeLue",
"isshow": false,
"name": "智能化数据策略"
}
]
},
{
"id": 10,
"name": "风险安全隐患",
"xiao": [
{
"floor": [],
"cid": 1001,
"url": "app.YinHuanBuhegelv",
"isshow": false,
"name": "首次不合格"
},
{
"floor": [],
"cid": 1002,
"url": "app.YinHuanBuhegelv3",
"isshow": false,
"name": "不合格率"
}
]
},
{
"id": 20,
"name": "用户管理",
"xiao": [
{
"floor": [],
"cid": 2001,
"url": "app.user",
"isshow": true,
"name": "用户管理"
}
]
}
],
"Sel": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
116,
117,
118,
201,
202,
203,
301,
302,
303,
304,
402,
409,
503,
504,
505,
508,
509,
510,
511,
512,
601,
602,
603,
604,
605,
701,
702,
703,
704,
705,
706,
707,
708,
801,
2001,
115
]
}
]

View File

@ -22,12 +22,15 @@ import java.util.Map;
/**
* @author zhuyuchen
* @date 2023/10/16 17:35
* @description : 大屏缓存过滤器
* @description : 大屏缓存过滤器 //已弃用利用日志缓存的注解 + aop实现缓存读取
*/
//已弃用利用日志缓存的注解 + aop实现缓存读取
@Slf4j
@Component
public class DapingCacheFilter extends BasicHttpAuthenticationFilter {
// 定义jackson对象
private static final ObjectMapper MAPPER = new ObjectMapper();

View File

@ -105,12 +105,12 @@ public class ShiroConfig {
// 自定义 JWTFilter 拦截器
Map<String, Filter> filters = new LinkedHashMap<>();
//todo SSO登录验证
// SSO登录验证
filters.put("jwt", new JWTFilter());
// //登录过滤器保存用户当前状态
// filters.put("login", new LoginFilter());
filters.put("login", new LoginFilter());
//todo 大屏缓存过滤器
// 大屏缓存过滤器 可以读取保存在日志里面的缓存
filters.put("dapingCache", new DapingCacheFilter());
shiroFilterFactoryBean.setFilters(filters);
@ -162,8 +162,8 @@ public class ShiroConfig {
// filterMap.put("/ZHZS/GetTitleScore*", "dapingCache");
// filterMap.put("/TongJi/zhutiqiyefugailv*", "dapingCache");
// filterMap.put("/CCKH/GetKaoHeLv*", "dapingCache");
// filterMap.put("/**", "login");
filterMap.put("/**", "jwt");
filterMap.put("/**", "login");
// filterMap.put("/**", "jwt");
// 授权过滤器
// 注意当前授权拦截后shiro会自动跳转到未授权页面

View File

@ -1,4 +1,4 @@
#指定使用环境
spring:
profiles:
active: prod
active: dev

View File

@ -18,13 +18,13 @@ var app = angular.module('app', [
'angularjs-dropdown-multiselect'
])
//云上环境地址 shp地址
var Gaddress = "/shp"
var pubserver = "https://10.86.138.22/shp/";
var mongoApi = "https://10.86.138.22/shp/api/shipinleibie/GetMyTest"
// var Gaddress = "/shp"
// var pubserver = "https://10.86.138.22/shp/";
// var mongoApi = "https://10.86.138.22/shp/api/shipinleibie/GetMyTest"
// 开发环境地址
// var Gaddress = "";
// var pubserver = "http://localhost:8081/";
// var mongoApi = "http://localhost:8081/api/shipinleibie/GetMyTest"
var Gaddress = "";
var pubserver = "http://localhost:8081/";
var mongoApi = "http://localhost:8081/api/shipinleibie/GetMyTest"
//
localStorage.setItem("Gaddress", Gaddress)
localStorage.setItem("pubserver", pubserver)

View File

@ -15,7 +15,7 @@ app.controller('headerCtrl', ['$rootScope', '$scope', '$sessionStorage', '$state
//是否开启sso登录 还有一个地方需要修改 loginCtrl.js 的7行
var sso = true;
var sso = false;
//如果菜单信息为空,则再去查一次信息 和 开启了sso
if ($sessionStorage.user == null && sso) {
debugger
@ -67,36 +67,21 @@ app.controller('headerCtrl', ['$rootScope', '$scope', '$sessionStorage', '$state
url: Gaddress + '/logout'
}).success(function (data) {
console.log(data);
var headers = new Headers();
// headers.append("Authorization", data);
// window.location.href = new Request("https://10.86.138.22/dsp/")
//首页地址
// $state.go("login");
// 2. 删除 Cookie
if (sso){
// 1. 删除 Cookie
document.cookie = "Admin-Token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; Secure; SameSite=Strict";
document.cookie = "Admin-Token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/shp; Secure; SameSite=Strict";
// const form = document.createElement('form');
// form.method = 'GET';
// form.action = 'https://10.86.138.22/dsp/';
//
// // 添加隐藏字段携带数据
// const input = document.createElement('input');
// input.type = 'hidden';
// input.name = 'auth-token';
// input.value = 'your_token_here';
//
// form.appendChild(input);
// document.body.appendChild(form);
// form.submit();
//sso登录地址
window.location.href = "https://10.86.138.22/dsp/"
});
} else {
//登录地址
$state.go("login");
}
});
// var modalInstance = $uibModal.open({
// animation: true,
// backdrop: false, // 不让点击背景关闭系统

View File

@ -5,7 +5,7 @@ app.controller('loginCtrl', ['$rootScope', '$scope', '$state', '$sessionStorage'
//是否开启sso登录 还有一个地方需要修改 hearjs.js 的17行
var sso = true;
var sso = false;
if (sso) {
console.log("cookie", document.cookie)
debugger

View File

@ -1,7 +1,7 @@
//路由地址 国产路由修改
//var url22="172.28.3.129"
var myurl = 'https://10.86.138.22/shp'; //云上环境 shp地址
// var myurl = 'http://localhost:8081'; //开发环境
// var myurl = 'https://10.86.138.22/shp'; //云上环境 shp地址
var myurl = 'http://localhost:8081'; //开发环境
// var myurl = 'https://10.86.138.22'; //4号虚拟机环境
// var myurl = 'http://172.31.52.59:8081';
// var myurl = 'http://localhost:5000';