php+echarts实现数据可视化实例3

news2025/6/17 9:45:16

 效果

全部代码

<?php
include('includes/session.inc');
include('includes/SQL_CommonFunctions.inc');
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/e-kanban/index.css">
    <script src="./js/jquery-2.1.0.js" type="text/javascript"></script>
    <script src="./js/echarts.js" type="text/javascript"></script>
    <title>电子看板</title>
</head>

<body>
    <div class="head">
        <h1 class="all_title">采购看板</h1>
    </div>
    <div class="kanban_all">
        <div class="kanban_all_position">
            <div class="kanban_item">
                <div class="kanban_line">
                    <div class="kanban_title">
                        近一月供应商新增采购单含税金额前五榜单
                    </div>
                    <div class="kanban_content">
                        <table>
                            <tr>
                                <td>
                                    <div id="poruku" style="width:100%;height:220px;"></div>
                                </td>
                                <td>
                                    <div style="width: 30px; height:220px;"></div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
            <div class="kanban_item">
                <div class="kanban_line">
                    <div class="kanban_title">
                        近一月不同采购类型的含税总金额
                    </div>
                    <div class="kanban_content">
                        <div class="kanban_content_left">
                            <table>
                                <tr>
                                    <td>
                                        <div id="poruku1" style="width:100%;height:220px;"></div>
                                    </td>
                                    <td>
                                        <div style="width: 30px; height:220px;"></div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="kanban_content_right">
                            <div>
                                <ul>
                                    <li style="color:#73c0de"><span id="yewu_top1"></span></li>
                                    <li style="color:#fd6f6f"><span id="yewu_top2"></span></li>
                                    <li style="color:#fac858"><span id="yewu_top3"></span></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="kanban_item">
                <div class="kanban_line">
                    <div class="kanban_title">
                        近一周新增采购单含税金额分析
                    </div>
                    <div class="kanban_content">
                        <table>
                            <tr>
                                <td>
                                    <div id="poruku2" style="width:100%;height:220px;"></div>
                                </td>
                                <td>
                                    <div style="width: 30px; height:220px;"></div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
            <div class="kanban_item">
                <div class="kanban_line_double">
                    <div class="right">
                        <div class="kanban_line">
                            <div class="kanban_title">
                                近一月产品新增采购单含税金额前五榜单
                            </div>
                            <div class="kanban_content">
                                <div class="kanban_content_left1">
                                    <table>
                                        <tr>
                                            <td>
                                                <div id="poruku4" style="width:100%;height:220px;"></div>
                                            </td>
                                            <td>
                                                <div style="width: 30px; height:220px;"></div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div class="kanban_content_right1">
                                    <div>
                                        <ul>
                                            <li style="color:#73c0de">Top1:<span id="cus_delivery_top1"></span></li>
                                            <li style="color:#fd6f6f">Top2:<span id="cus_delivery_top2"></span></li>
                                            <li style="color:#fac858">Top3:<span id="cus_delivery_top3"></span></li>
                                            <li style="color:#91cc75">Top4:<span id="cus_delivery_top4"></span></li>
                                            <li style="color:#5470c6">Top5:<span id="cus_delivery_top5"></span></li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="middle"></div>
                    <div class="left">
                        <div class="kanban_line">
                            <div class="kanban_title">
                                近一月供应商入库数量前五榜单
                            </div>
                            <div class="kanban_content">
                                <div class="kanban_content_left1">
                                    <table>
                                        <tr>
                                            <td>
                                                <div id="poruku3" style="width:100%;height:220px;"></div>
                                            </td>
                                            <td>
                                                <div style="width: 30px; height:220px;"></div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div class="kanban_content_right1">
                                    <div>
                                        <ul>
                                            <li style="color:#73c0de">Top1:<span id="vendor_top1"></span></li>
                                            <li style="color:#fd6f6f">Top2:<span id="vendor_top2"></span></li>
                                            <li style="color:#fac858">Top3:<span id="vendor_top3"></span></li>
                                            <li style="color:#91cc75">Top4:<span id="vendor_top4"></span></li>
                                            <li style="color:#5470c6">Top5:<span id="vendor_top5"></span></li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="kanban_item">
                <div class="kanban_line">
                    <div class="kanban_title">
                        近一月未入库采购单
                    </div>
                    <div class="kanban_content scroll" style="overflow-y: auto; max-height: 200px;">
                        <?php
                        $time = time();
                        $sql5 = 'SELECT pha.po_num, pha.status, pha.note,  pla.chang,pla.kuan,pla.gao,pla.depart_name,pla.line_amount,pla.quantity,pla.line,pla.price,v.vendor_code, v.vendor_name, pla.need_date, pha.created_by,pha.creation_date,b.item_no,b.item_desc,b.item_name,b.units,
                                ifnull(pla.quantity_received,0) this_received
                                FROM po_headers_all pha, po_lines_all pla, vendors v,sf_item_no b
                                WHERE pla.po_num = pha.po_num
                                AND  b.item_no=pla.stockid
                                and pla.quantity-pla.quantity_received>0
                                AND v.vendor_code = pha.vendor_code ';
                        $sql5 .= " and pha.status = '已签核'";
                        $sql5 .= " order by pha.creation_date  DESC";
                        $result5 = DB_query($sql5, $db);
                        // 检查查询是否成功
                        if ($result5) {
                            // 检查查询结果是否为空
                            if (mysqli_num_rows($result5) > 0) {
                        ?>
                                <table class="table1">
                                    <tr>
                                        <th class="th1">供应商代码</th>
                                        <th class="th2">采购单号</th>
                                        <th class="th1">料号</th>
                                        <th class="th3">采购数量</th>
                                        <th class="th3">收货量</th>
                                        <th class="th3">待收量</th>
                                        <th class="th2">建立日期</th>
                                    </tr>
                                    <?php
                                    while ($row = mysqli_fetch_assoc($result5)) {
                                    ?>
                                        <tr>
                                            <td class="td1"><?php echo $row['vendor_code']; ?></td>
                                            <td class="td2"><?php echo $row['po_num']; ?></td>
                                            <td class="td3"><?php echo $row['item_no']; ?></td>
                                            <td class="td3"><?php echo $row['quantity']; ?></td>
                                            <td class="td3"><?php echo $row['this_received']; ?></td>
                                            <td class="td3"><?php echo ($row['quantity'] - $row['this_received']); ?></td>
                                            <td class="td2"><?php echo date('Y-m-d', $row['creation_date']); ?></td>
                                        </tr>
                                    <?php
                                    }
                                    ?>
                                </table>
                                <script>
                                    //悬停
                                    // // JavaScript函数:停止滚动
                                    // function stopScroll() {
                                    //     var table = document.querySelector('.scroll table');
                                    //     table.style.animationPlayState = 'paused';
                                    // }
                                    // // JavaScript函数:开始滚动
                                    // function startScroll() {
                                    //     var table = document.querySelector('.scroll table');
                                    //     table.style.animationPlayState = 'running';
                                    // }
                                </script>
                        <?php
                            } else {
                                echo "No results found.";
                            }
                        } else {
                            echo "Query failed.";
                        }
                        ?>
                    </div>
                </div>
            </div>
            <div class="kanban_item">
                <div class="kanban_line_double">
                    <div class="left">
                        <div class="kanban_line">
                            <div class="kanban_title">
                                近一月不同仓库入库数量前五榜单
                            </div>
                            <div class="kanban_content">
                                <table>
                                    <tr>
                                        <td>
                                            <div id="poruku6" style="width:100%;height:220px;"></div>
                                        </td>
                                        <td>
                                            <div style="width: 30px; height:220px;"></div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="middle"></div>
                    <div class="right">
                        <div class="kanban_line">
                            <div class="kanban_title">
                                近一月产品入库数量前五榜单
                            </div>
                            <div class="kanban_content">
                                <div class="kanban_content_left1">
                                    <table>
                                        <tr>
                                            <td>
                                                <div id="poruku7" style="width:100%;height:220px;"></div>
                                            </td>
                                            <td>
                                                <div style="width: 30px; height:220px;"></div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div class="kanban_content_right1">
                                    <div>
                                        <ul>
                                            <li style="color:#73c0de">Top1:<span id="product_delivery_top1"></span></li>
                                            <li style="color:#fd6f6f">Top2:<span id="product_delivery_top2"></span></li>
                                            <li style="color:#fac858">Top3:<span id="product_delivery_top3"></span></li>
                                            <li style="color:#91cc75">Top4:<span id="product_delivery_top4"></span></li>
                                            <li style="color:#5470c6">Top5:<span id="product_delivery_top5"></span></li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
