Commit 9693ec28 authored by 黄媛媛's avatar 黄媛媛
parents 57e68d6a 9ea9d2b4
...@@ -27,7 +27,15 @@ ...@@ -27,7 +27,15 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.b2bDialog .webSliderDiv .addIconDiv:hover {
background: rgba(0, 0, 0, 0.5);
color: #fff;
}
.b2bDialog .webSliderDiv i {
font-size: 50px;
color: #d1d1d1;
cursor: pointer;
}
.b2bDialog .webSliderDiv>div { .b2bDialog .webSliderDiv>div {
height: 100%; height: 100%;
} }
...@@ -42,7 +50,7 @@ ...@@ -42,7 +50,7 @@
height: 310px !important; height: 310px !important;
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
border: 0 !important; margin-left:80px;
} }
.b2b_imgList { .b2b_imgList {
...@@ -73,16 +81,25 @@ ...@@ -73,16 +81,25 @@
<template v-if="plugData.Type==1||plugData.Type==2"> <template v-if="plugData.Type==1||plugData.Type==2">
<el-row v-for="(item,index) in plugData.Details" :key="index" style="margin-bottom:20px;"> <el-row v-for="(item,index) in plugData.Details" :key="index" style="margin-bottom:20px;">
<el-col :span="10"> <el-col :span="10">
<div class="webSliderDiv"> <div class="webSliderDiv" @click="clickIndex=index">
<img v-if="item.TripImageUrl" :src="item.TripImageUrl" class="web_imgUrl" alt="" /> <el-upload :http-request="UploadImage" :multiple="true" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" action="">
<img v-if="item.TripImageUrl" :src="item.TripImageUrl" class="web_imgUrl" alt="" />
<div class="addIconDiv">
<i class="web_addImg iconfont icon-img_haha"></i>
<i class="web_delImg iconfont icon-img_delete_small" style="margin-left:10px;"
@click.stop="item.TripImageUrl=''"></i>
</div>
</el-upload>
</div> </div>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item> <el-form-item :label="'行程名稱'+' '+(index+1)">
<el-button type="primary" size="small" @click="isShowTripDailog=true,clickIndex=index">选择行程 <el-input type="text" v-model="item.TripTitle">
</el-button> <el-button slot="append" type="primary" @click="isShowTripDailog=true,clickIndex=index">选择行程</el-button>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -104,13 +121,12 @@ ...@@ -104,13 +121,12 @@
<template v-if="plugData.Type==3"> <template v-if="plugData.Type==3">
<el-row> <el-row>
<el-col :span="12" v-for="(item,index) in plugData.Details" :key="index"> <el-col :span="12" v-for="(item,index) in plugData.Details" :key="index">
<el-form-item>
<el-button type="primary" size="small" @click="isShowTripDailog=true,clickIndex=index">选择行程</el-button>
</el-form-item>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item :label="'行程名稱'+' '+(index+1)"> <el-form-item :label="'行程名稱'+' '+(index+1)">
<el-input type="text" v-model="item.TripTitle"></el-input> <el-input type="text" v-model="item.TripTitle">
<el-button slot="append" type="primary" @click="isShowTripDailog=true,clickIndex=index">选择行程</el-button>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -127,31 +143,41 @@ ...@@ -127,31 +143,41 @@
</el-col> </el-col>
</el-row> </el-row>
<el-form-item> <el-form-item>
<div class="b2b_imgList"> <div class="webSliderDiv" @click="clickIndex=index">
<div class="sectionImg" :style="{backgroundImage:'url(' + item.TripImageUrl + ')'}"></div> <el-upload :http-request="UploadImage" :multiple="true"
accept="image/jpeg,image/gif,image/png,image/bmp" :show-file-list="false" action="">
<div class="sectionImg" :style="{backgroundImage:'url(' + item.TripImageUrl + ')'}"></div>
<div class="addIconDiv">
<i class="web_addImg iconfont icon-img_haha"></i>
<i class="web_delImg iconfont icon-img_delete_small" style="margin-left:10px;"
@click.stop="item.TripImageUrl=''"></i>
</div>
</el-upload>
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
<template v-if="plugData.Type==4"> <template v-if="plugData.Type==4">
<el-row v-for="(item,index) in plugData.Details" :key="index" style="margin-bottom:20px;"> <el-row>
<el-col :span="8"> <el-col :span="12" v-for="(item,index) in plugData.Details" :key="index" style="margin-bottom:20px;">
<div class="webSliderDiv webImg_radius"> <div>
<div class="b2b_imgList"> <el-form-item>
<div class="sectionImg" :style="{backgroundImage:'url(' + item.TripImageUrl + ')'}"></div> <el-button type="primary" style="margin-left:80px;" size="small" @click="isShowTripDailog=true,clickIndex=index">选择行程
</div> </el-button>
</el-form-item>
</div>
<div class="webSliderDiv webImg_radius" @click="clickIndex=index">
<el-upload :http-request="UploadImage" :multiple="true" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" action="">
<img v-if="item.TripImageUrl" :src="item.TripImageUrl" style="width:auto;" class="web_imgUrl" alt="" />
<div class="addIconDiv">
<i class="web_addImg iconfont icon-img_haha"></i>
<i class="web_delImg iconfont icon-img_delete_small" style="margin-left:10px;"
@click.stop="item.TripImageUrl=''"></i>
</div>
</el-upload>
</div> </div>
</el-col>
<el-col :span="16">
<el-row>
<el-col :span="24">
<el-form-item>
<el-button type="primary" size="small" @click="isShowTripDailog=true,clickIndex=index">选择行程
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
...@@ -181,6 +207,17 @@ ...@@ -181,6 +207,17 @@
}, },
created() {}, created() {},
methods: { methods: {
UploadImage(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/WebSite/";
this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + str;
this.plugData.Details[this.clickIndex].TripImageUrl = imgUrl;
});
},
//获取选择行程数据 //获取选择行程数据
getChooseTripData() { getChooseTripData() {
var tempArray = this.$refs.chooseTrip.getChooseData(); var tempArray = this.$refs.chooseTrip.getChooseData();
......
...@@ -11,6 +11,38 @@ ...@@ -11,6 +11,38 @@
height: 100%; height: 100%;
} }
.b2blinkDialog .webSliderDiv .el-upload {
width: 100%;
height: 100%;
}
.b2blinkDialog .webSliderDiv .addIconDiv {
position: absolute;
width: 100%;
height: 100%;
top: 0;
background-color: transparent;
display: flex;
align-items: center;
justify-content: center;
}
.b2blinkDialog .webSliderDiv i {
font-size: 50px;
color: #d1d1d1;
cursor: pointer;
}
.linkpicdib2blinkDialogalog .webSliderDiv .addIconDiv:hover {
background: rgba(0, 0, 0, 0.5);
color: #fff;
}
.b2blinkDialog .webSliderDiv>div {
height: 100%;
}
.b2blinkDialog .sectionImg { .b2blinkDialog .sectionImg {
position: absolute; position: absolute;
width: 100%; width: 100%;
...@@ -37,33 +69,37 @@ ...@@ -37,33 +69,37 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :span="24">
<el-form-item>
<el-button type="primary" size="small" @click="isShowTripDailog=true">选择行程</el-button>
</el-form-item>
</el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item> <el-form-item>
<el-input type="text" v-model="plugData.TripTitle"></el-input> <el-input type="text" v-model="plugData.TripTitle">
<el-button slot="append" type="primary" @click="isShowTripDailog=true">选择行程</el-button>
</el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div class="webSliderDiv"> <div class="webSliderDiv">
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.TripImage + ')'}"></div> <el-upload :http-request="UploadImage" :multiple="true" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" action="">
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.TripImage + ')'}"></div>
<div class="addIconDiv">
<i class="web_addImg iconfont icon-img_haha"></i>
<i class="web_delImg iconfont icon-img_delete_small" style="margin-left:10px;"
@click.stop="plugData.TripImage=''"></i>
</div>
</el-upload>
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-dialog title="选择行程" :visible.sync="isShowTripDailog" width="1000px" append-to-body> <el-dialog title="选择行程" :visible.sync="isShowTripDailog" width="1000px" append-to-body>
<!-- 行程选中 --> <!-- 选择行程 -->
<chooseTrip ref="chooseTrip" :IsMultiple="false"></chooseTrip> <chooseTrip ref="chooseTrip" :IsMultiple="false"></chooseTrip>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="isShowTripDailog = false" size="small">取 消</el-button> <el-button @click="isShowTripDailog = false" size="small">取 消</el-button>
<el-button type="danger" size="small" @click="getChooseTripData()">确 定</el-button> <el-button type="danger" size="small" @click="getChooseTripData()">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -80,6 +116,18 @@ ...@@ -80,6 +116,18 @@
}, },
created() {}, created() {},
methods: { methods: {
//上传文件
UploadImage(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/WebSite/";
this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + str;
this.plugData.TripImage = imgUrl;
});
},
//获取选择行程数据 //获取选择行程数据
getChooseTripData() { getChooseTripData() {
var tempArray = this.$refs.chooseTrip.getChooseData(); var tempArray = this.$refs.chooseTrip.getChooseData();
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item> <el-form-item>
<button class="normalBtn TC_SearchBtn" @click="resetPageIndex(),GetList()">{{$t('pub.searchBtn')}}</button> <input type="button" class="hollowFixedBtn" @click="resetPageIndex(),GetList()" :value="$t('pub.searchBtn')" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.WebSiteimgLink .webSliderDiv { .WebSiteimgLink .webSliderDiv {
line-height: 0; line-height: 0;
height: 275px; height: 275px;
width:275px; width: 275px;
border: 1px solid #ccc; border: 1px solid #ccc;
position: relative; position: relative;
} }
...@@ -42,10 +42,11 @@ ...@@ -42,10 +42,11 @@
.WebSiteimgLink .webSliderDiv>div { .WebSiteimgLink .webSliderDiv>div {
height: 100%; height: 100%;
} }
.WebSiteimgLink .sectionImg{
position:absolute; .WebSiteimgLink .sectionImg {
width:100%; position: absolute;
height:100%; width: 100%;
height: 100%;
background-position: center; background-position: center;
background-size: cover; background-size: cover;
} }
...@@ -71,8 +72,16 @@ ...@@ -71,8 +72,16 @@
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item> <el-form-item>
<div class="webSliderDiv"> <div class="webSliderDiv" @click="checkindex=1">
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.TripImage1 + ')'}"></div> <el-upload :http-request="UploadImage" :multiple="true" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" action="">
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.ImageUrl1 + ')'}"></div>
<div class="addIconDiv">
<i class="web_addImg iconfont icon-img_haha"></i>
<i class="web_delImg iconfont icon-img_delete_small" style="margin-left:10px;"
@click.stop="plugData.ImageUrl1=''"></i>
</div>
</el-upload>
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -80,20 +89,26 @@ ...@@ -80,20 +89,26 @@
<el-form-item style="margin-bottom:0"> <el-form-item style="margin-bottom:0">
<span>圖片尺寸請上傳:770x770,檔案請小於3M</span> <span>圖片尺寸請上傳:770x770,檔案請小於3M</span>
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="isShowTripDailog=true,checkIndex=1">选择行程
</el-button>
</el-form-item>
<el-form-item label="行程名稱1"> <el-form-item label="行程名稱1">
<el-input type="text" v-model="plugData.TripTitle1"></el-input> <el-input type="text" v-model="plugData.TripTitle1">
<el-button slot="append" type="primary" @click="isShowTripDailog=true,checkIndex=1">选择行程</el-button>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="10"> <el-col :span="10">
<el-form-item> <el-form-item>
<div class="webSliderDiv"> <div class="webSliderDiv" @click="checkindex=2">
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.TripImage2 + ')'}"></div> <el-upload :http-request="UploadImage" :multiple="true" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" action="">
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.ImageUrl2 + ')'}"></div>
<div class="addIconDiv">
<i class="web_addImg iconfont icon-img_haha"></i>
<i class="web_delImg iconfont icon-img_delete_small" style="margin-left:10px;"
@click.stop="plugData.ImageUrl2=''"></i>
</div>
</el-upload>
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -102,25 +117,24 @@ ...@@ -102,25 +117,24 @@
<span>圖片尺寸請上傳:770x770,檔案請小於3M</span> <span>圖片尺寸請上傳:770x770,檔案請小於3M</span>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" @click="isShowTripDailog=true,checkIndex=2">选择行程
</el-button>
</el-form-item> </el-form-item>
<el-form-item label="行程名稱2"> <el-form-item label="行程名稱2">
<el-input type="text" v-model="plugData.TripTitle2"></el-input> <el-input type="text" v-model="plugData.TripTitle2">
<el-button slot="append" type="primary" @click="isShowTripDailog=true,checkIndex=2">选择行程</el-button>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-dialog title="选择行程" :visible.sync="isShowTripDailog" width="1000px" append-to-body> <el-dialog title="选择行程" :visible.sync="isShowTripDailog" width="1000px" append-to-body>
<!-- 行程选中 --> <!-- 选择行程 -->
<chooseTrip ref="chooseTrip" :IsMultiple="false"></chooseTrip> <chooseTrip ref="chooseTrip" :IsMultiple="false"></chooseTrip>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="isShowTripDailog = false" size="small">取 消</el-button> <el-button @click="isShowTripDailog = false" size="small">取 消</el-button>
<el-button type="danger" size="small" @click="getChooseTripData()">确 定</el-button> <el-button type="danger" size="small" @click="getChooseTripData()">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -129,8 +143,8 @@ ...@@ -129,8 +143,8 @@
props: ["plugData"], props: ["plugData"],
data() { data() {
return { return {
checkIndex:0, checkIndex: 0,
isShowTripDailog:false isShowTripDailog: false
}; };
}, },
components: { components: {
...@@ -146,9 +160,9 @@ ...@@ -146,9 +160,9 @@
this.UploadSelfFileT(path, newArr, x => { this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath; var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + str; var imgUrl = this.domainManager().ViittoFileUrl + str;
if(this.checkindex==1){ if (this.checkindex == 1) {
this.plugData.ImageUrl1 = imgUrl; this.plugData.ImageUrl1 = imgUrl;
}else{ } else {
this.plugData.ImageUrl2 = imgUrl; this.plugData.ImageUrl2 = imgUrl;
} }
}); });
...@@ -172,12 +186,12 @@ ...@@ -172,12 +186,12 @@
DayNum: item.DayNum, DayNum: item.DayNum,
Price: item.B2BPrice, Price: item.B2BPrice,
}; };
if(this.checkIndex==1){ if (this.checkIndex == 1) {
this.plugData.TripImage1 = obj.imgUrl; this.plugData.ImageUrl1 = obj.imgUrl;
this.plugData.TripTitle1 = obj.Title; this.plugData.TripTitle1 = obj.Title;
} }
if(this.checkIndex==2){ if (this.checkIndex == 2) {
this.plugData.TripImage2 = obj.imgUrl; this.plugData.ImageUrl2 = obj.imgUrl;
this.plugData.TripTitle2 = obj.Title; this.plugData.TripTitle2 = obj.Title;
} }
this.$refs.chooseTrip.clearData(); this.$refs.chooseTrip.clearData();
...@@ -187,7 +201,7 @@ ...@@ -187,7 +201,7 @@
}, },
mounted() { mounted() {
}, },
}; };
......
...@@ -11,13 +11,43 @@ ...@@ -11,13 +11,43 @@
height: 100%; height: 100%;
} }
.linkpicdialog .webSliderDiv .el-upload {
width: 100%;
height: 100%;
}
.linkpicdialog .webSliderDiv .addIconDiv {
position: absolute;
width: 100%;
height: 100%;
top: 0;
background-color: transparent;
display: flex;
align-items: center;
justify-content: center;
}
.linkpicdialog .webSliderDiv i {
font-size: 50px;
color: #d1d1d1;
cursor: pointer;
}
.linkpicdialog .webSliderDiv .addIconDiv:hover {
background: rgba(0, 0, 0, 0.5);
color: #fff;
}
.linkpicdialog .webSliderDiv>div {
height: 100%;
}
.linkpicdialog .sectionImg { .linkpicdialog .sectionImg {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-position: center; background-position: center;
background-size: cover; background-size: cover;
background-color: #f1f1f1;
} }
</style> </style>
...@@ -31,44 +61,46 @@ ...@@ -31,44 +61,46 @@
<el-input type="textarea" v-model="plugData.Describe" :rows="4"></el-input> <el-input type="textarea" v-model="plugData.Describe" :rows="4"></el-input>
</el-form-item> </el-form-item>
<el-row style="margin-bottom:20px;"> <el-row style="margin-bottom:20px;">
<el-col :span="10"> <el-col :span="12">
<el-form-item> <el-form-item>
<div class="webSliderDiv"> <el-button type="primary" size="small" @click="isShowTripDailog=true,clickIndex=1">选择行程</el-button>
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.TripImage1 + ')'}"></div> </el-form-item>
<el-form-item>
<div class="webSliderDiv" @click="clickIndex=1">
<el-upload :http-request="UploadImage" :multiple="true" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" action="">
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.TripImage1 + ')'}"></div>
<div class="addIconDiv">
<i class="web_addImg iconfont icon-img_haha"></i>
<i class="web_delImg iconfont icon-img_delete_small" style="margin-left:10px;"
@click.stop="plugData.TripImage1=''"></i>
</div>
</el-upload>
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="12">
<el-row> <el-form-item>
<el-col :span="24"> <el-button type="primary" size="small" @click="isShowTripDailog=true,clickIndex=2">选择行程</el-button>
<el-form-item> </el-form-item>
<el-button type="primary" size="small" @click="isShowTripDailog=true,clickIndex=1">选择行程</el-button>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row style="margin-bottom:20px;">
<el-col :span="10">
<el-form-item> <el-form-item>
<div class="webSliderDiv"> <div class="webSliderDiv" @click="clickIndex=2">
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.TripImage2 + ')'}"></div> <el-upload :http-request="UploadImage" :multiple="true" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" action="">
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.TripImage2 + ')'}"></div>
<div class="addIconDiv">
<i class="web_addImg iconfont icon-img_haha"></i>
<i class="web_delImg iconfont icon-img_delete_small" style="margin-left:10px;"
@click.stop="plugData.TripImage2=''"></i>
</div>
</el-upload>
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="14">
<el-row>
<el-col :span="24">
<el-form-item>
<el-button type="primary" size="small" @click="isShowTripDailog=true,clickIndex=2">选择行程</el-button>
</el-form-item>
</el-col>
</el-row>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-dialog title="选择行程" :visible.sync="isShowTripDailog" width="1000px" append-to-body> <el-dialog title="选择行程" :visible.sync="isShowTripDailog" width="1000px" append-to-body>
<!-- 行程选中 --> <!-- 选择行程 -->
<chooseTrip ref="chooseTrip" :IsMultiple="false"></chooseTrip> <chooseTrip ref="chooseTrip" :IsMultiple="false"></chooseTrip>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="isShowTripDailog = false" size="small">取 消</el-button> <el-button @click="isShowTripDailog = false" size="small">取 消</el-button>
...@@ -92,6 +124,22 @@ ...@@ -92,6 +124,22 @@
}, },
created() {}, created() {},
methods: { methods: {
//上传文件
UploadImage(file) {
let newArr = [];
newArr.push(file.file);
let fileName = file.file.name;
var path = "/Upload/WebSite/";
this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + str;
if (this.clickIndex == 1) {
this.plugData.TripImage1 = imgUrl;
} else {
this.plugData.TripImage2 = imgUrl;
}
});
},
//获取选择行程数据 //获取选择行程数据
getChooseTripData() { getChooseTripData() {
var tempArray = this.$refs.chooseTrip.getChooseData(); var tempArray = this.$refs.chooseTrip.getChooseData();
...@@ -111,19 +159,21 @@ ...@@ -111,19 +159,21 @@
DayNum: item.DayNum, DayNum: item.DayNum,
Price: item.B2BPrice, Price: item.B2BPrice,
}; };
if(this.clickIndex==1){ if (this.clickIndex == 1) {
this.plugData.TripImage1 = obj.imgUrl; this.plugData.TripImage1 = obj.imgUrl;
this.plugData.TripTitle1=obj.Title;
} }
if(this.clickIndex==2){ if (this.clickIndex == 2) {
this.plugData.TripImage2 = obj.imgUrl; this.plugData.TripImage2 = obj.imgUrl;
this.plugData.TripTitle2=obj.Title;
} }
this.$refs.chooseTrip.clearData(); this.$refs.chooseTrip.clearData();
}); });
} }
this.plugData.Describe=this.plugData.TripTitle1+"\r\n"+this.plugData.TripTitle2;
}, },
}, },
mounted() { mounted() {},
},
}; };
</script> </script>
...@@ -61,26 +61,31 @@ ...@@ -61,26 +61,31 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :span="24">
<el-form-item>
<el-button type="primary" size="small" @click="isShowTripDailog=true">选择行程</el-button>
</el-form-item>
</el-row>
<el-row :span="24"> <el-row :span="24">
<el-form-item label="行程名稱"> <el-form-item label="行程名稱">
<el-input type="text" v-model="plugData.TripTitle"></el-input> <el-input type="text" v-model="plugData.TripTitle">
<el-button slot="append" type="primary" @click="isShowTripDailog=true">选择行程</el-button>
</el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row :span="24"> <el-row :span="24">
<el-form-item label="連結網址"> <el-form-item label="連結網址">
<el-input type="text" v-model="plugData.LinkUrl" maxlength="200"></el-input> <el-input type="text" v-model="plugData.LinkUrl" maxlength="200"></el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item> <el-form-item>
<div class="webSliderDiv"> <div class="webSliderDiv">
<img v-if="plugData.ImageUrl" :src="plugData.ImageUrl" class="web_imgUrl" alt="" /> <el-upload :http-request="UploadImage" :multiple="true" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" action="">
<img v-if="plugData.ImageUrl" :src="plugData.ImageUrl" class="web_imgUrl" alt="" />
<div class="addIconDiv">
<i class="web_addImg iconfont icon-img_haha"></i>
<i class="web_delImg iconfont icon-img_delete_small" style="margin-left:10px;"
@click.stop="plugData.ImageUrl=''"></i>
</div>
</el-upload>
</div> </div>
<div>圖片尺寸請上傳:1600x1059,檔案請小於3M</div> <div>圖片尺寸請上傳:1600x1059,檔案請小於3M</div>
</el-form-item> </el-form-item>
...@@ -88,14 +93,13 @@ ...@@ -88,14 +93,13 @@
</el-row> </el-row>
</el-form> </el-form>
<el-dialog title="选择行程" :visible.sync="isShowTripDailog" width="1000px" append-to-body> <el-dialog title="选择行程" :visible.sync="isShowTripDailog" width="1000px" append-to-body>
<!-- 行程选中 --> <!-- 选择行程 -->
<chooseTrip ref="chooseTrip" :IsMultiple="false"></chooseTrip> <chooseTrip ref="chooseTrip" :IsMultiple="false"></chooseTrip>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="isShowTripDailog = false" size="small">取 消</el-button> <el-button @click="isShowTripDailog = false" size="small">取 消</el-button>
<el-button type="danger" size="small" @click="getChooseTripData()">确 定</el-button> <el-button type="danger" size="small" @click="getChooseTripData()">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -153,7 +157,7 @@ ...@@ -153,7 +157,7 @@
}, },
mounted() { mounted() {
}, },
}; };
......
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