Commit 6be6b905 authored by 黄奎's avatar 黄奎

api地址修改

parent ebd84904
......@@ -8,8 +8,8 @@
<span class="foldList" @click="fold" v-if="isFold==1">点击展开</span>
<div class="TrfList clearfix">
<!-- 'display_none':(item.TypeState===4 && FeatureData.FeatureType !== 4) || (item.TypeState===4 && !$route.query.configId)-->
<div class="TFslide" v-for="item in TypeArray" :class="{'TFcked':item.isShow,'display_none':(item.TypeState===4 && FeatureData.FeatureType !== 4) || (item.TypeState===4 && !$route.query.configId)}" @click="clickFeature(item)"
:key="item.subCode">
<div class="TFslide" v-for="item in TypeArray" :class="{'TFcked':item.isShow,'display_none':(item.TypeState===4 && FeatureData.FeatureType !== 4) || (item.TypeState===4 && !$route.query.configId)}"
@click="clickFeature(item)" :key="item.subCode">
<img v-bind:src="item.imgUrl">
<div>{{item.ckTitle}}</div>
</div>
......@@ -17,7 +17,8 @@
<div style="display:none">
<p style="padding:5px 0;">请选择下载word行程的主题颜色</p>
<el-radio-group v-model="FeatureData.TemplateId">
<el-radio-button v-for="item in templateColorArray" :class="`templateColorArray_${item.color}`" :label="item.id" :key="item.id" :value="item.id">{{item.text}}</el-radio-button>
<el-radio-button v-for="item in templateColorArray" :class="`templateColorArray_${item.color}`" :label="item.id"
:key="item.id" :value="item.id">{{item.text}}</el-radio-button>
</el-radio-group>
<p style="padding:5px 0 0 0;"> </p>
</div>
......@@ -37,9 +38,8 @@
<img v-else :src="item.Url">
<div class="TFIMGzhe">
<div class="TFreupload" @click="updateTFimg(index)">
<el-upload :file-list="FeatureData.fileList" :http-request="reUpload" :multiple="true"
accept="image/jpeg, image/gif, image/png, image/bmp"
:show-file-list="false" action>
<el-upload :file-list="FeatureData.fileList" :http-request="reUpload" :multiple="true" accept="image/jpeg, image/gif, image/png, image/bmp"
:show-file-list="false" action>
<i class="iconfont icon-Edit"></i>
</el-upload>
</div>
......@@ -68,10 +68,8 @@
<div class="userDefined">
<!-- <quill-editor @change="onEditorChange($event)" v-model="FeatureData.FeatureContent">
</quill-editor>-->
<my-edit v-on:edit-value="FeatureData.FeatureContent = arguments[0]"
v-bind:editValue="FeatureData.FeatureContent"
v-bind:toolbarShow="toolbar" v-bind:referenceList="DefaultList"
v-bind:placeholder="placeholder"></my-edit>
<my-edit v-on:edit-value="FeatureData.FeatureContent = arguments[0]" v-bind:editValue="FeatureData.FeatureContent"
v-bind:toolbarShow="toolbar" v-bind:referenceList="DefaultList" v-bind:placeholder="placeholder"></my-edit>
</div>
</div>
<div class="TFright" v-if="FeatureData.FeatureType!=FeatureTypeState.userDefined">
......@@ -81,9 +79,8 @@
<img v-else :src="item.Url">
<div class="TFIMGzhe">
<div class="TFreupload" @click="updateTFimg(index)">
<el-upload :file-list="FeatureData.fileList" :http-request="reUpload" :multiple="true"
accept="image/jpeg, image/gif, image/png, image/bmp"
:show-file-list="false" action>
<el-upload :file-list="FeatureData.fileList" :http-request="reUpload" :multiple="true" accept="image/jpeg, image/gif, image/png, image/bmp"
:show-file-list="false" action>
<i class="iconfont icon-Edit"></i>
</el-upload>
</div>
......@@ -201,7 +198,7 @@
newFeature2,
// newFeature3,
},
props: ["subConfigId", "FeatureData","isNewConfig"],
props: ["subConfigId", "FeatureData", "isNewConfig"],
inject: ['loadConfigInfo'],
data() {
return {
......@@ -225,11 +222,11 @@
travelSpecial2: 5,
},
TypeArray: [{
ckTitle: "自定义",
isShow: false,
imgUrl: userDefined,
TypeState: 3
},
ckTitle: "自定义",
isShow: false,
imgUrl: userDefined,
TypeState: 3
},
{
ckTitle: "幻灯片",
isShow: false,
......@@ -266,10 +263,9 @@
imgUrl: Travelslider,
TypeState: 7
}
], //tab数组
templateColorArray:[
{
templateColorArray: [{
id: 1,
color: 'yellow',
text: '土黄黄'
......@@ -292,13 +288,11 @@
FeatureDataFlag: false,
};
},
created: function () {
},
created: function () {},
methods: {
// 初始化行程特色
init: function () {
},
init: function () {},
// 行程特色删除区块
delFeature: function (key) {
this.travelsList.splice(key, 1);
......@@ -348,25 +342,25 @@
type: contentType
});
},
getHtml: function (postData, SaveType) {
var FeatureData={
B2BRemark:postData.B2BRemark,
ConfigId:postData.ConfigId,
FeatureContent:postData.FeatureContent,
FeatureHtml:"",
FeatureHtmlImage:"",
FeatureHtmlJson:"",
FeatureHtmlJsonDelete:"",
FeatureImg:postData.FeatureImg,
FeatureType:postData.FeatureType,
FeeInclude:postData.FeeInclude,
FeeNonInclude:postData.FeeNonInclude,
ID:postData.ID,
ImportantTip:postData.ImportantTip,
ShopRemark:postData.ShopRemark,
VisaRemark:postData.VisaRemark,
WarmTip:postData.WarmTip,
TemplateId: postData.TemplateId
getHtml: function (postData, SaveType,postType) {
var FeatureData = {
B2BRemark: postData.B2BRemark,
ConfigId: postData.ConfigId,
FeatureContent: postData.FeatureContent,
FeatureHtml: "",
FeatureHtmlImage: "",
FeatureHtmlJson: "",
FeatureHtmlJsonDelete: "",
FeatureImg: postData.FeatureImg,
FeatureType: postData.FeatureType,
FeeInclude: postData.FeeInclude,
FeeNonInclude: postData.FeeNonInclude,
ID: postData.ID,
ImportantTip: postData.ImportantTip,
ShopRemark: postData.ShopRemark,
VisaRemark: postData.VisaRemark,
WarmTip: postData.WarmTip,
TemplateId: postData.TemplateId
};
let flagWangYue = this.$route.query.flag;
......@@ -382,8 +376,7 @@
obj = this.$refs.newFeature.getFeatureData();
FeatureData.FeatureHtmlJson = JSON.stringify(obj.basicData);
FeatureData.FeatureHtmlJsonDelete = JSON.stringify(obj.deleteArray);
} catch (err) {
}
} catch (err) {}
}
if (this.$refs.newFeature2 != undefined) {
var obj = '';
......@@ -391,102 +384,113 @@
obj = this.$refs.newFeature2.getFeatureData()
FeatureData.FeatureHtmlJson = JSON.stringify(obj.basicData);
FeatureData.FeatureHtmlJsonDelete = JSON.stringify(obj.deleteArray);
} catch (err) {
}
} catch (err) {}
}
setTimeout(() => {
try {
FeatureData.FeatureHtml = document.getElementById("newFeatureBox").innerHTML;
} catch (err) {
}
this.apipost("travel_post_SetFeature", FeatureData, res => {
try {
this.$refs.newFeature.setReadOnly(false)
} catch (ex) {
}
try {
this.$refs.newFeature2.canEditChange(true)
} catch (ex) {
}
//解锁表单重复提交
this.$emit("unlockFormCommit", true);
if (res.data.resultCode == 1) {
//保存按钮跳转当当前页码
if (SaveType == 1) {
let path = flagWangYue ? 'TravelManager3' : 'TravelManager2';
this.Success("保存成功");
if (flagWangYue||this.isNewConfig) {
} catch (err) {}
if (postType == 1) {
this.apipost("travel_post_SetFeature", FeatureData, res => {
try {
this.$refs.newFeature.setReadOnly(false)
} catch (ex) {}
try {
this.$refs.newFeature2.canEditChange(true)
} catch (ex) {}
//解锁表单重复提交
this.$emit("unlockFormCommit", true);
if (res.data.resultCode == 1) {
//保存按钮跳转当当前页码
if (SaveType == 1) {
let path = flagWangYue ? 'TravelManager3' : 'TravelManager2';
this.Success("保存成功");
if (flagWangYue || this.isNewConfig) {
this.$router.push({
path: path,
query: {
flag: flagWangYue,
configId: FeatureData.ConfigId,
openState: 1
}
});
if (localStorage.openMode === "0") {
this.loadConfigInfo();
}
} else {
this.loadConfigInfo();
}
}
//提交按钮和另存模板跳转团控列表
else if (SaveType == 2 || SaveType == 3) {
this.$router.push({
path: path,
path: "TravelControlList",
query: {
flag: flagWangYue,
configId: FeatureData.ConfigId,
openState: 1
cache: true
}
});
if(localStorage.openMode === "0") {
this.loadConfigInfo();
}
} else {
this.loadConfigInfo();
}
}
//提交按钮和另存模板跳转团控列表
else if (SaveType == 2 || SaveType == 3) {
this.$router.push({
path: "TravelControlList",
query: {
cache: true
this.MsgBus.$emit('saveTravel', false);
this.FeatureData.IsSave = false;
},
err => {}
)
} else {
this.ApiPost2("TripSetFeature", FeatureData, res => {
try {
this.$refs.newFeature.setReadOnly(false)
} catch (ex) {}
try {
this.$refs.newFeature2.canEditChange(true)
} catch (ex) {}
//解锁表单重复提交
this.$emit("unlockFormCommit", true);
if (res.data.resultCode == 1) {
//保存按钮跳转当当前页码
if (SaveType == 1) {
let path = flagWangYue ? 'TravelManager3' : 'TravelManager2';
this.Success("保存成功");
if (flagWangYue || this.isNewConfig) {
this.$router.push({
path: path,
query: {
flag: flagWangYue,
configId: FeatureData.ConfigId,
openState: 1
}
});
if (localStorage.openMode === "0") {
this.loadConfigInfo();
}
} else {
this.loadConfigInfo();
}
});
}
//提交按钮和另存模板跳转团控列表
else if (SaveType == 2 || SaveType == 3) {
this.$router.push({
path: "TravelControlList",
query: {
cache: true
}
});
}
}
}
this.MsgBus.$emit('saveTravel',false);
this.FeatureData.IsSave = false;
},
err => {
}
)
this.MsgBus.$emit('saveTravel', false);
this.FeatureData.IsSave = false;
},
err => {}
)
}
}, 2000)
// this.h2c(document.getElementById("travelSpecial"), {
// useCORS: true,
// logging: false
// }).then(canvas => {
// let imgUrl = canvas.toDataURL("image/png");
// let blob = this.base64ToBlob(imgUrl);
// let newArr = [];
// newArr.push(blob);
// let fileName = `${this.uuid(10, 10)}.png`;
// let user = JSON.parse(window.localStorage.userInfo);
// let path = `/Upload/TravelFeature/${user.EmployeeId}/${fileName}`;
// var that = this;
// this.uploadBlob(path, newArr, x => {
// if (x.res.statusCode === 200) {
// postData.Feature.FeatureHtmlImage =
// "http://reborndev.oss-cn-hangzhou.aliyuncs.com" + path;
// this.apipost(
// "travel_post_SetFeature",
// postData,
// res => {
// if (res.data.resultCode == 1) {
// }
// },
// err => {}
// );
// } else {
// this.Error("生成图片失败");
// }
// });
// });
// }
},
//切换tab事件
clickFeature(item) {
let state = this.FeatureData.FeatureType
if ((state === 4 && item.TypeState === 5) || (state === 4 && item.TypeState === 6) || (state === 4 && item.TypeState === 7)) {
this.$confirm('尊敬的用户,行程特色“1”切换为行程特色“2”将会清空行程特色“1”里面的所有内容,您确定切换吗?', {
let state = this.FeatureData.FeatureType
if ((state === 4 && item.TypeState === 5) || (state === 4 && item.TypeState === 6) || (state === 4 && item.TypeState ===
7)) {
this.$confirm('尊敬的用户,行程特色“1”切换为行程特色“2”将会清空行程特色“1”里面的所有内容,您确定切换吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
......@@ -525,7 +529,7 @@
this.FeatureData.FeatureType = state;
});
// this.$message.warning('尊敬的用户,行程特色"1"暂时无法直接切换为行程特色"2"!')
}else{
} else {
this.TypeArray.forEach(x => {
if (x.TypeState == item.TypeState) {
x.isShow = true;
......@@ -560,7 +564,7 @@
var str = x.res.requestUrls[0];
that.FeatureData.fileList[
this.updateChoseIndex
].Url = this.$commonUtils.GetALiFileUrl(str);
].Url = this.$commonUtils.GetALiFileUrl(str);
that.FeatureData.fileList[this.updateChoseIndex].Name = fileName;
});
},
......@@ -592,10 +596,10 @@
}
},
onEditorChange({
editor,
html,
text
}) {
editor,
html,
text
}) {
//富文本编辑器 文本改变时 设置字段值
this.FeatureData.FeatureContent = html;
},
......@@ -611,7 +615,7 @@
}
},
mounted() {
this.MsgBus.$on('FeatureDataFlag', ()=> {
this.MsgBus.$on('FeatureDataFlag', () => {
this.FeatureDataFlag = true
});
},
......@@ -643,31 +647,38 @@
</script>
<style>
.templateColorArray_yellow.is-active span.el-radio-button__inner{
background-color: #f6dc61;
border-color: #f6dc61;
color: #d19913;
box-shadow: -1px 0 0 0 #f6dc61;
}
.templateColorArray_pink.is-active span.el-radio-button__inner{
background-color: pink;
border-color: pink;
color: #9c525f;
box-shadow: -1px 0 0 0 pink;
}
.templateColorArray_blue.is-active span.el-radio-button__inner{
background-color: skyblue;
border-color: skyblue;
color: #346f88;
box-shadow: -1px 0 0 0 skyblue;
}
.templateColorArray_yellow.is-active span.el-radio-button__inner {
background-color: #f6dc61;
border-color: #f6dc61;
color: #d19913;
box-shadow: -1px 0 0 0 #f6dc61;
}
.templateColorArray_pink.is-active span.el-radio-button__inner {
background-color: pink;
border-color: pink;
color: #9c525f;
box-shadow: -1px 0 0 0 pink;
}
.templateColorArray_blue.is-active span.el-radio-button__inner {
background-color: skyblue;
border-color: skyblue;
color: #346f88;
box-shadow: -1px 0 0 0 skyblue;
}
@font-face {
font-family: "FZDBSJW";
src: url("../../../assets/webfont/FZDBSJW.woff") format("woff"),
url("../../../assets/webfont/FZDBSJW.ttf") format("truetype"),
url("../../../assets/webfont/FZDBSJW.svg") format("svg");
url("../../../assets/webfont/FZDBSJW.ttf") format("truetype"),
url("../../../assets/webfont/FZDBSJW.svg") format("svg");
}
.TravelFeature .display_none{display: none !important;}
.TravelFeature .display_none {
display: none !important;
}
.travelSpecial {
box-sizing: border-box;
-webkit-box-sizing: border-box;
......@@ -683,7 +694,7 @@
background-size: 100% 100%;
}
.special_header > img {
.special_header>img {
position: absolute;
z-index: 1;
left: 0px;
......@@ -692,7 +703,7 @@
height: 100%;
}
.special_header > div {
.special_header>div {
position: relative;
z-index: 2;
padding: 25px 0 0 0;
......@@ -700,7 +711,7 @@
height: 100%;
}
.special_header > div > div:nth-child(1) {
.special_header>div>div:nth-child(1) {
margin: 0 0 0 270px;
max-width: 400px;
text-overflow: ellipsis;
......@@ -713,7 +724,7 @@
color: #f5e7cd;
}
.special_header > div > div:nth-child(2) {
.special_header>div>div:nth-child(2) {
display: inline-block;
margin: 12px 0 0 270px;
padding: 5px 10px;
......@@ -724,11 +735,11 @@
white-space: nowrap;
}
.special_header > div > div:nth-child(2) > span {
.special_header>div>div:nth-child(2)>span {
vertical-align: middle;
}
.special_header > div > div:nth-child(2) > div {
.special_header>div>div:nth-child(2)>div {
display: inline-block;
max-width: 355px;
text-overflow: ellipsis;
......@@ -737,7 +748,7 @@
vertical-align: middle;
}
.special_header > div > img {
.special_header>div>img {
position: absolute;
top: 36px;
right: 5px;
......@@ -760,7 +771,7 @@
height: 60px;
}
.special_title > div:nth-child(1) {
.special_title>div:nth-child(1) {
width: 100%;
height: 45px;
background-color: #a5851e;
......@@ -770,7 +781,7 @@
color: #ffffff;
}
.special_title > div:nth-child(2) {
.special_title>div:nth-child(2) {
margin: -5px 0 0 0;
width: 100%;
height: 15px;
......@@ -788,14 +799,14 @@
height: 80px;
}
.special_footer > div:nth-child(1) {
.special_footer>div:nth-child(1) {
position: relative;
z-index: 1;
width: 100%;
height: 40px;
}
.special_footer > div:nth-child(1) > img {
.special_footer>div:nth-child(1)>img {
position: absolute;
z-index: 1;
top: 0px;
......@@ -804,7 +815,7 @@
height: 100%;
}
.special_footer > div:nth-child(1) > div {
.special_footer>div:nth-child(1)>div {
position: relative;
z-index: 2;
padding: 0 60px;
......@@ -816,7 +827,7 @@
text-indent: 5px;
}
.special_footer > div:nth-child(2) {
.special_footer>div:nth-child(2) {
position: absolute;
z-index: 3;
top: 0px;
......@@ -824,7 +835,7 @@
font-size: 0px;
}
.special_footer > div:nth-child(2) > div:nth-child(1) {
.special_footer>div:nth-child(2)>div:nth-child(1) {
display: inline-block;
padding: 10px;
font-size: 16px;
......@@ -834,14 +845,14 @@
vertical-align: middle;
}
.special_footer > div:nth-child(2) > div:nth-child(2) {
.special_footer>div:nth-child(2)>div:nth-child(2) {
display: inline-block;
width: 80px;
height: 80px;
vertical-align: middle;
}
.special_footer > div:nth-child(2) > div:nth-child(2) > img {
.special_footer>div:nth-child(2)>div:nth-child(2)>img {
width: 100%;
height: 100%;
}
......@@ -854,7 +865,7 @@
width: 100%;
}
.special_content:hover > .special_del {
.special_content:hover>.special_del {
display: block;
}
......@@ -869,7 +880,7 @@
background-color: rgba(0, 0, 0, 0.4);
}
.special_del > span {
.special_del>span {
display: inline-block;
position: absolute;
left: 50%;
......@@ -892,7 +903,7 @@
-o-transform: translate(-50%, -50%);
}
.special_del > span:hover {
.special_del>span:hover {
color: #e95252;
background-color: #ffffff;
cursor: pointer;
......@@ -904,7 +915,7 @@
color: #ffffff;
}
.travel_title_left_red > div:nth-child(1) {
.travel_title_left_red>div:nth-child(1) {
display: inline-block;
padding: 0 15px;
max-width: 255px;
......@@ -917,7 +928,7 @@
overflow: hidden;
}
.travel_title_left_red > div:nth-child(2) {
.travel_title_left_red>div:nth-child(2) {
position: relative;
display: inline-block;
background-size: 100% 100%;
......@@ -935,7 +946,7 @@
color: #ffffff;
}
.travel_title_right_red > div:nth-child(1) {
.travel_title_right_red>div:nth-child(1) {
position: relative;
display: inline-block;
background-size: 100% 100%;
......@@ -947,7 +958,7 @@
vertical-align: top;
}
.travel_title_right_red > div:nth-child(2) {
.travel_title_right_red>div:nth-child(2) {
display: inline-block;
padding: 0 15px;
max-width: 255px;
......@@ -966,7 +977,7 @@
color: #ffffff;
}
.travel_title_left_yellow > div:nth-child(1) {
.travel_title_left_yellow>div:nth-child(1) {
display: inline-block;
padding: 0 10px;
max-width: 130px;
......@@ -979,7 +990,7 @@
overflow: hidden;
}
.travel_title_left_yellow > div:nth-child(2) {
.travel_title_left_yellow>div:nth-child(2) {
position: relative;
display: inline-block;
background-size: 100% 100%;
......@@ -997,7 +1008,7 @@
color: #ffffff;
}
.travel_title_right_yellow > div:nth-child(1) {
.travel_title_right_yellow>div:nth-child(1) {
position: relative;
display: inline-block;
background-size: 100% 100%;
......@@ -1009,7 +1020,7 @@
vertical-align: top;
}
.travel_title_right_yellow > div:nth-child(2) {
.travel_title_right_yellow>div:nth-child(2) {
display: inline-block;
padding: 0 10px;
max-width: 130px;
......@@ -1030,12 +1041,12 @@
height: 88px;
}
.travelTab_right > img {
.travelTab_right>img {
width: 100%;
height: 100%;
}
.travelTab_right > span {
.travelTab_right>span {
position: absolute;
top: 12px;
right: 4px;
......@@ -1060,12 +1071,12 @@
height: 88px;
}
.travelTab_left > img {
.travelTab_left>img {
width: 100%;
height: 100%;
}
.travelTab_left > span {
.travelTab_left>span {
position: absolute;
top: 12px;
left: 4px;
......@@ -1097,7 +1108,7 @@
overflow: hidden;
}
.travelHotel1_top > img {
.travelHotel1_top>img {
width: 100%;
}
......@@ -1113,7 +1124,7 @@
white-space: nowrap;
}
.travelHotel1_bottom > div:nth-child(1) {
.travelHotel1_bottom>div:nth-child(1) {
display: table-cell;
}
......@@ -1138,7 +1149,7 @@
height: 126px;
}
.travelHotel1_label > img {
.travelHotel1_label>img {
position: absolute;
z-index: 1;
left: 0px;
......@@ -1147,7 +1158,7 @@
height: 100%;
}
.travelHotel1_label > div {
.travelHotel1_label>div {
position: relative;
z-index: 2;
padding: 25px 40px 0 30px;
......@@ -1216,7 +1227,7 @@
height: 126px;
}
.travelHotel2_label > img {
.travelHotel2_label>img {
position: absolute;
z-index: 1;
left: 0px;
......@@ -1225,7 +1236,7 @@
height: 100%;
}
.travelHotel2_label > div {
.travelHotel2_label>div {
position: relative;
z-index: 2;
padding: 25px 40px 0 30px;
......@@ -1275,7 +1286,7 @@
text-align: center;
}
.travelHotel2_right > img {
.travelHotel2_right>img {
width: 100%;
}
......@@ -1294,7 +1305,7 @@
vertical-align: top;
}
.travelHotel3_left > img {
.travelHotel3_left>img {
width: 100%;
}
......@@ -1329,7 +1340,7 @@
height: 126px;
}
.travelHotel3_label > img {
.travelHotel3_label>img {
position: absolute;
z-index: 1;
left: 0px;
......@@ -1338,7 +1349,7 @@
height: 100%;
}
.travelHotel3_label > div {
.travelHotel3_label>div {
position: relative;
z-index: 2;
padding: 25px 40px 0 30px;
......@@ -1381,7 +1392,7 @@
vertical-align: top;
}
.travelViewSpot1_left > img {
.travelViewSpot1_left>img {
width: 100%;
}
......@@ -1415,7 +1426,7 @@
height: 126px;
}
.travelViewSpot1_label > img {
.travelViewSpot1_label>img {
position: absolute;
z-index: 1;
left: 0px;
......@@ -1424,7 +1435,7 @@
height: 100%;
}
.travelViewSpot1_label > div {
.travelViewSpot1_label>div {
position: relative;
z-index: 2;
padding: 25px 40px 0 30px;
......@@ -1487,7 +1498,7 @@
height: 126px;
}
.travelViewSpot2_label > img {
.travelViewSpot2_label>img {
position: absolute;
z-index: 1;
left: 0px;
......@@ -1496,7 +1507,7 @@
height: 100%;
}
.travelViewSpot2_label > div {
.travelViewSpot2_label>div {
position: relative;
z-index: 2;
padding: 25px 40px 0 30px;
......@@ -1535,7 +1546,7 @@
vertical-align: top;
}
.travelViewSpot2_right > img {
.travelViewSpot2_right>img {
width: 100%;
}
......@@ -1553,7 +1564,7 @@
border: 1px solid #b7aa7f;
}
.travelRestaurant1_top > img {
.travelRestaurant1_top>img {
width: 100%;
}
......@@ -1588,7 +1599,7 @@
height: 126px;
}
.travelRestaurant1_label > img {
.travelRestaurant1_label>img {
position: absolute;
z-index: 1;
left: 0px;
......@@ -1597,7 +1608,7 @@
height: 100%;
}
.travelRestaurant1_label > div {
.travelRestaurant1_label>div {
position: relative;
z-index: 2;
padding: 25px 40px 0 30px;
......@@ -1639,7 +1650,7 @@
vertical-align: top;
}
.travelRestaurant2_left > img {
.travelRestaurant2_left>img {
width: 100%;
}
......@@ -1673,7 +1684,7 @@
height: 126px;
}
.travelRestaurant2_label > img {
.travelRestaurant2_label>img {
position: absolute;
z-index: 1;
left: 0px;
......@@ -1682,7 +1693,7 @@
height: 100%;
}
.travelRestaurant2_label > div {
.travelRestaurant2_label>div {
position: relative;
z-index: 2;
padding: 25px 30px 0 40px;
......
......@@ -30,31 +30,27 @@
<div class="TravelLine"></div>
</div>
<div class="newTravelRight" v-loading="loading">
<TravelConfig @headCallBack="getConfig" @setTravelUploadData="setTravelUploadData" :PostConfig="PostConfig" :TCNUM="TCNUM"
id="firstAnchor"
:LineList="LineList"></TravelConfig>
<TravelConfig @headCallBack="getConfig" @setTravelUploadData="setTravelUploadData" :PostConfig="PostConfig"
:TCNUM="TCNUM" id="firstAnchor" :LineList="LineList"></TravelConfig>
<TravelDaysTripDirect id="secondAnchor" @headCallBack="getDaysTrip" :NoticeParameters="NoticeParameters"
:subConfig="journeyList" :isOpenGroup="false" :IsDirect="PostConfig.IsDirect"
v-bind:AllCityList="AllCityList"
v-bind:StartCity="StartCity" :UseTypeArray="UseTypeArray" :AirPickUp="AirPickUp"
:AirSend="AirSend" @change="handlerChangeData"></TravelDaysTripDirect>
<TravelFeature ref="TravelFeature" id="thirdAnchor" @featureCallBack="getFeature" :FeatureData="FeatureData"
:isNewConfig="isNewConfig" @unlockFormCommit="unlockFormCommit"></TravelFeature>
:subConfig="journeyList" :isOpenGroup="false" :IsDirect="PostConfig.IsDirect" v-bind:AllCityList="AllCityList"
v-bind:StartCity="StartCity" :UseTypeArray="UseTypeArray" :AirPickUp="AirPickUp" :AirSend="AirSend" @change="handlerChangeData"></TravelDaysTripDirect>
<TravelFeature ref="TravelFeature" id="thirdAnchor" @featureCallBack="getFeature" :FeatureData="FeatureData"
:isNewConfig="isNewConfig" @unlockFormCommit="unlockFormCommit"></TravelFeature>
<TravelNotice ref="TravelNotice" id="fourAnchor" @headCallBack="getNotice" :subArray="NoticeParameters"
:NoticeData="NoticeData" v-bind:PostConfig="PostConfig" v-bind:AllCityList="AllCityList"
v-bind:CountryID="PostConfig.CountryID"></TravelNotice>
<TravelPrice ref="TravelPrice" id="fiveAnchor" @headCallBack="getPrice" :priceList="PriceList"
v-if="!flagWangYue"
:PostConfig="PostConfig" :modifyTcid="modifyTcid"></TravelPrice>
:NoticeData="NoticeData" v-bind:PostConfig="PostConfig" v-bind:AllCityList="AllCityList" v-bind:CountryID="PostConfig.CountryID"></TravelNotice>
<TravelPrice ref="TravelPrice" id="fiveAnchor" @headCallBack="getPrice" :priceList="PriceList" v-if="!flagWangYue"
:PostConfig="PostConfig" :modifyTcid="modifyTcid"></TravelPrice>
<TravelPrice2 ref="TravelPrice" id="fiveAnchor" @headCallBack="getPrice" :PostDaysTrip="PostDaysTrip"
:priceList="PriceList" v-else :PostConfig="PostConfig" :modifyTcid="modifyTcid"></TravelPrice2>
:priceList="PriceList" v-else :PostConfig="PostConfig" :modifyTcid="modifyTcid"></TravelPrice2>
<div class="btnFixedDiv">
<div class="toTop" @click="backTop">
<i class="iconfont icon-huidaodingbu"></i>
</div>
<div v-if="modifyType!=2" class="DTSaveBtn" :class="{'disClick':!isSubmit}" @click="submitForm(1)">保存</div>
<div v-if="modifyType!=2" class="DTSaveBtn" :class="{'disClick':!isSubmit}" @click="submitForm(2)">提交</div>
<div v-if="modifyType==2" class="DTSaveBtn" :class="{'disClick':!isSubmit}" @click="submitForm(3)" title="另存为新模板">保存 </div>
<div v-if="modifyType==2" class="DTSaveBtn" :class="{'disClick':!isSubmit}" @click="submitForm(3)" title="另存为新模板">保存
</div>
<div v-if="ConfigId>0" class="DTSaveBtn" :class="{'disClick':!isSubmit}" @click="goB2B()">预览</div>
</div>
</div>
......@@ -79,8 +75,8 @@
data() {
return {
ConfigId: 0, //地址栏查询参数
NewConfigId:"",//configID加密后的字符串【预览使用】
TCNUM:'', //团控列表传过来的tcnum
NewConfigId: "", //configID加密后的字符串【预览使用】
TCNUM: '', //团控列表传过来的tcnum
NoticeParameters: {
ConfigId: 0, //配置编号
CountryID: "", //国家
......@@ -121,7 +117,7 @@
SelfpayingList: [], //自费信息
Feature: "", //行程特色
fileList: [],
VideoStr:"",//视频地址
VideoStr: "", //视频地址
},
//行程
FeatureData: {
......@@ -192,8 +188,7 @@
flagWangYue: null,
loading: false,
isNewConfig: true,
}
;
};
},
components: {
TravelConfig: TravelConfig,
......@@ -269,8 +264,7 @@
initFileList() {
for (var i = 0; i < 5; i++) {
var fileObj = this.$commonUtils.FileObject();
if(this.PostConfig.fileList.length<=5)
{
if (this.PostConfig.fileList.length <= 5) {
this.PostConfig.fileList.push(fileObj);
}
......@@ -295,35 +289,37 @@
},
/*保存数据*/
SaveData(SaveType) {
this.MsgBus.$emit('saveTravel',true);
this.MsgBus.$emit('saveTravel', true);
this.FeatureData.IsSave = true;
this.submitText = "保存中";
//团队配置
var basicData ={};
var basicData = {};
basicData.PriceList = this.PostPrice;
//配置编号
basicData.ID = this.ConfigId;
basicData.LineId=this.PostConfig.LineId;
basicData.LineteamId=this.PostConfig.LineteamId;
basicData.Title=this.PostConfig.Title;
basicData.OpRemark=this.PostConfig.OpRemark;
basicData.ProductRecommend=this.PostConfig.ProductRecommend;
basicData.VideoStr=this.PostConfig.VideoStr;
basicData.PDFAlias=this.PostConfig.PDFAlias;
basicData.ImgCover=this.PostConfig.ImgCover;
basicData.PriceIsDirect=this.PostConfig.PriceIsDirect;
basicData.IsDirect=this.PostConfig.IsDirect;
basicData.RemoveChild=this.PostConfig.RemoveChild;
basicData.LineId = this.PostConfig.LineId;
basicData.LineteamId = this.PostConfig.LineteamId;
basicData.Title = this.PostConfig.Title;
basicData.OpRemark = this.PostConfig.OpRemark;
basicData.ProductRecommend = this.PostConfig.ProductRecommend;
basicData.VideoStr = this.PostConfig.VideoStr;
basicData.PDFAlias = this.PostConfig.PDFAlias;
basicData.ImgCover = this.PostConfig.ImgCover;
basicData.PriceIsDirect = this.PostConfig.PriceIsDirect;
basicData.IsDirect = this.PostConfig.IsDirect;
basicData.RemoveChild = this.PostConfig.RemoveChild;
basicData.TeamType=this.PostConfig.TeamType;
basicData.TeamType = this.PostConfig.TeamType;
basicData.DayNum = (this.PostDaysTrip && this.PostDaysTrip.DayNum!="")?this.PostDaysTrip.DayNum:0;
basicData.NightNum = (this.PostDaysTrip && this.PostDaysTrip.NightNum!="")?this.PostDaysTrip.NightNum:0;
basicData.StartCityId = (this.PostDaysTrip && this.PostDaysTrip.StartCityId!="")?this.PostDaysTrip.StartCityId:0;
basicData.ReturnArriveCityId = (this.PostDaysTrip && this.PostDaysTrip.ReturnArriveCityId!="")?this.PostDaysTrip.ReturnArriveCityId:0;
basicData.DayNum = (this.PostDaysTrip && this.PostDaysTrip.DayNum != "") ? this.PostDaysTrip.DayNum : 0;
basicData.NightNum = (this.PostDaysTrip && this.PostDaysTrip.NightNum != "") ? this.PostDaysTrip.NightNum : 0;
basicData.StartCityId = (this.PostDaysTrip && this.PostDaysTrip.StartCityId != "") ? this.PostDaysTrip.StartCityId :
0;
basicData.ReturnArriveCityId = (this.PostDaysTrip && this.PostDaysTrip.ReturnArriveCityId != "") ? this.PostDaysTrip
.ReturnArriveCityId : 0;
basicData.SelfpayingList=this.PostConfig.SelfpayingList;
basicData.ShopList=this.PostConfig.ShopList;
basicData.SelfpayingList = this.PostConfig.SelfpayingList;
basicData.ShopList = this.PostConfig.ShopList;
basicData.DinnerList = this.PostDaysTrip.DinnerList;
basicData.FreedomList = this.PostDaysTrip.FreedomList;
......@@ -334,7 +330,7 @@
basicData.TitleList = this.PostDaysTrip.TitleList;
basicData.RemoveImg = this.PostDaysTrip.RemoveImg;
//行程特色数据
var TripFeature={};
var TripFeature = {};
if (this.PostFeature == "") {
TripFeature = this.FeatureData;
} else {
......@@ -375,29 +371,52 @@
} else {
basicData.TeamType = 0;
}
this.apipost(
"travel_post_SetTravelConfigInfo",
basicData,
res => {
if (res.data.resultCode == 1) {
//配置编号
TripFeature.ConfigId = res.data.data;
this.$refs.TravelFeature.getHtml(TripFeature, SaveType);
} else if (res.data.resultCode == 10009) {
this.FeatureData.IsSave = false;
//表单重复提交
this.isSubmit = true;
} else {
this.FeatureData.IsSave = false;
this.Error(res.data.message);
this.isSubmit = true;
this.submitText = "提交";
this.$refs.TravelFeature.del_show = true;
}
},
err => {
}
);
var postType = 1;
if (postType == 1) {
this.apipost(
"travel_post_SetTravelConfigInfo",
basicData,
res => {
if (res.data.resultCode == 1) {
//配置编号
TripFeature.ConfigId = res.data.data;
this.$refs.TravelFeature.getHtml(TripFeature, SaveType,postType);
} else if (res.data.resultCode == 10009) {
this.FeatureData.IsSave = false;
//表单重复提交
this.isSubmit = true;
} else {
this.FeatureData.IsSave = false;
this.Error(res.data.message);
this.isSubmit = true;
this.submitText = "提交";
this.$refs.TravelFeature.del_show = true;
}
},
err => {}
);
} else {
this.ApiPost2(
"TripSetTravelConfigInfo",
basicData,
res => {
if (res.data.resultCode == 1) {
//配置编号
TripFeature.ConfigId = res.data.data;
this.$refs.TravelFeature.getHtml(TripFeature, SaveType,postType);
} else if (res.data.resultCode == 10009) {
this.FeatureData.IsSave = false;
//表单重复提交
this.isSubmit = true;
} else {
this.FeatureData.IsSave = false;
this.Error(res.data.message);
this.isSubmit = true;
this.submitText = "提交";
this.$refs.TravelFeature.del_show = true;
}
});
}
},
//初始化团的幻灯片
initFileList() {
......@@ -407,13 +426,12 @@
}
},
//初始化行程特色幻灯片
initFeatureFile()
{
for (var i = 0; i < 5; i++) {
initFeatureFile() {
for (var i = 0; i < 5; i++) {
var fileObj = this.$commonUtils.FileObject();
this.FeatureData.fileList.push(fileObj);
}
} ,
},
custormAnchor(anchorName, index) {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
......@@ -607,10 +625,10 @@
this.FeatureData.FeatureHtmlJson =
tempData.Feature.FeatureHtmlJson &&
tempData.Feature.FeatureHtmlJson != "" && tempData.Feature.FeatureType > 3 ?
JSON.parse(tempData.Feature.FeatureHtmlJson) :
null;
JSON.parse(tempData.Feature.FeatureHtmlJson) :
null;
this.FeatureData.FeatureHtmlJsonDelete = tempData.Feature.FeatureHtmlJsonDelete &&
tempData.Feature.FeatureHtmlJsonDelete != "" && tempData.Feature.FeatureType > 3 ?
tempData.Feature.FeatureHtmlJsonDelete != "" && tempData.Feature.FeatureType > 3 ?
JSON.parse(tempData.Feature.FeatureHtmlJsonDelete) :
null;
this.NoticeData.FeeInclude = tempData.Feature.FeeInclude;
......@@ -636,14 +654,14 @@
this.ConfigId = tempData.ID;
//HK 2019-01-08添加 NewConfigId B2B预览使用
this.NewConfigId=tempData.NewConfigId;
this.NewConfigId = tempData.NewConfigId;
this.PostConfig.ID = tempData.ID;
this.PostConfig.StartCityId = tempData.StartCityId;
this.PostConfig.LineId = tempData.LineId;
this.PostConfig.LineteamId = tempData.LineteamId;
this.PostConfig.CountryID = tempData.CountryID;
//视频地址
this.PostConfig.VideoStr=tempData.VideoStr;
this.PostConfig.VideoStr = tempData.VideoStr;
this.NoticeParameters.ConfigId = tempData.ConfigId;
this.NoticeParameters.CountryID = tempData.CountryID;
......@@ -657,9 +675,8 @@
if (tempData.ImgCoverList.length > 0) {
this.PostConfig.fileList = tempData.ImgCoverList;
}
}
else{
this.initFileList();
} else {
this.initFileList();
}
this.PostConfig.Title = tempData.Title;
this.PostConfig.ProductRecommend = tempData.ProductRecommend;
......@@ -709,8 +726,7 @@
}
this.loading = false;
},
err => {
}
err => {}
);
} else {
this.initFileList();
......@@ -751,8 +767,7 @@
}
this.loading = false;
},
err => {
}
err => {}
);
}
},
......@@ -761,7 +776,7 @@
var B2BDomain = userInfo.B2BDomain;
let configId = this.NewConfigId
window.open(
B2BDomain+ "/#/detailTwo/" +
B2BDomain + "/#/detailTwo/" +
encodeURIComponent(configId) + '/' + 0 +
"/preview",
"_blank"
......
......@@ -118,8 +118,9 @@ export default {
domainUrl = "http://127.0.0.1"; //214主域名
// domainUrl = "http://192.168.2.16:8083";
if (locationName.indexOf('oytour')!==-1) {
domainUrl = "https://reborn.oytour.com";
}else if (locationName.indexOf('viitto')!==-1) {
domainUrl = "http://webapi.viitto.com";
}
else if (locationName.indexOf('viitto')!==-1) {
domainUrl = "https://test.viitto.com";
}
var obj = {
......@@ -293,13 +294,13 @@ export default {
},
Vue.prototype.JueryPost=function (cmd, msg, successCall, faildCall) {
Vue.prototype.ApiPost2=function (cmd, msg, successCall, faildCall) {
if (msg == null || msg == "") {
msg = {}
}
var apiurl = this.domainManager().PostUrl;
var apiNewurl = this.domainManager().DomainUrl;
var timestamp = (new Date()).valueOf();
this.apiurl = apiurl;
apiNewurl = apiNewurl+"/Api/Trip/"+cmd;
if (this.$route.path.toLowerCase() == "/signature") {
this.$router.push({
path: '/signature'
......@@ -324,29 +325,11 @@ export default {
"cmd": cmd,
"timestamp": timestamp,
"token": token,
"sign": md5Str
"sign": md5Str,
"uid":this.getLocalStorage().EmployeeId
}
$.ajax({
url: apiurl,
type: "POST",
data: msg,
datatype: "jsonP",
success: function (res) {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
this.$router.push({
path: '/login'
});
} else if (res.resultCode == 10005) {
this.$router.go(-1);
} else {
successCall(res);
}
},
faildCall
});
this.$http.post(apiurl, postData, {
this.$http.post(apiNewurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': this.$route.path
......
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