Commit 110445be authored by 黄奎's avatar 黄奎

页面修改

parent 2093a834
<style>
@import "../assets/css/Details.css";
@import "../assets/css/Details.css";
</style>
<template>
<div class="flexDiv">
<div class="secondMenu">
<div class="secondMenu_l">
<div class="menuItem" >
<el-menu
default-active=""
background-color="#282733"
text-color="#a3ace0"
active-text-color="#FFFFFF"
<div class="menuItem">
<el-menu default-active="" background-color="#282733" text-color="#a3ace0" active-text-color="#FFFFFF"
class="el-menu-vertical-demo" :collapse="isCollapse">
<el-submenu v-for="(item,index) in items" :index="String(index+1)" :key='index'>
<template slot="title" class="left-nav">
......@@ -18,8 +15,9 @@
</template>
<el-menu-item-group class="my_maxheight">
<span slot="title">{{item.MenuName}}</span>
<el-menu-item class="thridMenu" v-for="(subItem,sindex) in item.childerns" :index="String(index+1)+'-'+String(sindex+1)" @click="goUrl(subItem.MenuUrl)" :key='sindex'>
<i :class="[fontPub,subItem.MenuStyleIcon]" ></i>
<el-menu-item class="thridMenu" v-for="(subItem,sindex) in item.childerns"
:index="String(index+1)+'-'+String(sindex+1)" @click="goUrl(subItem.MenuUrl)" :key='sindex'>
<i :class="[fontPub,subItem.MenuStyleIcon]"></i>
{{subItem.MenuName}}</el-menu-item>
</el-menu-item-group>
</el-submenu>
......@@ -29,28 +27,37 @@
</div>
<div class="flexParent" v-if="openMode==1">
<div class="nav-tabs-box" @contextmenu.prevent="showRightMenu" :style="{width:`${navWidth}px`}">
<el-tabs v-if='tabs && tabs.length>0' v-model="currentTabName" style="margin-left: 120px;" :closable="tabs.length>1" type="card" @edit="handleTabsEdit">
<el-tabs v-if='tabs && tabs.length>0' v-model="currentTabName" style="margin-left: 120px;"
:closable="tabs.length>1" type="card" @edit="handleTabsEdit">
<el-tab-pane :key="i" v-for="(item,i) in tabs" :label="item.title" :name="item.name+'_'+i">
</el-tab-pane>
</el-tabs>
<div class="browner-opera-box" v-if="currentTag.history&&currentTag.history.length>0" style="border-bottom: 1px solid #e4e7ed;">
<i class="iconfont icon-houtui" @click="goback(0)" :class="{'active':this.currentTag && this.currentTag.hisIndex>0}" title="后退"></i>
<i class="iconfont icon-qianjin" @click="goback(1)" :class="{'active':this.currentTag && this.currentTag.hisIndex<this.currentTag.history.length-1}" title="前进"></i>
<div class="browner-opera-box" v-if="currentTag.history&&currentTag.history.length>0"
style="border-bottom: 1px solid #e4e7ed;">
<i class="iconfont icon-houtui" @click="goback(0)"
:class="{'active':this.currentTag && this.currentTag.hisIndex>0}" title="后退"></i>
<i class="iconfont icon-qianjin" @click="goback(1)"
:class="{'active':this.currentTag && this.currentTag.hisIndex<this.currentTag.history.length-1}"
title="前进"></i>
<i class="iconfont icon-shuaxin1 active" @click="reloadpage" title="刷新"></i>
</div>
</div>
<analogIFrame :key="i" :type='item.type' v-model="item.history" :curIndex='i' :refer='item.refer' v-show="tabs.indexOf(currentTag)==i" :componentTemp='item.comp' v-for="(item,i) in tabs" v-if='item.comp' :path='item.path' :name='item.name'></analogIFrame>
<analogIFrame :key="i" :type='item.type' v-model="item.history" :curIndex='i' :refer='item.refer'
v-show="tabs.indexOf(currentTag)==i" :componentTemp='item.comp' v-for="(item,i) in tabs" v-if='item.comp'
:path='item.path' :name='item.name'></analogIFrame>
</div>
<div class="flexParent" v-if="openMode==0">
<a :href='blankUrl' id='blankLink' target="_blank" style="display:none">1</a>
<div class="resource-ttop" style="font-family:PingFangSC-Semibold" v-if="rootName!=''">
{{rootName}}<i class="iconfont icon-weibiaoti102"></i>{{parentName}}<i class="iconfont icon-weibiaoti102"></i><span class="active">{{currentName}}</span>
{{rootName}}<i class="iconfont icon-weibiaoti102"></i>{{parentName}}<i
class="iconfont icon-weibiaoti102"></i><span class="active">{{currentName}}</span>
</div>
<div class="frame-box" ref="frameBox" name="frameBox">
<router-view></router-view>
</div>
</div>
<ul class="right-menu" @contextmenu.prevent="nullMethod" v-if='currentRightIndex>-1' :style="{top:mouserY+'px',left:mouseX+'px'}">
<ul class="right-menu" @contextmenu.prevent="nullMethod" v-if='currentRightIndex>-1'
:style="{top:mouserY+'px',left:mouseX+'px'}">
<li @click="referPage">重新加载当前页</li>
<li class="split"></li>
<li @click="closeCurrent" :class="{'disable':tabs.length==1}">关闭标签</li>
......@@ -60,11 +67,13 @@
</div>
</template>
<script type="text/javascript">
import routerConfig from '../router/config';
import analogIFrame from './analogIFrame';
import MsgBus from '../assets/utils/msgBus.js';
import { ALPN_ENABLED } from 'constants';
export default {
import routerConfig from '../router/config';
import analogIFrame from './analogIFrame';
import MsgBus from '../assets/utils/msgBus.js';
import {
ALPN_ENABLED
} from 'constants';
export default {
data() {
return {
msg: {
......@@ -80,53 +89,56 @@ export default {
parentName: "",
currentName: "",
isCollapse: true,
tabs:[],
currentTabName:'',
currentTag:{},
type:'d',
currentRightIndex:-1,
mouseX:0,
mouserY:0,
ctrlDown:false,
openMode:0,
blankUrl:'',
navWidth:0,
tabs: [],
currentTabName: '',
currentTag: {},
type: 'd',
currentRightIndex: -1,
mouseX: 0,
mouserY: 0,
ctrlDown: false,
openMode: 0,
blankUrl: '',
navWidth: 0,
//加密id
EnCodeWord:''
EnCodeWord: ''
};
},
components:{
components: {
analogIFrame
},
watch: {
$route: "getMenu",
currentTabName:function(val,oldval){
this.tabs.forEach((x,i)=>{
if((x.name+"_"+i)==val){
this.currentTag=x
if(!x.comp){
x.comp=this.mapObj(x.path,x.name).comp
currentTabName: function (val, oldval) {
this.tabs.forEach((x, i) => {
if ((x.name + "_" + i) == val) {
this.currentTag = x
if (!x.comp) {
x.comp = this.mapObj(x.path, x.name).comp
}
this.$router.push({path: x.path})
this.$router.push({
path: x.path
})
}
})
},
tabs: {
handler(newValue, oldValue) {
window.localStorage.navTabs=JSON.stringify(newValue)
window.localStorage.navTabs = JSON.stringify(newValue)
},
deep: true
  },
currentTag:{
},
currentTag: {
handler(newValue, oldValue) {
setTimeout(() => {
document.querySelectorAll('.frame-box').forEach(x=>{
if(x.style.display!='none'){
let opContents=x.querySelectorAll(".query-box ul li");
if(opContents && opContents.length>0){
this.navWidth=document.querySelector(".flexParent").offsetWidth-opContents[opContents.length-1].offsetWidth-50
}else{
this.navWidth=document.querySelector(".flexParent").offsetWidth-20;
document.querySelectorAll('.frame-box').forEach(x => {
if (x.style.display != 'none') {
let opContents = x.querySelectorAll(".query-box ul li");
if (opContents && opContents.length > 0) {
this.navWidth = document.querySelector(".flexParent").offsetWidth - opContents[opContents
.length - 1].offsetWidth - 50
} else {
this.navWidth = document.querySelector(".flexParent").offsetWidth - 20;
}
}
})
......@@ -136,208 +148,220 @@ export default {
}
},
mounted() {
this.openMode=0
if(localStorage.openMode && localStorage.openMode==1)
this.openMode=1
this.MsgBus.$on('msg', ()=> {
this.handleTabsEdit(this.currentTabName,'remove')
this.openMode = 0
if (localStorage.openMode && localStorage.openMode == 1)
this.openMode = 1
this.MsgBus.$on('msg', () => {
this.handleTabsEdit(this.currentTabName, 'remove')
});
this.MsgBus.$on('refresh', ()=> {
this.MsgBus.$on('refresh', () => {
this.reloadpage()
});
this.navWidth=document.querySelector(".flexParent").offsetWidth;
this.navWidth = document.querySelector(".flexParent").offsetWidth;
if(this.openMode==1){
if(localStorage['navTabs']){
this.tabs=JSON.parse(localStorage['navTabs'])
if (this.openMode == 1) {
if (localStorage['navTabs']) {
this.tabs = JSON.parse(localStorage['navTabs'])
}
}
this.getMenu()
this.filterRouter()
let hrefs=window.location.href.split('/')
if(this.openMode==1){
let hrefs=window.location.href.split('/')
this.goUrl('/'+hrefs[hrefs.length-1])
let hrefs = window.location.href.split('/')
if (this.openMode == 1) {
let hrefs = window.location.href.split('/')
this.goUrl('/' + hrefs[hrefs.length - 1])
this.propF5()
}else{
this.goUrl('/'+hrefs[hrefs.length-1])
} else {
this.goUrl('/' + hrefs[hrefs.length - 1])
}
},
methods: {
nullMethod(){
nullMethod() {
},
referPage(){
this.currentTabName=this.tabs[this.currentRightIndex].name+'_'+this.currentRightIndex
this.tabs[this.currentRightIndex].refer+=1
referPage() {
this.currentTabName = this.tabs[this.currentRightIndex].name + '_' + this.currentRightIndex
this.tabs[this.currentRightIndex].refer += 1
},
closeOther(){
if(this.tabs.length>1){
let temp=this.tabs.filter((x,i)=>{
return i==this.currentRightIndex
closeOther() {
if (this.tabs.length > 1) {
let temp = this.tabs.filter((x, i) => {
return i == this.currentRightIndex
})
if(temp.length==1){
this.tabs=[]
if (temp.length == 1) {
this.tabs = []
this.tabs.push(temp[0])
this.currentTabName=temp[0].name+'_0'
this.currentTabName = temp[0].name + '_0'
}
}
},
closeRight(){
if(this.currentRightIndex<this.tabs.length-1){
let temp=this.tabs.filter((x,i)=>{
return i<=this.currentRightIndex
closeRight() {
if (this.currentRightIndex < this.tabs.length - 1) {
let temp = this.tabs.filter((x, i) => {
return i <= this.currentRightIndex
})
if(temp.length>0){
this.tabs=[]
this.tabs=temp
this.currentTabName=temp[this.currentRightIndex].name+"_"+this.currentRightIndex
if (temp.length > 0) {
this.tabs = []
this.tabs = temp
this.currentTabName = temp[this.currentRightIndex].name + "_" + this.currentRightIndex
}
}
},
closeCurrent(){
if(this.tabs.length>1){
this.handleTabsEdit(this.tabs[this.currentRightIndex].name,'remove')
closeCurrent() {
if (this.tabs.length > 1) {
this.handleTabsEdit(this.tabs[this.currentRightIndex].name, 'remove')
}
},
showRightMenu(e){
if(e.button==2){
let id=''
e.path.forEach(x=>{
if(x.className && x.className.indexOf('el-tabs__item')!=-1){
id=x.id.split('-')[1]
showRightMenu(e) {
if (e.button == 2) {
let id = ''
e.path.forEach(x => {
if (x.className && x.className.indexOf('el-tabs__item') != -1) {
id = x.id.split('-')[1]
return false
}
})
this.tabs.forEach((x,i)=>{
if((x.name+"_"+i)==id){
this.mouseX=e.clientX
this.mouserY=e.offsetY
this.currentRightIndex=i
this.tabs.forEach((x, i) => {
if ((x.name + "_" + i) == id) {
this.mouseX = e.clientX
this.mouserY = e.offsetY
this.currentRightIndex = i
}
})
}
},
goback(t){
if(t==0 && this.currentTag.hisIndex>0) {
this.type='b'
this.currentTag.type='b'
this.currentTag.hisIndex-=1
this.$router.push({path: this.currentTag.history[this.currentTag.hisIndex]})
} else if(t==1 && this.currentTag.hisIndex<this.currentTag.history.length-1){
this.type='f'
this.currentTag.type='f'
this.currentTag.hisIndex+=1
this.$router.push({path: this.currentTag.history[this.currentTag.hisIndex]})
goback(t) {
if (t == 0 && this.currentTag.hisIndex > 0) {
this.type = 'b'
this.currentTag.type = 'b'
this.currentTag.hisIndex -= 1
this.$router.push({
path: this.currentTag.history[this.currentTag.hisIndex]
})
} else if (t == 1 && this.currentTag.hisIndex < this.currentTag.history.length - 1) {
this.type = 'f'
this.currentTag.type = 'f'
this.currentTag.hisIndex += 1
this.$router.push({
path: this.currentTag.history[this.currentTag.hisIndex]
})
}
},
propF5(){
let that=this
propF5() {
let that = this
//注册JS屏蔽F5事件
document.onkeydown = function(event){
if(event.keyCode==17){ // ctrlDown 用来判断是否按下ctrl键 ctrl + F5
document.onkeydown = function (event) {
if (event.keyCode == 17) { // ctrlDown 用来判断是否按下ctrl键 ctrl + F5
that.ctrlDown = true;
}
if(event.keyCode==116&&!that.ctrlDown) { // 只有在单独使用F5 的时候 阻止刷新
if (event.keyCode == 116 && !that.ctrlDown) { // 只有在单独使用F5 的时候 阻止刷新
that.reloadpage();
return false
}
};
document.onkeyup = function(e) { //ctrl放开后改变状态
if(e.keyCode==17){
document.onkeyup = function (e) { //ctrl放开后改变状态
if (e.keyCode == 17) {
that.ctrlDown = false;
}
};
//不想写checkout方法了,直接JS原生,那位义士把这里搞成checkout一下
document.onclick=function(e){
if(e.button!=2){
that.currentRightIndex=-1
document.onclick = function (e) {
if (e.button != 2) {
that.currentRightIndex = -1
}
}
},
reloadpage(){
this.tabs.forEach((x,i)=>{
if(x.name==this.currentTabName.split('_')[0]){
x.refer+=1
reloadpage() {
this.tabs.forEach((x, i) => {
if (x.name == this.currentTabName.split('_')[0]) {
x.refer += 1
return false
}
})
},
handleTabsEdit(targetName, action) {
if (action === 'remove') {
let index=0
this.tabs.forEach((x,i)=>{
if(x.name==targetName.split('_')[0] && i==targetName.split('_')[1]){
index=i
let index = 0
this.tabs.forEach((x, i) => {
if (x.name == targetName.split('_')[0] && i == targetName.split('_')[1]) {
index = i
return false
}
})
if(this.currentTabName==targetName){
if(index<this.tabs.length-1)
this.currentTabName=this.tabs[index+1].name+"_"+index
else if(index>0){
this.currentTabName=this.tabs[index-1].name+"_"+(index-1)
if (this.currentTabName == targetName) {
if (index < this.tabs.length - 1)
this.currentTabName = this.tabs[index + 1].name + "_" + index
else if (index > 0) {
this.currentTabName = this.tabs[index - 1].name + "_" + (index - 1)
}
}
this.tabs.splice(index,1)
this.tabs.splice(index, 1)
}
},
mapObj(path,name){
let obj={}
obj=this.getTitleByRouter(name)
if(obj.title=='')
obj.title=this.getMenuV2(path)
obj.title==''?'未命名':obj.title
mapObj(path, name) {
let obj = {}
obj = this.getTitleByRouter(name)
if (obj.title == '')
obj.title = this.getMenuV2(path)
obj.title == '' ? '未命名' : obj.title
return obj
},
goUrl(path) {
if(this.openMode==1){
let pathArray=path.split('/')
let isExsit=false
if (this.openMode == 1) {
let pathArray = path.split('/')
let isExsit = false
let newName = pathArray[1].split('?')[0];
let temp=this.mapObj(path,newName)
if(path==="/TravelManager3"){
let temp = this.mapObj(path, newName)
if (path === "/TravelManager3") {
this.$router.push({
name: 'TravelManager3',
query: { flag: true,blank:'y'}
query: {
flag: true,
blank: 'y'
}
});
return
}
if(path==="/TravelControlList3"){
if (path === "/TravelControlList3") {
this.$router.push({
name: 'TravelControlList3',
query: { flag: true,blank:'y'}
query: {
flag: true,
blank: 'y'
}
});
return
}
this.tabs.forEach((x,i)=>{
if(pathArray[1]==x.name||path==x.path||x.history.indexOf(path)!=-1){
this.tabs[i].hisIndex=this.tabs[i].history.length
this.tabs[i].path=path
isExsit=true
this.currentTabName=x.name+"_"+i
this.comp=temp.comp
this.tabs[i].type='d'
this.tabs.forEach((x, i) => {
if (pathArray[1] == x.name || path == x.path || x.history.indexOf(path) != -1) {
this.tabs[i].hisIndex = this.tabs[i].history.length
this.tabs[i].path = path
isExsit = true
this.currentTabName = x.name + "_" + i
this.comp = temp.comp
this.tabs[i].type = 'd'
return false
}
})
if(!isExsit){
let obj={}
obj.path=path
obj.title=temp.title
obj.name=newName
obj.comp=temp.comp
obj.refer=0
obj.history=[]
obj.type='d'
obj.hisIndex=0
this.currentTabName=obj.name+'_'+this.tabs.length
if (!isExsit) {
let obj = {}
obj.path = path
obj.title = temp.title
obj.name = newName
obj.comp = temp.comp
obj.refer = 0
obj.history = []
obj.type = 'd'
obj.hisIndex = 0
this.currentTabName = obj.name + '_' + this.tabs.length
this.tabs.push(obj)
}
this.type='d'
} else if (this.openMode==0 && path != "") {
this.$router.push({ path });
this.type = 'd'
} else if (this.openMode == 0 && path != "") {
this.$router.push({
path
});
}
},
showToggle(id) {
......@@ -814,115 +838,116 @@ export default {
return tempcurrentName
},
getTitleByRouter(name){
let obj={}
routerConfig.routes[11].children[0].children.forEach(x=>{
if(x.name==name){
obj.comp=x.component
if(x.meta && x.meta.title)
obj.title=x.meta.title
getTitleByRouter(name) {
let obj = {}
routerConfig.routes[11].children[0].children.forEach(x => {
if (x.name == name) {
obj.comp = x.component
if (x.meta && x.meta.title)
obj.title = x.meta.title
else
obj.title=''
obj.title = ''
return false
}
})
return obj
},
filterRouter(){
let that=this
filterRouter() {
let that = this
let userInfo = this.getLocalStorage();
this.$router.beforeEach((to, from, next) => {
document.title = to.meta.title ? to.meta.title : ''
if(to.path=="/ModifyVisaProduct"){
if (to.path == "/ModifyVisaProduct") {
this.reloadpage();
}
if(that.openMode==1){
let isThreeNav=false
to.matched.forEach(x=>{
if(x.name=='Details'){
isThreeNav=true
if (that.openMode == 1) {
let isThreeNav = false
to.matched.forEach(x => {
if (x.name == 'Details') {
isThreeNav = true
return false
}
})
if(isThreeNav){
if(!to.query.blank || to.query.blank!='y'){
let comp=that.getTitleByRouter(to.name)
if(that.tabs.length>0){
let tabs=that.tabs.filter(x=>{
let item=x
if(x.name==that.currentTabName.split('_')[0]&& x.path==that.currentTag.path){
if(that.type=='d'){
x.hisIndex=x.history.length
}
x.title=comp.title==''?x.title:comp.title
x.path=to.fullPath
x.comp=comp.comp
if (isThreeNav) {
if (!to.query.blank || to.query.blank != 'y') {
let comp = that.getTitleByRouter(to.name)
if (that.tabs.length > 0) {
let tabs = that.tabs.filter(x => {
let item = x
if (x.name == that.currentTabName.split('_')[0] && x.path == that.currentTag.path) {
if (that.type == 'd') {
x.hisIndex = x.history.length
}
x.title = comp.title == '' ? x.title : comp.title
x.path = to.fullPath
x.comp = comp.comp
}
return item
})
that.$set(that.tabs,tabs)
that.type='d'
}
}else{
let temp=that.mapObj(to.path,to.name)
let realPath=to.fullPath.split('?')[1]
let newPath=to.path+'?'
realPath.split('&').forEach((x,i)=>{
if(x.indexOf('blank')==-1){
if(i>0)
newPath+='&'
newPath+=x
that.$set(that.tabs, tabs)
that.type = 'd'
}
} else {
let temp = that.mapObj(to.path, to.name)
let realPath = to.fullPath.split('?')[1]
let newPath = to.path + '?'
realPath.split('&').forEach((x, i) => {
if (x.indexOf('blank') == -1) {
if (i > 0)
newPath += '&'
newPath += x
}
})
let isExsit=false
let tabs=that.tabs.filter((x,i)=>{
if(x.path==newPath){
that.currentTabName=x.name+'_'+i
isExsit=true
let isExsit = false
let tabs = that.tabs.filter((x, i) => {
if (x.path == newPath) {
that.currentTabName = x.name + '_' + i
isExsit = true
}
return x
})
if(isExsit)
that.$set(that.tabs,tabs)
else{
let obj={}
obj.path=newPath
obj.title=to.query.tab?to.query.tab:temp.title
obj.name=to.name
obj.comp=temp.comp
obj.refer=0
obj.history=[]
obj.type='d'
obj.hisIndex=0
if (isExsit)
that.$set(that.tabs, tabs)
else {
let obj = {}
obj.path = newPath
obj.title = to.query.tab ? to.query.tab : temp.title
obj.name = to.name
obj.comp = temp.comp
obj.refer = 0
obj.history = []
obj.type = 'd'
obj.hisIndex = 0
that.tabs.push(obj)
that.currentTabName=obj.name+"_"+(that.tabs.length-1)
that.currentTabName = obj.name + "_" + (that.tabs.length - 1)
}
}
}
next()
}else if(that.openMode==0 && to.query.blank && to.query.blank=='y'){
} else if (that.openMode == 0 && to.query.blank && to.query.blank == 'y') {
let dom = document.querySelector("#blankLink")
dom.href=`http://${window.location.host}/#${to.fullPath}`
dom.href = `http://${window.location.host}/#${to.fullPath}`
dom.click()
}else{
} else {
next()
}
});
this.$nextTick(function(){
  document.title = this.$route.meta.title ? this.$route.meta.title : ''
 })
this.$nextTick(function () {
document.title = this.$route.meta.title ? this.$route.meta.title : ''
})
}
},
beforeDestroy() {
//卸载屏蔽事件
document.onkeydown=null
if(this.tabs.length>0)
window.localStorage.navTabs=JSON.stringify(this.tabs)
document.onkeydown = null
if (this.tabs.length > 0)
window.localStorage.navTabs = JSON.stringify(this.tabs)
},
created(){
created() {
}
};
};
</script>
<style>
@import "../assets/css/login2019.css";
.login_body{
@import "../assets/css/login2019.css";
.login_body {
height: calc(100vh);
width: 100%;
background-color: white;
}
.logo_box{
.logo_box {
display: flex;
align-items: center;
font-size: 16px;
}
.logo_box img{
.logo_box img {
margin-right: 10px;
}
.jitang{
.jitang {
margin-top: 40px;
}
.jitang p{
.jitang p {
color: #424242;
font-size: 14px;
width: 60%;
margin: 0 auto;
}
.jitang .iconfont {
font-size: 32px;
padding-right: 10px;
color: #d2d2d2;
}
.FPF_s{
.FPF_s {
font-family: 'PingFangR';
}
.FPF_b{
.FPF_b {
font-family: 'PingFangR';
font-weight: 600;
}
</style>
<template>
<div>
<el-row class="login_body">
<el-col :span="16">
<my-carousel :speed='speed' :imgList='imgList'/>
<my-carousel :speed='speed' :imgList='imgList' />
</el-col>
<el-col :span="8" class="login-box newSummaryLogin">
<div v-if="isShow==1" class="login_Div">
<div class="logo_box">
<img style="width: 40px;" src="http://staticfile.oytour.com/Upload/CompanyImage/20181219/636808340326373827.png" alt="">
<img style="width: 40px;"
src="http://staticfile.oytour.com/Upload/CompanyImage/20181219/636808340326373827.png" alt="">
<p class="FPF_b">{{groupModel.GroupName?groupModel.GroupName:''}}</p>
</div>
<div class="sumMainTitle FPF_s">登录</div>
<div class="login-commonBotm">
<i class="icon-login-name iconfont icon-user11" :style="{color: name_bline==true?'#E95252':'#000000'}"></i>
<input class="input FPF_b" @focus="name_bline=true" @blur="name_bline=false" maxlength="20" autocomplete="new-password" v-model="userInfo.name" style="background-color:transparent !important;" type="text" :placeholder="$t('login.login_account')" @keyup.enter="doLogin"/>
<input class="input FPF_b" @focus="name_bline=true" @blur="name_bline=false" maxlength="20"
autocomplete="new-password" v-model="userInfo.name" style="background-color:transparent !important;"
type="text" :placeholder="$t('login.login_account')" @keyup.enter="doLogin" />
<div class="name_bline_left" :class="name_bline==true?'_bline_w':''"></div>
<div class="name_bline_right" :class="name_bline==true?'_bline_w':''"></div>
</div>
<div class="error-msg">
<div v-show="nameIsShow"><img src="../assets/img/login-error-tips.png"/>{{ nameErrorMsg }}</div>
<div v-show="nameIsShow"><img src="../assets/img/login-error-tips.png" />{{ nameErrorMsg }}</div>
</div>
<div class="login-commonBotm">
<i class="icon-login-password iconfont icon-mima" :style="{color: pwd_bline==true?'#E95252':'#000000'}"></i>
<input type="text" name="text" autocomplete="on" style="width:0;height:0;position: absolute;z-index: -999;">
<input type="password" name="password" autocomplete="on" style="width:0;height:0;position: absolute;z-index: -999;">
<input class="input FPF_b" @focus="pwd_bline=true" @blur="pwd_bline=false" maxlength="20" autocomplete="new-password" v-model="userInfo.password" style="background-color:transparent !important" type="password" :placeholder="$t('login.login_password')" @keyup.enter="doLogin"/>
<input type="password" name="password" autocomplete="on"
style="width:0;height:0;position: absolute;z-index: -999;">
<input class="input FPF_b" @focus="pwd_bline=true" @blur="pwd_bline=false" maxlength="20"
autocomplete="new-password" v-model="userInfo.password" style="background-color:transparent !important"
type="password" :placeholder="$t('login.login_password')" @keyup.enter="doLogin" />
<div class="pwd_bline_left" :class="pwd_bline==true?'_bline_w':''"></div>
<div class="pwd_bline_right" :class="pwd_bline==true?'_bline_w':''"></div>
</div>
<div class="error-msg">
<div v-show="passwordIsShow"><img src="../assets/img/login-error-tips.png"/>{{ passwordErrorMsg }}</div>
<div v-show="passwordIsShow"><img src="../assets/img/login-error-tips.png" />{{ passwordErrorMsg }}</div>
</div>
<div style="text-align: center;margin-top: 40px;">
<button type="button" class="sLoginBtn FPF_s" :class="{'loginIng':loginState==1}" :disabled="loginState==1" @click="doLogin">{{loginState==1?'登录中...':'登录'}}</button>
<button type="button" class="sLoginBtn FPF_s" :class="{'loginIng':loginState==1}" :disabled="loginState==1"
@click="doLogin">{{loginState==1?'登录中...':'登录'}}</button>
</div>
<div class="forgetPw">
<div>
......@@ -92,22 +108,30 @@
</div>
<div v-if="isShow==2" class="phoneLogin login_Div>">
<div class="logo_box">
<img style="width: 40px;" src="http://staticfile.oytour.com/Upload/CompanyImage/20181219/636808340326373827.png" alt="">
<img style="width: 40px;"
src="http://staticfile.oytour.com/Upload/CompanyImage/20181219/636808340326373827.png" alt="">
<p class="FPF_b">{{groupModel.GroupName?groupModel.GroupName:''}}</p>
</div>
<div class="sumMainTitle FPF_s">绑定手机号</div>
<div class="login-commonBotm">
<i class="icon-login-name iconfont icon-shouji1" :style="{color: name_bline==true?'#E95252':'#000000'}"></i>
<input class="input FPF_b" @focus="name_bline=true" @blur="name_bline=false" onkeyup="value=value.replace(/[^\d]/g,'')" maxlength="11" autocomplete="new-password" v-model="mobileNumber" style="background-color:transparent !important;" type="text" placeholder="请输入手机号"/>
<input class="input FPF_b" @focus="name_bline=true" @blur="name_bline=false"
onkeyup="value=value.replace(/[^\d]/g,'')" maxlength="11" autocomplete="new-password"
v-model="mobileNumber" style="background-color:transparent !important;" type="text"
placeholder="请输入手机号" />
<div class="name_bline_left" :class="name_bline==true?'_bline_w':''"></div>
<div class="name_bline_right" :class="name_bline==true?'_bline_w':''"></div>
</div>
<div class="error-msg">
<div v-show="nameIsShow"><img src="../assets/img/login-error-tips.png"/>{{ nameErrorMsg }}</div>
<div v-show="nameIsShow"><img src="../assets/img/login-error-tips.png" />{{ nameErrorMsg }}</div>
</div>
<div class="login-commonBotm">
<i class="icon-login-password iconfont icon-yanzhengma" :style="{color: pwd_bline==true?'#E95252':'#000000'}"></i>
<input class="input FPF_b phoneValidate" maxlength="4" @focus="pwd_bline=true" onkeyup="value=value.replace(/[^\d]/g,'')" @blur="pwd_bline=false" v-model="code" autocomplete="new-password" style="background-color:transparent !important" type="text" placeholder="验证码" @keyup.enter="doBind"/>
<i class="icon-login-password iconfont icon-yanzhengma"
:style="{color: pwd_bline==true?'#E95252':'#000000'}"></i>
<input class="input FPF_b phoneValidate" maxlength="4" @focus="pwd_bline=true"
onkeyup="value=value.replace(/[^\d]/g,'')" @blur="pwd_bline=false" v-model="code"
autocomplete="new-password" style="background-color:transparent !important" type="text" placeholder="验证码"
@keyup.enter="doBind" />
<div class="pwd_bline_left" :class="pwd_bline==true?'_bline_w':''"></div>
<div class="pwd_bline_right" :class="pwd_bline==true?'_bline_w':''"></div>
<div class="validatCode">
......@@ -116,36 +140,44 @@
</div>
</div>
<div class="error-msg">
<div v-show="passwordIsShow"><img src="../assets/img/login-error-tips.png"/>{{ passwordErrorMsg }}</div>
<div v-show="passwordIsShow"><img src="../assets/img/login-error-tips.png" />{{ passwordErrorMsg }}</div>
</div>
<input type="button" class="sLoginBtn" @click="doBind" value="确认绑定"/>
<input type="button" class="sLoginBtn" @click="doBind" value="确认绑定" />
</div>
<div v-if="isShow==3" class="phoneLogin login_Div">
<div class="logo_box">
<img style="width: 40px;" src="http://staticfile.oytour.com/Upload/CompanyImage/20181219/636808340326373827.png" alt="">
<img style="width: 40px;"
src="http://staticfile.oytour.com/Upload/CompanyImage/20181219/636808340326373827.png" alt="">
<p>{{groupModel.GroupName?groupModel.GroupName:''}}</p>
</div>
<div class="sumMainTitle FPF_s">修改密码</div>
<div class="login-commonBotm">
<i class="icon-login-name iconfont icon-shouji1" :style="{color: name_bline==true?'#E95252':'#000000'}"></i>
<input class="input FPF_b" @focus="name_bline=true" onkeyup="value=value.replace(/[^\d]/g,'')" maxlength="11" @blur="name_bline=false" autocomplete="new-password" v-model="mobileNumber" style="background-color:transparent !important;" type="text" placeholder="请输入手机号"/>
<input class="input FPF_b" @focus="name_bline=true" onkeyup="value=value.replace(/[^\d]/g,'')"
maxlength="11" @blur="name_bline=false" autocomplete="new-password" v-model="mobileNumber"
style="background-color:transparent !important;" type="text" placeholder="请输入手机号" />
<div class="name_bline_left" :class="name_bline==true?'_bline_w':''"></div>
<div class="name_bline_right" :class="name_bline==true?'_bline_w':''"></div>
</div>
<div class="error-msg">
<div v-show="nameIsShow"><img src="../assets/img/login-error-tips.png"/>{{ nameErrorMsg }}</div>
<div v-show="nameIsShow"><img src="../assets/img/login-error-tips.png" />{{ nameErrorMsg }}</div>
</div>
<div class="login-commonBotm">
<i class="icon-login-password iconfont icon-mima" :style="{color: pwd_bline==true?'#E95252':'#000000'}"></i>
<input class="input FPF_b" @focus="pwd_bline=true" @blur="pwd_bline=false" autocomplete="new-password" maxlength="20" v-model="password" style="background-color:transparent !important" type="password" placeholder="请输入新密码"/>
<input class="input FPF_b" @focus="pwd_bline=true" @blur="pwd_bline=false" autocomplete="new-password"
maxlength="20" v-model="password" style="background-color:transparent !important" type="password"
placeholder="请输入新密码" />
<div class="pwd_bline_left" :class="pwd_bline==true?'_bline_w':''"></div>
<div class="pwd_bline_right" :class="pwd_bline==true?'_bline_w':''"></div>
</div>
<div class="login-commonBotm btValidate">
<i class="icon-login-password iconfont icon-yanzhengma" :style="{color: validate_bline==true?'#E95252':'#000000'}"></i>
<input class="input FPF_b phoneValidate" maxlength="4" onkeyup="value=value.replace(/[^\d]/g,'')" @focus="validate_bline=true" @blur="validate_bline=false" v-model="code" autocomplete="new-password" style="background-color:transparent !important" type="text" placeholder="验证码" @keyup.enter="changePwd"/>
<i class="icon-login-password iconfont icon-yanzhengma"
:style="{color: validate_bline==true?'#E95252':'#000000'}"></i>
<input class="input FPF_b phoneValidate" maxlength="4" onkeyup="value=value.replace(/[^\d]/g,'')"
@focus="validate_bline=true" @blur="validate_bline=false" v-model="code" autocomplete="new-password"
style="background-color:transparent !important" type="text" placeholder="验证码" @keyup.enter="changePwd" />
<div class="pwd_bline_left" :class="validate_bline==true?'_bline_w':''"></div>
<div class="pwd_bline_right" :class="validate_bline==true?'_bline_w':''"></div>
<div class="validatCode">
......@@ -155,27 +187,27 @@
</div>
<div class="forgetPw">
<div class="error-msg" style="float:left;width:auto;">
<div v-show="passwordIsShow"><img src="../assets/img/login-error-tips.png"/>{{ passwordErrorMsg }}</div>
<div v-show="passwordIsShow"><img src="../assets/img/login-error-tips.png" />{{ passwordErrorMsg }}</div>
</div>
<span @click="goLogin" class="FPF_s">去登录</span>
</div>
<input type="button" class="sLoginBtn changeBtn" @click="changePwd" value="确认修改"/>
<input type="button" class="sLoginBtn changeBtn" @click="changePwd" value="确认修改" />
</div>
<div class="jitang ">
<p><sup class="iconfont icon-quotation"></sup><span class="FPF_s">職場上成功者與失敗者最大的分別就是,前者找機會,後者找藉口,今日的你痛恨每天上班「度日如年」,將來的你會感激經歷過這一切,你練成了更強大的自己,玻璃心不再怕碎。</span></p>
<p><sup class="iconfont icon-quotation"></sup><span
class="FPF_s">職場上成功者與失敗者最大的分別就是,前者找機會,後者找藉口,今日的你痛恨每天上班「度日如年」,將來的你會感激經歷過這一切,你練成了更強大的自己,玻璃心不再怕碎。</span></p>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import Carousel from "./public/Carousel"
export default {
data(){
return{
import Carousel from "./public/Carousel"
export default {
data() {
return {
speed: 3000,
imgList: [
{
imgList: [{
src: 'http://staticfile.oytour.com/New/Upload/Cloud/2019-09/20190923020945469.jpg',
text: '京都独旅之秋',
text1: '旅宿权威柏井寿的私房赏枫秘境',
......@@ -197,9 +229,9 @@ export default {
userInfo: {
name: "",
password: "",
Domain:""
Domain: ""
},
groupModel:"",
groupModel: "",
password: "",
mobileNumber: "",
code: "",
......@@ -218,14 +250,16 @@ export default {
pwd_bline: false,
validate_bline: false,
loginState: 0,
height:0,
clock:null,
crtIndex:0,
height: 0,
clock: null,
crtIndex: 0,
checkedAotu: false,
}
},components:{
},
components: {
'my-carousel': Carousel
},methods:{
},
methods: {
//初始化数据
initData() {
//判断是否是线上环境
......@@ -233,7 +267,7 @@ export default {
this.userInfo.name = "18117845617";
this.userInfo.password = "123456";
}
this.userInfo.Domain =window.location.hostname
this.userInfo.Domain = window.location.hostname
},
doLogin() {
if (this.userInfo.name == "") {
......@@ -274,7 +308,7 @@ export default {
let autoLogin = this.checkedAotu ? {
acc: this.userInfo.name,
pwd: this.userInfo.password,
} : null ;
} : null;
localStorage.autoLogin = JSON.stringify(autoLogin)
var userData = jsonData.data;
var userJson = JSON.stringify(userData);
......@@ -282,9 +316,12 @@ export default {
localStorage.removeItem('orderObj')
localStorage.userInfo = userJson;
let firstTire = []
userData.UserMenu.forEach(x=>{
if(x.MenuUrl=='') {
userData.UserMenu.forEach(x => {
if (x.MenuUrl != '/' && x.MenuUrl!='') {
firstTire.push(x.MenuName)
} else {
x.MenuUrl='';
firstTire.push(x.MenuName);
}
})
//UserMenu
......@@ -292,27 +329,11 @@ export default {
this.$cookie.set("EmployeeId", userData.EmployeeId);
this.$cookie.set("RB_Branch_id", userData.RB_Branch_id);
this.$cookie.set("RB_Group_id", userData.RB_Group_id);
localStorage.menu=JSON.stringify(firstTire)
localStorage.menu = JSON.stringify(firstTire)
this.loginState = 0;
// let previousPathInfo = localStorage.previousPathInfo ? JSON.parse(localStorage.previousPathInfo) : ''
// if (previousPathInfo) {
// let path = previousPathInfo.path.indexOf('login') === -1 ? previousPathInfo.path : 'index'
// let query = previousPathInfo.query ? previousPathInfo.query : {}
// this.$router.push({ path: "/"+ path, query: query });
// }else {
// this.$router.push({ path: "/index" });
// }
this.$router.push({ path: "/personalCenter" });
//登录成功后跳转页面
// this.$notify.success({
// title:'提示',
// customClass:'msgTips',
// message: '登陆成功',
// showClose: false,
// duration:1000
// });
this.$router.push({
path: "/personalCenter"
});
} else {
this.$notify.error({
title: "提示",
......@@ -358,8 +379,7 @@ export default {
mobileCodeType: this.mobileCodeType
};
this.apipost("user_get_moblieNumber_code", msg, res => {
if (res.data.resultCode == 1) {
} else {
if (res.data.resultCode == 1) {} else {
this.$notify.error({
title: "提示",
customClass: "msgTips",
......@@ -403,10 +423,12 @@ export default {
});
},
getGroup() { //获取集团
let Domain= window.location.hostname
this.apipost('admin_get_GetModelByDomain',{'Domain':Domain}, res => {
let Domain = window.location.hostname
this.apipost('admin_get_GetModelByDomain', {
'Domain': Domain
}, res => {
this.groupModel = res.data.data;
document.title="欢迎使用 "+this.groupModel.GroupName+" ERP系统";
document.title = "欢迎使用 " + this.groupModel.GroupName + " ERP系统";
}, err => {})
},
updatePwd() {
......@@ -443,14 +465,17 @@ export default {
goLogin() {
this.isShow = 1;
}
},mounted(){
},
mounted() {
this.initData()
this.getGroup()
},created(){
},
created() {
let autoLogin = localStorage.autoLogin ? JSON.parse(localStorage.autoLogin) : null
this.userInfo.name = autoLogin ? autoLogin.acc : ''
this.userInfo.password = autoLogin ? autoLogin.pwd : ''
this.checkedAotu = autoLogin ? true : false
}
}
}
</script>
This source diff could not be displayed because it is too large. You can view the blob instead.
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