import request from '@/utils/request' // 获取字典 function getDictList(type) { return request({ url: '/eam/device-maintenance-main/getDictList?type=' + type, 'method': 'GET', }) } export async function getDict(type) { let data =[] await getDictList(type).then((res) => { if (res.code == 0) { data = res.data.map(item=>{ return { label:item.label, value:item.code, } }) } else {} }).catch((err) => {}) return data }