</body>

</html>




<?php
// 近一月供应商新增采购单含税金额
$sql = "SELECT po.vendor_code,ve.vendor_name, 
            SUM(po_all_amount) AS total_amount
        FROM po_headers_all po,vendors ve
        WHERE po.creation_date >= UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 MONTH))
        AND po.vendor_code = ve.vendor_code
        GROUP BY vendor_code
        ORDER BY total_amount desc
        LIMIT 5
";
$result = DB_query($sql, $db);

while ($array = mysqli_fetch_assoc($result)) {
    $arrays[] = $array;
}

if (is_array($arrays)) {
    foreach ($arrays as $key => $value) {
        $vendor[]  = $value['vendor_code'];
        $amount[]  = $value['total_amount'];
    }
} else {
    $vendor[]  = 0;
    $amount[]  = 0;
}
sort($amount);
echo "<script>";
echo ";   var vendor = ";
echo json_encode($vendor);
echo "; var amount = ";
echo json_encode($amount);
echo ";  
    var myChart = echarts.init(document.getElementById('poruku')); 
    option = {         
        //图形颜色
        color: [
            '#05c798'
        ],
        //提示框,鼠标悬停在图形上的注解
        tooltip: {
            trigger: 'axis',
            axisPointer: {            
                type: 'line'       
            },
            backgroundColor: 'rgba(255, 255, 255, 0.7)', // 设置提示条的背景颜色
            textStyle: {
                color: 'rgba(0, 0, 0)', // 设置提示条文本的颜色为白色
                fontSize: 14 // 设置提示条文本的字体大小为12px
            }
        },
        //配置网格组件,用于定义图表的位置和大小
        grid: {
            top: '15%',  // 增加top的值来创建间距
            left: '1%',
            right: '10%',
            bottom: '2%',  // 增加bottom的值来创建间距
            containLabel: true, //自动计算并包含坐标轴标签、刻度和标题等内容在内。
        },
        //横坐标
         xAxis: {
            name: '含税金额',
            type: 'value', //数据类型为数值型。
            axisLine: {
                lineStyle: {
                    color: '#6691b5'  // 设置 x 坐标轴线的颜色
                }
            },
            axisLabel: {
                fontSize: 14  // 设置横轴标签字体大小为14
            },
            nameTextStyle: {
                fontSize: 14  // 设置横轴名称字体大小为14
            },
            splitLine: {
                show: false  // 隐藏纵坐标轴的背景横线
            },   
        },
        //纵坐标
        yAxis: [
            {
                name: '供应商',
                type: 'category', //横坐标数据类型为类别型,适用于离散的数据
                data: vendor,
                axisLine: {
                    lineStyle: {
                        color: '#6691b5'  // 设置 x 坐标轴线的颜色
                    }
                },
                axisLabel: {
                    fontSize: 14  // 设置横轴标签字体大小为14
                },
                nameTextStyle: {
                    fontSize: 14  // 设置横轴名称字体大小为14
                }
            },
            
        ],
        series: [
            {
                type: 'bar',
                barWidth: '15',
                data: amount, //设置横坐标的数据,使用变量中的数据。   
                itemStyle: {
                    normal: {
                        label: {
                            show: true,
                            position: 'right',
                            textStyle: {
                                color: '#6691b5',
                                fontSize: 14
                            }
                        }
                    }
                }
            },
        ],
    };
    let currentIndex = -1;
    setInterval(function() {
        var dataLen = option.series[0].data.length;
        // 取消之前高亮的图形
        myChart.dispatchAction({
            type: 'downplay',
            seriesIndex: 0,
            dataIndex: currentIndex
        });
        currentIndex = (currentIndex + 1) % dataLen;
        // 高亮当前图形
        myChart.dispatchAction({
            type: 'highlight',
            seriesIndex: 0,
            dataIndex: currentIndex
        });
        // 显示 tooltip
        myChart.dispatchAction({
            type: 'showTip',
            seriesIndex: 0,
            dataIndex: currentIndex
        });
    }, 1000);
    myChart.setOption(option);    
    </script>";

