style: 主页状态颜色

This commit is contained in:
TsMask
2023-12-06 18:11:53 +08:00
parent f9016492be
commit be6e91390e

View File

@@ -141,9 +141,9 @@ let pronInfo: nfStateType = reactive({
});
/**查询网元状态列表 */
function fnGetList() {
function fnGetList(one: boolean) {
if (tableState.loading) return;
tableState.loading = true;
one && (tableState.loading = true);
listMain().then(res => {
tableState.data = res;
tableState.loading = false;
@@ -174,6 +174,7 @@ function fnGetList() {
orient: 'vertical',
left: 'left',
},
color: ['#91cc75', '#ee6666'],
series: [
{
name: t('views.index.realNeStatus'),
@@ -393,8 +394,8 @@ function fnLocale() {
onMounted(() => {
fnLocale();
fnGetList();
timer = setInterval(fnGetList, 10000); // 每隔10秒执行一次
fnGetList(true);
timer = setInterval(() => fnGetList(false), 10000); // 每隔10秒执行一次
});
// 在组件卸载之前清除定时器