Compare commits

...

11 Commits
main ... sy

Author SHA1 Message Date
hh 4f91f5c72b 2024-05-24 11:17:22 +08:00
hh 04f7b8a967 login修改 2024-05-06 10:55:13 +08:00
hh d1dbd81f8e 微调 2024-04-13 15:33:40 +08:00
hh d444168170 修改 2024-04-12 22:25:06 +08:00
hh 1963108a29 修改 2024-04-12 15:34:25 +08:00
hh bc7483cdb2 修复bug 2024-04-07 14:07:27 +08:00
hh 66c5734ce9 ui修改 2024-04-06 22:48:26 +08:00
hh d1baecbe16 ui修改 2024-04-06 19:19:15 +08:00
hh ccb7413bd8 ui修改 2024-04-06 18:31:07 +08:00
hh 6613d0a3e7 一些修改 2024-04-05 23:05:43 +08:00
hh c4c2d9e4bc 暂时存一下 2024-04-01 23:37:02 +08:00
34 changed files with 1412 additions and 1110 deletions

2
.env
View File

@ -1,5 +1,5 @@
NODE_ENV=production
VUE_APP_PLATFORM_NAME=XXX平台
VUE_APP_PLATFORM_NAME=天气分析系统
# 开启单点登录
VUE_APP_SSO=false
# 开启微应用模式

134
package-lock.json generated
View File

@ -20,6 +20,8 @@
"cron-parser": "^2.10.0",
"dayjs": "^1.8.0",
"dom-align": "1.12.0",
"echarts": "^5.5.0",
"element-ui": "^2.15.14",
"enquire.js": "^2.1.6",
"js-cookie": "^2.2.0",
"lodash.get": "^4.4.2",
@ -9103,7 +9105,6 @@
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
@ -9690,6 +9691,20 @@
"safer-buffer": "^2.1.0"
}
},
"node_modules/echarts": {
"version": "5.5.0",
"resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.5.0.tgz",
"integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==",
"dependencies": {
"tslib": "2.3.0",
"zrender": "5.5.0"
}
},
"node_modules/echarts/node_modules/tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
},
"node_modules/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@ -9710,6 +9725,30 @@
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.495.tgz",
"integrity": "sha512-cIPX+4Y3RH/+SoqYd168Rx//CnjsZSdF3XTUhwMf3dwYuTfvWIgmmy6s1ipptGaOA+scH2Vj57Mc9fqp/ho22Q=="
},
"node_modules/element-ui": {
"version": "2.15.14",
"resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.14.tgz",
"integrity": "sha512-2v9fHL0ZGINotOlRIAJD5YuVB8V7WKxrE9Qy7dXhRipa035+kF7WuU/z+tEmLVPBcJ0zt8mOu1DKpWcVzBK8IA==",
"dependencies": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
"deepmerge": "^1.2.0",
"normalize-wheel": "^1.0.1",
"resize-observer-polyfill": "^1.5.0",
"throttle-debounce": "^1.0.1"
},
"peerDependencies": {
"vue": "^2.5.17"
}
},
"node_modules/element-ui/node_modules/async-validator": {
"version": "1.8.5",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz",
"integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
"dependencies": {
"babel-runtime": "6.x"
}
},
"node_modules/elliptic": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",
@ -14749,6 +14788,11 @@
"node": ">=4"
}
},
"node_modules/normalize-wheel": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
"integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
},
"node_modules/npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
@ -19866,6 +19910,14 @@
"webpack": "^2.0.0 || ^3.0.0 || ^4.0.0"
}
},
"node_modules/throttle-debounce": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
"integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg==",
"engines": {
"node": ">=4"
}
},
"node_modules/through": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
@ -22094,6 +22146,19 @@
"engines": {
"node": ">=4"
}
},
"node_modules/zrender": {
"version": "5.5.0",
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.5.0.tgz",
"integrity": "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==",
"dependencies": {
"tslib": "2.3.0"
}
},
"node_modules/zrender/node_modules/tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
}
},
"dependencies": {
@ -29815,8 +29880,7 @@
"deepmerge": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==",
"dev": true
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
},
"default-gateway": {
"version": "5.0.5",
@ -30310,6 +30374,22 @@
"safer-buffer": "^2.1.0"
}
},
"echarts": {
"version": "5.5.0",
"resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.5.0.tgz",
"integrity": "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==",
"requires": {
"tslib": "2.3.0",
"zrender": "5.5.0"
},
"dependencies": {
"tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
}
}
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@ -30326,6 +30406,29 @@
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.495.tgz",
"integrity": "sha512-cIPX+4Y3RH/+SoqYd168Rx//CnjsZSdF3XTUhwMf3dwYuTfvWIgmmy6s1ipptGaOA+scH2Vj57Mc9fqp/ho22Q=="
},
"element-ui": {
"version": "2.15.14",
"resolved": "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.14.tgz",
"integrity": "sha512-2v9fHL0ZGINotOlRIAJD5YuVB8V7WKxrE9Qy7dXhRipa035+kF7WuU/z+tEmLVPBcJ0zt8mOu1DKpWcVzBK8IA==",
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
"deepmerge": "^1.2.0",
"normalize-wheel": "^1.0.1",
"resize-observer-polyfill": "^1.5.0",
"throttle-debounce": "^1.0.1"
},
"dependencies": {
"async-validator": {
"version": "1.8.5",
"resolved": "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz",
"integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
"requires": {
"babel-runtime": "6.x"
}
}
}
},
"elliptic": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",
@ -34458,6 +34561,11 @@
"sort-keys": "^1.0.0"
}
},
"normalize-wheel": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
"integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
},
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
@ -38647,6 +38755,11 @@
"neo-async": "^2.6.0"
}
},
"throttle-debounce": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
"integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
},
"through": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
@ -40464,6 +40577,21 @@
"dev": true
}
}
},
"zrender": {
"version": "5.5.0",
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.5.0.tgz",
"integrity": "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==",
"requires": {
"tslib": "2.3.0"
},
"dependencies": {
"tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
}
}
}
}
}

View File

@ -10,42 +10,44 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@jeecg/antd-online-mini": "3.4.3-beta2",
"ant-design-vue": "^1.7.2",
"@antv/data-set": "^0.11.4",
"viser-vue": "^2.4.8",
"@jeecg/antd-online-mini": "3.4.3-beta2",
"@tinymce/tinymce-vue": "2.1.0",
"@toast-ui/editor": "^2.1.2",
"ant-design-vue": "^1.7.2",
"axios": "^0.18.0",
"china-area-data": "^5.0.1",
"clipboard": "^2.0.4",
"codemirror": "^5.46.0",
"cron-parser": "^2.10.0",
"dayjs": "^1.8.0",
"dom-align": "1.12.0",
"echarts": "^5.5.0",
"element-ui": "^2.15.14",
"enquire.js": "^2.1.6",
"js-cookie": "^2.2.0",
"lodash.get": "^4.4.2",
"lodash.pick": "^4.4.0",
"md5": "^2.2.1",
"nprogress": "^0.2.0",
"qiankun": "^2.5.1",
"tinymce": "5.4.1",
"viser-vue": "^2.4.8",
"vue": "^2.6.10",
"vue-area-linkage": "^5.1.0",
"vue-cropper": "^0.5.4",
"vue-i18n": "^8.7.0",
"vue-loader": "^15.7.0",
"vue-ls": "^3.2.0",
"vue-router": "^3.0.1",
"vuex": "^3.1.0",
"vue-print-nb-jeecg": "^1.0.12",
"clipboard": "^2.0.4",
"vue-photo-preview": "^1.1.3",
"vue-print-nb-jeecg": "^1.0.12",
"vue-router": "^3.0.1",
"vue-splitpane": "^1.0.4",
"vuedraggable": "^2.20.0",
"codemirror": "^5.46.0",
"@tinymce/tinymce-vue": "2.1.0",
"tinymce": "5.4.1",
"@toast-ui/editor": "^2.1.2",
"vue-area-linkage": "^5.1.0",
"china-area-data": "^5.0.1",
"dom-align": "1.12.0",
"xe-utils": "2.4.8",
"vuex": "^3.1.0",
"vxe-table": "2.9.13",
"vxe-table-plugin-antd": "1.8.10",
"cron-parser": "^2.10.0",
"qiankun": "^2.5.1",
"xe-utils": "2.4.8",
"xss": "^1.0.13"
},
"devDependencies": {
@ -55,13 +57,13 @@
"@vue/cli-service": "^3.3.0",
"@vue/eslint-config-standard": "^4.0.0",
"babel-eslint": "7.2.3",
"compression-webpack-plugin": "^3.1.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.1.0",
"html-webpack-plugin": "^4.2.0",
"less": "^3.9.0",
"less-loader": "^4.1.0",
"vue-template-compiler": "^2.6.10",
"html-webpack-plugin": "^4.2.0",
"compression-webpack-plugin": "^3.1.0"
"vue-template-compiler": "^2.6.10"
},
"eslintConfig": {
"root": true,
@ -99,7 +101,10 @@
"vue/html-closing-bracket-newline": 0,
"vue/no-parsing-error": 0,
"no-tabs": 0,
"indent": ["off", 2],
"indent": [
"off",
2
],
"no-console": 0,
"space-before-function-paren": 0
}

11
public/index.html vendored
View File