//近一月不同采购类型的含税总金额
$sql1 = "SELECT po.order_type,po.po_all_amount,
        SUM(po.po_all_amount) AS total_amount
        FROM po_headers_all po
        WHERE po.creation_date >= UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 MONTH))
        GROUP BY po.order_type
        ORDER BY total_amount desc
        LIMIT 5
";
$result1 = DB_query($sql1, $db);
$index = 1;
while ($array1 = mysqli_fetch_assoc($result1)) {
    $name = $array1['order_type'];
    $value = $array1['total_amount'];
    $title = 'TOP' . $index;
    if (!$value) {
        $value = 0;
    }
    $array_data1[] = array(
        'name' => $name,
        'value' => $value,
        'title' => $title
    );
    $index++;
}
echo "<script>";
// echo "console.log(" . json_encode($array_data1) . ");";
echo ";   var array1 = ";
echo json_encode($array_data1);
// 对数据项数量进行判断
$arrayLength = count($array_data1);
for ($i = 1; $i <= 3; $i++) {
    //输出数据到前端显示
    echo "
    if (array1[" . ($i - 1) . "]) {
        document.getElementById('yewu_top" . $i . "').innerText = array1[" . ($i - 1) . "].name + ':' + array1[" . ($i - 1) . "].value;
    } else {
        document.getElementById('yewu_top" . $i . "').innerText = '--';
    }
    ";
}
echo "; 
    var ydata = []
    var myChart1 = echarts.init(document.getElementById('poruku1')); 
    option1 = {
        color:['#73c0de','#fd6f6f','#fac858','#91cc75','#5470c6'],
        tooltip: {
            trigger: 'item',
            formatter: function(params) {
                var name = params.data.name;
                var title = params.data.title;
                var value = params.value;
                var marker = params.marker; // 添加marker(小圆点)
                return marker + ' ' + title + '<br/>' + name + ' : ' + value;
            }
        },
        series: [
            {
                type: 'pie',
                data:array1,
                roseType: 'area',
                itemStyle: {
                    normal: {
                        label: {
                            show: true,
                            textStyle: {
                                fontSize: 16
                            }
                        }
                    }
                }
            }
        ]
    };  
    myChart1.setOption(option1);    
    </script>";

//近一周新增采购单含税金额分析
$sql2 = "   SELECT DATE_FORMAT(date_table.date, '%Y-%m-%d') AS date, COALESCE(SUM(po_headers_all.po_all_amount), 0) AS total_amount
            FROM (
                SELECT DATE_SUB(CURDATE(), INTERVAL n DAY) AS date
                FROM (
                    SELECT a.N + b.N * 10 AS n
                    FROM (SELECT 0 AS N UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) AS a
                    CROSS JOIN (SELECT 0 AS N UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) AS b
                    ORDER BY n DESC
                ) AS numbers
                WHERE n <= 6 -- 指定查询的天数
            ) AS date_table
            LEFT JOIN po_headers_all ON DATE(FROM_UNIXTIME(po_headers_all.creation_date)) = date_table.date
            GROUP BY date_table.date
            ORDER BY date_table.date
        ";
$result2 = DB_query($sql2, $db);
while ($array2 = mysqli_fetch_assoc($result2)) {
    $arrays2[] = $array2;
}
if (is_array($arrays2)) {
    foreach ($arrays2 as $key => $value) {
        $date2[]  = $value['date'];
        $total_amount2[]  = $value['total_amount'];
    }
} else {
    $date2[] = 0;
    $total_amount2[] = 0;
}

echo "<script>";
// echo "console.log(" . json_encode($date2) . ");";
// echo "console.log(" . json_encode($total_amount2) . ");";
echo ";   var date2 = ";
echo json_encode($date2);
echo ";   var total_amount2 = ";
echo json_encode($total_amount2);
echo "; 
    var ydata = []
    var myChart2 = echarts.init(document.getElementById('poruku2')); 
    option2 = {
        //配置网格组件,用于定义图表的位置和大小
        grid: {
            top: '15%',  // 增加top的值来创建间距
            left: '4%',
            right: '6%',
            bottom: '2%',  // 增加bottom的值来创建间距
            containLabel: true, //自动计算并包含坐标轴标签、刻度和标题等内容在内。
        },
        color:['#fd6f6f'],
        tooltip: {
            trigger: 'axis',
            axisPointer: {            
                type: 'line'       
            },
            backgroundColor: 'rgba(255, 255, 255, 0.7)', // 设置提示条的背景颜色
            textStyle: {
                color: 'rgba(0, 0, 0)', // 设置提示条文本的颜色为白色
                fontSize: 14 // 设置提示条文本的字体大小为12px
            }
        },
        xAxis: {
            name:'日期',
            data: date2,
            axisLine: {
                lineStyle: {
                    color: '#6691b5'  // 设置 x 坐标轴线的颜色
                }
            },
            // axisLabel: {
            //     fontSize: 14  // 设置横轴标签字体大小为14
            // },
            nameTextStyle: {
                fontSize: 14  // 设置横轴名称字体大小为14
            }
        },
        yAxis: {
            name:'含税金额',
            splitLine: {
                show: false  // 隐藏纵坐标轴的背景横线
            },
            axisLine: {
                lineStyle: {
                    color: '#6691b5'  // 设置 x 坐标轴线的颜色
                }
            },
            axisLabel: {
                fontSize: 14  // 设置横轴标签字体大小为14
            },
            nameTextStyle: {
                fontSize: 14  // 设置横轴名称字体大小为14
            }
        },
        series: [
            {              
                type: 'scatter',
                symbolSize: 22,   // 固定的散点大小,可以根据需要调整
                data: total_amount2,               
            },          
        ]
    };
    let currentIndex2 = -1;
    setInterval(function() {
        var dataLen2 = option2.series[0].data.length;
        // 取消之前高亮的图形
        myChart2.dispatchAction({
            type: 'downplay',
            seriesIndex: 0,
            dataIndex: currentIndex2
        });
        currentIndex2 = (currentIndex2 + 1) % dataLen2;
        // 高亮当前图形
        myChart2.dispatchAction({
            type: 'highlight',
            seriesIndex: 0,
            dataIndex: currentIndex2
        });
        // 显示 tooltip
        myChart2.dispatchAction({
            type: 'showTip',
            seriesIndex: 0,
            dataIndex: currentIndex2
        });
    }, 1000);
    myChart2.setOption(option2);    
    </script>";

