You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
426 B
20 lines
426 B
1 year ago
|
import http from './http'
|
||
|
|
||
|
// 获取字典
|
||
|
export function getDictList(type) {
|
||
|
return http.get('/eam/device-maintenance-job-main/getDictList?type=' + type)
|
||
|
}
|
||
|
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
|
||
|
}
|