tangjunhao 4 周之前
父节点
当前提交
dde0461ec2
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      src/views/mainContent/leftaside/agentModel.vue

+ 5 - 4
src/views/mainContent/leftaside/agentModel.vue

@@ -137,9 +137,9 @@ const getNameVal = () => {
 }
 
 const generateRules = (prefix) => ({
-  '0': [`${prefix}22`, `${prefix}23`, `${prefix}241`, `${prefix}242`], // Kriging
-  '1': [`${prefix}22`, `${prefix}23`, `${prefix}243`],                 // 最近邻
-  '2': [`${prefix}22`, `${prefix}23`],                                 // 响应面
+  'KrigingSurrogate': [`${prefix}22`, `${prefix}23`, `${prefix}241`, `${prefix}242`], // Kriging
+  'NearestNeighbor': [`${prefix}22`, `${prefix}23`, `${prefix}243`],                 // 最近邻
+  'ResponseSurface': [`${prefix}22`, `${prefix}23`],                                 // 响应面
 });
 
 const linkageRulesMap = {
@@ -148,8 +148,9 @@ const linkageRulesMap = {
   2: generateRules('c'),
 };
 
-const shouldShowItem = (currentValue = '0', targetCode) => {
+const shouldShowItem = (currentValue = 'KrigingSurrogate', targetCode) => {
   const rules = linkageRulesMap[props.type] || {}; // 取当前 type 对应规则
+  console.log('currentValue',currentValue)
   return rules[currentValue]?.includes(targetCode) ?? false
 }