package cc.smtweb.system.bpm.web.design.form.model;

import cc.smtweb.framework.core.common.SwEnum;
import cc.smtweb.framework.core.util.StringUtil;
import cc.smtweb.system.bpm.web.design.form.ModelForm;

/**
 * @Author:lip
 * @Date : 2022/8/26 10:20
 * 左树-列表（含编辑卡片）
 */
public class LcLtWorker extends LcNormalWorker {
    private final static String templateList = "model_tree_list";
    private final static String templateCard = "model_card_normal";

    @Override
    protected String getTmplId(ModelForm bean) {
        if (bean.getName().endsWith(StringUtil.upFirst(SwEnum.PageType.LIST.value))) {
            return templateList;
        }
        if (bean.getName().endsWith(StringUtil.upFirst(SwEnum.PageType.CARD.value))) {
            return templateCard;
        }
        return super.getTmplId(bean);
    }
}
