BUG 28292
This commit is contained in:
@@ -4,20 +4,20 @@
|
||||
<div class="header-description">
|
||||
<u-form :model="forms" ref="uForm" label-width="auto">
|
||||
<u-form-item label="区域选择" prop="areaId" class="areaIds" style="position: relative">
|
||||
<AiAreaPicker :value="forms.areaId" :areaId="areaIdProps" @select="areaSelect" style="color: #333"></AiAreaPicker>
|
||||
<u-icon name="arrow-right" color="rgb(192, 196, 204)" size="30" style="margin-left: 4px" />
|
||||
<AiAreaPicker :value="forms.areaId" :areaId="areaIdProps" @select="areaSelect" isForm/>
|
||||
</u-form-item>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<u-form-item label="走访对象" prop="name" required :right-icon="id ? '' : 'arrow-right'" class="create_user_names">
|
||||
<u-input v-model="forms.name" disabled placeholder="请选择走访对象" @click="toWalkObject" />
|
||||
<u-form-item label="走访对象" prop="name" required :right-icon="id ? '' : 'arrow-right'"
|
||||
class="create_user_names">
|
||||
<u-input v-model="forms.name" disabled placeholder="请选择走访对象" @click="toWalkObject"/>
|
||||
</u-form-item>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<u-form-item label="走访时间" prop="visitTime" required :right-icon="id ? '' : 'arrow-right'" class="realitys">
|
||||
<u-input v-model="forms.visitTime" disabled placeholder="请选择走访时间" @click="showVisitTime = true" />
|
||||
<u-input v-model="forms.visitTime" disabled placeholder="请选择走访时间" @click="showVisitTime = true"/>
|
||||
|
||||
<u-picker v-model="showVisitTime" :params="params" mode="time" @confirm="change"></u-picker>
|
||||
</u-form-item>
|
||||
@@ -25,29 +25,33 @@
|
||||
<div class="line"></div>
|
||||
|
||||
<u-form-item label="现实状态" prop="reality" :right-icon="id ? '' : 'arrow-right'" class="realitys">
|
||||
<u-input v-model="forms.reality" disabled placeholder="请选择现实状态" @click="realityClick" />
|
||||
<u-input v-model="forms.reality" disabled placeholder="请选择现实状态" @click="realityClick"/>
|
||||
|
||||
<u-select v-model="showStstus" :list="$dict.getDict('realityStatus')" value-name="dictValue" label-name="dictName" @confirm="realityStstus"></u-select>
|
||||
<u-select v-model="showStstus" :list="$dict.getDict('realityStatus')" value-name="dictValue"
|
||||
label-name="dictName" @confirm="realityStstus"></u-select>
|
||||
</u-form-item>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<u-form-item label="入户走访事项" prop="title" required label-position="top" :border-bottom="false">
|
||||
<u-input v-model="forms.title" placeholder="请输入入户走访事项(30字以内)" type="textarea" auto-height height="60" :maxlength="30" />
|
||||
<u-input v-model="forms.title" placeholder="请输入入户走访事项(30字以内)" type="textarea" auto-height height="60"
|
||||
:maxlength="30"/>
|
||||
</u-form-item>
|
||||
<div class="hint">{{ forms.title.length }}/30</div>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<u-form-item label="入户走访内容" prop="description" label-position="top" :border-bottom="false">
|
||||
<u-input v-model="forms.description" placeholder="请输入入户走访事项(500字以内)" type="textarea" auto-height height="60" :maxlength="500" />
|
||||
<u-input v-model="forms.description" placeholder="请输入入户走访事项(500字以内)" type="textarea" auto-height height="60"
|
||||
:maxlength="500"/>
|
||||
</u-form-item>
|
||||
<div class="hint">{{ forms.description.length }}/500</div>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<u-form-item label="图片(最多9张)" prop="images" class="avatars" label-position="top" :border-bottom="false">
|
||||
<AiUploader :def.sync="forms.images" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2" sourceType="camera"></AiUploader>
|
||||
<AiUploader :def.sync="forms.images" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"
|
||||
sourceType="camera"></AiUploader>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
</div>
|
||||
@@ -58,11 +62,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'add',
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
@@ -103,7 +106,7 @@ export default {
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: { ...mapState(['user']) },
|
||||
computed: {...mapState(['user'])},
|
||||
onLoad(o) {
|
||||
this.id = o.id ? o.id : ''
|
||||
this.areaIdProps = this.user.areaId
|
||||
@@ -169,38 +172,38 @@ export default {
|
||||
const imgs = []
|
||||
if (this.forms.images) {
|
||||
this.forms.images.map((e) => {
|
||||
imgs.push({ url: e.url, id: e.id })
|
||||
imgs.push({url: e.url, id: e.id})
|
||||
})
|
||||
}
|
||||
|
||||
this.flag = true
|
||||
this.$http
|
||||
.post(`/app/appvisitvondolence/addOrUpdate`, {
|
||||
areaId: this.forms.areaId,
|
||||
name: this.forms.name,
|
||||
visitTime: this.forms.visitTime,
|
||||
optionId: this.forms.optionId,
|
||||
// menuLevel3Name: this.forms.menuLevel3Name,
|
||||
applicationId: this.forms.applicationId,
|
||||
.post(`/app/appvisitvondolence/addOrUpdate`, {
|
||||
areaId: this.forms.areaId,
|
||||
name: this.forms.name,
|
||||
visitTime: this.forms.visitTime,
|
||||
optionId: this.forms.optionId,
|
||||
// menuLevel3Name: this.forms.menuLevel3Name,
|
||||
applicationId: this.forms.applicationId,
|
||||
|
||||
reality: this.forms.realityValue ? this.forms.realityValue : this.forms.reality,
|
||||
title: this.forms.title,
|
||||
description: this.forms.description,
|
||||
createUserId: this.user.id,
|
||||
createUserName: this.user.name,
|
||||
images: JSON.stringify(imgs) || [],
|
||||
id: this.id,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('保存成功')
|
||||
this.flag = false
|
||||
uni.$emit('updateList')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 600)
|
||||
}
|
||||
})
|
||||
reality: this.forms.realityValue ? this.forms.realityValue : this.forms.reality,
|
||||
title: this.forms.title,
|
||||
description: this.forms.description,
|
||||
createUserId: this.user.id,
|
||||
createUserName: this.user.name,
|
||||
images: JSON.stringify(imgs) || [],
|
||||
id: this.id,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('保存成功')
|
||||
this.flag = false
|
||||
uni.$emit('updateList')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 600)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$u.toast('保存失败')
|
||||
}
|
||||
@@ -221,7 +224,7 @@ export default {
|
||||
},
|
||||
|
||||
toWalkObject() {
|
||||
uni.navigateTo({ url: `./selectType` })
|
||||
uni.navigateTo({url: `./selectType`})
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -235,8 +238,10 @@ export default {
|
||||
.header-description {
|
||||
padding-bottom: 162px;
|
||||
background: #f3f6f9;
|
||||
|
||||
::v-deep .u-form {
|
||||
background: #fff;
|
||||
|
||||
.u-form-item {
|
||||
.u-form-item__body {
|
||||
.u-form-item--right__content__slot {
|
||||
|
||||
Reference in New Issue
Block a user