This commit is contained in:
xiaofajia 2024-12-18 17:38:11 +08:00
parent aba7153694
commit 78106a56db

View File

@ -13,9 +13,10 @@
<view class="sou" @click="getList()">搜索</view> <view class="sou" @click="getList()">搜索</view>
</view> </view>
<view class="tap"> <view class="tap">
<view class="tap-box" v-for="(item,index) in tapList" :key="index" @click="tapqh(index)"> <view class="tap-box msg-box" v-for="(item,index) in tapList" :key="index" @click="tapqh(index)">
<view class="xhuihui" :class="{'xzhei':tapindex == index}">{{ item.text }}</view> <view class="xhuihui" :class="{'xzhei':tapindex == index}">{{ item.text }}</view>
<view class="gang" v-if="tapindex == index"></view> <view class="gang" v-if="tapindex == index"></view>
<view class="msg-num">{{countMap.get(index+"")}}</view>
</view> </view>
</view> </view>
@ -186,6 +187,7 @@ export default {
}, },
beginButtonShow: [1, 3, 4], beginButtonShow: [1, 3, 4],
cancelButtonShow: [2], cancelButtonShow: [2],
countMap: []
} }
}, },
onLoad() { onLoad() {
@ -219,6 +221,14 @@ export default {
tabBar, tabBar,
}, },
methods: { methods: {
async getCount(){
await request({
url: '/system/info/getCountByType?partnerId=' + this.partnerId,
method: 'get'
}).then(res => {
this.countMap = new Map(Object.entries(res.data))
})
},
confirms(e) { confirms(e) {
this.takingData.workNodeId = e.value[0].value this.takingData.workNodeId = e.value[0].value
this.show = false this.show = false
@ -312,6 +322,8 @@ export default {
let total = res.total let total = res.total
this.totalPages = Math.ceil(total / this.pageSize); this.totalPages = Math.ceil(total / this.pageSize);
} }
await this.getCount()
}, },
getfan() { getfan() {
uni.navigateBack() uni.navigateBack()
@ -462,14 +474,16 @@ export default {
font-family: Source Han Sans CN-Regular, Source Han Sans CN; font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
margin-left: 0.5rem;
} }
.gang { .gang {
width: 24px; width: 32px;
height: 4px; height: 4px;
background: #0D2E8D; background: #0D2E8D;
border-radius: 4px; border-radius: 4px;
margin: 2px auto; margin: 2px auto;
margin-left: 1rem;
} }
.xzhei { .xzhei {
@ -626,4 +640,24 @@ export default {
white-space: pre-line; /* 保留换行符,但允许文本换行 */ white-space: pre-line; /* 保留换行符,但允许文本换行 */
word-break: break-all; /* 长单词或 URL 会在必要时断开 */ word-break: break-all; /* 长单词或 URL 会在必要时断开 */
} }
.msg-box {
position: relative;
margin-right: 40rpx;
.msg-num {
position: absolute;
right: -29rpx;
color: white;
background: #d74a43;
width: 35rpx;
height: 35rpx;
line-height: 35rpx;
text-align: center;
font-weight: 800;
font-size: 11px;
border-radius: 50%;
top: -20rpx;
}
}
</style> </style>