|
@@ -62,14 +62,14 @@
|
|
|
<div class="chart-subtitle">各状态订单数量占比</div>
|
|
<div class="chart-subtitle">各状态订单数量占比</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="chart-legend">
|
|
<div class="chart-legend">
|
|
|
- <div v-for="stat in statistics" :key="stat.label" class="legend-item">
|
|
|
|
|
|
|
+ <div v-for="stat in statistics.slice(1)" :key="stat.label" class="legend-item">
|
|
|
<span class="legend-dot" :style="{ background: stat.color }"></span>
|
|
<span class="legend-dot" :style="{ background: stat.color }"></span>
|
|
|
<span class="legend-label">{{ stat.label }}</span>
|
|
<span class="legend-label">{{ stat.label }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="chart-body">
|
|
<div class="chart-body">
|
|
|
- <div v-for="(stat, idx) in statistics" :key="stat.label" class="chart-row">
|
|
|
|
|
|
|
+ <div v-for="(stat, idx) in statistics.slice(1)" :key="stat.label" class="chart-row">
|
|
|
<div class="chart-row-label">
|
|
<div class="chart-row-label">
|
|
|
<span class="chart-row-dot" :style="{ background: stat.color }"></span>
|
|
<span class="chart-row-dot" :style="{ background: stat.color }"></span>
|
|
|
{{ stat.label }}
|
|
{{ stat.label }}
|
|
@@ -106,10 +106,14 @@ const router = useRouter();
|
|
|
const loading = ref(false);
|
|
const loading = ref(false);
|
|
|
|
|
|
|
|
const statistics = ref([
|
|
const statistics = ref([
|
|
|
- { label: '全部订单', count: 0, color: '#4F6EF7', bgColor: '#EEF1FE', icon: 'order' },
|
|
|
|
|
- { label: '待审核', count: 0, color: '#F7A83E', bgColor: '#FEF6E6', icon: 'wait' },
|
|
|
|
|
- { label: '生产中', count: 0, color: '#5FDBA7', bgColor: '#E8FBF2', icon: 'success' },
|
|
|
|
|
- { label: '已完成', count: 0, color: '#409EFF', bgColor: '#ECF5FF', icon: 'finish' }
|
|
|
|
|
|
|
+ { label: '全部订单', count: 0, color: '#4F6EF7', bgColor: '#EEF1FE', icon: 'star' },
|
|
|
|
|
+ { label: '待确认', count: 0, color: '#FF9900', bgColor: '#FFF7E6', icon: 'time' },
|
|
|
|
|
+ { label: '已确认', count: 0, color: '#1890FF', bgColor: '#E6F7FF', icon: 'checkbox' },
|
|
|
|
|
+ { label: '已审核', count: 0, color: '#52C41A', bgColor: '#F6FFED', icon: 'log' },
|
|
|
|
|
+ { label: '已签批', count: 0, color: '#722ED1', bgColor: '#F9F0FF', icon: 'edit' },
|
|
|
|
|
+ { label: '挤压完成', count: 0, color: '#13C2C2', bgColor: '#E6FFFB', icon: 'component' },
|
|
|
|
|
+ { label: '生产完成', count: 0, color: '#2F54EB', bgColor: '#F0F5FF', icon: 'finish' },
|
|
|
|
|
+ { label: '已取消', count: 0, color: '#F5222D', bgColor: '#FFF1F0', icon: 'money' }
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
const currentDate = computed(() => {
|
|
const currentDate = computed(() => {
|
|
@@ -146,8 +150,12 @@ function loadStatistics() {
|
|
|
const total = Object.values(data).reduce((sum: number, v: any) => sum + (Number(v) || 0), 0);
|
|
const total = Object.values(data).reduce((sum: number, v: any) => sum + (Number(v) || 0), 0);
|
|
|
statistics.value[0].count = total;
|
|
statistics.value[0].count = total;
|
|
|
statistics.value[1].count = data[0] || 0;
|
|
statistics.value[1].count = data[0] || 0;
|
|
|
- statistics.value[2].count = data[3] || 0;
|
|
|
|
|
- statistics.value[3].count = data[4] || 0;
|
|
|
|
|
|
|
+ statistics.value[2].count = data[1] || 0;
|
|
|
|
|
+ statistics.value[3].count = data[2] || 0;
|
|
|
|
|
+ statistics.value[4].count = data[3] || 0;
|
|
|
|
|
+ statistics.value[5].count = data[4] || 0;
|
|
|
|
|
+ statistics.value[6].count = data[5] || 0;
|
|
|
|
|
+ statistics.value[7].count = data[6] || 0;
|
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
|
loading.value = false;
|
|
loading.value = false;
|
|
|
});
|
|
});
|