Browse Source

判断增加available_modes

kukuasir@vip.qq.com 1 year ago
parent
commit
94beb80cd0
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/js/common.js

+ 3 - 3
src/js/common.js

@@ -563,7 +563,7 @@ function runCodeInArgsList(runMode, row, prop, argsList) {
   if (noneRunModeArgs.length > 0) {
     let tmp = "if (";
     noneRunModeArgs.forEach((args) => {
-      tmp += `val${args.Action}${args.Threshold}`;
+      tmp += `${val}${args.Action}${args.Threshold}`;
       tmp += "||";
     });
     tmp = tmp.substring(0, tmp.length - 2);
@@ -571,9 +571,9 @@ function runCodeInArgsList(runMode, row, prop, argsList) {
     evalString += tmp;
   } else {
     runModeArgs.forEach((args) => {
-      evalString += `if (runMode==${args.RunMode}) {colorVal=(val${args.Action}${args.Threshold}`;
+      evalString += `if (${runMode}==${args.RunMode} && ${row.available_modes}==true) {colorVal=(${val}${args.Action}${args.Threshold}`;
       if (args.Action2.length) {
-        evalString += `||val${args.Action2}${args.Threshold2})`;
+        evalString += `||${val}${args.Action2}${args.Threshold2})`;
       } else {
         evalString += ')';
       }