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

页面修改

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