提交 fabdf758 authored 作者: 王腾飞's avatar 王腾飞

1030

上级 3b52c70d
......@@ -101,7 +101,7 @@
</tr>
</table>
<h2 id="moduleId2">>附加信息</h2>
<table class="basicInfo">
<table class="basicInfo" style="display:none">
<tr>
<td>地区:</td>
<td>中国(清朝)</td>
......@@ -134,7 +134,7 @@
</tr>
</table>
<h2 id="moduleId3">>自定义属性</h2>
<table class="basicInfo">
<table class="basicInfo" style="display:none">
<tr>
<td>地区:</td>
<td>中国(清朝)</td>
......@@ -531,7 +531,7 @@ export default {
},
getDetailAPI() {//人物实体详情查询
var _this = this;
if (this.$route.query.entityType === '1') {
if (this.$route.query.entityType == 1) {
characterDetailAPI(this.$route.query.id)
.then(res => {
if (res.data.code === 0) {
......@@ -539,7 +539,7 @@ export default {
_this.peopleName = res.data.data.keyword;
}
})
} else if (this.$route.query.entityType === '2') {
} else if (this.$route.query.entityType == 2) {
localtionDetailAPI(this.$route.query.id)
.then(res => {
if (res.data.code === 0) {
......@@ -547,7 +547,7 @@ export default {
_this.peopleName = res.data.data.keyword;
}
})
} else if (this.$route.query.entityType === '3') {
} else if (this.$route.query.entityType == 3) {
organDetailAPI(this.$route.query.id)
.then(res => {
if (res.data.code === 0) {
......
......@@ -198,7 +198,7 @@ export default {
path: 'character',
query: {
id: item.id,
entityType: '1',
entityType: 1,
}
})
},
......
......@@ -184,7 +184,7 @@ export default {
path: 'character',
query: {
id: item.id,
entityType: '2',
entityType: 2,
}
})
},
......
......@@ -174,7 +174,7 @@ export default {
path: 'character',
query: {
id: item.id,
entityType: '3',
entityType: 3,
}
})
},
......
......@@ -6,7 +6,7 @@
<div class="formBox">
<div class="formLeft">
<h2>>资源内容描述类</h2>
<swiper :options="swiperOption" ref="swiperOne">
<swiper v-if="photoList.length" :options="swiperOption" ref="swiperOne">
<swiper-slide v-for="(item, key) in photoList" :key="key">
<img :src="`${uploadUrl}?fileName=${item.fileName}`" alt="">
</swiper-slide>
......@@ -141,83 +141,64 @@ export default {
photoList: [],//图册下照片集合
//photoItemInfo: {},//照片集合下单个照片的数据
activeIndex: 0,
swiperOption:{
initialSlide :6,
// autoplay: {
// delay: 1000,
// disableOnInteraction: false
// },
//slidesPerView:3,
//spaceBetween:20,
loop:true,
observer:true,//修改swiper自己或子元素时,自动初始化swiper
observeParents:true,//修改swiper的父元素时,自动初始化swiper
on: {
slideChangeTransitionEnd: function(swiper){
//swiper.update();
//this.swiper.startAutoplay();
//this.swiper.reLoop();
}
}
},
// swiperOption: {
// notNextTick: true,
// pagination: {
// el: '.swiper-pagination',
// type: 'fraction'
// },
// navigation: {
// nextEl: '.swiper-button-next',
// prevEl: '.swiper-button-prev'
// },
// paginationClickable: true,
// autoplay: 2500,
// autoplayDisableOnInteraction: false,
// loop: false,
// //allowTouchMove: false,
// initialSlide: 5,
// observer:true,//修改swiper自己或子元素时,自动初始化swiper
// observeParents:true,//修改swiper的父元素时,自动初始化swiper
// coverflow: {//(轮播图切换方式)
// rotate: 30,
// stretch: 10,
// depth: 60,
// modifier: 2,
// slideShadows : true
// },
// on:{
// // 要使用es6的箭头函数,使this指向vue对象
// click: () => {
// const swiperOne = this.$refs.swiperOne.swiper
// this.activeIndex = swiperOne.realIndex;
// console.log(this.activeIndex,"当前索引");
// let flag = this.photoList[this.activeIndex];
// console.log(flag,"不知道是什么");
// this.formData = flag;
// this.location = '经度:' + this.formData.longitude + ',' + '维度:' + this.formData.latitude + ',' + this.formData.address;
// if (this.formData.diyType) {
// this.formData.diyType.map((item, index) => {
// this.$set(item, 'value', item.dtId);
// this.$set(item, 'label', item.typeName)
// this.optionResourceDiyTypeShow.push(item.value)
// })
// }
// this.formData.label.map((item, index) => {
// this.$set(item, 'value', item.labelId);
// this.resourceLabel.push(item.value)
// })
// },
// // slideChangeTransitionEnd: () => {
// // const swiperOne = this.$refs.swiperOne.swiper
// // this.activeIndex = swiperOne.realIndex;
// // console.log(this.activeIndex,"当前索引1");
// // let flag = this.photoList[this.activeIndex];
// // console.log(flag,"不知道是什么1")
// // this.formData = flag;
// // this.location = '经度:' + this.formData.longitude + ',' + '维度:' + this.formData.latitude + ',' + this.formData.address;
// // }
// }
// },
swiperOption: {
notNextTick: true,
pagination: {
el: '.swiper-pagination',
type: 'fraction'
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev'
},
paginationClickable: true,
autoplay: 2500,
autoplayDisableOnInteraction: false,
loop: false,
//allowTouchMove: false,
initialSlide: 5,
observer:true,//修改swiper自己或子元素时,自动初始化swiper
observeParents:true,//修改swiper的父元素时,自动初始化swiper
coverflow: {//(轮播图切换方式)
rotate: 30,
stretch: 10,
depth: 60,
modifier: 2,
slideShadows : true
},
on:{
// 要使用es6的箭头函数,使this指向vue对象
click: () => {
const swiperOne = this.$refs.swiperOne.swiper
this.activeIndex = swiperOne.realIndex;
console.log(this.activeIndex,"当前索引");
let flag = this.photoList[this.activeIndex];
console.log(flag,"不知道是什么");
this.formData = flag;
this.location = '经度:' + this.formData.longitude + ',' + '维度:' + this.formData.latitude + ',' + this.formData.address;
if (this.formData.diyType) {
this.formData.diyType.map((item, index) => {
this.$set(item, 'value', item.dtId);
this.$set(item, 'label', item.typeName)
this.optionResourceDiyTypeShow.push(item.value)
})
}
this.formData.label.map((item, index) => {
this.$set(item, 'value', item.labelId);
this.resourceLabel.push(item.value)
})
},
slideChangeTransitionEnd: () => {
const swiperOne = this.$refs.swiperOne.swiper
this.activeIndex = swiperOne.realIndex;
console.log(this.activeIndex,"当前索引1");
let flag = this.photoList[this.activeIndex];
console.log(flag,"不知道是什么1")
this.formData = flag;
this.location = '经度:' + this.formData.longitude + ',' + '维度:' + this.formData.latitude + ',' + this.formData.address;
}
}
},
// timeVal: '',
rulesOne: {
name: [
......@@ -291,11 +272,6 @@ export default {
]
}
},
computed: {
swiper() {
return this.$refs.swiperOne.swiper
}
},
mounted() {
this.getresourceDiyTypeList();
this.resourceLabelListAPI();
......@@ -416,9 +392,6 @@ export default {
console.log(res,"&&&&&&");
if (res.data.code === 0) {
this.photoList = res.data.data.imgList;
if(!this.swiper){
this.swiper=this.$refs.swiperOne.swiper
}
}
})
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论