标签-》自定义-》值标签-》使用html解析:参考以下代码 百分百标签同理,替代reurn值即可
function () {
--sql中用到的参数值,如没有参数忽略
var a = _g().getWidgetByName("p_time").getValue();
--从table中取出目标值
var b = FR.remoteEvaluate('=SQL("JDBC3","'+"select nvl(sum(worker_num),0) worker_num from xxx.table_name t where t.update_time = '"+a+"' "+'",1,1)');
--判断 目标值是否为0
if (b == 0) {
return '实绩' + this.value + '人目标 人';
}
else {
return '实绩' + this.value + '人目标' + this.targetValue + '人';
}
}