首页 样式修改

This commit is contained in:
jhnine 2023-03-07 11:23:33 +08:00
parent deceba818a
commit bc86e00a5a
7 changed files with 80 additions and 94 deletions

BIN
public/light-bk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -1,6 +1,5 @@
import axios from 'axios'
// import { Message, MessageBox } from 'element-ui'
import { Message } from 'element-ui'
import { Message, MessageBox } from 'element-ui'
import store from '@/store'
import { getToken } from '@/utils/auth'
// import Cookies from 'js-cookie'
@ -66,15 +65,15 @@ service.interceptors.response.use(
response => {
const res = response.data
if (res?.code === 401) {
// MessageBox.confirm('您的登录已过期或者当前账号没有权限,是否重新登录?', '无权限', {
// confirmButtonText: '重新登录',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// store.dispatch('user/resetToken').then(() => {
// location.reload()
// })
// })
MessageBox.confirm('您的登录已过期或者当前账号没有权限,是否重新登录?', '无权限', {
confirmButtonText: '重新登录',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
store.dispatch('user/resetToken').then(() => {
location.reload()
})
})
return Promise.reject(new Error(res || 'Error'))
// window.location.href = '/monitor/login'
}
@ -97,15 +96,15 @@ service.interceptors.response.use(
duration: 5 * 1000
})
if (error?.response?.status === 401) {
// MessageBox.confirm('您的登录已过期或者当前账号没有权限,是否重新登录?', '无权限', {
// confirmButtonText: '重新登录',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// store.dispatch('user/resetToken').then(() => {
// location.reload()
// })
// })
MessageBox.confirm('您的登录已过期或者当前账号没有权限,是否重新登录?', '无权限', {
confirmButtonText: '重新登录',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
store.dispatch('user/resetToken').then(() => {
location.reload()
})
})
// window.location.href = '/monitor/login'
}
return Promise.reject(error)

View File

@ -62,68 +62,61 @@ export default {
color: '#008B45'
}
},
color: ['#1890ff'],
color: ['rgba(79, 172, 254, 1)'],
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'none',
show: false
},
backgroundColor: '#000033',
textStyle: { color: '#fff' },
borderWidth: 0
},
// legend: {
// icon: 'rect',
// right: '0',
// itemHeight: 1,
// itemWidth: 40,
// textStyle: { color: '#fff' }
// },
grid: {
right: '1%',
bottom: '18%',
top: '5%',
left: this.config.unit.length > 7 ? '15%' : '10%'
left: '15%'
},
xAxis: {
type: 'category',
boundaryGap: false,
data: this.Data.xData,
axisLine: {
show: true
lineStyle: {
color: 'rgba(135, 189, 245, 0.1)'
}
},
axisLabel: {
show: true,
interval: 0,
padding: [0, 0, 0, -20],
margin: 14,
textStyle: {
fontSize: '10',
lineHeight: 40,
color: '#fff',
fontFamily: 'Microsoft YaHei'
fontSize: '12',
lineHeight: 20,
color: '#DDDDDD',
fontFamily: 'Source Han Sans CN'
},
formatter: function(params) {
console.log(params)
switch (params) {
case '2023-04-30':
return params.slice(2).replaceAll('-', '/')
case '2023-03-31':
return params.slice(2).replaceAll('-', '/')
case '2023-02-28':
return params.slice(2).replaceAll('-', '/')
case '2023-01-31':
return params.slice(2).replaceAll('-', '/')
case '2022-12-31':
return params
return params.slice(2).replaceAll('-', '/')
case '2022-11-30':
return params
return params.slice(2).replaceAll('-', '/')
case '2022-10-31':
return params
return params.slice(2).replaceAll('-', '/')
case '2022-09-30':
return params
case '2022-08-31':
return params
case '2022-07-31':
return params
case '2022-06-30':
return params
case '2022-05-31':
return params
case '2022-04-30':
return params
case '2022-03-31':
return params
return params.slice(2).replaceAll('-', '/')
default:
return ''
}
@ -143,8 +136,7 @@ export default {
splitLine: {
show: true,
lineStyle: {
width: 1,
type: 'dotted'
color: 'rgba(135, 189, 245, 0.1)'
}
},
nameGap: 10,
@ -159,9 +151,9 @@ export default {
interval: 0,
align: 'right',
textStyle: {
fontSize: '8',
fontWeight: 'bolder',
color: '#fff'
fontSize: '12',
color: 'rgba(221, 221, 221, 1)',
fontFamily: 'Source Han Sans CN'
}
},
scale: true,
@ -178,24 +170,17 @@ export default {
},
data: this.Data.used,
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: 'rgba(24,144,255,0.7)' // 0%
},
{
offset: 1,
color: 'rgba(30,231,231,0.7)' // 100%
}
],
global: false // false
}
opacity: 1,
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: 'rgba(0, 242, 254, 1)' // 0%
},
{
offset: 1,
color: 'rgba(79, 172, 254, 1)' // 100%
}
])
}
}
],

View File

@ -121,24 +121,27 @@ export default {
textStyle: { color: '#fff' }
},
grid: {
right: '5%',
bottom: '18%',
top: '12%'
right: '1%',
bottom: '14%',
top: '12%',
left: '15%'
},
xAxis: {
type: 'category',
data: this.Data.xData,
axisLine: {
show: true
lineStyle: {
color: 'rgba(135, 189, 245, 0.1)'
}
},
axisLabel: {
show: true,
interval: 0,
textStyle: {
fontSize: '10',
lineHeight: 40,
color: '#fff',
fontFamily: 'Microsoft YaHei'
fontSize: '12',
lineHeight: 20,
color: 'rgba(221, 221, 221, 1)',
fontFamily: 'Source Han Sans CN'
},
margin: this.config.unit.length > 10 ? 35 : 8,
formatter: function(params) {
@ -175,23 +178,22 @@ export default {
splitLine: {
show: true,
lineStyle: {
width: 1,
type: 'dotted'
color: 'rgba(135, 189, 245, 0.1)'
}
},
name: this.config.unit,
// name: this.config.unit,
data: [],
axisLine: {
lineStyle: {
color: '#fff'
color: 'rgba(135, 189, 245, 0.1)'
}
},
axisLabel: {
show: true,
textStyle: {
fontSize: '8',
fontWeight: 'bolder',
color: '#fff'
fontSize: '12',
color: 'rgba(221, 221, 221, 1)',
fontFamily: 'Source Han Sans CN'
}
},
scale: true,

View File

@ -115,11 +115,11 @@ export default {
},
splitLine: {
lineStyle: {
color: 'rgba(255,255,255,0.1)'
color: 'rgba(135, 189, 245, 0.1)'
}},
axisLine: {
lineStyle: {
color: '#999999'
color: '#DDDDDD'
}
},
position: 'left',

View File

@ -352,14 +352,14 @@ export default {
.left {
height: 100%;
.left_1{
height: 34.6%;
height: 38%;
}
.left_2 {
height: 27.4%;
height: 28%;
}
.left_3 {
width: 100%;
height: 37.8%;
height: 25%;
}
}
}