wxw
9 天以前 36560b4d93146662ac5cea0293a33efec8ae3ed9
HTML/views/home/console2.html
@@ -275,7 +275,7 @@
                            </div>
                        </div>
                    </div>
                    <div style="width: 100%;margin-top: 15%;height: 40%;">
                    <div style="width: 100%;margin-top: 15%;height: 50%;">
                        <div class="layui-card-header">
                            <img src="../../img/console/xiexian.png" style="height: 20px;">
                            库存质量状态分布
@@ -603,20 +603,20 @@
                sendData(IP + "/Statistical/GetQualityStatusFb", param, 'get', function (res) {
                    if (res.code == 0) { //成功
                        //库存质量状态分布(饼状)
                        this.chartYuan = echarts.init(document.getElementById("yuanOrder"));
                        var chartYuan = echarts.init(document.getElementById("yuanOrder"));
                        var option2 = {
                            tooltip: {
                                trigger: 'item'
                            },
                            legend: {
                                top: '5%',
                                top: '0%',
                                left: 'center'
                            },
                            series: [{
                                name: '数量',
                                type: 'pie',
                                radius: ['40%', '75%'],
                                avoidLabelOverlap: false,
                                radius: ['30%', '60%'],
                                avoidLabelOverlap: true,//自动避免重叠
                                itemStyle: {
                                    borderRadius: 10,
                                    borderColor: '#fff',
@@ -625,12 +625,13 @@
                                label: {
                                    show: true, // 显示标签
                                    position: 'outside', // 标签位置在饼图外部
                                    formatter: '{b}: {c} ({d}%)' // 标签格式,显示名称、值和百分比
                                    //formatter: '{b}:{c} ({d}%)' // 标签格式,显示名称、值和百分比
                                    formatter: '{b}:({d}%)' // 标签格式,显示名称、值和百分比
                                },
                                labelLine: {
                                    show: true, // 显示引导线
                                    length: 20, // 第一段引导线的长度
                                    length2: 30 // 第二段引导线的长度
                                    // length: 20, // 第一段引导线的长度
                                    // length2: 30 // 第二段引导线的长度
                                },
                                data: res.data.map(function (item) {
                                    return {
@@ -640,7 +641,7 @@
                                })
                            }]
                        };
                        this.chartYuan.setOption(option2);
                        chartYuan.setOption(option2);
                    }
                    else { //不成功
                        layer.msg('获取总量列表信息失败!', {