mirror of
https://gitee.com/samwaf/SamWaf.git
synced 2026-11-03 03:31:58 +08:00
feat:首页信息提示
This commit is contained in:
@@ -23,8 +23,14 @@ export function wafstatsumdaytopiprangeapi(params) {
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//首页获取基本信息
|
||||
export function wafStatSysinfoapi(params) {
|
||||
return request({
|
||||
url: 'statsysinfo',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
//【数据分析】查询周期区间国家级别攻击和正常信息
|
||||
export function wafanalysisdaycountryrange(params) {
|
||||
return request({
|
||||
|
||||
@@ -88,7 +88,6 @@ export default {
|
||||
|
||||
window.addEventListener('resize', this.updateContainer, false);
|
||||
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<template>
|
||||
<div>
|
||||
<t-alert theme="info" :message="infoMessage" >
|
||||
<t-alert theme="error" :message="defaultAccountMessage" v-if="defaultAccountVisable" >
|
||||
<template #operation>
|
||||
<span @click="handleModifyDefaultPassWebOperation">马上修改</span>
|
||||
</template>
|
||||
</t-alert>
|
||||
<t-alert theme="success" :message="emptyHostMessage" v-if="emptyHostVisable">
|
||||
<template #operation>
|
||||
<span @click="handleCreateWebOperation">马上创建</span>
|
||||
</template>
|
||||
@@ -13,12 +18,14 @@
|
||||
<!-- <rank-list class="row-container" /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
<script lang="ts">
|
||||
import TopPanel from './components/TopPanel.vue';
|
||||
import MiddleChart from './components/MiddleChart.vue';
|
||||
import RankList from './components/RankList.vue';
|
||||
import OutputOverview from './components/OutputOverview.vue';
|
||||
|
||||
import {
|
||||
wafStatSysinfoapi
|
||||
} from '@/apis/stats';
|
||||
export default {
|
||||
name: 'DashboardBase',
|
||||
components: {
|
||||
@@ -31,9 +38,15 @@ export default {
|
||||
return {
|
||||
center: {lng: 0, lat: 0},
|
||||
zoom: 3,
|
||||
infoMessage:"您当前未创建需要防护的网站,点击进行创建"
|
||||
emptyHostMessage:"您当前未创建需要防护的网站,点击进行创建",
|
||||
emptyHostVisable: false,
|
||||
defaultAccountMessage:"您当前还是使用默认帐号和密码请尽快修改",
|
||||
defaultAccountVisable:false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadSysInfo()
|
||||
},
|
||||
methods: {
|
||||
handler ({BMap, map}) {
|
||||
console.log(BMap, map)
|
||||
@@ -51,6 +64,25 @@ export default {
|
||||
},
|
||||
},
|
||||
);
|
||||
},//引导修改默认密码
|
||||
handleModifyDefaultPassWebOperation(){
|
||||
this.$router.push(
|
||||
{
|
||||
path: '/account/Account',
|
||||
query: {
|
||||
sourcePage: "HomeFrist",
|
||||
},
|
||||
},
|
||||
);
|
||||
},
|
||||
loadSysInfo(){
|
||||
wafStatSysinfoapi({}).then((res)=>{
|
||||
console.log("home res",res.data)
|
||||
this.defaultAccountVisable = res.data.is_default_account
|
||||
this.emptyHostVisable = res.data.is_empty_host
|
||||
} ).catch((e: Error) => {
|
||||
console.log(e);
|
||||
}).finally(() => {})
|
||||
},
|
||||
//end method
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user