`#修改了乔木草木灌木,调查点页面,

This commit is contained in:
slaughter 2020-05-28 16:53:00 +08:00
parent eb3e38a371
commit 35bdefe58b
8 changed files with 174 additions and 154 deletions

View File

@ -89,7 +89,7 @@ export default {
method: 'get', method: 'get',
url: this.GLOBAL.baseURL + '/findings/reveal/86661017-57ac-48ea-8229-3dcdc45fda35' url: this.GLOBAL.baseURL + '/findings/reveal/86661017-57ac-48ea-8229-3dcdc45fda35'
}).then(function (response) { }).then(function (response) {
console.log('response:' + response.data) console.log(response.data)
_this.findings = response.data.findings _this.findings = response.data.findings
_this.lon = response.data.lon _this.lon = response.data.lon
_this.lat = response.data.lat _this.lat = response.data.lat

View File

@ -14,6 +14,8 @@
<p class="line"></p> <p class="line"></p>
<span class="lefttext">调查点编号{{ f.findingscode }}</span> <span class="lefttext">调查点编号{{ f.findingscode }}</span>
<p class="line"></p> <p class="line"></p>
<p style="">调查者{{ f.investigators }}</p>
<p class="line"></p>
<span>调查日期{{ f.date }}</span> <span>调查日期{{ f.date }}</span>
<p class="line"></p> <p class="line"></p>
<p style="">地点名称{{ f.site }}</p> <p style="">地点名称{{ f.site }}</p>

View File

@ -14,6 +14,8 @@
<p class="line"></p> <p class="line"></p>
<span class="lefttext">调查点编号{{ f.findingscode }}</span> <span class="lefttext">调查点编号{{ f.findingscode }}</span>
<p class="line"></p> <p class="line"></p>
<p style="">调查者{{ f.investigators }}</p>
<p class="line"></p>
<span>调查日期{{ f.date }}</span> <span>调查日期{{ f.date }}</span>
<p class="line"></p> <p class="line"></p>
<p style="">地点名称{{ f.site }}</p> <p style="">地点名称{{ f.site }}</p>

View File

@ -16,6 +16,8 @@
<p class="line"></p> <p class="line"></p>
<span>调查日期{{ f.date }}</span> <span>调查日期{{ f.date }}</span>
<p class="line"></p> <p class="line"></p>
<p style="">调查者{{ f.investigators }}</p>
<p class="line"></p>
<p style="">地点名称{{ f.site }}</p> <p style="">地点名称{{ f.site }}</p>
<p class="line"></p> <p class="line"></p>
<p style="">生境描述{{ f.locationdescription }}</p> <p style="">生境描述{{ f.locationdescription }}</p>

View File

@ -10,6 +10,8 @@
</div> </div>
<!-- <div class="title">调查点分布</div>--> <!-- <div class="title">调查点分布</div>-->
<!-- <div style="width: 80%;margin: 0 auto;margin-top: 20px"><div id="map"></div></div>--> <!-- <div style="width: 80%;margin: 0 auto;margin-top: 20px"><div id="map"></div></div>-->
<div class="title">调查点分布</div>
<div style="width: 70%;margin-top: 20px;margin-left:200px;height: 700px"><div id="map" style="height: 500px"></div></div>
<div class="list"> <div class="list">
<template> <template>
<el-table :data="findings_data_list" style="width: 100%"> <el-table :data="findings_data_list" style="width: 100%">
@ -63,36 +65,33 @@
<script> <script>
import axios from 'axios' import axios from 'axios'
import Header from '../../../src/components/Header.vue' import Header from '../../../src/components/Header.vue'
// import 'ol/ol.css' import 'ol/ol.css'
// import Map from 'ol/Map' import Map from 'ol/Map'
// import View from 'ol/View' import { Tile as TileLayer } from 'ol/layer'
// import XYZ from 'ol/source/XYZ' import XYZ from 'ol/source/XYZ'
// import { Tile as TileLayer } from 'ol/layer' import View from 'ol/View'
// import OlFeature from 'ol/Feature' import OlFeature from 'ol/Feature'
// import OlGeomPoint from 'ol/geom/Point' import OlGeomPoint from 'ol/geom/Point'
// import OlLayerVector from 'ol/layer/Vector' import OlLayerVector from 'ol/layer/Vector'
// import OlSourceVector from 'ol/source/Vector' import OlSourceVector from 'ol/source/Vector'
// import echarts from 'echarts'
// import OlFeature from 'ol/Feature'
// import OlGeomPoint from 'ol/geom/Point'
// import OlLayerVector from 'ol/layer/Vector'
// import OlSourceVector from 'ol/source/Vector'
export default { export default {
components: { components: {
Header Header
}, },
data () { data () {
return { return {
findings_data_list: '' findings_data_list: '',
// map: null, map: null,
// findingstask: '', id: this.$route.query.id,
// tableData: '', findingscode: this.$route.query.findingscode,
// marker: '', username: this.$store.state.token,
// point: [], findings: '',
// species_count: '', lon: '',
// findings_count: '', lat: '',
// typical_count: '', point: [],
// enforcement_count: '' marker: '',
survey_type_distribution: '',
findings_data_size: ''
} }
}, },
created: function () { created: function () {
@ -105,6 +104,38 @@ export default {
}).catch(function (error) { }).catch(function (error) {
alert(error) alert(error)
}) })
axios({
method: 'get',
url: this.GLOBAL.baseURL + '/display/findings/distribution'
}).then(function (response) {
console.log(response.data)
// _this.findings = response.data.findings
// _this.lon = response.data.lon
// _this.lat = response.data.lat
// _this.point = [_this.lon, _this.lat]
_this.map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new XYZ({
url: 'http://t0.tianditu.com/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=661147eab2db2ca4e3596de18a46929f'
})
})
],
view: new View({
projection: 'EPSG:4326',
center: _this.point,
zoom: 4.5,
maxZoom: 18
})
})
_this.map.getView().setMaxZoom(18)
_this.map.getView().setMinZoom(3)
// _this.addMarker(_this.point)
// console.log(_this.findings)
}).catch(function (error) {
alert(error)
})
// _this.map = new Map({ // _this.map = new Map({
// target: 'map', // target: 'map',
// layers: [ // layers: [
@ -123,52 +154,28 @@ export default {
// }) // })
// _this.map.getView().setMaxZoom(18) // _this.map.getView().setMaxZoom(18)
// _this.map.getView().setMinZoom(3) // _this.map.getView().setMinZoom(3)
axios({
method: 'get',
url: this.GLOBAL.baseURL + '/display/findings/distribution/'
}).then(function (response) {
console.log(response.data)
_this.marker = response.data.point
console.log(_this.marker)
for (var i = 0; i < _this.marker.length; i++) {
console.log('lat:' + _this.marker[i].lat)
_this.point = [_this.marker[i].lon, _this.marker[i].lat]
console.log(_this.point)
_this.addMarker(_this.point)
}
}).catch(function (error) {
alert(error)
})
// axios({ // axios({
// method: 'get', // method: 'get',
// url: this.GLOBAL.baseURL + '/findings/distribution/' // url: this.GLOBAL.baseURL + '/findings/data/size/86661017-57ac-48ea-8229-3dcdc45fda35'
// }).then(function (response) { // }).then(function (response) {
// _this.marker = response.data.findings_distribution // _this.findings_data_size = response.data.results
// console.log('marker:' + _this.marker) // // _this.FindingsDataSize()
// for (var i = 0; i < _this.marker.length; i++) {
// console.log('lat:' + _this.marker[i].lat)
// _this.point = [_this.marker[i].lon, _this.marker[i].lat]
// _this.addMarker(_this.point)
// }
// }).catch(function (error) {
// alert(error)
// })
// axios({
// method: 'get',
// url: this.GLOBAL.baseURL + '/sampletrees/data/list/'
// }).then(function (response) {
// console.log('response:' + response.data)
// _this.tableData = response.data.sampletrees_data_list
// console.log('data')
// console.log(_this.tableData)
// }).catch(function (error) {
// alert(error)
// })
// axios({
// method: 'get',
// url: this.GLOBAL.baseURL + '/task/distribution/sampletrees/'
// }).then(function (response) {
// //
// _this.findingstask = response.data.sampletrees_list
// console.log(_this.findingstask)
// _this.Findings()
// }).catch(function (error) {
// alert(error)
// })
// axios({
// method: 'get',
// url: this.GLOBAL.baseURL + '/display/sampletrees/species/distribution/'
// }).then(function (response) {
// //
// _this.species_count = response.data.species_count
// _this.findings_count = response.data.findings_count
// _this.typical_count = response.data.typical_count
// _this.enforcement_count = response.data.enforcement_count
// _this.TypicalSpecies()
// }).catch(function (error) { // }).catch(function (error) {
// alert(error) // alert(error)
// }) // })
@ -182,92 +189,22 @@ export default {
id: id id: id
} }
}) })
},
addMarker (point) {
console.log(point)
console.log('addmaker')
var startMarker = new OlFeature({
type: 'icon',
geometry: new OlGeomPoint(point)
})
var vectorLayer = new OlLayerVector({
source: new OlSourceVector({
features: [startMarker]
})
})
this.map.addLayer(vectorLayer)
console.log(vectorLayer)
} }
// Findings () {
// var _this = this
// // domecharts
// const myChart = echarts.init(document.getElementById('findingsEcharts'))
// //
// myChart.setOption({
// // title: { text: ''},
// tooltip: {
// trigger: 'item',
// formatter: '{a} <br/>{b} : {c} ({d}%)'
// },
// legend: {
// orient: 'vertical',
// left: 'right',
// data: _this.findingstask.name
// },
// grid: {
// width: '400px'
// },
// series: [{
// name: '',
// type: 'pie',
// radius: '55%',
// center: ['50%', '60%'],
// data: _this.findingstask,
// // data: [
// // { name: '111', value: 20 },
// // { name: '222', value: 50 }
// // ],
// emphasis: {
// itemStyle: {
// shadowBlur: 10,
// shadowOffsetX: 0,
// shadowColor: 'rgba(0, 0, 0, 0.5)'
// }
// }
// }]
// })
// },
// TypicalSpecies () {
// var _this = this
// // domecharts
// const myChart = echarts.init(document.getElementById('typicalspecies'))
// //
// myChart.setOption({
// xAxis: {
// type: 'category',
// data: ['', '', '', '']
// },
// yAxis: {
// type: 'value'
// },
// grid: {
// width: '300px'
// },
// series: [{
// data: [_this.findings_count, _this.species_count, _this.typical_count, _this.enforcement_count],
// type: 'bar',
// showBackground: true,
// backgroundStyle: {
// color: 'rgba(220, 220, 220, 0.8)'
// }
// }]
// })
// },
// addMarker (point) {
// var startMarker = new OlFeature({
// type: 'icon',
// geometry: new OlGeomPoint(point)
// })
// var vectorLayer = new OlLayerVector({
// source: new OlSourceVector({
// features: [startMarker]
// })
// })
// this.map.addLayer(vectorLayer)
// },
// detailed (index, row) {
// console.log(index, row)
// console.log('11111111222233333')
// console.log(row.id)
// this.$router.push({
// path: '/sampletreesdisplayed?id=' + row.id
// })
// }
} }
} }
</script> </script>

View File

@ -25,6 +25,18 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="title">灌木样方表</div>
<div style="width: 80%;margin: 0 auto;">
<template>
<el-table :data="tableData1" stripe style="width: 90%" height="500">
<el-table-column prop="findingscode" label="调查点编号" width="216"></el-table-column>
<el-table-column prop="smallkindside" label="小样方号" width="216"></el-table-column>
<el-table-column prop="investigators" label="调查者" width="216"></el-table-column>
<el-table-column prop="date" label="调查日期" width="216"></el-table-column>
<el-table-column prop="site" label="地点名称" width="216"></el-table-column>
</el-table>
</template>
</div>
<div class="title">灌木数据表</div> <div class="title">灌木数据表</div>
<div style="width: 80%;margin: 0 auto;"> <div style="width: 80%;margin: 0 auto;">
<template> <template>
@ -81,6 +93,7 @@ export default {
return { return {
map: null, map: null,
tableData: '', tableData: '',
tableData1: '',
findingstask: '', findingstask: '',
species_count: '', species_count: '',
findings_count: '', findings_count: '',
@ -132,6 +145,18 @@ export default {
}).catch(function (error) { }).catch(function (error) {
alert(error) alert(error)
}) })
//
axios({
method: 'get',
url: this.GLOBAL.baseURL + '/display/samplebush/smallkindside/'
}).then(function (response) {
console.log(response.data)
_this.tableData1 = response.data.samplebush_smallkindside
console.log('data')
console.log(_this.tableData)
}).catch(function (error) {
alert(error)
})
axios({ axios({
method: 'get', method: 'get',
url: this.GLOBAL.baseURL + '/task/distribution/samplebush/' url: this.GLOBAL.baseURL + '/task/distribution/samplebush/'

View File

@ -25,6 +25,18 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="title">草本样方表</div>
<div style="width: 80%;margin: 0 auto;">
<template>
<el-table :data="tableData1" stripe style="width: 90%" height="500">
<el-table-column prop="findingscode" label="调查点编号" width="216"></el-table-column>
<el-table-column prop="smallkindside" label="小样方号" width="216"></el-table-column>
<el-table-column prop="investigators" label="调查者" width="216"></el-table-column>
<el-table-column prop="date" label="调查日期" width="216"></el-table-column>
<el-table-column prop="site" label="地点名称" width="222"></el-table-column>
</el-table>
</template>
</div>
<div class="title">草本数据表</div> <div class="title">草本数据表</div>
<div style="width: 80%;margin: 0 auto;"> <div style="width: 80%;margin: 0 auto;">
<template> <template>
@ -80,6 +92,7 @@ export default {
return { return {
map: null, map: null,
tableData: '', tableData: '',
tableData1: '',
species_count: '', species_count: '',
findings_count: '', findings_count: '',
typical_count: '', typical_count: '',
@ -129,6 +142,18 @@ export default {
}).catch(function (error) { }).catch(function (error) {
alert(error) alert(error)
}) })
//
axios({
method: 'get',
url: this.GLOBAL.baseURL + '/display/sampleherbal/smallkindside/'
}).then(function (response) {
console.log(response.data)
_this.tableData1 = response.data.sampleherbal_smallkindside
console.log('data')
console.log(_this.tableData1)
}).catch(function (error) {
alert(error)
})
axios({ axios({
method: 'get', method: 'get',
url: this.GLOBAL.baseURL + '/task/distribution/sampleherbal/' url: this.GLOBAL.baseURL + '/task/distribution/sampleherbal/'

View File

@ -25,6 +25,17 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="title">乔木样方表</div>
<div style="width: 80%;margin: 0 auto;">
<template>
<el-table :data="tableData1" stripe style="width: 90%" height="500">
<el-table-column prop="findingscode" label="调查点编号" width="270"></el-table-column>
<el-table-column prop="investigators" label="调查者" width="270"></el-table-column>
<el-table-column prop="date" label="调查日期" width="270"></el-table-column>
<el-table-column prop="site" label="地点名称" width="276"></el-table-column>
</el-table>
</template>
</div>
<div class="title">乔木数据表</div> <div class="title">乔木数据表</div>
<div style="width: 80%;margin: 0 auto;"> <div style="width: 80%;margin: 0 auto;">
<template> <template>
@ -81,6 +92,7 @@ export default {
map: null, map: null,
findingstask: '', findingstask: '',
tableData: '', tableData: '',
tableData1: '',
marker: '', marker: '',
point: [], point: [],
species_count: '', species_count: '',
@ -114,10 +126,12 @@ export default {
url: this.GLOBAL.baseURL + '/findings/distribution/' url: this.GLOBAL.baseURL + '/findings/distribution/'
}).then(function (response) { }).then(function (response) {
_this.marker = response.data.findings_distribution _this.marker = response.data.findings_distribution
console.log('marker:' + _this.marker) console.log(_this.marker)
// console.log('marker:' + _this.marker)
for (var i = 0; i < _this.marker.length; i++) { for (var i = 0; i < _this.marker.length; i++) {
console.log('lat:' + _this.marker[i].lat) console.log('lat:' + _this.marker[i].lat)
_this.point = [_this.marker[i].lon, _this.marker[i].lat] _this.point = [_this.marker[i].lon, _this.marker[i].lat]
console.log(_this.point)
_this.addMarker(_this.point) _this.addMarker(_this.point)
} }
}).catch(function (error) { }).catch(function (error) {
@ -134,6 +148,18 @@ export default {
}).catch(function (error) { }).catch(function (error) {
alert(error) alert(error)
}) })
//
axios({
method: 'get',
url: this.GLOBAL.baseURL + '/display/sampletrees/findings/data/'
}).then(function (response) {
console.log(response.data)
_this.tableData1 = response.data.sampletrees_findings_data
console.log('data')
console.log(_this.tableData)
}).catch(function (error) {
alert(error)
})
axios({ axios({
method: 'get', method: 'get',
url: this.GLOBAL.baseURL + '/task/distribution/sampletrees/' url: this.GLOBAL.baseURL + '/task/distribution/sampletrees/'
@ -254,6 +280,7 @@ export default {
// }) // })
}) })
this.map.addLayer(vectorLayer) this.map.addLayer(vectorLayer)
console.log(vectorLayer)
}, },
detailed (index, row) { detailed (index, row) {
console.log(index, row) console.log(index, row)