合同审查页面 #133

Merged
charles merged 1 commits from main into prod 2026-06-23 15:23:37 +08:00
7 changed files with 127 additions and 60 deletions

View File

@ -730,6 +730,11 @@ export default {
this.editUserInfoDialog = false;
},
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('permission/RESET_ROUTES');
sessionStorage.removeItem("auths");
@ -750,7 +755,10 @@ export default {
localStorage.removeItem("org_type")
sessionStorage.removeItem('userId')
this.$store.commit('setLoginState', false)
await this.$router.push(getHomePath());
await this.$router.push({
path: '/login',
query: redirectPath ? { redirect: redirectPath } : {}
});
},
async logout1() {
logoutAPI().then((res) => {

View File

@ -148,6 +148,9 @@ router.beforeEach(async (to, from, next) => {
}
// next(`/login?redirect=${to.path}`);
console.log("路由执行了2@@@")
if (to.fullPath && !to.fullPath.includes('/login')) {
sessionStorage.setItem('loginRedirectPath', to.fullPath)
}
next(homePath)
// next(`/beforeLogin`);
// console.log("111行被打印了")
@ -177,6 +180,9 @@ router.beforeEach(async (to, from, next) => {
// console.log(error);
Message.error(error || "Has Error");
// next(`/login?redirect=${to.path}`);
if (to.fullPath && !to.fullPath.includes('/login')) {
sessionStorage.setItem('loginRedirectPath', to.fullPath)
}
next(homePath)
// console.log("137行被打印了")
NProgress.done();

View File

@ -44,6 +44,14 @@ if (window.location.href.includes("dev.opencomputing.cn")) {
console.log("环境的前缀时" + testUrl); // 应该输出 'https://www.kaiyuancloud.cn/dev'
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) => {
if (error && error.response && error.response.status) {
return Number(error.response.status)
@ -155,6 +163,7 @@ service.interceptors.response.use(
if (code == 401) {
if (!isRedirectingToLogin) {
isRedirectingToLogin = true
saveLoginRedirectPath()
showErrorMessage('登录已过期,请重新登录')
router.push({path: '/login'}).finally(() => {
isRedirectingToLogin = false

View File

@ -36,9 +36,9 @@
<h2>应用场景</h2>
<p>覆盖企业合同全生命周期审核链路</p>
</div>
<div class="scenario-grid">
<article class="feature-card scenario-card">
<div class="feature-card__visual feature-card__visual--illustration visual-blue">
<div class="case-scenario-grid">
<article class="case-feature-card scenario-card">
<div class="case-feature-card__visual case-feature-card__visual--illustration visual-blue">
<svg viewBox="0 0 400 200" fill="none">
<circle cx="320" cy="40" r="60" fill="#3b82f6" opacity="0.1" />
<circle cx="80" cy="160" r="40" fill="#6366f1" opacity="0.1" />
@ -69,8 +69,8 @@
</g>
</svg>
</div>
<div class="feature-card__head">
<span class="icon-gradient">
<div class="case-feature-card__head">
<span class="case-icon-gradient">
<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" />
</svg>
@ -80,8 +80,8 @@
<p>自动解析购销服务租赁合作类通用业务合同逐条对标企业风控红线快速筛查风险点输出初审意见减轻法务基础审核工作量快速完成业务前置审批</p>
</article>
<article class="feature-card scenario-card">
<div class="feature-card__visual feature-card__visual--illustration visual-purple">
<article class="case-feature-card scenario-card">
<div class="case-feature-card__visual case-feature-card__visual--illustration visual-purple">
<svg viewBox="0 0 400 200" fill="none">
<circle cx="100" cy="50" r="50" fill="#8b5cf6" opacity="0.1" />
<circle cx="300" cy="150" r="60" fill="#ec4899" opacity="0.1" />
@ -103,8 +103,8 @@
</g>
</svg>
</div>
<div class="feature-card__head">
<span class="icon-gradient">
<div class="case-feature-card__head">
<span class="case-icon-gradient">
<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" />
</svg>
@ -114,8 +114,8 @@
<p>针对投融资知识产权工程保密竞业等高风险专项合同联动完整法条与司法判例开展多层级风险推演梳理权责漏洞违约缺陷管辖争议等深层隐患输出完整风控评估文档</p>
</article>
<article class="feature-card scenario-card">
<div class="feature-card__visual feature-card__visual--illustration visual-green">
<article class="case-feature-card scenario-card">
<div class="case-feature-card__visual case-feature-card__visual--illustration visual-green">
<svg viewBox="0 0 400 200" fill="none">
<circle cx="350" cy="60" r="50" fill="#10b981" opacity="0.1" />
<circle cx="50" cy="140" r="40" fill="#14b8a6" opacity="0.1" />
@ -150,8 +150,8 @@
</g>
</svg>
</div>
<div class="feature-card__head">
<span class="icon-gradient">
<div class="case-feature-card__head">
<span class="case-icon-gradient">
<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" />
</svg>
@ -224,8 +224,8 @@
<h2>项目亮点</h2>
<p>全流程智能风控四大核心审查能力落地</p>
</div>
<div class="highlight-grid">
<article v-for="(item, index) in highlights" :key="item.title" class="highlight-card">
<div class="case-highlight-grid">
<article v-for="(item, index) in highlights" :key="item.title" class="case-highlight-card">
<span class="highlight-num">{{ index + 1 }}</span>
<div>
<h3>{{ item.title }}</h3>
@ -569,15 +569,17 @@ export default {
font-size: 20px;
}
.scenario-grid,
.case-scenario-grid,
.solution-grid,
.highlight-grid {
.case-highlight-grid {
display: grid;
gap: 32px;
}
.scenario-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
.contract-case-page .case-scenario-grid {
display: grid !important;
grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
gap: 32px !important;
}
.solution-grid {
@ -585,49 +587,52 @@ export default {
gap: 48px;
}
.highlight-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
.contract-case-page .case-highlight-grid {
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,
.highlight-card {
.contract-case-page .case-highlight-card {
background: #fff;
border-radius: 18px;
box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
transition: all 0.3s ease;
}
.feature-card:hover,
.contract-case-page .case-feature-card:hover,
.solution-item:hover,
.highlight-card:hover {
.contract-case-page .case-highlight-card:hover {
transform: translateY(-4px);
box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}
.feature-card {
overflow: hidden;
.contract-case-page .case-feature-card {
display: block !important;
overflow: hidden !important;
}
.feature-card__visual {
.case-feature-card__visual {
display: flex;
align-items: center;
justify-content: center;
height: 190px;
}
.feature-card__visual svg {
.case-feature-card__visual svg {
width: 84px;
height: 84px;
}
.feature-card__visual--illustration {
.case-feature-card__visual--illustration {
position: relative;
height: 192px;
overflow: hidden;
}
.feature-card__visual--illustration > svg {
.case-feature-card__visual--illustration > svg {
position: absolute;
inset: 0;
width: 100%;
@ -691,7 +696,7 @@ export default {
}
}
.feature-card__head {
.case-feature-card__head {
display: flex;
align-items: center;
gap: 12px;
@ -699,28 +704,28 @@ export default {
margin-bottom: 16px;
}
.feature-card h3,
.case-feature-card h3,
.solution-item h4,
.highlight-card h3 {
.case-highlight-card h3 {
margin: 0;
color: #111827;
font-size: 20px;
font-weight: 700;
}
.feature-card p,
.case-feature-card p,
.solution-item p,
.highlight-card p {
.case-highlight-card p {
margin: 0;
color: #4b5563;
line-height: 1.7;
}
.feature-card > p {
.case-feature-card > p {
padding: 0 32px 32px;
}
.icon-gradient,
.case-icon-gradient,
.solution-icon,
.column-title span,
.highlight-num {
@ -733,12 +738,12 @@ export default {
border-radius: 12px;
}
.icon-gradient {
.case-icon-gradient {
width: 40px;
height: 40px;
}
.icon-gradient svg {
.case-icon-gradient svg {
width: 20px;
height: 20px;
}
@ -804,8 +809,8 @@ export default {
margin-bottom: 8px;
}
.highlight-card {
display: flex;
.contract-case-page .case-highlight-card {
display: flex !important;
gap: 18px;
padding: 32px;
}
@ -817,7 +822,7 @@ export default {
font-weight: 800;
}
.highlight-card h3 {
.case-highlight-card h3 {
margin-bottom: 12px;
}
@ -860,10 +865,10 @@ export default {
}
@media (max-width: 1024px) {
.scenario-grid,
.case-scenario-grid,
.solution-grid,
.highlight-grid {
grid-template-columns: 1fr;
.case-highlight-grid {
grid-template-columns: 1fr !important;
}
}
@ -896,10 +901,10 @@ export default {
font-size: 30px;
}
.feature-card__head,
.feature-card > p,
.case-feature-card__head,
.case-feature-card > p,
.solution-item,
.highlight-card {
.case-highlight-card {
padding: 24px;
}
}

View File

@ -101,7 +101,7 @@ export default {
name: 'AgentStore',
data() {
return {
activeMainTab: 'industry',
activeMainTab: 'general',
activeSubTab: 'all',
generalSubTabs: [
{ id: 'all', label: '全部' },

View File

@ -66,8 +66,8 @@
<!-- 用户下拉菜单已登录 -->
<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">
<!-- 头像区域添加点击事件 -->
<div class="avatar-wrapper" @click="goHome">
<!-- 头像区域仅作为下拉菜单触发器 -->
<div class="avatar-wrapper">
<i
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>
@ -787,6 +787,11 @@ export default Vue.extend({
// 退
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)
store.commit('tagsView/resetBreadcrumbState');
store.commit('permission/RESET_ROUTES');
@ -806,9 +811,10 @@ export default Vue.extend({
localStorage.removeItem("userId");
localStorage.removeItem("org_type")
localStorage.removeItem('userId')
if (!window.location.href.includes('homePage/index')) {
await this.$router.push(getHomePath());
}
await this.$router.push({
path: '/login',
query: redirectPath ? { redirect: redirectPath } : {}
});
},
//

View File

@ -462,8 +462,10 @@ export default {
console.log("生成的路径是", 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");
} else if (response.roles.includes("运营")) {
this.$router.push("/operation/supplierManagement");
@ -740,6 +742,35 @@ export default {
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) {
this.$refs[formName].validate((valid) => {
@ -776,8 +807,10 @@ export default {
sessionStorage.setItem("org_type", res.org_type);
sessionStorage.setItem("username", res['user'].username);
//
if (res.admin === 1) {
// 退
if (this.redirectToSavedPage()) {
//
} else if (res.admin === 1) {
this.$router.push({ path: "/" });
} else if (
sessionStorage.getItem("org_type") == "2" ||