增加 待巡检数量查询

This commit is contained in:
xuli
2025-12-02 17:26:04 +08:00
parent d8d5ac02c9
commit e83c2bb29a
10 changed files with 81 additions and 20 deletions

View File

@@ -47,11 +47,12 @@
</view>
<block v-if="!item.expandFlag">
<view class="logo-list" v-if="item.children&&item.children.length>0">
<block v-for="(item2,index2) in item.children">
<view class="l-l-item"
@click="handleJump(item2.bizUrl)">
<block v-for="(item2,index2) in item.children" :key="index2">
<view class="l-l-item" @click="handleJump(item2.bizUrl)">
<img :src="'static/images/business/'+item2.icon+'.png'" />
<text class="font-gray">{{ item2.bizName }}</text>
<!--后台创建业务的时候 bizCode 必须固定为 'jrxj' -->
<view class="red-bg" v-if="item2.bizCode=='jrxj'">{{todayCount}}</view>
</view>
</block>
</view>
@@ -75,12 +76,14 @@ import { getNavBarPaddingTop} from '@/utils/system.js'
import { businessList } from '@/api/business.js';
import {showLoading,hideLoading} from '@/utils/message.js'
import { initTree } from '@/utils/common.js';
import {querytodaytasknum} from '@/api/polling.js'
onLoad(async(opt) => {
// uni.setStorageSync('page_cache',true);
try {
showLoading("加载中...")
getList();
getTaskCount();
hideLoading();
} catch (error) {
hideLoading();
@@ -93,6 +96,13 @@ onMounted(() => {
navBarPaddingTop.value = getNavBarPaddingTop()*2;
})
// 查询待巡检的任务数量
let todayCount =ref(0);
const getTaskCount= async()=>{
let res = await querytodaytasknum({});
todayCount.value = res || 0;
}
// 搜索处理
let searchShow = ref(false);
let searchText = ref(undefined);
@@ -176,7 +186,7 @@ let handleJump=(url)=>{
<style scope>
.scroll-h{
/* #ifdef APP-PLUS */
height: calc(100vh - 130px) !important;
height: calc(100vh - 123px) !important;
/* #endif */
/* #ifndef APP-PLUS */
height: calc(100vh - 140px) !important;

View File

@@ -108,8 +108,10 @@
<view class="w-b-title">常用服务</view>
<view class="logo-list">
<view v-for="(item,index) in commonServiceList" class="l-l-item" :key="index" @click="handleJump(item.bizUrl)">
<img :src="'static/images/business/'+item.icon+'.png'" />
<text class="font-gray">{{ item.bizName }}</text>
<img :src="'static/images/business/'+item.icon+'.png'" />
<text class="font-gray">{{ item.bizName }}</text>
<!--后台创建业务的时候 bizCode 必须固定为 'jrxj' -->
<view class="red-bg" v-if="item.bizCode=='jrxj'">{{todayCount}}</view>
</view>
<!-- <view class="l-l-item" @click="handleAddCommonSercice">
<img :src="'static/images/business/icon-add.png'">
@@ -153,6 +155,7 @@ import { messageNotifyCount,messageFlowCount,getUserFavorite} from '@/api/home.j
import { getWeekStr,formatTimestamp } from '@/utils/datetime.js'
import { formatMoney } from '@/utils/formatter.js'
import {showLoading,hideLoading} from '@/utils/message.js'
import {querytodaytasknum} from '@/api/polling.js'
// #ifdef APP-PLUS
// 获取 存储手机的module
@@ -199,12 +202,20 @@ const initLoad =()=>{
getSalesTask();
getCommonServices();
getNewsList();
getTaskCount();
hideLoading();
} catch (error) {
hideLoading();
}
}
// 查询待巡检的任务数量
let todayCount =ref(0);
const getTaskCount= async()=>{
let res = await querytodaytasknum({});
todayCount.value = res || 0;
}
// 下拉刷新
const mescrollRef = ref(null);
const mescrollInit = (mescroll) => {