Commit 2cd90f5a authored by youjie's avatar youjie

no message

parent a9e412df
.bjE6{
background: #e6e6e6;
}
.bjF6{
background: #f6f6f6;
}
.relative{
position: relative;
}
......
......@@ -182,7 +182,7 @@
placeholder="请输入关键字" />
<span class="search-imgicon"><i class="iconfont icon-img_cz searchImgIcon" @click="getList"></i></span>
</span>
<div class="addimgContent test-1">
<div class="addimgContent test-1" v-loading="loading">
<div class="addimgDiv" v-for="(item, index) in imglistArry" :key="item.subCode"
v-if="item.isShowImgDiv && item.Path != null">
<div class="itemImgdiv" @click="selectImg(index)">
......@@ -246,6 +246,7 @@ export default {
props: ["imgType", "isCheckmore", 'queryItem', 'IsShowAdd', 'IsShowVideo', 'checkType'],
data() {
return {
loading: false,
queryMsg: {
pageSize: 50,
pageIndex: 1,
......@@ -280,6 +281,7 @@ export default {
getList() {
//初始化弹窗图片列表
this.imglistArry = [];
this.loading = true
this.apipost(
"hotel_post_GetPicList",
this.queryMsg,
......@@ -290,6 +292,9 @@ export default {
x.isShowImgDiv = true;
})
this.queryMsg.total = res.data.data.count;
this.loading = false
}else{
this.loading = false
}
},
null
......@@ -452,6 +457,9 @@ export default {
},
//点击确定选择
chkedVideoList() {
if(this.isCheckmore>1&&this.selectVideoArr.length>this.isCheckmore){
return this.Error(`最多选${this.isCheckmore}张图`);
}
this.$emit("headCallBack", this.selectVideoArr);
this.$emit("closeImg");
}
......
......@@ -11,7 +11,7 @@
<div class="TFslide" v-for="item in TypeArray"
:class="{'TFcked':item.isShow,'display_none':(item.TypeState===4 && FeatureData.FeatureType !== 4) || (item.TypeState===4 && !$route.query.configId)}"
@click="clickFeature(item)" :key="item.subCode"
v-if="((item.TypeState>3 && CurrentUserInfo.RB_Group_id==QjGroupId())||item.TypeState<=3)&&item.TypeState!=8">
v-if="((item.TypeState>3 && CurrentUserInfo.RB_Group_id==QjGroupId())||item.TypeState<=3)">
<img v-bind:src="item.imgUrl">
<div>{{item.ckTitle}}</div>
</div>
......
......@@ -31,7 +31,7 @@
:isUploadImg="true" :isSelectImg="true" :isAddImg="false" :isDeleteImg="false" @toUploadImg="UploadImg"
@toSelectImg="SelectImg" @toAddImg="AddImg" @toDeleteImg="DeleteImg"></FeatureControls>
</div>
<div class="featureHome-left-one bjE6 absolute z-index2">
<div class="featureHome-left-one bjF6 absolute z-index2">
<template v-if="FeatureItem.dataObj.ImgList&&FeatureItem.dataObj.ImgList.length>0">
<img :src="FeatureItem.dataObj.ImgList[0].url" />
</template>
......
......@@ -14,12 +14,24 @@
<div class="MasterMapList-box-two absolute z-index3">
<FeatureControls :index="index" :FeatureData="FeatureItem" :ControlsType="'column'"
:isUploadImg="FeatureItem.pageType==2?true:false" :isSelectImg="FeatureItem.pageType==2?true:false"
:isAddImg="FeatureItem.pageType==2?false:true" :isDeleteImg="false" @toUploadImg="UploadImg"
:isAddImg="FeatureItem.pageType==2?false:
FeatureItem.pageType!=2&&FeatureItem.dataObj.ImgList
&&FeatureItem.dataObj.ImgList.length<9?false:true" :isDeleteImg="false" @toUploadImg="UploadImg"
@toSelectImg="SelectImg" @toAddImg="AddImg" @toDeleteImg="DeleteImg"></FeatureControls>
</div>
</div>
<MasterMapList :index="index" :FeatureData="FeatureItem" @toUploadImg="UploadImg" @toSelectImg="SelectImg"
<!-- 上传文件 -->
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_0'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_1'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_2'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_3'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_4'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_5'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_6'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_7'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_8'" @change="uploadpic">
<input type="file" style="display:none" :id="'MasterMapfile_'+(index * 2 + 1) + '_9'" @change="uploadpic">
<MasterMapList :index="index" :FeatureData="FeatureItem.dataObj" :pageType="FeatureItem.pageType" @toUploadImg="UploadImg" @toSelectImg="SelectImg"
@toAddImg="AddImg" @toDeleteImg="DeleteImg"></MasterMapList>
<!-- 副标题 -->
......@@ -69,19 +81,27 @@
queryItem: {
queryName: '',
queryId: 0,
}
},
MasterMapIndex: null,
};
},
methods: {
UploadImg() {
UploadImg(index) {
this.MasterMapIndex = index?index:0
console.log(`#MasterMapfile_${(this.index * 2 + 1)}_${index}`)
if(this.FeatureItem.pageType==2){
document.querySelector(`#introducefile_${(this.FeatureItem * 2 + 1)}_0`).click();
document.querySelector(`#introducefile_${(this.index * 2 + 1)}_0`).click();
}else{
document.querySelector(`#MasterMapfile_${(this.index * 2 + 1)}_${index}`).click();
}
console.log(this.uploadpic(),'=====')
},
uploadpic(e) {
let that = this;
console.log(this.MasterMapIndex,'=========')
if (e.target.files.length > 0 && e.target.files[0].size > 0) {
// 压缩图片需要的一些元素和对象
var reader = new FileReader();
reader.onload = function (event) {
let blob = that.base64ToBlob(event.target.result);
......@@ -94,26 +114,39 @@
let i = e.target.id.split("_")[2];
if(that.FeatureItem.pageType==2){
that.FeatureItem.dataObj.ImgList[0].url = allPath
}else{
that.FeatureItem.dataObj.ImgList[that.MasterMapIndex].url = allPath
}
that.FeatureItem.dataObj.ImgList[that.MasterMapIndex].url = allPath
});
};
reader.readAsDataURL(e.target.files[0]);
// return allPath
}
},
SelectImg() {
SelectImg(index) {
console.log(index,'--------SelectImg')
this.MasterMapIndex = index?index:0
if(this.FeatureItem.pageType==4) this.choseType = 1
else if(this.FeatureItem.pageType==5) this.choseType = 2
else if(this.FeatureItem.pageType==6) this.choseType = 3
else this.choseType = 0
this.isShowScenicImg = true
},
AddImg() {
let obj = {
url:''
}
this.FeatureItem.dataObj.ImgList.push(obj)
},
DeleteImg() {
DeleteImg(index) {
this.FeatureItem.dataObj.ImgList.splice(index,1)
},
toAddPages(index, FeatureData) {
this.$emit('toAddPages', index, FeatureData)
toAddPages() {
this.$emit('toAddPages', this.index, this.FeatureItem)
},
toDeletePages(index, FeatureData) {
this.$emit('toDeletePages', index, FeatureData)
toDeletePages() {
this.$emit('toDeletePages', this.index, this.FeatureItem)
},
setTemplate(index, TemplateType) {
this.$emit('setTemplate', index, TemplateType)
......@@ -122,9 +155,13 @@
this.isShowScenicImg = false
},
getDMCimg(selectImgArr) {
if(this.FeatureItem.pageType==2){
this.FeatureItem.dataObj.ImgList[0].url = selectImgArr[0].Path
}
let Path = selectImgArr[0].Path
// if(this.FeatureItem.pageType==2){
// this.FeatureItem.dataObj.ImgList[0].url = Path
// }else if(this.FeatureItem.pageType==4||this.FeatureItem.pageType==5||this.FeatureItem.pageType==6){
// this.FeatureItem.dataObj.ImgList[this.MasterMapIndex].url = Path
// }
this.FeatureItem.dataObj.ImgList[this.MasterMapIndex].url = Path
this.isShowScenicImg = false
}
......@@ -139,6 +176,13 @@
deep: true,
immediate: true
},
MasterMapIndex:{
handler(val,oldVal){
console.log(val,oldVal)
},
deep: true,
immediate: true
}
},
mounted() {
......
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