Commit 4f733cfa authored by 黄媛媛's avatar 黄媛媛
parents 612fc923 1eb0947b
<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.
......@@ -57,26 +57,34 @@
.TravelConfig .w378 {
width: 378px !important;
}
.TC_tcnum{margin-left:20px;}
.TravelConfig ._VideoStr_box{
.TC_tcnum {
margin-left: 20px;
}
.TravelConfig ._VideoStr_box {
position: relative;
padding-right: 160px;
}
.TravelConfig ._VideoStr_box ._VideoStr_upload{
.TravelConfig ._VideoStr_box ._VideoStr_upload {
width: 80px;
position: absolute;
right: 75px;
top: 7px;
}
.TravelConfig ._VideoStr_box .TC_ChoiceBtn{
.TravelConfig ._VideoStr_box .TC_ChoiceBtn {
width: 70px;
position: absolute;
right: 0;
top: 7px;
}
.TC_comDMCchoose .el-dialog__body{
padding:5px 25px 30px;
.TC_comDMCchoose .el-dialog__body {
padding: 5px 25px 30px;
}
</style>
<template>
......@@ -102,19 +110,17 @@
</el-form-item>
<el-form-item :label="$t('advmanager.v_line')">
<el-select v-model="PostConfig.LineId" class="w378" :placeholder="$t('pub.pleaseSel')"
@change="getLineTeamList(PostConfig.LineId,true)"
filterable>
<el-option v-for="item in LineList" :label="item.LineName" :value="item.LineID"
:key="item.LineID"></el-option>
@change="getLineTeamList(PostConfig.LineId,true)" filterable>
<el-option v-for="item in LineList" :label="item.LineName" :value="item.LineID" :key="item.LineID">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('advmanager.v_xilie')">
<el-select v-model="PostConfig.LineteamId" class="w378" :placeholder="$t('pub.pleaseSel')"
@change="getCountryId(PostConfig.LineteamId)"
filterable>
@change="getCountryId(PostConfig.LineteamId)" filterable>
<el-option :label="$t('pub.unlimitedSel')" :value="SelectDefaultValue"></el-option>
<el-option v-for="item in LineTeamList" :label="item.LtName" :value="item.LtID"
:key="item.LtID"></el-option>
<el-option v-for="item in LineTeamList" :label="item.LtName" :value="item.LtID" :key="item.LtID">
</el-option>
</el-select>
</el-form-item>
</div>
......@@ -148,24 +154,48 @@
resize="none" :placeholder="$t('sm.onlybeizhu')" maxlength="300"></el-input>
</el-form-item>
</div>
<div>
<el-form-item label="区域">
<el-select v-model="PostConfig.WAreaId" :placeholder="$t('pub.pleaseSel')"
@change="GetSelfArea(PostConfig.WAreaId,2,true)" filterable>
<el-option :label="$t('pub.unlimitedSel')" :value="SelectDefaultValue"></el-option>
<el-option v-for="item in SelfWAreaList" :label="item.AreaName" :value="item.Id" :key="item.Id">
</el-option>
</el-select>
<el-select v-model="PostConfig.WCountryId" :placeholder="$t('pub.pleaseSel')"
@change="GetSelfArea(PostConfig.WCountryId,3,true)" filterable>
<el-option :label="$t('pub.unlimitedSel')" :value="SelectDefaultValue"></el-option>
<el-option v-for="item in SelfWCountryList" :label="item.AreaName" :value="item.Id" :key="item.Id">
</el-option>
</el-select>
<el-select v-model="PostConfig.WLocationId" :placeholder="$t('pub.pleaseSel')"
@change="GetSelfArea(PostConfig.WLocationId,4,true)" filterable>
<el-option :label="$t('pub.unlimitedSel')" :value="SelectDefaultValue"></el-option>
<el-option v-for="item in SelfWLocationList" :label="item.AreaName" :value="item.Id" :key="item.Id">
</el-option>
</el-select>
<el-select v-model="PostConfig.WCityId" :placeholder="$t('pub.pleaseSel')" filterable>
<el-option :label="$t('pub.unlimitedSel')" :value="SelectDefaultValue"></el-option>
<el-option v-for="item in SelfWCityList" :label="item.AreaName" :value="item.Id" :key="item.Id">
</el-option>
</el-select>
</el-form-item>
</div>
<div class="_VideoStr_box" :class="{'showOther':TeamType==3}">
<el-form-item :label="$t('sm.shipindizhi')">
<el-input v-model="PostConfig.VideoStr" class="w700" type="textarea" :autosize="{minRows: 1, maxRows: 1 }"
placeholder="https//:video.mp4" @blur="loadVideo"></el-input>
<el-input v-model="PostConfig.VideoStr" class="w700" type="textarea"
:autosize="{minRows: 1, maxRows: 1 }" placeholder="https//:video.mp4" @blur="loadVideo"></el-input>
</el-form-item>
<el-upload
class="_VideoStr_upload"
action
:http-request="reUploadVideo"
:before-upload="beforeUploadVideo"
:show-file-list="false"
:file-list="VideoStrList">
<el-upload class="_VideoStr_upload" action :http-request="reUploadVideo"
:before-upload="beforeUploadVideo" :show-file-list="false" :file-list="VideoStrList">
<el-button size="small" type="primary">{{$t('tips.dianjishanhcuan')}}</el-button>
</el-upload>
<el-button size="small" class="TC_ChoiceBtn" @click="checkType=2,addimg=true" type="primary">选择</el-button>
<el-button size="small" class="TC_ChoiceBtn" @click="checkType=2,addimg=true" type="primary">选择
</el-button>
</div>
<div style="text-align: center;" v-if="VideoStr">
<video :src="VideoStr" width="660" height="320" controls="controls">{{$t('pub.unlimitedSel')}}您的浏览器不支持视频播放</video>
<video :src="VideoStr" width="660" height="320"
controls="controls">{{$t('pub.unlimitedSel')}}您的浏览器不支持视频播放</video>
</div>
<div v-if="GGMapShow">
<GGMap></GGMap>
......@@ -177,8 +207,7 @@
<div class="TFIMGzhe">
<div class="TFreupload" @click="updateTFimg(index)">
<el-upload :file-list="PostConfig.fileList" :http-request="reUpload" :multiple="true"
accept="image/jpeg, image/gif, image/png, image/bmp"
:show-file-list="false" action>
accept="image/jpeg, image/gif, image/png, image/bmp" :show-file-list="false" action>
<i class="iconfont icon-Edit"></i>
</el-upload>
</div>
......@@ -199,8 +228,8 @@
</div>
</div>
<div class="clearfix" style="display:none;">
<TravelFlightList @headCallBack="setFlightList" ref="TravelFlightList"
:postConfig="PostConfig"></TravelFlightList>
<TravelFlightList @headCallBack="setFlightList" ref="TravelFlightList" :postConfig="PostConfig">
</TravelFlightList>
</div>
</div>
<el-dialog custom-class="TC_comDMCchoose" :title="$t('pub.addImg')" center :visible.sync="addimg">
......@@ -215,7 +244,6 @@
{{$t('tips.tuodongwenjian')}}
<em>{{$t('tips.dianjishanhcuan')}}</em>
</div>
<!-- <div slot="tip" class="el-upload__tip">只能上传Excel文件</div> -->
</el-upload>
</el-dialog>
</div>
......@@ -226,7 +254,7 @@
import GGMap from "../../commonPage/GGMap";
export default {
/*接收父组件传递的参数*/
props: ["PostConfig", "LineList" ,"TCNUM","TeamType"],
props: ["PostConfig", "LineList", "TCNUM", "TeamType"],
data() {
return {
//系列列表
......@@ -243,7 +271,11 @@
GGMapShow: false,
VideoStrList: [],
VideoStr: '',
checkType:1
checkType: 1,
SelfWAreaList: [], //大区列表,
SelfWCountryList: [], //国家列表
SelfWLocationList: [], //地区列表
SelfWCityList: [], //城市列表
};
},
components: {
......@@ -252,9 +284,11 @@
GGMap: GGMap,
},
methods: {
loadVideo: function () { // 输入地址
if (this.PostConfig.VideoStr)
this.VideoStr = this.VideoStr.indexOf('http') > -1 ? this.VideoStr : this.domainManager().ViittoFileUrl+ this.VideoStr;
this.VideoStr = this.VideoStr.indexOf('http') > -1 ? this.VideoStr : this.domainManager().ViittoFileUrl +
this.VideoStr;
},
reUploadVideo(file) {
let newArr = [];
......@@ -265,12 +299,12 @@
this.UploadSelfFileT(path, newArr, x => {
this.VideoStr = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.PostConfig.VideoStr = this.domainManager().ViittoFileUrl + x.data.FilePath;
// that.PostConfig.fileList[this.updateChoseIndex].Name = fileName;
});
},
beforeUploadVideo: function (file) { // 视频验证
const isLt10M = file.size / 1024 / 1024 < 10;
if (['video/mp4', 'video/ogg', 'video/flv','video/avi','video/wmv','video/rmvb'].indexOf(file.type) === -1) {
if (['video/mp4', 'video/ogg', 'video/flv', 'video/avi', 'video/wmv', 'video/rmvb'].indexOf(file.type) === -
1) {
this.$message.error('请上传正确的视频格式');
return false;
}
......@@ -314,7 +348,6 @@
that.PostConfig.fileList[this.updateChoseIndex].Name = fileName;
});
},
//修改图片
updateTFimg(index) {
this.updateChoseIndex = index;
......@@ -341,10 +374,10 @@
addImgOpen(index) {
this.addimg = true;
this.ChooseImgIndex = index;
this.checkType=1;
this.checkType = 1;
},
getDMCimg(imgArr) {
if(this.checkType==1){
if (this.checkType == 1) {
var that = this;
imgArr.forEach(imgItem => {
var obj = this.$DMCUtils.DMCImageObj();
......@@ -354,8 +387,8 @@
obj.ShowPath = imgItem.Path + "?x-oss-process=image/resize,l_140";
that.PostConfig.fileList[this.ChooseImgIndex].Url = obj.ShowPath;
});
}else{
this.PostConfig.VideoStr=imgArr[0].VideoPath;
} else {
this.PostConfig.VideoStr = imgArr[0].VideoPath;
}
},
//获取系列列表
......@@ -376,7 +409,7 @@
});
if (obj != undefined) {
this.PostConfig.IsDirect = obj.IsDirect;
this.PostConfig.LineName= obj.LineName;
this.PostConfig.LineName = obj.LineName;
}
this.apipost("team_post_GetList", msg, res => {
if (res.data.resultCode == 1) {
......@@ -436,21 +469,70 @@
}
},
//行程一键上传
travelUploadFile(){
if(this.PostConfig.IsDirect==0){
this.outerVisible=true;
}else{
this.outerVisible=false;
travelUploadFile() {
if (this.PostConfig.IsDirect == 0) {
this.outerVisible = true;
} else {
this.outerVisible = false;
this.Error(this.$t('sm.zczbzcyjsc'));
}
},
//获取大区列表
getWAreaList() {
this.apipost("ws_get_GetAreaList", {
Level: 1
}, res => {
if (res.data.resultCode == 1) {
this.SelfWAreaList = res.data.data;
}
});
},
//获取地区数据
GetSelfArea(Id, Type, isDefault) {
if (isDefault) {
switch (Type) {
case 2:
this.PostConfig.WCountryId = 0;
this.PostConfig.WLocationId = 0;
this.PostConfig.WCityId = 0;
break;
case 3:
this.PostConfig.WLocationId = 0;
this.PostConfig.WCityId = 0;
break;
case 4:
this.PostConfig.WCityId = 0;
break;
}
}
this.apipost("ws_get_GetAreaList", {
Level: Type,
ParentId: Id
}, res => {
if (res.data.resultCode == 1) {
if (Type == 2) {
//国家列表
this.SelfWCountryList = res.data.data;
}
if (Type == 3) {
//地区列表
this.SelfWLocationList = res.data.data;
}
if (Type == 4) {
//城市列表
this.SelfWCityList = res.data.data;
}
}
});
},
created (){
},
created() {
this.getWAreaList();
},
mounted() {
if (this.PostConfig.VideoStr) {
let url = this.PostConfig.VideoStr.indexOf('http') > -1 ? this.PostConfig.VideoStr : this.domainManager().ViittoFileUrl+ + this.PostConfig.VideoStr;
let url = this.PostConfig.VideoStr.indexOf('http') > -1 ? this.PostConfig.VideoStr : this.domainManager()
.ViittoFileUrl + +this.PostConfig.VideoStr;
this.VideoStr = url;
}
this.init();
......@@ -461,7 +543,7 @@
handler: function (val, oldVal) {
if (this.PostConfig.LineId == 0) {
this.PostConfig.LineId = this.LineList[0].LineID;
this.PostConfig.LineName=this.LineList[0].LineName;
this.PostConfig.LineName = this.LineList[0].LineName;
this.PostConfig.IsDirect = this.LineList[0].IsDirect;
this.getLineTeamList(this.PostConfig.LineId);
}
......@@ -492,8 +574,8 @@
},
'PostConfig.VideoStr': { // 监听视频参数
handler: function (val, oldVal) {
if(val && val!==''){
let url = val.indexOf('http') > -1 ? val : this.domainManager().ViittoFileUrl+ + val;
if (val && val !== '') {
let url = val.indexOf('http') > -1 ? val : this.domainManager().ViittoFileUrl + +val;
this.VideoStr = url;
}
},
......@@ -504,6 +586,15 @@
handler: function (val, oldVal) {
if (val > 0) {
this.getLineTeamList(this.PostConfig.LineId);
if (this.PostConfig.WCountryId > 0) {
this.GetSelfArea(this.PostConfig.WAreaId, 2);
}
if (this.PostConfig.WLocationId > 0) {
this.GetSelfArea(this.PostConfig.WCountryId, 3);
}
if (this.PostConfig.WCityId > 0) {
this.GetSelfArea(this.PostConfig.WLocationId, 4);
}
}
},
deep: true
......
......@@ -54,9 +54,9 @@
<TravelPrice3 ref="TravelPrice" id="fiveAnchor" @headCallBack="getPrice" :PostDaysTrip="PostDaysTrip"
v-if="TeamType==2" :priceList="PriceList" :PostConfig="PostConfig" :modifyTcid="modifyTcid"
:TeamType="TeamType"></TravelPrice3>
<TravelPrice4 @saveMsg="SaveData(1)" ref="TravelPrice" id="fiveAnchor" @headCallBack="getPrice" :PostDaysTrip="PostDaysTrip"
v-if="TeamType==3" :priceList="PriceList" :PostConfig="PostConfig" :modifyTcid="modifyTcid"
:TeamType="TeamType"></TravelPrice4>
<TravelPrice4 @saveMsg="SaveData(1)" ref="TravelPrice" id="fiveAnchor" @headCallBack="getPrice"
:PostDaysTrip="PostDaysTrip" v-if="TeamType==3" :priceList="PriceList" :PostConfig="PostConfig"
:modifyTcid="modifyTcid" :TeamType="TeamType"></TravelPrice4>
<div class="btnFixedDiv" v-if="IsShowBtn">
<div class="toTop" @click="backTop">
......@@ -153,6 +153,10 @@
DayNum: 0, //行程天数
OfferId: 0, //报价单Id
OpenState: 2, //1-已开团,2-未开团
WAreaId: 0, //大区编号
WCountryId: 0, //国家编号
WLocationId: 0, //位置编号
WCityId: 0, //城市编号
},
//行程
FeatureData: {
......@@ -313,15 +317,6 @@
},
//提交验证
submitForm(SaveType) {
// let travelConfigVal = this.$refs["TravelConfig"].validateForm();
// let travelDaysTripVal = this.$refs["TravelDaysTrip"].validateForm();
// if (!travelConfigVal) {
// this.Error("请完善配置信息");
// }
// if (!travelDaysTripVal) {
// this.Error("请完善行程信息");
// }
//if (travelConfigVal && travelDaysTripVal) {
if (this.isSubmit) {
this.isSubmit = false;
this.SaveData(SaveType);
......@@ -373,6 +368,10 @@
basicData.WarmTipList = this.PostDaysTrip.WarmTipList;
basicData.TitleList = this.PostDaysTrip.TitleList;
basicData.RemoveImg = this.PostDaysTrip.RemoveImg;
basicData.WAreaId = this.PostConfig.WAreaId;
basicData.WCountryId = this.PostConfig.WCountryId;
basicData.WLocationId = this.PostConfig.WLocationId;
basicData.WCityId = this.PostConfig.WCityId;
this.journeyList.IsUpdateTrip = this.PostDaysTrip.IsUpdateTrip;
//行程特色数据
var TripFeature = {};
......@@ -663,7 +662,6 @@
res => {
if (res.data.resultCode == 1) {
var tempData = res.data.data;
if (tempData.Feature != null) {
this.FeatureData.ID = tempData.Feature.ID;
this.FeatureData.ConfigId = tempData.Feature.ConfigId;
......@@ -720,6 +718,10 @@
this.PostConfig.OpenTeamDescribe = tempData.OpenTeamDescribe;
this.PostConfig.IsOpenHotel = tempData.IsOpenHotel;
this.PostConfig.DayNum = tempData.DayNum; //行程天数
this.PostConfig.WAreaId = tempData.WAreaId;
this.PostConfig.WCountryId = tempData.WCountryId;
this.PostConfig.WLocationId = tempData.WLocationId;
this.PostConfig.WCityId = tempData.WCityId;
this.NoticeParameters.ConfigId = tempData.ConfigId;
......@@ -791,8 +793,6 @@
this.UseTypeArray = tempData.UseTypeArray;
this.AirPickUp = tempData.AirPickUp;
this.AirSend = tempData.AirSend;
this.PostConfig.PDFAlias = tempData.PDFAlias;
} else {
this.Error(res.data.message);
......@@ -842,7 +842,6 @@
let userInfo = this.getLocalStorage();
var B2BDomain = userInfo.B2BDomain;
let configId = this.NewConfigId;
var B2BDomain = this.CurrentUserInfo.B2BDomain;
this.$tripUtils.GotoB2BPage(B2BDomain, encodeURIComponent(configId), 0);
},
......
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