Commit e2a737e4 authored by 华国豪's avatar 华国豪 🙄

‘尊敬的用户,行程特色“1”切换为行程特色“2”将会清空行程特色“1”里面的所有内容,您确定切换吗?’

parent 9370d876
......@@ -447,9 +447,47 @@
},
//切换tab事件
clickFeature(item) {
if (item.TypeState === 5) {
this.$message.warning('尊敬的用户,行程特色"1"暂时无法直接切换为行程特色"2"!')
let state = this.FeatureData.FeatureType
if (state === 4 && item.TypeState === 5) {
this.$confirm('尊敬的用户,行程特色“1”切换为行程特色“2”将会清空行程特色“1”里面的所有内容,您确定切换吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '已切换!'
});
this.TypeArray.forEach(x => {
if (x.TypeState == item.TypeState) {
x.isShow = true;
this.ckTitle = x.ckTitle;
this.FeatureData.FeatureType = item.TypeState;
} else {
x.isShow = false;
}
});
this.FeatureData.FeatureHtmlJson = null
this.FeatureData.FeatureHtmlJsonDelete = null
this.FeatureData.switch4or5 = true
this.$forceUpdate()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
this.TypeArray.forEach(x => {
if (x.TypeState == 4) {
x.isShow = true;
this.ckTitle = x.ckTitle;
} else {
x.isShow = false;
}
});
this.FeatureData.FeatureType = state;
});
// this.$message.warning('尊敬的用户,行程特色"1"暂时无法直接切换为行程特色"2"!')
}else{
this.TypeArray.forEach(x => {
if (x.TypeState == item.TypeState) {
x.isShow = true;
......@@ -459,6 +497,7 @@
x.isShow = false;
}
});
}
this.initFileList();
},
//点击折叠
......
......@@ -1353,8 +1353,8 @@
let dataList = JSON.parse(JSON.stringify(this.FeatureData));
let deleteDataList = JSON.parse(JSON.stringify(this.FeatureData.FeatureHtmlJsonDelete));
this.deleteArray = deleteDataList==="" ? this.deleteArray : deleteDataList;
console.log("dataList",dataList)
if (!this.$route.query.configId){
console.log("dataList",dataList,!this.$route.query.configId,dataList.switch4or5)
if (!this.$route.query.configId || (this.$route.query.configId && dataList.switch4or5) ){
for (let i = 0; i < dataList.DayList.length; i++) { //组装数据
let restaurantObj = travelFeatureTwo.DinnerInit(i, dataList.DayList) // 餐饮
let hotelObj = travelFeatureTwo.HotelInit(i, dataList.DayList) // 酒店
......
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