我的工单任务数量角标显示

This commit is contained in:
Zy
2026-07-27 08:09:22 +08:00
parent 3c33d8a116
commit f6fe7f54e9
5 changed files with 59 additions and 11 deletions

View File

@@ -1,4 +1,8 @@
import request, { get, post, upload } from './request.js'
import request, {
get,
post,
upload
} from './request.js'
// =======账号密码登录========
export const getLoginPassword = data => {
@@ -42,6 +46,10 @@ export const getNewNoticeData = () => {
export const getBannarList = () => {
return get('/api/manage/banner/list')
}
// 我的工单待办数量
export const myOrderCount = () => {
return get('/manage/notice/myOrderCount')
}
// ============通知列表===========
export const getNoticeList = data => {

View File

@@ -3,7 +3,7 @@
* @Author: Zy
* @Date: 2026-05-15 08:50:47
* @LastEditor: Zy
* @LastEditTime: 2026-06-18 09:47:21
* @LastEditTime: 2026-07-25 16:36:46
*/
import request, {
filterParams,
@@ -53,7 +53,8 @@ export const getComplaniMain = (id) => {
/**
* @description: 处理投诉API
* @param {Object} data
* @param {string} data.id 处理人员id
* @param {string} data.id 投诉id
* @param {string} data.handleId 处理人员id
* @param {string} data.handleContent 处理描述
*/
export const putComplainProcess = (data) => {

View File

@@ -34,6 +34,10 @@
<view class="descrtion">
<text>{{ item.problemDes }}</text>
</view>
<view class="detailsMan">
<text>处理人:</text>
<text>{{ item.handleName ?? '---' }}</text>
</view>
<view class="detailsMan">
<text>投诉人:</text>
<text>{{ item.complaintName }}</text>

View File

@@ -68,7 +68,8 @@ function handleSelecthouse() {
if (checkoutinfo.value.userId) {
putComplainProcess({
id: form.value.complaintId,
handleContent: form.value.handleContent
handleContent: form.value.handleContent,
handleId: checkoutinfo.value.userId
}).then(() => {
uni.navigateBack()
})

View File

@@ -105,12 +105,13 @@
@click="handleFunctionClick(item)"
v-if="permStore.hasPermi(item.permKey)"
>
<image
class="item-icon"
:src="item.icon"
mode="aspectFit"
></image>
<image class="item-icon" :src="item.icon" mode="aspectFit"></image>
<text class="item-text">{{ item.text }}</text>
<view
v-if="item.permKey === 'butler:workOrder:mine' && MyOrderNum > 0"
class="todoNum"
>{{ MyOrderNum > 99 ? '99' : MyOrderNum }}</view
>
</view>
</template>
</view>
@@ -126,7 +127,8 @@ import {
getCurrentVillage,
getTodayInspection,
getNewNoticeData,
getBannarList
getBannarList,
myOrderCount
} from '../../api/api.js'
import { usePermStore } from '@/stores/usePermStore'
@@ -273,7 +275,7 @@ const actionMap = {
goToRevenueStatistics
}
const handleFunctionClick = (item) => {
const handleFunctionClick = item => {
const handler = actionMap[item.action]
if (handler) handler()
}
@@ -346,6 +348,22 @@ function getbannarData() {
})
}
const MyOrderNum = ref(0)
// 查询我的工单-待办数量
function getMyOrderNum() {
myOrderCount()
.then(res => {
if (res.code === 200 && res.data) {
MyOrderNum.value = res.data
} else {
MyOrderNum.value = 0
}
})
.catch(() => {
MyOrderNum.value = 0
})
}
// 接收选择小区返回的参数
const slelctHomeData = data => {
currentCommunity.value = data.villageName
@@ -359,6 +377,7 @@ onShow(() => {
getbannarData()
getInspectionData()
currentVillageData()
getMyOrderNum()
permStore.initPerm()
})
@@ -376,6 +395,20 @@ onUnload(() => {
</script>
<style lang="scss" scoped>
.todoNum {
position: absolute;
top: 0rpx;
right: 17%;
min-width: 30rpx;
height: 30rpx;
background: #f53f3f;
color: #fff;
text-align: center;
font-size: 10rpx;
line-height: 30rpx;
border-radius: 50%;
padding: 3rpx;
}
.content-class {
background-color: #f9f9f9;
min-height: 100vh;
@@ -620,6 +653,7 @@ onUnload(() => {
align-items: center;
justify-content: center;
padding: 10rpx 0;
position: relative;
}
/* 功能图标样式 */