走访事项 现实状态
This commit is contained in:
@@ -3,42 +3,42 @@
|
|||||||
<div v-if="addList">
|
<div v-if="addList">
|
||||||
<u-navbar title="新建走访" back-icon-color="#fff" title-color="#fff" title-width="300" title-size="36" :background="backgroundNavbar"> </u-navbar>
|
<u-navbar title="新建走访" back-icon-color="#fff" title-color="#fff" title-width="300" title-size="36" :background="backgroundNavbar"> </u-navbar>
|
||||||
|
|
||||||
<div class="header-content">
|
<div class="header-description">
|
||||||
<u-form :model="forms" ref="uForm" label-width="auto">
|
<u-form :model="forms" ref="uForm" label-width="auto">
|
||||||
<u-form-item label="区域选择" prop="areaId" required style="position: relative">
|
<u-form-item label="区域选择" prop="areaId" style="position: relative">
|
||||||
<ai-area-picker v-model="forms.areaId" ref="areaIds" :areaId="areaIdProps" @select="areaSelect" style="color: #333"> </ai-area-picker>
|
<ai-area-picker v-model="forms.areaId" ref="areaIds" :areaId="areaIdProps" @select="areaSelect" style="color: #333"> </ai-area-picker>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
<u-form-item label="走访对象" prop="object" style="position: relative">
|
<u-form-item label="走访对象" prop="applicationId" required style="position: relative">
|
||||||
<u-input v-model="forms.object" disabled placeholder="请选择走访对象" @click="toWalkObject" />
|
<u-input v-model="forms.applicationId" disabled placeholder="请选择走访对象" @click="toWalkObject" />
|
||||||
<!-- @click="showObject = true" -->
|
<!-- @click="showObject = true" -->
|
||||||
|
|
||||||
<u-select v-model="showObject" :list="Objectlist" @confirm="changeObject"></u-select>
|
<u-select v-model="showObject" :list="Objectlist" @confirm="applicaStatus"></u-select>
|
||||||
|
|
||||||
<u-icon name="arrow-right" color="#CCCCCC" style="position: absolute; top: 25px; right: 30px"></u-icon>
|
<u-icon name="arrow-right" color="#CCCCCC" style="position: absolute; top: 25px; right: 30px"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
<u-form-item label="现实状态" prop="reality" required style="position: relative">
|
<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" />
|
||||||
|
|
||||||
<!-- :disabled="!forms.object" -->
|
<!-- :disabled="!forms.object" -->
|
||||||
<u-select v-model="showStstus" :list="$dict.getDict('realityStatus')" value-name="dictValue" label-name="dictName" @confirm="changeStstus"></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-icon name="arrow-right" color="#CCCCCC" style="position: absolute; top: 25px; right: 30px"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
<u-form-item label="入户走访事项" prop="things" required label-position="top">
|
<u-form-item label="入户走访事项" prop="title" required label-position="top">
|
||||||
<u-input v-model="forms.things" 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.things.length }}/30</div>
|
<div>{{ forms.title.length }}/30</div>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
<u-form-item label="入户走访内容" prop="content" label-position="top">
|
<u-form-item label="入户走访内容" prop="description" label-position="top">
|
||||||
<u-input v-model="forms.content" 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.things.length }}/500</div>
|
<div>{{ forms.description.length }}/500</div>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
<u-form-item label="图片(最多9张)" prop="avatar" required label-position="top">
|
<u-form-item label="图片(最多9张)" prop="images" class="avatars" required label-position="top">
|
||||||
<ai-uploader v-model="forms.avatar" multiple @change="change" placeholder="上传图片" :limit="9"></ai-uploader>
|
<ai-uploader :def.sync="forms.images" multiple @list="change" placeholder="上传图片" :limit="9"></ai-uploader>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</u-form>
|
</u-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -68,36 +68,21 @@ export default {
|
|||||||
backgroundNavbar: {
|
backgroundNavbar: {
|
||||||
backgroundColor: '#3975C6',
|
backgroundColor: '#3975C6',
|
||||||
},
|
},
|
||||||
|
|
||||||
forms: {
|
forms: {
|
||||||
areaId: '',
|
areaId: '',
|
||||||
object: '',
|
applicationId: '',
|
||||||
reality: '',
|
reality: '',
|
||||||
realitylabel: '',
|
realityValue: '',
|
||||||
things: '',
|
title: '',
|
||||||
content: '',
|
description: '',
|
||||||
avatar: [],
|
images: [],
|
||||||
},
|
},
|
||||||
showAreaId: false,
|
showAreaId: false,
|
||||||
areaIdlist: [
|
|
||||||
{
|
|
||||||
value: '1',
|
|
||||||
label: '江',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: '2',
|
|
||||||
label: '湖',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
Objectlist: [
|
Objectlist: [
|
||||||
{
|
{
|
||||||
value: '0',
|
value: '0',
|
||||||
label: '武汉',
|
label: '武汉',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
value: '1',
|
|
||||||
label: '北京',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
showObject: false,
|
showObject: false,
|
||||||
showStstus: false,
|
showStstus: false,
|
||||||
@@ -114,34 +99,49 @@ export default {
|
|||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
|
console.log(1)
|
||||||
if (this.flag) return
|
if (this.flag) return
|
||||||
|
|
||||||
this.$refs.uForm.validate((valid) => {
|
this.$refs.uForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (!this.areaId) {
|
if (!this.forms.applicationId) {
|
||||||
return this.$u.toast('请选择走访对象')
|
return this.$u.toast('请选择走访对象')
|
||||||
}
|
}
|
||||||
if (!this.form.things) {
|
if (!this.forms.title) {
|
||||||
return this.$u.toast('请输入入户走访事项')
|
return this.$u.toast('请输入入户走访事项')
|
||||||
}
|
}
|
||||||
|
console.log(2)
|
||||||
|
|
||||||
|
const imgs = []
|
||||||
|
if (this.forms.images) {
|
||||||
|
this.forms.images.map((e) => {
|
||||||
|
console.log(e)
|
||||||
|
imgs.push({ url: e.url, id: e.id })
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(3)
|
||||||
this.flag = true
|
this.flag = true
|
||||||
this.$instance
|
this.$instance
|
||||||
.post(`/appjobresume/addOrUpdate`, {
|
.post(`/appjobresume/addOrUpdate`, {
|
||||||
areaId: this.forms.areaId,
|
areaId: this.forms.areaId,
|
||||||
object: this.forms.object,
|
applicationId: '8883942d30aa4b76b33de1660d4870e4',
|
||||||
|
// object: this.forms.object,
|
||||||
reality: this.forms.reality == Number ? this.forms.reality : this.forms.realitylabel,
|
reality: this.forms.reality == Number ? this.forms.reality : this.forms.realitylabel,
|
||||||
things: this.forms.things,
|
title: this.forms.title,
|
||||||
content: this.forms.content,
|
description: this.forms.description,
|
||||||
avatar: this.forms.avatar[0],
|
images: imgs || [],
|
||||||
// education: this.form.education == Number ? this.form.education : this.forms.educationValue,
|
// education: this.form.education == Number ? this.form.education : this.forms.educationValue,
|
||||||
id: this.id,
|
id: '',
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
console.log(4)
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
console.log(5)
|
||||||
this.$u.toast('保存成功')
|
this.$u.toast('保存成功')
|
||||||
this.flag = false
|
this.flag = false
|
||||||
uni.navigateBack({})
|
uni.navigateBack({})
|
||||||
|
console.log(6)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -158,16 +158,16 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
changeObject(e) {
|
applicaStatus(e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
this.forms.object = e[0].value
|
this.forms.object = e[0].value
|
||||||
this.forms.objectlabel = e[0].label
|
this.forms.objectlabel = e[0].label
|
||||||
},
|
},
|
||||||
|
|
||||||
changeStstus(e) {
|
realityStstus(e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
this.forms.reality = e[0].value
|
this.forms.reality = e[0].label
|
||||||
this.forms.realitylabel = e[0].label
|
this.forms.realityValue = e[0].value
|
||||||
},
|
},
|
||||||
|
|
||||||
toWalkObject() {
|
toWalkObject() {
|
||||||
@@ -187,13 +187,41 @@ export default {
|
|||||||
.add {
|
.add {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding-bottom: 112px;
|
padding-bottom: 112px;
|
||||||
.header-content {
|
.header-description {
|
||||||
::v-deep .u-form {
|
::v-deep .u-form {
|
||||||
.u-form-item {
|
.u-form-item {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
.u-form-item__body {
|
||||||
|
// .u-form-item--right {
|
||||||
|
// .u-form-item--right__content {
|
||||||
|
.u-form-item--right__content__slot {
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.u-form-item:last-child {
|
.u-form-item:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
padding-bottom: 20px !important;
|
||||||
|
}
|
||||||
|
.avatars {
|
||||||
|
.u-form-item__body {
|
||||||
|
// .u-form-item--right {
|
||||||
|
// .u-form-item--right__content {
|
||||||
|
// .u-form-item--right__content__slot {
|
||||||
|
// .ai-uploader {
|
||||||
|
// .fileList {
|
||||||
|
.default {
|
||||||
|
width: 160px;
|
||||||
|
height: 160px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user