update 添加图标 完善地图功能
This commit is contained in:
@@ -12,9 +12,9 @@
|
||||
>
|
||||
</div>
|
||||
<div class="server-container">
|
||||
<div v-for="(item, index) in dataLists" :key="index" class="server-item">
|
||||
<span>{{ item?.title }}</span>
|
||||
<span>{{ item?.gross }}</span>
|
||||
<div v-for="(item, index) in statistics" :key="index" class="server-item">
|
||||
<span>{{ item?.name }}</span>
|
||||
<span>{{ item?.value }}</span>
|
||||
</div>
|
||||
<a-spin :spinning="spinning" class="spin"></a-spin>
|
||||
</div>
|
||||
@@ -25,10 +25,10 @@
|
||||
import { onMounted, ref } from 'vue';
|
||||
import PublicTitle from '../publicTitle.vue';
|
||||
import { list } from './left.api';
|
||||
import { timeTab, useSpin } from '/@/components/body-d-left/bodyLeftHooks.ts';
|
||||
import { timeTab, useSpin, useStatistics } from '/@/components/body-d-left/bodyLeftHooks.ts';
|
||||
|
||||
const typeTime = ref(timeTab);
|
||||
const dataLists = ref([]);
|
||||
const { statistics, setStatistics } = useStatistics();
|
||||
const selectIndex = ref(0);
|
||||
const selectVal = ref('1');
|
||||
const { setSpin, spinning } = useSpin();
|
||||
@@ -42,10 +42,10 @@
|
||||
try {
|
||||
const { code, result } = (await list({ condition: selectVal.value })) || {};
|
||||
setSpin(!spinning.value);
|
||||
if (code != 200) {
|
||||
if (code != 200 || !Array.isArray(result)) {
|
||||
return;
|
||||
}
|
||||
dataLists.value = result?.map((item) => ({ ...item, title: '最新呼入电话' }));
|
||||
setStatistics(result[0]);
|
||||
} catch {
|
||||
setSpin(!spinning.value);
|
||||
}
|
||||
@@ -70,10 +70,6 @@
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
|
||||
> :nth-child(1) {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
.spin {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
@@ -100,7 +96,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.server-item:nth-child(2n) {
|
||||
.server-item:nth-child(odd) {
|
||||
background-color: #0a0a0c;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user