Commit 1eb0947b authored by 黄奎's avatar 黄奎

页面修改

parent 110445be
......@@ -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{
width: 70px;
position: absolute;
right: 0;
top: 7px;
.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>
......@@ -127,45 +133,69 @@
<div v-if="TeamType==3">
<el-form-item :label="$t('sm.biaotibeizhu')">
<el-input v-model="PostConfig.Title" type="textarea" :autosize="{minRows: 3, maxRows: 3 }" resize="none"
:placeholder="$t('sm.biaotibeizhu')"></el-input>
:placeholder="$t('sm.biaotibeizhu')"></el-input>
</el-form-item>
</div>
<div v-else>
<el-form-item :label="$t('sm.tuanduibiaoti')">
<el-input v-model="PostConfig.Title" type="textarea" :autosize="{minRows: 3, maxRows: 3 }" resize="none"
:placeholder="$t('sm.tuanduibiaoti')"></el-input>
:placeholder="$t('sm.tuanduibiaoti')"></el-input>
</el-form-item>
</div>
<div :class="{'showOther':TeamType==3}">
<el-form-item :label="$t('Operation.Op_bentuanMaidian')">
<el-input v-model="PostConfig.ProductRecommend" type="textarea" :autosize="{minRows: 3, maxRows: 3 }"
resize="none" :placeholder="$t('Operation.Op_bentuanMaidian')" maxlength="2000"></el-input>
resize="none" :placeholder="$t('Operation.Op_bentuanMaidian')" maxlength="2000"></el-input>
</el-form-item>
</div>
<div :class="{'showOther':TeamType==3}">
<el-form-item :label="$t('pub.pubRemark')">
<el-input v-model="PostConfig.OpenTeamDescribe" type="textarea" :autosize="{minRows: 1, maxRows: 2 }"
resize="none" :placeholder="$t('sm.onlybeizhu')" maxlength="300"></el-input>
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>
......@@ -186,7 +215,7 @@
<i class="iconfont icon-zuoyi"></i>
</div>
<div class="re-delte" @click.stop="ExchangeImg(index,1)"
v-if="index!=PostConfig.fileList.length-1&&item.Url">
v-if="index!=PostConfig.fileList.length-1&&item.Url">
<i class="iconfont icon-youyi"></i>
</div>
<div class="re-delte" @click.stop="addImgOpen(index)">
......@@ -199,23 +228,22 @@
</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">
<DMCchooseImg @closeImg="closeDMCchooseImg" ref="DMCchooseImg1" @headCallBack="getDMCimg" v-bind:isCheckmore="1"
v-bind:imgType="3" v-bind:IsShowVideo="true" v-bind:checkType="checkType"></DMCchooseImg>
v-bind:imgType="3" v-bind:IsShowVideo="true" v-bind:checkType="checkType"></DMCchooseImg>
</el-dialog>
<el-dialog custom-class="w600" :title="$t('sm.yijiansc')" :visible.sync="outerVisible" center>
<el-upload v-if="PostConfig.IsDirect ==0" ref="ticketUpload" drag class="upload-demo" :action="getImportFileUrl()"
:on-success="handleAvatarSuccess">
:on-success="handleAvatarSuccess">
<i class="el-icon-upload"></i>
<div class="el-upload__text">
{{$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 () { // 输入地址
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) {
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) {
this.$message.error('请上传正确的视频格式');
return false;
}
......@@ -310,11 +344,10 @@
var str = this.domainManager().ViittoFileUrl + x.data.FilePath;
that.PostConfig.fileList[
this.updateChoseIndex
].Url = this.$commonUtils.GetALiFileUrl(str);
].Url = this.$commonUtils.GetALiFileUrl(str);
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);
}
......@@ -490,10 +572,10 @@
},
deep: true
},
'PostConfig.VideoStr': { // 监听视频参数
'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
......
......@@ -38,7 +38,7 @@
:subConfig="journeyList" :isOpenGroup="false" :IsDirect="PostConfig.IsDirect" v-bind:AllCityList="AllCityList"
v-bind:StartCity="StartCity" :UseTypeArray="UseTypeArray" :AirPickUp="AirPickUp" :AirSend="AirSend"
@change="handlerChangeData" :TeamType="TeamType" :IsOpenHotel="PostConfig.IsOpenHotel"></TravelDaysTripDirect>
<TravelFeature :class="{'showOther':(TeamType==3)}" ref="TravelFeature" id="thirdAnchor"
<TravelFeature :class="{'showOther':(TeamType==3)}" ref="TravelFeature" id="thirdAnchor"
@featureCallBack="getFeature" :FeatureData="FeatureData" :TeamType="TeamType" :isNewConfig="isNewConfig"
@unlockFormCommit="unlockFormCommit" :CurrentUserInfo="CurrentUserInfo"></TravelFeature>
<TravelNotice :class="{'showOther':TeamType==3}" ref="TravelNotice" id="fourAnchor" @headCallBack="getNotice"
......@@ -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