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

View File

@ -5,7 +5,6 @@
<view class="left" @click="naviTo()"> <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> <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> <view class="name">{{userInfo.nickname}}</view>
<image src="../../static/img/contract/setting.png"></image>
</view> </view>
<!-- <view class="right" @click="naviTo('/subpkg/topUp/topUp')"> <!-- <view class="right" @click="naviTo('/subpkg/topUp/topUp')">
账户充值 账户充值

View File

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

View File

@ -11,7 +11,7 @@
<view class="basic_name"> <view class="basic_name">
<view class="name">{{userInfo.name}}</view> <view class="name">{{userInfo.name}}</view>
<image class="icon" :src="userInfo.sex==1?'../../static/icons/man.png':'../../static/icons/woman.png'"></image> <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>
<view class="id_card"> <view class="id_card">
身份证号:{{userInfo.id_card}} 身份证号:{{userInfo.id_card}}