添加分页

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

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

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

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

@ -1,96 +1,98 @@
<template> <template>
<div id="container"></div> <div id="container"></div>
</template> </template>
<script> <script>
import AMapLoader from '@amap/amap-jsapi-loader'; //import AMapLoader from '@amap/amap-jsapi-loader';
export default { export default {
data() { data() {
return { return {
// map 使 this.map // map 使 this.map
//map:null, //map:null,
adcode: '310000', adcode: "310000",
dep: 2 dep: 2,
}; };
},
methods: {
initMap() {
AMapLoader.load({
key: "9a18085d520884e61312cba93787a8f2", // WebKey load
version: "2.0", // JSAPI 1.4.15
plugins: ["AMap.MapType"], // 使'AMap.Scale'
})
.then((AMap) => {
this.map = new AMap.Map("container", {
//id
center: [121.43333, 31.2],
layers: [
AMap.createDefaultLayer(), //
],
zoom: 9.5,
});
this.map.addControl(new AMap.MapType()); //
//console.log(AMap.DistrictLayer.Province);
var disProvince = new AMap.DistrictLayer.Province({
zIndex: 12,
adcode: ["310000"],
depth: 2,
styles: {
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) {
var px = ev.pixel;
var props = disProvince.getDistrictByContainerPos(px); //
//console.log(props);
//disProvince.setDistricts(props.adcode + ''); //
var NAME_CHN = props.NAME_CHN;
disProvince.setStyles({
// 线
//nation-stroke': nationStroke,
// 线
//'coastline-stroke': '',
"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)";
},
});
});
})
.catch((e) => {
console.log(e);
});
}, },
methods: { },
initMap() { mounted() {
AMapLoader.load({ //DOM
key: '9a18085d520884e61312cba93787a8f2', // WebKey load this.initMap();
version: '2.0', // JSAPI 1.4.15 },
plugins: ['AMap.MapType'] // 使'AMap.Scale'
})
.then((AMap) => {
this.map = new AMap.Map('container', {
//id
center: [121.43333, 31.2],
layers: [
AMap.createDefaultLayer() //
],
zoom: 9.5
});
this.map.addControl(new AMap.MapType()); //
//console.log(AMap.DistrictLayer.Province);
var disProvince = new AMap.DistrictLayer.Province({
zIndex: 12,
adcode: ['310000'],
depth: 2,
styles: {
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) {
var px = ev.pixel;
var props = disProvince.getDistrictByContainerPos(px); //
//console.log(props);
//disProvince.setDistricts(props.adcode + ''); //
var NAME_CHN = props.NAME_CHN;
disProvince.setStyles({
// 线
//nation-stroke': nationStroke,
// 线
//'coastline-stroke': '',
'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)';
}
});
});
})
.catch((e) => {
console.log(e);
});
}
},
mounted() {
//DOM
this.initMap();
}
}; };
</script> </script>
<style lang="less"> <style lang="less">
#container { #container {
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
width: 100%; width: 100%;
height: 100%; height: 100%;
.amap-logo { .amap-logo {
display: none; display: none;
opacity: 0 !important; opacity: 0 !important;
} }
.amap-copyright { .amap-copyright {
opacity: 0; opacity: 0;
display: none; display: none;
} }
.amap-ctrl-overlay-layer { .amap-ctrl-overlay-layer {
display: none; display: none;
} }
} }
</style> </style>

Loading…
Cancel
Save