main
严飞永 1 month ago
parent 51ab582d7e
commit 85777235b2

@ -5,7 +5,8 @@ VUE_APP_TITLE = 工业园区工业上楼项目系统
ENV = 'development'
# 工业园区工业上楼项目系统/开发环境
VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = ''
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -40,7 +40,7 @@
"axios": "0.28.1",
"clipboard": "2.0.8",
"core-js": "3.37.1",
"echarts": "5.4.0",
"echarts": "^5.4.0",
"element-ui": "2.15.14",
"file-saver": "2.0.5",
"fuse.js": "6.4.3",

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

@ -35,8 +35,9 @@ $base-logo-light-title-color: #001529;
$base-sub-menu-background:#000c17;
$base-sub-menu-hover:#001528;
*/
$base-header-height: 60px; //
$base-sidebar-width: 200px;
$base-sidebar-background: #304156; //
// the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass

@ -1,30 +1,11 @@
<template>
<div class="navbar">
<div class="navbar" >
<div>这里放logo图</div>
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
<div class="right-menu">
<template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item" />
<el-tooltip content="源码地址" effect="dark" placement="bottom">
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
</el-tooltip>
<el-tooltip content="文档地址" effect="dark" placement="bottom">
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
</el-tooltip>
<screenfull id="screenfull" class="right-menu-item hover-effect" />
<el-tooltip content="布局大小" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip>
</template>
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper">
<img :src="avatar" class="user-avatar">
@ -112,11 +93,11 @@ export default {
<style lang="scss" scoped>
.navbar {
display: flex;
height: 50px;
overflow: hidden;
position: relative;
background: #fff;
box-shadow: 0 1px 4px rgba(0,21,41,.08);
.hamburger-container {
line-height: 46px;

@ -1,16 +1,5 @@
<template>
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
<transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" />
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
</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 }">{{ title }} </h1>
</router-link>
</transition>
</div>
</template>
<script>

@ -17,14 +17,6 @@
<span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
</router-link>
</scroll-pane>
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
<li @click="refreshSelectedTag(selectedTag)"><i class="el-icon-refresh-right"></i> 刷新页面</li>
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"><i class="el-icon-close"></i> </li>
<li @click="closeOthersTags"><i class="el-icon-circle-close"></i> 关闭其他</li>
<li v-if="!isFirstView()" @click="closeLeftTags"><i class="el-icon-back"></i> </li>
<li v-if="!isLastView()" @click="closeRightTags"><i class="el-icon-right"></i> </li>
<li @click="closeAllTags(selectedTag)"><i class="el-icon-circle-close"></i> 全部关闭</li>
</ul>
</div>
</template>

@ -1,17 +1,26 @@
<template>
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
<sidebar v-if="!sidebar.hide" class="sidebar-container"/>
<div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container">
<div :class="{'fixed-header':fixedHeader}">
<navbar/>
<tags-view v-if="needTagsView"/>
<!-- 头部区域独占一行 -->
<div class="header-container">
<navbar/> <!-- 导航栏组件 -->
</div>
<!-- 主内容区域 -->
<div class="main-container">
<!-- 侧边栏仅在侧边栏未隐藏时显示 -->
<sidebar v-if="!sidebar.hide" class="sidebar-container"/>
<!-- 右侧内容区域 -->
<div :class="{'content-container': true, 'sidebarHide': sidebar.hide}">
<tags-view v-if="needTagsView"/> <!-- 标签视图组件仅在 needTagsView 为真时显示 -->
<app-main/> <!-- 主要内容区域 -->
</div>
<app-main/>
<right-panel>
<settings/>
</right-panel>
</div>
<!-- 右侧面板包含设置面板 -->
<right-panel>
<settings/> <!-- 设置面板组件 -->
</right-panel>
</div>
</template>
@ -38,7 +47,6 @@ export default {
theme: state => state.settings.theme,
sideTheme: state => state.settings.sideTheme,
sidebar: state => state.app.sidebar,
device: state => state.app.device,
needTagsView: state => state.settings.tagsView,
fixedHeader: state => state.settings.fixedHeader
}),
@ -46,8 +54,7 @@ export default {
return {
hideSidebar: !this.sidebar.opened,
openSidebar: this.sidebar.opened,
withoutAnimation: this.sidebar.withoutAnimation,
mobile: this.device === 'mobile'
withoutAnimation: this.sidebar.withoutAnimation
}
},
variables() {
@ -71,41 +78,45 @@ export default {
position: relative;
height: 100%;
width: 100%;
&.mobile.openSidebar {
position: fixed;
top: 0;
}
display: flex;
flex-direction: column;
background-image: url("../../src/assets/images/bg@2x.png");
background-size: 100% 100%;
}
.drawer-bg {
background: #000;
opacity: 0.3;
.header-container {
width: 100%;
top: 0;
height: 100%;
position: absolute;
z-index: 999;
height: $base-header-height;
background-color: #fff;
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
z-index: 1000;
}
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$base-sidebar-width});
transition: width 0.28s;
.main-container {
display: flex;
flex: 1;
overflow: hidden;
background-color: #fff;
}
.hideSidebar .fixed-header {
width: calc(100% - 54px);
.sidebar-container {
width: $base-sidebar-width;
height: 100%;
transition: width 0.28s;
margin-top: 60px;
background-color: #f0f2f5;
}
.sidebarHide .fixed-header {
width: 100%;
}
.content-container {
flex: 1;
height: 100%;
overflow: auto;
padding: 16px;
background-color: #f0f2f5;
transition: margin-left 0.28s;
.mobile .fixed-header {
width: 100%;
&.sidebarHide {
margin-left: 0;
}
}
</style>
</style>

@ -37,6 +37,10 @@ import DictTag from '@/components/DictTag'
import VueMeta from 'vue-meta'
// 字典数据组件
import DictData from '@/components/DictData'
//echarts
import * as echarts from 'echarts'
// 全局方法挂载
Vue.prototype.getDicts = getDicts
@ -48,6 +52,7 @@ Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
Vue.prototype.$echarts = echarts;
// 全局组件挂载
Vue.component('DictTag', DictTag)

@ -0,0 +1,13 @@
<template>
<div>项目整体情况</div>
</template>
<script>
</script>
<style scoped>
</style>

@ -0,0 +1,166 @@
<template>
<div class="container">
<div class="header">
<h2>项目总数</h2>
<p>384</p>
</div>
<div class="chart-container">
<div ref="chart" :style="{ width: '100%', height: '300px' }"></div>
</div>
<div class="legend">
<div v-for="item in legendData" :key="item.name" class="legend-item">
<span class="color-block" :style="{ backgroundColor: item.color }"></span>
<span class="label">{{ item.name }}</span>
<span class="value">{{ item.value }}</span>
<span class="percentage">{{ item.percentage }}%</span>
</div>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts';
export default {
name: 'ProjectDistributionModule',
data() {
return {
legendData: [
{ name: '高贸区', value: 54, percentage: 30, color: '#6eb158' },
{ name: '科创区', value: 65, percentage: 35, color: '#3f8cff' },
{ name: '度假区', value: 32, percentage: 12, color: '#ffc107' },
{ name: '商务区', value: 25, percentage: 13, color: '#cdcdcd' },
{ name: '苏相合作区', value: 15, percentage: 10, color: '#ff6b6b' },
],
};
},
mounted() {
this.initChart();
window.addEventListener('resize', this.resizeChart);
},
beforeUnmount() {
window.removeEventListener('resize', this.resizeChart);
if (this.myChart) {
this.myChart.dispose();
}
},
methods: {
//
initChart() {
this.myChart = echarts.init(this.$refs.chart);
const option = this.getChartOption();
this.myChart.setOption(option);
},
//
getChartOption() {
return {
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d}%)',
},
series: [
{
name: '项目分布',
type: 'pie',
radius: ['40%', '70%'], //
data: this.legendData.map(item => ({
value: item.value,
name: item.name,
})),
label: {
show: true, //
formatter: '{b}\n{c} ({d}%)', //
fontSize: 14,
fontWeight: 'bold',
},
labelLine: {
show: false, // 线
},
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
},
},
},
],
color: this.legendData.map(item => item.color),
};
},
//
resizeChart() {
if (this.myChart) {
this.myChart.resize();
}
},
},
};
</script>
<style scoped>
.container {
width: 40rem;
display: flex;
position: relative;
align-items: center;
border: 1px solid #ccc;
}
.header {
text-align: center;
margin-bottom: 20px;
position: absolute;
top: 0;
left: 0;
}
.header h2 {
font-size: 24px;
margin: 0;
}
.header p {
font-size: 32px;
font-weight: bold;
color: #333;
margin: 10px 0 0;
}
.chart-container {
margin-bottom: 20px;
}
.legend {
display: flex;
flex-direction: column;
gap: 10px;
margin-left: 5rem;
}
.legend-item {
display: flex;
align-items: center;
gap: 10px;
}
.color-block {
width: 16px;
height: 16px;
border-radius: 4px;
}
.label {
flex: 1;
font-size: 14px;
color: #333;
}
.value,
.percentage {
font-size: 14px;
color: #666;
}
</style>

@ -0,0 +1,3 @@
<template>
<div>分析</div>
</template>

@ -0,0 +1,13 @@
<template>
<div>地图模块</div>
</template>
<script>
</script>
<style scoped>
</style>

@ -0,0 +1,13 @@
<template>
<div>消息通知</div>
</template>
<script>
</script>
<style scoped>
</style>

@ -0,0 +1,13 @@
<template>
<div>项目列表</div>
</template>
<script>
</script>
<style scoped>
</style>

File diff suppressed because it is too large Load Diff

@ -36,7 +36,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://192.168.0.113:7071`,
target: `https://vue.ruoyi.vip/prod-api`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save