export const setSpec = (list = []) => {
  return list.map((item) => {
    if (!item.spec_name) {
      item.spec_name = item.name;
    }
    if (!item.rules) {
      item.rules = item.specRules.map((rule) => {
        if (!rule.rule1_name) {
          rule.rule1_name = rule.name;
        }
        return rule;
      });
    }
    return item;
  });
};
