eslint
This commit is contained in:
@@ -1,21 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="detail">
|
<div class="detail">
|
||||||
<div class="tab-select">
|
<div class="tab-select">
|
||||||
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{item}}<span></span></div>
|
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{ item }}<span></span></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="area-select">
|
<div class="area-select">
|
||||||
<div class="select-content">
|
<div class="select-content">
|
||||||
<div class="area-content">
|
<div class="area-content">
|
||||||
<AiAreaPicker :areaId="user.areaId" v-model="areaId" @select="areaSelect" :name.sync="areaName">
|
<AiAreaPicker :areaId="user.areaId" v-model="areaId" @select="areaSelect" :name.sync="areaName">
|
||||||
<img src="./img/local-icon.png" alt="">
|
<img src="./img/local-icon.png" alt="" />
|
||||||
<span class="label" v-if="areaName">{{ areaName }}</span>
|
<span class="label" v-if="areaName">{{ areaName }}</span>
|
||||||
<span v-else>请选择</span>
|
<span v-else>请选择</span>
|
||||||
<u-icon name="arrow-down" color="#666" size="24" />
|
<u-icon name="arrow-down" color="#666" size="24" />
|
||||||
</AiAreaPicker>
|
</AiAreaPicker>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-input" v-if="tabIndex">
|
<div class="search-input" v-if="tabIndex">
|
||||||
<img src="./img/search-icon.png" alt="">
|
<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" />
|
<u-input type="text" placeholder="请输入姓名" placeholder-style="color:#999;font-size:13px;" height="18" v-model="name" @confirm="getUserList" :clearable="false" maxlength="6" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -23,46 +23,46 @@
|
|||||||
|
|
||||||
<div v-if="!tabIndex">
|
<div v-if="!tabIndex">
|
||||||
<div class="info-content">
|
<div class="info-content">
|
||||||
<div class="title">特殊人群</div>
|
<div class="title">特殊人群</div>
|
||||||
<div class="num-content">
|
<div class="num-content">
|
||||||
<div class="num-item" v-for="(item, index) in statisticsList" :key="index">
|
<div class="num-item" v-for="(item, index) in statisticsList" :key="index">
|
||||||
<h3>{{item.value}}</h3>
|
<h3>{{ item.value }}</h3>
|
||||||
<p>{{item.label}}</p>
|
<p>{{ item.label }}</p>
|
||||||
|
</div>
|
||||||
|
<AiEmpty v-if="!statisticsList.length" />
|
||||||
</div>
|
</div>
|
||||||
<AiEmpty v-if="!statisticsList.length"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="info-content">
|
<div class="info-content">
|
||||||
<div class="title">本月新增</div>
|
<div class="title">本月新增</div>
|
||||||
<div class="num-content color-org">
|
<div class="num-content color-org">
|
||||||
<div class="num-item" v-for="(item, index) in statisticsListMon" :key="index">
|
<div class="num-item" v-for="(item, index) in statisticsListMon" :key="index">
|
||||||
<h3>{{item.value}}</h3>
|
<h3>{{ item.value }}</h3>
|
||||||
<p>{{item.label}}</p>
|
<p>{{ item.label }}</p>
|
||||||
</div>
|
</div>
|
||||||
<AiEmpty v-if="!statisticsListMon.length"/>
|
<AiEmpty v-if="!statisticsListMon.length" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div class="item-content" v-for="(item, index) in userList" :key="index">
|
<div class="item-content" v-for="(item, index) in userList" :key="index">
|
||||||
<div class="title" @click="showUserType(index)">
|
<div class="title" @click="showUserType(index)">
|
||||||
<h2>{{item.label}}</h2>
|
<h2>{{ item.label }}</h2>
|
||||||
<img src="./img/down-icon.png" alt="" :class="item.check ? 'img-active' : ''">
|
<img src="./img/down-icon.png" alt="" :class="item.check ? 'img-active' : ''" />
|
||||||
</div>
|
</div>
|
||||||
<div class="user-list" v-if="item.check">
|
<div class="user-list" v-if="item.check">
|
||||||
<div class="user-item" v-for="(e, indexs) in item.value" :key="indexs" v-if="item.value && item.value.length">
|
<div class="user-item" v-for="(e, indexs) in item.value" :key="indexs" v-if="item.value && item.value.length">
|
||||||
<div class="user-img">
|
<div class="user-img">
|
||||||
<img src="./img/user-img.png" alt="">
|
<img src="./img/user-img.png" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="user-info">
|
<div class="user-info">
|
||||||
<p class="name">{{e.name}}</p>
|
<p class="name">{{ e.name }}</p>
|
||||||
<div class="phone">
|
<div class="phone">
|
||||||
<span>{{idNumberInit(e.idNumber)}}</span>
|
<span>{{ idNumberInit(e.idNumber) }}</span>
|
||||||
<span>{{e.phone}}</span>
|
<span>{{ e.phone }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="text" v-if="!item.value.length">{{'暂无' + item.label + '信息'}}</p>
|
<p class="text" v-if="!item.value.length">{{ '暂无' + item.label + '信息' }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer" @click="toAdd">
|
<div class="footer" @click="toAdd">
|
||||||
@@ -75,7 +75,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
areaId: '',
|
areaId: '',
|
||||||
@@ -86,16 +85,19 @@ export default {
|
|||||||
statisticsList: [],
|
statisticsList: [],
|
||||||
statisticsListMon: [],
|
statisticsListMon: [],
|
||||||
userList: [],
|
userList: [],
|
||||||
name: ''
|
name: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: { ...mapState(['user']) },
|
computed: { ...mapState(['user']) },
|
||||||
created() {
|
created() {
|
||||||
this.areaId = this.user.areaId
|
this.$dict.load('appSpecialTypeFive').then(() => {
|
||||||
this.areaName = this.user.areaName
|
this.areaId = this.user.areaId
|
||||||
this.getStatistic()
|
this.areaName = this.user.areaName
|
||||||
this.getStatisticMon()
|
this.getStatistic()
|
||||||
this.getUserList()
|
this.getStatisticMon()
|
||||||
|
this.getUserList()
|
||||||
|
})
|
||||||
|
|
||||||
uni.$on('specialPeopleList', () => {
|
uni.$on('specialPeopleList', () => {
|
||||||
this.getStatistic()
|
this.getStatistic()
|
||||||
this.getStatisticMon()
|
this.getStatisticMon()
|
||||||
@@ -104,6 +106,7 @@ export default {
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = '特殊人群管理'
|
document.title = '特殊人群管理'
|
||||||
|
console.log(this.$dict.getDict('appSpecialTypeFive'))
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@@ -120,10 +123,10 @@ export default {
|
|||||||
this.statisticsList = []
|
this.statisticsList = []
|
||||||
this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=0`).then((res) => {
|
this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=0`).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
for(let i in res.data){
|
for (let i in res.data) {
|
||||||
var obj = {
|
var obj = {
|
||||||
label: i,
|
label: i,
|
||||||
value: res.data[i]
|
value: res.data[i],
|
||||||
}
|
}
|
||||||
this.statisticsList.push(obj)
|
this.statisticsList.push(obj)
|
||||||
}
|
}
|
||||||
@@ -134,10 +137,10 @@ export default {
|
|||||||
this.statisticsListMon = []
|
this.statisticsListMon = []
|
||||||
this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=1`).then((res) => {
|
this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=1`).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
for(let i in res.data){
|
for (let i in res.data) {
|
||||||
var obj = {
|
var obj = {
|
||||||
label: i,
|
label: i,
|
||||||
value: res.data[i]
|
value: res.data[i],
|
||||||
}
|
}
|
||||||
this.statisticsListMon.push(obj)
|
this.statisticsListMon.push(obj)
|
||||||
}
|
}
|
||||||
@@ -148,11 +151,11 @@ export default {
|
|||||||
this.userList = []
|
this.userList = []
|
||||||
this.$http.post(`/app/appapplicationinfo/queryPeople?areaId=${this.areaId}&type=0&name=${this.name}`).then((res) => {
|
this.$http.post(`/app/appapplicationinfo/queryPeople?areaId=${this.areaId}&type=0&name=${this.name}`).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
for(let i in res.data){
|
for (let i in res.data) {
|
||||||
var obj = {
|
var obj = {
|
||||||
label: i,
|
label: i,
|
||||||
value: res.data[i],
|
value: res.data[i],
|
||||||
check: false
|
check: false,
|
||||||
}
|
}
|
||||||
this.userList.push(obj)
|
this.userList.push(obj)
|
||||||
}
|
}
|
||||||
@@ -163,55 +166,54 @@ export default {
|
|||||||
// this.$emit('change', {
|
// this.$emit('change', {
|
||||||
// type: 'Add',
|
// type: 'Add',
|
||||||
// })
|
// })
|
||||||
uni.navigateTo({url: './add'})
|
uni.navigateTo({ url: './add' })
|
||||||
},
|
},
|
||||||
idNumberInit(idNumber) {
|
idNumberInit(idNumber) {
|
||||||
if(!idNumber) {
|
if (!idNumber) {
|
||||||
idNumber = ''
|
idNumber = ''
|
||||||
}else {
|
} else {
|
||||||
idNumber = idNumber.substring(0, 5) + '******' + idNumber.substring(12, 15)
|
idNumber = idNumber.substring(0, 5) + '******' + idNumber.substring(12, 15)
|
||||||
}
|
}
|
||||||
return idNumber
|
return idNumber
|
||||||
},
|
},
|
||||||
showUserType(index) {
|
showUserType(index) {
|
||||||
if(this.userList[index].check) {
|
if (this.userList[index].check) {
|
||||||
this.userList[index].check = false
|
this.userList[index].check = false
|
||||||
}else {
|
} else {
|
||||||
this.userList.map((item) => {
|
this.userList.map((item) => {
|
||||||
item.check = false
|
item.check = false
|
||||||
})
|
})
|
||||||
this.userList[index].check = true
|
this.userList[index].check = true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
}
|
},
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.detail {
|
.detail {
|
||||||
.tab-select{
|
.tab-select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
line-height: 96px;
|
line-height: 96px;
|
||||||
background: #3975C6;
|
background: #3975c6;
|
||||||
display: flex;
|
display: flex;
|
||||||
.item{
|
.item {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
color: #CDDCF0;
|
color: #cddcf0;
|
||||||
}
|
}
|
||||||
.active{
|
.active {
|
||||||
font-family: PingFangSC-Medium, PingFang SC;
|
font-family: PingFangSC-Medium, PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
position: relative;
|
position: relative;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
span{
|
span {
|
||||||
width: 48px;
|
width: 48px;
|
||||||
height: 4px;
|
height: 4px;
|
||||||
background: #FFF;
|
background: #fff;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 14px;
|
bottom: 14px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
@@ -219,15 +221,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.area-select{
|
.area-select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: #FFF;
|
background: #fff;
|
||||||
padding-left: 32px;
|
padding-left: 32px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.select-content{
|
.select-content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 24px 32px 24px 0;
|
padding: 24px 32px 24px 0;
|
||||||
border-bottom: 1px solid #D8DDE6;
|
border-bottom: 1px solid #d8dde6;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
@@ -235,27 +237,27 @@ export default {
|
|||||||
line-height: 44px;
|
line-height: 44px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
.area-content{
|
.area-content {
|
||||||
width: calc(100% - 402px);
|
width: calc(100% - 402px);
|
||||||
line-height: 64px;
|
line-height: 64px;
|
||||||
img{
|
img {
|
||||||
width: 42px;
|
width: 42px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
}
|
}
|
||||||
.u-icon{
|
.u-icon {
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.search-input{
|
.search-input {
|
||||||
width: 402px;
|
width: 402px;
|
||||||
height: 64px;
|
height: 64px;
|
||||||
background: #F5F5F5;
|
background: #f5f5f5;
|
||||||
border-radius: 32px;
|
border-radius: 32px;
|
||||||
padding: 14px 32px 14px 64px;
|
padding: 14px 32px 14px 64px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
position: relative;
|
position: relative;
|
||||||
img{
|
img {
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
@@ -263,7 +265,7 @@ export default {
|
|||||||
top: 18px;
|
top: 18px;
|
||||||
left: 24px;
|
left: 24px;
|
||||||
}
|
}
|
||||||
::v-deep .u-input{
|
::v-deep .u-input {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 240px;
|
width: 240px;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
@@ -271,12 +273,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.info-content{
|
.info-content {
|
||||||
width: calc(100% - 64px);
|
width: calc(100% - 64px);
|
||||||
background: #FFF;
|
background: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin: 24px 32px 0;
|
margin: 24px 32px 0;
|
||||||
.title{
|
.title {
|
||||||
padding-left: 32px;
|
padding-left: 32px;
|
||||||
line-height: 94px;
|
line-height: 94px;
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
@@ -285,22 +287,22 @@ export default {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
.num-content{
|
.num-content {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.num-item{
|
.num-item {
|
||||||
float: left;
|
float: left;
|
||||||
width: 33%;
|
width: 33%;
|
||||||
padding: 40px 0;
|
padding: 40px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
h3{
|
h3 {
|
||||||
font-size: 64px;
|
font-size: 64px;
|
||||||
font-family: DINAlternate-Bold, DINAlternate;
|
font-family: DINAlternate-Bold, DINAlternate;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #3192F4;
|
color: #3192f4;
|
||||||
line-height: 74px;
|
line-height: 74px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
p{
|
p {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-family: PingFangSC-Medium, PingFang SC;
|
font-family: PingFangSC-Medium, PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@@ -309,56 +311,56 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.color-org{
|
.color-org {
|
||||||
.num-item{
|
.num-item {
|
||||||
h3{
|
h3 {
|
||||||
color: #FF8700;
|
color: #ff8700;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.item-content{
|
.item-content {
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
.title{
|
.title {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 108px;
|
height: 108px;
|
||||||
line-height: 108px;
|
line-height: 108px;
|
||||||
background: #FFF;
|
background: #fff;
|
||||||
padding: 0 32px;
|
padding: 0 32px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
h2{
|
h2 {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
font-family: PingFangSC-Semibold, PingFang SC;
|
font-family: PingFangSC-Semibold, PingFang SC;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
img{
|
img {
|
||||||
width: 34px;
|
width: 34px;
|
||||||
height: 34px;
|
height: 34px;
|
||||||
margin-top: 38px;
|
margin-top: 38px;
|
||||||
transition: all .3s ease-in-out;
|
transition: all 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
.img-active {
|
.img-active {
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.user-list{
|
.user-list {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
.user-item{
|
.user-item {
|
||||||
padding: 24px 32px;
|
padding: 24px 32px;
|
||||||
display: flex;
|
display: flex;
|
||||||
.user-img{
|
.user-img {
|
||||||
width: 112px;
|
width: 112px;
|
||||||
img{
|
img {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.user-info{
|
.user-info {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.name{
|
.name {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
font-family: PingFangSC-Medium, PingFang SC;
|
font-family: PingFangSC-Medium, PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@@ -366,7 +368,7 @@ export default {
|
|||||||
line-height: 44px;
|
line-height: 44px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
.phone{
|
.phone {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
font-family: PingFangSC-Regular, PingFang SC;
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
@@ -379,29 +381,29 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.text{
|
.text {
|
||||||
height: 96px;
|
height: 96px;
|
||||||
line-height: 96px;
|
line-height: 96px;
|
||||||
color: #999;
|
color: #999;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.footer{
|
.footer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
.btn{
|
.btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 112px;
|
height: 112px;
|
||||||
line-height: 112px;
|
line-height: 112px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: #1365DD;
|
background: #1365dd;
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
font-family: PingFangSC-Medium, PingFang SC;
|
font-family: PingFangSC-Medium, PingFang SC;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #FFF;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user