|
|
|
@ -132,16 +132,18 @@
|
|
|
|
|
class="tab" |
|
|
|
|
v-for="(item, index) in tabs" |
|
|
|
|
:key="index" |
|
|
|
|
:style="{ '--index': queryParams.enterprise }" |
|
|
|
|
@tap="queryParams.enterprise = item.type" |
|
|
|
|
:style="{ |
|
|
|
|
'--index': tabs.findIndex( |
|
|
|
|
i => i.type == queryParams.type |
|
|
|
|
) |
|
|
|
|
}" |
|
|
|
|
@tap="changeTab(item.type)" |
|
|
|
|
> |
|
|
|
|
<view |
|
|
|
|
class="name" |
|
|
|
|
:style="{ |
|
|
|
|
color: |
|
|
|
|
queryParams.enterprise == item.type |
|
|
|
|
? '#071437' |
|
|
|
|
: '#78829d' |
|
|
|
|
queryParams.type == item.type ? '#071437' : '#78829d' |
|
|
|
|
}" |
|
|
|
|
> |
|
|
|
|
{{ item.name }} |
|
|
|
@ -151,22 +153,22 @@
|
|
|
|
|
</view> |
|
|
|
|
<view class=""> |
|
|
|
|
<view |
|
|
|
|
v-for="item in 10" |
|
|
|
|
:key="item" |
|
|
|
|
v-for="(item, index) in list" |
|
|
|
|
:key="index" |
|
|
|
|
class="wd-flex" |
|
|
|
|
style="justify-content: space-between; padding: 12px" |
|
|
|
|
> |
|
|
|
|
<view class="wd-font-800">企业名称</view> |
|
|
|
|
<view class="wd-font-800">{{ item.name }}</view> |
|
|
|
|
<view class="wd-font-800" style="color: #ff6f1e"> |
|
|
|
|
<view> |
|
|
|
|
<u-count-to |
|
|
|
|
:start-val="0" |
|
|
|
|
:end-val="200" |
|
|
|
|
:end-val="item.count" |
|
|
|
|
bold |
|
|
|
|
font-size="14" |
|
|
|
|
color="#FF6F1E" |
|
|
|
|
></u-count-to> |
|
|
|
|
<text>天</text> |
|
|
|
|
<text>{{ queryParams.type == 1 ? '天' : '次' }}</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -203,6 +205,7 @@ export default {
|
|
|
|
|
type: 2 |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
list: [], |
|
|
|
|
color: ['#1B84FF', '#7239EA', '#F6B100', '#F8285A', '#17C653'] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -283,6 +286,14 @@ export default {
|
|
|
|
|
return res |
|
|
|
|
}) |
|
|
|
|
this.detail.legendData = data |
|
|
|
|
this.setPieData(data) |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
async getList() { |
|
|
|
|
const res = await HomeApi.getListData(this.queryParams) |
|
|
|
|
this.list = res.data |
|
|
|
|
}, |
|
|
|
|
setPieData(data) { |
|
|
|
|
const isMax = data.reduce( |
|
|
|
|
(pre, cur) => pre + Number(cur.pieValue), |
|
|
|
|
0 |
|
|
|
@ -347,6 +358,10 @@ export default {
|
|
|
|
|
querySelect(v, key) { |
|
|
|
|
this.queryParams[key] = v.detail |
|
|
|
|
this.init() |
|
|
|
|
}, |
|
|
|
|
changeTab(type) { |
|
|
|
|
this.queryParams.type = type |
|
|
|
|
this.getList() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|