//计算近一月供应商入库数量榜单
$sql3 = "   SELECT a.vendor_code,d.vendor_name,SUM(prt.transaction_quantity) as quantity
            FROM po_headers_all a, po_lines_all b, sf_item_no c, vendors d, po_rcv_transactions prt,po_rcv_receipt_line prr
            WHERE  a.po_num = b.po_num
            AND a.vendor_code = d.vendor_code
            AND b.po_num = prt.po_num
            AND prr.receipt_num=prt.receipt_num
            AND prt.po_num=prr.po_num
            AND prt.po_line=prr.po_line 
            AND b.stockid=prr.stockid
            AND prt.transaction_type in ('RECEIVE')
            AND b.line = prt.po_line
            AND b.stockid = c.item_no  
            AND prt.transaction_date >= UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 MONTH))
            GROUP BY vendor_code
            ORDER BY prt.transaction_quantity desc
            LIMIT 5
";


$result3 = DB_query($sql3, $db);
$index = 1;
while ($array3 = mysqli_fetch_assoc($result3)) {
    $name = $array3['vendor_name'];
    $value = $array3['quantity'];
    $title = 'TOP' . $index;
    if (!$value) {
        $value = 0;
    }
    $array_data3[] = array(
        'name' => $name,
        'value' => $value,
        'title' => $title
    );
    $index++;
}
echo "<script>";
// echo "console.log(" . json_encode($array_data3) . ");";
echo ";   var array3 = ";
echo json_encode($array_data3);
// 对数据项数量进行判断
$arrayLength = count($array_data3);
for ($i = 1; $i <= 5; $i++) {
    //输出数据到前端显示
    echo "
    if (array3[" . ($i - 1) . "]) {
        document.getElementById('vendor_top" . $i . "').innerText = array3[" . ($i - 1) . "].name ;
    } else {
        document.getElementById('vendor_top" . $i . "').innerText = '--';
    }
    ";
}
echo "; 
    var ydata = []
    var myChart3 = echarts.init(document.getElementById('poruku3')); 
    option3 = {
        color:['#73c0de','#fd6f6f','#fac858','#91cc75','#5470c6'],
        tooltip: {
            trigger: 'item',
            formatter: function(params) {
                var name = params.data.name;
                var title = params.data.title;
                var value = params.value;
                var marker = params.marker; // 添加marker(小圆点)
                return marker + ' ' + title + '<br/>' + name + ' : ' + value;
            }
        },
        series: [
            {
                type: 'pie',
                radius: '60%',
                // center: ['50%', '60%'],
                data: array3,
                emphasis: {
                    itemStyle: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)',
                    label: {
                            show: true
                        },
                        labelLine: {
                            show: false
                        }
                    }
                },  
                itemStyle: {
                    normal: {
                        label: {
                            show: false
                        },
                        labelLine: {
                            show: false
                        }
                    },
                }             
            }
        ]
    };
    let currentIndex3 = -1;
    setInterval(function() {
        var dataLen3 = option3.series[0].data.length;
        // 取消之前高亮的图形
        myChart3.dispatchAction({
            type: 'downplay',
            seriesIndex: 0,
            dataIndex: currentIndex3
        });
        currentIndex3 = (currentIndex3 + 1) % dataLen3;
        // 高亮当前图形
        myChart3.dispatchAction({
            type: 'highlight',
            seriesIndex: 0,
            dataIndex: currentIndex3
        });
        // 显示 tooltip
        myChart3.dispatchAction({
            type: 'showTip',
            seriesIndex: 0,
            dataIndex: currentIndex3
        });
    }, 1000);
    myChart3.setOption(option3);    
    </script>";


// 近一月产品新增采购单含税金额
$sql4 = "   SELECT po.stockid,sf.item_name,SUM(line_amount) AS total_amount
            FROM po_lines_all po,sf_item_no sf
            WHERE po.stockid = sf.item_no
            AND po.creation_date >= UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 MONTH))
            GROUP BY stockid
            ORDER BY total_amount desc
            LIMIT 5
        ";
