up
This commit is contained in:
@ -9,17 +9,27 @@ export function getarea(query) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getTownship() {
|
||||
export function getTownship(query) {
|
||||
return request({
|
||||
url: 'http://121.36.229.60:9080/geoserver/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_town&maxFeatures=50&outputFormat=application%2Fjson',
|
||||
url: 'crops/administrative',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getvillage() {
|
||||
export function getcropTypeStatistics(query) { //作物类型统计百分比
|
||||
return request({
|
||||
url: 'http://121.36.229.60:9080/geoserver/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_village&maxFeatures=1180&outputFormat=application%2Fjson',
|
||||
url: 'crops/cropTypeStatistics',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getvillage(query) {
|
||||
return request({
|
||||
url: 'crops/administrativeDivisions',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@ -37,3 +47,20 @@ export function dow() {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function getcropper(query) { //作物分类面积统计
|
||||
return request({
|
||||
url: 'crops/cropper',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function gethighStandard(query) { //高标准农田
|
||||
return request({
|
||||
url: 'crops/highStandard',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
40
src/api/crops/site.js
Normal file
40
src/api/crops/site.js
Normal file
@ -0,0 +1,40 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getfarmland(query) { //作物长势等级面积统计
|
||||
return request({
|
||||
url: 'crops/farmland',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function getstatistics(query) { //作物长势等级面积占比
|
||||
return request({
|
||||
url: 'crops/statistics',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function gethighStandards(query) { //高标准农田统计
|
||||
return request({
|
||||
url: 'crops/highStandards',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getgradeStatistics(query) { //镇
|
||||
return request({
|
||||
url: 'crops/gradeStatistics',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getadministrativeDivisions(query) { //村
|
||||
return request({
|
||||
url: 'crops/administrativeDivisions',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
26
src/api/meteorological/remoteSense/FloodExtraction.js
Normal file
26
src/api/meteorological/remoteSense/FloodExtraction.js
Normal file
@ -0,0 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
export function getyears(query) { //干旱等级面积统计
|
||||
return request({
|
||||
url: 'equipment/damageArea',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getequipment(query) { //农作物受灾面积占比
|
||||
return request({
|
||||
url: 'equipment/proportion',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function gethighStandard(query) { //洪涝面积统计高标准农田
|
||||
return request({
|
||||
url: 'equipment/highStandard',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
46
src/api/meteorological/remoteSense/drought.js
Normal file
46
src/api/meteorological/remoteSense/drought.js
Normal file
@ -0,0 +1,46 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
export function getareaStatisticsDrought(query) { //干旱等级面积统计
|
||||
return request({
|
||||
url: 'equipment/areaStatisticsDrought',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getproportionOfArea(query) { //干旱等级面积占比
|
||||
return request({
|
||||
url: 'equipment/proportionOfArea',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function geteachFreezingGradeArea(query) { //高标准农田干旱等级面积占比
|
||||
return request({
|
||||
url: 'equipment/statisticsOfArea',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function getTownship(query) {//镇
|
||||
return request({
|
||||
url: 'equipment/township',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function getadministrative(query) {//村
|
||||
return request({
|
||||
url: 'equipment/administrative',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function getgarrison() {//镇的地图服务
|
||||
return request({
|
||||
url: 'http://121.36.229.60:9080/geoserver/shuzisannong/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=shuzisannong%3Ahuangdaoqu_town&maxFeatures=50&outputFormat=application%2Fjson',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
25
src/api/meteorological/remoteSense/estimate.js
Normal file
25
src/api/meteorological/remoteSense/estimate.js
Normal file
@ -0,0 +1,25 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
export function getytyphoon(query) { //默认台风
|
||||
return request({
|
||||
url: 'equipment/typhoon',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getyear(query) { //年
|
||||
return request({
|
||||
url: 'equipment/year',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function getndPower(query) { //台风
|
||||
return request({
|
||||
url: 'equipment/windPower',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
41
src/api/meteorological/remoteSense/freeze.js
Normal file
41
src/api/meteorological/remoteSense/freeze.js
Normal file
@ -0,0 +1,41 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
export function getstatisticsOfTheArea(query) { //冷冻等级面积统计
|
||||
return request({
|
||||
url: 'equipment/statisticsOfTheArea',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function getproportionOfArea(query) { //冷冻等级面积占比
|
||||
return request({
|
||||
url: 'equipment/proportionOfTheArea',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function geteachFreezingGradeArea(query) { //高标准农田冷冻等级面积统计
|
||||
return request({
|
||||
url: 'equipment/eachFreezingGradeArea',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getTownship(query) { //镇
|
||||
return request({
|
||||
url: 'equipment/townshipArea',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getadministrative(query) { //村
|
||||
return request({
|
||||
url: 'equipment/administrativeArea',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -42,4 +42,33 @@ export function detectionLightsEquipment(query) { //虫子设备
|
||||
})
|
||||
}
|
||||
|
||||
export function soilEquipment(query) { //土壤设备
|
||||
return request({
|
||||
url: 'equipment/soilEquipment',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getsporeEquipmentCondition(query) { //孢子设备信息
|
||||
return request({
|
||||
url: 'equipment/sporeEquipmentCondition',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function getequipmentCondition(query) { //土壤设备信息
|
||||
return request({
|
||||
url: 'equipment/equipmentCondition',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function geteqLightEquipmentCondition(query) { //虫情设备信息
|
||||
return request({
|
||||
url: 'equipment/eqLightEquipmentCondition',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
BIN
src/assets/images/open2.png
Normal file
BIN
src/assets/images/open2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 655 B |
@ -1,185 +1,194 @@
|
||||
<template>
|
||||
<div class="navbar">
|
||||
<!-- <hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> -->
|
||||
<!-- <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!settingsStore.topNav" /> -->
|
||||
<logo />
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav" />
|
||||
<div class="right-menu">
|
||||
<template v-if="appStore.device !== 'mobile'">
|
||||
<header-search id="header-search" class="right-menu-item" />
|
||||
<div class="navbar">
|
||||
<!-- <hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> -->
|
||||
<!-- <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!settingsStore.topNav" /> -->
|
||||
<logo />
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav" />
|
||||
<div class="right-menu">
|
||||
<template v-if="appStore.device !== 'mobile'">
|
||||
<!-- <header-search id="header-search" class="right-menu-item" /> -->
|
||||
|
||||
<el-button class="mode">列表模式</el-button>
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
|
||||
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
||||
<!-- <el-tooltip content="布局大小" effect="dark" placement="bottom">
|
||||
<size-select id="size-select" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<div class="avatar-container">
|
||||
<el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
<img :src="userStore.avatar" class="user-avatar" />
|
||||
<el-icon><caret-bottom /></el-icon>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<router-link to="/user/profile">
|
||||
<el-dropdown-item>个人中心</el-dropdown-item>
|
||||
</router-link>
|
||||
<el-dropdown-item command="setLayout">
|
||||
<span>布局设置</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided command="logout">
|
||||
<span>退出登录</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</el-tooltip> -->
|
||||
</template>
|
||||
<div class="avatar-container">
|
||||
<el-dropdown
|
||||
@command="handleCommand"
|
||||
class="right-menu-item hover-effect"
|
||||
trigger="click"
|
||||
>
|
||||
<div class="avatar-wrapper">
|
||||
<img :src="userStore.avatar" class="user-avatar" />
|
||||
<el-icon><caret-bottom /></el-icon>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<router-link to="/user/profile">
|
||||
<el-dropdown-item>个人中心</el-dropdown-item>
|
||||
</router-link>
|
||||
<el-dropdown-item command="setLayout">
|
||||
<span>布局设置</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided command="logout">
|
||||
<span>退出登录</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import TopNav from '@/components/TopNav'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
import Screenfull from '@/components/Screenfull'
|
||||
import SizeSelect from '@/components/SizeSelect'
|
||||
import HeaderSearch from '@/components/HeaderSearch'
|
||||
import RuoYiGit from '@/components/RuoYi/Git'
|
||||
import RuoYiDoc from '@/components/RuoYi/Doc'
|
||||
import useAppStore from '@/store/modules/app'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
import Logo from '@/layout/components/Sidebar/Logo.vue'
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import Breadcrumb from '@/components/Breadcrumb';
|
||||
import TopNav from '@/components/TopNav';
|
||||
import Hamburger from '@/components/Hamburger';
|
||||
import Screenfull from '@/components/Screenfull';
|
||||
import SizeSelect from '@/components/SizeSelect';
|
||||
import HeaderSearch from '@/components/HeaderSearch';
|
||||
import RuoYiGit from '@/components/RuoYi/Git';
|
||||
import RuoYiDoc from '@/components/RuoYi/Doc';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import useSettingsStore from '@/store/modules/settings';
|
||||
import Logo from '@/layout/components/Sidebar/Logo.vue';
|
||||
|
||||
const appStore = useAppStore()
|
||||
const userStore = useUserStore()
|
||||
const settingsStore = useSettingsStore()
|
||||
const appStore = useAppStore();
|
||||
const userStore = useUserStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
|
||||
function toggleSideBar() {
|
||||
appStore.toggleSideBar()
|
||||
appStore.toggleSideBar();
|
||||
}
|
||||
|
||||
function handleCommand(command) {
|
||||
switch (command) {
|
||||
case "setLayout":
|
||||
setLayout();
|
||||
break;
|
||||
case "logout":
|
||||
logout();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (command) {
|
||||
case 'setLayout':
|
||||
setLayout();
|
||||
break;
|
||||
case 'logout':
|
||||
logout();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function logout() {
|
||||
ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
userStore.logOut().then(() => {
|
||||
location.href = '/index';
|
||||
ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
}).catch(() => { });
|
||||
.then(() => {
|
||||
userStore.logOut().then(() => {
|
||||
location.href = '/index';
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
const emits = defineEmits(['setLayout'])
|
||||
const emits = defineEmits(['setLayout']);
|
||||
function setLayout() {
|
||||
emits('setLayout');
|
||||
emits('setLayout');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
<style lang="scss" scoped>
|
||||
.navbar {
|
||||
height: 64px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
||||
height: 64px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
||||
|
||||
.hamburger-container {
|
||||
line-height: 46px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.025);
|
||||
}
|
||||
}
|
||||
|
||||
.breadcrumb-container {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.topmenu-container {
|
||||
position: absolute;
|
||||
left: 50px;
|
||||
}
|
||||
|
||||
.errLog-container {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.right-menu {
|
||||
float: right;
|
||||
height: 100%;
|
||||
line-height: 50px;
|
||||
display: flex;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.right-menu-item {
|
||||
display: inline-block;
|
||||
padding: 0 8px;
|
||||
height: 100%;
|
||||
font-size: 18px;
|
||||
color: #5a5e66;
|
||||
vertical-align: text-bottom;
|
||||
|
||||
&.hover-effect {
|
||||
.hamburger-container {
|
||||
line-height: 46px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.025);
|
||||
background: rgba(0, 0, 0, 0.025);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
margin-right: 40px;
|
||||
|
||||
.avatar-wrapper {
|
||||
margin-top: 5px;
|
||||
position: relative;
|
||||
|
||||
.user-avatar {
|
||||
cursor: pointer;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: -20px;
|
||||
top: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
.breadcrumb-container {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.topmenu-container {
|
||||
position: absolute;
|
||||
left: 50px;
|
||||
}
|
||||
|
||||
.errLog-container {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.right-menu {
|
||||
float: right;
|
||||
height: 100%;
|
||||
line-height: 50px;
|
||||
display: flex;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
.mode{
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.right-menu-item {
|
||||
display: inline-block;
|
||||
padding: 0 8px;
|
||||
height: 100%;
|
||||
font-size: 18px;
|
||||
color: #5a5e66;
|
||||
vertical-align: text-bottom;
|
||||
|
||||
&.hover-effect {
|
||||
cursor: pointer;
|
||||
transition: background 0.3s;
|
||||
|
||||
&:hover {
|
||||
background: rgba(0, 0, 0, 0.025);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
margin-right: 40px;
|
||||
|
||||
.avatar-wrapper {
|
||||
margin-top: 5px;
|
||||
position: relative;
|
||||
|
||||
.user-avatar {
|
||||
cursor: pointer;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: -20px;
|
||||
top: 25px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
25
src/utils/download.js
Normal file
25
src/utils/download.js
Normal file
@ -0,0 +1,25 @@
|
||||
//引入download,这是若依框架自带的,在utils/request里面封装好的方法
|
||||
import {download} from "@/utils/request";
|
||||
|
||||
/**
|
||||
* 下载文件
|
||||
* @param value value是文件的路径,就是你正常存到数据里的那个参数/profile/upload什么的
|
||||
* 整体代码都不需要变,你只需要调用这个我写的downLoadFile(value)函数,在点击下载按钮的时候,通过@click方法调用这个函数,传入那个文件路径就行,文件路径就是若依框架的/profile/upload/日期/文件名那个路径,这个路径看不懂就不要用了!
|
||||
*/
|
||||
export function downLoadFile(value){
|
||||
console.log(111);
|
||||
//根据文件路径参数,按斜杠进行分割,取得文件名,这是download函数需要的第三个参数
|
||||
let list = value.split("/");
|
||||
let fileName = list[list.length-1];
|
||||
//这是文件路径参数,因为download函数需要传三个参数,这是第二个参数
|
||||
let params = {
|
||||
resource:value
|
||||
}
|
||||
/** request里面的download下载函数 */
|
||||
//download函数是若依自带的,第一个参数是请求的url路径,不需要变,这个路径下的controller后台方法也是若依写好封装好了的。
|
||||
console.log(params);
|
||||
console.log(fileName);
|
||||
download("/common/download/resource", params, fileName);
|
||||
console.log("文件名");
|
||||
console.log("value");
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user