feat: There is no way the, 配置公开搜索中心 外部访问
This commit is contained in:
+2
-1
@@ -216,7 +216,8 @@ export default {
|
||||
&& this.$route.name !== 'beeEnergyLogin' && this.$route.name !== 'mdLawLogin'
|
||||
&& this.$route.name !== 'nuoBLogin' && this.$route.name !== 'sTLogin'
|
||||
&& this.$route.name !== 'StandardSearch' && this.$route.name !== 'phoneIndex'
|
||||
&& this.$route.name !== 'blankPage' && this.$route.name !== 'processedPage' ) {
|
||||
&& this.$route.name !== 'AdvancedSearchExternal' && this.$route.name !== 'LoginVerifyNoEncryption'
|
||||
&& this.$route.name !== 'blankPage' && this.$route.name !== 'processedPage') {
|
||||
this.isBoolean = true
|
||||
} else {
|
||||
this.isBoolean = false
|
||||
|
||||
@@ -561,6 +561,14 @@ export function loginIdm (data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function checkPageNoEncryption (data) {
|
||||
return axios({
|
||||
url: '/api/checkPageNoEncryption',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 流程委托接口
|
||||
export function changeAssigneeNew (data) {
|
||||
return axios({
|
||||
|
||||
+35
-6
@@ -68,8 +68,20 @@ router.beforeEach(function (to, from, next) {
|
||||
if (toName === 'CheckPage') {
|
||||
next()
|
||||
}
|
||||
|
||||
let fromName = from.name
|
||||
let token = store.state.token
|
||||
let path = to.path;
|
||||
let userName = ""
|
||||
if((fromName === undefined || fromName === null) && path.indexOf("/standardSearch/All&userName=") !== -1){
|
||||
userName = path.split("&")[1].split("=")[1]
|
||||
window.sessionStorage.clear()
|
||||
}else {
|
||||
if(fromName === 'Home2'){
|
||||
localStorage.removeItem("external")
|
||||
}
|
||||
userName = to.query.userName
|
||||
}
|
||||
let requireAuth = to.meta.requireAuth;
|
||||
let taskId = to.query.taskIds;
|
||||
let prcId = to.query.prcId;
|
||||
@@ -109,6 +121,7 @@ router.beforeEach(function (to, from, next) {
|
||||
}
|
||||
|
||||
function extractedLocalStorage(url,param,param4) {
|
||||
localStorage.removeItem("external")
|
||||
localStorage.removeItem("routerUrl")
|
||||
localStorage.setItem('routerUrl', url)
|
||||
localStorage.removeItem("routerParam")
|
||||
@@ -175,13 +188,23 @@ router.beforeEach(function (to, from, next) {
|
||||
if (taskId !== undefined && taskId !== null && prcId !== undefined && prcId !== null) {
|
||||
extractedVerify(token)
|
||||
}else {
|
||||
if(path === '/standardSearch/All'){
|
||||
extractedLocalStorage('standardSearch/All','');
|
||||
if((fromName === undefined || fromName === null) && path.indexOf("/standardSearch/All&userName") !== -1){
|
||||
extractedLocalStorage("standardSearch/All",userName)
|
||||
localStorage.setItem('external', "external")
|
||||
next('/LoginVerifyNoEncryption')
|
||||
}else {
|
||||
extractedLocalStorage('home2','');
|
||||
if (toName === 'LoginVerifyNoEncryption') {
|
||||
next()
|
||||
}else {
|
||||
if(path === '/standardSearch/All'){
|
||||
extractedLocalStorage('standardSearch/All','');
|
||||
}else {
|
||||
extractedLocalStorage('home2','');
|
||||
}
|
||||
// ssoLoginUrlDev 默认sso 地址
|
||||
window.location.href = ssoLoginUrlDev
|
||||
}
|
||||
}
|
||||
// ssoLoginUrlDev 默认sso 地址
|
||||
window.location.href = ssoLoginUrlDev
|
||||
}
|
||||
}
|
||||
}else if(webLoginType != null && webLoginType === 'dev'){
|
||||
@@ -364,7 +387,13 @@ router.beforeEach(function (to, from, next) {
|
||||
next()
|
||||
}
|
||||
}else {
|
||||
next()
|
||||
if((fromName === undefined || fromName === null) && path.indexOf("/standardSearch/All&userName") !== -1) {
|
||||
extractedLocalStorage("standardSearch/All",userName)
|
||||
localStorage.setItem('external', "external")
|
||||
next('/LoginVerifyNoEncryption')
|
||||
}else {
|
||||
next()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
<!-- 长城项目 登录页 -->
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapMutations, mapActions } from 'vuex'
|
||||
import axios from 'axios'
|
||||
import util from 'util'
|
||||
import { get_verify_by_instance,loginIdm,getMenu,checkPageNoEncryption } from 'api/process'
|
||||
import { ssoLoginUrlDev,ssoLogoutUrlDev,ssoLoginUrl,webLoginType,devWebUrl } from '@/sysConfig'
|
||||
|
||||
export default {
|
||||
name: 'LoginVerifyNoEncryption',
|
||||
data () {
|
||||
return {
|
||||
username: this.$store.state.laws_urm || '', // 用户名
|
||||
password: this.$store.state.laws_prm || '', // 密码
|
||||
loading: false,
|
||||
isRemember: false, // 记住密码
|
||||
showIETips: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* @description: 获取菜单logout
|
||||
* @author: chenxiaoxi
|
||||
* @date: 2018/11/11 13:42:14
|
||||
*/
|
||||
getMenu () {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$http.get('sarUser/user/menu', {
|
||||
userId: this.$store.getters.userInfo.userId,
|
||||
}, {
|
||||
_this: this,
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
resolve(res.data)
|
||||
}
|
||||
}, e => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
loginNew (res) {
|
||||
let Base64 = require('js-base64').Base64
|
||||
let userInfoStr = Base64.decode(res.data)
|
||||
let userInfo2 = decodeURIComponent(userInfoStr)
|
||||
let userInfoObj = JSON.parse(userInfo2)
|
||||
userInfoObj.userId = userInfoObj.usid
|
||||
window.sessionStorage.setItem('userInfoObj', userInfoObj); // del
|
||||
this.setToken(userInfoObj.token) // vuex存储token
|
||||
// this.$router.push('/home1')
|
||||
let routerUrl = localStorage.getItem("routerUrl");
|
||||
let routerParam = localStorage.getItem("routerParam");
|
||||
// 路由跳转
|
||||
if(routerParam && routerParam !== ''){
|
||||
const UA = navigator.userAgent.toLocaleLowerCase()
|
||||
if (UA.match(/msie/) != null || UA.match(/trident/) != null) {
|
||||
alert('为了最佳显示效果 请使用google chrome')
|
||||
}
|
||||
this.$router.push('/'+routerUrl)
|
||||
}
|
||||
},
|
||||
...mapMutations(['setToken', 'setUserInfo', 'resetTime', 'rememberPwd', 'setJESSCookie']),
|
||||
...mapActions(['setMenu'])
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
mounted () {
|
||||
let userName = localStorage.getItem("routerParam");
|
||||
if(userName !== undefined && userName !== ""){
|
||||
checkPageNoEncryption({
|
||||
username: userName
|
||||
}, {
|
||||
_this: this
|
||||
}).then(res => {
|
||||
if (res.ok) {
|
||||
this.loginNew(res)
|
||||
} else {
|
||||
if(res.respCode && res.respCode === 'r0011'){
|
||||
this.$store.dispatch('logout')
|
||||
this.$alert('您没有系统访问权限,请联系管理员进行授权', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'warning',
|
||||
showClose: false,
|
||||
showCancelButton: false,
|
||||
}).then(() => {
|
||||
window.location.href = ssoLogoutUrlDev
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}else {
|
||||
window.location.href = ssoLogoutUrlDev
|
||||
}
|
||||
|
||||
if (this.$store.state.laws_urm !== '') {
|
||||
this.isRemember = true
|
||||
}
|
||||
const UA = navigator.userAgent.toLocaleLowerCase()
|
||||
if (UA.match(/msie/) != null || UA.match(/trident/) != null) {
|
||||
this.showIETips = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,10 +19,14 @@
|
||||
<div class="search-btn" @click="searchSarByInputKeyByCondition"></div>
|
||||
</div>
|
||||
</div>
|
||||
<router-link to="/advancedSearch" class="router-link">
|
||||
<!-- 外部访问点击高级检索搜索中心跳入指定页面 -->
|
||||
<router-link v-if="externalStatus === 'external'" to="/advancedSearchExternal" class="router-link">
|
||||
<div>高级检索</div>
|
||||
</router-link>
|
||||
<router-link to="/home2" class="router-link1">
|
||||
<router-link v-if="externalStatus !== 'external'" to="/advancedSearch" class="router-link">
|
||||
<div>高级检索</div>
|
||||
</router-link>
|
||||
<router-link v-if="externalStatus !== 'external'" to="/home2" class="router-link1">
|
||||
<div>首页</div>
|
||||
</router-link>
|
||||
</div>
|
||||
@@ -339,6 +343,7 @@
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
externalStatus:'',
|
||||
itermsConditionsTitle1: '',
|
||||
itermsConditionsTitle2: '',
|
||||
itermsConditionsFlag: false,
|
||||
@@ -2663,6 +2668,10 @@
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
let external = localStorage.getItem("external");
|
||||
if(external !== undefined && external !== null){
|
||||
this.externalStatus = external
|
||||
}
|
||||
let globalInputSearch = this.$route.params.searchValue
|
||||
if (globalInputSearch !== 'allvalue') {
|
||||
this.keywords = globalInputSearch
|
||||
|
||||
@@ -60,6 +60,12 @@ const routes = [
|
||||
component: () =>
|
||||
import('@/pages/loginVerify')
|
||||
},
|
||||
{
|
||||
path: '/loginVerifyNoEncryption',
|
||||
name: 'LoginVerifyNoEncryption',
|
||||
component: () =>
|
||||
import('@/pages/loginVerifyNoEncryption')
|
||||
},
|
||||
// 跳转刷新页面
|
||||
{
|
||||
path: '/redirect',
|
||||
@@ -4065,6 +4071,16 @@ const routes = [
|
||||
title: '高级检索',
|
||||
menuId: 'K9BAYUPZBC'
|
||||
}
|
||||
},{
|
||||
path: '/advancedSearchExternal/:selectKey?/:searchValue?',
|
||||
name: 'AdvancedSearchExternal',
|
||||
component: () =>
|
||||
import('@/pages/searchCenter/pages/advancedSearchExternal'),
|
||||
meta: {
|
||||
requireAuth: true,
|
||||
title: '高级检索',
|
||||
menuId: 'K9BAYUPZBC'
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: '/advancedSearch',
|
||||
|
||||
Reference in New Issue
Block a user