From 7298d5354963a88643a543b51b90192dc9fc934c Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 11 九月 2025 18:43:14 +0800
Subject: [PATCH] 最新版本541200007
---
h5/pages/staff/task/index.vue | 107 +++++++++++++++++++++++++++++++++++++----------------
1 files changed, 75 insertions(+), 32 deletions(-)
diff --git a/h5/pages/staff/task/index.vue b/h5/pages/staff/task/index.vue
index 31d5d3c..b3556c2 100644
--- a/h5/pages/staff/task/index.vue
+++ b/h5/pages/staff/task/index.vue
@@ -8,6 +8,7 @@
v-model="search.title"
@blur="querylist"
type="text"
+ confirm-type="search"
placeholder="鎼滅储浠诲姟鍚嶇О"
/>
</view>
@@ -70,10 +71,10 @@
>
<view class="box_list_item_head">
<view class="df_ac">
- <text v-if="item.readed == 0" class="readed"></text>
+ <text v-if="item.readed == 0 && search.queryType === 3" class="readed"></text>
<text class="tt">{{ item.title }}</text>
</view>
- <view class="info loading">{{ item.info }}</view>
+ <view class="info" :class="{ loading: search.queryType === 0 }">{{ item.info }}</view>
</view>
<view class="box_list_item_nr">
<view v-if="item.param1.arriveDate" class="box_list_item_nr_item">
@@ -132,7 +133,7 @@
<view class="box_list_item_nr_x"></view>
<view class="box_list_item_nr_text">
<text class="time">{{ item.createDate }}鎻愪氦</text>
- <text v-if="item.param2 == '0'" class="btn">鍘诲鐞�</text>
+ <text v-if="search.queryType === 0" class="btn">鍘诲鐞�</text>
</view>
</view>
</view>
@@ -206,6 +207,7 @@
:show="tiemShow"
v-model="startDate"
mode="date"
+ :formatter="formatter"
@confirm="confirmLeft"
@cancel="tiemShow = false"
></u-datetime-picker>
@@ -216,6 +218,7 @@
"
v-model="startDate"
mode="date"
+ :formatter="formatter"
@confirm="confirmRight"
@cancel="tiemShow1 = false"
></u-datetime-picker>
@@ -242,12 +245,14 @@
},
headData: {},
dataList: [],
+ total: 0,
cateList: [
{ name: '璁垮鐢宠', id: 0 },
{ name: '璁垮鎶ュ', id: 1 },
{ name: '鐢ㄨ溅鐢宠', id: 2 },
{ name: '闅愭偅闅忔墜鎷�', id: 3 },
- { name: '鐗╂祦杞︾敵璇�', id: 4 },
+ { name: '鐗╂祦杞︾敵璇�', id: 6 },
+ { name: '鑰冨嫟浠e姙', id: 7 },
],
startDate: dayjs().format('YYYY-MM-DD'),
}
@@ -258,9 +263,12 @@
// this.getList()
// },
onReachBottom() {
- // this.pagination.page = 0
- // this.dataList = []
- this.getList()
+ const { total, dataList} = this
+ if(dataList.length < total){
+ this.getList()
+ } else {
+ this.showToast('鏆傛棤鏇村鏁版嵁')
+ }
},
onBackPress(options) {
setTimeout(()=>{
@@ -271,10 +279,27 @@
onShow() {
this.pagination.page = 0
this.dataList = []
- this.getHeadList()
- this.getList()
+ this.getHeadList()
},
methods: {
+ formatter(type, value) {
+ if (type === 'year') {
+ return `${value}骞碻
+ }
+ if (type === 'month') {
+ return `${value}鏈坄
+ }
+ if (type === 'day') {
+ return `${value}鏃
+ }
+ if (type === 'hour') {
+ return `${value}鏃禶
+ }
+ if (type === 'minute') {
+ return `${value}鍒哷
+ }
+ return value
+ },
statusClick(val) {
this.pagination.page = 0
this.dataList = []
@@ -289,6 +314,9 @@
},
modalReset() {
this.modelParam = {}
+ this.search = {
+ queryType: 0
+ }
this.pagination.page = 0
this.dataList = []
this.showFilter = false
@@ -315,12 +343,16 @@
...search
}
}).then(res => {
+ if(res.data && res.data.records){
+ res.data.records.forEach(i => {
+ if (i.param1) {
+ i.param1 = JSON.parse(i.param1)
+ }
+ })
+ }
this.dataList = [...this.dataList, ...res.data.records]
- this.dataList.forEach(i => {
- if (i.param1) {
- i.param1 = JSON.parse(i.param1)
- }
- })
+ this.total = res.data.total
+
})
},
getHeadList() {
@@ -328,6 +360,7 @@
isDetail: '1'
}).then(res => {
this.headData = res.data
+ this.getList()
})
},
handleReady() {
@@ -338,8 +371,8 @@
})
},
handleAppr(item) {
- const { objType, objId } = item
- if (this.search.queryType === 3) {
+ const { objType, objId, info, readed } = item
+ if (readed === 0) {
signReadTask({
noticesId: item.id,
signType: 0
@@ -347,25 +380,32 @@
this.getHeadList()
})
}
+ if (item.type == 7) {
+ if(item.remark){
+ window.open(item.remark);
+ // window.open('https://atwl.ahzyssl.com/dps/web/wxAuth/loginV2?oaId=atwl&redirectId=index')
+ return
+ }
+ }
if (objType === 2) {
uni.navigateTo({
- url: `/pages/staff/vehicle/sendACarDetail?id=${objId}&appr=1`
+ url: `/pages/staff/vehicle/sendACarDetail?id=${objId}&info=${info}`
})
} else if (objType === 1) {
uni.navigateTo({
- url: `/pages/staff/task/visitorReport?id=${objId}&objType=${objType}`
+ url: `/pages/staff/task/visitorReport?id=${objId}&objType=${objType}&info=${info}`
})
} else if (objType === 3) {
uni.navigateTo({
- url: `/pages/staff/task/vDangetAppr?id=${objId}&objType=${objType}`
+ url: `/pages/staff/task/vDangetAppr?id=${objId}&objType=${objType}&info=${info}`
})
- } else if (objType === 6 || objType === 5) {
+ }else if (objType === 6 || objType === 5) {
uni.navigateTo({
- url: `/pages/staff/task/driver?id=${objId}&objType=${objType}`
+ url: `/pages/staff/task/driver?id=${objId}&objType=${objType}&info=${info}`
})
}else {
uni.navigateTo({
- url: `/pages/staff/task/visitorApprove?id=${objId}&objType=${objType}`
+ url: `/pages/staff/task/visitorApprove?id=${objId}&objType=${objType}&info=${info}`
})
}
},
@@ -461,7 +501,7 @@
justify-content: space-between;
align-items: center;
.active {
- border: 1rpx solid #4c99a8 !important;
+ border: 2rpx solid #4c99a8 !important;
color: #4c99a8 !important;
}
.box_head_item {
@@ -471,7 +511,7 @@
line-height: 60rpx;
box-sizing: border-box;
border-radius: 30rpx;
- border: 1rpx solid #999999;
+ border: 2rpx solid #999999;
font-size: 26rpx;
font-weight: 400;
color: #333333;
@@ -520,13 +560,21 @@
align-items: center;
justify-content: space-between;
.readed {
- width: 12rpx;
- height: 12rpx;
+ width: 16rpx;
+ height: 16rpx;
border-radius: 50%;
background-color: #e0312a;
+ margin-right: 16rpx;
}
+ .info {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #999999;
+ width: 120rpx;
+ text-align: right;
+ }
.loading {
- color: #4c99a8;
+ color: $uni-color-primary;
}
.success {
color: #03c68f;
@@ -538,11 +586,6 @@
font-size: 32rpx;
font-weight: 600;
color: #222222;
- }
- .info {
- font-size: 26rpx;
- font-weight: 400;
- width: 110rpx;
}
}
.box_list_item_nr {
--
Gitblit v1.9.3