Commit a871edf5 authored by 黄奎's avatar 黄奎

页面修改

parent f033497f
......@@ -206,7 +206,7 @@
<tencentMap @map-submit="mapEvent" :address="addMsg.Address"></tencentMap>
</el-dialog>
<el-dialog title="酒店图片" :visible.sync="isShowHotelImg" width="1240px">
<comHotelImg :saveObj="HotelImgArr"></comHotelImg>
<comImgList :saveObj="HotelImgArr"></comImgList>
</el-dialog>
<div class="btn-list">
<span class="common-lefttit"></span>
......@@ -221,7 +221,7 @@
<script>
import DMCchooseImg from "../commonPage/DMCchooseImg.vue";
import tencentMap from "../commonPage/tencentMap.vue";
import comHotelImg from "../commonPage/comHotelImg.vue";
import comImgList from "../commonPage/comImgList.vue";
export default {
data() {
return {
......@@ -331,11 +331,8 @@
Into: "", //酒店介绍
},
},
HotelImgArr: [{
Id: 0,
label: '',
imgArr: []
}],
//酒店图片
HotelImgArr: [],
//酒店标签列表
TagsList: [],
rules: {
......@@ -371,7 +368,7 @@
components: {
tencentMap: tencentMap,
DMCchooseImg: DMCchooseImg,
comHotelImg: comHotelImg
comImgList: comImgList
},
methods: {
changeBooking() {
......
......@@ -2,17 +2,18 @@
<div class="ChooseImg">
<el-row style="border: 1px solid rgb(227, 227, 227);">
<el-col :span="6" style="border-right: 1px solid rgb(227, 227, 227);">
<el-button @click="addGroup" style="margin-top: 12px;margin-left: 5%;" type="primary" size="small">添加分组
<el-button @click="clearGroupMsg" style="margin-top: 12px;margin-left: 5%;" type="primary" size="small">添加分组
</el-button>
<div class="el-scrollbar" style="height: 450px; width: 100%;">
<div class="el-scrollbar__wrap" style="margin-bottom: -8px; margin-right: -8px;">
<div class="el-scrollbar__view">
<li class="el-menu-item" style="padding-left: 10px;padding-right: 10px;">
<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' : ''" @click="getImgList(index,saveObj)" :key="index"
style="padding-left: 10px;padding-right: 10px;">
<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;">
<div flex="dir:left box:last">
<el-col :span="18" style="overflow: hidden; text-overflow: ellipsis;">
<i class="el-icon-tickets"></i>
......@@ -46,28 +47,24 @@
</div>
</el-tooltip>
</div>
<!-- <div style="padding-right:10px">
<el-pagination style="text-align:right" background :current-page="currentPage4"
@current-change="handleCurrentChange" :page-size="msg.pageSize" layout="prev, pager, next,jumper"
:total="total">
</el-pagination>
</div> -->
</el-col>
</el-row>
<div style="margin-top:20px;text-align:right">
<el-button size="small" type="primary" @click="SelectImgId">选定</el-button>
</div>
<!-- 新增分组 -->
<el-dialog :modal="false" :modal-append-to-body='false' title="分组管理" :visible.sync="addGroupMsgDig" width="400px">
<el-dialog :modal="false" :modal-append-to-body='false' title="分组管理" :visible.sync="groupMsg.addGroupMsgDig"
width="400px">
<el-form label-width="100px">
<el-form-item label="分组名称">
<el-input size="small" type="text" placeholder="请输入内容" v-model="GroupName" maxlength="8" show-word-limit>
<el-input size="small" type="text" placeholder="请输入内容" v-model="groupMsg.GroupName" maxlength="8"
show-word-limit>
</el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="addGroupMsgDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="GroupCked()">确 定</el-button>
<el-button size="small" @click="groupMsg.addGroupMsgDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="SaveGroup()">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -75,7 +72,7 @@
<script>
export default {
//是否多选
//图片数组
props: {
saveObj: {
type: Array,
......@@ -84,67 +81,78 @@
},
data() {
return {
GroupName: '', //分组名称
addGroupMsgDig: false,
pageMsgDig: false,
ImageArr: [], //显示数组
isAdd: 0, //添加标志
commonIndex:-1,
comImgArr:[],
groupMsg: {
isAdd: 0, //添加标志
GroupName: '', //分组名称
addGroupMsgDig: false,
},
commonIndex: -1,
comImgArr: [],
}
},
watch: {
},
created() {},
computed: {},
mounted() {
console.log(this.saveObj, 'saveObj');
},
methods: {
//新增分组
addGroup() {
this.isAdd = 0;
this.GroupName='';
this.addGroupMsgDig = true;
//清空消息
clearGroupMsg() {
this.groupMsg.isAdd = 0;
this.groupMsg.GroupName = '';
this.groupMsg.addGroupMsgDig = true;
},
//确定分组
GroupCked() {
if (this.isAdd == 0) {
//新增修改分组
SaveGroup() {
if (this.groupMsg.isAdd == 0) {
let obj = {
Id: 0,
label: this.GroupName,
Id: currentId,
label: this.groupMsg.GroupName,
imgArr: []
}
this.saveObj.push(obj);
}else{
this.saveObj[this.commonIndex].label = this.GroupName;
} else {
this.saveObj[this.commonIndex].label = this.groupMsg.GroupName;
}
this.addGroupMsgDig = false;
this.clearGroupMsg();
this.groupMsg.addGroupMsgDig = false;
},
//编辑分组
editGroup(index) {
this.isAdd = 1;
this.groupMsg.isAdd = 1;
this.commonIndex = index;
this.GroupName = this.saveObj[index].label;
this.addGroupMsgDig = true;
this.groupMsg.GroupName = this.saveObj[index].label;
this.groupMsg.addGroupMsgDig = true;
},
//删除
delGroup(index){
this.saveObj.splice(index,1);
delGroup(index) {
this.saveObj.splice(index, 1);
},
//点击获取图片arr
getImgList(index,obj){
getImgList(index, obj) {
this.commonIndex = index;
this.comImgArr =this.saveObj[index].imgArr;
if (index == -1) {
this.saveObj.forEach(item => {
this.comImgArr.concat(item.imgArr);
})
} else {
this.comImgArr = this.saveObj[index].imgArr;
}
},
//选定
SelectImgId() {
console.log("")
},
//上传酒店图片
UploadImage(file) {
if(this.commonIndex==-1){
this.Error('请选择分类')
return;
if (this.commonIndex == -1) {
this.Error('请选择分类')
return;
}
let newArr = [];
newArr.push(file.file);
......@@ -156,7 +164,6 @@
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
obj.Path = str;
obj.ShowPath = imgUrl;
console.log(obj,'obj');
this.saveObj[this.commonIndex].imgArr.push(obj.ShowPath);
});
},
......
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