Newer
Older
KaiFengPC / src / utils / rules.js
@zhangdeliang zhangdeliang on 23 May 7 KB 初始化项目
export const projectTableRules = {
  province: [{ required: true, message: '省份不能为空', trigger: ['change', 'blur'] }],
  city: [{ required: true, message: '城市不能为空', trigger: ['change', 'blur'] }],
  chargeUser: [{ required: true, message: '责任人不能为空', trigger: 'change' }],
  totalInvest: [{ required: true, message: '项目总投资不能为空', trigger: 'change' }],
  startTime: [{ required: true, message: '项目开始日期不能为空', trigger: 'change' }],
  endTime: [{ required: true, message: '项目交付日期不能为空', trigger: 'change' }],

  projectTypeId: [{ required: true, message: '项目类别不能为空', trigger: 'change' }],
  projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }],
  projectName: [{ required: true, message: '项目名称不能为空', trigger: 'blur' }],
  buildCategory: [{ required: true, message: '建设类别不能为空', trigger: 'change' }],

  drainagePartition: [{ required: true, message: '所属排水分区不能为空', trigger: 'change' }],
  primaryConcatPersonTelephone: [{ required: true, message: '主要联系人电话不能为空', trigger: 'blur' }],
  approveComment: [{ required: true, message: '请您输入处理意见', trigger: 'blur' }],
};

export const projectEstimateRules = {
  projectName: [{ required: true, message: '项目名称能为空', trigger: ['change'] }],
  fundSource: [{ required: true, message: '资金来源不能为空', trigger: ['change'] }],
  quoteDate: [{ required: true, message: '报价日期不能为空', trigger: ['change'] }],
};

export const projectInformationRules = {
  chargeUser: [{ required: true, message: '责任人不能为空', trigger: 'blur' }],
  totalInvest: [{ required: true, message: '项目总投资不能为空', trigger: 'blur' }],
  startTime: [{ required: true, message: '项目开始日期不能为空', trigger: 'blur' }],
  endTime: [{ required: true, message: '项目交付日期不能为空', trigger: 'blur' }],

  projectTypeId: [{ required: true, message: '项目类别不能为空', trigger: ['blur', 'change'] }],
  projectNo: [{ required: true, message: '项目编号不能为空', trigger: 'blur' }],
  projectName: [{ required: true, message: '项目名称不能为空', trigger: 'blur' }],
  buildCategory: [{ required: true, message: '建设类别不能为空', trigger: 'change' }],

  drainagePartition: [{ required: true, message: '所属排水分区不能为空', trigger: 'change' }],
  primaryConcatPersonTelephone: [{ required: true, message: '主要联系人电话不能为空', trigger: 'blur' }],
};

export const projectPlanRules = {
  projectNo: [{ required: true, message: '项目名称人不能为空', trigger: 'change' }],
  startTime: [
    {
      required: true,
      message: '项目开始日期不能为空',
      trigger: ['change', 'blur'],
    },
  ],
  endTime: [
    {
      required: true,
      message: '项目交付日期不能为空',
      trigger: ['change', 'blur'],
    },
  ],
  projectFillTime: [{ required: true, message: '项目填报日期不能为空', trigger: 'change' }],
  chargeUser: [{ required: true, message: '项目责任人期不能为空', trigger: 'change' }],
};

export const contractManagementRules = {
  contractNo: [{ required: true, message: '合同编号不能为空', trigger: 'blur' }],
  projectNo: [{ required: true, message: '项目名称不能为空', trigger: 'blur' }],
  signTime: [{ required: true, message: '签约日期不能为空', trigger: 'blur' }],
  money: [{ required: true, message: '金额不能为空', trigger: 'blur' }],
  businessPrimaryPerson: [{ required: true, message: '业务负责人不能为空', trigger: 'blur' }],
};

export const xmlxwhRules = {
  projectTypeCode: [{ required: true, message: '项目类型编码不能为空', trigger: ['change'] }],
  projectTypeName: [{ required: true, message: '项目类型名称不能为空', trigger: ['blur'] }],
  ownership: [{ required: true, message: '请选择所属类型不能为空', trigger: ['change'] }],
  status: [{ required: true, message: '是否启用能为空', trigger: ['change'] }],
};

