BUG 30109
This commit is contained in:
@@ -22,7 +22,8 @@ export default {
|
|||||||
nodeKey: {default: "idNumber"},
|
nodeKey: {default: "idNumber"},
|
||||||
selected: {default: () => []},
|
selected: {default: () => []},
|
||||||
placeholder: {default: "选择人员"},
|
placeholder: {default: "选择人员"},
|
||||||
ops: {default: () => ({})}
|
ops: {default: () => ({})},
|
||||||
|
valueObj: Boolean
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -46,13 +47,13 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleJump() {
|
handleJump() {
|
||||||
let {config, nodeKey} = this,
|
let {config, nodeKey, valueObj} = this,
|
||||||
selected = this.value || this.selected?.map(e => e[nodeKey])
|
selected = (valueObj ? this.value[nodeKey] : this.value) || this.selected?.map(e => e[nodeKey])
|
||||||
uni.$once('pagePicker:' + this.type, data => {
|
uni.$once('pagePicker:' + this.type, data => {
|
||||||
console.log('发送', data)
|
console.log('发送', data)
|
||||||
this.$emit("update:selected", data)
|
this.$emit("update:selected", data)
|
||||||
this.$emit("select", data)
|
this.$emit("select", data)
|
||||||
this.$emit("change", data ? [data].flat()?.map(e => e[nodeKey]) : "")
|
this.$emit("change", valueObj ? data : data ? [data].flat()?.map(e => e[nodeKey]) : "")
|
||||||
})
|
})
|
||||||
let url = `${config.url}`,
|
let url = `${config.url}`,
|
||||||
qsstr = qs.stringify({
|
qsstr = qs.stringify({
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="AddGird">
|
<section class="AddGird">
|
||||||
<div class="item-flex">
|
<div class="item-flex">
|
||||||
<div class="label">
|
<div class="label">
|
||||||
<span class="tips">*</span>姓名
|
<span class="tips">*</span>姓名
|
||||||
</div>
|
</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
<u-input type="text" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="name" maxlength="50" />
|
<u-input type="text" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="name" maxlength="50"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-flex">
|
<div class="item-flex">
|
||||||
@@ -13,24 +13,26 @@
|
|||||||
<span class="tips">*</span>手机号
|
<span class="tips">*</span>手机号
|
||||||
</div>
|
</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
<u-input type="text" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="phone" maxlength="50" />
|
<u-input type="text" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="phone" maxlength="50"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-flex">
|
<div class="item-flex">
|
||||||
<div class="label">
|
<div class="label">
|
||||||
<span class="tips">*</span>所属网格
|
<span class="tips">*</span>所属网格
|
||||||
</div>
|
</div>
|
||||||
<div class="value" @click="linkTo('./SelectGird?formType=2')">
|
<div class="value">
|
||||||
<span v-if="selectGird.girdName">{{selectGird.girdName}}</span>
|
<AiPagePicker type="custom" v-model="selectGird" valueObj nodeKey="id" :ops="{url:'./SelectGird',label: 'girdName'}" formType="2">
|
||||||
<span style="color:#999;" v-else>请选择</span>
|
<AiMore v-model="selectGird.girdName"/>
|
||||||
<img src="./components/img/right-icon.png" alt="" /></div>
|
</AiPagePicker>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer" @click="confirm">确认添加</div>
|
<div class="footer" @click="confirm">确认添加</div>
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapState} from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -41,25 +43,21 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {...mapState(['user'])},
|
computed: {...mapState(['user'])},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
console.log(this.user)
|
|
||||||
this.name = this.user.name || ''
|
this.name = this.user.name || ''
|
||||||
this.phone = this.user.phone || ''
|
this.phone = this.user.phone || ''
|
||||||
uni.$on('goback', (res) => {
|
|
||||||
this.selectGird = res
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = '网格员信息申报'
|
document.title = '网格员信息申报'
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
confirm() {
|
confirm() {
|
||||||
if(!this.name){
|
if (!this.name) {
|
||||||
return this.$u.toast('请输入姓名')
|
return this.$u.toast('请输入姓名')
|
||||||
}
|
}
|
||||||
if(!this.phone){
|
if (!this.phone) {
|
||||||
return this.$u.toast('请输入手机号')
|
return this.$u.toast('请输入手机号')
|
||||||
}
|
}
|
||||||
if(!this.selectGird.girdName){
|
if (!this.selectGird.girdName) {
|
||||||
return this.$u.toast('请选择所属网格')
|
return this.$u.toast('请选择所属网格')
|
||||||
}
|
}
|
||||||
this.$http.post(`/app/appgirdmemberapply/girdMemberCheck?name=${this.name}&phone=${this.phone}&girdName=${this.selectGird.girdName}`).then((res) => {
|
this.$http.post(`/app/appgirdmemberapply/girdMemberCheck?name=${this.name}&phone=${this.phone}&girdName=${this.selectGird.girdName}`).then((res) => {
|
||||||
@@ -73,7 +71,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
linkTo(url) {
|
linkTo(url) {
|
||||||
uni.navigateTo({ url })
|
uni.navigateTo({url})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,42 +79,48 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.AddGird {
|
.AddGird {
|
||||||
.item-flex{
|
.item-flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 34px 32px;
|
padding: 34px 32px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
.label{
|
|
||||||
|
.label {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
.tips{
|
|
||||||
|
.tips {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
color: #F46;
|
color: #F46;
|
||||||
line-height: 44px;
|
line-height: 44px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.value{
|
|
||||||
|
.value {
|
||||||
width: calc(100% - 150px);
|
width: calc(100% - 150px);
|
||||||
line-height: 44px;
|
line-height: 44px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
color: #666;
|
color: #666;
|
||||||
img{
|
|
||||||
|
img {
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.color-999{
|
|
||||||
|
.color-999 {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.footer{
|
|
||||||
|
.footer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 112px;
|
height: 112px;
|
||||||
line-height: 112px;
|
line-height: 112px;
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ export default {
|
|||||||
return this.user.girdCheckType > 0
|
return this.user.girdCheckType > 0
|
||||||
},
|
},
|
||||||
//是否是网格员申报
|
//是否是网格员申报
|
||||||
isApply: v => v.$route.query.formType == 2
|
isApply: v => v.$route.query.formType == 2,
|
||||||
|
selected: v => [v.$route.query.selected].flat()
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
if (option.isFormMap) {
|
if (option.isFormMap) {
|
||||||
@@ -98,7 +99,7 @@ export default {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.treeList = this.allData.filter(e => !e.parentGirdId || this.isMyGirds)
|
this.treeList = this.allData.filter(e => !e.parentGirdId || this.isMyGirds)
|
||||||
this.treeList.map((item) => item.isChecked = false)
|
this.treeList.map((item) => item.isChecked = this.selected.includes(item.id))
|
||||||
let obj = {girdName: '可选范围', id: ''}
|
let obj = {girdName: '可选范围', id: ''}
|
||||||
this.slectList.push(obj)
|
this.slectList.push(obj)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user