/**
 * 获取表格单元格border样式
 * @param prevRowBottomFlag
 * @param prevColumnRightFlag
 * @param args1
 * @returns {
 * {"border-right-style": string, "border-left-style": string, "border-bottom-style": string, "border-top-style": string}}
 */
export function getTbCellBorderStyle(prevRowBottomFlag, prevColumnRightFlag, args1) {

    // 顶部border样式对象
    let borderStyle = {
        "border-left-style": "",
        "border-top-style": "",
        "border-right-style": "",
        "border-bottom-style": "",
    }
    switch (args1) {
        case 1: // 左右下
            borderStyle["border-left-style"] = "";
            borderStyle["border-top-style"] = "none";
            borderStyle["border-right-style"] = "";
            borderStyle["border-bottom-style"] = "";
            break;
        case 2: // 左右
            borderStyle["border-left-style"] = "";
            borderStyle["border-top-style"] = "none";
            borderStyle["border-right-style"] = "";
            borderStyle["border-bottom-style"] = "none";
            break;
        case 3: // 右下
            borderStyle["border-left-style"] = "none";
            borderStyle["border-top-style"] = "none";
            borderStyle["border-right-style"] = "";
            borderStyle["border-bottom-style"] = "";
            break;
        case 4: // 右
            borderStyle["border-left-style"] = "none";
            borderStyle["border-top-style"] = "none";
            borderStyle["border-right-style"] = "";
            borderStyle["border-bottom-style"] = "none";
            break;
        case 5: // 左下
            borderStyle["border-left-style"] = "";
            borderStyle["border-top-style"] = "none";
            borderStyle["border-right-style"] = "none";
            borderStyle["border-bottom-style"] = "";
            break;
        case 6: // 下
            borderStyle["border-left-style"] = "none";
            borderStyle["border-top-style"] = "none";
            borderStyle["border-right-style"] = "none";
            borderStyle["border-bottom-style"] = "";
            break;
        default :
            break;
    }

    // TD 前TD的border-right-style有线，改为当前TD的border-left-style的线
    switch (prevColumnRightFlag) {
        case 1: // 左
            borderStyle["border-left-style"] = "";
            break;
        case 2: // 左
            borderStyle["border-left-style"] = "";
            break;
        case 3: // 左
            borderStyle["border-left-style"] = "";
            break;
        case 4: // 左
            borderStyle["border-left-style"] = "";
            break;
        case 5: // 无左
            borderStyle["border-left-style"] = "none";
            break;
        case 6: // 无左
            borderStyle["border-left-style"] = "none";
            break;
        default :
            break;
    }

    // TD 前行对应TD的border-bottom-style有线，改为当前行border-top-style的线
    switch (prevRowBottomFlag) {
        case 1: // 上
            borderStyle["border-top-style"] = "";
            break;
        case 2: // 无上
            borderStyle["border-top-style"] = "none";
            break;
        case 3: // 上
            borderStyle["border-top-style"] = "";
            break;
        case 4: // 无上
            borderStyle["border-top-style"] = "none";

            break;
        case 5: // 上
            borderStyle["border-top-style"] = "";

            break;
        case 6: // 上
            borderStyle["border-top-style"] = "";
            break;
        default :
            break;
    }
    return borderStyle;
}
