修改路径、换图片、图形分析
@@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = SAAS管理平台
|
VUE_APP_TITLE = SAAS综合管理平台
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = SAAS管理平台
|
VUE_APP_TITLE = SAAS综合管理平台
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = SAAS管理平台
|
VUE_APP_TITLE = SAAS综合管理平台
|
||||||
|
|
||||||
BABEL_ENV = production
|
BABEL_ENV = production
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "ruoyi",
|
"name": "ruoyi",
|
||||||
"version": "3.6.6",
|
"version": "3.6.6",
|
||||||
"description": "SAAS管理平台",
|
"description": "SAAS综合管理平台",
|
||||||
"author": "若依",
|
"author": "若依",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 662 KiB |
BIN
public/favicon1.ico
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 17 KiB |
BIN
src/assets/logo/logo1.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
src/assets/logo/logo2.png
Normal file
|
After Width: | Height: | Size: 662 KiB |
@@ -80,6 +80,12 @@ div:focus {
|
|||||||
.plr-50 {
|
.plr-50 {
|
||||||
padding: 0 50px;
|
padding: 0 50px;
|
||||||
}
|
}
|
||||||
|
.p15 {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
.p20 {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
.fontSize15 {
|
.fontSize15 {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
@@ -229,9 +235,20 @@ aside {
|
|||||||
.w100 {
|
.w100 {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.h40 {
|
||||||
|
height: 40%;
|
||||||
|
}
|
||||||
.h100 {
|
.h100 {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.textAlignCenter {
|
.textAlignCenter {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.pageTopForm .el-form-item--medium .el-form-item__label {
|
||||||
|
width: 80px;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 36px;
|
||||||
|
}
|
||||||
|
.pageTopForm .el-form-item {
|
||||||
|
margin-left: 10px!important;
|
||||||
|
}
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
range-separator="至"
|
range-separator="至"
|
||||||
format="yyyy-MM-dd"
|
format="yyyy-MM-dd"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
style="display: inline-block!important;width: 55%!important;"
|
style="display: inline-block!important;width: 45%!important;vertical-align: middle;"
|
||||||
@change="dateChange"/>
|
@change="dateChange"/>
|
||||||
<ul style="display: inline-block">
|
<ul style="display: inline-block;padding-left: 10px;vertical-align: middle;">
|
||||||
<li :class="{ 'activesbgs' : isActive == 'DAY' }" @click="toggle('DAY',7)">前7天</li>
|
<li :class="{ 'activesbgs' : isActive == 'DAY' }" @click="toggle('DAY',7)">前7天</li>
|
||||||
<li :class="{ 'activesbgs' : isActive == 'WEEK' }" @click="toggle('WEEK',15)">前15天</li>
|
<li :class="{ 'activesbgs' : isActive == 'WEEK' }" @click="toggle('WEEK',15)">前15天</li>
|
||||||
<li :class="{ 'activesbgs' : isActive == 'MONTH' }" @click="toggle('MONTH')">前一个月</li>
|
<li :class="{ 'activesbgs' : isActive == 'MONTH' }" @click="toggle('MONTH')">前一个月</li>
|
||||||
@@ -97,11 +97,11 @@
|
|||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.ultabs {
|
.ultabs {
|
||||||
float: right;
|
width: 500px;
|
||||||
position: relative;
|
float: right;
|
||||||
z-index: 9;
|
position: relative;
|
||||||
margin-top: 30px;
|
z-index: 9;
|
||||||
margin-right: 2%;
|
margin-top: -10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ultabs ul li {
|
.ultabs ul li {
|
||||||
@@ -132,10 +132,4 @@
|
|||||||
line-height: 40px !important;
|
line-height: 40px !important;
|
||||||
border: 1px solid #5D78FF;
|
border: 1px solid #5D78FF;
|
||||||
}
|
}
|
||||||
::v-deep .ultabs .el-range-editor--medium .el-range-input{
|
|
||||||
vertical-align: super!important;
|
|
||||||
}
|
|
||||||
::v-deep .ultabs .el-range-editor--medium .el-range-separator{
|
|
||||||
vertical-align: super!important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -37,10 +37,22 @@
|
|||||||
const pieDataListIntance = echarts.init(document.getElementById('pieChart' + this.num));
|
const pieDataListIntance = echarts.init(document.getElementById('pieChart' + this.num));
|
||||||
let option = {
|
let option = {
|
||||||
color: dataList.color,
|
color: dataList.color,
|
||||||
|
// title: [
|
||||||
|
// {
|
||||||
|
// text: `${dataList.centerVal}${dataList.unit}`,
|
||||||
|
// left: "16%",
|
||||||
|
// top: "43%",
|
||||||
|
// textStyle: {
|
||||||
|
// fontSize: 18,
|
||||||
|
// fontWeight: "bold",
|
||||||
|
// color: "#333",
|
||||||
|
// },
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
legend: {
|
legend: {
|
||||||
orient: 'vertical', // 垂直排列
|
// orient: 'vertical', // 垂直排列
|
||||||
top: 'center', // 垂直居中
|
top: 'bottom', // 垂直居中
|
||||||
right: 40, // 距离右侧40px
|
// right: 1, // 距离右侧40px
|
||||||
itemWidth: 12, // 图例标记宽度
|
itemWidth: 12, // 图例标记宽度
|
||||||
itemHeight: 12, // 图例标记高度
|
itemHeight: 12, // 图例标记高度
|
||||||
itemGap: 20, // 图例项间距
|
itemGap: 20, // 图例项间距
|
||||||
@@ -58,8 +70,8 @@
|
|||||||
series: [{
|
series: [{
|
||||||
name: 'Access From',
|
name: 'Access From',
|
||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: ['40%', '70%'],
|
radius: dataList && dataList.radius || ['40%', '70%'],
|
||||||
center: dataList && dataList.center || ['20%', '50%'],
|
// center: dataList && dataList.center || ['20%', '50%'],
|
||||||
label: {
|
label: {
|
||||||
show: false,
|
show: false,
|
||||||
position: 'center'
|
position: 'center'
|
||||||
@@ -74,18 +86,18 @@
|
|||||||
},
|
},
|
||||||
data: dataList.data
|
data: dataList.data
|
||||||
}],
|
}],
|
||||||
// graphic: [{
|
graphic: [{
|
||||||
// type: 'text',
|
type: 'text',
|
||||||
// left: 'center',
|
left: 'center',
|
||||||
// top: 'middle',
|
top: 'middle',
|
||||||
// style: {
|
style: {
|
||||||
// text: `${dataList.centerVal}${dataList.unit}`,
|
text: `${dataList.centerVal}${dataList.unit}`,
|
||||||
// textBaseline: 'middle',
|
textBaseline: 'middle',
|
||||||
// textAlign: 'center',
|
textAlign: 'center',
|
||||||
// fontSize: 20,
|
fontSize: 20,
|
||||||
// fill: '#333'
|
fill: '#333'
|
||||||
// }
|
}
|
||||||
// }],
|
}],
|
||||||
};
|
};
|
||||||
pieDataListIntance.setOption(option);
|
pieDataListIntance.setOption(option);
|
||||||
// window.addEventListener("resize", () => {
|
// window.addEventListener("resize", () => {
|
||||||
|
|||||||
@@ -95,7 +95,6 @@
|
|||||||
methods: {
|
methods: {
|
||||||
// 所有方法都抛出到父组件里去
|
// 所有方法都抛出到父组件里去
|
||||||
handleClick(item, row) {
|
handleClick(item, row) {
|
||||||
console.log('row==',row);
|
|
||||||
this.$emit("fnClick", item, row, this.ids, this.selectList);
|
this.$emit("fnClick", item, row, this.ids, this.selectList);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -132,7 +131,6 @@
|
|||||||
this.selectList.forEach(val => {
|
this.selectList.forEach(val => {
|
||||||
this.$refs.selChangeList.toggleRowSelection(val,true);
|
this.$refs.selChangeList.toggleRowSelection(val,true);
|
||||||
});
|
});
|
||||||
console.log('selectList==',this.selectList);
|
|
||||||
},
|
},
|
||||||
// 提供给父组件调用的方法:返回当前表格的选中数据
|
// 提供给父组件调用的方法:返回当前表格的选中数据
|
||||||
getSelectedData() {
|
getSelectedData() {
|
||||||
|
|||||||
@@ -1,208 +1,208 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="navbar">
|
<div class="navbar">
|
||||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||||
|
|
||||||
<breadcrumb v-if="!topNav" id="breadcrumb-container" class="breadcrumb-container" />
|
<breadcrumb v-if="!topNav" id="breadcrumb-container" class="breadcrumb-container" />
|
||||||
<top-nav v-if="topNav" id="topmenu-container" class="topmenu-container" />
|
<top-nav v-if="topNav" id="topmenu-container" class="topmenu-container" />
|
||||||
|
|
||||||
<div class="right-menu">
|
<div class="right-menu">
|
||||||
<template v-if="device!=='mobile'">
|
<template v-if="device!=='mobile'">
|
||||||
<search id="header-search" class="right-menu-item" />
|
<search id="header-search" class="right-menu-item" />
|
||||||
|
|
||||||
<el-tooltip content="源码地址" effect="dark" placement="bottom">
|
<!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">-->
|
||||||
<ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
|
<!-- <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />-->
|
||||||
</el-tooltip>
|
<!-- </el-tooltip>-->
|
||||||
|
|
||||||
<el-tooltip content="文档地址" effect="dark" placement="bottom">
|
<!-- <el-tooltip content="文档地址" effect="dark" placement="bottom">-->
|
||||||
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
|
<!-- <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />-->
|
||||||
</el-tooltip>
|
<!-- </el-tooltip>-->
|
||||||
|
|
||||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||||
|
|
||||||
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
||||||
<size-select id="size-select" class="right-menu-item hover-effect" />
|
<size-select id="size-select" class="right-menu-item hover-effect" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover">
|
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover">
|
||||||
<div class="avatar-wrapper">
|
<div class="avatar-wrapper">
|
||||||
<img :src="avatar" class="user-avatar">
|
<img :src="avatar" class="user-avatar">
|
||||||
<span class="user-nickname"> {{ nickName }} </span>
|
<span class="user-nickname"> {{ nickName }} </span>
|
||||||
</div>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<router-link to="/user/profile">
|
<router-link to="/user/profile">
|
||||||
<el-dropdown-item>个人中心</el-dropdown-item>
|
<el-dropdown-item>个人中心</el-dropdown-item>
|
||||||
</router-link>
|
</router-link>
|
||||||
<el-dropdown-item divided @click.native="logout">
|
<el-dropdown-item divided @click.native="logout">
|
||||||
<span>退出登录</span>
|
<span>退出登录</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
|
||||||
<div class="right-menu-item hover-effect setting" @click="setLayout" v-if="setting">
|
<div class="right-menu-item hover-effect setting" @click="setLayout" v-if="setting">
|
||||||
<svg-icon icon-class="more-up" />
|
<svg-icon icon-class="more-up" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import Breadcrumb from '@/components/Breadcrumb'
|
import Breadcrumb from '@/components/Breadcrumb'
|
||||||
import TopNav from '@/components/TopNav'
|
import TopNav from '@/components/TopNav'
|
||||||
import Hamburger from '@/components/Hamburger'
|
import Hamburger from '@/components/Hamburger'
|
||||||
import Screenfull from '@/components/Screenfull'
|
import Screenfull from '@/components/Screenfull'
|
||||||
import SizeSelect from '@/components/SizeSelect'
|
import SizeSelect from '@/components/SizeSelect'
|
||||||
import Search from '@/components/HeaderSearch'
|
import Search from '@/components/HeaderSearch'
|
||||||
import RuoYiGit from '@/components/RuoYi/Git'
|
import RuoYiGit from '@/components/RuoYi/Git'
|
||||||
import RuoYiDoc from '@/components/RuoYi/Doc'
|
import RuoYiDoc from '@/components/RuoYi/Doc'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
emits: ['setLayout'],
|
emits: ['setLayout'],
|
||||||
components: {
|
components: {
|
||||||
Breadcrumb,
|
Breadcrumb,
|
||||||
TopNav,
|
TopNav,
|
||||||
Hamburger,
|
Hamburger,
|
||||||
Screenfull,
|
Screenfull,
|
||||||
SizeSelect,
|
SizeSelect,
|
||||||
Search,
|
Search,
|
||||||
RuoYiGit,
|
RuoYiGit,
|
||||||
RuoYiDoc
|
RuoYiDoc
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters([
|
||||||
'sidebar',
|
'sidebar',
|
||||||
'avatar',
|
'avatar',
|
||||||
'device',
|
'device',
|
||||||
'nickName'
|
'nickName'
|
||||||
]),
|
]),
|
||||||
setting: {
|
setting: {
|
||||||
get() {
|
get() {
|
||||||
return this.$store.state.settings.showSettings
|
return this.$store.state.settings.showSettings
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
topNav: {
|
topNav: {
|
||||||
get() {
|
get() {
|
||||||
return this.$store.state.settings.topNav
|
return this.$store.state.settings.topNav
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleSideBar() {
|
toggleSideBar() {
|
||||||
this.$store.dispatch('app/toggleSideBar')
|
this.$store.dispatch('app/toggleSideBar')
|
||||||
},
|
},
|
||||||
setLayout(event) {
|
setLayout(event) {
|
||||||
this.$emit('setLayout')
|
this.$emit('setLayout')
|
||||||
},
|
},
|
||||||
logout() {
|
logout() {
|
||||||
this.$confirm('确定注销并退出系统吗?', '提示', {
|
this.$confirm('确定注销并退出系统吗?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$store.dispatch('LogOut').then(() => {
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
location.href = '/index'
|
location.href = '/index'
|
||||||
})
|
})
|
||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.navbar {
|
.navbar {
|
||||||
height: 50px;
|
height: 50px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
box-shadow: 0 1px 4px rgba(0,21,41,.08);
|
box-shadow: 0 1px 4px rgba(0,21,41,.08);
|
||||||
|
|
||||||
.hamburger-container {
|
.hamburger-container {
|
||||||
line-height: 46px;
|
line-height: 46px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
float: left;
|
float: left;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background .3s;
|
transition: background .3s;
|
||||||
-webkit-tap-highlight-color:transparent;
|
-webkit-tap-highlight-color:transparent;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: rgba(0, 0, 0, .025)
|
background: rgba(0, 0, 0, .025)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb-container {
|
.breadcrumb-container {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topmenu-container {
|
.topmenu-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50px;
|
left: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.errLog-container {
|
.errLog-container {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-menu {
|
.right-menu {
|
||||||
float: right;
|
float: right;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-menu-item {
|
.right-menu-item {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #5a5e66;
|
color: #5a5e66;
|
||||||
vertical-align: text-bottom;
|
vertical-align: text-bottom;
|
||||||
|
|
||||||
&.hover-effect {
|
&.hover-effect {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background .3s;
|
transition: background .3s;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: rgba(0, 0, 0, .025)
|
background: rgba(0, 0, 0, .025)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar-container {
|
.avatar-container {
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
padding-right: 0px;
|
padding-right: 0px;
|
||||||
|
|
||||||
.avatar-wrapper {
|
.avatar-wrapper {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.user-avatar {
|
.user-avatar {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-nickname{
|
.user-nickname{
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 10px;
|
bottom: 10px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-icon-caret-bottom {
|
.el-icon-caret-bottom {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -20px;
|
right: -20px;
|
||||||
top: 25px;
|
top: 25px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ Vue.use(Router)
|
|||||||
|
|
||||||
/* Layout */
|
/* Layout */
|
||||||
import Layout from '@/layout'
|
import Layout from '@/layout'
|
||||||
|
import DialogView from '@/views/disRevenue/earnManage/server/dialogView.vue'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Note: 路由配置项
|
* Note: 路由配置项
|
||||||
@@ -87,6 +88,11 @@ export const constantRoutes = [
|
|||||||
meta: { title: '个人中心', icon: 'user' }
|
meta: { title: '个人中心', icon: 'user' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/dialog-view',
|
||||||
|
component: DialogView,
|
||||||
|
name: 'DialogView'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -191,6 +197,20 @@ export const dynamicRoutes = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/disRevenue/earnManage/server/graphicAnalysis',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
permissions: ['disRevenue:earnManage:server:graphicAnalysis'],
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'index/:dialogVal?',
|
||||||
|
component: () => import('@/views/disRevenue/earnManage/server/dialogView'),
|
||||||
|
name: 'DialogView',
|
||||||
|
meta: { title: '图形分析', activeMenu: '/disRevenue/earnManage/server' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
// 交换机宽带收益
|
// 交换机宽带收益
|
||||||
{
|
{
|
||||||
path: '/disRevenue/earnManage/switch/list',
|
path: '/disRevenue/earnManage/switch/list',
|
||||||
|
|||||||
@@ -1,152 +1,152 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { Notification, MessageBox, Message, Loading } from 'element-ui'
|
import { Notification, MessageBox, Message, Loading } from 'element-ui'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import errorCode from '@/utils/errorCode'
|
import errorCode from '@/utils/errorCode'
|
||||||
import { tansParams, blobValidate } from "@/utils/ruoyi"
|
import { tansParams, blobValidate } from "@/utils/ruoyi"
|
||||||
import cache from '@/plugins/cache'
|
import cache from '@/plugins/cache'
|
||||||
import { saveAs } from 'file-saver'
|
import { saveAs } from 'file-saver'
|
||||||
|
|
||||||
let downloadLoadingInstance
|
let downloadLoadingInstance
|
||||||
// 是否显示重新登录
|
// 是否显示重新登录
|
||||||
export let isRelogin = { show: false }
|
export let isRelogin = { show: false }
|
||||||
|
|
||||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
||||||
// 创建axios实例
|
// 创建axios实例
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||||
baseURL: process.env.VUE_APP_BASE_API,
|
baseURL: process.env.VUE_APP_BASE_API,
|
||||||
// 超时
|
// 超时
|
||||||
timeout: 10000
|
timeout: 10000
|
||||||
})
|
})
|
||||||
|
|
||||||
// request拦截器
|
// request拦截器
|
||||||
service.interceptors.request.use(config => {
|
service.interceptors.request.use(config => {
|
||||||
// 是否需要设置 token
|
// 是否需要设置 token
|
||||||
const isToken = (config.headers || {}).isToken === false
|
const isToken = (config.headers || {}).isToken === false
|
||||||
// 是否需要防止数据重复提交
|
// 是否需要防止数据重复提交
|
||||||
const isRepeatSubmit = (config.headers || {}).repeatSubmit === false
|
const isRepeatSubmit = (config.headers || {}).repeatSubmit === false
|
||||||
if (getToken() && !isToken) {
|
if (getToken() && !isToken) {
|
||||||
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||||
}
|
}
|
||||||
// get请求映射params参数
|
// get请求映射params参数
|
||||||
if (config.method === 'get' && config.params) {
|
if (config.method === 'get' && config.params) {
|
||||||
let url = config.url + '?' + tansParams(config.params)
|
let url = config.url + '?' + tansParams(config.params)
|
||||||
url = url.slice(0, -1)
|
url = url.slice(0, -1)
|
||||||
config.params = {}
|
config.params = {}
|
||||||
config.url = url
|
config.url = url
|
||||||
}
|
}
|
||||||
if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
|
if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
|
||||||
const requestObj = {
|
const requestObj = {
|
||||||
url: config.url,
|
url: config.url,
|
||||||
data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data,
|
data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data,
|
||||||
time: new Date().getTime()
|
time: new Date().getTime()
|
||||||
}
|
}
|
||||||
const requestSize = Object.keys(JSON.stringify(requestObj)).length // 请求数据大小
|
const requestSize = Object.keys(JSON.stringify(requestObj)).length // 请求数据大小
|
||||||
const limitSize = 5 * 1024 * 1024 // 限制存放数据5M
|
const limitSize = 5 * 1024 * 1024 // 限制存放数据5M
|
||||||
if (requestSize >= limitSize) {
|
if (requestSize >= limitSize) {
|
||||||
console.warn(`[${config.url}]: ` + '请求数据大小超出允许的5M限制,无法进行防重复提交验证。')
|
console.warn(`[${config.url}]: ` + '请求数据大小超出允许的5M限制,无法进行防重复提交验证。')
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
const sessionObj = cache.session.getJSON('sessionObj')
|
const sessionObj = cache.session.getJSON('sessionObj')
|
||||||
if (sessionObj === undefined || sessionObj === null || sessionObj === '') {
|
if (sessionObj === undefined || sessionObj === null || sessionObj === '') {
|
||||||
cache.session.setJSON('sessionObj', requestObj)
|
cache.session.setJSON('sessionObj', requestObj)
|
||||||
} else {
|
} else {
|
||||||
const s_url = sessionObj.url // 请求地址
|
const s_url = sessionObj.url // 请求地址
|
||||||
const s_data = sessionObj.data // 请求数据
|
const s_data = sessionObj.data // 请求数据
|
||||||
const s_time = sessionObj.time // 请求时间
|
const s_time = sessionObj.time // 请求时间
|
||||||
const interval = 1000 // 间隔时间(ms),小于此时间视为重复提交
|
const interval = 1000 // 间隔时间(ms),小于此时间视为重复提交
|
||||||
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
|
// if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
|
||||||
const message = '数据正在处理,请勿重复提交'
|
// const message = '数据正在处理,请勿重复提交'
|
||||||
console.warn(`[${s_url}]: ` + message)
|
// console.warn(`[${s_url}]: ` + message)
|
||||||
return Promise.reject(new Error(message))
|
// return Promise.reject(new Error(message))
|
||||||
} else {
|
// } else {
|
||||||
cache.session.setJSON('sessionObj', requestObj)
|
cache.session.setJSON('sessionObj', requestObj)
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
}, error => {
|
}, error => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
Promise.reject(error)
|
Promise.reject(error)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 响应拦截器
|
// 响应拦截器
|
||||||
service.interceptors.response.use(res => {
|
service.interceptors.response.use(res => {
|
||||||
// 未设置状态码则默认成功状态
|
// 未设置状态码则默认成功状态
|
||||||
const code = res.data.code || 200
|
const code = res.data.code || 200
|
||||||
// 获取错误信息
|
// 获取错误信息
|
||||||
const msg = errorCode[code] || res.data.msg || errorCode['default']
|
const msg = errorCode[code] || res.data.msg || errorCode['default']
|
||||||
// 二进制数据则直接返回
|
// 二进制数据则直接返回
|
||||||
if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
|
if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
|
||||||
return res.data
|
return res.data
|
||||||
}
|
}
|
||||||
if (code === 401) {
|
if (code === 401) {
|
||||||
if (!isRelogin.show) {
|
if (!isRelogin.show) {
|
||||||
isRelogin.show = true
|
isRelogin.show = true
|
||||||
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||||
isRelogin.show = false
|
isRelogin.show = false
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
location.href = '/index'
|
location.href = '/index'
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
isRelogin.show = false
|
isRelogin.show = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||||
} else if (code === 500) {
|
} else if (code === 500) {
|
||||||
Message({ message: msg, type: 'error' })
|
Message({ message: msg, type: 'error' })
|
||||||
return Promise.reject(new Error(msg))
|
return Promise.reject(new Error(msg))
|
||||||
} else if (code === 601) {
|
} else if (code === 601) {
|
||||||
Message({ message: msg, type: 'warning' })
|
Message({ message: msg, type: 'warning' })
|
||||||
return Promise.reject('error')
|
return Promise.reject('error')
|
||||||
} else if (code !== 200) {
|
} else if (code !== 200) {
|
||||||
Notification.error({ title: msg })
|
Notification.error({ title: msg })
|
||||||
return Promise.reject('error')
|
return Promise.reject('error')
|
||||||
} else {
|
} else {
|
||||||
return res.data
|
return res.data
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log('err' + error)
|
console.log('err' + error)
|
||||||
let { message } = error
|
let { message } = error
|
||||||
if (message == "Network Error") {
|
if (message == "Network Error") {
|
||||||
message = "后端接口连接异常"
|
message = "后端接口连接异常"
|
||||||
} else if (message.includes("timeout")) {
|
} else if (message.includes("timeout")) {
|
||||||
message = "系统接口请求超时"
|
message = "系统接口请求超时"
|
||||||
} else if (message.includes("Request failed with status code")) {
|
} else if (message.includes("Request failed with status code")) {
|
||||||
message = "系统接口" + message.substr(message.length - 3) + "异常"
|
message = "系统接口" + message.substr(message.length - 3) + "异常"
|
||||||
}
|
}
|
||||||
Message({ message: message, type: 'error', duration: 5 * 1000 })
|
Message({ message: message, type: 'error', duration: 5 * 1000 })
|
||||||
return Promise.reject(error)
|
return Promise.reject(error)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// 通用下载方法
|
// 通用下载方法
|
||||||
export function download(url, params, filename, config) {
|
export function download(url, params, filename, config) {
|
||||||
downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
|
downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
|
||||||
return service.post(url, params, {
|
return service.post(url, params, {
|
||||||
transformRequest: [(params) => { return tansParams(params) }],
|
transformRequest: [(params) => { return tansParams(params) }],
|
||||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
...config
|
...config
|
||||||
}).then(async (data) => {
|
}).then(async (data) => {
|
||||||
const isBlob = blobValidate(data)
|
const isBlob = blobValidate(data)
|
||||||
if (isBlob) {
|
if (isBlob) {
|
||||||
const blob = new Blob([data])
|
const blob = new Blob([data])
|
||||||
saveAs(blob, filename)
|
saveAs(blob, filename)
|
||||||
} else {
|
} else {
|
||||||
const resText = await data.text()
|
const resText = await data.text()
|
||||||
const rspObj = JSON.parse(resText)
|
const rspObj = JSON.parse(resText)
|
||||||
const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
|
const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
|
||||||
Message.error(errMsg)
|
Message.error(errMsg)
|
||||||
}
|
}
|
||||||
downloadLoadingInstance.close()
|
downloadLoadingInstance.close()
|
||||||
}).catch((r) => {
|
}).catch((r) => {
|
||||||
console.error(r)
|
console.error(r)
|
||||||
Message.error('下载文件出现错误,请联系管理员!')
|
Message.error('下载文件出现错误,请联系管理员!')
|
||||||
downloadLoadingInstance.close()
|
downloadLoadingInstance.close()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default service
|
export default service
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
countBusinessName(dataVal).then(response => {
|
countBusinessName(dataVal).then(response => {
|
||||||
addBusiness(dataVal).then(response => {
|
addBusiness(dataVal).then(response => {
|
||||||
this.$modal.msgSuccess(response.msg);
|
this.$modal.msgSuccess(response.msg);
|
||||||
this.$router.push("/disRevenue/earnManage/business");
|
this.$router.push("/earnManage/business");
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$modal.msgError("操作失败");
|
this.$modal.msgError("操作失败");
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'cancle':
|
case 'cancle':
|
||||||
this.$router.push("/disRevenue/earnManage/business");
|
this.$router.push("/earnManage/business");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container pageTopForm">
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="130px">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="130px">
|
||||||
<el-form-item label="业务名称" prop="businessName">
|
<el-form-item label="业务名称" prop="businessName">
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container pageTopForm">
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="130px">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="130px">
|
||||||
<el-form-item label="节点名称" prop="nodeName">
|
<el-form-item label="节点名称" prop="nodeName">
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
calculateAvg(dataVal).then(response => {
|
calculateAvg(dataVal).then(response => {
|
||||||
this.$modal.msgSuccess(response.msg);
|
this.$modal.msgSuccess(response.msg);
|
||||||
if (this.paramsData && this.paramsData.resourceType === '1') {
|
if (this.paramsData && this.paramsData.resourceType === '1') {
|
||||||
this.$router.push("/disRevenue/earnManage/server");
|
this.$router.push("/earnManage/server");
|
||||||
}
|
}
|
||||||
// else {
|
// else {
|
||||||
// this.$router.push("/disRevenue/earnManage/switch");
|
// this.$router.push("/disRevenue/earnManage/switch");
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
break;
|
break;
|
||||||
case 'cancle':
|
case 'cancle':
|
||||||
if (this.paramsData && this.paramsData.resourceType === '1') {
|
if (this.paramsData && this.paramsData.resourceType === '1') {
|
||||||
this.$router.push("/disRevenue/earnManage/server");
|
this.$router.push("/earnManage/server");
|
||||||
}
|
}
|
||||||
// else {
|
// else {
|
||||||
// this.$router.push("/disRevenue/earnManage/switch");
|
// this.$router.push("/disRevenue/earnManage/switch");
|
||||||
|
|||||||
121
src/views/disRevenue/earnManage/server/dialogView.vue
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<div style="height: 90px;">
|
||||||
|
<el-form ref="noticeRef" :model="form" label-width="80px">
|
||||||
|
<el-form-item label="节点名称" prop="noticeType">
|
||||||
|
<el-select v-model="form.noticeType" multiple placeholder="请选择节点名称">
|
||||||
|
<el-option
|
||||||
|
v-for="item in selectChangeList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.nodeName"
|
||||||
|
:value="item.id"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-switch v-for="item of switchData" v-model="item.type" :activeText="item.name" class="mr20" />
|
||||||
|
</div>
|
||||||
|
<div style="height: calc(100vh - 130px);overflow: scroll;">
|
||||||
|
<template v-for="(item,index) of selectChoose">
|
||||||
|
<EchartsLine v-show="switchData[0].type" :chartData="chartDataEvent"
|
||||||
|
:lineData="lineDataParams" :title="'【' + item.nodeName + '】【' + item.businessName + '】' + switchData[0].name" class="w100 h40 mt20 mb20" style="border: 1.5px solid #878787;"></EchartsLine>
|
||||||
|
<EchartsLine v-show="switchData[1].type" :chartData="chartDataEvent"
|
||||||
|
:lineData="lineDataParams" :title="'【' + item.nodeName + '】【' + item.businessName + '】' + switchData[1].name" class="w100 h40 mt20 mb20" style="border: 1.5px solid #878787;"></EchartsLine>
|
||||||
|
<EchartsBar v-show="switchData[2].type" :chartData="chartDataEvent"
|
||||||
|
:barData="lineDataParams" :title="'【' + item.nodeName + '】【' + item.businessName + '】' + switchData[2].name" class="w100 h40 mt20 mb20" style="border: 1.5px solid #878787;"></EchartsBar>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<!-- <template #footer>-->
|
||||||
|
<!-- <div class="dialog-footer">-->
|
||||||
|
<!-- <!– <el-button type="primary" @click="submitForm">确 定</el-button>–>-->
|
||||||
|
<!-- <el-button @click="cancel">取 消</el-button>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import Form from '@/components/form/index.vue';
|
||||||
|
import EchartsLine from "@/components/echartsList/line.vue";
|
||||||
|
import EchartsBar from "@/components/echartsList/bar.vue";
|
||||||
|
export default {
|
||||||
|
name: 'DialogView',
|
||||||
|
components: {Form, EchartsLine, EchartsBar},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
paramsData: {},
|
||||||
|
form: {},
|
||||||
|
storageKey: '',
|
||||||
|
selectChangeList: [],
|
||||||
|
switchData: [
|
||||||
|
{id: 'ninetyFiveDay', type: true, name: '95宽带值Mbps/日'},
|
||||||
|
{id: 'ninetyFiveMonth', type: true, name: '95宽带值Mbps/月'},
|
||||||
|
{id: 'packageEnd', type: true, name: '包端宽带值Mbps/日'}
|
||||||
|
],
|
||||||
|
selectChoose: [],
|
||||||
|
lineDataParams: {
|
||||||
|
lineXData: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
||||||
|
data: [820, 932, 901, 934, 1290, 1330, 1320]
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
mounted() {
|
||||||
|
this.storageKey = this.$route.query && this.$route.query['storageKey'];
|
||||||
|
if (this.storageKey) {
|
||||||
|
this.paramsData = localStorage.getItem(this.storageKey);
|
||||||
|
if (this.paramsData) {
|
||||||
|
this.processData(JSON.parse(this.paramsData));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
localStorage.removeItem(this.storageKey);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
processData(list) {
|
||||||
|
this.selectChangeList = list;
|
||||||
|
if (list.length >=2) {
|
||||||
|
this.form.noticeType = [list[0].id, list[1].id];
|
||||||
|
} else {
|
||||||
|
this.form.noticeType = [list[0].id];
|
||||||
|
}
|
||||||
|
this.form.noticeType.forEach(item => {
|
||||||
|
list.some(val => {
|
||||||
|
if (item === val.id) {
|
||||||
|
this.selectChoose.push(val);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
chartDataEvent(val) {
|
||||||
|
// console.log('val===',val);
|
||||||
|
return val;
|
||||||
|
},
|
||||||
|
// 监听事件
|
||||||
|
callback(result, dataVal, formVal) {
|
||||||
|
if (result && result.fnCode) {
|
||||||
|
switch (result.fnCode) {
|
||||||
|
case 'submit':
|
||||||
|
break;
|
||||||
|
case 'cancle':
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
::v-deep .ultabs .el-range-editor .el-range-input {
|
||||||
|
vertical-align: super!important;
|
||||||
|
}
|
||||||
|
::v-deep .ultabs .el-date-editor .el-range-separator {
|
||||||
|
vertical-align: super!important;
|
||||||
|
}
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 0px!important;
|
||||||
|
height: 0px!important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container pageTopForm">
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" label-width="auto" class="demo-ruleForm">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" label-width="70px" class="demo-ruleForm">
|
||||||
<el-col :span="7">
|
<el-col :span="8">
|
||||||
<el-form-item label="节点名称" prop="nodeName">
|
<el-form-item label="节点名称" prop="nodeName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.nodeName"
|
v-model="queryParams.nodeName"
|
||||||
@@ -11,17 +11,7 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="8">
|
||||||
<el-form-item label="硬件SN" prop="hardwareSn">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.hardwareSn"
|
|
||||||
placeholder="请输入硬件SN"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="7">
|
|
||||||
<el-form-item label="类型" prop="bandwidthType">
|
<el-form-item label="类型" prop="bandwidthType">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.bandwidthType"
|
v-model="queryParams.bandwidthType"
|
||||||
@@ -35,8 +25,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7" v-show="queryParams.bandwidthType === '1'">
|
<el-col :span="8" v-show="queryParams.bandwidthType === '1'">
|
||||||
<el-form-item label="95宽带值Mbps/日" prop="bandwidth95Daily">
|
<el-form-item label="95宽带值Mbps/日" title="95宽带值Mbps/日" prop="bandwidth95Daily">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.bandwidth95Daily"
|
v-model="queryParams.bandwidth95Daily"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
@@ -47,7 +37,7 @@
|
|||||||
end-placeholder="结束日期"/>
|
end-placeholder="结束日期"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7" v-show="queryParams.bandwidthType === '2'">
|
<el-col :span="8" v-show="queryParams.bandwidthType === '2'">
|
||||||
<el-form-item label="95宽带值Mbps/月" prop="bandwidth95Monthly">
|
<el-form-item label="95宽带值Mbps/月" prop="bandwidth95Monthly">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.bandwidth95Monthly"
|
v-model="queryParams.bandwidth95Monthly"
|
||||||
@@ -58,7 +48,7 @@
|
|||||||
end-placeholder="结束月份"/>
|
end-placeholder="结束月份"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7" v-show="queryParams.bandwidthType === '3'">
|
<el-col :span="8" v-show="queryParams.bandwidthType === '3'">
|
||||||
<el-form-item label="包端带宽值Mbps/日" prop="packageBandwidthDaily">
|
<el-form-item label="包端带宽值Mbps/日" prop="packageBandwidthDaily">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.packageBandwidthDaily"
|
v-model="queryParams.packageBandwidthDaily"
|
||||||
@@ -70,7 +60,17 @@
|
|||||||
end-placeholder="结束日期"/>
|
end-placeholder="结束日期"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="8">
|
||||||
|
<el-form-item label="硬件SN" prop="hardwareSn">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.hardwareSn"
|
||||||
|
placeholder="请输入硬件SN"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
<el-form-item class="lastBtnSty">
|
<el-form-item class="lastBtnSty">
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
@@ -80,37 +80,6 @@
|
|||||||
|
|
||||||
<!-- 表格数据 -->
|
<!-- 表格数据 -->
|
||||||
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange"></TableList>
|
<TableList :columns="columns" :config="config" :queryParams="queryParams" :tableList="tableList" @fnClick="callback" @fnRenderList="getList" @value-change="handleValueChange"></TableList>
|
||||||
<!-- 图形分析 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body fullscreen>
|
|
||||||
<el-form v-if="open" ref="noticeRef" :model="form" label-width="80px">
|
|
||||||
<el-form-item label="节点名称" prop="noticeType">
|
|
||||||
<el-select v-model="form.noticeType" multiple placeholder="请选择节点名称">
|
|
||||||
<el-option
|
|
||||||
v-for="item in selectChangeList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.nodeName"
|
|
||||||
:value="item.id"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div>
|
|
||||||
<el-switch v-for="item of switchData" v-model="item.type" :activeText="item.name" class="mr20" />
|
|
||||||
<div v-for="(item,index) of selectChoose">
|
|
||||||
<EchartsLine v-show="switchData[0].type" :chartData="chartDataEvent"
|
|
||||||
:lineData="lineDataParams" :title="'【' + item.nodeName + '】【' + item.businessName + '】' + switchData[0].name" class="mt20 mb20" style="width: 100%;height: 420px;border: 1.5px solid #878787;"></EchartsLine>
|
|
||||||
<EchartsLine v-show="switchData[1].type" :chartData="chartDataEvent"
|
|
||||||
:lineData="lineDataParams" :title="'【' + item.nodeName + '】【' + item.businessName + '】' + switchData[1].name" class="mt20 mb20" style="width: 100%;height: 420px;border: 1.5px solid #878787;"></EchartsLine>
|
|
||||||
<EchartsBar v-show="switchData[2].type" :chartData="chartDataEvent"
|
|
||||||
:barData="lineDataParams" :title="'【' + item.nodeName + '】【' + item.businessName + '】' + switchData[2].name" class="mt20 mb20" style="width: 100%;height: 420px;border: 1.5px solid #878787;"></EchartsBar>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -126,23 +95,8 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableList: [],
|
tableList: [],
|
||||||
selectChangeList: [],
|
|
||||||
loading: true,
|
loading: true,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
ids: [],
|
|
||||||
single: true,
|
|
||||||
multiple: true,
|
|
||||||
total: 0,
|
|
||||||
dateRange: [],
|
|
||||||
open: false,
|
|
||||||
title: '',
|
|
||||||
switchData: [
|
|
||||||
{id: 'ninetyFiveDay', type: true, name: '95宽带值Mbps/日'},
|
|
||||||
{id: 'ninetyFiveMonth', type: true, name: '95宽带值Mbps/月'},
|
|
||||||
{id: 'packageEnd', type: true, name: '包端宽带值Mbps/日'}
|
|
||||||
],
|
|
||||||
lineDataParams: {},
|
|
||||||
selectChoose: [],
|
|
||||||
// 列显隐信息
|
// 列显隐信息
|
||||||
columns: {
|
columns: {
|
||||||
id: {label: `ID`},
|
id: {label: `ID`},
|
||||||
@@ -179,7 +133,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
form: {},
|
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -231,40 +184,24 @@
|
|||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange = [];
|
|
||||||
this.resetForm("queryRef");
|
this.resetForm("queryRef");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 图形分析 */
|
/** 图形分析 */
|
||||||
graphicAnalysis(list) {
|
graphicAnalysis(list) {
|
||||||
this.open = true;
|
// 生成唯一 key(避免数据冲突)
|
||||||
this.title = "图形分析";
|
const storageKey = `temp_data_${Date.now()}`;
|
||||||
this.selectChangeList = list;
|
// 1. 将数据存入 localStorage(需序列化)
|
||||||
if (list.length >=2) {
|
localStorage.setItem(storageKey, JSON.stringify(list));
|
||||||
this.form.noticeType = [list[0].id, list[1].id];
|
// 1. 用 Vue Router 解析目标路由的完整 URL
|
||||||
} else {
|
const routeLocation = this.$router.resolve({
|
||||||
this.form.noticeType = [list[0].id];
|
name: 'DialogView',
|
||||||
}
|
query: { storageKey }
|
||||||
this.form.noticeType.forEach(item => {
|
|
||||||
list.some(val => {
|
|
||||||
if (item === val.id) {
|
|
||||||
this.selectChoose.push(val);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.lineDataParams = {
|
|
||||||
lineXData: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
||||||
data: [820, 932, 901, 934, 1290, 1330, 1320]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 取消按钮 */
|
|
||||||
cancel() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.open = false;
|
|
||||||
});
|
});
|
||||||
|
// 2. 打开新窗口(routeLocation.href 是完整路径)
|
||||||
|
window.open(routeLocation.href, '_blank');
|
||||||
|
// _blank:新标签页;_self:当前窗口(默认)
|
||||||
},
|
},
|
||||||
|
|
||||||
chartDataEvent(val) {
|
chartDataEvent(val) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container pageTopForm">
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="auto" class="demo-ruleForm">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="auto" class="demo-ruleForm">
|
||||||
<!-- <el-col :span="7">-->
|
<!-- <el-col :span="7">-->
|
||||||
<el-form-item label="节点名称" prop="nodeName">
|
<el-form-item label="节点名称" prop="nodeName">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container pageTopForm">
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" label-width="auto" class="demo-ruleForm">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" label-width="auto" class="demo-ruleForm">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="交换机名称" prop="uplinkSwitch">
|
<el-form-item label="交换机名称" prop="uplinkSwitch">
|
||||||
@@ -101,35 +101,6 @@
|
|||||||
<dict-tag :options="dict.type.rm_topology_type" :value="row.interfaceLinkDeviceType"/>
|
<dict-tag :options="dict.type.rm_topology_type" :value="row.interfaceLinkDeviceType"/>
|
||||||
</template>
|
</template>
|
||||||
</TableList>
|
</TableList>
|
||||||
<!-- 图形分析 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body fullscreen>
|
|
||||||
<el-form v-if="open" ref="noticeRef" :model="form" label-width="80px">
|
|
||||||
<el-form-item label="节点名称" prop="noticeType">
|
|
||||||
<el-select v-model="form.noticeType" multiple placeholder="请选择节点名称">
|
|
||||||
<el-option
|
|
||||||
v-for="item in selectChangeList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.uplinkSwitch"
|
|
||||||
:value="item.id"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div>
|
|
||||||
<el-switch v-for="item of switchData" v-model="item.type" :activeText="item.name" class="mr20" />
|
|
||||||
<div v-for="(item,index) of selectChoose">
|
|
||||||
<EchartsLine v-show="switchData[0].type" :chartData="chartDataEvent"
|
|
||||||
:lineData="lineDataParams" :title="'【' + item.nodeName + '】【' + item.businessName + '】' + switchData[0].name" class="mt20 mb20" style="width: 100%;height: 420px;border: 1.5px solid #878787;"></EchartsLine>
|
|
||||||
<EchartsLine v-show="switchData[1].type" :chartData="chartDataEvent"
|
|
||||||
:lineData="lineDataParams" :title="'【' + item.nodeName + '】【' + item.businessName + '】' + switchData[1].name" class="mt20 mb20" style="width: 100%;height: 420px;border: 1.5px solid #878787;"></EchartsLine>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -145,22 +116,8 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableList: [],
|
tableList: [],
|
||||||
selectChangeList: [],
|
|
||||||
loading: true,
|
loading: true,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
ids: [],
|
|
||||||
single: true,
|
|
||||||
multiple: true,
|
|
||||||
total: 0,
|
|
||||||
dateRange: [],
|
|
||||||
open: false,
|
|
||||||
title: '',
|
|
||||||
switchData: [
|
|
||||||
{id: 'ninetyFiveDay', type: true, name: '95宽带值Mbps/日'},
|
|
||||||
{id: 'ninetyFiveMonth', type: true, name: '95宽带值Mbps/月'},
|
|
||||||
],
|
|
||||||
lineDataParams: {},
|
|
||||||
selectChoose: [],
|
|
||||||
uplinkList:[], // 交换机名称
|
uplinkList:[], // 交换机名称
|
||||||
// 列显隐信息
|
// 列显隐信息
|
||||||
columns: {
|
columns: {
|
||||||
@@ -199,7 +156,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
form: {},
|
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -242,40 +198,24 @@
|
|||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange.value = [];
|
|
||||||
this.resetForm("queryRef");
|
this.resetForm("queryRef");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 图形分析 */
|
/** 图形分析 */
|
||||||
graphicAnalysis(list) {
|
graphicAnalysis(list) {
|
||||||
this.open = true;
|
// 生成唯一 key(避免数据冲突)
|
||||||
this.title = "图形分析";
|
const storageKey = `temp_data_${Date.now()}`;
|
||||||
this.selectChangeList = list;
|
// 1. 将数据存入 localStorage(需序列化)
|
||||||
if (list.length >=2) {
|
localStorage.setItem(storageKey, JSON.stringify(list));
|
||||||
this.form.noticeType = [list[0].id, list[1].id];
|
// 1. 用 Vue Router 解析目标路由的完整 URL
|
||||||
} else {
|
const routeLocation = this.$router.resolve({
|
||||||
this.form.noticeType = [list[0].id];
|
name: 'DialogView',
|
||||||
}
|
query: { storageKey }
|
||||||
this.form.noticeType.forEach(item => {
|
|
||||||
list.some(val => {
|
|
||||||
if (item === val.id) {
|
|
||||||
this.selectChoose.push(val);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.lineDataParams = {
|
|
||||||
lineXData: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
||||||
data: [820, 932, 901, 934, 1290, 1330, 1320]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 取消按钮 */
|
|
||||||
cancel() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.open = false;
|
|
||||||
});
|
});
|
||||||
|
// 2. 打开新窗口(routeLocation.href 是完整路径)
|
||||||
|
window.open(routeLocation.href, '_blank');
|
||||||
|
// _blank:新标签页;_self:当前窗口(默认)
|
||||||
},
|
},
|
||||||
chartDataEvent(val) {
|
chartDataEvent(val) {
|
||||||
// console.log('val===',val);
|
// console.log('val===',val);
|
||||||
|
|||||||
@@ -71,13 +71,13 @@
|
|||||||
}
|
}
|
||||||
fnType(dataVal).then(response => {
|
fnType(dataVal).then(response => {
|
||||||
this.$modal.msgSuccess(response.msg);
|
this.$modal.msgSuccess(response.msg);
|
||||||
this.$router.push("/disRevenue/resource/group")
|
this.$router.push("/resource/group")
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$modal.msgError("操作失败")
|
this.$modal.msgError("操作失败")
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'cancle':
|
case 'cancle':
|
||||||
this.$router.push("/disRevenue/resource/group");
|
this.$router.push("/resource/group");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container pageTopForm">
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="130px">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="130px">
|
||||||
<el-form-item label="资源组名称" prop="groupName">
|
<el-form-item label="资源组名称" prop="groupName">
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
|
|||||||
@@ -351,7 +351,7 @@
|
|||||||
},
|
},
|
||||||
// 返回
|
// 返回
|
||||||
goBack() {
|
goBack() {
|
||||||
this.$router.push({path:'/disRevenue/resource/monitorStategy'});
|
this.$router.push({path:'/resource/monitorStategy'});
|
||||||
},
|
},
|
||||||
// 监听事件
|
// 监听事件
|
||||||
callback(result, dataVal, formVal) {
|
callback(result, dataVal, formVal) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container pageTopForm">
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" label-width="auto">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" label-width="auto">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="搜索" prop="switchName">
|
<el-form-item label="搜索" prop="switchName">
|
||||||
|
|||||||
@@ -326,7 +326,7 @@
|
|||||||
},
|
},
|
||||||
// 返回
|
// 返回
|
||||||
goBack() {
|
goBack() {
|
||||||
this.$router.push({path:'/disRevenue/resource/monitorTemp'});
|
this.$router.push({path:'/resource/monitorTemp'});
|
||||||
},
|
},
|
||||||
// 监听事件
|
// 监听事件
|
||||||
callback(result, dataVal, formVal) {
|
callback(result, dataVal, formVal) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container pageTopForm">
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="130px">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="130px">
|
||||||
<el-form-item label="模版名称" prop="switchName">
|
<el-form-item label="模版名称" prop="switchName">
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
|
|||||||
@@ -112,13 +112,13 @@
|
|||||||
}
|
}
|
||||||
fnType(dataVal).then(response => {
|
fnType(dataVal).then(response => {
|
||||||
this.$modal.msgSuccess(response.msg);
|
this.$modal.msgSuccess(response.msg);
|
||||||
this.$router.push("/disRevenue/resource/register")
|
this.$router.push("/resource/register")
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$modal.msgError("操作失败")
|
this.$modal.msgError("操作失败")
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'cancle':
|
case 'cancle':
|
||||||
this.$router.push("/disRevenue/resource/register")
|
this.$router.push("/resource/register")
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container pageTopForm">
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="auto">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="auto">
|
||||||
<el-form-item label="名称" prop="nameKey">
|
<el-form-item label="名称" prop="nameKey">
|
||||||
<el-col>
|
<el-col>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container pageTopForm">
|
||||||
<div style="height: 200px;">
|
<div style="height: 200px;">
|
||||||
<EchartsPie v-for="item of dataList" :dataList="item" class="w30 h100 disInlineBlock"></EchartsPie>
|
<EchartsPie v-for="item of dataList" :dataList="item" style="width: 33%;" class="h100 disInlineBlock"></EchartsPie>
|
||||||
</div>
|
</div>
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" label-width="auto">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" label-width="auto">
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
dataList: [{
|
dataList: [{
|
||||||
centerVal: '56',
|
centerVal: '56',
|
||||||
unit: '台',
|
unit: '台',
|
||||||
center: ['30%', '50%'],
|
center: ['20%', '50%'],
|
||||||
color: ['#31bb42', '#f96602'],
|
color: ['#31bb42', '#f96602'],
|
||||||
data: [
|
data: [
|
||||||
{ value: 36, name: '在线服务器' },
|
{ value: 36, name: '在线服务器' },
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
},{
|
},{
|
||||||
centerVal: '10',
|
centerVal: '10',
|
||||||
unit: '台',
|
unit: '台',
|
||||||
center: ['30%', '50%'],
|
center: ['20%', '50%'],
|
||||||
color: ['#1c7dbc', '#f80a4f'],
|
color: ['#1c7dbc', '#f80a4f'],
|
||||||
data: [
|
data: [
|
||||||
{ value: 8, name: '在线交换机' },
|
{ value: 8, name: '在线交换机' },
|
||||||
|
|||||||
@@ -73,13 +73,13 @@
|
|||||||
}
|
}
|
||||||
fnType(dataVal).then(response => {
|
fnType(dataVal).then(response => {
|
||||||
this.$modal.msgSuccess(response.msg);
|
this.$modal.msgSuccess(response.msg);
|
||||||
this.$router.push("/disRevenue/resource/topology")
|
this.$router.push("/resource/topology")
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$modal.msgError("操作失败")
|
this.$modal.msgError("操作失败")
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'cancle':
|
case 'cancle':
|
||||||
this.$router.push("/disRevenue/resource/topology");
|
this.$router.push("/resource/topology");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container pageTopForm">
|
||||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="130px">
|
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" :inline="true" label-width="130px">
|
||||||
<el-form-item label="交换机名称" prop="switchName">
|
<el-form-item label="交换机名称" prop="switchName">
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
|
|||||||
@@ -1,221 +1,221 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||||
<h3 class="title">{{title}}</h3>
|
<h3 class="title">{{title}}</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.username"
|
v-model="loginForm.username"
|
||||||
type="text"
|
type="text"
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="账号"
|
placeholder="账号"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.password"
|
v-model="loginForm.password"
|
||||||
type="password"
|
type="password"
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="密码"
|
placeholder="密码"
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="code" v-if="captchaEnabled">
|
<el-form-item prop="code" v-if="captchaEnabled">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.code"
|
v-model="loginForm.code"
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="验证码"
|
placeholder="验证码"
|
||||||
style="width: 63%"
|
style="width: 63%"
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="login-code">
|
<div class="login-code">
|
||||||
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
||||||
<el-form-item style="width:100%;">
|
<el-form-item style="width:100%;">
|
||||||
<el-button
|
<el-button
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="medium"
|
size="medium"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="width:100%;"
|
style="width:100%;"
|
||||||
@click.native.prevent="handleLogin"
|
@click.native.prevent="handleLogin"
|
||||||
>
|
>
|
||||||
<span v-if="!loading">登 录</span>
|
<span v-if="!loading">登 录</span>
|
||||||
<span v-else>登 录 中...</span>
|
<span v-else>登 录 中...</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<div style="float: right;" v-if="register">
|
<div style="float: right;" v-if="register">
|
||||||
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
<router-link class="link-type" :to="'/register'">立即注册</router-link>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- 底部 -->
|
<!-- 底部 -->
|
||||||
<div class="el-login-footer">
|
<div class="el-login-footer">
|
||||||
<span>Copyright © 2018-2025 ruoyi.vip All Rights Reserved.</span>
|
<span>Copyright © 2018-2025 ZhiRongYun All Rights Reserved.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
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'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Login",
|
name: "Login",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: process.env.VUE_APP_TITLE,
|
title: process.env.VUE_APP_TITLE,
|
||||||
codeUrl: "",
|
codeUrl: "",
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: "admin",
|
username: "admin",
|
||||||
password: "admin123",
|
password: "admin123",
|
||||||
rememberMe: false,
|
rememberMe: false,
|
||||||
code: "",
|
code: "",
|
||||||
uuid: ""
|
uuid: ""
|
||||||
},
|
},
|
||||||
loginRules: {
|
loginRules: {
|
||||||
username: [
|
username: [
|
||||||
{ required: true, trigger: "blur", message: "请输入您的账号" }
|
{ required: true, trigger: "blur", message: "请输入您的账号" }
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
{ required: true, trigger: "blur", message: "请输入您的密码" }
|
{ required: true, trigger: "blur", message: "请输入您的密码" }
|
||||||
],
|
],
|
||||||
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
// 验证码开关
|
// 验证码开关
|
||||||
captchaEnabled: true,
|
captchaEnabled: true,
|
||||||
// 注册开关
|
// 注册开关
|
||||||
register: false,
|
register: false,
|
||||||
redirect: undefined
|
redirect: undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route: {
|
$route: {
|
||||||
handler: function(route) {
|
handler: function(route) {
|
||||||
this.redirect = route.query && route.query.redirect
|
this.redirect = route.query && route.query.redirect
|
||||||
},
|
},
|
||||||
immediate: true
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getCode()
|
this.getCode()
|
||||||
this.getCookie()
|
this.getCookie()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCode() {
|
getCode() {
|
||||||
getCodeImg().then(res => {
|
getCodeImg().then(res => {
|
||||||
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
|
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
|
||||||
if (this.captchaEnabled) {
|
if (this.captchaEnabled) {
|
||||||
this.codeUrl = "data:image/gif;base64," + res.img
|
this.codeUrl = "data:image/gif;base64," + res.img
|
||||||
this.loginForm.uuid = res.uuid
|
this.loginForm.uuid = res.uuid
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCookie() {
|
getCookie() {
|
||||||
const username = Cookies.get("username")
|
const username = Cookies.get("username")
|
||||||
const password = Cookies.get("password")
|
const password = Cookies.get("password")
|
||||||
const rememberMe = Cookies.get('rememberMe')
|
const rememberMe = Cookies.get('rememberMe')
|
||||||
this.loginForm = {
|
this.loginForm = {
|
||||||
username: username === undefined ? this.loginForm.username : username,
|
username: username === undefined ? this.loginForm.username : username,
|
||||||
password: password === undefined ? this.loginForm.password : decrypt(password),
|
password: password === undefined ? this.loginForm.password : decrypt(password),
|
||||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
this.$refs.loginForm.validate(valid => {
|
this.$refs.loginForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
if (this.loginForm.rememberMe) {
|
if (this.loginForm.rememberMe) {
|
||||||
Cookies.set("username", this.loginForm.username, { expires: 30 })
|
Cookies.set("username", this.loginForm.username, { expires: 30 })
|
||||||
Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 })
|
Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 })
|
||||||
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 })
|
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 })
|
||||||
} else {
|
} else {
|
||||||
Cookies.remove("username")
|
Cookies.remove("username")
|
||||||
Cookies.remove("password")
|
Cookies.remove("password")
|
||||||
Cookies.remove('rememberMe')
|
Cookies.remove('rememberMe')
|
||||||
}
|
}
|
||||||
this.$store.dispatch("Login", this.loginForm).then(() => {
|
this.$store.dispatch("Login", this.loginForm).then(() => {
|
||||||
this.$router.push({ path: this.redirect || "/" }).catch(()=>{})
|
this.$router.push({ path: this.redirect || "/" }).catch(()=>{})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (this.captchaEnabled) {
|
if (this.captchaEnabled) {
|
||||||
this.getCode()
|
this.getCode()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
.login {
|
.login {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-image: url("../assets/images/login-background.jpg");
|
background-image: url("../assets/images/login-background.jpg");
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
margin: 0px auto 30px auto;
|
margin: 0px auto 30px auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #707070;
|
color: #707070;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-form {
|
.login-form {
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
padding: 25px 25px 5px 25px;
|
padding: 25px 25px 5px 25px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
.el-input {
|
.el-input {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
input {
|
input {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.input-icon {
|
.input-icon {
|
||||||
height: 39px;
|
height: 39px;
|
||||||
width: 14px;
|
width: 14px;
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.login-tip {
|
.login-tip {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #bfbfbf;
|
color: #bfbfbf;
|
||||||
}
|
}
|
||||||
.login-code {
|
.login-code {
|
||||||
width: 33%;
|
width: 33%;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
float: right;
|
float: right;
|
||||||
img {
|
img {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.el-login-footer {
|
.el-login-footer {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: Arial;
|
font-family: Arial;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
.login-code-img {
|
.login-code-img {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,211 +1,211 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="register">
|
<div class="register">
|
||||||
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
|
||||||
<h3 class="title">{{title}}</h3>
|
<h3 class="title">{{title}}</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="registerForm.password"
|
v-model="registerForm.password"
|
||||||
type="password"
|
type="password"
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="密码"
|
placeholder="密码"
|
||||||
@keyup.enter.native="handleRegister"
|
@keyup.enter.native="handleRegister"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="confirmPassword">
|
<el-form-item prop="confirmPassword">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="registerForm.confirmPassword"
|
v-model="registerForm.confirmPassword"
|
||||||
type="password"
|
type="password"
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="确认密码"
|
placeholder="确认密码"
|
||||||
@keyup.enter.native="handleRegister"
|
@keyup.enter.native="handleRegister"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="code" v-if="captchaEnabled">
|
<el-form-item prop="code" v-if="captchaEnabled">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="registerForm.code"
|
v-model="registerForm.code"
|
||||||
auto-complete="off"
|
auto-complete="off"
|
||||||
placeholder="验证码"
|
placeholder="验证码"
|
||||||
style="width: 63%"
|
style="width: 63%"
|
||||||
@keyup.enter.native="handleRegister"
|
@keyup.enter.native="handleRegister"
|
||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="register-code">
|
<div class="register-code">
|
||||||
<img :src="codeUrl" @click="getCode" class="register-code-img"/>
|
<img :src="codeUrl" @click="getCode" class="register-code-img"/>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="width:100%;">
|
<el-form-item style="width:100%;">
|
||||||
<el-button
|
<el-button
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
size="medium"
|
size="medium"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="width:100%;"
|
style="width:100%;"
|
||||||
@click.native.prevent="handleRegister"
|
@click.native.prevent="handleRegister"
|
||||||
>
|
>
|
||||||
<span v-if="!loading">注 册</span>
|
<span v-if="!loading">注 册</span>
|
||||||
<span v-else>注 册 中...</span>
|
<span v-else>注 册 中...</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<div style="float: right;">
|
<div style="float: right;">
|
||||||
<router-link class="link-type" :to="'/login'">使用已有账户登录</router-link>
|
<router-link class="link-type" :to="'/login'">使用已有账户登录</router-link>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- 底部 -->
|
<!-- 底部 -->
|
||||||
<div class="el-register-footer">
|
<div class="el-register-footer">
|
||||||
<span>Copyright © 2018-2025 ruoyi.vip All Rights Reserved.</span>
|
<span>Copyright © 2018-2025 ZhiRongYun All Rights Reserved.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getCodeImg, register } from "@/api/login"
|
import { getCodeImg, register } from "@/api/login"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Register",
|
name: "Register",
|
||||||
data() {
|
data() {
|
||||||
const equalToPassword = (rule, value, callback) => {
|
const equalToPassword = (rule, value, callback) => {
|
||||||
if (this.registerForm.password !== value) {
|
if (this.registerForm.password !== value) {
|
||||||
callback(new Error("两次输入的密码不一致"))
|
callback(new Error("两次输入的密码不一致"))
|
||||||
} else {
|
} else {
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
title: process.env.VUE_APP_TITLE,
|
title: process.env.VUE_APP_TITLE,
|
||||||
codeUrl: "",
|
codeUrl: "",
|
||||||
registerForm: {
|
registerForm: {
|
||||||
username: "",
|
username: "",
|
||||||
password: "",
|
password: "",
|
||||||
confirmPassword: "",
|
confirmPassword: "",
|
||||||
code: "",
|
code: "",
|
||||||
uuid: ""
|
uuid: ""
|
||||||
},
|
},
|
||||||
registerRules: {
|
registerRules: {
|
||||||
username: [
|
username: [
|
||||||
{ required: true, trigger: "blur", message: "请输入您的账号" },
|
{ required: true, trigger: "blur", message: "请输入您的账号" },
|
||||||
{ min: 2, max: 20, message: '用户账号长度必须介于 2 和 20 之间', trigger: 'blur' }
|
{ min: 2, max: 20, message: '用户账号长度必须介于 2 和 20 之间', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
{ required: true, trigger: "blur", message: "请输入您的密码" },
|
{ required: true, trigger: "blur", message: "请输入您的密码" },
|
||||||
{ min: 5, max: 20, message: "用户密码长度必须介于 5 和 20 之间", trigger: "blur" },
|
{ min: 5, max: 20, message: "用户密码长度必须介于 5 和 20 之间", trigger: "blur" },
|
||||||
{ pattern: /^[^<>"'|\\]+$/, message: "不能包含非法字符:< > \" ' \\\ |", trigger: "blur" }
|
{ pattern: /^[^<>"'|\\]+$/, message: "不能包含非法字符:< > \" ' \\\ |", trigger: "blur" }
|
||||||
],
|
],
|
||||||
confirmPassword: [
|
confirmPassword: [
|
||||||
{ required: true, trigger: "blur", message: "请再次输入您的密码" },
|
{ required: true, trigger: "blur", message: "请再次输入您的密码" },
|
||||||
{ required: true, validator: equalToPassword, trigger: "blur" }
|
{ required: true, validator: equalToPassword, trigger: "blur" }
|
||||||
],
|
],
|
||||||
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
captchaEnabled: true
|
captchaEnabled: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getCode()
|
this.getCode()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCode() {
|
getCode() {
|
||||||
getCodeImg().then(res => {
|
getCodeImg().then(res => {
|
||||||
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
|
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
|
||||||
if (this.captchaEnabled) {
|
if (this.captchaEnabled) {
|
||||||
this.codeUrl = "data:image/gif;base64," + res.img
|
this.codeUrl = "data:image/gif;base64," + res.img
|
||||||
this.registerForm.uuid = res.uuid
|
this.registerForm.uuid = res.uuid
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleRegister() {
|
handleRegister() {
|
||||||
this.$refs.registerForm.validate(valid => {
|
this.$refs.registerForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
register(this.registerForm).then(res => {
|
register(this.registerForm).then(res => {
|
||||||
const username = this.registerForm.username
|
const username = this.registerForm.username
|
||||||
this.$alert("<font color='red'>恭喜你,您的账号 " + username + " 注册成功!</font>", '系统提示', {
|
this.$alert("<font color='red'>恭喜你,您的账号 " + username + " 注册成功!</font>", '系统提示', {
|
||||||
dangerouslyUseHTMLString: true,
|
dangerouslyUseHTMLString: true,
|
||||||
type: 'success'
|
type: 'success'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$router.push("/login")
|
this.$router.push("/login")
|
||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (this.captchaEnabled) {
|
if (this.captchaEnabled) {
|
||||||
this.getCode()
|
this.getCode()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
.register {
|
.register {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-image: url("../assets/images/login-background.jpg");
|
background-image: url("../assets/images/login-background.jpg");
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
margin: 0px auto 30px auto;
|
margin: 0px auto 30px auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #707070;
|
color: #707070;
|
||||||
}
|
}
|
||||||
|
|
||||||
.register-form {
|
.register-form {
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
padding: 25px 25px 5px 25px;
|
padding: 25px 25px 5px 25px;
|
||||||
.el-input {
|
.el-input {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
input {
|
input {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.input-icon {
|
.input-icon {
|
||||||
height: 39px;
|
height: 39px;
|
||||||
width: 14px;
|
width: 14px;
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.register-tip {
|
.register-tip {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #bfbfbf;
|
color: #bfbfbf;
|
||||||
}
|
}
|
||||||
.register-code {
|
.register-code {
|
||||||
width: 33%;
|
width: 33%;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
float: right;
|
float: right;
|
||||||
img {
|
img {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.el-register-footer {
|
.el-register-footer {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: Arial;
|
font-family: Arial;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
.register-code-img {
|
.register-code-img {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ function resolve(dir) {
|
|||||||
|
|
||||||
const CompressionPlugin = require('compression-webpack-plugin')
|
const CompressionPlugin = require('compression-webpack-plugin')
|
||||||
|
|
||||||
const name = process.env.VUE_APP_TITLE || 'SAAS管理平台' // 网页标题
|
const name = process.env.VUE_APP_TITLE || 'SAAS综合管理平台' // 网页标题
|
||||||
|
|
||||||
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
const port = process.env.port || process.env.npm_config_port || 80 // 端口
|
||||||
|
|
||||||
@@ -32,9 +32,9 @@ module.exports = {
|
|||||||
port: port,
|
port: port,
|
||||||
open: true,
|
open: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy http://192.168.9.143:8080
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: `http://192.168.9.143:8080`,
|
target: `http://192.168.9.137:8080`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
|
|||||||