BUG 28184

This commit is contained in:
aixianling
2022-03-15 11:02:48 +08:00
parent 3744dbbe62
commit fefcf91da1

View File

@@ -8,17 +8,20 @@
<div class="area-select">
<div class="select-content">
<div class="area-content">
<AiAreaPicker :areaId="user.areaId" v-model="areaId" @select="areaSelect" :name.sync="areaName">
<img src="../img/local-icon.png" alt=""/>
<span class="label" v-if="areaName">{{ areaName }}</span>
<span v-else>请选择</span>
<u-icon name="arrow-down" color="#666" size="24"/>
</AiAreaPicker>
<AiPagePicker type="gird" isMyGird @select="handleGridSelect">
<u-icon name="arrow-down" color="#666" size="24" :label="gridName" label-pos="left"/>
</AiPagePicker>
<!-- <AiAreaPicker :areaId="user.areaId" v-model="areaId" @select="areaSelect" :name.sync="areaName">-->
<!-- <img src="../img/local-icon.png" alt=""/>-->
<!-- <span class="label" v-if="areaName">{{ areaName }}</span>-->
<!-- <span v-else>请选择</span>-->
<!-- <u-icon name="arrow-down" color="#666" size="24"/>-->
<!-- </AiAreaPicker>-->
</div>
<div class="search-input" v-if="tabIndex">
<img src="../img/search-icon.png" alt=""/>
<u-input type="text" placeholder="请输入姓名" placeholder-style="color:#999;font-size:13px;" height="18"
v-model="name" @confirm="getUserList" :clearable="false" maxlength="6"/>
v-model="search.name" @confirm="getUserList" :clearable="false" maxlength="6"/>
</div>
</div>
</div>
@@ -81,11 +84,12 @@
<script>
import {mapState} from 'vuex'
import AiPagePicker from "../../../components/AiPagePicker";
export default {
components: {AiPagePicker},
data() {
return {
areaId: '',
areaName: '',
tabs: ['统计信息', '人员信息'],
tabIndex: 0,
@@ -93,47 +97,46 @@ export default {
statisticsList: [],
statisticsListMon: [],
userList: [],
name: '',
gridType: 0
gridType: 0,
gridName: "请选择",
search: {name: ''}
}
},
computed: {...mapState(['user'])},
created() {
this.$dict.load('appSpecialTypeFive').then(() => {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.getStatistic()
this.getStatisticMon()
this.getUserList()
})
uni.$on('specialPeopleList', () => {
this.getStatistic()
this.getStatisticMon()
this.getUserList()
})
this.$dict.load('appSpecialTypeFive')
},
onShow() {
document.title = '特殊人群管理'
this.$dict.getDict('appSpecialTypeFive')
this.isGirdUser()
this.getDatas()
},
methods: {
areaSelect(e) {
this.areaId = e
getDatas() {
this.getStatistic()
this.getStatisticMon()
this.getUserList()
},
handleGridSelect(e) {
this.gridName = e.girdName
this.search.girdId = e.id
this.getDatas()
},
areaSelect(e) {
this.search.areaId = e
this.getDatas()
},
tabClick(index) {
this.tabIndex = index
},
getStatistic() {
this.statisticsList = []
this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=0`).then((res) => {
if (res.code == 0) {
this.$http.post(`/app/appapplicationinfo/specialStatistic`, null, {
params: {...this.search, type: 0, range: 0}
}).then((res) => {
if (res?.data) {
for (let i in res.data) {
var obj = {
let obj = {
label: i,
value: res.data[i],
}
@@ -144,10 +147,12 @@ export default {
},
getStatisticMon() {
this.statisticsListMon = []
this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=1`).then((res) => {
if (res.code == 0) {
this.$http.post(`/app/appapplicationinfo/specialStatistic`, null, {
params: {...this.search, type: 0, range: 1}
}).then((res) => {
if (res?.data) {
for (let i in res.data) {
var obj = {
let obj = {
label: i,
value: res.data[i],
}
@@ -158,10 +163,12 @@ export default {
},
getUserList() {
this.userList = []
this.$http.post(`/app/appapplicationinfo/queryPeople?areaId=${this.areaId}&type=0&status=1&name=${this.name}`).then((res) => {
if (res.code == 0) {
this.$http.post(`/app/appapplicationinfo/queryPeople`, null, {
params: {...this.search, type: 0, status: 1}
}).then((res) => {
if (res?.data) {
for (let i in res.data) {
var obj = {
let obj = {
label: i,
value: res.data[i],
check: false,
@@ -220,8 +227,8 @@ export default {
}
})
},
showDetail(e){
uni.navigateTo({url:`/mods/AppPeopleList/DetailCard?id=${e.id}`})
showDetail(e) {
uni.navigateTo({url: `/mods/AppPeopleList/DetailCard?id=${e.id}`})
}
},
}