Commit ffdbaed4 authored by 黄奎's avatar 黄奎

页面修改

parent c58ff155
......@@ -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%;
......@@ -49,21 +81,28 @@
</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 +119,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();
......
......@@ -189,11 +189,11 @@
Price: item.B2BPrice,
};
if (this.checkIndex == 1) {
this.plugData.TripImage1 = obj.imgUrl;
this.plugData.ImageUrl1 = obj.imgUrl;
this.plugData.TripTitle1 = obj.Title;
}
if (this.checkIndex == 2) {
this.plugData.TripImage2 = obj.imgUrl;
this.plugData.ImageUrl2 = obj.imgUrl;
this.plugData.TripTitle2 = obj.Title;
}
this.$refs.chooseTrip.clearData();
......
......@@ -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>
......@@ -33,8 +63,16 @@
<el-row style="margin-bottom:20px;">
<el-col :span="10">
<el-form-item>
<div class="webSliderDiv">
<div class="sectionImg" :style="{backgroundImage:'url(' + plugData.TripImage1 + ')'}"></div>
<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>
......@@ -51,8 +89,16 @@
<el-row style="margin-bottom:20px;">
<el-col :span="10">
<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>
......@@ -92,6 +138,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 +173,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>
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