This commit is contained in:
2023-05-05 16:32:31 +08:00
parent 7907a06dad
commit 10dde79643
194 changed files with 4493 additions and 266 deletions

View File

@ -2,7 +2,9 @@
<VScaleScreen width="100%" height="100%">
<div class="center">
<Headers />
<navbar v-if="Route.path!=='/login'" @setLayout="setLayout" />
<router-view />
<settings ref="settingRef" />
</div>
</VScaleScreen>
</template>
@ -12,13 +14,20 @@ import useSettingsStore from '@/store/modules/settings';
import { handleThemeStyle } from '@/utils/theme';
import VScaleScreen from 'v-scale-screen';
import Headers from '@/components/heades/index';
import { AppMain, Navbar, Settings, TagsView } from '@/layout/components'
import { useRoute } from 'vue-router';
const Route = useRoute();
console.log(Route.path);
onMounted(() => {
nextTick(() => {
// 初始化主题样式
handleThemeStyle(useSettingsStore().theme);
});
});
const settingRef = ref(null);
function setLayout() {
settingRef.value.openSetting();
}
</script>
<style lang="scss" scoped>
.center {

View File

@ -16,10 +16,10 @@
transition: width 0.28s;
width: $base-sidebar-width !important;
background-color: $base-menu-background;
height: 100%;
height: calc(100% - 50px);
position: fixed;
font-size: 0px;
top: 0;
bottom: 0;
left: 0;
z-index: 1001;

View File

@ -31,12 +31,15 @@ onMounted(() => {
});
//隐藏导航栏
const max = () => {
navbar.style.display = 'none';
app_main.style.height = '100%';
headers.style.transform = `translate(0, 0)`;
leftment.style.display = 'none';
main_container.style.marginLeft = '0';
document.querySelector('.leftWra').style.top = '80px';
document.querySelector('.navDiv').style.display = 'none';
document.querySelector('.navbar').style.display = 'none';
document.querySelector('.app-main').style.height = '100%';
document.querySelector('.headers').style.transform = `translate(0, 0)`;
document.querySelector('.leftment').style.display = 'none';
document.querySelector('.main-container').style.marginLeft = '0';
document.querySelector('.leftWra')
? (document.querySelector('.leftWra').style.top = '80px')
: '';
document.querySelector('.rightWra').style.top = '80px';
// settingsStore.changeSetting({ key: 'topNav', value: flag.value });
};

View File

@ -26,9 +26,12 @@ onMounted(() => {
});
const exitMaximize = () => {
document.querySelector('.navDiv').style.display = '';
document.querySelector('.navbar').style.display = '';
document.querySelector('.app-main').style.height = 'calc(100% - 50px)';
document.querySelector('.headers').style.transform = `translate(0, -100%)`;
document.querySelector('.leftWra').style.top = '10px';
document.querySelector('.leftWra')
? (document.querySelector('.leftWra').style.top = '10px')
: '';
document.querySelector('.rightWra').style.top = '10px';
document.querySelector('.leftment').style.display = 'block';
document.querySelector('.main-container').style.marginLeft =

View File

@ -14,6 +14,7 @@
<script setup>
import iframeToggle from './IframeToggle/index';
import useTagsViewStore from '@/store/modules/tagsView';
import keepAlive from './KeepAlive'
const tagsViewStore = useTagsViewStore();
</script>

View File

@ -1,7 +1,8 @@
<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" />
<!-- <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'">
@ -52,6 +53,7 @@ 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()

View File

@ -1,5 +1,5 @@
<template>
<div class="sidebar-logo-container" :class="{ 'collapse': collapse }" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<div class="sidebar-logo-container" :class="{ 'collapse': collapse }" :style="{ backgroundColor: sideTheme === 'theme-dark' ? '' : ''}">
<transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<!-- <img v-if="logo" :src="logo" class="sidebar-logo" /> -->
@ -7,7 +7,7 @@
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
<!-- <img v-if="logo" :src="logo" class="sidebar-logo" /> -->
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">种植业生产监管数字化系统</h1>
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? 'rgba(41, 255, 219, 1)' : 'rgba(41, 255, 219, 1)' }">种植业生产监管数字化系统</h1>
</router-link>
</transition>
</div>
@ -41,13 +41,10 @@ const sideTheme = computed(() => settingsStore.sideTheme);
}
.sidebar-logo-container {
position: relative;
width: 100%;
height: 50px;
display: inline-block;
font-size: 14px;
line-height: 50px;
background: #2b2f3a;
text-align: center;
overflow: hidden;
margin-left: 8px;
& .sidebar-logo-link {
height: 100%;
@ -66,7 +63,7 @@ const sideTheme = computed(() => settingsStore.sideTheme);
color: #fff;
font-weight: 600;
line-height: 50px;
font-size: 14px;
font-size: 20px;
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
vertical-align: middle;
}

View File

@ -1,6 +1,6 @@
<template>
<div class="leftment" :class="{ 'has-logo': showLogo }" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<logo v-if="showLogo" :collapse="isCollapse" />
<!-- <logo v-if="showLogo" :collapse="isCollapse" /> -->
<el-scrollbar :class="sideTheme" wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
@ -40,7 +40,7 @@ const sidebarRouters = computed(() => permissionStore.sidebarRouters);
const showLogo = computed(() => settingsStore.sidebarLogo);
const sideTheme = computed(() => settingsStore.sideTheme);
const theme = computed(() => settingsStore.theme);
const isCollapse = computed(() => !appStore.sidebar.opened);
// const isCollapse = computed(() => !appStore.sidebar.opened);
const activeMenu = computed(() => {
const { meta, path } = route;

View File

@ -4,7 +4,7 @@
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
<div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
<div class="navDiv" :class="{ 'fixed-header': fixedHeader }">
<navbar @setLayout="setLayout" />
<!-- <navbar @setLayout="setLayout" /> -->
<tags-view v-if="needTagsView" />
</div>
<app-main />
@ -31,8 +31,8 @@ const needTagsView = computed(() => settingsStore.tagsView);
const fixedHeader = computed(() => settingsStore.fixedHeader);
const classObj = computed(() => ({
hideSidebar: !sidebar.value.opened,
openSidebar: sidebar.value.opened,
// hideSidebar: !sidebar.value.opened,
// openSidebar: sidebar.value.opened,
withoutAnimation: sidebar.value.withoutAnimation,
mobile: device.value === 'mobile'
}))

View File

@ -425,7 +425,6 @@ let tableData = [
address: '20%',
},
{
date: '大豆',
name: '1257584亩',
address: '15%',
},
@ -552,7 +551,7 @@ function initMap() {
addWms('shuzisannong:huangdaoqu_town', 'tl');
viewer.camera.flyTo({
destination: Cesium.Rectangle.fromDegrees(119.5091, 35.5671, 120.3285, 36.1455),
duration: 2,
duration: 0,
});
// 图层点击事件
@ -793,6 +792,7 @@ function layerClick() {
if (data.length > 0) {
let newData = data['0'];
if (newData.properties && newData.properties.XZDM) {
console.log(XZDM);
if (XZDM !== newData.properties.XZDM) {
//防止
XZDM = newData.properties.XZDM;
@ -1018,10 +1018,10 @@ function leftFoldClick() {
leftWraFlag.value = !leftWraFlag.value;
if (leftWraFlag.value) {
let leftWra = document.querySelector('.leftWra');
leftWra.style.transform = 'translate(0,0)';
leftWra ? (leftWra.style.transform = 'translate(0,0)') : '';
} else {
let leftWra = document.querySelector('.leftWra');
leftWra.style.transform = 'translate(-107%,0)';
leftWra ? leftWra.style.transform = 'translate(-107%,0)':'';
}
}
function rightFoldClick() {
@ -3089,7 +3089,7 @@ function hiddenOverlayChart() {
XZDM = '';
XZQDM = '';
removeWms(['village_CQL']);
removeWms(['aaa']);
// removeWms(['aaa']);
deleteEntityByName('villageLine');
deleteEntityByName('townLine');
@ -3097,10 +3097,10 @@ function hiddenOverlayChart() {
pop.style.display = 'none'; // 清除监听事件
viewer.scene.postRender.removeEventListener(infoWindowPostRender);
// 重定位
viewer.camera.flyTo({
destination: Cesium.Rectangle.fromDegrees(119.5091, 35.5671, 120.3285, 36.1455),
duration: 2,
});
// viewer.camera.flyTo({
// destination: Cesium.Rectangle.fromDegrees(119.5091, 35.5671, 120.3285, 36.1455),
// duration: 2,
// });
removeWms(['gbznt'], true);
if (flag.value) {
addWms('shuzisannong:huangdaoqu_town', 'tl');

View File

@ -523,7 +523,7 @@ function initMap() {
viewer.camera.flyTo({
destination: Cesium.Rectangle.fromDegrees(119.5091, 35.5671, 120.3285, 36.1455),
duration: 2,
duration: 0,
});
// 图层点击事件

View File

@ -132,6 +132,73 @@
<div class="cancel" @click="hiddenOverlayChart">X</div>
</div>
<el-button v-if="flag" class="back_button" @click="back()">返回</el-button>
<el-collapse class="legend" accordion>
<el-collapse-item name="1">
<template #title>图例</template>
<div class="mt-4">
<el-checkbox-group v-model="checkList" @change="change">
<!-- <el-checkbox
v-for="(value, item, key) in dic"
:key="key"
:style="{
background: value.color,
border: `1px solid ${value.color}`,
width: `100%`,
}"
v-model="checked3"
:disabled="value.disabled"
:label="item"
/> -->
<el-checkbox
style="
background: rgba(255, 238, 204, 1);
border: 1px solid rgba(251, 171, 60, 1);
width: 100%;
"
v-model="checked3"
label="0-200"
/>
<el-checkbox
style="
background: rgba(255, 220, 153, 1);
border: 1px solid rgba(251, 219, 13, 1);
width: 100%;
"
v-model="checked4"
label="200-400"
/>
<el-checkbox
style="
background: rgba(255, 203, 102, 1);
border: 1px solid rgba(244, 218, 136, 1);
width: 100%;
"
v-model="checked3"
label="400-600"
/>
<el-checkbox
style="
background: rgba(255, 185, 51, 1);
border: 1px solid rgba(174, 83, 110, 1);
width: 100%;
"
v-model="checked4"
label="600-800"
/>
<el-checkbox
style="
background: rgba(255, 168, 0, 1);
border: 1px solid rgba(242, 177, 167, 1);
width: 100%;
"
v-model="checked3"
label="800-1000"
/>
</el-checkbox-group>
</div>
</el-collapse-item>
</el-collapse>
</div>
</template>
@ -2583,19 +2650,41 @@ $height: calc(100vh - 100px);
.legend {
position: absolute;
right: 28%;
bottom: 18%;
right: 25%;
bottom: 7%;
width: 129px;
height: 338px;
opacity: 1;
border-radius: 4px;
background: rgba(2, 31, 26, 0.6);
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
padding: 10px 10px 10px 10px;
border: 1px solid rgba(4, 153, 153, 1);
// height: 50px;
:deep(.el-collapse-item__header) {
background: rgba(2, 31, 26, 0.6);
color: rgba(255, 255, 255, 1);
text-align: center;
padding: 0 30px;
font-size: 14px;
}
--el-collapse-content-bg-color {
background: rgba(2, 31, 26, 0.6);
}
:deep(.el-collapse-item__content) {
background: rgba(2, 31, 26, 0.6);
padding: 0 10px;
padding-bottom: 10px;
}
--el-collapse-border-color: none;
--el-collapse-content-bg-color: none;
// opacity: 1;
// border-radius: 4px;
// background: rgba(2, 31, 26, 0.6);
// display: flex;
// flex-direction: column;
// justify-content: flex-start;
// align-items: center;
// padding: 10px 10px 10px 10px;
p {
margin: 10px;
font-size: 14px;
@ -2628,7 +2717,10 @@ $height: calc(100vh - 100px);
.bottom_center {
position: absolute;
left: calc(400px + 12vw);
// left: calc(400px + 20px + 8vw);
left: -2%;
right: 0;
margin: auto;
width: calc(100% - (400px * 2) - (10vw * 2));
min-width: 380px;
bottom: 5%;

View File

@ -194,6 +194,73 @@
</div>
<div class="cancel" @click="hiddenOverlayChart">X</div>
</div>
<el-collapse class="legend" accordion>
<el-collapse-item name="1">
<template #title>图例</template>
<div class="mt-4">
<el-checkbox-group v-model="checkList" @change="change">
<!-- <el-checkbox
v-for="(value, item, key) in dic"
:key="key"
:style="{
background: value.color,
border: `1px solid ${value.color}`,
width: `100%`,
}"
v-model="checked3"
:disabled="value.disabled"
:label="item"
/> -->
<el-checkbox
style="
background: rgba(50, 148, 1, 1);
border: 1px solid rgba(251, 171, 60, 1);
width: 100%;
"
v-model="checked3"
label="好"
/>
<el-checkbox
style="
background: rgba(154, 208, 0, 1);
border: 1px solid rgba(251, 219, 13, 1);
width: 100%;
"
v-model="checked4"
label="较好"
/>
<el-checkbox
style="
background: rgba(234, 219, 0, 1);
border: 1px solid rgba(244, 218, 136, 1);
width: 100%;
"
v-model="checked3"
label="适中"
/>
<el-checkbox
style="
background: rgba(239, 152, 0, 1);
border: 1px solid rgba(174, 83, 110, 1);
width: 100%;
"
v-model="checked4"
label="较差"
/>
<el-checkbox
style="
background: rgba(247, 85, 0, 1);
border: 1px solid rgba(242, 177, 167, 1);
width: 100%;
"
v-model="checked3"
label="差"
/>
</el-checkbox-group>
</div>
</el-collapse-item>
</el-collapse>
<el-button v-if="flag" class="back_button" @click="back()">返回</el-button>
</div>
</template>
@ -3088,19 +3155,41 @@ $height: calc(100vh - 100px);
.legend {
position: absolute;
right: 28%;
bottom: 18%;
right: 25%;
bottom: 7%;
width: 129px;
height: 338px;
opacity: 1;
border-radius: 4px;
background: rgba(2, 31, 26, 0.6);
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
padding: 10px 10px 10px 10px;
border: 1px solid rgba(4, 153, 153, 1);
// height: 50px;
:deep(.el-collapse-item__header) {
background: rgba(2, 31, 26, 0.6);
color: rgba(255, 255, 255, 1);
text-align: center;
padding: 0 30px;
font-size: 14px;
}
--el-collapse-content-bg-color {
background: rgba(2, 31, 26, 0.6);
}
:deep(.el-collapse-item__content) {
background: rgba(2, 31, 26, 0.6);
padding: 0 10px;
padding-bottom: 10px;
}
--el-collapse-border-color: none;
--el-collapse-content-bg-color: none;
// opacity: 1;
// border-radius: 4px;
// background: rgba(2, 31, 26, 0.6);
// display: flex;
// flex-direction: column;
// justify-content: flex-start;
// align-items: center;
// padding: 10px 10px 10px 10px;
p {
margin: 10px;
font-size: 14px;
@ -3133,7 +3222,10 @@ $height: calc(100vh - 100px);
.bottom_center {
position: absolute;
left: calc(400px + 12vw);
// left: calc(400px + 20px + 8vw);
left: -2%;
right: 0;
margin: auto;
width: calc(100% - (400px * 2) - (10vw * 2));
min-width: 380px;
bottom: 5%;

View File

@ -60,7 +60,35 @@
</div>
</div>
<div class="leftFoldDiv" @click="leftFoldClick()">
<el-icon><ArrowRightBold /></el-icon>
<el-tooltip
class="box-item"
:show-arrow="false"
:disabled="leftWraFlag"
hide-after="0"
show-after="200"
effect="dark"
content="展开"
placement="top"
>
<img v-if="!leftWraFlag" src="@/assets/images/close1.png" alt="" />
</el-tooltip>
<el-tooltip
:disabled="!leftWraFlag"
:show-arrow="false"
class="box-item"
show-after="200"
hide-after="0"
effect="dark"
content="收起"
placement="top"
>
<img
class="imgrotate"
v-if="leftWraFlag"
src="@/assets/images/close1.png"
alt=""
/>
</el-tooltip>
</div>
</div>
<div class="rightWra">
@ -80,7 +108,35 @@
<div ref="soilDiv" class="soilDiv"></div>
</div>
<div class="rightFoldDiv" @click="rightFoldClick()">
<el-icon><ArrowLeftBold /></el-icon>
<el-tooltip
:disabled="!rightWraFlag"
:show-arrow="false"
hide-after="0"
show-after="200"
class="box-item"
effect="dark"
content="收起"
placement="top"
>
<img v-if="rightWraFlag" src="@/assets/images/close1.png" alt="" />
</el-tooltip>
<el-tooltip
:disabled="rightWraFlag"
:show-arrow="false"
hide-after="0"
show-after="200"
class="box-item"
effect="dark"
content="展开"
placement="top"
>
<img
class="imgrotate"
v-if="!rightWraFlag"
src="@/assets/images/close1.png"
alt=""
/>
</el-tooltip>
</div>
</div>
@ -91,8 +147,7 @@
</div>
<div class="imgdiv">
<img
width="100%"
src="https://img.js.design/assets/img/641d73a7cece21d6b61bedf9.png#d27dd8c8c5369101dca2dcf160e5bba9"
src="https://img.js.design/assets/img/641d73b4634e77963ddc9e3c.png#34e63fa85ea624d67ab959d24318b0e9"
alt=""
/>
</div>
@ -1557,7 +1612,9 @@ $height: calc(100vh - 100px);
.center {
width: 100%;
height: 100%;
.imgrotate {
transform: rotate(180deg);
}
.title {
width: 100%;
height: 45px;
@ -1786,7 +1843,7 @@ $height: calc(100vh - 100px);
justify-content: center;
}
.depth {
width: 244px;
width: 90%;
height: 26px;
opacity: 1;
border-radius: 4px;
@ -1920,8 +1977,11 @@ $height: calc(100vh - 100px);
background: rgba(2, 31, 26, 0.6);
border: 1px solid rgba(4, 153, 153, 1);
display: flex;
div {
flex: 1;
.left_bottom {
width: 50%;
}
.right_bottom {
width: 50%;
}
.el-table {
--el-table-tr-bg-color: none;
@ -1969,7 +2029,7 @@ $height: calc(100vh - 100px);
}
.imgdiv {
width: 100%;
height: 248px;
height: calc(100% - 50px);
display: flex;
justify-content: center;
padding: 10px;

View File

@ -77,10 +77,14 @@ import { getCodeImg } from '@/api/login';
import Cookies from 'js-cookie';
import { encrypt, decrypt } from '@/utils/jsencrypt';
import useUserStore from '@/store/modules/user';
import { useRoute } from 'vue-router';
const Route = useRoute();
console.log(Route.path);
const userStore = useUserStore();
const router = useRouter();
const { proxy } = getCurrentInstance();
const loginForm = ref({
username: 'admin',

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff