CN-333 fix : 修改了一些样式和接口请求参数
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
.cn-chart-header-button {
|
||||
display: flex;
|
||||
|
||||
button:first-of-type {
|
||||
border-radius: 2px 0 0 2px;
|
||||
|
||||
}
|
||||
|
||||
.cn-chart-header-button-all {
|
||||
border-color: #0091FF;
|
||||
color: #0091FF;
|
||||
@@ -55,5 +57,8 @@
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-family: Roboto-Regular;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
@@ -48,6 +48,9 @@
|
||||
.cn-alarm-info-main-title {
|
||||
font-size: 16px;
|
||||
line-height: 19px;
|
||||
font-family: Roboto-Regular;
|
||||
color: #333333;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.cn-alarm-info-bottom {
|
||||
@@ -64,16 +67,20 @@
|
||||
display: flex;
|
||||
margin-left: 20px;
|
||||
height: 14px;
|
||||
|
||||
.cn-icon-time2 {
|
||||
color: #8FA1BE;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.cn-alarm-info-bottom-time {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
line-height: 14px;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,16 +89,20 @@
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.cn-icon-time2 {
|
||||
color: #8FA1BE;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.cn-alarm-info-bottom-time {
|
||||
color: #999999;
|
||||
line-height: 14px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
line-height: 17px;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,6 +128,11 @@
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
border-radius: 50%;
|
||||
font-family: Roboto-Black;
|
||||
font-size: 12px;
|
||||
color: #666666;
|
||||
line-height: 17px;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ export const api = {
|
||||
listCount: '/interface/detection/performance/list/count',
|
||||
overviewBasic: '/interface/detection/performance/detail/overview/basic'
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/* panel */
|
||||
|
||||
@@ -353,7 +353,7 @@ export default {
|
||||
} else {
|
||||
return getOption(this.chartInfo.type)
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
resize () {
|
||||
@@ -363,8 +363,8 @@ export default {
|
||||
showLoading (show) {
|
||||
this.$emit('showLoading', show)
|
||||
},
|
||||
getAlarmInfo(url,extraParams){
|
||||
this.$emit('getChartData',url,extraParams)
|
||||
getAlarmInfo (url, extraParams, isRefresh, timeFilter) {
|
||||
this.$emit('getChartData', url, extraParams, isRefresh, timeFilter)
|
||||
},
|
||||
initEchartsWithTable () {
|
||||
this.$refs['chart' + this.chartInfo.id] &&
|
||||
@@ -427,8 +427,8 @@ export default {
|
||||
isAppRelatedDomain: isAppRelatedDomain(props.chartInfo.type),
|
||||
isSingleSupportStatistics: isSingleSupportStatistics(props.chartInfo.type),
|
||||
isTwoSupportStatistics: isTwoSupportStatistics(props.chartInfo.type),
|
||||
isAlarmInfo: isAlarmInfo(props.chartInfo.type),
|
||||
isAlarmInfo: isAlarmInfo(props.chartInfo.type)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -232,17 +232,17 @@ export default {
|
||||
chartInfo: Object,
|
||||
errorInfo: {
|
||||
type: String,
|
||||
default: '',
|
||||
default: ''
|
||||
},
|
||||
isError: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
default: false
|
||||
},
|
||||
table: Object,
|
||||
orderPieTable: Object,
|
||||
orderPieTable: Object
|
||||
},
|
||||
components: {
|
||||
ChartError,
|
||||
ChartError
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
@@ -257,30 +257,30 @@ export default {
|
||||
tableData: [
|
||||
{
|
||||
name: '192.168.20.21',
|
||||
num: 111,
|
||||
num: 111
|
||||
},
|
||||
{
|
||||
name: '192.168.20.22',
|
||||
num: 345,
|
||||
num: 345
|
||||
},
|
||||
{
|
||||
name: '192.168.20.23',
|
||||
num: 111,
|
||||
num: 111
|
||||
},
|
||||
{
|
||||
name: '192.168.20.24',
|
||||
num: 345,
|
||||
num: 345
|
||||
},
|
||||
{
|
||||
name: '192.168.20.25',
|
||||
num: 111,
|
||||
num: 111
|
||||
},
|
||||
{
|
||||
name: '192.168.20.26',
|
||||
num: 345,
|
||||
},
|
||||
], // table的所有数据
|
||||
},
|
||||
num: 345
|
||||
}
|
||||
] // table的所有数据
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -323,7 +323,7 @@ export default {
|
||||
this.isFocusAll = false
|
||||
}
|
||||
this.$emit('tabHandleClick', item)
|
||||
},
|
||||
}
|
||||
},
|
||||
beforeCreate () {
|
||||
this.$emit('tabHandleClick', 'All')
|
||||
@@ -342,7 +342,7 @@ export default {
|
||||
const isGroupAndParentIsBlock =
|
||||
this.$_.get(this.chartInfo.parent, 'type') === 95 && this.isGroup
|
||||
return !isGroupAndParentIsBlock
|
||||
},
|
||||
}
|
||||
},
|
||||
setup (props) {
|
||||
const dateRangeValue = 60
|
||||
@@ -363,8 +363,8 @@ export default {
|
||||
isActiveIpTable: isActiveIpTable(props.chartInfo.type),
|
||||
isEchartsWithTable: isEchartsWithTable(props.chartInfo.type),
|
||||
isGroup: isGroup(props.chartInfo.type),
|
||||
isAlarmInfo: isAlarmInfo(props.chartInfo.type),
|
||||
isAlarmInfo: isAlarmInfo(props.chartInfo.type)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -101,6 +101,7 @@ export default {
|
||||
chartInfo: Object,
|
||||
chartData: [Array, Object],
|
||||
tabHandleClickType: String,
|
||||
queryParams: Object
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
@@ -119,7 +120,7 @@ export default {
|
||||
eventType: 'type1111111111111111111111111111111111',
|
||||
startTime: 1111111111,
|
||||
durationMs: 60000,
|
||||
endTime: 111111111111111112,
|
||||
endTime: 111111111111111112
|
||||
},
|
||||
{
|
||||
entityType: 'ip',
|
||||
@@ -130,7 +131,7 @@ export default {
|
||||
eventType: 'type111111111111111111111111111111111111',
|
||||
startTime: 1111111111,
|
||||
durationMs: 60000,
|
||||
endTime: 1111111112,
|
||||
endTime: 1111111112
|
||||
},
|
||||
{
|
||||
entityType: 'ip',
|
||||
@@ -141,7 +142,7 @@ export default {
|
||||
eventType: 'type',
|
||||
startTime: 1111111111,
|
||||
durationMs: 60000,
|
||||
endTime: 1111111112,
|
||||
endTime: 1111111112
|
||||
},
|
||||
{
|
||||
entityType: 'ip',
|
||||
@@ -152,7 +153,7 @@ export default {
|
||||
eventType: 'type',
|
||||
startTime: 1111111111,
|
||||
durationMs: 60000,
|
||||
endTime: 1111111112,
|
||||
endTime: 1111111112
|
||||
},
|
||||
{
|
||||
entityType: 'ip',
|
||||
@@ -163,7 +164,7 @@ export default {
|
||||
eventType: 'type',
|
||||
startTime: 1111111111,
|
||||
durationMs: 60000,
|
||||
endTime: 1111111112,
|
||||
endTime: 1111111112
|
||||
},
|
||||
{
|
||||
entityType: 'ip',
|
||||
@@ -174,7 +175,7 @@ export default {
|
||||
eventType: 'type',
|
||||
startTime: 1111111111,
|
||||
durationMs: 60000,
|
||||
endTime: 1111111112,
|
||||
endTime: 1111111112
|
||||
},
|
||||
{
|
||||
entityType: 'ip',
|
||||
@@ -185,7 +186,7 @@ export default {
|
||||
eventType: 'type',
|
||||
startTime: 1111111111,
|
||||
durationMs: 60000,
|
||||
endTime: 1111111112,
|
||||
endTime: 1111111112
|
||||
},
|
||||
{
|
||||
entityType: 'ip',
|
||||
@@ -196,7 +197,7 @@ export default {
|
||||
eventType: 'type',
|
||||
startTime: 1111111111,
|
||||
durationMs: 60000,
|
||||
endTime: 1111111112,
|
||||
endTime: 1111111112
|
||||
},
|
||||
{
|
||||
entityType: 'ip',
|
||||
@@ -207,9 +208,9 @@ export default {
|
||||
eventType: 'type',
|
||||
startTime: 1111111111,
|
||||
durationMs: 60000,
|
||||
endTime: 1111111112,
|
||||
},
|
||||
],
|
||||
endTime: 1111111112
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -217,20 +218,21 @@ export default {
|
||||
deep: true,
|
||||
handler (n) {
|
||||
this.getData(1, n)
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getData(1, 'All')
|
||||
},
|
||||
components: {
|
||||
ChartTablePagination,
|
||||
ChartTablePagination
|
||||
},
|
||||
methods: {
|
||||
unitConvert,
|
||||
getData (val, n) {
|
||||
this.pageNo = val
|
||||
const now = window.$dayJs.tz().valueOf()
|
||||
console.log(window.$dayJs.tz())
|
||||
const extraParams = {
|
||||
pageNo: val,
|
||||
pageSize: this.pageSizeForAlarm,
|
||||
@@ -240,18 +242,18 @@ export default {
|
||||
: n
|
||||
: this.tabHandleClickType === 'All'
|
||||
? ''
|
||||
: this.tabHandleClickType,
|
||||
: this.tabHandleClickType
|
||||
}
|
||||
this.$emit('getAlarmInfo', null, extraParams)
|
||||
const queryParams = {
|
||||
startTime: Math.floor(now / 1000 - 3600),
|
||||
endTime: Math.floor(now / 1000),
|
||||
const query = {
|
||||
startTime: this.queryParams.startTime,
|
||||
endTime: this.queryParams.endTime,
|
||||
eventSeverity:
|
||||
this.tabHandleClickType === 'All' ? '' : this.tabHandleClickType,
|
||||
this.tabHandleClickType === 'All' ? '' : this.tabHandleClickType
|
||||
}
|
||||
this.$emit('getAlarmInfo', null, extraParams, false, { startTime: query.startTime, endTime: query.endTime })
|
||||
|
||||
get('/interface/dns/alarmInfoCount', {
|
||||
...queryParams,
|
||||
...query
|
||||
}).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.alarmInfoCount = response.data
|
||||
@@ -263,7 +265,7 @@ export default {
|
||||
},
|
||||
pageJump (val) {
|
||||
this.getData(val)
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -22,7 +22,7 @@ export default {
|
||||
name: 'ChartOneSituationStatistics',
|
||||
props: {
|
||||
chartInfo: Object,
|
||||
chartData: [Array, Object],
|
||||
},
|
||||
chartData: [Array, Object]
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -28,7 +28,7 @@ export default {
|
||||
name: 'ChartTwoSituationStatistics',
|
||||
props: {
|
||||
chartInfo: Object,
|
||||
chartData: [Array, Object],
|
||||
chartData: [Array, Object]
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
@@ -43,6 +43,6 @@ export default {
|
||||
// },
|
||||
// },
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user