/*
  @description:投诉异议公共使用
  @Modifier:haofengxian
  @routerPath:
  @date:2020-1-3 17:49
*/
import { filterDictText } from '@assets/js/utils'// 常用方法
export const objectionConfigMixin = {
  data() {
    return {
      clarificationObjectSourceType: false, //  true启动工作流 false普通审核
      // 问题类型
      objectionModeList: [{
        typename: '异议',
        typecode: '00'
      }, {
        typename: '投诉',
        typecode: '01'
      }],
      // 状态
      useStatusList: [{
        typename: '待受理',
        typecode: '00'
      }, {
        typename: '已受理待审批',
        typecode: '01'
      }, {
        typename: '审批未通过',
        typecode: '02'
      }, {
        typename: '待复核',
        typecode: '03'
      }, {
        typename: '复核不通过',
        typecode: '04'
      }, {
        typename: '已审批待回复',
        typecode: '05'
      }, {
        typename: '已回复',
        typecode: '06'
      }]
    }
  },
  created() {
    // 根据键获取正式配置
    this.$store.dispatch('getSystemConfigValue', 'clarificationObjection-audit-config').then(() => {
      this.clarificationObjectSourceType = this.$store.getters.systemConfigVo.configType // true启动工作流 false普通审核
    }).catch(() => {
    })
  },
  methods: {
    filterDictText, // 字典值替换文本通用方法
    // 表格字典值替换文本-状态
    formatterUseStatusList(row, column, cellValue) {
      return filterDictText(this.useStatusList, cellValue)
    }
  }
}
