我的工单任务数量角标显示
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
import request, { get, post, upload } from './request.js'
|
import request, {
|
||||||
|
get,
|
||||||
|
post,
|
||||||
|
upload
|
||||||
|
} from './request.js'
|
||||||
|
|
||||||
// =======账号密码登录========
|
// =======账号密码登录========
|
||||||
export const getLoginPassword = data => {
|
export const getLoginPassword = data => {
|
||||||
@@ -42,6 +46,10 @@ export const getNewNoticeData = () => {
|
|||||||
export const getBannarList = () => {
|
export const getBannarList = () => {
|
||||||
return get('/api/manage/banner/list')
|
return get('/api/manage/banner/list')
|
||||||
}
|
}
|
||||||
|
// 我的工单待办数量
|
||||||
|
export const myOrderCount = () => {
|
||||||
|
return get('/manage/notice/myOrderCount')
|
||||||
|
}
|
||||||
|
|
||||||
// ============通知列表===========
|
// ============通知列表===========
|
||||||
export const getNoticeList = data => {
|
export const getNoticeList = data => {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* @Author: Zy
|
* @Author: Zy
|
||||||
* @Date: 2026-05-15 08:50:47
|
* @Date: 2026-05-15 08:50:47
|
||||||
* @LastEditor: Zy
|
* @LastEditor: Zy
|
||||||
* @LastEditTime: 2026-06-18 09:47:21
|
* @LastEditTime: 2026-07-25 16:36:46
|
||||||
*/
|
*/
|
||||||
import request, {
|
import request, {
|
||||||
filterParams,
|
filterParams,
|
||||||
@@ -53,7 +53,8 @@ export const getComplaniMain = (id) => {
|
|||||||
/**
|
/**
|
||||||
* @description: 处理投诉API
|
* @description: 处理投诉API
|
||||||
* @param {Object} data
|
* @param {Object} data
|
||||||
* @param {string} data.id 处理人员id
|
* @param {string} data.id 投诉id
|
||||||
|
* @param {string} data.handleId 处理人员id
|
||||||
* @param {string} data.handleContent 处理描述
|
* @param {string} data.handleContent 处理描述
|
||||||
*/
|
*/
|
||||||
export const putComplainProcess = (data) => {
|
export const putComplainProcess = (data) => {
|
||||||
|
|||||||
@@ -34,6 +34,10 @@
|
|||||||
<view class="descrtion">
|
<view class="descrtion">
|
||||||
<text>{{ item.problemDes }}</text>
|
<text>{{ item.problemDes }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="detailsMan">
|
||||||
|
<text>处理人:</text>
|
||||||
|
<text>{{ item.handleName ?? '---' }}</text>
|
||||||
|
</view>
|
||||||
<view class="detailsMan">
|
<view class="detailsMan">
|
||||||
<text>投诉人:</text>
|
<text>投诉人:</text>
|
||||||
<text>{{ item.complaintName }}</text>
|
<text>{{ item.complaintName }}</text>
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ function handleSelecthouse() {
|
|||||||
if (checkoutinfo.value.userId) {
|
if (checkoutinfo.value.userId) {
|
||||||
putComplainProcess({
|
putComplainProcess({
|
||||||
id: form.value.complaintId,
|
id: form.value.complaintId,
|
||||||
handleContent: form.value.handleContent
|
handleContent: form.value.handleContent,
|
||||||
|
handleId: checkoutinfo.value.userId
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -105,12 +105,13 @@
|
|||||||
@click="handleFunctionClick(item)"
|
@click="handleFunctionClick(item)"
|
||||||
v-if="permStore.hasPermi(item.permKey)"
|
v-if="permStore.hasPermi(item.permKey)"
|
||||||
>
|
>
|
||||||
<image
|
<image class="item-icon" :src="item.icon" mode="aspectFit"></image>
|
||||||
class="item-icon"
|
|
||||||
:src="item.icon"
|
|
||||||
mode="aspectFit"
|
|
||||||
></image>
|
|
||||||
<text class="item-text">{{ item.text }}</text>
|
<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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
@@ -126,7 +127,8 @@ import {
|
|||||||
getCurrentVillage,
|
getCurrentVillage,
|
||||||
getTodayInspection,
|
getTodayInspection,
|
||||||
getNewNoticeData,
|
getNewNoticeData,
|
||||||
getBannarList
|
getBannarList,
|
||||||
|
myOrderCount
|
||||||
} from '../../api/api.js'
|
} from '../../api/api.js'
|
||||||
|
|
||||||
import { usePermStore } from '@/stores/usePermStore'
|
import { usePermStore } from '@/stores/usePermStore'
|
||||||
@@ -273,7 +275,7 @@ const actionMap = {
|
|||||||
goToRevenueStatistics
|
goToRevenueStatistics
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleFunctionClick = (item) => {
|
const handleFunctionClick = item => {
|
||||||
const handler = actionMap[item.action]
|
const handler = actionMap[item.action]
|
||||||
if (handler) handler()
|
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 => {
|
const slelctHomeData = data => {
|
||||||
currentCommunity.value = data.villageName
|
currentCommunity.value = data.villageName
|
||||||
@@ -359,6 +377,7 @@ onShow(() => {
|
|||||||
getbannarData()
|
getbannarData()
|
||||||
getInspectionData()
|
getInspectionData()
|
||||||
currentVillageData()
|
currentVillageData()
|
||||||
|
getMyOrderNum()
|
||||||
permStore.initPerm()
|
permStore.initPerm()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -376,6 +395,20 @@ onUnload(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<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 {
|
.content-class {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
@@ -620,6 +653,7 @@ onUnload(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 10rpx 0;
|
padding: 10rpx 0;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 功能图标样式 */
|
/* 功能图标样式 */
|
||||||
|
|||||||
Reference in New Issue
Block a user