增加单位管理的接口
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<view class="audits-container">
|
||||
<!-- 员工审核列表 -->
|
||||
<scroll-view
|
||||
class="list-container"
|
||||
class="employeeList-container"
|
||||
scroll-y
|
||||
:refresher-enabled="true"
|
||||
refresher-background="#f7f7f7"
|
||||
@@ -13,14 +13,14 @@
|
||||
scroll-with-animation>
|
||||
|
||||
<!-- 员工审核卡片 -->
|
||||
<view v-for="(item, index) in list" :key="index" class="employee-card" @click="handleCardClick(item)">
|
||||
<view v-for="(item, index) in employeeList" :key="index" class="employee-card" @click="handleCardClick(item)">
|
||||
<!-- 左侧头像 -->
|
||||
<image class="avatar" :src="item.avatar || '/static/ic_avg.png'"/>
|
||||
|
||||
<!-- 右侧信息 -->
|
||||
<view class="info-container">
|
||||
<view class="name-row">
|
||||
<text class="name">{{ item.name }}</text>
|
||||
<text class="name">{{ item.userName }}</text>
|
||||
<image
|
||||
class="gender-icon"
|
||||
:src="item.gender === '1' ? '/static/ic_man.png' : '/static/ic_women.png'"
|
||||
@@ -52,8 +52,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{name: "于永乐", gender: "1", phone: "12448155", applyTime: "2025-09-01 10:51:32", status: "1"}
|
||||
employeeList: [
|
||||
], // 员工列表数据
|
||||
pageNum: 1, // 当前页码
|
||||
pageSize: 10, // 每页数量
|
||||
@@ -84,11 +83,11 @@ export default {
|
||||
async loadData() {
|
||||
this.loading = true;
|
||||
try {
|
||||
let res = await this.$u.api.getEmployeeAuditList({
|
||||
let res = await this.$u.api.unit.queryEmployee({
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize
|
||||
pageSize: this.pageSize,
|
||||
isAudit:2
|
||||
});
|
||||
|
||||
if (res.code == "200") {
|
||||
let rows = res.rows || [];
|
||||
if (rows.length < this.pageSize) {
|
||||
@@ -96,9 +95,9 @@ export default {
|
||||
}
|
||||
|
||||
if (this.pageNum === 1) {
|
||||
this.list = rows;
|
||||
this.employeeList = rows;
|
||||
} else {
|
||||
this.list = [...this.list, ...rows];
|
||||
this.employeeList = [...this.employeeList, ...rows];
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -109,9 +108,10 @@ export default {
|
||||
},
|
||||
// 点击卡片事件
|
||||
handleCardClick(item) {
|
||||
if (item.status === '1') {
|
||||
console.log(item.id);
|
||||
if (item.state === 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/sys/workbench/unitManagement/auditsDetail`
|
||||
url: `/pages/sys/workbench/unitManagement/auditsDetail?id=${item.id}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ export default {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.list-container {
|
||||
.employeeList-container {
|
||||
flex: 1;
|
||||
padding: 28rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
@@ -219,17 +219,17 @@ export default {
|
||||
}
|
||||
|
||||
/* 隐藏滚动条 */
|
||||
.list-container {
|
||||
.employeeList-container {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
}
|
||||
|
||||
.list-container::-webkit-scrollbar {
|
||||
.employeeList-container::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:deep .list-container ::-webkit-scrollbar {
|
||||
:deep .employeeList-container ::-webkit-scrollbar {
|
||||
display: none !important;
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
|
Reference in New Issue
Block a user