28619
This commit is contained in:
@@ -28,20 +28,29 @@ export default {
|
||||
return {
|
||||
detail: '',
|
||||
pid: '',
|
||||
files: []
|
||||
files: [],
|
||||
id: ''
|
||||
}
|
||||
},
|
||||
|
||||
onShow() {
|
||||
document.title = '添加帮扶日志'
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
this.pid = query.pid
|
||||
if(query.id) {
|
||||
this.id = query.id
|
||||
this.getInfo()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
document.title = this.id ? '添加帮扶日志' : '编辑帮扶日志'
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
getInfo() {
|
||||
this.$http.post(`/app/apppreventionreturntopovertylog/queryDetailById?id=${this.id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.detail = res.data.detail
|
||||
this.files = res.data.files || []
|
||||
}
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
if (!this.detail) {
|
||||
return this.$u.toast('请输入帮扶内容')
|
||||
@@ -50,6 +59,7 @@ export default {
|
||||
detail: this.detail,
|
||||
files: this.files,
|
||||
pid: this.pid,
|
||||
id: this.id
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$u.toast('提交成功')
|
||||
|
||||
Reference in New Issue
Block a user