Commit 110902f3 by 潘际乾

电证登录接口整合

parent 6602b420
......@@ -35,7 +35,7 @@
</script>
<![endif]-->
<link href="app-225.23981f1a.bundle-1.css" rel="stylesheet"><link href="app-225.23981f1a.bundle-2.css" rel="stylesheet"></head>
<link href="app-225.aecce4a7.bundle-1.css" rel="stylesheet"><link href="app-225.aecce4a7.bundle-2.css" rel="stylesheet"></head>
<body>
<div id="root">
<span class="rootSpan">正在加载中...</span>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -26,7 +26,7 @@
<script>
import Button from "../../components/Button.vue";
import SubMenu from "~/components/SubMenu.vue";
import dzMenus from "./dz/menus.js";
import { getDzSysMenu } from "./dz/menus.js";
export default {
components: { Button, SubMenu },
......@@ -229,7 +229,8 @@ export default {
mounted() {
const arr = [];
this.generateMenuTree(arr);
this.menus = arr.concat(dzMenus);
const dzsysMenus = getDzSysMenu()
this.menus = dzsysMenus ? arr.concat(dzsysMenus) : arr;
this.$store.commit("UserContext/setMenu", arr);
this.initOpenFlgIndex();
},
......
......@@ -32,13 +32,18 @@ export default {
})
},
methods: {
// 有跨域问题,获取不到
// 有跨域问题,获取不到
hideHeadAndSideMenu(iframe) {
iframe.contentWindow.document.querySelectorAll('.ant-layout .ant-layout-header')[0].style.display= 'none';
iframe.contentWindow.document.querySelectorAll('.ant-layout .sideMenu.ant-layout-sider')[0].style.display= 'none';
const header = iframe.contentWindow.document.querySelectorAll('.ant-layout .ant-layout-header');
if (header.length) {
header[0].style.display= 'none';
}
const sideMenu = iframe.contentWindow.document.querySelectorAll('.ant-layout .sideMenu.ant-layout-sider');
if (sideMenu.length) {
sideMenu[0].style.display= 'none';
}
},
getUrl() {
console.log('============= ' + this.$route.params.path);
if (this.$route.params.path === 'login') {
return this.baseUrl + "/login"
} else {
......
const menusConfig = [
// { id: null, label: "登陆", value: "login", subMenu: [] },
{
id: null,
label: "国内信用证",
value: null,
subMenu: [
{ id: null, label: "买方国内证", value: "ditsel", subMenu: [] },
{ id: null, label: "卖方国内证", value: "detsel", subMenu: [] },
{ id: null, label: "自由格式报文发送查询", value: "fresel", subMenu: [] },
{ id: null, label: "电证自由格式报文", value: "detfrm", subMenu: [] },
],
},
{
id: null,
label: "信用证辅助功能",
value: null,
subMenu: [
{ id: null, label: "信用证信息查询", value: "lcdinf", subMenu: [] },
{ id: null, label: "发票重复性融资", value: "invsel", subMenu: [] },
],
},
{
id: null,
label: "信用证查询",
value: null,
subMenu: [
{ id: null, label: "买方信用证", value: "infdid", subMenu: [] },
{ id: null, label: "买方到单", value: "infbdd", subMenu: [] },
{ id: null, label: "卖方信用证", value: "infded", subMenu: [] },
{ id: null, label: "卖方寄单", value: "infbmd", subMenu: [] },
],
},
{
id: null,
label: "福费廷",
value: null,
subMenu: [
{ id: null, label: "资产管理", value: "asmsel", subMenu: [] },
{ id: null, label: "福费廷转卖", value: "forsel", subMenu: [] },
{ id: null, label: "福费廷买入", value: "fobsel", subMenu: [] },
{ id: null, label: "福费廷自由格式报文", value: "assfre", subMenu: [] },
],
},
{
id: null,
label: "福费廷辅助功能",
value: null,
subMenu: [
{ id: null, label: "资金管理", value: "fudsel", subMenu: [] },
{ id: null, label: "福费廷信息查询", value: "assins", subMenu: [] },
{ id: null, label: "发票重复性融资查询", value: "invlcf", subMenu: [] },
{ id: null, label: "已发布资产清单", value: "asssel", subMenu: [] },
],
},
{
id: null,
label: "福费廷查询",
value: null,
subMenu: [{ id: null, label: "福费廷业务", value: "fbisel", subMenu: [] }],
},
{
id: null,
label: "贸易融资",
value: null,
subMenu: [
{ id: null, label: "买方融资", value: "trtsel", subMenu: [] },
{ id: null, label: "卖方融资", value: "bptsel", subMenu: [] },
],
},
{ id: null, label: "经办夹", value: "sptsel", subMenu: [] },
{ id: null, label: "历史夹", value: "annrel", subMenu: [] },
{
id: null,
label: "备忘录",
value: "diasel",
subMenu: [
{ id: null, label: "机构管理", value: "dblbch", subMenu: [] },
{ id: null, label: "角色管理", value: "dblrol", subMenu: [] },
{ id: null, label: "用户管理", value: "dblusr", subMenu: [] },
{ id: null, label: "交易管理", value: "dblfrm", subMenu: [] },
{ id: null, label: "客户管理", value: "dblpty", subMenu: [] },
{ id: null, label: "业务解锁", value: "lckinf", subMenu: [] },
{ id: null, label: "系统公告", value: "bchinf", subMenu: [] },
{ id: null, label: "证书托管", value: "keymag", subMenu: [] },
],
},
{
id: null,
label: "系统管理",
value: null,
subMenu: [
{ id: null, label: "支付系统行号", value: "ptysel", subMenu: [] },
{ id: null, label: "电证参与机构", value: "parsel", subMenu: [] },
{ id: null, label: "系统参数", value: "elsmsg", subMenu: [] },
{ id: null, label: "系统日志", value: "evtinf", subMenu: [] },
],
},
{
id: null,
label: "电证参数",
value: null,
subMenu: [
{ id: null, label: "往来报文查询", value: "infsmh", subMenu: [] },
{ id: null, label: "系统级报文", value: "sysels", subMenu: [] },
{ id: null, label: "信用证日终对账", value: "elschk", subMenu: [] },
{ id: null, label: "福费廷对账", value: "cbasel", subMenu: [] },
],
},
{ id: null, label: "影像管理", value: "imgadd", subMenu: [] },
];
let n = 0;
const generateMenuTree = (menus) => {
const arr = [];
......@@ -136,11 +24,17 @@ const generateMenuTree = (menus) => {
return arr;
}
const dzMenus = generateMenuTree(menusConfig)
export default {
export const getDzSysMenu = () => {
const menuStr = window.sessionStorage.getItem('menu')
if (!menuStr) {
return null;
}
const menusConfig = JSON.parse(menuStr);
// menusConfig.unshift( { id: null, label: "登陆", value: "login", subMenu: [] } )
return {
name: '电证系统',
index: 'dzsys',
path: 'dzsys',
children: dzMenus
children: generateMenuTree(menusConfig)
}
}
......@@ -36,7 +36,6 @@
<span class="copyright-icon">©</span>
2022 新晨公司版权所有
</span>
</div>
</div>
</div>
......@@ -79,6 +78,11 @@ export default {
});
// 电证登录
const dzUsr = usrMap[this.loginForm.username === 'ZL' ? 'ZL' : 'MBF']
const headers = {
userId: dzUsr,
security: true,
terminalType: 'WEB'
}
axios.post('/esfeserver/service/login', {
data: {
dncode: "",
......@@ -86,33 +90,31 @@ export default {
sendcode: "1",
username: dzUsr,
}
}, {
headers: {
userId: dzUsr,
security: true,
terminalType: 'WEB'
}
}).then(res => {
}, { headers }).then(res => {
const data = res.data
if (data.retmsg === "success") {
const d = data.data
window.sessionStorage.setItem('menu', JSON.stringify(d.menu))
window.sessionStorage.setItem('_token_', d.token)
window.sessionStorage.setItem('_nam_', dzUsr)
axios.post('esfeserver/service/office/offp_login', {}, {
headers: {
token: d.token,
userId: dzUsr,
security: true,
terminalType: 'WEB'
axios.post('esfeserver/service/office/offp_login', {}, { headers: { ...headers, token: d.token} })
.then(rs => {
const rd = rs.data
if (rd.retmsg === "success") {
const dd = rd.data
window.sessionStorage.setItem('bchsta_loginsta', '登录')
window.sessionStorage.setItem('syssta_syssta', '日间')
window.sessionStorage.setItem('syssta_online', '开启')
window.sessionStorage.setItem('usrnam', dd.usr_dspnam)
window.sessionStorage.setItem('usg', dd.usr_usg)
window.sessionStorage.setItem('syssta_sysdat', dd.syssta_sysdat)
window.sessionStorage.setItem('bchsta_chkflg', dd.bchsta_chkflg)
window.sessionStorage.setItem('bchnam', dd.bch_namcn)
}
}).then(result => {
const rd = result.data
console.log(rd);
})
this.$router.push("/home");
}
})
this.$router.push("/home");
} else {
console.log("error submit!!");
return false;
......
......@@ -78,7 +78,8 @@ module.exports = {
* 电证系统
*/
'/esfeserver/': {
target: 'http://192.168.0.110:8090',
// target: 'http://192.168.0.110:8090',
target: 'http://114.115.138.98:8300',
changeOrigin: true,
pathRewrite: {
'^/esfeserver': '/esfeserver'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment