parent
191cc47c66
commit
3a62d2d7a2
@ -0,0 +1,130 @@ |
||||
import request from '@/utils/request' |
||||
import { parseStrEmpty } from "@/utils/ruoyi"; |
||||
|
||||
// 查询用户列表
|
||||
export function listUser(query) { |
||||
return request({ |
||||
url: '/system/user/list', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 查询用户详细
|
||||
export function getUser(userId) { |
||||
return request({ |
||||
url: '/system/user/' + parseStrEmpty(userId), |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 新增用户
|
||||
export function addUser(data) { |
||||
return request({ |
||||
url: '/system/user', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改用户
|
||||
export function updateUser(data) { |
||||
return request({ |
||||
url: '/system/user', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 删除用户
|
||||
export function delUser(userId) { |
||||
return request({ |
||||
url: '/system/user/' + userId, |
||||
method: 'delete' |
||||
}) |
||||
} |
||||
|
||||
// 用户密码重置
|
||||
export function resetUserPwd(userId, password) { |
||||
const data = { |
||||
userId, |
||||
password |
||||
} |
||||
return request({ |
||||
url: '/system/user/resetPwd', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 用户状态修改
|
||||
export function changeUserStatus(userId, status) { |
||||
const data = { |
||||
userId, |
||||
status |
||||
} |
||||
return request({ |
||||
url: '/system/user/changeStatus', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 查询用户个人信息
|
||||
export function getUserProfile() { |
||||
return request({ |
||||
url: '/system/user/profile', |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 修改用户个人信息
|
||||
export function updateUserProfile(data) { |
||||
return request({ |
||||
url: '/system/user/profile', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 用户密码重置
|
||||
export function updateUserPwd(oldPassword, newPassword) { |
||||
const data = { |
||||
oldPassword, |
||||
newPassword |
||||
} |
||||
return request({ |
||||
url: '/system/user/profile/updatePwd', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 用户头像上传
|
||||
export function uploadAvatar(data) { |
||||
return request({ |
||||
url: '/system/user/profile/avatar', |
||||
method: 'post', |
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 查询授权角色
|
||||
export function getAuthRole(userId) { |
||||
return request({ |
||||
url: '/system/user/authRole/' + userId, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 保存授权角色
|
||||
export function updateAuthRole(data) { |
||||
return request({ |
||||
url: '/system/user/authRole', |
||||
method: 'put', |
||||
params: data |
||||
}) |
||||
} |
||||
|
||||
|
||||
@ -0,0 +1,130 @@ |
||||
import request from '@/utils/request' |
||||
import { parseStrEmpty } from "@/utils/ruoyi"; |
||||
|
||||
// 查询用户列表
|
||||
export function listUser(query) { |
||||
return request({ |
||||
url: '/system/user/list', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 查询用户详细
|
||||
export function getUser(userId) { |
||||
return request({ |
||||
url: '/system/user/' + parseStrEmpty(userId), |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 新增用户
|
||||
export function addUser(data) { |
||||
return request({ |
||||
url: '/system/user', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改用户
|
||||
export function updateUser(data) { |
||||
return request({ |
||||
url: '/system/user', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 删除用户
|
||||
export function delUser(userId) { |
||||
return request({ |
||||
url: '/system/user/' + userId, |
||||
method: 'delete' |
||||
}) |
||||
} |
||||
|
||||
// 用户密码重置
|
||||
export function resetUserPwd(userId, password) { |
||||
const data = { |
||||
userId, |
||||
password |
||||
} |
||||
return request({ |
||||
url: '/system/user/resetPwd', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 用户状态修改
|
||||
export function changeUserStatus(userId, status) { |
||||
const data = { |
||||
userId, |
||||
status |
||||
} |
||||
return request({ |
||||
url: '/system/user/changeStatus', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 查询用户个人信息
|
||||
export function getUserProfile() { |
||||
return request({ |
||||
url: '/system/user/profile', |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 修改用户个人信息
|
||||
export function updateUserProfile(data) { |
||||
return request({ |
||||
url: '/system/user/profile', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 用户密码重置
|
||||
export function updateUserPwd(oldPassword, newPassword) { |
||||
const data = { |
||||
oldPassword, |
||||
newPassword |
||||
} |
||||
return request({ |
||||
url: '/system/user/profile/updatePwd', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 用户头像上传
|
||||
export function uploadAvatar(data) { |
||||
return request({ |
||||
url: '/system/user/profile/avatar', |
||||
method: 'post', |
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 查询授权角色
|
||||
export function getAuthRole(userId) { |
||||
return request({ |
||||
url: '/system/user/authRole/' + userId, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 保存授权角色
|
||||
export function updateAuthRole(data) { |
||||
return request({ |
||||
url: '/system/user/authRole', |
||||
method: 'put', |
||||
params: data |
||||
}) |
||||
} |
||||
|
||||
|
||||
@ -0,0 +1,52 @@ |
||||
import request from '@/utils/request' |
||||
|
||||
// 查询字典数据列表
|
||||
export function listData(query) { |
||||
return request({ |
||||
url: '/system/dict/data/list', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 查询字典数据详细
|
||||
export function getData(dictCode) { |
||||
return request({ |
||||
url: '/system/dict/data/' + dictCode, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 根据字典类型查询字典数据信息
|
||||
export function getDicts(dictType) { |
||||
return request({ |
||||
url: '/system/dict/data/type/' + dictType, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 新增字典数据
|
||||
export function addData(data) { |
||||
return request({ |
||||
url: '/system/dict/data', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改字典数据
|
||||
export function updateData(data) { |
||||
return request({ |
||||
url: '/system/dict/data', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 删除字典数据
|
||||
export function delData(dictCode) { |
||||
return request({ |
||||
url: '/system/dict/data/' + dictCode, |
||||
method: 'delete' |
||||
}) |
||||
} |
||||
@ -0,0 +1,60 @@ |
||||
import request from '@/utils/request' |
||||
|
||||
// 查询字典类型列表
|
||||
export function listType(query) { |
||||
return request({ |
||||
url: '/system/dict/type/list', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 查询字典类型详细
|
||||
export function getType(dictId) { |
||||
return request({ |
||||
url: '/system/dict/type/' + dictId, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 新增字典类型
|
||||
export function addType(data) { |
||||
return request({ |
||||
url: '/system/dict/type', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改字典类型
|
||||
export function updateType(data) { |
||||
return request({ |
||||
url: '/system/dict/type', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 删除字典类型
|
||||
export function delType(dictId) { |
||||
return request({ |
||||
url: '/system/dict/type/' + dictId, |
||||
method: 'delete' |
||||
}) |
||||
} |
||||
|
||||
// 刷新字典缓存
|
||||
export function refreshCache() { |
||||
return request({ |
||||
url: '/system/dict/type/refreshCache', |
||||
method: 'delete' |
||||
}) |
||||
} |
||||
|
||||
// 获取字典选择框列表
|
||||
export function optionselect() { |
||||
return request({ |
||||
url: '/system/dict/type/optionselect', |
||||
method: 'get' |
||||
}) |
||||
} |
||||
@ -0,0 +1,130 @@ |
||||
import request from '@/utils/request' |
||||
import { parseStrEmpty } from "@/utils/ruoyi"; |
||||
|
||||
// 查询用户列表
|
||||
export function listUser(query) { |
||||
return request({ |
||||
url: '/system/user/list', |
||||
method: 'get', |
||||
params: query |
||||
}) |
||||
} |
||||
|
||||
// 查询用户详细
|
||||
export function getUser(userId) { |
||||
return request({ |
||||
url: '/system/user/' + parseStrEmpty(userId), |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 新增用户
|
||||
export function addUser(data) { |
||||
return request({ |
||||
url: '/system/user', |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 修改用户
|
||||
export function updateUser(data) { |
||||
return request({ |
||||
url: '/system/user', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 删除用户
|
||||
export function delUser(userId) { |
||||
return request({ |
||||
url: '/system/user/' + userId, |
||||
method: 'delete' |
||||
}) |
||||
} |
||||
|
||||
// 用户密码重置
|
||||
export function resetUserPwd(userId, password) { |
||||
const data = { |
||||
userId, |
||||
password |
||||
} |
||||
return request({ |
||||
url: '/system/user/resetPwd', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 用户状态修改
|
||||
export function changeUserStatus(userId, status) { |
||||
const data = { |
||||
userId, |
||||
status |
||||
} |
||||
return request({ |
||||
url: '/system/user/changeStatus', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 查询用户个人信息
|
||||
export function getUserProfile() { |
||||
return request({ |
||||
url: '/system/user/profile', |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 修改用户个人信息
|
||||
export function updateUserProfile(data) { |
||||
return request({ |
||||
url: '/system/user/profile', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 用户密码重置
|
||||
export function updateUserPwd(oldPassword, newPassword) { |
||||
const data = { |
||||
oldPassword, |
||||
newPassword |
||||
} |
||||
return request({ |
||||
url: '/system/user/profile/updatePwd', |
||||
method: 'put', |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 用户头像上传
|
||||
export function uploadAvatar(data) { |
||||
return request({ |
||||
url: '/system/user/profile/avatar', |
||||
method: 'post', |
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, |
||||
data: data |
||||
}) |
||||
} |
||||
|
||||
// 查询授权角色
|
||||
export function getAuthRole(userId) { |
||||
return request({ |
||||
url: '/system/user/authRole/' + userId, |
||||
method: 'get' |
||||
}) |
||||
} |
||||
|
||||
// 保存授权角色
|
||||
export function updateAuthRole(data) { |
||||
return request({ |
||||
url: '/system/user/authRole', |
||||
method: 'put', |
||||
params: data |
||||
}) |
||||
} |
||||
|
||||
|
||||
@ -0,0 +1,87 @@ |
||||
<template> |
||||
<div :class="className" :style="{height:height,width:width}" /> |
||||
</template> |
||||
|
||||
<script> |
||||
import * as echarts from 'echarts' |
||||
require('echarts/theme/macarons') // echarts theme |
||||
|
||||
const animationDuration = 6000 |
||||
|
||||
export default { |
||||
props: { |
||||
className: { |
||||
type: String, |
||||
default: 'chart' |
||||
}, |
||||
width: { |
||||
type: String, |
||||
default: '100%' |
||||
}, |
||||
height: { |
||||
type: String, |
||||
default: '300px' |
||||
} |
||||
}, |
||||
data() { |
||||
return { |
||||
chart: null |
||||
} |
||||
}, |
||||
mounted() { |
||||
this.$nextTick(() => { |
||||
this.initChart() |
||||
}) |
||||
}, |
||||
beforeDestroy() { |
||||
if (!this.chart) { |
||||
return |
||||
} |
||||
this.chart.dispose() |
||||
this.chart = null |
||||
}, |
||||
methods: { |
||||
initChart() { |
||||
this.chart = echarts.init(this.$el, 'macarons') |
||||
|
||||
this.chart.setOption({ |
||||
color: ['#1F78B4', '#A6CEE3', '#B2DF8A', '#33A02C', '#FB9A99', '#E31A1C'], |
||||
series: [{ |
||||
type: 'pie', |
||||
radius: ['28%', '66%'], |
||||
center: ['50%', '45%'], |
||||
label: { |
||||
fontSize: 16, |
||||
formatter: '{b} {d}%', |
||||
}, |
||||
data: [{ |
||||
value: 70, |
||||
name: '低能见度1' |
||||
}, |
||||
{ |
||||
value: 50, |
||||
name: '低能见度2' |
||||
}, |
||||
{ |
||||
value: 30, |
||||
name: '低能见度3' |
||||
}, |
||||
{ |
||||
value: 25, |
||||
name: '低能见度4' |
||||
}, |
||||
{ |
||||
value: 15, |
||||
name: '低能见度5' |
||||
}, |
||||
{ |
||||
value: 5, |
||||
name: '低能见度6' |
||||
} |
||||
], |
||||
}] |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
@ -0,0 +1,129 @@ |
||||
<template> |
||||
<div :class="className" :style="{height:height,width:width}" /> |
||||
</template> |
||||
|
||||
<script> |
||||
import * as echarts from 'echarts' |
||||
require('echarts/theme/macarons') // echarts theme |
||||
|
||||
const animationDuration = 6000 |
||||
|
||||
export default { |
||||
props: { |
||||
className: { |
||||
type: String, |
||||
default: 'chart' |
||||
}, |
||||
width: { |
||||
type: String, |
||||
default: '100%' |
||||
}, |
||||
height: { |
||||
type: String, |
||||
default: '300px' |
||||
} |
||||
}, |
||||
data() { |
||||
return { |
||||
chart: null |
||||
} |
||||
}, |
||||
mounted() { |
||||
this.$nextTick(() => { |
||||
this.initChart() |
||||
}) |
||||
}, |
||||
beforeDestroy() { |
||||
if (!this.chart) { |
||||
return |
||||
} |
||||
this.chart.dispose() |
||||
this.chart = null |
||||
}, |
||||
methods: { |
||||
initChart() { |
||||
var handred = 100 |
||||
var point = 66 |
||||
this.chart = echarts.init(this.$el, 'macarons') |
||||
|
||||
this.chart.setOption({ |
||||
title: [{ |
||||
text: 'CPU占用', |
||||
x: 'center', |
||||
y: '40%', |
||||
textStyle: { |
||||
fontSize: 10, |
||||
color: '#000', |
||||
} |
||||
},{ |
||||
text: '{a|'+ point +'}{c|%}', |
||||
x: 'center', |
||||
y: '53%', |
||||
textStyle: { |
||||
rich:{ |
||||
a: { |
||||
fontSize: 10, |
||||
color: '#000' |
||||
}, |
||||
|
||||
c: { |
||||
fontSize: 10, |
||||
color: '#000', |
||||
// padding: [5,0] |
||||
} |
||||
} |
||||
} |
||||
}], |
||||
series: [{ |
||||
name: 'circle', |
||||
type: 'pie', |
||||
clockWise: true, |
||||
radius: ['50%', '66%'], |
||||
itemStyle: { |
||||
normal: { |
||||
label: { |
||||
show: false |
||||
}, |
||||
labelLine: { |
||||
show: false |
||||
} |
||||
} |
||||
}, |
||||
hoverAnimation: false, |
||||
data: [{ |
||||
value: point, |
||||
name: '占比', |
||||
itemStyle: { |
||||
normal: { |
||||
color: { // 颜色渐变 |
||||
colorStops: [{ |
||||
offset: 0, |
||||
color: '#0095e3' // 0% 处的颜色 |
||||
}, { |
||||
offset: 1, |
||||
color: '#28E8FA' // 100% 处的颜色 |
||||
}] |
||||
}, |
||||
label: { |
||||
show: false |
||||
}, |
||||
labelLine: { |
||||
show: false |
||||
} |
||||
} |
||||
} |
||||
}, { |
||||
name: '剩余', |
||||
value: handred - point, |
||||
itemStyle: { |
||||
normal: { |
||||
color: '#cceaf9' |
||||
} |
||||
} |
||||
}] |
||||
}] |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
@ -0,0 +1,69 @@ |
||||
<template> |
||||
<div class=""> |
||||
<h3 class="h3">交换机</h3> |
||||
<el-row> |
||||
<el-col :span="14"> |
||||
<img src="../../../assets/images/profile.jpg" width="100%" alt="" srcset=""> |
||||
</el-col> |
||||
<el-col :span="9" offset="1"> |
||||
<p> |
||||
<span>在线状态:</span><br/> |
||||
<span>在线</span> |
||||
</p> |
||||
<p> |
||||
<span>设备级别:</span><br/> |
||||
<span>A</span> |
||||
</p> |
||||
<p> |
||||
<span>安装位置:</span><br/> |
||||
<span>在线</span> |
||||
</p> |
||||
<p> |
||||
<span>品牌型号:</span><br/> |
||||
<span>在线</span> |
||||
</p> |
||||
</el-col> |
||||
</el-row> |
||||
<el-divider></el-divider> |
||||
|
||||
<el-row> |
||||
<el-col :span="7"> |
||||
<BarChart2 height="100px"></BarChart2> |
||||
</el-col> |
||||
<el-col :span="7"> |
||||
<BarChart height="100px"></BarChart> |
||||
</el-col> |
||||
<el-col :span="10"> |
||||
<el-button round type="danger" size="mini">危险</el-button> |
||||
|
||||
<p> |
||||
<span>待处理预警数:</span> |
||||
<span>待开发</span> |
||||
</p> |
||||
|
||||
<p> |
||||
<span>预警总数:</span> |
||||
<span>待开发</span> |
||||
</p> |
||||
</el-col> |
||||
</el-row> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import BarChart from './BarChart1.vue' |
||||
import BarChart2 from './BarChart2.vue' |
||||
export default { |
||||
name: "cardItem", |
||||
components: { BarChart, BarChart2 }, |
||||
data() { |
||||
return { |
||||
} |
||||
}, |
||||
created() { |
||||
}, |
||||
methods: { |
||||
} |
||||
} |
||||
</script> |
||||
Loading…
Reference in new issue