/*
  @description: 系统配置
  @Modifier: zhuyanchao
  @routerPath:
  @date: 2020-7-11-15:23
*/
export const systemConfigMixin = {
  data() {
    return {
      // 启动状态
      systemConfigStatusList: [
        { typename: '禁用', typecode: '00' },
        { typename: '启用', typecode: '01' }
      ],
      moduleTypeList: [], // 系统类别
      configurationTypeList: [], // 业务类别
      microServiceTypeList: [] // 模块类别
    }
  },
  created() {
    this.initGroup()
  },
  methods: {
    initGroup() {
      const data = [
        'moduleType', // 系统类别
        'configurationType', // 业务类别
        'microServiceType' // 模块类别
      ]
      this.$store.dispatch('getGroupType', data).then(res => {
        Object.keys(res.bidTypeData).forEach((key) => {
          this[key] = res.bidTypeData[key]
        })
      })
    }
  }
}
