合同审查页面
This commit is contained in:
parent
5fcb242bb3
commit
76618a5e16
@ -730,6 +730,11 @@ export default {
|
|||||||
this.editUserInfoDialog = false;
|
this.editUserInfoDialog = false;
|
||||||
},
|
},
|
||||||
async logout() {
|
async logout() {
|
||||||
|
let redirectPath = ''
|
||||||
|
if (this.$route && this.$route.fullPath && !this.$route.fullPath.includes('/login')) {
|
||||||
|
redirectPath = this.$route.fullPath
|
||||||
|
sessionStorage.setItem('loginRedirectPath', redirectPath)
|
||||||
|
}
|
||||||
store.commit('tagsView/resetBreadcrumbState');
|
store.commit('tagsView/resetBreadcrumbState');
|
||||||
store.commit('permission/RESET_ROUTES');
|
store.commit('permission/RESET_ROUTES');
|
||||||
sessionStorage.removeItem("auths");
|
sessionStorage.removeItem("auths");
|
||||||
@ -750,7 +755,10 @@ export default {
|
|||||||
localStorage.removeItem("org_type")
|
localStorage.removeItem("org_type")
|
||||||
sessionStorage.removeItem('userId')
|
sessionStorage.removeItem('userId')
|
||||||
this.$store.commit('setLoginState', false)
|
this.$store.commit('setLoginState', false)
|
||||||
await this.$router.push(getHomePath());
|
await this.$router.push({
|
||||||
|
path: '/login',
|
||||||
|
query: redirectPath ? { redirect: redirectPath } : {}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
async logout1() {
|
async logout1() {
|
||||||
logoutAPI().then((res) => {
|
logoutAPI().then((res) => {
|
||||||
|
|||||||
@ -148,6 +148,9 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
}
|
}
|
||||||
// next(`/login?redirect=${to.path}`);
|
// next(`/login?redirect=${to.path}`);
|
||||||
console.log("路由执行了2@@@")
|
console.log("路由执行了2@@@")
|
||||||
|
if (to.fullPath && !to.fullPath.includes('/login')) {
|
||||||
|
sessionStorage.setItem('loginRedirectPath', to.fullPath)
|
||||||
|
}
|
||||||
next(homePath)
|
next(homePath)
|
||||||
// next(`/beforeLogin`);
|
// next(`/beforeLogin`);
|
||||||
// console.log("111行被打印了")
|
// console.log("111行被打印了")
|
||||||
@ -177,6 +180,9 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
// console.log(error);
|
// console.log(error);
|
||||||
Message.error(error || "Has Error");
|
Message.error(error || "Has Error");
|
||||||
// next(`/login?redirect=${to.path}`);
|
// next(`/login?redirect=${to.path}`);
|
||||||
|
if (to.fullPath && !to.fullPath.includes('/login')) {
|
||||||
|
sessionStorage.setItem('loginRedirectPath', to.fullPath)
|
||||||
|
}
|
||||||
next(homePath)
|
next(homePath)
|
||||||
// console.log("137行被打印了")
|
// console.log("137行被打印了")
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
|
|||||||
@ -44,6 +44,14 @@ if (window.location.href.includes("dev.opencomputing.cn")) {
|
|||||||
console.log("环境的前缀时" + testUrl); // 应该输出 'https://www.kaiyuancloud.cn/dev'
|
console.log("环境的前缀时" + testUrl); // 应该输出 'https://www.kaiyuancloud.cn/dev'
|
||||||
let isRedirectingToLogin = false
|
let isRedirectingToLogin = false
|
||||||
|
|
||||||
|
const saveLoginRedirectPath = () => {
|
||||||
|
const currentRoute = router.currentRoute
|
||||||
|
const fullPath = currentRoute && currentRoute.fullPath
|
||||||
|
if (fullPath && !fullPath.includes('/login')) {
|
||||||
|
sessionStorage.setItem('loginRedirectPath', fullPath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const getErrorStatus = (error) => {
|
const getErrorStatus = (error) => {
|
||||||
if (error && error.response && error.response.status) {
|
if (error && error.response && error.response.status) {
|
||||||
return Number(error.response.status)
|
return Number(error.response.status)
|
||||||
@ -155,6 +163,7 @@ service.interceptors.response.use(
|
|||||||
if (code == 401) {
|
if (code == 401) {
|
||||||
if (!isRedirectingToLogin) {
|
if (!isRedirectingToLogin) {
|
||||||
isRedirectingToLogin = true
|
isRedirectingToLogin = true
|
||||||
|
saveLoginRedirectPath()
|
||||||
showErrorMessage('登录已过期,请重新登录')
|
showErrorMessage('登录已过期,请重新登录')
|
||||||
router.push({path: '/login'}).finally(() => {
|
router.push({path: '/login'}).finally(() => {
|
||||||
isRedirectingToLogin = false
|
isRedirectingToLogin = false
|
||||||
|
|||||||
@ -36,9 +36,9 @@
|
|||||||
<h2>应用场景</h2>
|
<h2>应用场景</h2>
|
||||||
<p>覆盖企业合同全生命周期审核链路</p>
|
<p>覆盖企业合同全生命周期审核链路</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="scenario-grid">
|
<div class="case-scenario-grid">
|
||||||
<article class="feature-card scenario-card">
|
<article class="case-feature-card scenario-card">
|
||||||
<div class="feature-card__visual feature-card__visual--illustration visual-blue">
|
<div class="case-feature-card__visual case-feature-card__visual--illustration visual-blue">
|
||||||
<svg viewBox="0 0 400 200" fill="none">
|
<svg viewBox="0 0 400 200" fill="none">
|
||||||
<circle cx="320" cy="40" r="60" fill="#3b82f6" opacity="0.1" />
|
<circle cx="320" cy="40" r="60" fill="#3b82f6" opacity="0.1" />
|
||||||
<circle cx="80" cy="160" r="40" fill="#6366f1" opacity="0.1" />
|
<circle cx="80" cy="160" r="40" fill="#6366f1" opacity="0.1" />
|
||||||
@ -69,8 +69,8 @@
|
|||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div class="feature-card__head">
|
<div class="case-feature-card__head">
|
||||||
<span class="icon-gradient">
|
<span class="case-icon-gradient">
|
||||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414A1 1 0 0119 9.414V19a2 2 0 01-2 2z" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414A1 1 0 0119 9.414V19a2 2 0 01-2 2z" />
|
||||||
</svg>
|
</svg>
|
||||||
@ -80,8 +80,8 @@
|
|||||||
<p>自动解析购销、服务、租赁、合作类通用业务合同,逐条对标企业风控红线快速筛查风险点,输出初审意见,减轻法务基础审核工作量,快速完成业务前置审批。</p>
|
<p>自动解析购销、服务、租赁、合作类通用业务合同,逐条对标企业风控红线快速筛查风险点,输出初审意见,减轻法务基础审核工作量,快速完成业务前置审批。</p>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<article class="feature-card scenario-card">
|
<article class="case-feature-card scenario-card">
|
||||||
<div class="feature-card__visual feature-card__visual--illustration visual-purple">
|
<div class="case-feature-card__visual case-feature-card__visual--illustration visual-purple">
|
||||||
<svg viewBox="0 0 400 200" fill="none">
|
<svg viewBox="0 0 400 200" fill="none">
|
||||||
<circle cx="100" cy="50" r="50" fill="#8b5cf6" opacity="0.1" />
|
<circle cx="100" cy="50" r="50" fill="#8b5cf6" opacity="0.1" />
|
||||||
<circle cx="300" cy="150" r="60" fill="#ec4899" opacity="0.1" />
|
<circle cx="300" cy="150" r="60" fill="#ec4899" opacity="0.1" />
|
||||||
@ -103,8 +103,8 @@
|
|||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div class="feature-card__head">
|
<div class="case-feature-card__head">
|
||||||
<span class="icon-gradient">
|
<span class="case-icon-gradient">
|
||||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" />
|
||||||
</svg>
|
</svg>
|
||||||
@ -114,8 +114,8 @@
|
|||||||
<p>针对投融资、知识产权、工程、保密竞业等高风险专项合同,联动完整法条与司法判例开展多层级风险推演,梳理权责漏洞、违约缺陷、管辖争议等深层隐患,输出完整风控评估文档。</p>
|
<p>针对投融资、知识产权、工程、保密竞业等高风险专项合同,联动完整法条与司法判例开展多层级风险推演,梳理权责漏洞、违约缺陷、管辖争议等深层隐患,输出完整风控评估文档。</p>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<article class="feature-card scenario-card">
|
<article class="case-feature-card scenario-card">
|
||||||
<div class="feature-card__visual feature-card__visual--illustration visual-green">
|
<div class="case-feature-card__visual case-feature-card__visual--illustration visual-green">
|
||||||
<svg viewBox="0 0 400 200" fill="none">
|
<svg viewBox="0 0 400 200" fill="none">
|
||||||
<circle cx="350" cy="60" r="50" fill="#10b981" opacity="0.1" />
|
<circle cx="350" cy="60" r="50" fill="#10b981" opacity="0.1" />
|
||||||
<circle cx="50" cy="140" r="40" fill="#14b8a6" opacity="0.1" />
|
<circle cx="50" cy="140" r="40" fill="#14b8a6" opacity="0.1" />
|
||||||
@ -150,8 +150,8 @@
|
|||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div class="feature-card__head">
|
<div class="case-feature-card__head">
|
||||||
<span class="icon-gradient">
|
<span class="case-icon-gradient">
|
||||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4" />
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4" />
|
||||||
</svg>
|
</svg>
|
||||||
@ -224,8 +224,8 @@
|
|||||||
<h2>项目亮点</h2>
|
<h2>项目亮点</h2>
|
||||||
<p>全流程智能风控,四大核心审查能力落地</p>
|
<p>全流程智能风控,四大核心审查能力落地</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="highlight-grid">
|
<div class="case-highlight-grid">
|
||||||
<article v-for="(item, index) in highlights" :key="item.title" class="highlight-card">
|
<article v-for="(item, index) in highlights" :key="item.title" class="case-highlight-card">
|
||||||
<span class="highlight-num">{{ index + 1 }}</span>
|
<span class="highlight-num">{{ index + 1 }}</span>
|
||||||
<div>
|
<div>
|
||||||
<h3>{{ item.title }}</h3>
|
<h3>{{ item.title }}</h3>
|
||||||
@ -569,15 +569,17 @@ export default {
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scenario-grid,
|
.case-scenario-grid,
|
||||||
.solution-grid,
|
.solution-grid,
|
||||||
.highlight-grid {
|
.case-highlight-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 32px;
|
gap: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scenario-grid {
|
.contract-case-page .case-scenario-grid {
|
||||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
display: grid !important;
|
||||||
|
grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
|
||||||
|
gap: 32px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.solution-grid {
|
.solution-grid {
|
||||||
@ -585,49 +587,52 @@ export default {
|
|||||||
gap: 48px;
|
gap: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight-grid {
|
.contract-case-page .case-highlight-grid {
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
display: grid !important;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
|
||||||
|
gap: 32px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-card,
|
.contract-case-page .case-feature-card,
|
||||||
.solution-item,
|
.solution-item,
|
||||||
.highlight-card {
|
.contract-case-page .case-highlight-card {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
|
box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-card:hover,
|
.contract-case-page .case-feature-card:hover,
|
||||||
.solution-item:hover,
|
.solution-item:hover,
|
||||||
.highlight-card:hover {
|
.contract-case-page .case-highlight-card:hover {
|
||||||
transform: translateY(-4px);
|
transform: translateY(-4px);
|
||||||
box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
|
box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-card {
|
.contract-case-page .case-feature-card {
|
||||||
overflow: hidden;
|
display: block !important;
|
||||||
|
overflow: hidden !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-card__visual {
|
.case-feature-card__visual {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 190px;
|
height: 190px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-card__visual svg {
|
.case-feature-card__visual svg {
|
||||||
width: 84px;
|
width: 84px;
|
||||||
height: 84px;
|
height: 84px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-card__visual--illustration {
|
.case-feature-card__visual--illustration {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 192px;
|
height: 192px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-card__visual--illustration > svg {
|
.case-feature-card__visual--illustration > svg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -691,7 +696,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-card__head {
|
.case-feature-card__head {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
@ -699,28 +704,28 @@ export default {
|
|||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-card h3,
|
.case-feature-card h3,
|
||||||
.solution-item h4,
|
.solution-item h4,
|
||||||
.highlight-card h3 {
|
.case-highlight-card h3 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #111827;
|
color: #111827;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-card p,
|
.case-feature-card p,
|
||||||
.solution-item p,
|
.solution-item p,
|
||||||
.highlight-card p {
|
.case-highlight-card p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: #4b5563;
|
color: #4b5563;
|
||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-card > p {
|
.case-feature-card > p {
|
||||||
padding: 0 32px 32px;
|
padding: 0 32px 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-gradient,
|
.case-icon-gradient,
|
||||||
.solution-icon,
|
.solution-icon,
|
||||||
.column-title span,
|
.column-title span,
|
||||||
.highlight-num {
|
.highlight-num {
|
||||||
@ -733,12 +738,12 @@ export default {
|
|||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-gradient {
|
.case-icon-gradient {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-gradient svg {
|
.case-icon-gradient svg {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
@ -804,8 +809,8 @@ export default {
|
|||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight-card {
|
.contract-case-page .case-highlight-card {
|
||||||
display: flex;
|
display: flex !important;
|
||||||
gap: 18px;
|
gap: 18px;
|
||||||
padding: 32px;
|
padding: 32px;
|
||||||
}
|
}
|
||||||
@ -817,7 +822,7 @@ export default {
|
|||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight-card h3 {
|
.case-highlight-card h3 {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -860,10 +865,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
@media (max-width: 1024px) {
|
||||||
.scenario-grid,
|
.case-scenario-grid,
|
||||||
.solution-grid,
|
.solution-grid,
|
||||||
.highlight-grid {
|
.case-highlight-grid {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -896,10 +901,10 @@ export default {
|
|||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feature-card__head,
|
.case-feature-card__head,
|
||||||
.feature-card > p,
|
.case-feature-card > p,
|
||||||
.solution-item,
|
.solution-item,
|
||||||
.highlight-card {
|
.case-highlight-card {
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -101,7 +101,7 @@ export default {
|
|||||||
name: 'AgentStore',
|
name: 'AgentStore',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeMainTab: 'industry',
|
activeMainTab: 'general',
|
||||||
activeSubTab: 'all',
|
activeSubTab: 'all',
|
||||||
generalSubTabs: [
|
generalSubTabs: [
|
||||||
{ id: 'all', label: '全部' },
|
{ id: 'all', label: '全部' },
|
||||||
|
|||||||
@ -66,8 +66,8 @@
|
|||||||
<!-- 用户下拉菜单(已登录) -->
|
<!-- 用户下拉菜单(已登录) -->
|
||||||
<el-dropdown v-if="loginState" @visible-change="handleShow"
|
<el-dropdown v-if="loginState" @visible-change="handleShow"
|
||||||
class="avatar-container right-menu-item hover-effect nick-name-style" style="margin-right: 0" trigger="click">
|
class="avatar-container right-menu-item hover-effect nick-name-style" style="margin-right: 0" trigger="click">
|
||||||
<!-- 头像区域:添加点击事件 -->
|
<!-- 头像区域:仅作为下拉菜单触发器 -->
|
||||||
<div class="avatar-wrapper" @click="goHome">
|
<div class="avatar-wrapper">
|
||||||
<i
|
<i
|
||||||
style="font-size: 18px; color: #262626;font-weight: 400;cursor: pointer;display: flex;justify-content: flex-end;align-items: center">
|
style="font-size: 18px; color: #262626;font-weight: 400;cursor: pointer;display: flex;justify-content: flex-end;align-items: center">
|
||||||
<div class="imgUser"><img src="../../../../assets/image/user.png" alt=""></div>
|
<div class="imgUser"><img src="../../../../assets/image/user.png" alt=""></div>
|
||||||
@ -787,6 +787,11 @@ export default Vue.extend({
|
|||||||
|
|
||||||
// 退出登录
|
// 退出登录
|
||||||
async logout() {
|
async logout() {
|
||||||
|
let redirectPath = ''
|
||||||
|
if (this.$route && this.$route.fullPath && !this.$route.fullPath.includes('/login')) {
|
||||||
|
redirectPath = this.$route.fullPath
|
||||||
|
sessionStorage.setItem('loginRedirectPath', redirectPath)
|
||||||
|
}
|
||||||
this.$store.commit('setLoginState', false)
|
this.$store.commit('setLoginState', false)
|
||||||
store.commit('tagsView/resetBreadcrumbState');
|
store.commit('tagsView/resetBreadcrumbState');
|
||||||
store.commit('permission/RESET_ROUTES');
|
store.commit('permission/RESET_ROUTES');
|
||||||
@ -806,9 +811,10 @@ export default Vue.extend({
|
|||||||
localStorage.removeItem("userId");
|
localStorage.removeItem("userId");
|
||||||
localStorage.removeItem("org_type")
|
localStorage.removeItem("org_type")
|
||||||
localStorage.removeItem('userId')
|
localStorage.removeItem('userId')
|
||||||
if (!window.location.href.includes('homePage/index')) {
|
await this.$router.push({
|
||||||
await this.$router.push(getHomePath());
|
path: '/login',
|
||||||
}
|
query: redirectPath ? { redirect: redirectPath } : {}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 修改密码
|
// 修改密码
|
||||||
|
|||||||
@ -462,8 +462,10 @@ export default {
|
|||||||
console.log("生成的路径是", accessRoutes);
|
console.log("生成的路径是", accessRoutes);
|
||||||
router.addRoutes(accessRoutes);
|
router.addRoutes(accessRoutes);
|
||||||
|
|
||||||
// 根据角色跳转到不同页面
|
// 登录过期或退出登录后,优先回到离开前的页面。
|
||||||
if (org_type === "2" || org_type === "3") {
|
if (this.redirectToSavedPage()) {
|
||||||
|
// 已跳转到原页面
|
||||||
|
} else if (org_type === "2" || org_type === "3") {
|
||||||
this.$router.push("/product/productHome");
|
this.$router.push("/product/productHome");
|
||||||
} else if (response.roles.includes("运营")) {
|
} else if (response.roles.includes("运营")) {
|
||||||
this.$router.push("/operation/supplierManagement");
|
this.$router.push("/operation/supplierManagement");
|
||||||
@ -740,6 +742,35 @@ export default {
|
|||||||
this.capsTooltip = key && key.length === 1 && key >= "A" && key <= "Z";
|
this.capsTooltip = key && key.length === 1 && key >= "A" && key <= "Z";
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getLoginRedirectPath() {
|
||||||
|
const queryRedirect = this.$route.query && this.$route.query.redirect
|
||||||
|
const rawPath = Array.isArray(queryRedirect)
|
||||||
|
? queryRedirect[0]
|
||||||
|
: queryRedirect || sessionStorage.getItem('loginRedirectPath')
|
||||||
|
if (!rawPath) return ''
|
||||||
|
|
||||||
|
let redirectPath = rawPath
|
||||||
|
try {
|
||||||
|
redirectPath = decodeURIComponent(rawPath)
|
||||||
|
} catch (error) {
|
||||||
|
redirectPath = rawPath
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!redirectPath || !redirectPath.startsWith('/') || redirectPath.includes('/login')) {
|
||||||
|
sessionStorage.removeItem('loginRedirectPath')
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
return redirectPath
|
||||||
|
},
|
||||||
|
|
||||||
|
redirectToSavedPage() {
|
||||||
|
const redirectPath = this.getLoginRedirectPath()
|
||||||
|
if (!redirectPath) return false
|
||||||
|
sessionStorage.removeItem('loginRedirectPath')
|
||||||
|
this.$router.push(redirectPath)
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
|
||||||
// 处理登录
|
// 处理登录
|
||||||
handleLogin(formName) {
|
handleLogin(formName) {
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
@ -776,8 +807,10 @@ export default {
|
|||||||
sessionStorage.setItem("org_type", res.org_type);
|
sessionStorage.setItem("org_type", res.org_type);
|
||||||
sessionStorage.setItem("username", res['user'].username);
|
sessionStorage.setItem("username", res['user'].username);
|
||||||
|
|
||||||
// 根据角色跳转到不同页面
|
// 登录过期或退出登录后,优先回到离开前的页面。
|
||||||
if (res.admin === 1) {
|
if (this.redirectToSavedPage()) {
|
||||||
|
// 已跳转到原页面
|
||||||
|
} else if (res.admin === 1) {
|
||||||
this.$router.push({ path: "/" });
|
this.$router.push({ path: "/" });
|
||||||
} else if (
|
} else if (
|
||||||
sessionStorage.getItem("org_type") == "2" ||
|
sessionStorage.getItem("org_type") == "2" ||
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user