Commit 4b08bebf authored by godwithdh's avatar godwithdh

boss

parent 51ebea79
......@@ -20,7 +20,7 @@
<div class="card" v-if="list.length>0" v-for="(v,i) in list" :key="i" :style="{'--color':color[i%6]}">
<div>
<div style="font-size:13px;margin-bottom:14px;">{{v.sName}}</div>
<div style="font-size: 28px;font-weight: 600;">{{Number(v.sValue||0).toLocaleString()}}</div>
<div style="font-size: 28px;font-weight: 600;">{{Number(v.nAmount||0).toLocaleString()}}</div>
</div>
<div style="align-self: flex-end;" v-if="v.rate!=0&&dateMode<5">
<div>{{v.rate>0?'↑':'↓'}}{{v.rate}}%</div>
......@@ -77,12 +77,12 @@ export default{
},"加载中",{})
if(typeof value=='object'&&value.length>0){
this.list=value.map(v=>{
if(v.sValued==0&&v.sValue!=0){
v.rate=v.sValue>0?100:-100
}else if(v.sValue==0){
if(v.nAmounted==0&&v.nAmount!=0){
v.rate=v.nAmount>0?100:-100
}else if(v.nAmount==0){
v.rate=0
}else{
v.rate=Math.round((v.sValue-v.sValued)/v.sValued*100)/100
v.rate=Math.round((v.nAmount-v.nAmounted)/v.nAmounted*100)/100
}
return v;
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment