This commit is contained in:
slaughter 2020-05-12 16:15:38 +08:00
commit 1ebc41928b
6 changed files with 114 additions and 102 deletions

View File

@ -44,12 +44,12 @@
</el-table-column> </el-table-column>
<el-table-column label="气象" width="90"> <el-table-column label="气象" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.resultsweather }}</span><span style="margin-left: 5px" @click="weather(scope.row.findingscode)"><i class="el-icon-circle-plus"></i></span><span style="margin-left: 5px"><i class="el-icon-edit"></i></span> <span style="margin-left: 10px">{{ scope.row.resultsweather }}</span><span style="margin-left: 5px" @click="weather(scope.row.findingscode)"><i class="el-icon-circle-plus"></i></span><span style="margin-left: 5px" @click="weatherupdate(scope.row.findingscode)"><i class="el-icon-edit"></i></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="土地利用" width="90"> <el-table-column label="土地利用" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.resultslanduse }}</span><span style="margin-left: 5px" @click="landuse(scope.row.findingscode)"><i class="el-icon-circle-plus"></i></span><span style="margin-left: 5px"><i class="el-icon-edit"></i></span> <span style="margin-left: 10px">{{ scope.row.resultslanduse }}</span><span style="margin-left: 5px" @click="landuse(scope.row.findingscode)"><i class="el-icon-circle-plus"></i></span><span style="margin-left: 5px" @click="landuseupdate(scope.row.findingscode)"><i class="el-icon-edit"></i></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="无人机照片" width="90"> <el-table-column label="无人机照片" width="90">
@ -265,6 +265,16 @@ export default {
} }
}) })
}, },
weatherupdate (findingscode) {
var _this = this
console.log(findingscode)
_this.$router.push({
path: '/weather/update',
query: {
findingscode: findingscode
}
})
},
// //
landuse (findingscode) { landuse (findingscode) {
var _this = this var _this = this
@ -276,6 +286,16 @@ export default {
} }
}) })
}, },
landuseupdate (findingscode) {
var _this = this
console.log(findingscode)
_this.$router.push({
path: '/landuse/update',
query: {
findingscode: findingscode
}
})
},
// //
UAVphotos (findingscode) { UAVphotos (findingscode) {
var _this = this var _this = this

View File

@ -6,21 +6,19 @@
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>数据</el-breadcrumb-item> <el-breadcrumb-item>数据</el-breadcrumb-item>
<el-breadcrumb-item>DNA</el-breadcrumb-item> <el-breadcrumb-item>土地利用</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<div class="tasktitle">DNA数据列表</div> <div class="tasktitle">土地利用数据列表</div>
<div class="list" > <div class="list" >
<template> <template>
<el-table :data="barcodes" style="width: 100%"> <el-table :data="landuse" style="width: 100%">
<el-table-column prop="findingscode" label="调查点编号" width="120"></el-table-column> <el-table-column prop="findings" label="调查点编号" width="120"></el-table-column>
<el-table-column prop="chinesename" label="植物名称"></el-table-column> <el-table-column prop="typelanduse" label="土地利用类型"></el-table-column>
<el-table-column prop="latinname" label="拉丁名"></el-table-column> <el-table-column prop="arealanduse" label="土地利用面积"></el-table-column>
<el-table-column prop="dna_1" label="条形码代码1"></el-table-column> <el-table-column prop="typelandcover" label="土地覆盖类型"></el-table-column>
<el-table-column prop="dna_2" label="条形码代码2"></el-table-column> <el-table-column prop="arealandcover" label="土地覆盖面积"></el-table-column>
<el-table-column prop="dna_3" label="条形码代码3"></el-table-column> <el-table-column prop="ph" label="酸碱度"></el-table-column>
<el-table-column prop="dna_4" label="条形码代码4"></el-table-column>
<el-table-column prop="dna_5" label="条形码代码5"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" @click="update(scope.row.id)">编辑</el-button> <el-button size="mini" @click="update(scope.row.id)">编辑</el-button>
@ -52,7 +50,7 @@ export default {
}, },
data () { data () {
return { return {
barcodes: '', landuse: '',
findingscode: this.$route.query.findingscode findingscode: this.$route.query.findingscode
} }
}, },
@ -60,9 +58,9 @@ export default {
var _this = this var _this = this
axios({ axios({
method: 'get', method: 'get',
url: this.GLOBAL.baseURL + '/barcodes/search/?findingscode=' + _this.findingscode url: this.GLOBAL.baseURL + '/landuse/search/?findingscode=' + _this.findingscode
}).then(function (response) { }).then(function (response) {
_this.barcodes = response.data.barcodes _this.landuse = response.data.landuse
}).catch(function (error) { }).catch(function (error) {
alert(error) alert(error)
}) })
@ -72,7 +70,7 @@ export default {
console.log('id=' + id) console.log('id=' + id)
var _this = this var _this = this
_this.$router.push({ _this.$router.push({
path: '/barcodes/update/from', path: '/landuse/update/from',
query: { query: {
id: id id: id
} }
@ -82,7 +80,7 @@ export default {
console.log(id) console.log(id)
axios({ axios({
method: 'get', method: 'get',
url: this.GLOBAL.baseURL + '/barcodes/delete/' + id url: this.GLOBAL.baseURL + '/landuse/delete/' + id
}).then(function (response) { }).then(function (response) {
if (response.data.status === '1') { if (response.data.status === '1') {
window.location.reload() window.location.reload()

View File

@ -5,32 +5,26 @@
<div class="breadcrumb"> <div class="breadcrumb">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>DNA</el-breadcrumb-item> <el-breadcrumb-item>土地利用</el-breadcrumb-item>
<el-breadcrumb-item>修改</el-breadcrumb-item> <el-breadcrumb-item>修改</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<div class="from"> <div class="from">
<el-form ref="form" :model="form" label-width="80px"> <el-form ref="form" :model="form" label-width="80px">
<el-form-item label="植物种名称"> <el-form-item label="土地利用类型">
<el-input v-model="form.chinesename" clearable></el-input> <el-input v-model="form.typelanduse" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="拉丁名"> <el-form-item label="土地利用面积">
<el-input v-model="form.latinname" clearable></el-input> <el-input v-model="form.arealanduse" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="条形码代码1"> <el-form-item label="土地覆盖类型">
<el-input v-model="form.dna_1" clearable></el-input> <el-input v-model="form.typelandcover" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="条形码代码2"> <el-form-item label="土地覆盖面积">
<el-input v-model="form.dna_2" clearable></el-input> <el-input v-model="form.arealandcover" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="条形码代码3"> <el-form-item label="酸碱度">
<el-input v-model="form.dna_3" clearable></el-input> <el-input v-model="form.ph" clearable></el-input>
</el-form-item>
<el-form-item label="条形码代码4">
<el-input v-model="form.dna_4" clearable></el-input>
</el-form-item>
<el-form-item label="条形码代码5">
<el-input v-model="form.dna_5" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="update()">提交修改</el-button> <el-button type="primary" @click="update()">提交修改</el-button>
@ -54,14 +48,11 @@ export default {
id: this.$route.query.id, id: this.$route.query.id,
username: this.$store.state.token, username: this.$store.state.token,
form: { form: {
id: '', typelanduse: '',
chinesename: '', arealanduse: '',
latinname: '', typelandcover: '',
dna_1: '', arealandcover: '',
dna_2: '', ph: ''
dna_3: '',
dna_4: '',
dna_5: ''
} }
} }
}, },
@ -70,17 +61,15 @@ export default {
console.log(_this.id) console.log(_this.id)
axios({ axios({
method: 'get', method: 'get',
url: this.GLOBAL.baseURL + '/barcodes/update/' + _this.id url: this.GLOBAL.baseURL + '/landuse/update/' + _this.id
}).then(function (response) { }).then(function (response) {
console.log('response:' + response.data) console.log('response:' + response.data)
_this.form.id = response.data.id _this.form.id = response.data.id
_this.form.chinesename = response.data.chinesename _this.form.typelanduse = response.data.typelanduse
_this.form.latinname = response.data.latinname _this.form.arealanduse = response.data.arealanduse
_this.form.dna_1 = response.data.dna_1 _this.form.typelandcover = response.data.typelandcover
_this.form.dna_2 = response.data.dna_2 _this.form.arealandcover = response.data.arealandcover
_this.form.dna_3 = response.data.dna_3 _this.form.ph = response.data.ph
_this.form.dna_4 = response.data.dna_4
_this.form.dna_5 = response.data.dna_5
}).catch(function (error) { }).catch(function (error) {
alert(error) alert(error)
}) })
@ -91,7 +80,7 @@ export default {
console.log(_this.id) console.log(_this.id)
axios({ axios({
method: 'post', method: 'post',
url: this.GLOBAL.baseURL + '/barcodes/update/' + _this.id + '/', url: this.GLOBAL.baseURL + '/landuse/update/' + _this.id + '/',
data: { data: {
form: _this.form, form: _this.form,
username: _this.username username: _this.username

View File

@ -292,7 +292,8 @@ export default {
files: _this.files, files: _this.files,
upload: _this.upload, upload: _this.upload,
form: _this.form, form: _this.form,
username: _this.username username: _this.username,
findingscode: _this.findingscode
} }
}).then(function (response) { }).then(function (response) {
_this.name_list = response.data.name_choices _this.name_list = response.data.name_choices

View File

@ -6,21 +6,22 @@
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>数据</el-breadcrumb-item> <el-breadcrumb-item>数据</el-breadcrumb-item>
<el-breadcrumb-item>DNA</el-breadcrumb-item> <el-breadcrumb-item>气象</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<div class="tasktitle">DNA数据列表</div> <div class="tasktitle">气象数据列表</div>
<div class="list" > <div class="list" >
<template> <template>
<el-table :data="barcodes" style="width: 100%"> <el-table :data="weather" style="width: 100%">
<el-table-column prop="findingscode" label="调查点编号" width="120"></el-table-column> <el-table-column prop="findings" label="调查点编号" width="120"></el-table-column>
<el-table-column prop="chinesename" label="植物名称"></el-table-column> <el-table-column prop="month" label="月降水量"></el-table-column>
<el-table-column prop="latinname" label="拉丁名"></el-table-column> <el-table-column prop="year" label="年降水量"></el-table-column>
<el-table-column prop="dna_1" label="条形码代码1"></el-table-column> <el-table-column prop="max" label="最大降水量"></el-table-column>
<el-table-column prop="dna_2" label="条形码代码2"></el-table-column> <el-table-column prop="min" label="最小降水量"></el-table-column>
<el-table-column prop="dna_3" label="条形码代码3"></el-table-column> <el-table-column prop="averagetemperature" label="月均温"></el-table-column>
<el-table-column prop="dna_4" label="条形码代码4"></el-table-column> <el-table-column prop="annualtemperature" label="年均温"></el-table-column>
<el-table-column prop="dna_5" label="条形码代码5"></el-table-column> <!-- <el-table-column prop="temperaturemin" label="年最低温度"></el-table-column>-->
<!-- <el-table-column prop="temperaturemax" label="年最高温度"></el-table-column>-->
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" @click="update(scope.row.id)">编辑</el-button> <el-button size="mini" @click="update(scope.row.id)">编辑</el-button>
@ -52,7 +53,7 @@ export default {
}, },
data () { data () {
return { return {
barcodes: '', weather: '',
findingscode: this.$route.query.findingscode findingscode: this.$route.query.findingscode
} }
}, },
@ -60,9 +61,9 @@ export default {
var _this = this var _this = this
axios({ axios({
method: 'get', method: 'get',
url: this.GLOBAL.baseURL + '/barcodes/search/?findingscode=' + _this.findingscode url: this.GLOBAL.baseURL + '/weather/search/?findingscode=' + _this.findingscode
}).then(function (response) { }).then(function (response) {
_this.barcodes = response.data.barcodes _this.weather = response.data.weather
}).catch(function (error) { }).catch(function (error) {
alert(error) alert(error)
}) })
@ -72,7 +73,7 @@ export default {
console.log('id=' + id) console.log('id=' + id)
var _this = this var _this = this
_this.$router.push({ _this.$router.push({
path: '/barcodes/update/from', path: '/weather/update/from',
query: { query: {
id: id id: id
} }
@ -82,7 +83,7 @@ export default {
console.log(id) console.log(id)
axios({ axios({
method: 'get', method: 'get',
url: this.GLOBAL.baseURL + '/barcodes/delete/' + id url: this.GLOBAL.baseURL + '/weather/delete/' + id
}).then(function (response) { }).then(function (response) {
if (response.data.status === '1') { if (response.data.status === '1') {
window.location.reload() window.location.reload()

View File

@ -5,32 +5,35 @@
<div class="breadcrumb"> <div class="breadcrumb">
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>DNA</el-breadcrumb-item> <el-breadcrumb-item>气象</el-breadcrumb-item>
<el-breadcrumb-item>修改</el-breadcrumb-item> <el-breadcrumb-item>修改</el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<div class="from"> <div class="from">
<el-form ref="form" :model="form" label-width="80px"> <el-form ref="form" :model="form" label-width="80px">
<el-form-item label="植物种名称"> <el-form-item label="月降水量">
<el-input v-model="form.chinesename" clearable></el-input> <el-input v-model="form.month" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="拉丁名"> <el-form-item label="年降水量">
<el-input v-model="form.latinname" clearable></el-input> <el-input v-model="form.year" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="条形码代码1"> <el-form-item label="最大降水量">
<el-input v-model="form.dna_1" clearable></el-input> <el-input v-model="form.max" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="条形码代码2"> <el-form-item label="最小降水量">
<el-input v-model="form.dna_2" clearable></el-input> <el-input v-model="form.min" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="条形码代码3"> <el-form-item label="月均温">
<el-input v-model="form.dna_3" clearable></el-input> <el-input v-model="form.averagetemperature" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="条形码代码4"> <el-form-item label="年均温">
<el-input v-model="form.dna_4" clearable></el-input> <el-input v-model="form.annualtemperature" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="条形码代码5"> <el-form-item label="年最低温度">
<el-input v-model="form.dna_5" clearable></el-input> <el-input v-model="form.temperaturemin" clearable></el-input>
</el-form-item>
<el-form-item label="年最高温度">
<el-input v-model="form.temperaturemax" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="update()">提交修改</el-button> <el-button type="primary" @click="update()">提交修改</el-button>
@ -54,14 +57,14 @@ export default {
id: this.$route.query.id, id: this.$route.query.id,
username: this.$store.state.token, username: this.$store.state.token,
form: { form: {
id: '', month: '',
chinesename: '', year: '',
latinname: '', max: '',
dna_1: '', min: '',
dna_2: '', averagetemperature: '',
dna_3: '', annualtemperature: '',
dna_4: '', temperaturemin: '',
dna_5: '' temperaturemax: ''
} }
} }
}, },
@ -70,17 +73,17 @@ export default {
console.log(_this.id) console.log(_this.id)
axios({ axios({
method: 'get', method: 'get',
url: this.GLOBAL.baseURL + '/barcodes/update/' + _this.id url: this.GLOBAL.baseURL + '/weather/update/' + _this.id
}).then(function (response) { }).then(function (response) {
console.log('response:' + response.data) console.log('response:' + response.data)
_this.form.id = response.data.id _this.form.month = response.data.month
_this.form.chinesename = response.data.chinesename _this.form.year = response.data.year
_this.form.latinname = response.data.latinname _this.form.max = response.data.max
_this.form.dna_1 = response.data.dna_1 _this.form.min = response.data.min
_this.form.dna_2 = response.data.dna_2 _this.form.averagetemperature = response.data.averagetemperature
_this.form.dna_3 = response.data.dna_3 _this.form.annualtemperature = response.data.annualtemperature
_this.form.dna_4 = response.data.dna_4 _this.form.temperaturemin = response.data.temperaturemin
_this.form.dna_5 = response.data.dna_5 _this.form.temperaturemax = response.data.temperaturemax
}).catch(function (error) { }).catch(function (error) {
alert(error) alert(error)
}) })
@ -91,7 +94,7 @@ export default {
console.log(_this.id) console.log(_this.id)
axios({ axios({
method: 'post', method: 'post',
url: this.GLOBAL.baseURL + '/barcodes/update/' + _this.id + '/', url: this.GLOBAL.baseURL + '/weather/update/' + _this.id + '/',
data: { data: {
form: _this.form, form: _this.form,
username: _this.username username: _this.username