master
许宏杰 9 months ago
parent e6e1900e5a
commit a5e5fffedd

@ -49,10 +49,12 @@
"js-beautify": "1.13.0", "js-beautify": "1.13.0",
"js-cookie": "3.0.1", "js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1", "jsencrypt": "3.0.0-rc.1",
"leaflet": "^1.9.4",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"quill": "1.3.7", "quill": "1.3.7",
"screenfull": "5.0.2", "screenfull": "5.0.2",
"sortablejs": "1.10.2", "sortablejs": "1.10.2",
"v-scale-screen": "^1.0.3",
"vue": "2.6.12", "vue": "2.6.12",
"vue-count-to": "1.0.13", "vue-count-to": "1.0.13",
"vue-cropper": "0.5.5", "vue-cropper": "0.5.5",

@ -7,16 +7,9 @@
<script> <script>
import ThemePicker from "@/components/ThemePicker"; import ThemePicker from "@/components/ThemePicker";
import autofit from "autofit.js";
export default { export default {
mounted() { mounted() {},
autofit.init({
designHeight: 1080,
designWidth: 1920,
renderDom: "#app",
resize: true,
});
},
name: "App", name: "App",
components: { ThemePicker }, components: { ThemePicker },
metaInfo() { metaInfo() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 B

@ -0,0 +1,42 @@
<template>
<div id="leaflet-map"></div>
</template>
<script>
import L from "leaflet";
export default {
data() {
return {
townCenter: [31.4865100338683, 121.11104941651722],
mapRotate: 0, //
};
},
mounted() {
this.initMapData();
},
methods: {
initMapData() {
this.globalMap = L.map("leaflet-map", {
center: this.townCenter, // []
zoom: 13, //
maxZoom: 16,
minZoom: 13,
zoomControl: false, //
attributionControl: false, // leaflet
rotate: true,
bearing: this.mapRotate,
});
},
},
};
</script>
<style>
#leaflet-map {
height: 100%;
width: 100%;
}
.leaflet-container {
background: transparent !important;
}
</style>

@ -0,0 +1,4 @@
export { default as peopleCentre } from "./peopleCentre.vue";
export { default as warningCentre } from "./warningCentre.vue";
export { default as recycleCentre } from "./recycleCentre.vue";
export { default as logCentre } from "./logCentre.vue";

@ -1,14 +1,54 @@
<template> <template>
<div class="navigation-bar"> <div class="navigation-bar">
<div class="navigation-left">
<el-badge
:value="item.badge ? item.badge : ''"
class="item"
v-for="(item, index) in leftBtnList"
:key="index"
>
<el-button type="text" @click="handleSearch(item.title)">{{
item.title
}}</el-button>
</el-badge>
</div>
<div class="navigation-title"> <div class="navigation-title">
<div class="main-title" :text="mainTitle">{{ mainTitle }}</div> <div class="main-title" :text="mainTitle">{{ mainTitle }}</div>
<div class="sub-title" :text="subTitle">{{ subTitle }}</div> <div class="sub-title" :text="subTitle">{{ subTitle }}</div>
</div> </div>
<div class="navigation-right">
<div class="reset"></div>
<el-button type="text">后台管理</el-button>
<el-button type="text">美丽街区</el-button>
<div class="user-data">
<div class="user-icon"></div>
<div class="user-name">欢迎,{{ name }}</div>
</div>
</div>
<!-- 四个中心 -->
<el-dialog :visible.sync="open" top="25vh" :modal="false" width="1158px">
<div class="dialog-main">
<div class="dialog-title"><span></span> {{ title }}</div>
<peopleCentre v-if="title == ''" />
<warningCentre v-if="title == ''" />
<recycleCentre v-if="title == ''" />
<logCentre v-if="title == ''" />
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from "vuex";
import { peopleCentre, warningCentre, recycleCentre, logCentre } from "./index";
export default { export default {
components: {
peopleCentre,
warningCentre,
recycleCentre,
logCentre,
},
props: { props: {
mainTitle: { mainTitle: {
type: String, type: String,
@ -20,7 +60,28 @@ export default {
}, },
}, },
data() { data() {
return {}; return {
title: "",
open: false,
leftBtnList: [
{ title: "搜索中心", isShow: true },
{ title: "预警中心", isShow: true, badge: 100 },
{ title: "回收中心", isShow: true },
{ title: "日志中心", isShow: true },
],
};
},
methods: {
/**
* 是个中心
*/
handleSearch(title) {
this.title = title;
this.open = true;
},
},
computed: {
...mapGetters(["name"]),
}, },
}; };
</script> </script>
@ -29,12 +90,20 @@ export default {
.navigation-bar { .navigation-bar {
position: fixed; position: fixed;
top: 0; top: 0;
z-index: 100;
height: 125px; height: 125px;
width: 100%; width: 100%;
background: url("~@/assets/images/ui/navigation.png"); background: url("~@/assets/images/ui/navigation.png");
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
& > div {
flex: 1;
}
.navigation-left {
padding-top: 20px;
padding-left: 25px;
}
.navigation-title { .navigation-title {
text-align: center; text-align: center;
margin-top: 6px; margin-top: 6px;
@ -65,5 +134,86 @@ export default {
text-shadow: none; text-shadow: none;
} }
} }
.navigation-right {
padding-top: 20px;
padding-right: 25px;
display: flex;
flex-direction: row-reverse;
align-items: flex-start;
.reset {
height: 41px;
width: 58px;
background: url("~@/assets/images/ui/reset.png");
}
.user-data {
display: flex;
align-items: center;
padding-top: 5px;
cursor: pointer;
.user-icon {
height: 19px;
width: 19px;
border-radius: 50%;
background: url("~@/assets/images/ui/user.png");
background-size: 100% 100%;
margin-right: 10px;
}
.user-name {
font-size: 16px;
color: #ffffff;
font-weight: 400;
font-family: "Alibaba-PuHuiTi-Regular.otf";
}
}
}
.el-button {
font-size: 14px;
color: #cdfbff;
font-weight: 400;
background: url("~@/assets/images/ui/btn_bg.png");
padding: 10px 28px;
font-family: "Alibaba-PuHuiTi-Regular.otf";
}
.dialog-main {
min-height: 700px;
display: flex;
flex-direction: column;
background: #031c3c;
border-radius: 12px;
padding: 20px;
.dialog-title {
display: flex;
align-items: center;
span {
display: inline-block;
height: 17px;
width: 5px;
background: #00a8ff;
margin-right: 10px;
}
font-size: 18px;
color: #f4f8fa;
font-weight: 500;
font-family: "Alibaba-PuHuiTi-Medium.otf";
}
}
}
::v-deep .el-badge__content.is-fixed {
z-index: 10;
}
::v-deep .el-dialog {
background: transparent;
}
::v-deep .el-dialog__header {
padding: 0;
}
::v-deep .el-dialog__body {
background: #009bf4;
border-radius: 12px;
padding: 2px;
}
::v-deep .el-dialog:not(.is-fullscreen) {
margin-top: 23vh !important;
} }
</style> </style>

@ -0,0 +1,9 @@
<template>
<div>日志</div>
</template>
<script>
export default {};
</script>
<style></style>

@ -0,0 +1,45 @@
<template>
<div class="search-container">
<div class="option-rows">
<el-select v-model="value" placeholder="选择社区">
<el-option
v-for="item in community"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-select v-model="value" placeholder="选择小区">
<el-option
v-for="item in xiaoqu"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
</div>
</template>
<script>
export default {
data() {
return {
value: "",
queryParams: {},
community: [],
xiaoqu: [],
};
},
};
</script>
<style lang="scss" scoped>
.search-container {
margin-top: 10px;
flex: 1;
border: 1px solid red;
}
</style>

@ -0,0 +1,9 @@
<template>
<div>回收</div>
</template>
<script>
export default {};
</script>
<style></style>

@ -0,0 +1,9 @@
<template>
<div>预警</div>
</template>
<script>
export default {};
</script>
<style></style>

@ -1,67 +1,87 @@
import Vue from 'vue' import Vue from "vue";
import Cookies from 'js-cookie' import Cookies from "js-cookie";
import Element from 'element-ui' import Element from "element-ui";
import './assets/styles/element-variables.scss' import "./assets/styles/element-variables.scss";
import '@/assets/styles/index.scss' // global css import "@/assets/styles/index.scss"; // global css
import '@/assets/styles/ruoyi.scss' // ruoyi css import "@/assets/styles/ruoyi.scss"; // ruoyi css
import App from './App' import App from "./App";
import store from './store' import store from "./store";
import router from './router' import router from "./router";
import directive from './directive' // directive import directive from "./directive"; // directive
import plugins from './plugins' // plugins import plugins from "./plugins"; // plugins
import { download } from '@/utils/request' import { download } from "@/utils/request";
import './assets/icons' // icon // 引入Leaflet对象 挂载到Vue上便于全局使用也可以单独页面中单独引用
import './permission' // permission control import "leaflet/dist/leaflet.css";
import * as L from "leaflet";
/* leaflet icon */
delete L.Icon.Default.prototype._getIconUrl;
L.Icon.Default.mergeOptions({
iconRetinaUrl: require("leaflet/dist/images/marker-icon-2x.png"),
iconUrl: require("leaflet/dist/images/marker-icon.png"),
shadowUrl: require("leaflet/dist/images/marker-shadow.png"),
});
import "./assets/icons"; // icon
import "./permission"; // permission control
import { getDicts } from "@/api/system/dict/data"; import { getDicts } from "@/api/system/dict/data";
import { getConfigKey } from "@/api/system/config"; import { getConfigKey } from "@/api/system/config";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"; import {
parseTime,
resetForm,
addDateRange,
selectDictLabel,
selectDictLabels,
handleTree,
} from "@/utils/ruoyi";
// 分页组件 // 分页组件
import Pagination from "@/components/Pagination"; import Pagination from "@/components/Pagination";
// 自定义表格工具组件 // 自定义表格工具组件
import RightToolbar from "@/components/RightToolbar" import RightToolbar from "@/components/RightToolbar";
// 富文本组件 // 富文本组件
import Editor from "@/components/Editor" import Editor from "@/components/Editor";
// 文件上传组件 // 文件上传组件
import FileUpload from "@/components/FileUpload" import FileUpload from "@/components/FileUpload";
// 图片上传组件 // 图片上传组件
import ImageUpload from "@/components/ImageUpload" import ImageUpload from "@/components/ImageUpload";
// 图片预览组件 // 图片预览组件
import ImagePreview from "@/components/ImagePreview" import ImagePreview from "@/components/ImagePreview";
// 字典标签组件 // 字典标签组件
import DictTag from '@/components/DictTag' import DictTag from "@/components/DictTag";
// 头部标签组件 // 头部标签组件
import VueMeta from 'vue-meta' import VueMeta from "vue-meta";
// 字典数据组件 // 字典数据组件
import DictData from '@/components/DictData' import DictData from "@/components/DictData";
// 全局方法挂载 // 全局方法挂载
Vue.prototype.getDicts = getDicts Vue.prototype.getDicts = getDicts;
Vue.prototype.getConfigKey = getConfigKey Vue.prototype.getConfigKey = getConfigKey;
Vue.prototype.parseTime = parseTime Vue.prototype.parseTime = parseTime;
Vue.prototype.resetForm = resetForm Vue.prototype.resetForm = resetForm;
Vue.prototype.addDateRange = addDateRange Vue.prototype.addDateRange = addDateRange;
Vue.prototype.selectDictLabel = selectDictLabel Vue.prototype.selectDictLabel = selectDictLabel;
Vue.prototype.selectDictLabels = selectDictLabels Vue.prototype.selectDictLabels = selectDictLabels;
Vue.prototype.download = download Vue.prototype.download = download;
Vue.prototype.handleTree = handleTree Vue.prototype.handleTree = handleTree;
// 全局组件挂载 // 全局组件挂载
Vue.component('DictTag', DictTag) Vue.component("DictTag", DictTag);
Vue.component('Pagination', Pagination) Vue.component("Pagination", Pagination);
Vue.component('RightToolbar', RightToolbar) Vue.component("RightToolbar", RightToolbar);
Vue.component('Editor', Editor) Vue.component("Editor", Editor);
Vue.component('FileUpload', FileUpload) Vue.component("FileUpload", FileUpload);
Vue.component('ImageUpload', ImageUpload) Vue.component("ImageUpload", ImageUpload);
Vue.component('ImagePreview', ImagePreview) Vue.component("ImagePreview", ImagePreview);
Vue.use(directive) Vue.use(directive);
Vue.use(plugins) Vue.use(plugins);
Vue.use(VueMeta) Vue.use(VueMeta);
DictData.install() DictData.install();
/** /**
* If you don't want to use mock-server * If you don't want to use mock-server
@ -73,14 +93,14 @@ DictData.install()
*/ */
Vue.use(Element, { Vue.use(Element, {
size: Cookies.get('size') || 'medium' // set element-ui default size size: Cookies.get("size") || "medium", // set element-ui default size
}) });
Vue.config.productionTip = false Vue.config.productionTip = false;
new Vue({ new Vue({
el: '#app', el: "#app",
router, router,
store, store,
render: h => h(App) render: (h) => h(App),
}) });

@ -1,10 +1,10 @@
import Vue from 'vue' import Vue from "vue";
import Router from 'vue-router' import Router from "vue-router";
Vue.use(Router) Vue.use(Router);
/* Layout */ /* Layout */
import Layout from '@/layout' import Layout from "@/layout";
/** /**
* Note: 路由配置项 * Note: 路由配置项
@ -31,153 +31,152 @@ import Layout from '@/layout'
// 公共路由 // 公共路由
export const constantRoutes = [ export const constantRoutes = [
{ {
path: '/redirect', path: "/redirect",
component: Layout, component: Layout,
hidden: true, hidden: true,
children: [ children: [
{ {
path: '/redirect/:path(.*)', path: "/redirect/:path(.*)",
component: () => import('@/views/redirect') component: () => import("@/views/redirect"),
} },
] ],
}, },
{ {
path: '/login', path: "/login",
component: () => import('@/views/login'), component: () => import("@/views/login"),
hidden: true hidden: true,
}, },
{ {
path: '/register', path: "/register",
component: () => import('@/views/register'), component: () => import("@/views/register"),
hidden: true hidden: true,
}, },
{ {
path: '/404', path: "/404",
component: () => import('@/views/error/404'), component: () => import("@/views/error/404"),
hidden: true hidden: true,
}, },
{ {
path: '/401', path: "/401",
component: () => import('@/views/error/401'), component: () => import("@/views/error/401"),
hidden: true hidden: true,
}, },
{ {
path: '', path: "",
component: Layout, component: Layout,
redirect: 'index', redirect: "index",
children: [ children: [],
{
path: 'index',
component: () => import('@/views/index'),
name: 'Index',
meta: { title: '首页', icon: 'dashboard', affix: true }
}
]
}, },
{ {
path: '/user', path: "/index",
component: () => import("@/views/index"),
name: "Index",
meta: { title: "首页", icon: "dashboard", affix: true },
},
{
path: "/user",
component: Layout, component: Layout,
hidden: true, hidden: true,
redirect: 'noredirect', redirect: "noredirect",
children: [ children: [
{ {
path: 'profile', path: "profile",
component: () => import('@/views/system/user/profile/index'), component: () => import("@/views/system/user/profile/index"),
name: 'Profile', name: "Profile",
meta: { title: '个人中心', icon: 'user' } meta: { title: "个人中心", icon: "user" },
} },
] ],
} },
] ];
// 动态路由,基于用户权限动态去加载 // 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [ export const dynamicRoutes = [
{ {
path: '/system/user-auth', path: "/system/user-auth",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['system:user:edit'], permissions: ["system:user:edit"],
children: [ children: [
{ {
path: 'role/:userId(\\d+)', path: "role/:userId(\\d+)",
component: () => import('@/views/system/user/authRole'), component: () => import("@/views/system/user/authRole"),
name: 'AuthRole', name: "AuthRole",
meta: { title: '分配角色', activeMenu: '/system/user' } meta: { title: "分配角色", activeMenu: "/system/user" },
} },
] ],
}, },
{ {
path: '/system/role-auth', path: "/system/role-auth",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['system:role:edit'], permissions: ["system:role:edit"],
children: [ children: [
{ {
path: 'user/:roleId(\\d+)', path: "user/:roleId(\\d+)",
component: () => import('@/views/system/role/authUser'), component: () => import("@/views/system/role/authUser"),
name: 'AuthUser', name: "AuthUser",
meta: { title: '分配用户', activeMenu: '/system/role' } meta: { title: "分配用户", activeMenu: "/system/role" },
} },
] ],
}, },
{ {
path: '/system/dict-data', path: "/system/dict-data",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['system:dict:list'], permissions: ["system:dict:list"],
children: [ children: [
{ {
path: 'index/:dictId(\\d+)', path: "index/:dictId(\\d+)",
component: () => import('@/views/system/dict/data'), component: () => import("@/views/system/dict/data"),
name: 'Data', name: "Data",
meta: { title: '字典数据', activeMenu: '/system/dict' } meta: { title: "字典数据", activeMenu: "/system/dict" },
} },
] ],
}, },
{ {
path: '/monitor/job-log', path: "/monitor/job-log",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['monitor:job:list'], permissions: ["monitor:job:list"],
children: [ children: [
{ {
path: 'index/:jobId(\\d+)', path: "index/:jobId(\\d+)",
component: () => import('@/views/monitor/job/log'), component: () => import("@/views/monitor/job/log"),
name: 'JobLog', name: "JobLog",
meta: { title: '调度日志', activeMenu: '/monitor/job' } meta: { title: "调度日志", activeMenu: "/monitor/job" },
} },
] ],
}, },
{ {
path: '/tool/gen-edit', path: "/tool/gen-edit",
component: Layout, component: Layout,
hidden: true, hidden: true,
permissions: ['tool:gen:edit'], permissions: ["tool:gen:edit"],
children: [ children: [
{ {
path: 'index/:tableId(\\d+)', path: "index/:tableId(\\d+)",
component: () => import('@/views/tool/gen/editTable'), component: () => import("@/views/tool/gen/editTable"),
name: 'GenEdit', name: "GenEdit",
meta: { title: '修改生成配置', activeMenu: '/tool/gen' } meta: { title: "修改生成配置", activeMenu: "/tool/gen" },
} },
] ],
} },
] ];
// 防止连续点击多次路由报错 // 防止连续点击多次路由报错
let routerPush = Router.prototype.push; let routerPush = Router.prototype.push;
let routerReplace = Router.prototype.replace; let routerReplace = Router.prototype.replace;
// push // push
Router.prototype.push = function push(location) { Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(err => err) return routerPush.call(this, location).catch((err) => err);
} };
// replace // replace
Router.prototype.replace = function push(location) { Router.prototype.replace = function push(location) {
return routerReplace.call(this, location).catch(err => err) return routerReplace.call(this, location).catch((err) => err);
} };
export default new Router({ export default new Router({
mode: 'history', // 去掉url中的# mode: "history", // 去掉url中的#
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes routes: constantRoutes,
}) });

File diff suppressed because it is too large Load Diff

@ -88,7 +88,7 @@
</template> </template>
<script> <script>
import NavigationBar from "@/components/NavigationBar"; import NavigationBar from "@/components/NavigationBar/index.vue";
import { getCodeImg } from "@/api/login"; import { getCodeImg } from "@/api/login";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import { encrypt, decrypt } from "@/utils/jsencrypt"; import { encrypt, decrypt } from "@/utils/jsencrypt";
@ -103,7 +103,7 @@ export default {
codeUrl: "", codeUrl: "",
loginForm: { loginForm: {
username: "admin", username: "admin",
password: "admin123", password: "Xingyu@2022",
rememberMe: false, rememberMe: false,
code: "", code: "",
uuid: "", uuid: "",

Loading…
Cancel
Save