更新功能

This commit is contained in:
weipengfei 2023-08-22 09:51:22 +08:00
parent 6812cfa510
commit 10590cb27f
4 changed files with 27 additions and 9 deletions

View File

@ -229,7 +229,10 @@
commonBrigade({ commonBrigade({
brigade: code brigade: code
}).then(res => { }).then(res => {
this.brigadeList = res.data; let f_arr = this.$store.state.app.userInfo.company?.responsible_area?.split(',')||[];
this.brigadeList = res.data.filter(item=>{
return f_arr.find(t=>item.id==t);
});
}) })
}, },
} }

View File

@ -127,7 +127,8 @@
} }
if (this.$props.datas.type == 31) { if (this.$props.datas.type == 31) {
// this.navTo('/subpkg/fileTask/fileTask?id=' + JSON.stringify(this.$props.datas?.extend?.informationg?.arr)) // this.navTo('/subpkg/fileTask/fileTask?id=' + JSON.stringify(this.$props.datas?.extend?.informationg?.arr))
this.navTo(`/subpkg/archives/archives?task_id=${this.$props.datas?.id}`) if(this.$store.state.app.userInfo.admin_id)this.navTo(`/subpkg/captain/captain?task_id=${this.$props.datas?.id}`);
else this.navTo(`/subpkg/archives/archives?task_id=${this.$props.datas?.id}`);
} else this.navTo(''); } else this.navTo('');
} }
} }

View File

@ -25,12 +25,15 @@
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" /> --> :loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" /> -->
<view class="personnel_list"> <view class="personnel_list">
<view class="card" v-for="(item, index) in list" :key="item.id" <view class="card" v-for="(item, index) in list" :key="item.id"
@click="navTo('/subpkg/archives/archives?id='+item.id)"> @click="navTo(`/subpkg/archives/archives?id=${item.id}&task_id=${task_id}`)">
<view class="card_head"> <view class="card_head">
<text style="font-size: 34rpx;">最后更新: {{item.informationg_update_time.split(' ')[0]}}</text> <text style="font-size: 34rpx;">最后更新: {{item.informationg_update_time.split(' ')[0]}}</text>
<text>{{'管理户数: '+item.informationg_count+" 户"}}<u-icon <text v-if="task_id<=0">{{'管理户数: '+item.informationg_count+" "}}<u-icon
style="display: inline-block;margin-left: 10rpx;" color="white" style="display: inline-block;margin-left: 10rpx;" color="white"
name="arrow-right"></u-icon></text> name="arrow-right"></u-icon></text>
<text v-else>{{'更新户数: '+item.informationg_update_count+" "}}<u-icon
style="display: inline-block;margin-left: 10rpx;" color="white"
name="arrow-right"></u-icon></text>
</view> </view>
<view class="card_content"> <view class="card_content">
<view class="left"> <view class="left">
@ -138,9 +141,16 @@
nomoreText: '我也是有底线的~~', nomoreText: '我也是有底线的~~',
status: 'loadmore' status: 'loadmore'
}, },
task_id: -1
} }
}, },
onLoad() { onLoad(options) {
if(options.task_id){
this.task_id = options.task_id;
uni.setNavigationBarTitle({
title:'任务:队长列表'
})
}
this.initLoad() this.initLoad()
}, },
onShow() {}, onShow() {},
@ -164,12 +174,14 @@
async loadList() { async loadList() {
if (this.loadConfig.status == "nomore") return; if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"; this.loadConfig.status = "loading";
let res = await companyUser({ let queryPramas = {
page: this.loadConfig.page, page: this.loadConfig.page,
limit: this.loadConfig.limit, limit: this.loadConfig.limit,
company_id: this.$store.state.app.userInfo.company_id, company_id: this.$store.state.app.userInfo.company_id,
is_captain: 1 is_captain: 1,
}) };
this.task_id>0?queryPramas.task_id=this.task_id:null;
let res = await companyUser(queryPramas)
this.loadConfig.status = "loadmore" this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) { if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore" this.loadConfig.status = "nomore"

View File

@ -299,8 +299,10 @@
// background-color: red; // background-color: red;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 24vw;
line-height: 44px; line-height: 44px;
.name{
margin-left: 20rpx;
}
} }