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/28 22:57
 * 左树-主子列表（含编辑卡片）
 */
public class LcLtMsWorker extends LcMsWorker {
    private final static String templateList = "model_tree_list";
    private final static String templateCard = "model_card_ms";

    @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);
    }
}
