|
@@ -48,13 +48,14 @@ export const formulaExec = (runType: string, $CURRENT_TEMPLATE: IRptTpl, $CURREN
|
|
|
// 计算式集合,目前是放置打印信息的,用于配置属性的计算
|
|
// 计算式集合,目前是放置打印信息的,用于配置属性的计算
|
|
|
let $ME = $CURRENT_RPT.formulas[execFmlIdx];
|
|
let $ME = $CURRENT_RPT.formulas[execFmlIdx];
|
|
|
try {
|
|
try {
|
|
|
|
|
+ let newExpression=expression;
|
|
|
const { format } = $ME;
|
|
const { format } = $ME;
|
|
|
// console.log(expression);
|
|
// console.log(expression);
|
|
|
//临时处理
|
|
//临时处理
|
|
|
if (expression.indexOf(`new Date(`)) {
|
|
if (expression.indexOf(`new Date(`)) {
|
|
|
- expression.replaceAll(`new Date(`, `new ReportDate(`)
|
|
|
|
|
|
|
+ newExpression= expression.replaceAll(`new Date(`, `new ReportDate(`)
|
|
|
}
|
|
}
|
|
|
- eval(expression);
|
|
|
|
|
|
|
+ eval(newExpression);
|
|
|
} catch (ex) {
|
|
} catch (ex) {
|
|
|
console.log(ex);
|
|
console.log(ex);
|
|
|
}
|
|
}
|