处理代码如下:
def relevantInput(self,step):
input_texts=str(step.InputValue) # step.InputValue 是输入框
if type(step.InputValue) is float: # 如果输入框内容是浮点数
str_inputvalue = str(step.InputValue).split(".")[1] # 提取小数点后面的数字 如1.23 提取23给 str_inputvalue
if str_inputvalue == "0": # 判断 内容如果为0
# params = re.findall(r'${([sS]+?)}', str(str(step.InputValue).split(".")[0]))
input_texts = str(str(step.InputValue).split(".")[0]) # 提取小数点前面数字
else:
# params = re.findall(r'${([sS]+?)}', str(step.InputValue))
input_texts = str(step.InputValue) # 不为0的话,那就正常全部提取
else:
pass