Commit 2a0cd6ba authored by 黄奎's avatar 黄奎

页面修改

parent 645b772a
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
</div> </div>
<div> <div>
<el-tabs> <el-tabs>
<el-tab-pane v-for="(subItem,subIndex) in addMsg.InnerHotelImaList" :key="subIndex" :label="subItem.Label==''?'全部':subItem.Label"> <el-tab-pane v-for="(subItem,subIndex) in addMsg.InnerHotelImaList" :key="subIndex" :label="subItem.Label==''?'默认':subItem.Label">
<div class="InnerHotelDiv"> <div class="InnerHotelDiv">
<div class="InnerHoImgDiv" v-for="(sItem,sIndex) in subItem.ImgList" :key="sIndex"> <div class="InnerHoImgDiv" v-for="(sItem,sIndex) in subItem.ImgList" :key="sIndex">
<img :src="sItem.Path" /> <img :src="sItem.Path" />
...@@ -156,7 +156,6 @@ ...@@ -156,7 +156,6 @@
</div> </div>
</template> </template>
<template v-if="activeName==2"> <template v-if="activeName==2">
<!-- <div class="jz_HotelName">{{addMsg.HotelRealName}}</div> -->
<el-form-item label="开业时间"> <el-form-item label="开业时间">
<el-input placeholder="开业时间" class="w300" v-model="addMsg.HotelInfo.OpenTime"></el-input> <el-input placeholder="开业时间" class="w300" v-model="addMsg.HotelInfo.OpenTime"></el-input>
</el-form-item> </el-form-item>
...@@ -406,7 +405,6 @@ ...@@ -406,7 +405,6 @@
methods: { methods: {
//获取子组件新增分类和图片 //获取子组件新增分类和图片
getHotelImg(data){ getHotelImg(data){
console.log(data,'datasss');
this.addMsg.InnerHotelImaList = data; this.addMsg.InnerHotelImaList = data;
this.isShowHotelImg=false; this.isShowHotelImg=false;
}, },
...@@ -490,7 +488,6 @@ ...@@ -490,7 +488,6 @@
this.addMsg.RoomFacilities = this.chooseObj.RoomFacilities.toString(); this.addMsg.RoomFacilities = this.chooseObj.RoomFacilities.toString();
this.addMsg.ServiceItems = this.chooseObj.ServiceItems.toString(); this.addMsg.ServiceItems = this.chooseObj.ServiceItems.toString();
this.addMsg.Bookings = this.chooseObj.Bookings; this.addMsg.Bookings = this.chooseObj.Bookings;
// this.addMsg.InnerHotelImaList = this.HotelImgArr;
this.addMsg.ID = this.hotelID; this.addMsg.ID = this.hotelID;
this.addMsg.Tags = this.TagsList.toString(); this.addMsg.Tags = this.TagsList.toString();
this.addMsg.HotelImageList = this.HotelImageArray; this.addMsg.HotelImageList = this.HotelImageArray;
...@@ -528,7 +525,6 @@ ...@@ -528,7 +525,6 @@
msg, msg,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
console.log("res.data", res.data);
var tempMsg = res.data.data; var tempMsg = res.data.data;
_self.addMsg.ID = tempMsg.ID; _self.addMsg.ID = tempMsg.ID;
_self.addMsg.HotelRealName = tempMsg.HotelRealName; _self.addMsg.HotelRealName = tempMsg.HotelRealName;
......
...@@ -420,7 +420,6 @@ ...@@ -420,7 +420,6 @@
); );
}, },
handleSelectionChange(val){ handleSelectionChange(val){
console.log(val,'x多选');
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
...@@ -499,7 +498,6 @@ ...@@ -499,7 +498,6 @@
this.tableData.forEach(x => { this.tableData.forEach(x => {
x.starArr = new Array(x.Star); x.starArr = new Array(x.Star);
}); });
console.log(this.tableData,'数据来也');
} }
}, },
null null
......
...@@ -455,7 +455,6 @@ ...@@ -455,7 +455,6 @@
PicId: item.Pic PicId: item.Pic
} }
that.apipost("hotel_post_RemoveHotelImage", msg, res => { that.apipost("hotel_post_RemoveHotelImage", msg, res => {
console.log(res)
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
that.addMsg.RoomImage.splice(index, 1); that.addMsg.RoomImage.splice(index, 1);
} }
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
created() {}, created() {},
computed: {}, computed: {},
mounted() { mounted() {
console.log(this.saveObj, 'saveObj');
}, },
methods: { methods: {
//新增分组 //新增分组
...@@ -137,8 +137,6 @@ ...@@ -137,8 +137,6 @@
}, },
//选定 //选定
SelectImgId() { SelectImgId() {
console.log('1111');
console.log(this.saveObj,'saveObj');
}, },
//上传酒店图片 //上传酒店图片
UploadImage(file) { UploadImage(file) {
...@@ -156,7 +154,6 @@ ...@@ -156,7 +154,6 @@
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath; var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
obj.Path = str; obj.Path = str;
obj.ShowPath = imgUrl; obj.ShowPath = imgUrl;
console.log(obj,'obj');
this.saveObj[this.commonIndex].imgArr.push(obj.ShowPath); this.saveObj[this.commonIndex].imgArr.push(obj.ShowPath);
}); });
}, },
......
...@@ -7,17 +7,12 @@ ...@@ -7,17 +7,12 @@
<div class="el-scrollbar" style="height: 450px; width: 100%;overflow-y:auto;"> <div class="el-scrollbar" style="height: 450px; width: 100%;overflow-y:auto;">
<div style="margin-bottom: -8px; margin-right: -8px;"> <div style="margin-bottom: -8px; margin-right: -8px;">
<div class="el-scrollbar__view"> <div class="el-scrollbar__view">
<!-- <li class="el-menu-item" style="padding-left: 10px;padding-right: 10px;"
:class="commonIndex==-1?'selectActive' : ''" @click="getImgList(-1,saveObj)">
<i class="el-icon-tickets"></i>
<span>全部</span>
</li> -->
<li class="el-menu-item" v-for="(item,index) in saveObj" :class="commonIndex==index?'selectActive' : ''" <li class="el-menu-item" v-for="(item,index) in saveObj" :class="commonIndex==index?'selectActive' : ''"
@click="getImgList(index,saveObj)" :key="index" style="padding-left: 10px;padding-right: 10px;"> @click="getImgList(index,saveObj)" :key="index" style="padding-left: 10px;padding-right: 10px;">
<div flex="dir:left box:last"> <div flex="dir:left box:last">
<el-col :span="18" style="overflow: hidden; text-overflow: ellipsis;"> <el-col :span="18" style="overflow: hidden; text-overflow: ellipsis;">
<i class="el-icon-tickets"></i> <i class="el-icon-tickets"></i>
<span>{{item.Label==''?'全部':item.Label}}</span> <span>{{item.Label==''?'默认':item.Label}}</span>
</el-col> </el-col>
<el-col class="blue" :span="6" v-if="index!=0"> <el-col class="blue" :span="6" v-if="index!=0">
<span @click="editGroup(index)">编辑</span> <span @click="editGroup(index)">编辑</span>
...@@ -40,10 +35,11 @@ ...@@ -40,10 +35,11 @@
</div> </div>
</el-upload> </el-upload>
</div> </div>
<div style="display:inline-block;margin-left:9px;position:relative" v-for="(item,index) in comImgArr" :key="index"> <div style="display:inline-block;margin-left:9px;position:relative" v-for="(item,index) in comImgArr"
<img :src="item.Path" class="app-attachment-img" style="width: 100px; height: 100px;"> :key="index">
<i class="iconfont icon-bumenguanli-shanchu hotel_DelIcon" @click="delHotelImg(item,index)"></i> <img :src="item.Path" class="app-attachment-img" style="width: 100px; height: 100px;">
</div> <i class="iconfont icon-bumenguanli-shanchu hotel_DelIcon" @click="delHotelImg(item,index)"></i>
</div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -97,42 +93,38 @@ ...@@ -97,42 +93,38 @@
this.getAll(); this.getAll();
}, },
methods: { methods: {
getAll(){ getAll() {
// this.commonIndex=-1; this.comImgArr = [];
this.comImgArr=[]; if (this.saveObj.length > 0) {
if(this.saveObj.length>0){
this.saveObj.forEach(item => { this.saveObj.forEach(item => {
this.comImgArr=this.comImgArr.concat(item.ImgList); this.comImgArr = this.comImgArr.concat(item.ImgList);
}) })
} else {
let obj = {
Label: '',
ImgList: this.comImgArr
}
this.saveObj.unshift(obj);
} }
let obj={
Label:'',
ImgList:this.comImgArr
}
this.saveObj.unshift(obj);
}, },
//删除图片 //删除图片
delHotelImg(item,index){ delHotelImg(item, index) {
if(item.MappingId&&item.MappingId>0){ var that = this
let msg = { that.Confirm("删除图片将不能恢复?", function () {
Id:item.MappingId, if (item.MappingId && item.MappingId > 0) {
PicId:item.PicId let msg = {
} Id: item.MappingId,
this.$confirm('是否删除?', '提示', { PicId: item.PicId
confirmButtonText: '确定', }
cancelButtonText: '取消', that.apipost("hotel_post_RemoveHotelImage", msg, res => {
type: 'warning' if (res.data.resultCode == 1) {
}).then(() => { that.comImgArr.splice(index, 1);
this.apipost("hotel_post_RemoveHotelImage", msg, res => { }
this.comImgArr.splice(index,1);
this.Success(res.data.message);
}); });
}).catch(() => { } else {
that.comImgArr.splice(index, 1);
}); }
}else{ });
this.comImgArr.splice(index,1);
}
}, },
//清空消息 //清空消息
clearGroupMsg() { clearGroupMsg() {
...@@ -163,15 +155,18 @@ ...@@ -163,15 +155,18 @@
}, },
//删除 //删除
delGroup(index) { delGroup(index) {
this.saveObj.splice(index, 1); var that = this
that.Confirm("删除图片将不能恢复?", function () {
this.saveObj.splice(index, 1);
});
}, },
//点击获取图片arr //点击获取图片arr
getImgList(index, obj) { getImgList(index, obj) {
this.commonIndex = index; this.commonIndex = index;
if (index == -1) { if (index == -1) {
this.comImgArr=[]; this.comImgArr = [];
this.saveObj.forEach(item => { this.saveObj.forEach(item => {
this.comImgArr=this.comImgArr.concat(item.ImgList); this.comImgArr = this.comImgArr.concat(item.ImgList);
}) })
} else { } else {
this.comImgArr = this.saveObj[index].ImgList; this.comImgArr = this.saveObj[index].ImgList;
...@@ -179,21 +174,15 @@ ...@@ -179,21 +174,15 @@
}, },
//选定 //选定
SelectImgId() { SelectImgId() {
this.$emit('getHotelImg',this.saveObj); this.$emit('getHotelImg', this.saveObj);
}, },
//上传酒店图片 //上传酒店图片
UploadImage(file) { UploadImage(file) {
// if (this.commonIndex == -2) {
// this.Error('请选择分类')
// return;
// }
let newArr = []; let newArr = [];
newArr.push(file.file); newArr.push(file.file);
let fileName = file.file.name; let fileName = file.file.name;
var path = "/Upload/DMC/"; var path = "/Upload/DMC/";
this.UploadSelfFileT(path, newArr, x => { this.UploadSelfFileT(path, newArr, x => {
console.log(x,'xxxx');
;
var str = x.data.FilePath; var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath; var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
var obj = { var obj = {
...@@ -290,11 +279,13 @@ ...@@ -290,11 +279,13 @@
border-left: none; border-left: none;
padding: 0 15px; padding: 0 15px;
} }
.hotel_DelIcon{
.hotel_DelIcon {
position: absolute; position: absolute;
right:-5px; right: -5px;
top:-7px; top: -7px;
color:red; color: red;
cursor: pointer; cursor: pointer;
} }
</style> </style>
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