Commit 3316c3d7 authored by 黄媛媛's avatar 黄媛媛
parents 68d719b7 fea66cef
......@@ -350,7 +350,7 @@ var tripUtils = {
IntroduceTitle: "", //行程介绍标题
IntroduceImage: ViittoFileUrl+"/Upload/DefalutImage/DMC/defaultairline.png", //行程介绍图片
IntroduceDetail: "", //行程介绍详细信息
TrafficType:0,//交通类型
TrafficType:2,//交通类型,默认为专车
TrafficContent:"",//交通详情
TrafficImage:"",//交通图片
}
......@@ -400,7 +400,7 @@ var tripUtils = {
x:0,//初始位移x
y:0 //初始位移y
},
TrafficType:0,//交通类型(1-飞机,2-专车,3-地铁,4-步行)
TrafficType:2,//交通类型(1-飞机,2-专车,3-地铁,4-步行)
TrafficContent:"",//交通内容
TrafficImage:"",//交通图片
};
......
......@@ -20,7 +20,7 @@
text-align: center;
line-height: 25px;
background-color: #fff;
border:1px solid rgb(11, 189, 135);
border:1px solid #E4E7ED;
left: -33px;
top: -2px;
border-radius: 50%;
......@@ -45,23 +45,40 @@
<div class="St_mainDiv">
<div v-if="!ishasScenic">
<div v-if="CurrentDayNum!=1" class="St_current" style="margin-bottom:20px;">
<div class="St_radioDiv Str1"></div>
酒店出发1
<div class="St_radioDiv Str1">
<i class="iconfont icon-hotel"></i>
</div>
酒店出发
</div>
<div class="St_current" style="margin-bottom:10px">
<template
v-if="trafficObj.trafficIntroduce.IntroduceTitle">{{trafficObj.trafficIntroduce.IntroduceTitle}}</template>
<template v-else>机场</template>
<div class="St_radioDiv Str1"></div>
<div class="St_radioDiv Str1">
<i class="iconfont icon-Shape1"></i>
</div>
</div>
<div>
<el-select :placeholder="$t('pub.pleaseSel')" v-model="trafficObj.trafficIntroduce.TrafficType">
<el-select :placeholder="$t('pub.pleaseSel')" class="w120" v-model="trafficObj.trafficIntroduce.TrafficType">
<el-option :value="0" :key="0" label="请选择"></el-option>
<el-option v-for="item in ArrivalTypeArray" :value="item.ID" :key="item.ID" :label="item.Name">
</el-option>
</el-select>
<el-upload v-if="trafficObj.trafficIntroduce.TrafficType==3" class="St_uploadContent"
:http-request="uploadFileBtn"
:multiple="false"
:show-file-list="false"
action
>
<span @click='getItemTraffic()'>上传</span>
</el-upload>
<el-input class="w180" v-if="trafficObj.trafficIntroduce.TrafficType==4" placeholder="距离预计用时" v-model="trafficObj.trafficIntroduce.TrafficContent"></el-input>
</div>
<div v-if="CurrentDayNum!=totalDayNum" class="St_current" style="margin:10px 0">
<div class="St_radioDiv"></div>
<div class="St_radioDiv">
<i class="iconfont icon-hotel"></i>
</div>
回酒店
</div>
</div>
......@@ -80,7 +97,8 @@
{{item.CouponsName}}
</div>
<div>
<el-select :placeholder="$t('pub.pleaseSel')" class="w150" v-model="item.TrafficType">
<el-select :placeholder="$t('pub.pleaseSel')" class="w120" v-model="item.TrafficType">
<el-option :value="0" :key="0" label="请选择"></el-option>
<el-option v-for="subItem in ArrivalTypeArray" :value="subItem.ID" :key="subItem.ID"
:label="subItem.Name">
</el-option>
......@@ -91,9 +109,9 @@
:show-file-list="false"
action
>
<span>上传</span>
<span @click='getItem(index)'>上传</span>
</el-upload>
<el-input class="w180" v-if="item.TrafficType==4" placeholder="距离预计用时"></el-input>
<el-input class="w180" v-if="item.TrafficType==4" v-model="item.TrafficContent" placeholder="距离预计用时"></el-input>
</div>
</div>
<div v-if="CurrentDayNum!=totalDayNum" class="St_current" style="margin:20px 0">
......@@ -127,6 +145,8 @@
font: false, //字体
narrative: true //叙述,
},
checkedIndex:'',
checkTraffic:0,
//交通类型数组
ArrivalTypeArray: [{
ID: 1,
......@@ -155,40 +175,32 @@
"my-edit": MyEdit
},
methods: {
//上传图片
uploadFileBtn(file) {
//上传
if (file.file.size > 1024 * 1024 * 10) {
this.$message.warning(this.$t("tips.wjdxbncgsz"));
return;
//获取index
getItem(index) {
this.checkedIndex = index
},
getItemTraffic(){
this.checkTraffic=1;
},
//上传图片
uploadFileBtn(file) {
let that = this
let newArr = []
newArr.push(file.file)
let path = '/Upload/DMC'
this.$message.info('上传中...')
this.UploadSelfFileT(path, newArr, x => {
if(this.checkTraffic==1){
this.trafficObj.trafficIntroduce.TrafficImage = this.domainManager()
.ViittoFileUrl + x.data.FilePath;
}else{
this.ScenicArray[this.checkedIndex].TrafficImage = this.domainManager()
.ViittoFileUrl + x.data.FilePath;
}
this.$message.success(x.data.Message)
this.$forceUpdate()
})
}
// 1 文档 2 数据 3 图片
let typeArr = [{ stringArr: "GIF|JPG|JPEG|PNG|BMP", type: 3 }];
let ft = file.file.name
.substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length)
.toUpperCase();
let fileTypeNumber = 2;
let typeOk = false;
typeArr.forEach(x => {
if (x.stringArr.indexOf(ft) != "-1") {
fileTypeNumber = x.type;
typeOk = true;
}
});
if (!typeOk) return this.Error(this.$t("tips.qsctpian"));
let newArr = [];
newArr.push(file.file);
let path = "/Upload/activity/";
this.UploadSelfFileT(path, newArr, x => {
let fileSize =
file.file.size < 1024
? file.file.size
: (file.file.size / 1024).toFixed(0);
this.Success(this.$t("tips.scchenggong"));
});
},
},
mounted() {},
created() {},
......
......@@ -167,7 +167,7 @@
:CurrentDayNum="dayObj.DayNum" :totalDayNum="subConfig.DayNum"
>
</scenicTraffic>
<span slot="reference" class="TC-tripTitle" style="padding-left:5px;cursor:pointer;display:none">选择交通信息</span>
<span slot="reference" class="TC-tripTitle" style="padding-left:5px;cursor:pointer;">选择交通信息</span>
</el-popover>
<ul class="scenicCheck_check" v-if="ishasScenic&& NoticeParameters.IsDirect==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