
function ciy_chart_farm1_l3(opdata) {
    this.func = ['farm_l3'];
    this.lastdata = {};
    this.resize = function () {
    }
    var capimgs = null;
    this.setdata = function (funame, data) {
        if(!data)
            return;
        this.lastdata[funame] = data;
        var picszz = data.farm.picszz.split('~');
        capimgs = [];
        for (var i in picszz)
            capimgs.push(picszz[i]);
        fillimg(true);

    }
    this.distory = function () {
        clearInterval(t_autoimg);
    }


    var thos = this;

    opdata.container.append(`<div class="brimg cehide" style="background: #00000066;border-radius: 0.5em;height: 100%;">
        <div style="pointer-events: none;min-width:180px;padding-top: 0.5em;padding-left:4px;">
            <span style="color:#fffffd;font-weight: bolder;letter-spacing: 2px;padding-left:1em;">证照场地</span>
            <div style="position: relative;margin-top: 0.6em;">
            <img src="/ud/bigscreen/tit/06.png" style="height:0.3em;display: block;">
            <div style="position: absolute;left: 12em;right: 4px;border-bottom:0.05em solid #64ecf7;"></div>
            </div>
        </div>
        <div style="height: calc(100% - 3em);display: flex;padding: 5px;">
        <img id="pic_img" src="./b64/nozz.jpg" style="max-width:100%;max-height:100%;display:block;margin:auto;"/>
        </div>
    </div>`);

    this.resize();
    //3秒，换缩略图。
    var idx_autoimg = -1;
    var t_autoimg = setInterval(function () {
        fillimg();
    }, 7000);
    function fillimg(first) {
        if ((first && idx_autoimg > -1))
            return;
        if (capimgs === null)
            return;
        idx_autoimg++;
        if (idx_autoimg >= capimgs.length)
            idx_autoimg = 0;
        if (!capimgs[idx_autoimg])
            return;
        var imgdom = $5('#pic_img', opdata.container);
        if (imgdom.length == 0)
            return;
        if (capimgs.length == 1)
            return imgdom.attr('src', capimgs[idx_autoimg]);
        imgdom.hide('small',0.5);
        setTimeout(function () {
            imgdom.attr('src', capimgs[idx_autoimg]).show('big',0.5);
        }, 500);
    }
    fillimg();

    
    // var style = document.createElement("style");
    // style.innerHTML = `
    // `;
    // window.document.head.appendChild(style);

}