Commit 3c35e6de authored by zhengke's avatar zhengke

修改

parent d6dadee7
......@@ -147,7 +147,7 @@
:label="subItem.Label==''?'默认':subItem.Label">
<div class="InnerHotelDiv">
<div class="InnerHoImgDiv" v-for="(sItem,sIndex) in subItem.ImgList" :key="sIndex">
<img :src="getIconLink(sItem.Path)" @click="showImg(sItem.Path)" />
<img :src="getIconLink(sItem.Path)" @click="showImg(subItem,sIndex)" />
</div>
</div>
</el-tab-pane>
......@@ -253,7 +253,7 @@
<button class="cancel-Btn" @click="goUrl('GnHotelManagement')">{{$t('pub.cancelBtn')}}</button>
</div>
<viewer :images="images" :options='imageOptions' @inited="inited" class="viewer" ref="viewer">
<img v-for="src in images" :src="src" :key="src">
<img v-for="(src,index) in images" :src="src.Path" :key="index">
</viewer>
</div>
</template>
......@@ -478,20 +478,13 @@
inited(viewer) {
this.$viewer = viewer
},
showImg: function (src) {
let srcArr = src.split('?')
src = srcArr[0]
let isExsit = false
this.images.forEach(x => {
if (x === src)
isExsit = true
})
if (!isExsit) {
this.images.push(src)
} else {
this.$viewer.view(this.images.indexOf(src))
showImg(obj,index){
this.images=[];
if(obj.ImgList && obj.ImgList.length>0){
this.images=obj.ImgList;
}
this.$viewer.show()
this.$viewer.view(index)
},
//保存酒店信息
saveResource() {
......
......@@ -46,10 +46,8 @@
</div>
<div style="display:inline-block;margin-left:9px;position:relative" v-for="(item,index) in comImgArr"
:key="index">
<!-- {{item}} -->
<img :src="item.Path" v-if="item.MappingId>0" class="app-attachment-img"
<img :src="getIconLink(item.Path)" class="app-attachment-img"
style="width: 100px; height: 100px;">
<img :src="item.AllPath" v-else class="app-attachment-img" style="width: 100px; height: 100px;">
<i class="iconfont icon-bumenguanli-shanchu hotel_DelIcon" @click="delHotelImg(item,index)"></i>
</div>
</div>
......@@ -196,11 +194,9 @@
var path = "/Upload/DMC/";
this.UploadSelfFileT(path, newArr, x => {
var str = x.data.FilePath;
var imgUrl = this.domainManager().ViittoFileUrl + x.data.FilePath;
var obj = {
MappingId: 0,
PicId: 0,
AllPath: imgUrl,
Path: x.data.FilePath
}
if (this.commonIndex == -1) {
......
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