@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>XXX平台</title>
<title>天气分析系统</title>
<link rel="icon" href="<%= BASE_URL %>logo.png">
<script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
<style>
@ -139,7 +139,7 @@
top: 0;
width: 51%;
height: 100%;
background: #000000;
background: #6de9e9;
/* Old browsers */
z-index: 1000;
-webkit-transform: translateX(0);
@ -246,13 +246,6 @@
<body>
<div id="app">
<div id="loader-wrapper">
<!-- #loader是动画 -->
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title">
正在加载中,请耐心等待
</div>
</div>
</div>

BIN
public/logo.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
src/assets/back.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
src/assets/home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 43 KiB

BIN
src/assets/ppt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 KiB

View File

@ -183,7 +183,7 @@
* @param title 要修改的新标题
*/
changeTitle(title) {
let projectTitle = "XXX平台"
let projectTitle = "天气分析系统"
//
if (this.$route.path === indexKey) {
document.title = projectTitle

View File

@ -42,12 +42,12 @@
.container {
width: 100%;
min-height: 100%;
// background: #f0f2f5 url(~@/assets/lol.jpeg) no-repeat ;
background: #5b9dff ;
//
background: #f0f2f5 url(~@/assets/back.jpeg) no-repeat ;
// background: #5b9dff;
background-size: 100%;
padding: 110px 0 144px;
position: relative;
a {
text-decoration: none;
}

View File

@ -1,181 +1,202 @@
<template>
<a-layout-sider
:class="['sider', isDesktop() ? null : 'shadow', theme, fixSiderbar ? 'ant-fixed-sidemenu' : null ]"
width="208px"
:collapsible="collapsible"
v-model="collapsed"
:trigger="null">
<a-layout-sider :class="['sider', isDesktop() ? null : 'shadow', theme, fixSiderbar ? 'ant-fixed-sidemenu' : null]"
width="160px" :collapsible="collapsible" v-model="collapsed" :trigger="null">
<logo />
<s-menu
:collapsed="collapsed"
:menu="menus"
:theme="theme"
@select="onSelect"
@updateMenuTitle="onUpdateMenuTitle"
:mode="mode"
:style="smenuStyle">
<s-menu :collapsed="collapsed" :menu="menus" :theme="theme" @select="onSelect" @updateMenuTitle="onUpdateMenuTitle"
:mode="mode" :style="smenuStyle">
</s-menu>
<a-button type="link" style="padding-left: 50px;padding-right: 50px;"
@click="handleLogout">
退出登录
</a-button>
</a-layout-sider>
</template>
<script>
import ALayoutSider from 'ant-design-vue/es/layout/Sider'
import Logo from '../tools/Logo'
import SMenu from './index'
import { mixin, mixinDevice } from '@/utils/mixin.js'
import ALayoutSider from 'ant-design-vue/es/layout/Sider'
import Logo from '../tools/Logo'
import SMenu from './index'
import { mapActions, mapGetters, mapState } from 'vuex'
import { mixin, mixinDevice } from '@/utils/mixin.js'
export default {
name: "SideMenu",
components: { ALayoutSider, Logo, SMenu },
mixins: [mixin, mixinDevice],
props: {
mode: {
type: String,
required: false,
default: 'inline'
},
theme: {
type: String,
required: false,
default: 'dark'
},
collapsible: {
type: Boolean,
required: false,
default: false
},
collapsed: {
type: Boolean,
required: false,
default: false
},
menus: {
type: Array,
required: true
}
export default {
name: "SideMenu",
components: { ALayoutSider, Logo, SMenu },
mixins: [mixin, mixinDevice],
props: {
mode: {
type: String,
required: false,
default: 'inline'
},
computed:{
smenuStyle() {
let style = { 'padding': '0' }
if (this.fixSiderbar) {
style['height'] = 'calc(100% - 59px)'
style['overflow'] = 'auto'
style['overflow-x'] = 'hidden'
}
return style
}
theme: {
type: String,
required: false,
default: 'dark'
},
methods: {
onSelect (obj) {
this.$emit('menuSelect', obj)
},
onUpdateMenuTitle (obj) {
this.$emit('updateMenuTitle', obj)
}
collapsible: {
type: Boolean,
required: false,
default: false
},
collapsed: {
type: Boolean,
required: false,
default: false
},
menus: {
type: Array,
required: true
}
},
computed: {
smenuStyle() {
let style = { 'padding': '0' }
if (this.fixSiderbar) {
style['height'] = 'calc(100% - 59px)'
style['overflow'] = 'auto'
style['overflow-x'] = 'hidden'
}
return style
}
},
methods: {
onSelect(obj) {
this.$emit('menuSelect', obj)
},
onUpdateMenuTitle(obj) {
this.$emit('updateMenuTitle', obj)
},
...mapActions(["Logout"]),
handleLogout() {
const that = this
this.$confirm({
title: '提示',
content: '您确定要退出登录吗',
onOk() {
return that.Logout({}).then(() => {
window.location.reload()
}).catch(err => {
that.$message.error({
title: '错误',
description: err.message
})
})
},
onCancel() {
},
});
},
}
}
</script>
<style lang="less" scoped>
/* update_begin author:sunjianlei date:20190509 for: 修改侧边导航栏滚动条的样式 */
.sider {
@scrollBarSize: 10px;
/* update_begin author:sunjianlei date:20190509 for: 修改侧边导航栏滚动条的样式 */
.sider {
@scrollBarSize: 10px;
ul.ant-menu {
ul.ant-menu {
/* 定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
&::-webkit-scrollbar {
width: @scrollBarSize;
height: @scrollBarSize;
background-color: transparent;
display: none;
}
& .-o-scrollbar {
display: none;
}
/* 兼容IE */
-ms-overflow-style: none;
-ms-scroll-chaining: chained;
-ms-content-zooming: zoom;
-ms-scroll-rails: none;
-ms-content-zoom-limit-min: 100%;
-ms-content-zoom-limit-max: 500%;
-ms-scroll-snap-type: proximity;
-ms-scroll-snap-points-x: snapList(100%, 200%, 300%, 400%, 500%);
/* 定义滚动条轨道 */
&::-webkit-scrollbar-track {
background-color: transparent;
}
/* 定义滑块 */
&::-webkit-scrollbar-thumb {
border-radius: @scrollBarSize;
background-color: #eee;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
&:hover {
background-color: #dddddd;
}
&:active {
background-color: #bbbbbb;
}
}
/* 定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
&::-webkit-scrollbar {
width: @scrollBarSize;
height: @scrollBarSize;
background-color: transparent;
display: none;
}
/** 暗色系滚动条样式 */
&.dark ul.ant-menu {
&::-webkit-scrollbar-thumb {
background-color: #666666;
&:hover {
background-color: #808080;
}
&:active {
background-color: #999999;
}
}
& .-o-scrollbar {
display: none;
}
/* 兼容IE */
-ms-overflow-style: none;
-ms-scroll-chaining: chained;
-ms-content-zooming: zoom;
-ms-scroll-rails: none;
-ms-content-zoom-limit-min: 100%;
-ms-content-zoom-limit-max: 500%;
-ms-scroll-snap-type: proximity;
-ms-scroll-snap-points-x: snapList(100%, 200%, 300%, 400%, 500%);
/* 定义滚动条轨道 */
&::-webkit-scrollbar-track {
background-color: transparent;
}
/* 定义滑块 */
&::-webkit-scrollbar-thumb {
border-radius: @scrollBarSize;
background-color: #eee;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
&:hover {
background-color: #dddddd;
}
&:active {
background-color: #bbbbbb;
}
}
}
/* update_end author:sunjianlei date:20190509 for: 修改侧边导航栏滚动条的样式 */
/** 暗色系滚动条样式 */
&.dark ul.ant-menu {
&::-webkit-scrollbar-thumb {
background-color: #666666;
&:hover {
background-color: #808080;
}
&:active {
background-color: #999999;
}
}
}
}
/* update_end author:sunjianlei date:20190509 for: 修改侧边导航栏滚动条的样式 */
</style>
<!-- update_begin author:sunjianlei date:20190530 for: 选中首页的时候不显示背景颜色 -->
<style lang="less">
//
.sider .ant-menu.ant-menu-root {
& > .ant-menu-item:first-child {
background-color: transparent;
//
.sider .ant-menu.ant-menu-root {
&>.ant-menu-item:first-child {
background-color: transparent;
& > a, & > a:hover {
color: rgba(0, 0, 0, 0.65);
}
&.ant-menu-item-selected {
& > a, & > a:hover {
color: @primary-color;
}
}
&>a,
&>a:hover {
color: rgba(0, 0, 0, 0.65);
}
&.ant-menu-dark > .ant-menu-item:first-child {
& > a, & > a:hover {
color: rgba(255, 255, 255, 0.65);
}
&.ant-menu-item-selected {
&.ant-menu-item-selected {
& > a, & > a:hover {
color: rgba(255, 255, 255, 1);
}
&>a,
&>a:hover {
color: @primary-color;
}
}
}
&.ant-menu-dark>.ant-menu-item:first-child {
&>a,
&>a:hover {
color: rgba(255, 255, 255, 0.65);
}
&.ant-menu-item-selected {
&>a,
&>a:hover {
color: rgba(255, 255, 255, 1);
}
}
}
}
</style>
<!-- update_end author:sunjianlei date:20190530 for: 选中首页的时候不显示背景颜色 -->

View File

@ -1,51 +1,4 @@
<template>
<!-- , width: fixedHeader ? `calc(100% - ${sidebarOpened ? 256 : 80}px)` : '100%' -->
<a-layout-header
v-if="!headerBarFixed"
:class="[fixedHeader && 'ant-header-fixedHeader', sidebarOpened ? 'ant-header-side-opened' : 'ant-header-side-closed', ]"
:style="{ padding: '0' }">
<div v-if="mode === 'sidemenu'" class="header" :class="theme">
<a-icon
v-if="device==='mobile'"
class="trigger"
:type="collapsed ? 'menu-fold' : 'menu-unfold'"
@click="toggle"></a-icon>
<a-icon
v-else
class="trigger"
:type="collapsed ? 'menu-unfold' : 'menu-fold'"
@click="toggle"/>
<span v-if="device === 'desktop'">欢迎使用</span>
<span v-else>Jeecg-Boot</span>
<user-menu :theme="theme"/>
</div>
<!-- 顶部导航栏模式 -->
<div v-else :class="['top-nav-header-index', theme]">
<div class="header-index-wide">
<div class="header-index-left" :style="topMenuStyle.headerIndexLeft">
<logo class="top-nav-header" :show-title="device !== 'mobile'" :style="topMenuStyle.topNavHeader"/>
<div v-if="device !== 'mobile'" :style="topMenuStyle.topSmenuStyle">
<s-menu
mode="horizontal"
:menu="menus"
:theme="theme"
@updateMenuTitle="handleUpdateMenuTitle"
></s-menu>
</div>
<a-icon
v-else
class="trigger"
:type="collapsed ? 'menu-fold' : 'menu-unfold'"
@click="toggle"></a-icon>
</div>
<user-menu class="header-index-right" :theme="theme" :style="topMenuStyle.headerIndexRight"/>
</div>
</div>
</a-layout-header>
</template>
<script>

View File

@ -1,27 +1,7 @@
<template>
<a-layout class="layout" :class="[device]">
<template v-if="layoutMode === 'sidemenu'">
<a-drawer
v-if="device === 'mobile'"
:wrapClassName="'drawer-sider ' + navTheme"
placement="left"
@close="() => this.collapsed = false"
:closable="false"
:visible="collapsed"
width="200px"
>
<side-menu
mode="inline"
v-if="device === 'mobile'"
:menus="menus"
@menuSelect="menuSelect"
@updateMenuTitle="handleUpdateMenuTitle"
:theme="navTheme"
:collapsed="false"
:collapsible="true"></side-menu>
</a-drawer>
<template>
<side-menu
v-show="device === 'desktop'"
mode="inline"
@ -32,27 +12,6 @@
:collapsed="collapsed"
:collapsible="true"></side-menu>
</template>
<!-- 下次优化这些代码 -->
<template v-else>
<a-drawer
v-if="device === 'mobile'"
:wrapClassName="'drawer-sider ' + navTheme"
placement="left"
@close="() => this.collapsed = false"
:closable="false"
:visible="collapsed"
width="200px"
>
<side-menu
mode="inline"
:menus="menus"
@menuSelect="menuSelect"
@updateMenuTitle="handleUpdateMenuTitle"
:theme="navTheme"
:collapsed="false"
:collapsible="true"></side-menu>
</a-drawer>
</template>
<a-layout
:class="[layoutMode, `content-width-${contentWidth}`]"

View File

@ -1,14 +1,4 @@
<template>
<div class="logo">
<router-link :to="routerLinkTo">
<!-- update-begin- author:sunjianlei --- date:20190814 --- for: logo颜色根据主题颜色变化 -->
<img src="~@/assets/logo.png" alt="logo">
<!-- update-begin- author:sunjianlei --- date:20190814 --- for: logo颜色根据主题颜色变化 -->
<h1 v-if="showTitle">{{ title }}</h1>
</router-link>
</div>
</template>
<script>
@ -20,7 +10,7 @@ export default {
props: {
title: {
type: String,
default: 'XXX平台',
default: '天气分析系统',
required: false
},
showTitle: {

View File

@ -22,7 +22,7 @@ export default {
fixSiderbar: false, // sticky siderbar
autoHideHeader: false, // auto hide header
colorWeak: false,
multipage: true, //默认多页签模式
multipage: false, //默认多页签模式
// vue-ls options
storageOptions: {
namespace: 'pro__', // key prefix

View File

@ -7,7 +7,9 @@ import Storage from 'vue-ls'
import router from './router'
import store from './store/'
import { VueAxios } from "@/utils/request"
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)
require('@jeecg/antd-online-mini')
require('@jeecg/antd-online-mini/dist/OnlineForm.css')

View File

@ -1,8 +1,34 @@
<template>
<div>
这是首页
<div style="padding: 10px;">
<el-card>
<template #header>
<div style="font-size: 25px;">
天气分析系统
</div>
</template>
<div class="center">
<img style="width: 512px;height: 440px;margin-left: 40px;margin-top: 20px;" src="@/assets/ppt.png">
<div style="width: 450px;margin-left: 40px;margin-top: 100px;font-size: 25px;">
<div style="font-size: 30px;margin-left: 20px;margin-bottom: 15px;">基于spark的天气数据分析系统</div>
<div>利用网络爬虫技术从天气网站爬取历史天气数据构建天气数据分析系统
实现对天气状况温度降雨量风向和气压等维度的分析及可视化展示</div>
</div>
</div>
</el-card>
</div>
</template>
<script>
</script>
</script>
<style lang="less" scoped>
.card {
padding: 10px;
}
.center {
height: 500px;
display: flex;
}
</style>

105
src/views/sy/an.vue Normal file
View File

@ -0,0 +1,105 @@
<template>
<div style="padding: 10px;">
<el-card>
<template #header>
<span style="font-size: 25px;">
近一年最高气温和最低气温变化情况
</span>
<span style="float: right;display: flex;">
<el-button style="margin-left: 10px;" type="primary" @click="goto">刷新</el-button>
</span>
</template>
<div class="center" v-loading="loading">
<div id="chart1" style="width: 100%;height: 100%;"></div>
</div>
</el-card>
</div>
</template>
<script>
import { getAction } from '@/api/manage'
import * as echarts from 'echarts';
export default {
name: "get",
data() {
return {
loading: false,
url: "/sy/analysis",
}
},
mounted() {
this.goto()
},
methods: {
goto() {
//1.5
this.loading = true
this.$message.info('开始分析天气数据')
getAction(this.url).then((res) => {
this.initChart(res.result)
this.loading = false
})
},
initChart(data) {
this.chart1(data.temperature)
},
chart1(data) {
const chart1 = echarts.init(document.getElementById('chart1'))
const option = {
tooltip: {
trigger: 'axis'
},
legend: {
data: ['最高温度', '最低温度']
},
dataZoom: [
{
type: 'slider',
start: 0,
end: 100
}
],
xAxis: {
type: 'time',
boundaryGap: false
},
yAxis: {
type: 'value'
},
series: [
{
name: '最高温度',
//
data: data.highTemperature.map(item => [new Date(item.date).getTime(), +item.temperature]),
type: 'line',
symbol: "none"
},
{
name: '最低温度',
//
data: data.lowTemperature.map(item => [new Date(item.date).getTime(), +item.temperature]),
type: 'line',
symbol: "none"
}
]
};
chart1.setOption(option);
},
}
}
</script>
<style lang="less" scoped>
.card {
padding: 10px;
}
.center {
height: 400px;
}
</style>

85
src/views/sy/an2.vue Normal file
View File

@ -0,0 +1,85 @@
<template>
<div style="padding: 10px;">
<el-card>
<template #header>
<span style="font-size: 25px;">
近一年不同风力风向天数排序情况
</span>
<span style="float: right;display: flex;">
<el-button style="margin-left: 10px;" type="primary" @click="goto">刷新</el-button>
</span>
</template>
<div class="center" v-loading="loading">
<div id="chart2" style="width: 100%;height: 100%;"></div>
</div>
</el-card>
</div>
</template>
<script>
import { getAction } from '@/api/manage'
import * as echarts from 'echarts';
export default {
name: "get",
data() {
return {
loading: false,
url: "/sy/analysis",
}
},
mounted() {
this.goto()
},
methods: {
goto() {
//1.5
this.loading = true
this.$message.info('开始分析天气数据')
getAction(this.url).then((res) => {
this.initChart(res.result)
this.loading = false
})
},
initChart(data) {
this.chart2(data.wind)
},
chart2(data) {
const chart2 = echarts.init(document.getElementById('chart2'))
const option = {
xAxis: {
type: 'value',
},
yAxis: {
type: 'category',
data: data.wind,
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
series: [
{
data: data.count.map((value, index) => [value, index]),
type: 'bar'
}
]
};
chart2.setOption(option)
},
}
}
</script>
<style lang="less" scoped>
.card {
padding: 10px;
}
.center {
height: 800px;
}
</style>

95
src/views/sy/an3.vue Normal file
View File

@ -0,0 +1,95 @@
<template>
<div style="padding: 10px;">
<el-card>
<template #header>
<span style="font-size: 25px;">
近一年天气出现的次数
</span>
<span style="float: right;display: flex;">
<el-button style="margin-left: 10px;" type="primary" @click="goto">刷新</el-button>
</span>
</template>
<div class="center" v-loading="loading">
<div id="chart3" style="width: 100%;height: 100%;"></div>
</div>
</el-card>
</div>
</template>
<script>
import { getAction } from '@/api/manage'
import * as echarts from 'echarts';
export default {
name: "get",
data() {
return {
loading: false,
url: "/sy/analysis",
}
},
mounted() {
this.goto()
},
methods: {
goto() {
//1.5
this.loading = true
this.$message.info('开始分析天气数据')
getAction(this.url).then((res) => {
this.initChart(res.result)
this.loading = false
})
},
initChart(data) {
this.chart3(data.temperatureMap)
},
chart3(data) {
const chart3 = echarts.init(document.getElementById('chart3'))
// ECharts
const option = {
title: {
text: '天气情况',
left: 'center'
},
tooltip: {
trigger: 'item'
},
legend: {
orient: 'vertical',
left: 'left'
},
series: [
{
name: 'Access From',
type: 'pie',
radius: '50%',
data: data,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
chart3.setOption(option);
}
}
}
</script>
<style lang="less" scoped>
.card {
padding: 10px;
}
.center {
height: 400px;
}
</style>

109
src/views/sy/fe.vue Normal file
View File

@ -0,0 +1,109 @@
<template>
<div style="padding: 10px;">
<el-card>
<template #header>
<span style="font-size: 25px;">
天气预测
</span>
<span style="float: right;display: flex;">
<el-button style="margin-left: 10px;" type="primary" @click="goto">刷新</el-button>
</span>
</template>
<div class="center" v-loading="loading">
<div id="chart1" style="width: 100%;height: 50%;"></div>
<el-table :data="tableData" style="width: 100%;padding-top: 20px;" max-height="250">
<el-table-column prop="data" label="日期" width="180">
</el-table-column>
<el-table-column prop="temperature" label="最高温度" width="180">
</el-table-column>
<el-table-column prop="weather" label="天气">
</el-table-column>
</el-table>
</div>
</el-card>
</div>
</template>
<script>
import { getAction } from '@/api/manage'
import * as echarts from 'echarts';
export default {
name: "get",
data() {
return {
loading: false,
url: "/sy/fe",
tableData: [],
}
},
mounted() {
this.goto()
},
methods: {
goto() {
//1.5
this.loading = true
this.$message.info('开始分析天气数据')
getAction(this.url).then((res) => {
this.initChart(res.result)
this.tableData = res.result.data
this.loading = false
})
},
initChart(data) {
this.chart1(data.data)
},
chart1(data) {
console.log(data);
const myChart = echarts.init(document.getElementById('chart1')); //
const option = {
tooltip: {
trigger: 'axis'
},
legend: {
data: ['最高温度']
},
dataZoom: [
{
type: 'slider',
start: 0,
end: 100
}
],
xAxis: {
type: 'time',
boundaryGap: false
},
yAxis: {
type: 'value'
},
series: [
{
name: '最高温度',
//
data: data.map(item => [new Date(item.data.replace(/-/g, '/')).getTime(), +item.temperature]),
type: 'line',
symbol: "none"
}
]
};
myChart.setOption(option);
}
}
}
</script>
<style lang="less" scoped>
.card {
padding: 10px;
}
.center {
height: 500px;
}
</style>

65
src/views/sy/get.vue Normal file
View File

@ -0,0 +1,65 @@
<template>
<div style="padding: 10px;">
<el-card>
<template #header>
<span style="font-size: 25px;">
数据爬取
</span>
<span>
来源:
<a href="https://www.tianqishi.com/" target="_blank">天气史查询</a>
</span>
<span style="float: right;display: flex;">
<el-button style="margin-left: 10px;" type="success" @click="goto">开始爬取</el-button>
</span>
</template>
<div class="center" v-loading="loading">
<el-table :data="tableData" height="500" stripe style="width: 100%">
<el-table-column prop="data" label="日期" />
<el-table-column prop="highTemperature" label="最高温度" />
<el-table-column prop="lowTemperature" label="最低温度" />
<el-table-column prop="dayOrNight" label="天气情况" />
<el-table-column prop="air" label="AQI" />
<el-table-column prop="windSpeed" label="风力" />
<el-table-column prop="totalRainfall" label="降水量" />
</el-table>
</div>
</el-card>
</div>
</template>
<script>
import { getAction } from '@/api/manage'
export default {
name: "get",
data() {
return {
tableData: [],
loading: false,
url: "/sy/get",
}
},
methods: {
goto() {
//1.5
this.loading = true
this.$message.info('开始爬取哈尔滨的天气数据')
getAction(this.url).then((res) => {
this.tableData = res.result
this.loading = false
})
}
}
}
</script>
</script>
<style lang="less" scoped>
.card {
padding: 10px;
}
.center {
height: 500px;
}
</style>

View File

@ -8,54 +8,15 @@
<a-col :md="6" :sm="12">
<a-form-item label="账号">
<!--<a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>-->
<j-input placeholder="输入账号模糊查询" v-model="queryParam.username"></j-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-item label="性别">
<a-select v-model="queryParam.sex" placeholder="请选择性别">
<a-select-option value="">请选择</a-select-option>
<a-select-option value="1"></a-select-option>
<a-select-option value="2"></a-select-option>
</a-select>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :md="6" :sm="8">
<a-form-item label="真实名字">
<a-input placeholder="请输入真实名字" v-model="queryParam.realname"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-item label="手机号码">
<a-input placeholder="请输入手机号码查询" v-model="queryParam.phone"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-item label="用户状态">
<a-select v-model="queryParam.status" placeholder="请选择">
<a-select-option value="">请选择</a-select-option>
<a-select-option value="1">正常</a-select-option>
<a-select-option value="2">冻结</a-select-option>
</a-select>
</a-form-item>
</a-col>
</template>
<a-col :md="6" :sm="8">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<a-button @click="handleAdd" type="primary" icon="plus" style="margin-left: 8px">添加用户</a-button>
</span>
</a-col>
@ -63,71 +24,28 @@
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="border-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus" >添加用户</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<j-third-app-button biz-type="user" :selected-row-keys="selectedRowKeys" syncToApp syncToLocal @sync-finally="onSyncFinally"/>
<a-button type="primary" icon="hdd" @click="recycleBinVisible=true">回收站</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item key="1">
<a-icon type="delete" @click="batchDel"/>
删除
</a-menu-item>
<a-menu-item key="2">
<a-icon type="lock" @click="batchFrozen('2')"/>
冻结
</a-menu-item>
<a-menu-item key="3">
<a-icon type="unlock" @click="batchFrozen('1')"/>
解冻
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown>
<j-super-query :fieldList="superQueryFieldList" @handleSuperQuery="handleSuperQuery"/>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>&nbsp;&nbsp;
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
bordered
size="middle"
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<a-table ref="table" bordered size="middle" rowKey="id" :columns="columns" :dataSource="dataSource"
:pagination="ipagination" :loading="loading"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" @change="handleTableChange">
<template slot="avatarslot" slot-scope="text, record, index">
<div class="anty-img-wrap">
<a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user"/>
<a-avatar shape="square" :src="getAvatarView(record.avatar)" icon="user" />
</div>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)" >编辑</a>
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">
更多 <a-icon type="down"/>
更多 <a-icon type="down" />
</a>
<a-menu slot="overlay">
<a-menu-item>
@ -144,18 +62,6 @@
</a-popconfirm>
</a-menu-item>
<a-menu-item v-if="record.status==1">
<a-popconfirm title="确定冻结吗?" @confirm="() => handleFrozen(record.id,2,record.username)">
<a>冻结</a>
</a-popconfirm>
</a-menu-item>
<a-menu-item v-if="record.status==2">
<a-popconfirm title="确定解冻吗?" @confirm="() => handleFrozen(record.id,1,record.username)">
<a>解冻</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
@ -172,221 +78,172 @@
<sys-user-agent-modal ref="sysUserAgentModal"></sys-user-agent-modal>
<!-- 用户回收站 -->
<user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/>
<user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk" />
</a-card>
</template>
<script>
import UserModal from './modules/UserModal'
import PasswordModal from './modules/PasswordModal'
import {putAction,getFileAccessHttpUrl} from '@/api/manage';
import {frozenBatch} from '@/api/api'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import SysUserAgentModal from "./modules/SysUserAgentModal";
import JInput from '@/components/jeecg/JInput'
import UserRecycleBinModal from './modules/UserRecycleBinModal'
import JSuperQuery from '@/components/jeecg/JSuperQuery'
import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton'
import UserModal from './modules/UserModal'
import PasswordModal from './modules/PasswordModal'
import { putAction, getFileAccessHttpUrl } from '@/api/manage';
import { frozenBatch } from '@/api/api'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import SysUserAgentModal from "./modules/SysUserAgentModal";
import JInput from '@/components/jeecg/JInput'
import UserRecycleBinModal from './modules/UserRecycleBinModal'
import JSuperQuery from '@/components/jeecg/JSuperQuery'
import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton'
export default {
name: "UserList",
mixins: [JeecgListMixin],
components: {
JThirdAppButton,
SysUserAgentModal,
UserModal,
PasswordModal,
JInput,
UserRecycleBinModal,
JSuperQuery
},
data() {
return {
description: '这是用户管理页面',
queryParam: {},
recycleBinVisible: false,
columns: [
/*{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},*/
{
title: '用户账号',
align: "center",
dataIndex: 'username',
width: 120,
sorter: true
},
{
title: '用户姓名',
align: "center",
width: 100,
dataIndex: 'realname',
},
{
title: '头像',
align: "center",
width: 120,
dataIndex: 'avatar',
scopedSlots: {customRender: "avatarslot"}
},
{
title: '性别',
align: "center",
width: 80,
dataIndex: 'sex_dictText',
sorter: true
},
{
title: '生日',
align: "center",
width: 100,
dataIndex: 'birthday'
},
{
title: '手机号码',
align: "center",
width: 100,
dataIndex: 'phone'
},
{
title: '部门',
align: "center",
width: 180,
dataIndex: 'orgCodeTxt'
},
{
title: '负责部门',
align: "center",
width: 180,
dataIndex: 'departIds_dictText'
},
{
title: '状态',
align: "center",
width: 80,
dataIndex: 'status_dictText'
},
{
title: '操作',
dataIndex: 'action',
scopedSlots: {customRender: 'action'},
align: "center",
width: 170
}
],
superQueryFieldList: [
{ type: 'input', value: 'username', text: '用户账号', },
{ type: 'input', value: 'realname', text: '用户姓名', },
{ type: 'select', value: 'sex', dbType: 'int', text: '性别', dictCode: 'sex' },
],
url: {
syncUser: "/act/process/extActProcess/doSyncUser",
list: "/sys/user/list",
delete: "/sys/user/delete",
deleteBatch: "/sys/user/deleteBatch",
exportXlsUrl: "/sys/user/exportXls",
importExcelUrl: "sys/user/importExcel",
export default {
name: "UserList",
mixins: [JeecgListMixin],
components: {
JThirdAppButton,
SysUserAgentModal,
UserModal,
PasswordModal,
JInput,
UserRecycleBinModal,
JSuperQuery
},
data() {
return {
description: '这是用户管理页面',
queryParam: {},
recycleBinVisible: false,
columns: [
{
title: '用户账号',
align: "center",
dataIndex: 'username',
width: 120,
sorter: true
},
}
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}
},
methods: {
getAvatarView: function (avatar) {
return getFileAccessHttpUrl(avatar)
},
{
title: '用户姓名',
align: "center",
width: 100,
dataIndex: 'realname',
},
{
title: '状态',
align: "center",
width: 80,
dataIndex: 'status_dictText'
},
{
title: '操作',
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
align: "center",
width: 170
}
batchFrozen: function (status) {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录!');
return false;
} else {
let ids = "";
let that = this;
let isAdmin = false;
that.selectionRows.forEach(function (row) {
if (row.username == 'admin') {
isAdmin = true;
}
});
if (isAdmin) {
that.$message.warning('管理员账号不允许此操作,请重新选择!');
return;
}
that.selectedRowKeys.forEach(function (val) {
ids += val + ",";
});
that.$confirm({
title: "确认操作",
content: "是否" + (status == 1 ? "解冻" : "冻结") + "选中账号?",
onOk: function () {
frozenBatch({ids: ids, status: status}).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.loadData();
that.onClearSelected();
} else {
that.$message.warning(res.message);
}
});
}
});
}
},
handleMenuClick(e) {
if (e.key == 1) {
this.batchDel();
} else if (e.key == 2) {
this.batchFrozen(2);
} else if (e.key == 3) {
this.batchFrozen(1);
}
},
handleFrozen: function (id, status, username) {
let that = this;
//TODO
if ('admin' == username) {
that.$message.warning('管理员账号不允许此操作!');
return;
}
frozenBatch({ids: id, status: status}).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.loadData();
} else {
that.$message.warning(res.message);
}
});
},
handleChangePassword(username) {
this.$refs.passwordmodal.show(username);
},
passwordModalOk() {
//TODO datasource
},
onSyncFinally({isToLocal}) {
//
if (isToLocal) {
this.loadData()
}
],
superQueryFieldList: [
{ type: 'input', value: 'username', text: '用户账号', },
{ type: 'input', value: 'realname', text: '用户姓名', },
{ type: 'select', value: 'sex', dbType: 'int', text: '性别', dictCode: 'sex' },
],
url: {
syncUser: "/act/process/extActProcess/doSyncUser",
list: "/sys/user/list",
delete: "/sys/user/delete",
deleteBatch: "/sys/user/deleteBatch",
exportXlsUrl: "/sys/user/exportXls",
importExcelUrl: "sys/user/importExcel",
},
}
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}
},
methods: {
getAvatarView: function (avatar) {
return getFileAccessHttpUrl(avatar)
},
batchFrozen: function (status) {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录!');
return false;
} else {
let ids = "";
let that = this;
let isAdmin = false;
that.selectionRows.forEach(function (row) {
if (row.username == 'admin') {
isAdmin = true;
}
});
if (isAdmin) {
that.$message.warning('管理员账号不允许此操作,请重新选择!');
return;
}
that.selectedRowKeys.forEach(function (val) {
ids += val + ",";
});
that.$confirm({
title: "确认操作",
content: "是否" + (status == 1 ? "解冻" : "冻结") + "选中账号?",
onOk: function () {
frozenBatch({ ids: ids, status: status }).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.loadData();
that.onClearSelected();
} else {
that.$message.warning(res.message);
}
});
}
});
}
},
handleMenuClick(e) {
if (e.key == 1) {
this.batchDel();
} else if (e.key == 2) {
this.batchFrozen(2);
} else if (e.key == 3) {
this.batchFrozen(1);
}
},
handleFrozen: function (id, status, username) {
let that = this;
//TODO
if ('admin' == username) {
that.$message.warning('管理员账号不允许此操作!');
return;
}
frozenBatch({ ids: id, status: status }).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.loadData();
} else {
that.$message.warning(res.message);
}
});
},
handleChangePassword(username) {
this.$refs.passwordmodal.show(username);
},
passwordModalOk() {
//TODO datasource
},
onSyncFinally({ isToLocal }) {
//
if (isToLocal) {
this.loadData()
}
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less'
@import '~@assets/less/common.less'
</style>

View File

@ -1,27 +1,20 @@
<template>
<a-modal
title="重新设定密码"
:width="800"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
cancelText="关闭"
style="top:20px;"
>
<a-modal title="重新设定密码" :width="800" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
@cancel="handleCancel" cancelText="关闭" style="top:20px;">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item label="用户账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入用户账号" v-decorator="[ 'username', {}]" :readOnly="true"/>
<a-input placeholder="请输入用户账号" v-decorator="['username', {}]" :readOnly="true" />
</a-form-item>
<a-form-item label="登录密码" :labelCol="labelCol" :wrapperCol="wrapperCol" hasFeedback >
<a-input type="password" placeholder="请输入登录密码" v-decorator="[ 'password', validatorRules.password]" />
<a-form-item label="登录密码" :labelCol="labelCol" :wrapperCol="wrapperCol" hasFeedback>
<a-input type="password" placeholder="请输入登录密码" v-decorator="['password', validatorRules.password]" />
</a-form-item>
<a-form-item label="确认密码" :labelCol="labelCol" :wrapperCol="wrapperCol" hasFeedback >
<a-input type="password" @blur="handleConfirmBlur" placeholder="请重新输入登录密码" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
<a-form-item label="确认密码" :labelCol="labelCol" :wrapperCol="wrapperCol" hasFeedback>
<a-input type="password" @blur="handleConfirmBlur" placeholder="请重新输入登录密码"
v-decorator="['confirmpassword', validatorRules.confirmpassword]" />
</a-form-item>
</a-form>
@ -30,113 +23,111 @@
</template>
<script>
import {changePassword} from '@/api/api'
import { changePassword } from '@/api/api'
export default {
name: "PasswordModal",
data () {
return {
visible: false,
confirmLoading: false,
confirmDirty: false,
validatorRules:{
password:{
rules: [{
required: true,
pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
message: '密码由8位数字、大小写字母和特殊符号组成!'
}, {
validator: this.validateToNextPassword,
}],
},
confirmpassword:{
rules: [{
required: true, message: '请重新输入登录密码!',
}, {
validator: this.compareToFirstPassword,
}],
},
export default {
name: "PasswordModal",
data() {
return {
visible: false,
confirmLoading: false,
confirmDirty: false,
validatorRules: {
password: {
rules: [{
required: true,
}, {
validator: this.validateToNextPassword,
}],
},
confirmpassword: {
rules: [{
required: true, message: '请重新输入登录密码!',
}, {
validator: this.compareToFirstPassword,
}],
},
},
model: {},
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
form:this.$form.createForm(this)
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
form: this.$form.createForm(this)
}
},
created() {
console.log("created");
},
methods: {
show(username) {
this.form.resetFields();
this.visible = true;
this.model.username = username;
this.$nextTick(() => {
this.form.setFieldsValue({ username: username });
});
},
close() {
this.$emit('close');
this.visible = false;
this.disableSubmit = false;
this.selectedRole = [];
},
handleSubmit() {
//
this.form.validateFields((err, values) => {
if (!err) {
this.confirmLoading = true;
let formData = Object.assign(this.model, values);
changePassword(formData).then((res) => {
if (res.success) {
this.$message.success(res.message);
this.$emit('ok');
} else {
this.$message.warning(res.message);
}
}).finally(() => {
this.confirmLoading = false;
this.close();
});
}
})
},
handleCancel() {
this.close()
},
validateToNextPassword(rule, value, callback) {
const form = this.form;
const confirmpassword = form.getFieldValue('confirmpassword');
console.log("confirmpassword==>", confirmpassword);
if (value && confirmpassword && value !== confirmpassword) {
callback('两次输入的密码不一样!');
}
if (value && this.confirmDirty) {
form.validateFields(['confirm'], { force: true })
}
callback();
},
compareToFirstPassword(rule, value, callback) {
const form = this.form;
if (value && value !== form.getFieldValue('password')) {
callback('两次输入的密码不一样!');
} else {
callback()
}
},
created () {
console.log("created");
},
methods: {
show (username) {
this.form.resetFields();
this.visible = true;
this.model.username = username;
this.$nextTick(() => {
this.form.setFieldsValue({username:username});
});
},
close () {
this.$emit('close');
this.visible = false;
this.disableSubmit = false;
this.selectedRole = [];
},
handleSubmit () {
//
this.form.validateFields((err, values) => {
if (!err) {
this.confirmLoading = true;
let formData = Object.assign(this.model, values);
changePassword(formData).then((res)=>{
if(res.success){
this.$message.success(res.message);
this.$emit('ok');
}else{
this.$message.warning(res.message);
}
}).finally(() => {
this.confirmLoading = false;
this.close();
});
}
})
},
handleCancel () {
this.close()
},
validateToNextPassword (rule, value, callback) {
const form = this.form;
const confirmpassword=form.getFieldValue('confirmpassword');
console.log("confirmpassword==>",confirmpassword);
if (value && confirmpassword && value !== confirmpassword) {
callback('两次输入的密码不一样!');
}
if (value && this.confirmDirty) {
form.validateFields(['confirm'], { force: true })
}
callback();
},
compareToFirstPassword (rule, value, callback) {
const form = this.form;
if (value && value !== form.getFieldValue('password')) {
callback('两次输入的密码不一样!');
} else {
callback()
}
},
handleConfirmBlur (e) {
const value = e.target.value
this.confirmDirty = this.confirmDirty || !!value
}
handleConfirmBlur(e) {
const value = e.target.value
this.confirmDirty = this.confirmDirty || !!value
}
}
}
</script>

View File

@ -40,17 +40,6 @@
<a-input placeholder="请输入用户姓名" v-model="model.realname" />
</a-form-model-item>
<a-form-model-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workNo">
<a-input placeholder="请输入工号" v-model="model.workNo" />
</a-form-model-item>
<a-form-model-item label="手机号码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input placeholder="请输入手机号码" v-model="model.phone" />
</a-form-model-item>
<a-form-model-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-position placeholder="请选择职务" :multiple="false" v-model="model.post"/>
</a-form-model-item>
<a-form-model-item label="角色分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!roleDisabled" >
<j-multi-select-tag
@ -61,68 +50,24 @@
</j-multi-select-tag>
</a-form-model-item>
<!--部门分配-->
<a-form-model-item label="部门分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
<j-select-depart v-model="model.selecteddeparts" :multi="true" @back="backDepartInfo" :backDepart="true" :treeOpera="true">></j-select-depart>
</a-form-model-item>
<!--租户分配-->
<a-form-model-item label="租户分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
<j-multi-select-tag
:disabled="disableSubmit"
v-model="model.relTenantIds"
:options="tenantsOptions"
placeholder="请选择租户">
</j-multi-select-tag>
</a-form-model-item>
<a-form-model-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-model="model.userIdentity" @change="identityChange">
<a-radio :value="1">普通用户</a-radio>
<a-radio :value="2">上级</a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item label="负责部门" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="departIdShow==true">
<j-multi-select-tag
:disabled="disableSubmit"
v-model="model.departIds"
:options="nextDepartOptions"
placeholder="请选择负责部门">
</j-multi-select-tag>
</a-form-model-item>
<a-form-model-item label="头像" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-image-upload class="avatar-uploader" text="上传" v-model="model.avatar" ></j-image-upload>
</a-form-model-item>
<a-form-model-item label="生日" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-date-picker
style="width: 100%"
placeholder="请选择生日"
v-model="model.birthday"
:format="dateFormat"
:getCalendarContainer="node => node.parentNode"/>
</a-form-model-item>
<a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select v-model="model.sex" placeholder="请选择性别" :getPopupContainer= "(target) => target.parentNode">
<a-select-option :value="1"></a-select-option>
<a-select-option :value="2"></a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="邮箱" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="email">
<a-input placeholder="请输入邮箱" v-model="model.email" />
</a-form-model-item>
<a-form-model-item label="座机" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="telephone">
<a-input placeholder="请输入座机" v-model="model.telephone" />
</a-form-model-item>
<a-form-model-item label="工作流引擎" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag v-model="model.activitiSync" placeholder="请选择是否同步工作流引擎" :type="'radio'" dictCode="activiti_sync"/>
</a-form-model-item>
</a-form-model>
</a-spin>
@ -163,7 +108,7 @@
validatorRules:{
username:[{required: true, message: '请输入用户账号!'},
{validator: this.validateUsername,}],
password: [{required: true,pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,message: '密码由8位数字、大小写字母和特殊符号组成!'},
password: [{required: true,message: '请输入密码!'},
{validator: this.validateToNextPassword,trigger: 'change'}],
confirmpassword: [{required: true, message: '请重新输入登录密码!',},
{ validator: this.compareToFirstPassword,}],

View File

@ -1,25 +1,28 @@
<template>
<div class="main">
<div style="text-align: center; margin-bottom: 24px;font-size: 50px;color: black;">
天气分析系统
</div>
<a-form-model class="user-layout-login" @keyup.enter.native="handleSubmit">
<!-- 登录修改 -->
<login-account ref="alogin" @validateFail="validateFail" @success="requestSuccess" @fail="requestFailed"></login-account>
<a-form-model-item>
<a-checkbox @change="handleRememberMeChange" default-checked>自动登录</a-checkbox>
</a-form-model-item>
<login-account ref="alogin" @validateFail="validateFail" @success="requestSuccess"
@fail="requestFailed"></login-account>
<a-form-item style="margin-top:24px">
<a-button size="large" type="primary" htmlType="submit" class="login-button" :loading="loginBtn" @click.stop.prevent="handleSubmit" :disabled="loginBtn">确定
<a-button size="large" type="primary" htmlType="submit" class="login-button" :loading="loginBtn"
@click.stop.prevent="handleSubmit" :disabled="loginBtn">确定
</a-button>
</a-form-item>
<router-link :to="{ name: 'register' }" class="forge-password" style="float: right;margin-right: 10px;font-size: 25px;">
注册账户
</router-link>
<div style="padding-top: 15px;"></div>
</a-form-model>
<two-step-captcha v-if="requiredTwoStepCaptcha" :visible="stepCaptchaVisible" @success="stepCaptchaSuccess" @cancel="stepCaptchaCancel"></two-step-captcha>
<login-select-tenant ref="loginSelect" @success="loginSelectOk"></login-select-tenant>
</div>
</template>
<script>
import Vue from 'vue'
import { ACCESS_TOKEN, ENCRYPTED_STRING } from '@/store/mutation-types'
@ -33,170 +36,172 @@ import LoginAccount from './LoginAccount'
import LoginPhone from './LoginPhone'
export default {
components: {
LoginSelectTenant,
TwoStepCaptcha,
ThirdLogin,
LoginAccount,
LoginPhone
components: {
LoginSelectTenant,
TwoStepCaptcha,
ThirdLogin,
LoginAccount,
LoginPhone
},
data() {
return {
customActiveKey: 'tab1',
rememberMe: true,
loginBtn: false,
requiredTwoStepCaptcha: false,
stepCaptchaVisible: false,
encryptedString: {
key: "",
iv: "",
},
}
},
created() {
Vue.ls.remove(ACCESS_TOKEN)
this.getRouterData();
this.rememberMe = true
},
methods: {
handleTabClick(key) {
this.customActiveKey = key
},
data () {
return {
customActiveKey: 'tab1',
rememberMe: true,
loginBtn: false,
requiredTwoStepCaptcha: false,
stepCaptchaVisible: false,
encryptedString:{
key:"",
iv:"",
},
handleRememberMeChange(e) {
this.rememberMe = e.target.checked
},
/**跳转到登录页面的参数-账号获取*/
getRouterData() {
this.$nextTick(() => {
let temp = this.$route.params.username || this.$route.query.username || ''
if (temp) {
this.$refs.alogin.acceptUsername(temp)
}
})
},
//
handleSubmit() {
this.loginBtn = true;
if (this.customActiveKey === 'tab1') {
// 使
this.$refs.alogin.handleLogin(this.rememberMe)
} else {
//
this.$refs.plogin.handleLogin(this.rememberMe)
}
},
created() {
Vue.ls.remove(ACCESS_TOKEN)
this.getRouterData();
this.rememberMe = true
//
validateFail() {
this.loginBtn = false;
},
//
requestSuccess(loginResult) {
this.$refs.loginSelect.show(loginResult)
},
//
requestFailed(err) {
let description = ((err.response || {}).data || {}).message || err.message || "请求出现错误,请稍后再试"
this.$notification['error']({
message: '登录失败',
description: description,
duration: 4,
});
this.loginBtn = false;
},
loginSelectOk() {
this.loginSuccess()
},
//
loginSuccess() {
this.$router.push({ path: "/dashboard/analysis" }).catch(() => {
console.log('登录跳转首页出错,这个错误从哪里来的')
})
},
methods:{
handleTabClick(key){
this.customActiveKey = key
},
handleRememberMeChange(e){
this.rememberMe = e.target.checked
},
/**跳转到登录页面的参数-账号获取*/
getRouterData(){
this.$nextTick(() => {
let temp = this.$route.params.username || this.$route.query.username || ''
if (temp) {
this.$refs.alogin.acceptUsername(temp)
}
})
},
//
handleSubmit () {
this.loginBtn = true;
if (this.customActiveKey === 'tab1') {
// 使
this.$refs.alogin.handleLogin(this.rememberMe)
} else {
//
this.$refs.plogin.handleLogin(this.rememberMe)
}
},
//
validateFail(){
this.loginBtn = false;
},
//
requestSuccess(loginResult){
this.$refs.loginSelect.show(loginResult)
},
//
requestFailed (err) {
let description = ((err.response || {}).data || {}).message || err.message || "请求出现错误,请稍后再试"
this.$notification[ 'error' ]({
message: '登录失败',
description: description,
duration: 4,
stepCaptchaSuccess() {
this.loginSuccess()
},
stepCaptchaCancel() {
this.Logout().then(() => {
this.loginBtn = false
this.stepCaptchaVisible = false
})
},
//
getEncrypte() {
var encryptedString = Vue.ls.get(ENCRYPTED_STRING);
if (encryptedString == null) {
getEncryptedString().then((data) => {
this.encryptedString = data
});
//
if(this.customActiveKey === 'tab1' && description.indexOf('密码错误')>0){
this.$refs.alogin.handleChangeCheckCode()
}
this.loginBtn = false;
},
loginSelectOk(){
this.loginSuccess()
},
//
loginSuccess () {
this.$router.push({ path: "/dashboard/analysis" }).catch(()=>{
console.log('登录跳转首页出错,这个错误从哪里来的')
})
this.$notification.success({
message: '欢迎',
description: `${timeFix()},欢迎回来`,
});
},
stepCaptchaSuccess () {
this.loginSuccess()
},
stepCaptchaCancel () {
this.Logout().then(() => {
this.loginBtn = false
this.stepCaptchaVisible = false
})
},
//
getEncrypte(){
var encryptedString = Vue.ls.get(ENCRYPTED_STRING);
if(encryptedString == null){
getEncryptedString().then((data) => {
this.encryptedString = data
});
}else{
this.encryptedString = encryptedString;
}
} else {
this.encryptedString = encryptedString;
}
}
}
}
</script>
<style lang="less" scoped>
.user-layout-login {
background-color: aliceblue;
padding: 40px;
label {
font-size: 14px;
}
.user-layout-login {
padding: 50px;
//
border: 1px solid #e8e8e8;
/* 在你的 CSS 文件或 <style> 标签中定义一个新的类 */
.red-button {
background-color: rgb(0, 241, 201);
color: white;
/* 这将改变按钮上文字的颜色 */
}
label {
font-size: 14px;
}
.getCaptcha {
display: block;
width: 100%;
height: 40px;
}
display: block;
width: 100%;
height: 40px;
}
.forge-password {
font-size: 14px;
}
font-size: 14px;
}
button.login-button {
padding: 0 15px;
font-size: 16px;
height: 40px;
width: 100%;
}
button.login-button {
padding: 0 15px;
font-size: 16px;
height: 40px;
width: 100%;
}
.user-login-other {
text-align: left;
margin-top: 24px;
line-height: 22px;
text-align: left;
margin-top: 24px;
line-height: 22px;
.item-icon {
font-size: 24px;
color: rgba(0,0,0,.2);
margin-left: 16px;
vertical-align: middle;
cursor: pointer;
transition: color .3s;
font-size: 24px;
color: rgba(0, 0, 0, .2);
margin-left: 16px;
vertical-align: middle;
cursor: pointer;
transition: color .3s;
&:hover {
color: #1890ff;
}
}
.register {
float: right;
color: #1890ff;
}
}
.register {
float: right;
}
}
}
</style>
<style>
.valid-error .ant-select-selection__placeholder{
color: #f5222d;
}
.valid-error .ant-select-selection__placeholder {
color: #f5222d;
}
</style>

View File

@ -1,122 +1,121 @@
<template>
<div>
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item required prop="username">
<a-input v-model="model.username" size="large" placeholder="请输入帐户名 / admin">
<a-icon slot="prefix" type="user" :style="{ color: 'rgba(0,0,0,.25)' }"/>
</a-input>
</a-form-model-item>
<a-form-model-item required prop="password">
<a-input v-model="model.password" size="large" type="password" autocomplete="false" placeholder="请输入密码 / 123456">
<a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }"/>
</a-input>
</a-form-model-item>
</a-form-model>
</div>
<div>
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item required prop="username">
<a-input style="transform: scale(1.1)" v-model="model.username" size="large" placeholder="请输入帐户名 / admin">
<a-icon slot="prefix" type="user" :style="{ color: 'rgba(0,0,0,.25)' }" />
</a-input>
</a-form-model-item>
<a-form-model-item required prop="password">
<a-input style="transform: scale(1.1)" v-model="model.password" size="large" type="password"
autocomplete="false" placeholder="请输入密码 / 123456">
<a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }" />
</a-input>
</a-form-model-item>
</a-form-model>
</div>
</template>
<script>
import { getAction } from '@/api/manage'
import Vue from 'vue'
import { mapActions } from 'vuex'
export default {
name: 'LoginAccount',
data(){
return {
requestCodeSuccess: false,
randCodeImage: '',
currdatetime: '',
loginType: 0,
model:{
username: 'admin',
password: '123456',
},
validatorRules:{
username: [
{ required: true, message: '请输入用户名!' },
{ validator: this.handleUsernameOrEmail }
],
password: [{
required: true, message: '请输入密码!', validator: 'click'
}],
}
import { getAction } from '@/api/manage'
import Vue from 'vue'
import { mapActions } from 'vuex'
export default {
name: 'LoginAccount',
data() {
return {
requestCodeSuccess: false,
randCodeImage: '',
currdatetime: '',
loginType: 0,
model: {
username: 'syue',
password: '123456',
},
validatorRules: {
username: [
{ required: true, message: '请输入用户名!' },
{ validator: this.handleUsernameOrEmail }
],
password: [{
required: true, message: '请输入密码!', validator: 'click'
}],
}
},
methods:{
...mapActions(['Login']),
//
handleUsernameOrEmail (rule, value, callback) {
const regex = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
if (regex.test(value)) {
this.loginType = 0
} else {
this.loginType = 1
}
callback()
},
/**
* 验证字段
* @param arr
* @param callback
*/
validateFields(arr, callback){
let promiseArray = []
for(let item of arr){
let p = new Promise((resolve, reject) => {
this.$refs['form'].validateField(item, (err)=>{
if(!err){
resolve();
}else{
reject(err);
}
})
});
promiseArray.push(p)
}
Promise.all(promiseArray).then(()=>{
callback()
}).catch(err=>{
callback(err)
})
},
acceptUsername(username){
this.model['username'] = username
},
//
handleLogin(rememberMe){
this.validateFields([ 'username', 'password' ], (err)=>{
if(!err){
let loginParams = {
username: this.model.username,
password: this.model.password,
checkKey: this.currdatetime,
remember_me: rememberMe,
}
console.log("登录参数", loginParams)
this.Login(loginParams).then((res) => {
this.$emit('success', res.result)
}).catch((err) => {
//update-begin-author: taoyan date:20220425 for: #41
if(err && err.code===412){
this.handleChangeCheckCode();
}
//update-end-author: taoyan date:20220425 for: #41
this.$emit('fail', err)
});
}else{
this.$emit('validateFail')
}
})
}
}
},
methods: {
...mapActions(['Login']),
//
handleUsernameOrEmail(rule, value, callback) {
const regex = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
if (regex.test(value)) {
this.loginType = 0
} else {
this.loginType = 1
}
callback()
},
/**
* 验证字段
* @param arr
* @param callback
*/
validateFields(arr, callback) {
let promiseArray = []
for (let item of arr) {
let p = new Promise((resolve, reject) => {
this.$refs['form'].validateField(item, (err) => {
if (!err) {
resolve();
} else {
reject(err);
}
})
});
promiseArray.push(p)
}
Promise.all(promiseArray).then(() => {
callback()
}).catch(err => {
callback(err)
})
},
acceptUsername(username) {
this.model['username'] = username
},
//
handleLogin(rememberMe) {
this.validateFields(['username', 'password'], (err) => {
if (!err) {
let loginParams = {
username: this.model.username,
password: this.model.password,
checkKey: this.currdatetime,
remember_me: rememberMe,
}
console.log("登录参数", loginParams)
this.Login(loginParams).then((res) => {
this.$emit('success', res.result)
}).catch((err) => {
this.$emit('fail', err)
});
} else {
this.$emit('validateFail')
}
})
}
}
}
</script>
<style scoped>
.large-text {
font-size: 40px;
/* 你可以根据需要调整这个值 */
}
</style>

View File

@ -96,11 +96,6 @@ export default {
let multi_depart = loginResult.multi_depart
//0: 1: 2:
if(multi_depart==0){
this.$notification.warn({
message: '提示',
description: `您尚未归属部门,请确认账号信息`,
duration:3
});
this.isMultiDepart = false
}else if(multi_depart==2){
this.visible=true

View File

@ -41,8 +41,7 @@
accountName: this.userList.username,
validatorRules: {
password: [{
required: true, pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/, message: '密码由8位数字、大小写字母和特殊符号组成!!'
}],
required: true,}],
confirmPassword: [
{ required: true, message: '密码不能为空!'},
{ validator: this.handlePasswordCheck}

View File

@ -85,10 +85,6 @@ export default {
//
this.$router.replace({path: INDEX_MAIN_PAGE_PATH})
// TODO
this.$notification.success({
message: '欢迎',
description: `${timeFix()},欢迎回来`,
})
},
requestFailed(err) {
this.$error({

View File

@ -1,6 +1,8 @@
<template>
<div class="main user-layout-register">
<h3><span>注册</span></h3>
<div style="font-size: 40px; text-align: center; margin-bottom: 20px;">
注册
</div>
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item prop="username">
<a-input v-model="model.username" size="large" type="text" autocomplete="false" placeholder="请输入用户名"/>
@ -31,41 +33,6 @@
<a-form-model-item prop="password2">
<a-input v-model="model.password2" size="large" type="password" autocomplete="false" placeholder="确认密码"></a-input>
</a-form-model-item>
<a-form-model-item prop="mobile">
<a-input v-model="model.mobile" size="large" placeholder="11 位手机号">
<a-select slot="addonBefore" size="large" defaultValue="+86">
<a-select-option value="+86">+86</a-select-option>
<a-select-option value="+87">+87</a-select-option>
</a-select>
</a-input>
</a-form-model-item>
<!--<a-input-group size="large" compact>
<a-select style="width: 20%" size="large" defaultValue="+86">
<a-select-option value="+86">+86</a-select-option>
<a-select-option value="+87">+87</a-select-option>
</a-select>
<a-input style="width: 80%" size="large" placeholder="11 位手机号"></a-input>
</a-input-group>-->
<a-row :gutter="16">
<a-col class="gutter-row" :span="16">
<a-form-model-item prop="captcha">
<a-input v-model="model.captcha" size="large" type="text" placeholder="验证码">
<a-icon slot="prefix" type="mail" :style="{ color: 'rgba(0,0,0,.25)' }"/>
</a-input>
</a-form-model-item>
</a-col>
<a-col class="gutter-row" :span="8">
<a-button
class="getCaptcha"
size="large"
:disabled="state.smsSendBtn"
@click.stop.prevent="getCaptcha"
v-text="!state.smsSendBtn && '获取验证码'||(state.time+' s')"></a-button>
</a-col>
</a-row>
<a-form-model-item>
<a-button
size="large"
@ -76,7 +43,7 @@
@click.stop.prevent="handleSubmit"
:disabled="registerBtn">注册
</a-button>
<router-link class="login" :to="{ name: 'login' }">使用已有账户登录</router-link>
<router-link class="login" :to="{ name: 'login' }" style="font-size: 22px;">使用已有账户登录</router-link>
</a-form-model-item>
</a-form-model>
@ -121,7 +88,6 @@
],
password: [
{ required: false},
{ validator: this.handlePasswordLevel }
],
password2: [
{ required: false },
@ -187,38 +153,6 @@
}
})
},
handlePasswordLevel(rule, value, callback) {
let level = 0
let reg = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/;
if (!reg.test(value)) {
callback(new Error('密码由8位数字、大小写字母和特殊符号组成!'))
}
//
if (/[0-9]/.test(value)) {
level++
}
//
if (/[a-zA-Z]/.test(value)) {
level++
}
//
if (/[^0-9a-zA-Z_]/.test(value)) {
level++
}
this.state.passwordLevel = level
this.state.percent = level * 30
if (level >= 2) {
if (level >= 3) {
this.state.percent = 100
}
callback()
} else {
if (level === 0) {
this.state.percent = 10
}
callback(new Error('密码强度不够'))
}
},
handlePasswordCheck(rule, value, callback) {
let password = this.model['password']

View File

@ -186,10 +186,6 @@ export const JeecgThirdLoginMixin = {
this.$router.push({ path: "/dashboard/analysis" }).catch(()=>{
console.log('登录跳转首页出错,这个错误从哪里来的')
})
this.$notification.success({
message: '欢迎',
description: `${timeFix()},欢迎回来`,
});
},
cmsFailed(err){
this.$notification[ 'error' ]({

View File

@ -1880,6 +1880,13 @@
"resolved" "https://registry.npmjs.org/async-validator/-/async-validator-3.3.0.tgz"
"version" "3.3.0"
"async-validator@~1.8.1":
"integrity" "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA=="
"resolved" "https://registry.npmmirror.com/async-validator/-/async-validator-1.8.5.tgz"
"version" "1.8.5"
dependencies:
"babel-runtime" "6.x"
"async@^2.1.2", "async@^2.4.1", "async@^2.6.2":
"integrity" "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg=="
"resolved" "https://registry.npmjs.org/async/-/async-2.6.3.tgz"
@ -2125,7 +2132,7 @@
"babel-traverse" "^6.24.1"
"babel-types" "^6.24.1"
"babel-helper-vue-jsx-merge-props@^2.0.3":
"babel-helper-vue-jsx-merge-props@^2.0.0", "babel-helper-vue-jsx-merge-props@^2.0.3":
"integrity" "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
"resolved" "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz"
"version" "2.0.3"
@ -4432,7 +4439,7 @@
"resolved" "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz"
"version" "0.1.3"
"deepmerge@^1.5.2":
"deepmerge@^1.2.0", "deepmerge@^1.5.2":
"integrity" "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
"resolved" "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz"
"version" "1.5.2"
@ -4765,6 +4772,14 @@
"jsbn" "~0.1.0"
"safer-buffer" "^2.1.0"
"echarts@^5.5.0":
"integrity" "sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw=="
"resolved" "https://registry.npmmirror.com/echarts/-/echarts-5.5.0.tgz"
"version" "5.5.0"
dependencies:
"tslib" "2.3.0"
"zrender" "5.5.0"
"ee-first@1.1.1":
"integrity" "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
"resolved" "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
@ -4780,6 +4795,18 @@
"resolved" "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.495.tgz"
"version" "1.3.495"
"element-ui@^2.15.14":
"integrity" "sha512-2v9fHL0ZGINotOlRIAJD5YuVB8V7WKxrE9Qy7dXhRipa035+kF7WuU/z+tEmLVPBcJ0zt8mOu1DKpWcVzBK8IA=="
"resolved" "https://registry.npmmirror.com/element-ui/-/element-ui-2.15.14.tgz"
"version" "2.15.14"
dependencies:
"async-validator" "~1.8.1"
"babel-helper-vue-jsx-merge-props" "^2.0.0"
"deepmerge" "^1.2.0"
"normalize-wheel" "^1.0.1"
"resize-observer-polyfill" "^1.5.0"
"throttle-debounce" "^1.0.1"
"elliptic@^6.0.0", "elliptic@^6.5.2":
"integrity" "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw=="
"resolved" "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz"
@ -8215,6 +8242,11 @@
"resolved" "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz"
"version" "3.3.0"
"normalize-wheel@^1.0.1":
"integrity" "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
"resolved" "https://registry.npmmirror.com/normalize-wheel/-/normalize-wheel-1.0.1.tgz"
"version" "1.0.1"
"npm-run-path@^2.0.0":
"integrity" "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8="
"resolved" "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz"
@ -10218,7 +10250,7 @@
"resolved" "https://registry.npmjs.org/reselect/-/reselect-3.0.1.tgz"
"version" "3.0.1"
"resize-observer-polyfill@^1.5.1":
"resize-observer-polyfill@^1.5.0", "resize-observer-polyfill@^1.5.1":
"integrity" "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
"resolved" "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz"
"version" "1.5.1"
@ -11395,6 +11427,11 @@
"loader-utils" "^1.1.0"
"neo-async" "^2.6.0"
"throttle-debounce@^1.0.1":
"integrity" "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
"resolved" "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz"
"version" "1.1.0"
"through@^2.3.6", "through@~2.3.4", "through@~2.3.8":
"integrity" "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
"resolved" "https://registry.npmjs.org/through/-/through-2.3.8.tgz"
@ -11554,6 +11591,11 @@
"resolved" "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz"
"version" "1.13.0"
"tslib@2.3.0":
"integrity" "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
"resolved" "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz"
"version" "2.3.0"
"tty-browserify@0.0.0":
"integrity" "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY="
"resolved" "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz"
@ -12633,3 +12675,10 @@
"is-ci" "^1.0.10"
"normalize-path" "^1.0.0"
"strip-indent" "^2.0.0"
"zrender@5.5.0":
"integrity" "sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w=="
"resolved" "https://registry.npmmirror.com/zrender/-/zrender-5.5.0.tgz"
"version" "5.5.0"
dependencies:
"tslib" "2.3.0"