Commit a871edf5 authored by 黄奎's avatar 黄奎

页面修改

parent f033497f
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
<tencentMap @map-submit="mapEvent" :address="addMsg.Address"></tencentMap> <tencentMap @map-submit="mapEvent" :address="addMsg.Address"></tencentMap>
</el-dialog> </el-dialog>
<el-dialog title="酒店图片" :visible.sync="isShowHotelImg" width="1240px"> <el-dialog title="酒店图片" :visible.sync="isShowHotelImg" width="1240px">
<comHotelImg :saveObj="HotelImgArr"></comHotelImg> <comImgList :saveObj="HotelImgArr"></comImgList>
</el-dialog> </el-dialog>
<div class="btn-list"> <div class="btn-list">
<span class="common-lefttit"></span> <span class="common-lefttit"></span>
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,7 @@
<script> <script>
import DMCchooseImg from "../commonPage/DMCchooseImg.vue"; import DMCchooseImg from "../commonPage/DMCchooseImg.vue";
import tencentMap from "../commonPage/tencentMap.vue"; import tencentMap from "../commonPage/tencentMap.vue";
import comHotelImg from "../commonPage/comHotelImg.vue"; import comImgList from "../commonPage/comImgList.vue";
export default { export default {
data() { data() {
return { return {
...@@ -331,11 +331,8 @@ ...@@ -331,11 +331,8 @@
Into: "", //酒店介绍 Into: "", //酒店介绍
}, },
}, },
HotelImgArr: [{ //酒店图片
Id: 0, HotelImgArr: [],
label: '',
imgArr: []
}],
//酒店标签列表 //酒店标签列表
TagsList: [], TagsList: [],
rules: { rules: {
...@@ -371,7 +368,7 @@ ...@@ -371,7 +368,7 @@
components: { components: {
tencentMap: tencentMap, tencentMap: tencentMap,
DMCchooseImg: DMCchooseImg, DMCchooseImg: DMCchooseImg,
comHotelImg: comHotelImg comImgList: comImgList
}, },
methods: { methods: {
changeBooking() { changeBooking() {
......
...@@ -2,17 +2,18 @@ ...@@ -2,17 +2,18 @@
<div class="ChooseImg"> <div class="ChooseImg">
<el-row style="border: 1px solid rgb(227, 227, 227);"> <el-row style="border: 1px solid rgb(227, 227, 227);">
<el-col :span="6" style="border-right: 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> </el-button>
<div class="el-scrollbar" style="height: 450px; width: 100%;"> <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__wrap" 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;"> <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> <i class="el-icon-tickets"></i>
<span>全部</span> <span>全部</span>
</li> </li>
<li class="el-menu-item" v-for="(item,index) in saveObj" :class="commonIndex==index?'selectActive' : ''" @click="getImgList(index,saveObj)" :key="index" <li class="el-menu-item" v-for="(item,index) in saveObj" :class="commonIndex==index?'selectActive' : ''"
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>
...@@ -46,28 +47,24 @@ ...@@ -46,28 +47,24 @@
</div> </div>
</el-tooltip> </el-tooltip>
</div> </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-col>
</el-row> </el-row>
<div style="margin-top:20px;text-align:right"> <div style="margin-top:20px;text-align:right">
<el-button size="small" type="primary" @click="SelectImgId">选定</el-button> <el-button size="small" type="primary" @click="SelectImgId">选定</el-button>
</div> </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 label-width="100px">
<el-form-item label="分组名称"> <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-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="addGroupMsgDig = false">取 消</el-button> <el-button size="small" @click="groupMsg.addGroupMsgDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="GroupCked()">确 定</el-button> <el-button size="small" type="primary" @click="SaveGroup()">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -75,7 +72,7 @@ ...@@ -75,7 +72,7 @@
<script> <script>
export default { export default {
//是否多选 //图片数组
props: { props: {
saveObj: { saveObj: {
type: Array, type: Array,
...@@ -84,67 +81,78 @@ ...@@ -84,67 +81,78 @@
}, },
data() { data() {
return { return {
GroupName: '', //分组名称 groupMsg: {
addGroupMsgDig: false, isAdd: 0, //添加标志
pageMsgDig: false, GroupName: '', //分组名称
ImageArr: [], //显示数组 addGroupMsgDig: false,
isAdd: 0, //添加标志 },
commonIndex:-1, commonIndex: -1,
comImgArr:[], comImgArr: [],
} }
},
watch: {
}, },
created() {}, created() {},
computed: {}, computed: {},
mounted() { mounted() {
console.log(this.saveObj, 'saveObj');
}, },
methods: { methods: {
//新增分组 //清空消息
addGroup() { clearGroupMsg() {
this.isAdd = 0; this.groupMsg.isAdd = 0;
this.GroupName=''; this.groupMsg.GroupName = '';
this.addGroupMsgDig = true; this.groupMsg.addGroupMsgDig = true;
}, },
//确定分组 //新增修改分组
GroupCked() { SaveGroup() {
if (this.isAdd == 0) {
if (this.groupMsg.isAdd == 0) {
let obj = { let obj = {
Id: 0, Id: currentId,
label: this.GroupName, label: this.groupMsg.GroupName,
imgArr: [] imgArr: []
} }
this.saveObj.push(obj); this.saveObj.push(obj);
}else{ } else {
this.saveObj[this.commonIndex].label = this.GroupName; this.saveObj[this.commonIndex].label = this.groupMsg.GroupName;
} }
this.addGroupMsgDig = false; this.clearGroupMsg();
this.groupMsg.addGroupMsgDig = false;
}, },
//编辑分组 //编辑分组
editGroup(index) { editGroup(index) {
this.isAdd = 1; this.groupMsg.isAdd = 1;
this.commonIndex = index; this.commonIndex = index;
this.GroupName = this.saveObj[index].label; this.groupMsg.GroupName = this.saveObj[index].label;
this.addGroupMsgDig = true; this.groupMsg.addGroupMsgDig = true;
}, },
//删除 //删除
delGroup(index){ delGroup(index) {
this.saveObj.splice(index,1); this.saveObj.splice(index, 1);
}, },
//点击获取图片arr //点击获取图片arr
getImgList(index,obj){ getImgList(index, obj) {
this.commonIndex = index; 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() { SelectImgId() {
console.log("")
}, },
//上传酒店图片 //上传酒店图片
UploadImage(file) { UploadImage(file) {
if(this.commonIndex==-1){ if (this.commonIndex == -1) {
this.Error('请选择分类') this.Error('请选择分类')
return; return;
} }
let newArr = []; let newArr = [];
newArr.push(file.file); newArr.push(file.file);
...@@ -156,7 +164,6 @@ ...@@ -156,7 +164,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);
}); });
}, },
......
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