AiCard #custom #menu
This commit is contained in:
@@ -4,34 +4,30 @@
|
||||
<div class="header-description">
|
||||
<u-form :model="forms" ref="uForm" label-width="auto">
|
||||
<u-form-item label="区域选择" prop="areaId" style="position: relative">
|
||||
<AiAreaPicker v-model="forms.areaId" ref="areaIds" :areaId="areaIdProps" @select="areaSelect"
|
||||
style="color: #333"></AiAreaPicker>
|
||||
<AiAreaPicker v-model="forms.areaId" ref="areaIds" :areaId="areaIdProps" @select="areaSelect" style="color: #333"></AiAreaPicker>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="走访对象" prop="create_user_name" required style="position: relative">
|
||||
<u-input v-model="forms.create_user_name" disabled placeholder="请选择走访对象" @click="toWalkObject"/>
|
||||
<u-input v-model="forms.create_user_name" disabled placeholder="请选择走访对象" @click="toWalkObject" />
|
||||
|
||||
<u-icon name="arrow-right" color="#CCCCCC" style="position: absolute; top: 25px; right: 30px"></u-icon>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="现实状态" prop="reality" style="position: relative">
|
||||
<u-input v-model="forms.reality" disabled placeholder="请选择走访慰问对象" @click="showStstus = true"/>
|
||||
<u-input v-model="forms.reality" disabled placeholder="请选择走访慰问对象" @click="showStstus = true" />
|
||||
|
||||
<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-icon name="arrow-right" color="#CCCCCC" style="position: absolute; top: 25px; right: 30px"></u-icon>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="入户走访事项" prop="title" required label-position="top">
|
||||
<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" />
|
||||
<div>{{ forms.title.length }}/30</div>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="入户走访内容" prop="description" label-position="top">
|
||||
<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" />
|
||||
<div>{{ forms.description.length }}/500</div>
|
||||
</u-form-item>
|
||||
|
||||
@@ -51,7 +47,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
import { mapState } from 'vuex'
|
||||
import walkObject from './walkObject'
|
||||
|
||||
export default {
|
||||
@@ -83,7 +79,7 @@ export default {
|
||||
clickedUserSelect: false,
|
||||
}
|
||||
},
|
||||
computed: {...mapState(['user'])},
|
||||
computed: { ...mapState(['user']) },
|
||||
created() {
|
||||
this.areaIdProps = this.user.areaId
|
||||
this.$dict.load('realityStatus').then(() => {
|
||||
@@ -106,7 +102,6 @@ export default {
|
||||
},
|
||||
|
||||
submit() {
|
||||
console.log(1)
|
||||
if (this.flag) return
|
||||
|
||||
this.$refs.uForm.validate((valid) => {
|
||||
@@ -121,36 +116,32 @@ export default {
|
||||
const imgs = []
|
||||
if (this.forms.images) {
|
||||
this.forms.images.map((e) => {
|
||||
console.log(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,
|
||||
applicationId: this.forms.applicationId,
|
||||
name: this.forms.create_user_name,
|
||||
optionId: 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) => {
|
||||
console.log(4)
|
||||
if (res.code == 0) {
|
||||
console.log(5)
|
||||
this.$u.toast('保存成功')
|
||||
this.flag = false
|
||||
uni.navigateTo({url: `./AppWalkask`})
|
||||
console.log(6)
|
||||
}
|
||||
})
|
||||
.post(`/app/appvisitvondolence/addOrUpdate`, {
|
||||
areaId: this.forms.areaId,
|
||||
applicationId: this.forms.applicationId,
|
||||
name: this.forms.create_user_name,
|
||||
optionId: 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.navigateTo({ url: `./AppWalkask` })
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$u.toast('保存失败')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user