添加分页

master
fanluyan 2 years ago
parent 8cd5836154
commit 8fdda1f2f3

11979
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -8,7 +8,6 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
"axios": "^1.3.4",
"core-js": "^3.8.3",
"echarts": "^5.4.2",
@ -16,7 +15,6 @@
"moment": "^2.29.4",
"update-element-ui-theme": "^1.0.0",
"vue": "^2.6.14",
"vue-awesome-swiper": "^3.1.3",
"vue-router": "^3.5.1",
"vuex": "^3.6.2"
},
@ -34,6 +32,7 @@
"less": "^4.1.3",
"less-loader": "^11.1.0",
"style-resources-loader": "^1.5.0",
"vue-awesome-swiper": "^3.1.3",
"vue-cli-plugin-style-resources-loader": "^0.1.5",
"vue-template-compiler": "^2.6.14"
},

@ -38,7 +38,7 @@ const service = axios.create({
// baseURL: '',
// timeout: 5000
baseURL: "api", //把原来的项目地址改成api解决跨域问题
timeout: 3000,
timeout: 30000,
});
service.interceptors.request.use(

@ -38,14 +38,14 @@
{{ $moment(item.photoTime).format("YYYY-MM-DD HH:mm:ss") }}
</p>
</swiper-slide>
<!-- <div
<div
class="swiper-button-next swiper-button-white"
slot="button-next"
></div>
<div
class="swiper-button-prev swiper-button-white"
slot="button-prev"
></div> -->
></div>
</swiper>
</div>
</template>
@ -70,12 +70,12 @@ export default {
data() {
return {
swiperOptionTop: {
zoom: true,
//zoom: true,//
loop: true,
loopedSlides: 5, // looped slides should be the same
spaceBetween: 10,
observer: true, //swiperswiper
observeParents: true, //swiperswiper
//spaceBetween: 10,
//observer: true, //swiperswiper
//observeParents: true, //swiperswiper
// autoplay: {
// //
// delay: 2000,
@ -92,7 +92,7 @@ export default {
spaceBetween: 10,
centeredSlides: true,
slidesPerView: "auto",
touchRatio: 0.2,
// touchRatio: 0.2,
slideToClickedSlide: true,
navigation: {
nextEl: ".swiper-button-next",

@ -129,10 +129,8 @@ export default {
);
},
//
async getLineTreeList() {
await getdyTreeListJoggle({
termid: 123455,
})
getLineTreeList() {
getdyTreeListJoggle()
.then((res) => {
console.log(res);
this.lineTreeData = res.data.list;
@ -151,7 +149,7 @@ export default {
.catch((err) => {
console.log(err); //
});
await this.getChannelList(this.channelId); //id
this.getChannelList(this.channelId); //id
},
//tree
handleNodeClick(data, node) {
@ -164,8 +162,8 @@ export default {
},
//
async getChannelList(id) {
await getChannelListJoggle({ termid: id })
getChannelList(id) {
getChannelListJoggle({ termid: id })
.then((res) => {
console.log(res);
this.channelList = res.data.list;

@ -2,49 +2,49 @@
<div id="container"></div>
</template>
<script>
import AMapLoader from '@amap/amap-jsapi-loader';
//import AMapLoader from '@amap/amap-jsapi-loader';
export default {
data() {
return {
// map 使 this.map
//map:null,
adcode: '310000',
dep: 2
adcode: "310000",
dep: 2,
};
},
methods: {
initMap() {
AMapLoader.load({
key: '9a18085d520884e61312cba93787a8f2', // WebKey load
version: '2.0', // JSAPI 1.4.15
plugins: ['AMap.MapType'] // 使'AMap.Scale'
key: "9a18085d520884e61312cba93787a8f2", // WebKey load
version: "2.0", // JSAPI 1.4.15
plugins: ["AMap.MapType"], // 使'AMap.Scale'
})
.then((AMap) => {
this.map = new AMap.Map('container', {
this.map = new AMap.Map("container", {
//id
center: [121.43333, 31.2],
layers: [
AMap.createDefaultLayer() //
AMap.createDefaultLayer(), //
],
zoom: 9.5
zoom: 9.5,
});
this.map.addControl(new AMap.MapType()); //
//console.log(AMap.DistrictLayer.Province);
var disProvince = new AMap.DistrictLayer.Province({
zIndex: 12,
adcode: ['310000'],
adcode: ["310000"],
depth: 2,
styles: {
fill: 'rgba(161,207,251,0.5)',
'province-stroke': 'blue',
'city-stroke': 'white', //
'county-stroke': 'blue' //
}
fill: "rgba(161,207,251,0.5)",
"province-stroke": "blue",
"city-stroke": "white", //
"county-stroke": "blue", //
},
});
disProvince.setMap(this.map);
//this.map.addControl(new AMap.DistrictSearch()); //citycodeadcode
this.map.on('click', function (ev) {
this.map.on("click", function (ev) {
var px = ev.pixel;
var props = disProvince.getDistrictByContainerPos(px); //
//console.log(props);
@ -55,24 +55,26 @@ export default {
//nation-stroke': nationStroke,
// 线
//'coastline-stroke': '',
'province-stroke': 'blue',
'city-stroke': 'white', //
'county-stroke': 'blue', //
"province-stroke": "blue",
"city-stroke": "white", //
"county-stroke": "blue", //
fill: function (props) {
return props.NAME_CHN == NAME_CHN ? 'rgba(161,207,251,0.8)' : 'rgba(161,207,251,0.5)';
}
return props.NAME_CHN == NAME_CHN
? "rgba(161,207,251,0.8)"
: "rgba(161,207,251,0.5)";
},
});
});
})
.catch((e) => {
console.log(e);
});
}
},
},
mounted() {
//DOM
this.initMap();
}
},
};
</script>
<style lang="less">

Loading…
Cancel
Save