|
@@ -45,18 +45,16 @@ export default {
|
|
|
watch: {
|
|
|
isShow: function(val) {
|
|
|
if (val) {
|
|
|
- if (val) {
|
|
|
- if (this.curObj.id) {
|
|
|
- this.$api.house.adminformationdetail({id: this.curObj.id}).then(res => {
|
|
|
- let curData = res || {}
|
|
|
- this.cObj = curData || {}
|
|
|
- this.content = curData.content || ''
|
|
|
- this.getDef()
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.cObj = this.curObj
|
|
|
+ if (this.curObj.id) {
|
|
|
+ this.$api.house.adminformationdetail({id: this.curObj.id}).then(res => {
|
|
|
+ let curData = res || {}
|
|
|
+ this.cObj = curData || {}
|
|
|
+ this.content = curData.content || ''
|
|
|
this.getDef()
|
|
|
- }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.cObj = this.curObj
|
|
|
+ this.getDef()
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -112,11 +110,13 @@ export default {
|
|
|
this.$api.house[apiStr](newForm).then(data => {
|
|
|
this.$msgs(newForm.id ? '编辑成功' : '新增成功')
|
|
|
this.$emit('close', newForm)
|
|
|
+ this.$router.go(0)
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
this.$emit('close')
|
|
|
+ this.$router.go(0)
|
|
|
this.setDefaultValue()
|
|
|
}
|
|
|
}
|