提交 a3534c08 authored 作者: lihuihui's avatar lihuihui

update

上级 cbae525d
......@@ -193,13 +193,20 @@ export default {
// 表单提交company_id
params.users_info.forEach(item => {
if (item.company) {
this.$store.state.allSettings.company_map.forEach(it => {
if (item.company === it.company_name) {
item.company_id = it.id
} else {
item.company_id = ''
}
})
console.log(this.$store.state.allSettings.company_map, 'gs')
const companyData = this.$store.state.allSettings.company_map || JSON.parse(window.localStorage.allSetting).company_map
const findData = companyData.find(name => name.company_name === item.company)
if (findData) {
item.company_id = findData.id
}
// companyData.forEach(it => {
// console.log(item.company, 'it', it.company_name)
// if (item.company === it.company_name) {
// item.company_id = it.id
// } else {
// item.company_id = ''
// }
// })
}
})
let flag = false
......
......@@ -62,6 +62,7 @@ const store = new Vuex.Store({
// 获取所有项目列表
getAllSetting({ commit }) {
getAllSetting().then(res => {
window.localStorage.allSetting = JSON.stringify(res.data)
commit('setAllSettings', res.data)
})
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论