export const AndEvaluationComponentsRules = {
  checkUnitName: [{ required: true, message: '检查单位不能为空', trigger: 'blur' }],
  hiddenTroubleType: [{ required: true, message: '隐患类型不能为空', trigger: 'change' }],
  hiddenTroubleLevel: [{ required: true, message: '隐患级别不能为空', trigger: 'change' }],
  abarbeitungDeadline: [{ required: true, message: '整改完成期限不能为空', trigger: 'blur' }],
  projectNo: [{ required: true, message: '项目名称/编号不能为空', trigger: 'change' }],
  buildCategory: [{ required: true, message: '建设类别不能为空', trigger: 'change' }],

  drainagePartition: [{ required: true, message: '所属排水分区不能为空', trigger: 'change' }],
  primaryConcatPersonTelephone: [{ required: true, message: '主要联系人电话不能为空', trigger: 'blur' }],
  approveComment: [{ required: true, message: '请您输入处理意见', trigger: 'blur' }],
};
export const stationInfoRules = {
  createTime: [{ required: true, message: '创建时间不能为空', trigger: ['change', 'blur'] }],
  updateTime: [{ required: true, message: '更新时间不能为空', trigger: ['change', 'blur'] }],
  dataFrequency: [{ required: true, message: '数据采集频率不能为空', trigger: ['change', 'blur'] }],
  lonLat: [{ required: true, message: '经度,纬度不能空', trigger: ['change', 'blur'] }],
  stationCode: [{ required: true, message: '站点编号不能空', trigger: ['change', 'blur'] }],
  stationName: [{ required: true, message: '站点名称不能空', trigger: ['change', 'blur'] }],
};
export const plcDatasourceRules = {
  accessFrequency: [{ required: true, message: '接入频率(秒/次)不能为空', trigger: ['change', 'blur'] }],
  datasourceName: [{ required: true, message: '数据源名称不能为空', trigger: ['change', 'blur'] }],
  port: [{ required: true, message: '端口不能为空', trigger: ['change', 'blur'] }],
  type: [{ required: true, message: '类型不能空', trigger: ['change', 'blur'] }],
  url: [{ required: true, message: 'url不能空', trigger: ['change', 'blur'] }],
  userName: [{ required: true, message: '用户名不能空', trigger: ['change', 'blur'] }],
  userPassword: [{ required: true, message: '密码不能空', trigger: ['change', 'blur'] }],
};
export const deviceInfoRules = {
  stationCode: [{ required: true, message: '站点编号不能为空', trigger: ['change', 'blur'] }],
  stationName: [{ required: true, message: '站点名称不能为空', trigger: ['change', 'blur'] }],
  deviceCode: [{ required: true, message: '设备编码不能空', trigger: ['change', 'blur'] }],
  deviceName: [{ required: true, message: '设备名称不能空', trigger: ['change', 'blur'] }],
  deviceType: [{ required: true, message: '设备类型不能空', trigger: ['change', 'blur'] }],
};
export const plcPointInfoRules = {
  pointName: [{ required: true, message: '点位名称不能为空', trigger: ['change', 'blur'] }],
  pointKey: [{ required: true, message: '点位键不能为空', trigger: ['change', 'blur'] }],
  stationCode: [{ required: true, message: '站点名称能为空', trigger: ['change', 'blur'] }],
  dataType: [{ required: true, message: '数据类型号不能空', trigger: ['change', 'blur'] }],
  facilityCode: [{ required: true, message: '设施编号不能空', trigger: ['change', 'blur'] }],
  stationCode: [{ required: true, message: '站点编号不能空', trigger: ['change', 'blur'] }],
  pointType: [{ required: true, message: '点位类型不能空', trigger: ['change', 'blur'] }],
};
export const areaInfoRules = {
  stationCode: [{ required: true, message: '站点编号不能为空', trigger: ['change', 'blur'] }],
  stationName: [{ required: true, message: '站点名称不能为空', trigger: ['change', 'blur'] }],
  areaCode: [{ required: true, message: '区域编号不能空', trigger: ['change', 'blur'] }],
  areaName: [{ required: true, message: '区域名称不能空', trigger: ['change', 'blur'] }],
};