|
|
@@ -293,7 +293,7 @@
|
|
|
<div class="source-item" v-for="(item, index) in sourceData">
|
|
|
<span class="source-label">{{ item.sourceLabel }}</span>
|
|
|
<div class="source-bar">
|
|
|
- <div class="source-fill" :style="{ width: item.ratio + '%', background: sourceColor[index] }"></div>
|
|
|
+ <div class="source-fill" :style="{ width: item.ratio + '%', background: randomColor() }"></div>
|
|
|
</div>
|
|
|
<span class="source-value">{{ item.ratio }}%</span>
|
|
|
</div>
|
|
|
@@ -1180,6 +1180,9 @@
|
|
|
}
|
|
|
|
|
|
const sourceColor = ['#6366F1', '#F59E0B', '#10B981', '#EF4444', '#3B82F6', '#8B5CF6', '#F43F5E', '#14B8A6', '#F97316', '#EAB308']
|
|
|
+ const randomColor = () => {
|
|
|
+ return sourceColor[Math.floor(Math.random() * sourceColor.length)]
|
|
|
+ }
|
|
|
const getSource = () => {
|
|
|
let params = {
|
|
|
idList: customerList.value.map(item => item.id).join(',')
|