bug
This commit is contained in:
@@ -84,7 +84,7 @@
|
|||||||
<div class="border">
|
<div class="border">
|
||||||
<span class="label">现住址</span>
|
<span class="label">现住址</span>
|
||||||
<span class="value">
|
<span class="value">
|
||||||
<AiAreaPicker ref="address" class="aiArea" :fullName.sync="form.currentAreaName" :value="form.currentAreaId" mode="custom" all @select="onCurrentAreaChange">
|
<AiAreaPicker ref="address" :fullName.sync="form.currentAreaName" :value="form.currentAreaId" mode="custom" all @select="onCurrentAreaChange">
|
||||||
<div class="aiArea">
|
<div class="aiArea">
|
||||||
<span class="label" v-if="form.currentAreaName">{{ form.currentAreaName }}</span>
|
<span class="label" v-if="form.currentAreaName">{{ form.currentAreaName }}</span>
|
||||||
<span v-else class="color-999">请选择</span>
|
<span v-else class="color-999">请选择</span>
|
||||||
@@ -94,20 +94,6 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
|
||||||
<span class="tips">*</span>
|
|
||||||
<div class="border">
|
|
||||||
<!-- <div class="border item-right"> -->
|
|
||||||
<span class="label">居民标签</span>
|
|
||||||
<span class="value" @click="toChooseTags">
|
|
||||||
<span class="color-999">请选择</span>
|
|
||||||
<img src="./components/img/right-icon.png" alt="">
|
|
||||||
</span>
|
|
||||||
<!-- <div class="tag-list" @click="toChooseTags">
|
|
||||||
<div class="tag" v-for="(item, index) in 10" :key="index">残疾人</div>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="item mar-b0">
|
<div class="item mar-b0">
|
||||||
<span class="tips"></span>
|
<span class="tips"></span>
|
||||||
<div class="border not-border">
|
<div class="border not-border">
|
||||||
@@ -122,7 +108,7 @@
|
|||||||
<div class="border">
|
<div class="border">
|
||||||
<span class="label">户籍地址</span>
|
<span class="label">户籍地址</span>
|
||||||
<span class="value">
|
<span class="value">
|
||||||
<AiAreaPicker ref="address" class="aiArea" :fullName.sync="form.householdAreaName" :value="form.householdAreaId" mode="custom" all @select="onHouseAreaChange">
|
<AiAreaPicker ref="address" :fullName.sync="form.householdAreaName" :value="form.householdAreaId" mode="custom" all @select="onHouseAreaChange">
|
||||||
<div class="aiArea">
|
<div class="aiArea">
|
||||||
<span class="label" v-if="form.householdAreaName">{{ form.householdAreaName }}</span>
|
<span class="label" v-if="form.householdAreaName">{{ form.householdAreaName }}</span>
|
||||||
<span v-else class="color-999">请选择</span>
|
<span v-else class="color-999">请选择</span>
|
||||||
@@ -141,6 +127,19 @@
|
|||||||
<div class="text-area">
|
<div class="text-area">
|
||||||
<textarea placeholder="请输入" maxlength="30" v-model="form.householdAddress"></textarea>
|
<textarea placeholder="请输入" maxlength="30" v-model="form.householdAddress"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div class="border">
|
||||||
|
<!-- <div class="border item-right"> -->
|
||||||
|
<span class="label">居民标签</span>
|
||||||
|
<span class="value" @click="toChooseTags">
|
||||||
|
<span class="color-999">请选择</span>
|
||||||
|
<img src="./components/img/right-icon.png" alt="">
|
||||||
|
</span>
|
||||||
|
<!-- <div class="tag-list" @click="toChooseTags">
|
||||||
|
<div class="tag" v-for="(item, index) in 10" :key="index">残疾人</div>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="pad-b152"></div>
|
<div class="pad-b152"></div>
|
||||||
<div class="add-btn" @click="submit">
|
<div class="add-btn" @click="submit">
|
||||||
<div>保存</div>
|
<div>保存</div>
|
||||||
@@ -174,7 +173,8 @@ export default {
|
|||||||
householdAreaName: '',
|
householdAreaName: '',
|
||||||
householdAddress: '',
|
householdAddress: '',
|
||||||
residentType: '',
|
residentType: '',
|
||||||
age: ''
|
age: '',
|
||||||
|
residentLabelList: []
|
||||||
},
|
},
|
||||||
showSelect: false,
|
showSelect: false,
|
||||||
formName: '',
|
formName: '',
|
||||||
@@ -191,6 +191,11 @@ export default {
|
|||||||
this.form.residentType = options.type
|
this.form.residentType = options.type
|
||||||
}
|
}
|
||||||
this.$dict.load('yesOrNo', 'sex', 'householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType')
|
this.$dict.load('yesOrNo', 'sex', 'householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType')
|
||||||
|
|
||||||
|
uni.$on('onChecked', e => {
|
||||||
|
console.log(e)
|
||||||
|
this.form.residentLabelList = e
|
||||||
|
})
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['user']),
|
...mapState(['user']),
|
||||||
@@ -246,7 +251,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
toChooseTags () {
|
toChooseTags () {
|
||||||
uni.navigateTo({url: `./Tags`})
|
uni.navigateTo({
|
||||||
|
url: `./Tags?ids=${this.form.residentLabelList.map(v => v).join(',')}`
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
confirmSelect(e) {
|
confirmSelect(e) {
|
||||||
@@ -302,6 +309,15 @@ export default {
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.add {
|
.add {
|
||||||
|
::v-deep .aiArea {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
.label {
|
||||||
|
width: 100%!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.item{
|
.item{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-left: 14px;
|
padding-left: 14px;
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
<div class="tags-group" v-for="(label, i) in 2" :key="i">
|
<div class="tags-group">
|
||||||
<h2>年龄段</h2>
|
<h2>标签列表</h2>
|
||||||
<div class="tags-list">
|
<div class="tags-list">
|
||||||
<div class="item" v-for="(item, index) in 20" :class="[currIndex === index ? 'active' : '']" :key="index">婴儿</div>
|
<div class="item"
|
||||||
|
v-for="(item, index) in list"
|
||||||
|
:class="[checked.includes(item.id) ? 'active' : '']"
|
||||||
|
:key="index"
|
||||||
|
@click="onClick(item.id)">
|
||||||
|
{{ item.labelName }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="add-btn" @click="submit">
|
<div class="add-btn" @click="submit">
|
||||||
@@ -18,16 +24,53 @@
|
|||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
currIndex: 0
|
currIndex: 0,
|
||||||
|
list: [],
|
||||||
|
checked: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad () {
|
onLoad (query) {
|
||||||
|
this.getList()
|
||||||
|
|
||||||
|
if (query.ids) {
|
||||||
|
this.checked = query.ids.split(',')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
getList() {
|
||||||
|
this.$loading()
|
||||||
|
this.$http.post('/app/appresidentlabelinfo/list?size=1000').then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.list = res.data.records
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
onClick (id) {
|
||||||
|
const index = this.checked.indexOf(id)
|
||||||
|
|
||||||
|
if (index === -1) {
|
||||||
|
this.checked.push(id)
|
||||||
|
} else {
|
||||||
|
this.checked.splice(index, 1)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
submit () {
|
||||||
|
if (!this.checked.length) {
|
||||||
|
return this.$u.toast('请选择标签')
|
||||||
|
}
|
||||||
|
|
||||||
|
const list = this.list.filter(v => {
|
||||||
|
return this.checked.includes(v.id)
|
||||||
|
})
|
||||||
|
|
||||||
|
uni.$emit('onChecked', list)
|
||||||
|
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user