1.Object.key获取对象中的所用属性
var obj = {'a':'123','b':'345'};
console.log(Object.keys(obj)); //['a','b']
2.map遍历
select.map(v => {
let param = {// "moduleName":"",
"functionName": "customermanagementbiz.service.QueryDictService",
"methodName": "queryDict",
"data": {
cis: this.$store.state.userInfo.cis,
dictTypeCode: v
}
}
this.http(JSON.stringify(param)).
then(res => {
// console.log('options=======',res)
this[v.toLowerCase()] = res.data.tbSysDicts
})
})