This commit is contained in:
liuye
2022-03-29 14:44:14 +08:00
parent 4d660f8d11
commit 0acff93d88
3 changed files with 23 additions and 13 deletions

View File

@@ -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('提交成功')