|
|
@@ -4,6 +4,10 @@
|
|
|
</uni-nav-bar>
|
|
|
|
|
|
<view class="top-wrapper">
|
|
|
+ <view class="tab-bar">
|
|
|
+ <view class="tab-item" :class="{ active: activeTab === 'mine' }" @click="switchTab('mine')">我的记录</view>
|
|
|
+ <view class="tab-item" :class="{ active: activeTab === 'all' }" @click="switchTab('all')">全部记录</view>
|
|
|
+ </view>
|
|
|
<uni-section>
|
|
|
<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="keyWord"
|
|
|
placeholder="工单单号,计划单号,记录规则名称">
|
|
|
@@ -11,11 +15,11 @@
|
|
|
</uni-section>
|
|
|
<button class="search_btn" @click="doSearch">搜索</button>
|
|
|
</view>
|
|
|
- <div style="height: 100rpx; width: 475rpx"></div>
|
|
|
+ <div style="height: 180rpx; width: 475rpx"></div>
|
|
|
<view class="wrapper">
|
|
|
<u-list @scrolltolower="scrolltolower" class="listContent">
|
|
|
<view v-for="(item, index) in tableList" :key="index" style="position: relative">
|
|
|
- <myCard :item="item" :index="index + 1" :btnList="btnList" :columns="columns" :title="item.code"
|
|
|
+ <myCard :item="item" :index="index + 1" :btnList="activeTab === 'all' ? [] : btnList" :columns="columns" :title="item.code"
|
|
|
:status="statusMap[item.status]" @goDetail="goDetail(item, 'view')" @openRedeployOther="openRedeployOther(item)"
|
|
|
@edit="goDetail(item, 'edit')">
|
|
|
</myCard>
|
|
|
@@ -164,6 +168,7 @@
|
|
|
isEnd: false,
|
|
|
keyWord: "",
|
|
|
userInfo: {},
|
|
|
+ activeTab: 'mine',
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -192,6 +197,14 @@
|
|
|
openRedeployOther(row){
|
|
|
this.$refs.Assign.open(row)
|
|
|
},
|
|
|
+ switchTab(tab) {
|
|
|
+ if (this.activeTab === tab) return;
|
|
|
+ this.activeTab = tab;
|
|
|
+ this.isEnd = false;
|
|
|
+ this.page = 1;
|
|
|
+ this.tableList = [];
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
successInit() {
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|
|
|
@@ -202,8 +215,10 @@
|
|
|
size: this.tableList.length,
|
|
|
keyword: this.keyWord,
|
|
|
planType: this.planTypeList[this.pageName],
|
|
|
- currentLoginUserId: this.userInfo.userId,
|
|
|
};
|
|
|
+ if (this.activeTab === 'mine') {
|
|
|
+ data.currentLoginUserId = this.userInfo.userId;
|
|
|
+ }
|
|
|
|
|
|
producetaskrulerecordQueryRecordWorkOrderPage(data)
|
|
|
.then((res) => {
|
|
|
@@ -233,8 +248,10 @@
|
|
|
size: this.size,
|
|
|
keyword: this.keyWord,
|
|
|
planType: this.planTypeList[this.pageName],
|
|
|
- currentLoginUserId: this.userInfo.userId,
|
|
|
};
|
|
|
+ if (this.activeTab === 'mine') {
|
|
|
+ data.currentLoginUserId = this.userInfo.userId;
|
|
|
+ }
|
|
|
|
|
|
producetaskrulerecordQueryRecordWorkOrderPage(data)
|
|
|
.then((res) => {
|
|
|
@@ -271,18 +288,46 @@
|
|
|
.top-wrapper {
|
|
|
background-color: #fff;
|
|
|
display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
width: 750rpx;
|
|
|
- height: 88rpx;
|
|
|
padding: 16rpx 32rpx;
|
|
|
align-items: center;
|
|
|
- // gap: 16rpx;
|
|
|
position: absolute;
|
|
|
z-index: 999;
|
|
|
- // top: 44px;
|
|
|
- // // #ifdef APP-PLUS
|
|
|
- // top: 140rpx;
|
|
|
|
|
|
- // // #endif
|
|
|
+ .tab-bar {
|
|
|
+ display: flex;
|
|
|
+ width: 100%;
|
|
|
+ margin-bottom: 16rpx;
|
|
|
+ border-bottom: 2rpx solid #eee;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tab-item {
|
|
|
+ flex: 1;
|
|
|
+ text-align: center;
|
|
|
+ padding: 16rpx 0;
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: #666;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ &.active {
|
|
|
+ color: $theme-color;
|
|
|
+ font-weight: bold;
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ width: 60rpx;
|
|
|
+ height: 4rpx;
|
|
|
+ background: $theme-color;
|
|
|
+ border-radius: 4rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/deep/.uni-section {
|
|
|
margin-top: 0px;
|
|
|
}
|