This commit is contained in:
weipengfei 2023-08-02 09:57:46 +08:00
parent a9e8bc72f1
commit de5afd0f5c
4 changed files with 115 additions and 131 deletions

View File

@ -1,54 +1,42 @@
<template>
<view class="">
<view class="personnel_list">
<view class="personnel_item" v-for="(item, index) in list" :key="item.id">
<view class="item" v-for="(item, index) in list" :key="item.id">
<view class="top">
<view class="left">
<u--image class="u_avatar" :showLoading="true" :src="item.avatar||'../../static/img/public/man.png'"
width="112.28rpx" height="112.28rpx" shape="circle"></u--image>
<!-- <image class="avatar" :src="item.avatar||'../../static/img/public/man.png'"></image> -->
<!-- <u--image class="u_avatar" :showLoading="true" :src="item.avatar||'../../static/img/public/man.png'"
width="112.28rpx" height="112.28rpx" shape="circle">
</u--image> -->
<view class="text">
<view class="name">{{item.name}}</view>
<view class="mobile">
<uni-icons type="phone" color="#999999FF"></uni-icons><text
@click="copyPhone(item.phone)">{{item.phone}}</text>
</view>
<view class="mobile">
<uni-icons type="calendar" color="#999999FF"></uni-icons><text>{{item.create_time}}</text>
</view>
</view>
<view class="right">
<view class="info_top">
<view class="info_name">{{item.name}}</view>
<view class="top">
查看
</view>
<view class="info_bottom">
<view class="item phone">
年龄:
{{item.age}}
</view>
</view>
<view class="info_bottom">
<view class="item phone">
<uni-icons type="phone" color="#999999FF"></uni-icons>
{{item.phone}}
</view>
<view class="bottom" @click="callUp(item.account)">
更新
</view>
</view>
</view>
<view class="location">
<view class="left">
<uni-icons type="location" color="#999999FF"></uni-icons>
<text>居住地址:</text>
</view>
<view>{{item.area_name+item.street_name+item.village_name}}</view>
</view>
<view class="time">
<view class="left">
<uni-icons type="calendar" color="#999999FF"></uni-icons>
<text>更新时间:</text>
</view>
<view>{{item.update_time}}</view>
</view>
<u-line color="#999999FF" v-if="showView"></u-line>
<view v-if="showView" class="bottom" style="margin-top: 28rpx;">
<button class="look" @click="navTo()">更新信息</button>
<button class="look" @click="navTo('/subpkg/archivesDetail/archivesDetail?id='+item.id)">查看</button>
<view class="bottom">
<view class="circle"></view>
<view class="green">所属片区</view>
<view>{{item.area_name+item.street_name}}</view>
</view>
</view>
<u-loadmore :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
<button class="new_btn" v-if="$store.state.app.userInfo.admin_id==0" @click="navTo('/subpkg/newArchives/newArchives')">信息登记</button>
<button class="new_btn" v-if="$store.state.app.userInfo.admin_id==0"
@click="navTo('/subpkg/newArchives/newArchives')">信息登记</button>
<!-- <button class="new_btn" @click="navTo('/subpkg/updateArchives/updateArchives')">信息更新(测试中)</button> -->
</view>
</template>
@ -77,12 +65,15 @@
this.initLoadconfig();
this.loadInformationList();
},
computed:{
computed: {
//
showView(){
return this.$store.state.app.userInfo.admin_id?false:true;
showView() {
return this.$store.state.app.userInfo.admin_id ? false : true;
}
},
onReachBottom() {
this.loadInformationList();
},
methods: {
navTo(url) {
url ?
@ -90,7 +81,7 @@
url: url,
}) : Toast('暂未开放')
},
initLoadconfig(){
initLoadconfig() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
@ -139,112 +130,106 @@
padding: 28rpx 0;
margin-bottom: 100rpx;
.personnel_item {
.item {
margin: 0 auto;
width: 694rpx;
// height: 407rpx;
// height: 201rpx;
background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx;
margin-bottom: 32rpx;
overflow: hidden;
position: relative;
opacity: 1;
margin-bottom: 21rpx;
box-sizing: border-box;
padding: 28rpx;
.top {
// background-color: #3274F9;
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
.avatar {
width: 88rpx;
height: 88rpx;
border-radius: 50%;
margin-right: 18rpx;
}
.u_avatar {
margin-right: 18rpx;
}
.text {
display: flex;
justify-content: space-around;
flex-direction: column;
height: 100%;
.name {
font-size: 32rpx;
font-weight: 500;
color: #333333;
}
.mobile {
color: #999999;
font-size: 28rpx;
}
}
.right {
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-around;
margin-left: 28rpx;
font-size: 25rpx;
font-weight: 400;
overflow: hidden;
color: #999999;
.info_top {
justify-content: center;
.top,
.bottom {
width: 158rpx;
height: 53rpx;
background: #FFFFFF;
border-radius: 26rpx 26rpx 26rpx 26rpx;
opacity: 1;
border: 2rpx solid #3274F9;
color: #3274F9;
display: flex;
align-items: flex-end;
font-size: 25rpx;
font-weight: 400;
color: $theme-oa-color;
margin-bottom: 8rpx;
.info_name {
font-size: 32rpx;
font-weight: 400;
color: #333333;
margin-right: 18rpx;
}
align-items: center;
justify-content: center;
}
.info_bottom {
display: flex;
margin-bottom: 8rpx;
.item {
display: flex;
align-items: center;
}
.phone {
margin-right: 28rpx;
}
.bottom {
border: 2rpx solid #F9AA32;
color: #F9AA32;
margin-top: 18rpx;
}
}
}
.location {
margin-top: 18rpx;
display: flex;
font-size: 25rpx;
font-weight: 400;
overflow: hidden;
color: #999999;
.left {
display: flex;
align-items: center;
}
}
.time {
margin-top: 8rpx;
margin-bottom: 21rpx;
display: flex;
font-size: 25rpx;
font-weight: 400;
overflow: hidden;
color: #999999;
.left {
display: flex;
align-items: center;
}
}
.bottom {
display: flex;
justify-content: right;
.look {
width: 158rpx;
height: 53rpx;
background: #FFFFFF;
border-radius: 26rpx 26rpx 26rpx 26rpx;
justify-content: left;
align-items: center;
margin-top: 20rpx;
.circle {
width: 11rpx;
height: 11rpx;
opacity: 1;
border: 2rpx solid $theme-oa-color;
font-size: 28rpx;
border: 2rpx solid #34A853;
margin-right: 10rpx;
border-radius: 50%;
}
.green {
font-weight: 400;
margin-left: 28rpx;
color: $theme-oa-color;
display: flex;
justify-content: center;
align-items: center;
color: #34A853;
line-height: 0rpx;
margin-right: 18rpx;
-webkit-background-clip: text;
}
}
}
}
</style>

View File

@ -5,7 +5,6 @@
<view class="left" @click="naviTo()">
<u--image :showLoading="true" :src="userInfo.avatar||'../../static/img/public/man.png'" width="44px" height="44px" shape="circle"></u--image>
<view class="name">{{userInfo.nickname}}</view>
<image src="../../static/img/contract/setting.png"></image>
</view>
<!-- <view class="right" @click="naviTo('/subpkg/topUp/topUp')">
账户充值

View File

@ -209,13 +209,13 @@
async addArchives() {
Toast('开发中')
let refsDatas = this.loadRefsDatas();
let flag1 = this.$refs.districtSelectorRef.validate();
let flag2 = this.$refs.residentsRef.validate();
let flag3 = this.$refs.breedingRef.validate();
let flag1 = await this.$refs.districtSelectorRef.validate();
let flag2 = await this.$refs.residentsRef.validate();
let flag3 = await this.$refs.breedingRef.validate();
// return console.log(flag1);
this.$refs.archives.validate().then(async (e) => {
console.log('提交');
if (e && flag1==true && flag2==true && flag3==true) {
if (e==true && flag1==true && flag2==true && flag3==true) {
console.log('提交');
uni.showLoading()
let districtForm = {
area_id: this.$refs.districtSelectorRef.formData.area,

View File

@ -11,7 +11,7 @@
<view class="basic_name">
<view class="name">{{userInfo.name}}</view>
<image class="icon" :src="userInfo.sex==1?'../../static/icons/man.png':'../../static/icons/woman.png'"></image>
<view class="role">{{userInfo.roles[0]}}</view>
<view class="role" v-if="userInfo.roles">{{userInfo.roles[0]}}</view>
</view>
<view class="id_card">
身份证号:{{userInfo.id_card}}