增加 待巡检数量查询
This commit is contained in:
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user