バグ修正:json文字列フェッチの問題
This commit is contained in:
@@ -10,7 +10,8 @@ import { actionAddins } from ".";
|
|||||||
interface Props {
|
interface Props {
|
||||||
displayName: string;
|
displayName: string;
|
||||||
sources: Sources;
|
sources: Sources;
|
||||||
condition: Condition;
|
condition: string;
|
||||||
|
conditionO: Condition;
|
||||||
verName: VerName;
|
verName: VerName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,7 +151,9 @@ export class DataProcessingAction implements IAction {
|
|||||||
): Promise<IActionResult> {
|
): Promise<IActionResult> {
|
||||||
this.actionProps = nodes.actionProps;
|
this.actionProps = nodes.actionProps;
|
||||||
this.dataProcessingProps = nodes.ActionValue as Props;
|
this.dataProcessingProps = nodes.ActionValue as Props;
|
||||||
|
this.dataProcessingProps.conditionO = JSON.parse(
|
||||||
|
this.dataProcessingProps.condition
|
||||||
|
);
|
||||||
let result = {
|
let result = {
|
||||||
canNext: true,
|
canNext: true,
|
||||||
result: "",
|
result: "",
|
||||||
@@ -160,7 +163,12 @@ export class DataProcessingAction implements IAction {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = await selectData(varGet(this.dataProcessingProps.condition.queryString,context.variables));
|
const data = await selectData(
|
||||||
|
varGet(
|
||||||
|
this.dataProcessingProps.conditionO.queryString,
|
||||||
|
context.variables
|
||||||
|
)
|
||||||
|
);
|
||||||
console.log("data ", data);
|
console.log("data ", data);
|
||||||
|
|
||||||
context.variables[this.dataProcessingProps.verName.name] =
|
context.variables[this.dataProcessingProps.verName.name] =
|
||||||
@@ -189,6 +197,8 @@ export class DataProcessingAction implements IAction {
|
|||||||
new DataProcessingAction();
|
new DataProcessingAction();
|
||||||
|
|
||||||
const varGet = (str: string, vars: any) => {
|
const varGet = (str: string, vars: any) => {
|
||||||
|
console.log(str);
|
||||||
|
|
||||||
const regex = /var\((.*?)\)/g;
|
const regex = /var\((.*?)\)/g;
|
||||||
let match;
|
let match;
|
||||||
while ((match = regex.exec(str)) !== null) {
|
while ((match = regex.exec(str)) !== null) {
|
||||||
@@ -199,6 +209,7 @@ const varGet = (str: string, vars: any) => {
|
|||||||
throw new Error(`変数${varName}が見つかりません`);
|
throw new Error(`変数${varName}が見つかりません`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(str);
|
||||||
return str;
|
return str;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -251,7 +262,9 @@ const calc = (f: Var, result: Result) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const fun =
|
const fun =
|
||||||
calcFunc[`${type}_${Operator[f.logicalOperator.operator as keyof typeof Operator]}`];
|
calcFunc[
|
||||||
|
`${type}_${Operator[f.logicalOperator.operator as keyof typeof Operator]}`
|
||||||
|
];
|
||||||
if (!fun) {
|
if (!fun) {
|
||||||
return ERROR_TYPE;
|
return ERROR_TYPE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user