let JV = require('./jpc_value_define');
let JpcFunc = {
    createNew: function (rptTpl) {
        let me = this;
        let rst = [];
        if (rptTpl[JV.NODE_FORMULAS]) {
            for (let i = 0; i < rptTpl[JV.NODE_FORMULAS].length; i++) {
                let item = {};
                item[JV.PROP_RUN_TYPE] = rptTpl[JV.NODE_FORMULAS][i][JV.PROP_RUN_TYPE];
                item[JV.PROP_EXPRESSION] = rptTpl[JV.NODE_FORMULAS][i][JV.PROP_EXPRESSION];
                rst.push(item);
            }
        }
        return rst;
    }
};

module.exports = JpcFunc;
