util.js 485 Bytes
import { getDict } from '@/api/common'
export function getDictKey(params, selectList, mapList) {
  getDict(params).then(res => {
    const arr = new Map()
    res.map(item => {
      arr.set(item.dictKey, item.dictValue)
    })
    this.platformList = arr
    for (let i = this.productFormList.length; i > 0; i--) {
      if (this.productFormList[i] && this.productFormList[i].prop === 'platformKey') {
        this.productFormList[i].options = res
        return
      }
    }
  })
}