/* eslint-disable no-undef */
import { extendInclude, extendRule } from "../../utils/common";

/**
 * @return {string}
 */

export default {
  onChange: ({ value, colInfo, getFieldValue, setFieldVisible, setFieldValue, setFieldEditable }) => {
    if (colInfo.FIELD_NAME == 'TIME_TYPE') {
      switch (value) {
        case 5://触发频率限制
          setFieldVisible("DAYDELAY", false)
          setFieldVisible("LIMITDATE", false)
          break;
        case 10://特定日期限制
          setFieldVisible("DAYDELAY", false)
          setFieldVisible("LIMITDATE", true)
          break;
        case 20://天数限制
          setFieldVisible("DAYDELAY", true)
          setFieldVisible("LIMITDATE", false)
          break;
        case 30://日期天数限制
        default:
          setFieldVisible("DAYDELAY", true)
          setFieldVisible("LIMITDATE", true)
          break;

      }

      // setFieldVisible('Nav_SrcTag.NAME', value == 2 ? false : true);
      // var change = getFieldValue('CHANGE');
      // if (value == 1)//累计变量
      // {
      //   setFieldVisible('LIMIT_MIN', change);
      //   setFieldVisible('LIMIT_MAX', change);
      //   setFieldVisible('FORCE_VALIDA', change);
      //   setFieldVisible('CHANGE_RATE', false);
      //   setFieldVisible('CHANGE', true);
      // }
    }
  }
}
