Commit 9693ec28 authored by 黄媛媛's avatar 黄媛媛
parents 57e68d6a 9ea9d2b4
......@@ -27,7 +27,15 @@
align-items: 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 {
height: 100%;
}
......@@ -42,7 +50,7 @@
height: 310px !important;
border-radius: 50%;
overflow: hidden;
border: 0 !important;
margin-left:80px;
}
.b2b_imgList {
......@@ -73,16 +81,25 @@
<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-col :span="10">
<div class="webSliderDiv">
<img v-if="item.TripImageUrl" :src="item.TripImageUrl" class="web_imgUrl" alt="" />
<div class="webSliderDiv" @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" 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>
</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=index">选择行程
</el-button>
<el-form-item :label="'行程名稱'+' '+(index+1)">
<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-col>
</el-row>
......@@ -104,13 +121,12 @@
<template v-if="plugData.Type==3">
<el-row>
<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-col :span="24">
<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-col>
</el-row>
......@@ -127,31 +143,41 @@
</el-col>
</el-row>
<el-form-item>
<div class="b2b_imgList">
<div class="sectionImg" :style="{backgroundImage:'url(' + item.TripImageUrl + ')'}"></div>
<div class="webSliderDiv" @click="clickIndex=index">
<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>
</el-form-item>
</el-col>
</el-row>
</template>
<template v-if="plugData.Type==4">
<el-row v-for="(item,index) in plugData.Details" :key="index" style="margin-bottom:20px;">
<el-col :span="8">
<div class="webSliderDiv webImg_radius">
<div class="b2b_imgList">
<div class="sectionImg" :style="{backgroundImage:'url(' + item.TripImageUrl + ')'}"></div>
</div>
<el-row>
<el-col :span="12" v-for="(item,index) in plugData.Details" :key="index" style="margin-bottom:20px;">
<div>
<el-form-item>
<el-button type="primary" style="margin-left:80px;" size="small" @click="isShowTripDailog=true,clickIndex=index">选择行程
</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>
</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-row>
</template>
......@@ -181,6 +207,17 @@
},
created() {},
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() {
var tempArray = this.$refs.chooseTrip.getChooseData();
......
......@@ -11,6 +11,38 @@
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 {
position: absolute;
width: 100%;
......@@ -37,33 +69,37 @@
</el-form-item>
</el-col>
</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-col :span="24">
<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>
<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>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-dialog title="选择行程" :visible.sync="isShowTripDailog" width="1000px" append-to-body>
<!-- 行程选中 -->
<!-- 选择行程 -->
<chooseTrip ref="chooseTrip" :IsMultiple="false"></chooseTrip>
<span slot="footer" class="dialog-footer">
<el-button @click="isShowTripDailog = false" size="small">取 消</el-button>
<el-button type="danger" size="small" @click="getChooseTripData()">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
......@@ -80,6 +116,18 @@
},
created() {},
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() {
var tempArray = this.$refs.chooseTrip.getChooseData();
......
......@@ -122,7 +122,7 @@
</el-col>
<el-col :span="5">
<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-col>
</el-row>
......
......@@ -2,7 +2,7 @@
.WebSiteimgLink .webSliderDiv {
line-height: 0;
height: 275px;
width:275px;
width: 275px;
border: 1px solid #ccc;
position: relative;
}
......@@ -42,10 +42,11 @@
.WebSiteimgLink .webSliderDiv>div {
height: 100%;
}
.WebSiteimgLink .sectionImg{
position:absolute;
width:100%;
height:100%;
.WebSiteimgLink .sectionImg {
position: absolute;
width: 100%;
height: 100%;
background-position: center;
background-size: cover;
}
......@@ -71,8 +72,16 @@
<el-row>
<el-col :span="10">
<el-form-item>
<div class="webSliderDiv">
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.TripImage1 + ')'}"></div>
<div class="webSliderDiv" @click="checkindex=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.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>
</el-form-item>
</el-col>
......@@ -80,20 +89,26 @@
<el-form-item style="margin-bottom:0">
<span>圖片尺寸請上傳:770x770,檔案請小於3M</span>
</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-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-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item>
<div class="webSliderDiv">
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.TripImage2 + ')'}"></div>
<div class="webSliderDiv" @click="checkindex=2">
<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>
</el-form-item>
</el-col>
......@@ -102,25 +117,24 @@
<span>圖片尺寸請上傳:770x770,檔案請小於3M</span>
</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 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-col>
</el-row>
</el-form>
<el-dialog title="选择行程" :visible.sync="isShowTripDailog" width="1000px" append-to-body>
<!-- 行程选中 -->
<!-- 选择行程 -->
<chooseTrip ref="chooseTrip" :IsMultiple="false"></chooseTrip>
<span slot="footer" class="dialog-footer">
<el-button @click="isShowTripDailog = false" size="small">取 消</el-button>
<el-button type="danger" size="small" @click="getChooseTripData()">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
......@@ -129,8 +143,8 @@
props: ["plugData"],
data() {
return {
checkIndex:0,
isShowTripDailog:false
checkIndex: 0,
isShowTripDailog: false
};
},
components: {
......@@ -146,9 +160,9 @@
this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + str;
if(this.checkindex==1){
if (this.checkindex == 1) {
this.plugData.ImageUrl1 = imgUrl;
}else{
} else {
this.plugData.ImageUrl2 = imgUrl;
}
});
......@@ -172,12 +186,12 @@
DayNum: item.DayNum,
Price: item.B2BPrice,
};
if(this.checkIndex==1){
this.plugData.TripImage1 = obj.imgUrl;
if (this.checkIndex == 1) {
this.plugData.ImageUrl1 = obj.imgUrl;
this.plugData.TripTitle1 = obj.Title;
}
if(this.checkIndex==2){
this.plugData.TripImage2 = obj.imgUrl;
if (this.checkIndex == 2) {
this.plugData.ImageUrl2 = obj.imgUrl;
this.plugData.TripTitle2 = obj.Title;
}
this.$refs.chooseTrip.clearData();
......@@ -187,7 +201,7 @@
},
mounted() {
},
};
......
......@@ -11,13 +11,43 @@
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 {
position: absolute;
width: 100%;
height: 100%;
background-position: center;
background-size: cover;
background-color: #f1f1f1;
}
</style>
......@@ -31,44 +61,46 @@
<el-input type="textarea" v-model="plugData.Describe" :rows="4"></el-input>
</el-form-item>
<el-row style="margin-bottom:20px;">
<el-col :span="10">
<el-col :span="12">
<el-form-item>
<div class="webSliderDiv">
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.TripImage1 + ')'}"></div>
<el-button type="primary" size="small" @click="isShowTripDailog=true,clickIndex=1">选择行程</el-button>
</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>
</el-form-item>
</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=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-col :span="12">
<el-form-item>
<el-button type="primary" size="small" @click="isShowTripDailog=true,clickIndex=2">选择行程</el-button>
</el-form-item>
<el-form-item>
<div class="webSliderDiv">
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.TripImage2 + ')'}"></div>
<div class="webSliderDiv" @click="clickIndex=2">
<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>
</el-form-item>
</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-form>
<el-dialog title="选择行程" :visible.sync="isShowTripDailog" width="1000px" append-to-body>
<!-- 行程选中 -->
<!-- 选择行程 -->
<chooseTrip ref="chooseTrip" :IsMultiple="false"></chooseTrip>
<span slot="footer" class="dialog-footer">
<el-button @click="isShowTripDailog = false" size="small">取 消</el-button>
......@@ -92,6 +124,22 @@
},
created() {},
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() {
var tempArray = this.$refs.chooseTrip.getChooseData();
......@@ -111,19 +159,21 @@
DayNum: item.DayNum,
Price: item.B2BPrice,
};
if(this.clickIndex==1){
if (this.clickIndex == 1) {
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.TripTitle2=obj.Title;
}
this.$refs.chooseTrip.clearData();
});
}
this.plugData.Describe=this.plugData.TripTitle1+"\r\n"+this.plugData.TripTitle2;
},
},
mounted() {
},
mounted() {},
};
</script>
......@@ -61,26 +61,31 @@
</el-form-item>
</el-col>
</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-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-row>
<el-row :span="24">
<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-row>
<el-row>
<el-col :span="24">
<el-form-item>
<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>圖片尺寸請上傳:1600x1059,檔案請小於3M</div>
</el-form-item>
......@@ -88,14 +93,13 @@
</el-row>
</el-form>
<el-dialog title="选择行程" :visible.sync="isShowTripDailog" width="1000px" append-to-body>
<!-- 行程选中 -->
<!-- 选择行程 -->
<chooseTrip ref="chooseTrip" :IsMultiple="false"></chooseTrip>
<span slot="footer" class="dialog-footer">
<el-button @click="isShowTripDailog = false" size="small">取 消</el-button>
<el-button type="danger" size="small" @click="getChooseTripData()">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
......@@ -153,7 +157,7 @@
},
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