Files
dvcp_v2_wxcp_app/src/apps/AppMonitoringObject/MonitorAddLog.vue

142 lines
2.5 KiB
Vue
Raw Normal View History

2022-03-24 14:29:32 +08:00
<template>
<div class="form">
<div class="form-item form-item__textarea">
<div class="form-item__title">
<em>*</em>
<h2>帮扶内容</h2>
</div>
<textarea :maxlength="500" v-model="detail" placeholder="请输入帮扶内容"></textarea>
</div>
<div class="form-item form-item__imgs">
<div class="form-item__title">
<h2>图片</h2>
<i>最多9张</i>
</div>
<div>
2022-03-26 16:55:09 +08:00
<AiUploader :limit="9" multiple :def.sync="files"></AiUploader>
2022-03-24 14:29:32 +08:00
</div>
</div>
<div class="btn" @click="submit">提交</div>
</div>
</template>
<script>
export default {
data() {
return {
detail: '',
pid: '',
2022-03-26 16:55:09 +08:00
files: []
2022-03-24 14:29:32 +08:00
}
},
onShow() {
document.title = '添加帮扶日志'
},
onLoad(query) {
this.pid = query.pid
},
methods: {
submit() {
if (!this.detail) {
return this.$u.toast('请输入帮扶内容')
}
this.$http.post('/app/apppreventionreturntopovertylog/addOrUpdate', {
detail: this.detail,
2022-03-26 16:55:09 +08:00
files: this.files,
2022-03-24 14:29:32 +08:00
pid: this.pid,
}).then(res => {
if (res.code === 0) {
this.$u.toast(this.isEdit ? '保存成功' : '提交成功')
uni.$emit('reload')
uni.navigateBack({
delta: 1
})
}
})
}
}
}
</script>
<style lang="scss">
.form {
padding-bottom: 120px;
div {
margin-bottom: 16px;
background: #fff;
}
.form-item {
padding: 32px;
.form-item__title {
display: flex;
align-items: center;
margin-bottom: 34px;
em {
margin-right: 4px;
font-style: normal;
color: #FF4466;
}
h2 {
color: #333333;
font-weight: normal;
font-size: 32px;
}
i {
color: #999999;
font-size: 28px;
font-style: normal;
}
}
textarea {
width: 100%;
}
}
.form-type {
display: flex;
align-items: center;
justify-content: space-between;
height: 112px;
padding: 0 32px;
h2 {
font-weight: normal;
color: #333333;
font-size: 32px;
}
span {
color: #999999;
font-size: 28px;
}
}
.btn {
position: fixed;
left: 0;
bottom: 0;
z-index: 11;
width: 100%;
height: 112px;
line-height: 112px;
margin: 0;
text-align: center;
color: #FFFFFF;
font-size: 32px;
background: #3192F4;
}
}
</style>