From 0f649abfde58008f93c0506858047a4dc1b5ea52 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 19 Sep 2022 17:27:38 +0800
Subject: [PATCH] viewdata数据处理
---
src/assets/viewdata.js | 122 +++++++++++++++++++++++++---------------
1 files changed, 76 insertions(+), 46 deletions(-)
diff --git a/src/assets/viewdata.js b/src/assets/viewdata.js
index f07d88e..b9012e0 100644
--- a/src/assets/viewdata.js
+++ b/src/assets/viewdata.js
@@ -1,46 +1,76 @@
-export const viewdata = [
- {
- name: '南城县南城麻姑集团',
- latitude: '116.625419',
- longitude: '27.586658',
- childItem: [
- { title: '2022年6月', url: 'http://59.55.128.155:9003/image/wmts/x6FjrhkG/{z}/{x}/{y}' }
- ]
- },
- {
- name: '南城县水龙米业',
- latitude: '116.642107',
- longitude: '27.596825',
- childItem: [
- { title: '2022年6月', url: 'http://59.55.128.155:9003/image/wmts/EigNM2I4/{z}/{x}/{y}' }
- ]
- },
- {
- name: '南城县田南村绿色基地',
- latitude: '116.56705776',
- longitude: '27.42386903',
- childItem: [
- { title: '2022年6月', url: 'http://59.55.128.155:9003/image/wmts/vNjFuYLb/{z}/{x}/{y}' },
- { title: '2022年7月', url: 'http://59.55.128.155:9003/image/wmts/XPkwzs0M/{z}/{x}/{y}' },
- { title: '2022年8月', url: 'http://59.55.128.155:9003/image/wmts/YnJOjH09/{z}/{x}/{y}' }
- ]
- },
- {
- name: '南城县有机种植基地',
- latitude: '116.778964',
- longitude: '27.563004',
- childItem: [
- { title: '2022年6月', url: 'http://59.55.128.155:9003/image/wmts/syOssp0f/{z}/{x}/{y}' },
- { title: '2022年7月', url: 'http://59.55.128.155:9003/image/wmts/taX7ipoo/{z}/{x}/{y}' },
- { title: '2022年8月', url: 'http://59.55.128.155:9003/image/wmts/JqaZaGwd/{z}/{x}/{y}' }
- ]
- },
- {
- name: '南城县育秧中心',
- latitude: '116.650792',
- longitude: '27.633852',
- childItem: [
- { title: '2022年8月', url: 'http://59.55.128.155:9003/image/wmts/U49OG6vT/{z}/{x}/{y}' }
- ]
- }
-]
+import request from '@/router/axios'
+
+export const getRemoteDetailsList = () => {
+ return request({
+ url: '/remoteType/type/getRemoteDetailsList',
+ method: 'post',
+ })
+}
+var viewdata = []
+getRemoteDetailsList().then(res=>{
+ var data = res.data.data
+
+ data.forEach(e=>{
+ var childItem = []
+ e.remoteList.forEach(k=>{
+ childItem.push({
+ title:k.reName,
+ url:k.reUrl
+ })
+ })
+ viewdata.push({
+ name:e.name,
+ latitude: e.latitude,
+ longitude: e.longitude,
+ childItem:childItem
+ })
+ })
+})
+export {viewdata}
+
+// export const viewdata = [
+// {
+// name: '南城县南城麻姑集团',
+// latitude: '116.625419',
+// longitude: '27.586658',
+// childItem: [
+// { title: '2022年6月', url: 'http://59.55.128.155:9003/image/wmts/x6FjrhkG/{z}/{x}/{y}' }
+// ]
+// },
+// {
+// name: '南城县水龙米业',
+// latitude: '116.642107',
+// longitude: '27.596825',
+// childItem: [
+// { title: '2022年6月', url: 'http://59.55.128.155:9003/image/wmts/EigNM2I4/{z}/{x}/{y}' }
+// ]
+// },
+// {
+// name: '南城县田南村绿色基地',
+// latitude: '116.56705776',
+// longitude: '27.42386903',
+// childItem: [
+// { title: '2022年6月', url: 'http://59.55.128.155:9003/image/wmts/vNjFuYLb/{z}/{x}/{y}' },
+// { title: '2022年7月', url: 'http://59.55.128.155:9003/image/wmts/XPkwzs0M/{z}/{x}/{y}' },
+// { title: '2022年8月', url: 'http://59.55.128.155:9003/image/wmts/YnJOjH09/{z}/{x}/{y}' }
+// ]
+// },
+// {
+// name: '南城县有机种植基地',
+// latitude: '116.778964',
+// longitude: '27.563004',
+// childItem: [
+// { title: '2022年6月', url: 'http://59.55.128.155:9003/image/wmts/syOssp0f/{z}/{x}/{y}' },
+// { title: '2022年7月', url: 'http://59.55.128.155:9003/image/wmts/taX7ipoo/{z}/{x}/{y}' },
+// { title: '2022年8月', url: 'http://59.55.128.155:9003/image/wmts/JqaZaGwd/{z}/{x}/{y}' }
+// ]
+// },
+// {
+// name: '南城县育秧中心',
+// latitude: '116.650792',
+// longitude: '27.633852',
+// childItem: [
+// { title: '2022年8月', url: 'http://59.55.128.155:9003/image/wmts/U49OG6vT/{z}/{x}/{y}' }
+// ]
+// }
+// ]
--
Gitblit v1.9.3