lincl 2 years ago
parent
commit
54a61f29a7

+ 7 - 5
mini-pro-web/src/views/index/components/OrderAnalyse.vue

@ -121,6 +121,13 @@ export default {
                    if(res.status == 200){
                        var { onlineTotal, offlineTotal } = res.obj
                        var total = Number(onlineTotal) + Number(offlineTotal)
                        if(this.myChart){
                            this.myChart.dispatchAction({ 
                                type: 'downplay',
                                seriesIndex: 0,
                                dataIndex: this.dataIndex
                            })
                        }
                        this.dataIndex = offlineTotal>onlineTotal? 1 : 0
                        this.initPie([
                            { itemStyle: {color: '#FD8D4E'}, value: onlineTotal, percent: total==0? 0 : Number((onlineTotal/total*100).toFixed(2)), name: '线上订单' },
@ -201,11 +208,6 @@ export default {
                    })
                });
            }
            this.myChart.dispatchAction({ 
                type: 'downplay',
                seriesIndex: 0,
                dataIndex: this.dataIndex
            })
            this.myChart.setOption(option)
            this.$nextTick(()=>{
                this.myChart.dispatchAction({ 

+ 9 - 7
mini-pro-web/src/views/index/components/PickAnalyse.vue

@ -1,7 +1,7 @@
<template>
	<div class="index-PickAnalyse mt10">
        <div class="panel   medicine">
			<div class="kitbox pt15 box-flex-c plr15">
        <div class="panel plr12  medicine">
			<div class="kitbox pt15 box-flex-c ">
				<div class="box-flex-c c-333 fs-16 f-bold">取药分析</div>
                <div class="box-flex-c c-333 fs-12 f-bold time">
                    <ul class="ul">
@ -68,6 +68,13 @@ export default {
                    console.log('medicine', res)
                    var { saomaTotal, yibaoTotal } = res.obj
                    var total = Number(saomaTotal) + Number(yibaoTotal)
                    if(this.myChart){
                        this.myChart.dispatchAction({ 
                            type: 'downplay',
                            seriesIndex: 0,
                            dataIndex: this.dataIndex
                        })
                    }
                    this.dataIndex = saomaTotal>yibaoTotal? 1 : 0
                    this.initPie([
                        { itemStyle: {color: '#688CFD'}, value: yibaoTotal, percent: total==0? 0 : Number((yibaoTotal/total*100).toFixed(2)),  name: '医保卡取药' },
@ -151,11 +158,6 @@ export default {
                    })
                });
            }
            this.myChart.dispatchAction({ 
                type: 'downplay',
                seriesIndex: 0,
                dataIndex: this.dataIndex
            })
            this.myChart.setOption(option)
            this.$nextTick(()=>{
                this.myChart.dispatchAction({