import dictEnum from '@/enum/dict'
import { mapGetters } from 'vuex'
const dictMixin = {
    data() {
      return {
        
      };
    },
    computed:{
        ...mapGetters(['dict', 'getDict']),
      },
    methods: {
        echoDict(dictName,value){
            let list = this.dict[dictEnum[dictName]] || []
            let e = list.find(n=>{
                n.dictCode == value
            })
            if(e){
                return e.dictValue
            }else {
                return ''
            }
        }
    }
  };
  
  export default dictMixin;
  