
function ciy_chart_farm1_l1(opdata) {
    this.func = ['farm_l1'];
    this.lastdata = {};
    this.resize = function () {
    }
    this.setdata = function (funame, data) {
        if (!data)
            return;
        this.lastdata[funame] = data;
        $5('[data-num="n1"]', opdata.container).html('<span style="background:#00801b;line-height: 1em;padding: 0.5em;border-radius: 0.5em;">'+data.farm.cmcode+'</span>');
        $5('[data-num="n2"]', opdata.container).text(data.farm.n2);
        $5('[data-num="n3"]', opdata.container).text(data.farm.n3);
    }
    this.distory = function () {
    }


    opdata.container.append(`
    <div style="padding:10px 10px 0 10px;background: #00000066;border-radius: 0.5em;" class="ciy_chart_farm1_l1 cehide">
        <div style="padding-top: 1em;"><div>风险赋码</div><span data-num="n1" style="font-size: 1em;">--</span></div>
        <div><div>贷款金额</div><span data-num="n2">--</span><t>(万元)</t></div>
        <div><div>待还金额</div><span data-num="n3">--</span><t>(万元)</t></div>
    </div>
    `);

    var style = document.createElement("style");
    style.innerHTML = `
    .ciy_chart_farm1_l1>div {
        display: flex;
        padding-bottom: 2em;
        align-items: baseline;
    }

    .ciy_chart_farm1_l1>div>div {
        color: #ffffff;
        width: 7em;
        margin-left: 1em;
    }

    .ciy_chart_farm1_l1>div>span {
        font-size: 2.5em;
        font-family: eng01;
    }

    .ciy_chart_farm1_l1>div>t {
        font-size: 0.7em;
        padding-left: 0.7em;
    }
    
    `;
    window.document.head.appendChild(style);
    
}