Commit ed39a237 authored by youjie's avatar youjie
parents 2cd90f5a 8acfee3d
......@@ -7,7 +7,7 @@
<span class="foldList" @click="fold" v-if="isFold==''">{{$t('sm.djzd')}}</span>
<span class="foldList" @click="fold" v-if="isFold==1">{{$t('sm.djzk')}}</span>
<div class="TrfList clearfix">
<!--&&item.TypeState!=8-->
<!--&&item.TypeState!=8-->
<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"
......@@ -105,9 +105,11 @@
v-if="(FeatureData.FeatureType===FeatureTypeState.travelSpecial2 || FeatureData.FeatureType===6 || FeatureData.FeatureType===7) && FeatureDataFlag">
<newFeature2 ref='newFeature2' :FeatureData='FeatureData'></newFeature2>
</div>
<!--行程特色第三版 -->
<UpgradedVersion :TripColor="FeatureData.TripColor" v-if="FeatureData.FeatureType==8"
:FeatureData='FeatureData'></UpgradedVersion>
<div v-if="FeatureData.FeatureType==8&&FeatureDataFlag">
<!--行程特色第三版 -->
<UpgradedVersion ref="UpgradedVersion" :TripColor="FeatureData.TripColor" :FeatureData='FeatureData'>
</UpgradedVersion>
</div>
</div>
</div>
</div>
......@@ -119,7 +121,6 @@
import userDefined from "../../../assets/img/userDefined.png";
import MyEdit from "../../EditTemplate.vue";
import vEditDiv from "./TravelTemp/VEditDiv";
import travelHotel1 from "./TravelTemp/TravelHotel1";
import travelHotel2 from "./TravelTemp/TravelHotel2";
import travelHotel3 from "./TravelTemp/TravelHotel3";
......@@ -136,7 +137,6 @@
} from 'timers';
export default {
components: {
vEditDiv,
travelHotel1,
travelHotel2,
travelHotel3,
......@@ -336,9 +336,22 @@
FeatureData.FeatureHtmlJsonDelete = JSON.stringify(obj.deleteArray);
} catch (err) {}
}
//新版行程特色
if (this.$refs.UpgradedVersion != undefined) {
obj = this.$refs.UpgradedVersion.getFeatureData()
FeatureData.FeatureHtmlJson = JSON.stringify(obj.basicData);
FeatureData.FeatureHtmlJsonDelete = "";
}
setTimeout(() => {
try {
FeatureData.FeatureHtml = document.getElementById("newFeatureBox").innerHTML;
var newHtml = "";
if (document.getElementById("newFeatureBox")) {
newHtml = document.getElementById("newFeatureBox").innerHTML;
}
if (document.getElementById("newFeatureBox3")) {
newHtml = document.getElementById("newFeatureBox3").innerHTML;
}
FeatureData.FeatureHtml = newHtml;
} catch (err) {}
this.apipost("travel_post_SetFeature", FeatureData, res => {
try {
......
......@@ -185,7 +185,7 @@
TemplateId: 1,
IsSave: false, //是否保存
TripColor: "", //行程特色主色
LtName:"",//系列名称
LtName: "", //系列名称
},
//线路行程
journeyList: {
......@@ -817,7 +817,7 @@
} else if (tempData.LineTripColor && tempData.LineTripColor != '') {
this.FeatureData.TripColor = tempData.LineTripColor;
}
this.FeatureData.LtName=tempData.LtName;
this.FeatureData.LtName = tempData.LtName;
this.FeatureData.DayList = tempData.DayList;
this.ConfigId = tempData.ID;
......
......@@ -120,20 +120,21 @@
};
return pageObj;
},
//添加页面
AddPages(index, FeatureData) {
this.pageData = JSON.parse(JSON.stringify(FeatureData))
this.pageData.id = 0
this.pageData.isDeletePage = true
if (this.pageData.type > 3) {
this.pageData.Template = 1
var pageData = this.getPageObj();
pageData.isDeletePage = true
if (FeatureData.pageType > 3) {
pageData.pageTemplate = 1
}
this.pageList.splice(index, 0, this.pageData)
this.pageList.splice(index, 0, pageData);
},
//删除页面
DeletePages(index, FeatureData) {
this.pageList.splice(1, index)
this.pageList.splice(1, index);
},
setTemplate(index, TemplateType) {
this.pageList[index].Template = TemplateType
this.pageList[index].pageTemplate = TemplateType
this.$forceUpdate()
},
getDetailsObj() {
......@@ -155,8 +156,9 @@
var oldJson = this.FeatureData.FeatureHtmlJson ?
JSON.parse(JSON.stringify(this.FeatureData.FeatureHtmlJson)) :
"";
if (JSON.stringify(oldJson) !== "{}" && oldJson) {
console.log("oldJson",oldJson);
if (oldJson && oldJson.length>0) {
this.pageList=oldJson;
} else {
var tripObj = this.getTripData();
console.log("tripObj", tripObj);
......@@ -385,7 +387,20 @@
scenicArray,
dinnerArray,
}
}
},
// 设置编辑状态
canEditChange: function (val) {
this.canEdit = val;
this.$forceUpdate();
},
// 返回数据对象
getFeatureData: function () {
this.canEditChange(false);
var obj = {
basicData: this.pageList,
};
return obj;
},
},
computed: {
......@@ -393,23 +408,14 @@
watch: {
FeatureData: {
handler(val, oldVal) {
console.log("UpgradedVersion_Feature", this.FeatureData);
},
deep: true,
immediate: true
},
},
mounted() {
//调用初始化信息提示
var that = this;
that.initFeature();
that.MsgBus.$on("comUpTravel", function () {
that.initFeature();
});
// that.MsgBus.$on("resetFresh", function () {
// that.Refresh = false;
// });
console.log("UpgradedVersion_Feature", this.FeatureData);
this.initFeature();
}
};
......
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