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