$result4 = DB_query($sql4, $db);
$index = 1;
while ($array4 = mysqli_fetch_assoc($result4)) {
    $name = $array4['stockid'];
    $value = $array4['total_amount'];
    $title = 'TOP' . $index;
    if (!$value) {
        $value = 0;
    }
    $array_data4[] = array(
        'name' => $name,
        'value' => $value,
        'title' => $title
    );
    $index++;
}
echo "<script>";
// echo "console.log(" . json_encode($array_data4) . ");";
echo ";   var array4 = ";
echo json_encode($array_data4);
// 对数据项数量进行判断
$arrayLength = count($array_data4);
for ($i = 1; $i <= 5; $i++) {
    //输出数据到前端显示
    echo "
    if (array4[" . ($i - 1) . "]) {
        document.getElementById('cus_delivery_top" . $i . "').innerText = array4[" . ($i - 1) . "].name ;
    } else {
        document.getElementById('cus_delivery_top" . $i . "').innerText = '--';
    }
    ";
}
echo "; 
    var ydata = []
    var myChart4 = echarts.init(document.getElementById('poruku4')); 
    option4 = {
        color:['#73c0de','#fd6f6f','#fac858','#91cc75','#5470c6'],
        tooltip: {
            trigger: 'item',
            formatter: function(params) {
                var name = params.data.name;
                var title = params.data.title;
                var value = params.value;
                var marker = params.marker; // 添加marker(小圆点)
                return marker + ' ' + title + '<br/>' + name + ' : ' + value;
            }
        },
        series: [
            {
                type: 'pie',
                radius: '60%',
                // center: ['50%', '60%'],
                data: array4,
                emphasis: {
                    itemStyle: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)',
                    label: {
                            show: true
                        },
                        labelLine: {
                            show: false
                        }
                    }
                },  
                itemStyle: {
                    normal: {
                        label: {
                            show: false
                        },
                        labelLine: {
                            show: false
                        }
                    },
                }             
            }
        ]
    };
    let currentIndex4 = -1;
    setInterval(function() {
        var dataLen4 = option4.series[0].data.length;
        // 取消之前高亮的图形
        myChart4.dispatchAction({
            type: 'downplay',
            seriesIndex: 0,
            dataIndex: currentIndex4
        });
        currentIndex4 = (currentIndex4 + 1) % dataLen4;
        // 高亮当前图形
        myChart4.dispatchAction({
            type: 'highlight',
            seriesIndex: 0,
            dataIndex: currentIndex4
        });
        // 显示 tooltip
        myChart4.dispatchAction({
            type: 'showTip',
            seriesIndex: 0,
            dataIndex: currentIndex4
        });
    }, 1000);
    myChart4.setOption(option4);    
    </script>";

//近一月不同仓库入库数量
$sql6 = "   SELECT prr.subinventory_code,SUM(prt.transaction_quantity) as quantity
            FROM po_headers_all a, po_lines_all b, sf_item_no c, vendors d, po_rcv_transactions prt,po_rcv_receipt_line prr
            WHERE  a.po_num = b.po_num
            AND a.vendor_code = d.vendor_code
            AND b.po_num = prt.po_num
            AND prr.receipt_num=prt.receipt_num
            AND prt.po_num=prr.po_num
            AND prt.po_line=prr.po_line 
            AND b.stockid=prr.stockid
            AND prt.transaction_type in ('RECEIVE')
            AND b.line = prt.po_line
            AND b.stockid = c.item_no  
            AND prt.transaction_date >= UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 MONTH))
            GROUP BY subinventory_code
            ORDER BY prt.transaction_quantity desc
            LIMIT 5
";
$result6 = DB_query($sql6, $db);
while ($array6 = mysqli_fetch_assoc($result6)) {
    $arrays6[] = $array6;
}
if (is_array($arrays6)) {
    foreach ($arrays6 as $key => $value) {
        $subinventory_code6[]  = $value['subinventory_code'];
        $quantity6[]  = $value['quantity'];
    }
} else {
    $subinventory_code6[]  = 0;
    $quantity6[]  = 0;
}
echo "<script>";
echo ";   var subinventory_code6 = ";
echo json_encode($subinventory_code6);
echo ";   var quantity6 = ";
echo json_encode($quantity6);

echo "; 
    var data = []; 
    var myChart6 = echarts.init(document.getElementById('poruku6')); 
    option6 = {
        tooltip: {
            trigger: 'axis',
            axisPointer: {            
                type: 'line'       
            },
            backgroundColor: 'rgba(255, 255, 255, 0.7)', // 设置提示条的背景颜色
            textStyle: {
                color: 'rgba(0, 0, 0)', // 设置提示条文本的颜色为白色
                fontSize: 14 // 设置提示条文本的字体大小为12px
            }
        },
        color:['#3097b9'],
        //配置网格组件,用于定义图表的位置和大小
        grid: {
            top: '15%',  // 增加top的值来创建间距
            left: '1%',
            right: '12%',
            bottom: '1%',  // 增加bottom的值来创建间距
            containLabel: true, //自动计算并包含坐标轴标签、刻度和标题等内容在内。
        },
        xAxis: {
            name:'数量',
            data: subinventory_code6,
            axisLine: {
                lineStyle: {
                    color: '#6691b5'  // 设置 x 坐标轴线的颜色
                }
            },
            axisLabel: {
                fontSize: 14,  // 设置横轴标签字体大小为14
                // rotate: 45, // 将标签文本旋转45度
            },
            nameTextStyle: {
                fontSize: 14  // 设置横轴名称字体大小为14
            },
            
        },
        yAxis: {
            name:'仓库',
            splitLine: {
                show: false  // 隐藏纵坐标轴的背景横线
            }, 
            axisLine: {
                lineStyle: {
                    color: '#6691b5'  // 设置 x 坐标轴线的颜色
                }
            },
            axisLabel: {
                fontSize: 12  // 设置横轴标签字体大小为12
            },
            nameTextStyle: {
                fontSize: 12  // 设置横轴名称字体大小为12
            }
        },  
        series: [
            {
                type: 'bar',
                barWidth: '12',
                data: quantity6,
                itemStyle: {
                    normal: {
                        label: {
                            show: true,
                            position: 'top',
                            textStyle: {
                                color: '#6691b5',
                                fontSize: 12
                            }
                        }
                    }
                }
            }
        ]
    };
    let currentIndex6 = -1;
    setInterval(function() {
        var dataLen6 = option6.series[0].data.length;
        // 取消之前高亮的图形
        myChart6.dispatchAction({
            type: 'downplay',
            seriesIndex: 0,
            dataIndex: currentIndex6
        });
        currentIndex6 = (currentIndex6 + 1) % dataLen6;
        // 高亮当前图形
        myChart6.dispatchAction({
            type: 'highlight',
            seriesIndex: 0,
            dataIndex: currentIndex6
        });
        // 显示 tooltip
        myChart6.dispatchAction({
            type: 'showTip',
            seriesIndex: 0,
            dataIndex: currentIndex6
        });
    }, 1000);
    myChart6.setOption(option6);    
    </script>";


