监测对象
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<i>(最多9张)</i>
|
||||
</div>
|
||||
<div>
|
||||
<AiUploader :limit="9" multiple :def.sync="picture"></AiUploader>
|
||||
<AiUploader :limit="9" multiple :def.sync="filies"></AiUploader>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn" @click="submit">提交</div>
|
||||
@@ -27,8 +27,7 @@ export default {
|
||||
return {
|
||||
detail: '',
|
||||
pid: '',
|
||||
id: '',
|
||||
picture: []
|
||||
filies: []
|
||||
}
|
||||
},
|
||||
|
||||
@@ -37,34 +36,19 @@ export default {
|
||||
},
|
||||
|
||||
onLoad(query) {
|
||||
if (query.id) {
|
||||
this.getInfo(query.id)
|
||||
this.id = query.id
|
||||
}
|
||||
this.pid = query.pid
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo(id) {
|
||||
this.$http.post(`/app/apppreventionreturntopovertylog/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.detail = res.data.detail
|
||||
this.picture = JSON.parse(res.data.picture)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
submit() {
|
||||
if (!this.detail) {
|
||||
return this.$u.toast('请输入帮扶内容')
|
||||
}
|
||||
|
||||
uni.showLoading()
|
||||
this.$http.post('/app/apppreventionreturntopovertylog/addOrUpdate', {
|
||||
detail: this.detail,
|
||||
picture: JSON.stringify(this.picture),
|
||||
filies: this.filies,
|
||||
pid: this.pid,
|
||||
id: this.id || ''
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$u.toast(this.isEdit ? '保存成功' : '提交成功')
|
||||
@@ -73,7 +57,6 @@ export default {
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user