修改传参
This commit is contained in:
+9
-2
@@ -18,8 +18,15 @@ export default new Vuex.Store({
|
|||||||
enhance,
|
enhance,
|
||||||
online
|
online
|
||||||
},
|
},
|
||||||
state: {},
|
state: {
|
||||||
mutations: {},
|
// 当前的项目
|
||||||
|
currentProjetcInfo:{}
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
"SET_CURRENTPROJECT":(state,info) =>{
|
||||||
|
state.currentProjetcInfo = Object.assign({},info)
|
||||||
|
}
|
||||||
|
},
|
||||||
actions: {},
|
actions: {},
|
||||||
getters
|
getters
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ export default {
|
|||||||
record:JSON.stringify(record)
|
record:JSON.stringify(record)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.currentInfo = Object.assign({},JSON.parse(this.$route.query.record))
|
this.currentInfo = Object.assign({},JSON.parse(this.$route.query.record))
|
||||||
console.log("=====",this.currentInfo)
|
console.log("=====",this.currentInfo)
|
||||||
|
this.$store.commit('SET_CURRENTPROJECT', this.currentInfo )
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ export default {
|
|||||||
}
|
}
|
||||||
const formData = Object.assign(this.model, values)
|
const formData = Object.assign(this.model, values)
|
||||||
formData.companyId = values.companyId.id
|
formData.companyId = values.companyId.id
|
||||||
console.log('表单提交数据', formData)
|
formData.projectId = this.$store.state.currentProjetcInfo.id
|
||||||
httpAction(httpurl, formData, method).then((res) => {
|
httpAction(httpurl, formData, method).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message)
|
that.$message.success(res.message)
|
||||||
|
|||||||
Reference in New Issue
Block a user