//近一月产品入库数量榜单
$sql7 = "   SELECT b.stockid,SUM(prt.transaction_quantity) as quantity
            FROM po_headers_all a, po_lines_all b, sf_item_no c, vendors d, po_rcv_transactions prt,po_rcv_receipt_line prr
            WHERE  a.po_num = b.po_num
            AND a.vendor_code = d.vendor_code
            AND b.po_num = prt.po_num
            AND prr.receipt_num=prt.receipt_num
            AND prt.po_num=prr.po_num
            AND prt.po_line=prr.po_line 
            AND b.stockid=prr.stockid
            AND prt.transaction_type in ('RECEIVE')
            AND b.line = prt.po_line
            AND b.stockid = c.item_no  
            AND prt.transaction_date >= UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 MONTH))
            GROUP BY stockid
            ORDER BY prt.transaction_quantity desc
            LIMIT 5
";
$result7 = DB_query($sql7, $db);
$index = 1;
while ($array7 = mysqli_fetch_assoc($result7)) {
    $name = $array7['stockid'];
    $value = $array7['quantity'];
    $title = 'TOP' . $index;
    if (!$value) {
        $value = 0;
    }
    $array_data7[] = array(
        'name' => $name,
        'value' => $value,
        'title' => $title
    );
    $index++;
}
echo "<script>";
echo ";  var array7 = ";
echo json_encode($array_data7);
// echo "console.log(" . json_encode($array_data7) . ");";
// 对数据项数量进行判断
$arrayLength = count($array_data7);
for ($i = 1; $i <= 5; $i++) {
    //输出数据到前端显示
    echo "
    if (array7[" . ($i - 1) . "]) {
        document.getElementById('product_delivery_top" . $i . "').innerText = array7[" . ($i - 1) . "].name ;
    } else {
        document.getElementById('product_delivery_top" . $i . "').innerText = '--';
    }
    ";
}
echo "; 
    var data = []; 
    var myChart7 = echarts.init(document.getElementById('poruku7')); 
    option7 = {
        color:['#73c0de','#fd6f6f','#fac858','#91cc75','#5470c6'],
        tooltip: {
            trigger: 'item',
            formatter: function(params) {
                var name = params.data.name;
                var title = params.data.title;
                var value = params.value;
                var marker = params.marker; // 添加marker(小圆点)
                return marker + ' ' + title + '<br/>' + name + ' : ' + value;
            }
        },
        series: [
            {
                type: 'pie',
                radius: ['50%', '70%'],
                data: array7,
                emphasis: {
                    itemStyle: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)',
                    label: {
                            show: true
                        },
                        labelLine: {
                            show: false
                        }
                    }
                },  
                itemStyle: {
                    normal: {
                        label: {
                            show: false
                        },
                        labelLine: {
                            show: false
                        }
                    },
                }       
            }
        ]
    };
    let currentIndex7 = -1;
    setInterval(function() {
        var dataLen7 = option7.series[0].data.length;
        // 取消之前高亮的图形
        myChart7.dispatchAction({
            type: 'downplay',
            seriesIndex: 0,
            dataIndex: currentIndex7
        });
        currentIndex7 = (currentIndex7 + 1) % dataLen7;
        // 高亮当前图形
        myChart7.dispatchAction({
            type: 'highlight',
            seriesIndex: 0,
            dataIndex: currentIndex7
        });
        // 显示 tooltip
        myChart7.dispatchAction({
            type: 'showTip',
            seriesIndex: 0,
            dataIndex: currentIndex7
        });
    }, 1000);
    myChart7.setOption(option7);    
    </script>";

css

