增加 待巡检数量查询

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

@@ -1,7 +1,7 @@
#调用后台地址
# 贝英斯公司
# VITE_APP_BASE_URL = 'http://118.186.13.120:31302'
VITE_APP_BASE_URL = 'http://118.186.13.120:31302'
# VITE_APP_BASE_URL = "http://192.168.236.71:31302"
# VITE_APP_BASE_URL = "http://123.57.20.168:3000"
@@ -12,5 +12,5 @@
# 友晟线上内网
# VITE_APP_BASE_URL = 'https://appi.718yousheng.com/app'
# 友晟线上外网
VITE_APP_BASE_URL = 'https://app.718yousheng.com/app'
# 友晟线上外网
# VITE_APP_BASE_URL = 'https://app.718yousheng.com/app'

View File

@@ -112,7 +112,17 @@ export function minioUpload(data) {
export function minioParam(data) {
return request.post({
url: '/patrol/minio/param',
...data
data
})
}
// 待检查的任务数量
export function querytodaytasknum(data) {
return request.post({
url: '/patrol/patroltask/querytodaytasknum',
data
})
}

View File

@@ -4,7 +4,7 @@ export const AGREEWELCOME_KEY="agreewelcome";
// clientId 默认写2
export const CLIENT_ID="2";
// #区分内外网 //1-内网2-外网
export const NETWORK_ENV=2;
export const NETWORK_ENV=1;
// miniIo 参数对象
export const MINIO_KEY="minioKey"

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) => {

View File

@@ -356,8 +356,8 @@ page {
/* 项目间距 */
margin-left:-10rpx;
margin-right:-10rpx;
position: relative;
}
.white-bg .logo-list .l-l-item {
width: 140rpx;
text-align: center;
@@ -368,6 +368,21 @@ page {
}
.white-bg .logo-list .l-l-item .red-bg{
position: absolute;
top:0rpx;
right: 15rpx;
width:32rpx;
height: 32rpx;
line-height: 32rpx;
background-color: #FF2B44;
text-align: center;
border-radius: 50%;
color:#fff;
font-size:24rpx;
}
.white-bg .logo-list .l-l-item img {
width: 90rpx;
height: 90rpx;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -356,8 +356,8 @@ page {
/* 项目间距 */
margin-left:-10rpx;
margin-right:-10rpx;
position: relative;
}
.white-bg .logo-list .l-l-item {
width: 140rpx;
text-align: center;
@@ -368,6 +368,21 @@ page {
}
.white-bg .logo-list .l-l-item .red-bg{
position: absolute;
top:0rpx;
right: 15rpx;
width:32rpx;
height: 32rpx;
line-height: 32rpx;
background-color: #FF2B44;
text-align: center;
border-radius: 50%;
color:#fff;
font-size:24rpx;
}
.white-bg .logo-list .l-l-item img {
width: 90rpx;
height: 90rpx;