首页小改
This commit is contained in:
parent
17c8961750
commit
79a21aefa7
|
|
@ -10,7 +10,7 @@
|
|||
:canExpan="false"
|
||||
>
|
||||
<template #extra>
|
||||
<router-link :to='item.action'>查看详情</router-link>
|
||||
<!-- <router-link :to='item.action'>查看详情</router-link>-->
|
||||
<!-- <Tag :color="item.color">{{ item.action }}</Tag> -->
|
||||
|
||||
</template>
|
||||
|
|
@ -36,24 +36,35 @@
|
|||
import { ref, onMounted } from 'vue';
|
||||
import { growCardListSummary} from '../api';
|
||||
|
||||
const growCardList =ref('');
|
||||
|
||||
const growCardList =ref([]);
|
||||
onMounted(() => {
|
||||
|
||||
getSummary();
|
||||
|
||||
});
|
||||
|
||||
function getSummary() {
|
||||
growCardListSummary().then((res) => {
|
||||
|
||||
if (res.code == 200) {
|
||||
growCardList.value = res.result
|
||||
|
||||
} else {
|
||||
if (res.code == 200) {
|
||||
growCardList.value = res.result;
|
||||
let has = false;
|
||||
growCardList.value.map((item) => {
|
||||
if(item.title.indexOf('监控')){
|
||||
has = true;
|
||||
}
|
||||
})
|
||||
if(!has){
|
||||
growCardList.value.push({
|
||||
'action': '/appmana/liveCamra/index2',
|
||||
'color': 'purple',
|
||||
'icon': '',
|
||||
'title': '监控数量',
|
||||
'total': 4,
|
||||
'value': 4,
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
defineProps({
|
||||
|
|
|
|||
Loading…
Reference in New Issue