body {
    background: linear-gradient(25deg, #0f2249, #182e5a 20%, #0f2249 40%, #182e5a 60%, #0f2249 80%, #182e5a 100%);
    padding: 0px;
    margin: 0px;
}

ul {
    padding: 0px;
    margin: 0px;
}

.head {
    /* height: 40px; */
    background: url(../../images/head_bg.png) no-repeat center center;
    background-size: 100% 100%;
    position: relative;
    margin-bottom: 20px;
    border: 1px solid rgb(255, 255, 255, 0);
}

.head h1 {
    color: #bde4ff;
    text-align: center;
    font-size: 25px;
    /* line-height: 40px; */
    letter-spacing: .06rem;
}

.head h1 img {
    width: 1.5rem;
    display: inline-block;
    vertical-align: middle;
    margin-right: .2rem
}

.all_title {
    background: linear-gradient(to top, #56c3ec, #b2f3f5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    letter-spacing: 2px;
    font-family: '微软雅黑';
    font-weight: bold;
    /* font-size: 32px; */
}


.kanban_all {
    /* border: 1px solid black; */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.kanban_all_position {
    /* border: 1px solid red; */
    width: 98%;
    display: flex;
    flex-wrap: wrap;
}

.kanban_item {
    /* border: 1px solid red; */
    width: calc(50% - 2%);
    margin: 0 1% 1% 1%;
}

.kanban_line {
    height: 280px;
    border: 1px solid #3486da;
    background: rgba(0, 70, 190, .1);
    padding: .15rem;
    position: relative;
    margin-bottom: .25rem;
    z-index: 10;
    /* width: calc(50% - 3%); */
    margin: 0 1% 1% 1%;
}


.kanban_line:before,
.kanban_line:after {
    position: absolute;
    /* width: .15rem;
    height: .15rem; */
    content: "";
    border-top: 3px solid #3486da;
    top: -2px;
}

.kanban_line:before,
.kanban_line:after,


.kanban_title {
    height: 20px;
    padding: 1%;
    font-family: '华文细黑';
    font-weight: bold;
    background: linear-gradient(to right, rgba(48, 82, 174, 1), rgba(48, 82, 174, 0));
    color: #fff;
    font-size: 14px;
}

.kanban_content {
    height: 220px;
    padding: 1%;
    display: flex;
    justify-content: center;
    /* border: 1px solid red; */
}

.kanban_content table {
    width: 100%;
    /* border: 1px solid green; */
}

.kanban_content_left {
    /* border: 1px solid red; */
    width: 65%;
}

.kanban_content_right {
    width: 35%;
    /* border: 1px solid green; */
}

.kanban_content_right li {
    margin-top: 5%;
    font-family: '微软雅黑';
}

.kanban_content_left1 {
    /* border: 1px solid red; */
    width: 55%;
}

.kanban_content_right1 {
    width: 45%;
    font-size: 85%;
    /* border: 1px solid green; */
}

.kanban_content_right1 li {
    margin-top: 5%;
    font-family: '微软雅黑';
}

.kanban_content table td {
    width: 100%;
    /* 或者您可以根据需求设置其他百分比值,例如33.33% */
}

.kanban_line_double {
    /* border: 1px solid blue; */
    display: flex;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.kanban_line_double .left {
    /* border: 1px solid red; */
    width: 48%;
    height: 100%;
}

.kanban_line_double .left .kanban_title {
    padding: 2%;
}

.kanban_line_double .middle {
    background: none;
    width: 3%;
}

.kanban_line_double .right {
    /* border: 1px solid black; */
    width: 48%;
    height: 100%;
}

.kanban_line_double .right .kanban_title {
    padding: 2%;
}

/* 表格_5 */
.table {
    text-align: center;
    /* border: 1px solid black; */
    border-collapse: collapse;
}

.table tr th {
    width: 20%;
    /* border: 1px solid black; */
    color: #c0dcf0;
    font-weight: bold;
}

.table tr td {
    width: 20%;
    text-align: center;
    padding-top: 1%;
    color: #8faade;
}

.quantity_show {
    width: 100%;
    font-size: 20px;
    letter-spacing: 2px;
    font-family: '微软雅黑';
    text-align: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity_show_position {
    width: 100%;
}

.quantity_show div {
    padding: 1%;
    color: white;

}

.quantity_show .quantity_line2 {
    color: white;
    font-size: 30px;
}

.quantity_show .quantity_line3 ul {
    display: flex;
    /* border: 1px solid red; */
    justify-content: center;
    /* 水平居中 */
    align-items: center;
    /* 垂直居中 */
}

.quantity_show .quantity_line3 ul li {
    margin: 0 5%;
    /* border: 1px solid black; */
    list-style: none;
}

.quantity_show .quantity_line3 ul li:nth-child(1):before {
    content: "";
    display: inline-block;
    width: 12px;
    /* 设置图标宽度 */
    height: 12px;
    /* 设置图标高度 */
    background-color: red;
    border-radius: 50%;
    /* 设置图标背景颜色 */
    margin-right: 5px;
    /* 调整图标与文本之间的间距 */
}

.quantity_show .quantity_line3 ul li:nth-child(2):before {
    content: "";
    display: inline-block;
    width: 12px;
    /* 设置图标宽度 */
    height: 12px;
    /* 设置图标高度 */
    background-color: green;
    border-radius: 50%;
    /* 设置图标背景颜色 */
    margin-right: 5px;
    /* 调整图标与文本之间的间距 */
}

.quantity_show .quantity_line3 span {
    color: #fff;
}

/* 表格 */
/* 表格_5 */
.table1 {
    text-align: center;
    /* border: 1px solid #8faade; */
    border-collapse: collapse;
}

.table1 tr th {
    /* width: 20%; */
    /* border: 1px solid #8faade; */
    color: #c0dcf0;
    font-weight: bold;
}

.table1 tr .th1 {
    width: 10%;
}

.table1 tr .th2 {
    width: 8%;
}

.table1 tr .th3 {
    width: 5%;
}

.table1 tr td {
    /* width: 20%; */
    text-align: center;
    padding-top: 1%;
    color: #8faade;
    /* border: 1px solid #8faade; */
}

.table1 tr .td1 {
    width: 10%;
}

.table1 tr .td2 {
    width: 8%;
}

.table1 tr .td3 {
    width: 5%;
}

/* 定义滚动动画 */
@keyframes scroll {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-100%);
    }
}

/* 应用动画到表格 */
/* .scroll table {
    animation: scroll 50s linear infinite;
    width: 100%;
    max-height: 200px;
    position: relative;
}

.scroll {
    overflow: hidden;
} */

/* .scroll:hover {
    overflow-y: scroll;
} */

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/915041.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

OpenGL —— 2.2、Shader之间数据传输、向Shder传输数据

Shader OpenGL着色器&#xff08;shader&#xff09;是一种用于编写图形渲染代码的编程语言。它们在图形处理单元&#xff08;GPU&#xff09;上运行&#xff0c;用于控制渲染管线的不同阶段。 在OpenGL中&#xff0c;有两种主要类型的着色器&#xff1a;顶点着色器和片段着色器…

Linux 压缩解压(归档管理):tar命令

计算机中的数据经常需要备份&#xff0c;tar是Unix/Linux中最常用的备份工具&#xff0c;此命令可以把一系列文件归档到一个大文件中&#xff0c;也可以把档案文件解开以恢复数据。 tar使用格式 tar [参数] 打包文件名 文件 tar命令很特殊&#xff0c;其参数前面可以使用“-”&…

windows端口被占用——使用taskkill干掉不听话的进程

8080端口被占用为例 1. win R 输入 cmd 回车 进入命令行界面 2. 查看端口占用情况 netstat -aon|findstr 8080 查到8080被24308 进程占用 3. 杀手父进程 使用taskkill 干掉不听话的进程 taskkill /f /t /pid 24308 C:\Users\84869>taskkill /?TASKKILL [/S system…

用户端Web自动化测试-L2

目录&#xff1a; 高级定位-css高级定位-xpath显式等待高级使用高级控件交互方法网页 frame 与多窗口处理文件上传&#xff0c;弹框处理自动化关键数据记录电子商务产品实战 1.高级定位-css css 选择器概念 css 选择器有自己的语法规则和表达式css 定位通常分为绝对定位和相…

k8s-dashboard使用指导手册

一、访问 dashboard http://172.66.209.101:32001 二、选择 Namespace 如下图&#xff1a; 1 在①搜索框中输入 spms 2 在②选择 spms-cloud 三、查找 pod 1 打开 pod 列表 2 打开过滤窗口 3 搜索 pod 在打开的搜索框中输入 pod的关键字&#xff0c;支持模糊搜索 如搜索…

春秋云镜 CVE-2019-16692

春秋云镜 CVE-2019-16692 phpIPAM 1.4 - SQL Injection 靶标介绍 phpIPAM 1.4后台存在SQL Injection。 启动场景 漏洞利用 后台SQL注入&#xff0c;admin/admin888登陆成功。 exp POST /app/admin/routing/edit-bgp-mapping-search.php HTTP/1.1 Host: xxx.com Content-Le…

如何实现24/7客户服务自动化?建设智能客服知识库

客户自助服务是指用户通过企业或者第三方建立的网络平台或者终端&#xff0c;实现相关的自定义处理。实现客户服务自动化&#xff0c;对提高客户满意度、维持客户关系至关重要。客户服务自动化可以帮助企业以更快的速度和更高的效率来满足客户的售后服务要求&#xff0c;以进一…

ES搭建集群

一、创建 elasticsearch-cluster 文件夹 创建 elasticsearch-7.8.0-cluster 文件夹&#xff0c;在内部复制三个 elasticsearch 服务。 然后每个文件目录中每个节点的 config/elasticsearch.yml 配置文件 node-1001 节点 #节点 1 的配置信息&#xff1a; #集群名称&#xff0…

【NumPy系列】基本操作 - 一

知识目录 前言一、NumPy介绍1.1 导入NumPy库1.2 查看NumPy版本1.3 读取图片返回NumPy数组 二、创建NumPy数组的十二种方式2.1 array 和 full2.2 zeros 和 ones2.3 随机数数组2.4 服从正态分布的数组2.5 arrange 和 eye、linspace 三、ndarray属性四、ndarray基本操作4.1 索引4.…

渗透测试方法论

文章目录 渗透测试方法论1. 渗透测试种类黑盒测试白盒测试脆弱性评估 2. 安全测试方法论2.1 OWASP TOP 102.3 CWE2.4 CVE 3. 渗透测试流程3.1 通用渗透测试框架3.1.1 范围界定3.1.2 信息搜集3.1.3 目标识别3.1.4 服务枚举3.1.5 漏洞映射3.1.6 社会工程学3.1.7 漏洞利用3.1.8 权…

TCP可靠性机制

确认号/序列号/ACK TCP帮助确保数据的准确传递。为了做到这一点&#xff0c;其使用了一些特殊的标记和信息&#xff0c;其中包括序号、确认号和ACK字段。 其中&#xff0c;它将每个字节的数据都进行了编号. 即为序列号. 序列号&#xff1a;就像给书中的每一页都编了号码一样&a…

【核磁共振成像】傅里叶重建

目录 一、傅里叶重建二、填零三、移相四、数据窗函数五、矩形视野六、多线圈数据重建七、图像变形校正八、缩放比例九、基线校准 长TR&#xff0c;长TE&#xff0c;是T2加权像&#xff1b; 短TR&#xff0c;短TE&#xff0c;是T1加权像&#xff1b; 长TR&#xff0c;短TE&#…

关于vlan的三层架构实验

实验要求及拓扑 一、思路 1. 先配置接入层的接口类型及划分 2.配置汇聚层的接口类型及划分 3.配置汇聚层的IP地址及编写缺省、NAT--IP地址转换 4. 给vlan分组&#xff0c;定义组 的主根&#xff0c;组的备份根 5.汇聚层之间使用通道技术(华为&#xff1a;以太网中继Eth-Tru…

在线设计APP ui的网站,分享这7款

在数字时代&#xff0c;用户界面&#xff08;UI&#xff09;设计变得非常重要&#xff0c;因为良好的UI设计可以改善用户体验&#xff0c;增强产品吸引力。随着科学技术的发展&#xff0c;越来越多的应用在线设计网站出现&#xff0c;为设计师和团队提供了一种新的创作方式。本…

浅谈泛在电力物联网在电力设备状态在线监测中的应用

安科瑞 华楠 摘要&#xff1a;随着信息化水平的不断发展&#xff0c;泛在电力物联网的建设提上日程&#xff0c;这对提升变电站电力设备在线监测水平&#xff0c;推动智能电网发展具有重要的指导意义。对基于物联网的电力设备状态监测系统进行了研究&#xff0c;概括了泛在电力…

⏰⏰⏰⏰⏰⏰⏰⏰K8s常用指令集锦

1、常用基础命令 kubectl top pod -n wsmp kubectl get pod # 获取namespace下的所有podkubectl get pods -o wide # 获取 pod 详细信息 kubectl describe po ${podName} # 获得pod的状态kubectl get po ${podName} -o yaml # yaml 看不惯的话&#xff0c;也可以…

NPM 管理组织成员

目录 1、向组织添加成员 1.1 邀请成员加入您的组织 1.2 撤销组织邀请 2、接收或拒接组织邀请 2.1 接收组织邀请 2.2 拒绝组织邀请 3、组织角色和权限 4、管理组织权限 5、从组织中删除成员 1、向组织添加成员 作为组织所有者&#xff0c;您可以将其他npm用户添加到…

gRpc的四种通信方式详细介绍

&#x1f337;&#x1f341; 博主猫头虎 带您 Go to New World.✨&#x1f341; &#x1f984; 博客首页——猫头虎的博客&#x1f390; &#x1f433;《面试题大全专栏》 文章图文并茂&#x1f995;生动形象&#x1f996;简单易学&#xff01;欢迎大家来踩踩~&#x1f33a; &a…

python+selenium的web自动化之针对上传操作的实现方案

一、关于上传操作 ​ 上传有两种情况&#xff1a; 如果是input可以直接输入路径的&#xff0c;那么直接使用send_keys(文件路径)输入路径即可&#xff1b; 非input标签的上传&#xff0c;则需要借助第三方工具&#xff1a;第三方库 pywin32、第三方工具pyautogui等等。 ​ 那…

揭开路由协议隐藏的风险

路由协议在互联网和基于其的服务的运行中发挥着至关重要的作用。然而&#xff0c;许多这些协议的开发都没有考虑到安全问题。 例如&#xff0c;边界网关协议 (BGP) 最初并未考虑对等点之间发生攻击的可能性。过去几十年来&#xff0c;BGP 中的起源和路径验证已投入了大量工作。…