export default {
  methods: {

    /**
     * 获取error错误
     */
    getFormErrorMessage(dataForm) {
      // 提示第一个error
      if (dataForm.fields) {
        for (
          let index = 0;
          index < dataForm.fields.length;
          index++
        ) {
          const ruleField = dataForm.fields[index]
          if (ruleField.validateState == 'error') {
            this.$message.error(ruleField.validateMessage)
            break
          }
        }
      }
    },

    /**
     * 图片标示
     */
    getStatusImageIcon(status) {
      if (status == 'y' ) {
        return require('@/assets/images/on-line.png')
      } else {
        return require('@/assets/images/off-line.png')
      }
      return ''
    }
  }
}
