请问计算值文本数值转浮点数并保留三位小数该怎么实现,我用如下方法不行
-
@Zhang书书 {
"errview": "不显示当前值",
"id": "dd",
"logic": {
"error": null,
"jsLogic": "{#parseFloat((0.0000001229*(Math.pow(2079.1,2)-Math.pow({{zxpl1}},2))).toFixed(3))#}",
"origin": [
{
"text": "parseFloat((0.0000001229*(Math.pow(2079.1,2)-Math.pow("
},
{
"children": [
{
"text": ""
}
],
"type": "variable",
"variable": {
"defineSchema": {
"nodeType": "tag",
"properties": {
"online": {
"title": "在线状态",
"type": "boolean"
}
},
"title": "频率1",
"type": "object"
},
"key": "zxpl1",
"lastType": "object",
"path": "tags.zxpl1",
"title": "数据点.频率1",
"type": "object"
}
},
{
"text": ",2))).toFixed(3))"
}
],
"type": "jsLogic"
},
"name": "dd",
"policy": "save",
"setMethod": "custom",
"type": "compute",
"unit": "Mpa"
} -
@Zhang书书 [
{
"errview": "不显示当前值",
"id": "syz",
"logic": {
"error": null,
"jsLogic": "{#(0.0000001229*(Math.pow(2079.1,2)-Math.pow({{zxpl1}},2))).toFixed(3)#}",
"origin": [
{
"text": "(0.0000001229*(Math.pow(2079.1,2)-Math.pow("
},
{
"children": [
{
"text": ""
}
],
"type": "variable",
"variable": {
"defineSchema": {
"nodeType": "tag",
"properties": {
"online": {
"title": "在线状态",
"type": "boolean"
}
},
"title": "频率1",
"type": "object"
},
"key": "zxpl1",
"lastType": "object",
"path": "tags.zxpl1",
"title": "数据点.频率1",
"type": "object"
}
},
{
"text": ",2))).toFixed(3)"
}
],
"type": "jsLogic"
},
"name": "渗压值",
"policy": "save",
"setMethod": "custom",
"timeRange": {
"count": 1,
"type": "forward",
"unit": "m"
},
"type": "compute",
"unit": "Mpa"
},
{
"errview": "不显示当前值",
"id": "jrxms",
"logic": {
"error": null,
"jsLogic": "{#{{syz}}10+9#}",
"origin": [
{
"text": ""
},
{
"children": [
{
"text": ""
}
],
"type": "variable",
"variable": {
"defineSchema": {
"nodeType": "tag",
"properties": {
"online": {
"title": "在线状态",
"type": "boolean"
}
},
"title": "渗压值",
"type": "object"
},
"key": "syz",
"lastType": "object",
"path": "tags.syz",
"title": "数据点.渗压值",
"type": "object"
}
},
{
"text": "10+9"
}
],
"type": "jsLogic"
},
"name": "浸润线埋深",
"policy": "save",
"setMethod": "custom",
"type": "compute",
"unit": "m"
},
{
"errview": "不显示当前值",
"id": "parseFloat_syz",
"logic": {
"error": null,
"jsLogic": "{#parseFloat({{syz}})#}",
"origin": [
{
"text": "parseFloat("
},
{
"children": [
{
"text": ""
}
],
"type": "variable",
"variable": {
"defineSchema": {
"nodeType": "tag",
"properties": {
"online": {
"title": "在线状态",
"type": "boolean"
}
},
"title": "渗压值",
"type": "object"
},
"key": "syz",
"lastType": "object",
"path": "tags.syz",
"title": "数据点.渗压值",
"type": "object"
}
},
{
"text": ")"
}
],
"type": "jsLogic"
},
"name": "parseFloat_syz",
"policy": "save",
"setMethod": "custom",
"type": "compute",
"unit": "Mpa"
},
{
"errview": "不显示当前值",
"id": "dd",
"logic": {
"error": null,
"jsLogic": "{#parseFloat((0.0000001229(Math.pow(2079.1,2)-Math.pow({{zxpl1}},2))).toFixed(3))#}",
"origin": [
{
"text": "parseFloat((0.0000001229(Math.pow(2079.1,2)-Math.pow("
},
{
"children": [
{
"text": ""
}
],
"type": "variable",
"variable": {
"defineSchema": {
"nodeType": "tag",
"properties": {
"online": {
"title": "在线状态",
"type": "boolean"
}
},
"title": "频率1",
"type": "object"
},
"key": "zxpl1",
"lastType": "object",
"path": "tags.zxpl1",
"title": "数据点.频率1",
"type": "object"
}
},
{
"text": ",2))).toFixed(3))"
}
],
"type": "jsLogic"
},
"name": "dd",
"policy": "save",
"setMethod": "custom",
"type": "compute",
"unit": "Mpa"
}
]