增加巡检页面
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -13,4 +13,4 @@
|
||||
# 友晟线上内网
|
||||
# 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'
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
"version" : "1.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"customPlaygroundType" : "local",
|
||||
"packageName" : "com.ys718.app",
|
||||
"playground" : "custom",
|
||||
"type" : "uni-app:app-android"
|
||||
},
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
</view>
|
||||
|
||||
<!-- 中间标题 -->
|
||||
<view class="navbar-title">{{ title }}</view>
|
||||
<view class="navbar-title">{{ title }}
|
||||
<slot name="title"></slot>
|
||||
</view>
|
||||
|
||||
<!-- 右侧内容 -->
|
||||
<view class="navbar-right" v-if="rightFlag">
|
||||
|
||||
@@ -605,7 +605,30 @@
|
||||
},
|
||||
{
|
||||
"path": "pages/business/EQF/components/gkQualityFeedbackDetailComponent",
|
||||
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/business/polling/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/business/polling/searchList",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/business/polling/issueTracking",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/business/polling/taskList",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ const mescrollInit = (mescroll) => {
|
||||
mescrollRef.value = mescroll;
|
||||
};
|
||||
const downOption = ref({
|
||||
auto: true,
|
||||
auto: false,
|
||||
textInOffset: '下拉刷新',
|
||||
textOutOffset: '释放更新',
|
||||
textLoading: '刷新中...'
|
||||
@@ -151,10 +151,10 @@ const downOption = ref({
|
||||
// 下拉刷新
|
||||
const downCallback = async (mescroll) => {
|
||||
try {
|
||||
getList();
|
||||
// setTimeout(async ()=>{
|
||||
// // mescroll.resetUpScroll();
|
||||
// },500);
|
||||
setTimeout(async ()=>{
|
||||
getList();
|
||||
mescroll.resetUpScroll();
|
||||
},500);
|
||||
} catch (error) {
|
||||
mescroll.endErr();
|
||||
} finally {
|
||||
|
||||
460
src/pages/business/polling/index.vue
Normal file
460
src/pages/business/polling/index.vue
Normal file
@@ -0,0 +1,460 @@
|
||||
<template>
|
||||
<view class="con-body">
|
||||
<view class="con-bg">
|
||||
<!-- 头部 -->
|
||||
<customHeader ref="customHeaderRef" title="巡检任务"
|
||||
:leftFlag="true"
|
||||
:rightFlag="true"
|
||||
>
|
||||
<template #right>
|
||||
<view class="head-right" @click="handleJump">
|
||||
<img :src="'static/images/polling/icon-calendar.png'" class="img-calendar" />日历
|
||||
</view>
|
||||
</template>
|
||||
</customHeader>
|
||||
<!-- 高度来避免头部遮挡 -->
|
||||
<view class="top-height"></view>
|
||||
<view class="week">{{dateStr}}</view>
|
||||
|
||||
<!-- 列表 -->
|
||||
<mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
|
||||
:up="upOption" :down="downOption" :fixed="false" class="scroll-h" :class="{'loading-scroll':cssFlag}">
|
||||
<view class="white-bg">
|
||||
<view class="blue-title">日常巡检</view>
|
||||
<block v-if="list1.length>0">
|
||||
<view class="report-list" v-for="(item, index) in list1" :key="index" @click="handleDetail(item)">
|
||||
<view class="r-list" style="padding-bottom:0">
|
||||
<view class="r-name">{{ item.taskName }}</view>
|
||||
<view class="r-right">
|
||||
<!-- 任务(巡检)状态 1=未发布 2=已发布 3 进行中 4 已完成 5 已过期 -->
|
||||
<!-- 状态为3进行中时 进度>0执行中 进度=0为待执行 -->
|
||||
<block v-if="item.taskStatus==3">
|
||||
<img v-if="item.count==0" :src="'static/images/polling/icon-start.png'" class="img-w" />
|
||||
<img v-else :src="'static/images/polling/icon-pending.png'" class="img-w" />
|
||||
</block>
|
||||
<img v-else-if="item.taskStatus==4" :src="'static/images/polling/icon-complete.png'" class="img-complete" />
|
||||
<img v-else-if="item.taskStatus==5" :src="'static/images/polling/icon-Expired.png'" class="img-w" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">巡检单号<span class="r-gray">{{ item.taskId }}</span></view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view class="r-l-left">开始时间<span class="r-gray">{{ item.planTime }}</span></view>
|
||||
<view class="r-l-right">任务时长<span class="r-gray">{{ item.workHour }}小时</span></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view class="r-l-left">
|
||||
完成进度<span class="r-gray"><span :class="{'r-red':item.count<item.total}">{{item.count}}</span>/{{item.total}}</span>
|
||||
</view>
|
||||
<view class="r-l-right">完成比率<span class="r-blue">{{item.percentage}}</span></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view>任务状态
|
||||
<span class="r-gray" v-if="item.taskStatus==3">
|
||||
<block v-if="item.count==0">待执行</block>
|
||||
<block v-else>执行中</block>
|
||||
</span>
|
||||
<span class="r-gray" v-else>{{formatTaskStatus(item.taskStatus) }}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="report-border" v-if="index<list1.length-1"></view>
|
||||
</view>
|
||||
</block>
|
||||
<view v-else class="no-data">
|
||||
<img :src="'static/images/polling/pic-NoResult.png'" class="no-pic" />
|
||||
</view>
|
||||
<view class="green-title" style="margin-top:80rpx">临时巡检</view>
|
||||
<block v-if="list2.length>0">
|
||||
<view class="report-list" v-for="(item, index) in list2" :key="index" @click="handleDetail(item)">
|
||||
<view class="r-list" style="padding-bottom:0">
|
||||
<view class="r-name">{{ item.taskName }}</view>
|
||||
<view class="r-right">
|
||||
<!-- 任务(巡检)状态 1=未发布 2=已发布 3 进行中 4 已完成 5 已过期 -->
|
||||
<!-- 状态为3进行中时 进度>0执行中 进度=0为待执行 -->
|
||||
<block v-if="item.taskStatus==3">
|
||||
<img v-if="item.count==0" :src="'static/images/polling/icon-start.png'" class="img-w" />
|
||||
<img v-else :src="'static/images/polling/icon-pending.png'" class="img-w" />
|
||||
</block>
|
||||
<img v-else-if="item.taskStatus==4" :src="'static/images/polling/icon-complete.png'" class="img-complete" />
|
||||
<img v-else-if="item.taskStatus==5" :src="'static/images/polling/icon-Expired.png'" class="img-w" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">巡检单号<span class="r-gray">{{ item.taskId }}</span></view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view class="r-l-left">开始时间<span class="r-gray">{{ item.planTime }}</span></view>
|
||||
<view class="r-l-right">任务时长<span class="r-gray">{{ item.workHour }}小时</span></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view class="r-l-left">
|
||||
完成进度<span class="r-gray"><span :class="{'r-red':item.count<item.total}">{{item.count}}</span>/{{item.total}}</span>
|
||||
</view>
|
||||
<view class="r-l-right">完成比率<span class="r-blue">{{item.percentage}}</span></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view>任务状态
|
||||
<span class="r-gray" v-if="item.taskStatus==3">
|
||||
<block v-if="item.count==0">待执行</block>
|
||||
<block v-else>执行中</block>
|
||||
</span>
|
||||
<span class="r-gray" v-else>{{formatTaskStatus(item.taskStatus) }}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="report-border" v-if="index<list2.length-1"></view>
|
||||
</view>
|
||||
</block>
|
||||
<view v-else class="no-data">
|
||||
<img :src="'static/images/polling/pic-NoResult.png'" class="no-pic" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="white-bg white-bg2">
|
||||
<view class="red-title">问题跟踪</view>
|
||||
<block v-if="list3.length>0">
|
||||
<view class="report-list" v-for="(item, index) in list3" :key="index" @click="handleDetail(item)">
|
||||
<view class="r-list" style="padding-bottom:0">
|
||||
<view class="r-name">{{ item.problemDesc }}</view>
|
||||
<view class="r-right">
|
||||
<!-- 问题状态 1=追踪、2=关闭 -->
|
||||
<view v-if="item.problemStatus==1" class="btn-red">进行中</view>
|
||||
<view v-if="item.problemStatus==2" class="btn-green">已解决</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view class="r-l-left">跟踪次数<span class="r-gray">{{ item.count }}</span></view>
|
||||
<view class="r-l-right">最近跟踪时间<span class="r-gray">{{ item.planTime }}</span></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="report-border" v-if="index<list3.length-1"></view>
|
||||
</view>
|
||||
</block>
|
||||
<view v-else class="no-data">
|
||||
<img :src="'static/images/polling/pic-NoResult.png'" class="no-pic" />
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-uni>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref,onMounted } from 'vue'
|
||||
import { onLoad,onHide } from '@dcloudio/uni-app';
|
||||
import customHeader from '@/components/customHeader.vue';
|
||||
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
||||
import { parseTime } from '@/utils/datetime.js';
|
||||
import { formatTaskStatus } from '@/utils/status.js';
|
||||
import { noticeList } from '@/api/notice.js'
|
||||
|
||||
// '2025-12-29 星期五'
|
||||
let dateStr = ref('');
|
||||
|
||||
onLoad(option => {
|
||||
let date = new Date();
|
||||
dateStr.value = parseTime(date,'{y}-{m}-{d} 星期{a}');
|
||||
})
|
||||
|
||||
|
||||
// 查询列表
|
||||
let list1 = ref([]);
|
||||
let list2 = ref([]);
|
||||
let list3 = ref([]);
|
||||
const mescrollRef = ref(null);
|
||||
const upOption = ref({
|
||||
// use: false,
|
||||
page: { num: 0, size: 10 },
|
||||
noMoreSize: 5,
|
||||
empty: {
|
||||
tip: '~ 空空如也 ~',
|
||||
icon: "../../../static/images/mescroll-empty.png"
|
||||
},
|
||||
textLoading: '加载中...',
|
||||
textNoMore: '已经到底了'
|
||||
});
|
||||
|
||||
const downOption = ref({
|
||||
auto: false,
|
||||
textInOffset: '下拉刷新',
|
||||
textOutOffset: '释放更新',
|
||||
textLoading: '刷新中...'
|
||||
});
|
||||
|
||||
let cssFlag=ref(false);//控制样式
|
||||
const mescrollInit = (mescroll) => {
|
||||
cssFlag.value = true;
|
||||
mescrollRef.value = mescroll;
|
||||
};
|
||||
|
||||
// 下拉刷新
|
||||
const downCallback = async (mescroll) => {
|
||||
try {
|
||||
console.log("下拉刷新")
|
||||
const res = await getList(1, upOption.value.page.size);
|
||||
cssFlag.value = false;
|
||||
list1.value = res.list1;
|
||||
list2.value = res.list2;
|
||||
list3.value = res.list3;
|
||||
mescroll.resetUpScroll();
|
||||
} catch (error) {
|
||||
mescroll.endErr();
|
||||
} finally {
|
||||
setTimeout(async ()=>{
|
||||
mescroll.endSuccess();
|
||||
},500);
|
||||
}
|
||||
}
|
||||
// 上拉加载更多
|
||||
const upCallback = async (mescroll) => {
|
||||
try {
|
||||
console.log("上拉加载更多")
|
||||
let res = await getList(mescroll.num, mescroll.size);
|
||||
if (mescroll.num === 1) {
|
||||
list1.value = res.list1;
|
||||
list2.value = res.list2;
|
||||
list3.value = res.list3;
|
||||
} else {
|
||||
// list.value.push(...res.list);
|
||||
}
|
||||
mescroll.endBySize(res.list.length, res.total);
|
||||
} catch (error) {
|
||||
mescroll.endErr();
|
||||
}
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
const getList = (pageIndex, pageSize) => {
|
||||
return new Promise(async (resolve) => {
|
||||
let param = {
|
||||
pageIndex,
|
||||
pageSize,
|
||||
}
|
||||
|
||||
// let res = await noticeList(param);
|
||||
let res = {
|
||||
"code": 200,
|
||||
"msg": "操作成功",
|
||||
"data": {
|
||||
list1:[
|
||||
{
|
||||
taskName:'日常巡检任务AAA日常巡检任务111',
|
||||
taskId:202512297899,
|
||||
taskStatus:3,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:0,
|
||||
total:70,
|
||||
percentage:'30%'
|
||||
},
|
||||
{
|
||||
taskName:'日常巡检任务AAA日常巡检任务222',
|
||||
taskId:202512297899,
|
||||
taskStatus:3,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:20,
|
||||
total:70,
|
||||
percentage:'40%'
|
||||
},
|
||||
{
|
||||
taskName:'日常巡检任务BBB,任务名称过长时可折行 行距35px',
|
||||
taskId:202512297899,
|
||||
taskStatus:4,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:70,
|
||||
total:70,
|
||||
percentage:'100%'
|
||||
},
|
||||
{
|
||||
taskName:'日常巡检任务ccc,任务名称',
|
||||
taskId:202512297899,
|
||||
taskStatus:5,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:70,
|
||||
total:70,
|
||||
percentage:'100%'
|
||||
},
|
||||
],
|
||||
list2:[
|
||||
{
|
||||
taskName:'日常巡检任务AAA日常巡检任务111',
|
||||
taskId:202512297899,
|
||||
taskStatus:3,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:0,
|
||||
total:70,
|
||||
percentage:'30%'
|
||||
},
|
||||
{
|
||||
taskName:'日常巡检任务AAA日常巡检任务222',
|
||||
taskId:202512297899,
|
||||
taskStatus:3,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:20,
|
||||
total:70,
|
||||
percentage:'40%'
|
||||
},
|
||||
{
|
||||
taskName:'日常巡检任务BBB,任务名称过长时可折行 行距35px',
|
||||
taskId:202512297899,
|
||||
taskStatus:4,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:70,
|
||||
total:70,
|
||||
percentage:'100%'
|
||||
},
|
||||
{
|
||||
taskName:'日常巡检任务ccc,任务名称',
|
||||
taskId:202512297899,
|
||||
taskStatus:5,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:70,
|
||||
total:70,
|
||||
percentage:'100%'
|
||||
},
|
||||
],
|
||||
list3:[
|
||||
{
|
||||
problemDesc:'西区地下车库入口防汛物资摆放',
|
||||
problemId:202512297899,
|
||||
problemStatus:1,
|
||||
modifyTime:new Date().getTime(),
|
||||
count:0,
|
||||
},
|
||||
{
|
||||
problemDesc:'监控室消防设备阀门确保正常开启闭合',
|
||||
problemId:202512297899,
|
||||
problemStatus:2,
|
||||
modifyTime:new Date().getTime(),
|
||||
count:20,
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
let data = res.data||{};
|
||||
resolve({
|
||||
...data,
|
||||
// total: res.recordCount || 0
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 查看详情
|
||||
const handleDetail = (item) =>{
|
||||
|
||||
}
|
||||
|
||||
// 跳转webview
|
||||
const handleJump = (item)=>{
|
||||
uni.navigateTo({
|
||||
url:'/pages/business/polling/searchList'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.scroll-h{
|
||||
/* #ifdef APP-PLUS */
|
||||
height: calc(100vh - 108px);
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
height: calc(100vh - 93px);
|
||||
/* #endif */
|
||||
}
|
||||
.head-right{
|
||||
font-size:28rpx;
|
||||
}
|
||||
.img-calendar{
|
||||
width: 30rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
.week{
|
||||
padding:0 40rpx;
|
||||
color: #fff;
|
||||
font-size:32rpx;
|
||||
margin-bottom:20rpx;
|
||||
}
|
||||
|
||||
.white-bg{
|
||||
width: 670rpx;
|
||||
padding: 30rpx 40rpx 40rpx;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px 8px 0 0;
|
||||
}
|
||||
.white-bg2{
|
||||
border-radius: 0;
|
||||
margin-top:20rpx;
|
||||
}
|
||||
.report-list{
|
||||
position: relative;
|
||||
}
|
||||
.img-w{
|
||||
width:50rpx;
|
||||
height:50rpx;
|
||||
}
|
||||
.img-complete{
|
||||
position: absolute;
|
||||
right:-40rpx;
|
||||
top:60rpx;
|
||||
width:133rpx;
|
||||
height:150rpx;
|
||||
}
|
||||
.report-border{
|
||||
border-bottom:1px solid #E7E7E7;
|
||||
width:710rpx;
|
||||
height: 1px;
|
||||
margin:20rpx 0;
|
||||
}
|
||||
.report-list .r-list{
|
||||
padding: 5rpx 0;
|
||||
}
|
||||
.report-list .r-list .r-left{
|
||||
display: flex;
|
||||
}
|
||||
.report-list .r-list .r-gray{
|
||||
margin-left:10rpx;
|
||||
}
|
||||
.report-list .r-list .r-blue{
|
||||
margin-left:10rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.report-list .r-list .r-red{
|
||||
font-weight: bold;
|
||||
}
|
||||
.report-list .r-list .r-name{
|
||||
width:525rpx
|
||||
}
|
||||
.r-left .r-l-left{
|
||||
width:280rpx;
|
||||
}
|
||||
.r-left .r-l-right{
|
||||
|
||||
}
|
||||
.no-data .no-pic{
|
||||
display: block;
|
||||
width:440rpx;
|
||||
height:210rpx;
|
||||
margin:40rpx auto;
|
||||
}
|
||||
</style>
|
||||
13
src/pages/business/polling/issueTracking.vue
Normal file
13
src/pages/business/polling/issueTracking.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
536
src/pages/business/polling/searchList.vue
Normal file
536
src/pages/business/polling/searchList.vue
Normal file
@@ -0,0 +1,536 @@
|
||||
<template>
|
||||
<view class="con-body">
|
||||
<view class="con-bg">
|
||||
<!-- 头部 -->
|
||||
<customHeader ref="customHeaderRef" title="" :leftFlag="true" :rightFlag="true">
|
||||
<template #title>
|
||||
<view class="tab-list">
|
||||
<view class="tab-item" :class="{active:index==activeTab,active1:index==1}"
|
||||
v-for="(item,index) in tabList" :key="index"
|
||||
@click="handleTab(index)"
|
||||
>{{item}}</view>
|
||||
</view>
|
||||
</template>
|
||||
</customHeader>
|
||||
<!-- 高度来避免头部遮挡 -->
|
||||
<view class="top-height"></view>
|
||||
|
||||
<!-- 列表 -->
|
||||
<mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
|
||||
:up="upOption" :down="downOption" :fixed="false" class="scroll-h" :class="{'loading-scroll':cssFlag}">
|
||||
<view class="white-bg">
|
||||
<!-- 日历 -->
|
||||
<view class="calender-con">
|
||||
<uni-calendar class="uni-calendar--hook" :selected="calendarInfo.selected"
|
||||
:showMonth="false" @change="change"
|
||||
@monthSwitch="monthSwitch"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="blue-title">日常巡检</view>
|
||||
<block v-if="list1.length>0">
|
||||
<view class="report-list" v-for="(item, index) in list1" :key="index" @click="handleDetail(item)">
|
||||
<view class="r-list" style="padding-bottom:0">
|
||||
<view class="r-name">{{ item.taskName }}</view>
|
||||
<view class="r-right">
|
||||
<!-- 任务(巡检)状态 1=未发布 2=已发布 3 进行中 4 已完成 5 已过期 -->
|
||||
<!-- 状态为3进行中时 进度>0执行中 进度=0为待执行 -->
|
||||
<block v-if="item.taskStatus==3">
|
||||
<img v-if="item.count==0" :src="'static/images/polling/icon-start.png'" class="img-w" />
|
||||
<img v-else :src="'static/images/polling/icon-pending.png'" class="img-w" />
|
||||
</block>
|
||||
<img v-else-if="item.taskStatus==4" :src="'static/images/polling/icon-complete.png'" class="img-complete" />
|
||||
<img v-else-if="item.taskStatus==5" :src="'static/images/polling/icon-Expired.png'" class="img-w" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">巡检单号<span class="r-gray">{{ item.taskId }}</span></view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view class="r-l-left">开始时间<span class="r-gray">{{ item.planTime }}</span></view>
|
||||
<view class="r-l-right">任务时长<span class="r-gray">{{ item.workHour }}小时</span></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view class="r-l-left">
|
||||
完成进度<span class="r-gray"><span :class="{'r-red':item.count<item.total}">{{item.count}}</span>/{{item.total}}</span>
|
||||
</view>
|
||||
<view class="r-l-right">完成比率<span class="r-blue">{{item.percentage}}</span></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view>任务状态
|
||||
<span class="r-gray" v-if="item.taskStatus==3">
|
||||
<block v-if="item.count==0">待执行</block>
|
||||
<block v-else>执行中</block>
|
||||
</span>
|
||||
<span class="r-gray" v-else>{{formatTaskStatus(item.taskStatus) }}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="report-border" v-if="index<list1.length-1"></view>
|
||||
</view>
|
||||
</block>
|
||||
<view v-else class="no-data">
|
||||
<img :src="'static/images/polling/pic-NoResult.png'" class="no-pic" />
|
||||
</view>
|
||||
<view class="green-title" style="margin-top:80rpx">临时巡检</view>
|
||||
<block v-if="list2.length>0">
|
||||
<view class="report-list" v-for="(item, index) in list2" :key="index" @click="handleDetail(item)">
|
||||
<view class="r-list" style="padding-bottom:0">
|
||||
<view class="r-name">{{ item.taskName }}</view>
|
||||
<view class="r-right">
|
||||
<!-- 任务(巡检)状态 1=未发布 2=已发布 3 进行中 4 已完成 5 已过期 -->
|
||||
<!-- 状态为3进行中时 进度>0执行中 进度=0为待执行 -->
|
||||
<block v-if="item.taskStatus==3">
|
||||
<img v-if="item.count==0" :src="'static/images/polling/icon-start.png'" class="img-w" />
|
||||
<img v-else :src="'static/images/polling/icon-pending.png'" class="img-w" />
|
||||
</block>
|
||||
<img v-else-if="item.taskStatus==4" :src="'static/images/polling/icon-complete.png'" class="img-complete" />
|
||||
<img v-else-if="item.taskStatus==5" :src="'static/images/polling/icon-Expired.png'" class="img-w" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">巡检单号<span class="r-gray">{{ item.taskId }}</span></view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view class="r-l-left">开始时间<span class="r-gray">{{ item.planTime }}</span></view>
|
||||
<view class="r-l-right">任务时长<span class="r-gray">{{ item.workHour }}小时</span></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view class="r-l-left">
|
||||
完成进度<span class="r-gray"><span :class="{'r-red':item.count<item.total}">{{item.count}}</span>/{{item.total}}</span>
|
||||
</view>
|
||||
<view class="r-l-right">完成比率<span class="r-blue">{{item.percentage}}</span></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view>任务状态
|
||||
<span class="r-gray" v-if="item.taskStatus==3">
|
||||
<block v-if="item.count==0">待执行</block>
|
||||
<block v-else>执行中</block>
|
||||
</span>
|
||||
<span class="r-gray" v-else>{{formatTaskStatus(item.taskStatus) }}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="report-border" v-if="index<list2.length-1"></view>
|
||||
</view>
|
||||
</block>
|
||||
<view v-else class="no-data">
|
||||
<img :src="'static/images/polling/pic-NoResult.png'" class="no-pic" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="white-bg white-bg2">
|
||||
<view class="red-title">问题跟踪</view>
|
||||
<block v-if="list3.length>0">
|
||||
<view class="report-list" v-for="(item, index) in list3" :key="index" @click="handleDetail(item)">
|
||||
<view class="r-list" style="padding-bottom:0">
|
||||
<view class="r-name">{{ item.problemDesc }}</view>
|
||||
<view class="r-right">
|
||||
<!-- 问题状态 1=追踪、2=关闭 -->
|
||||
<view v-if="item.problemStatus==1" class="btn-red">进行中</view>
|
||||
<view v-if="item.problemStatus==2" class="btn-green">已解决</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="r-list">
|
||||
<view class="r-left">
|
||||
<view class="r-l-left">跟踪次数<span class="r-gray">{{ item.count }}</span></view>
|
||||
<view class="r-l-right">最近跟踪时间<span class="r-gray">{{ item.planTime }}</span></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="report-border" v-if="index<list3.length-1"></view>
|
||||
</view>
|
||||
</block>
|
||||
<view v-else class="no-data">
|
||||
<img :src="'static/images/polling/pic-NoResult.png'" class="no-pic" />
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-uni>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref,onMounted } from 'vue'
|
||||
import { onLoad,onHide } from '@dcloudio/uni-app';
|
||||
import customHeader from '@/components/customHeader.vue';
|
||||
import MescrollUni from 'mescroll-uni/mescroll-uni.vue';
|
||||
import customTabs from '@/components/customTabs.vue';
|
||||
import { parseTime } from '@/utils/datetime.js';
|
||||
import { formatTaskStatus } from '@/utils/status.js';
|
||||
import { noticeList } from '@/api/notice.js'
|
||||
|
||||
const activeTab = ref(0);//默认按天查看
|
||||
const tabList = ['按天查看', '按月查看'];
|
||||
|
||||
// '2025-12-29 星期五'
|
||||
let dateStr = ref('');
|
||||
|
||||
onLoad(option => {
|
||||
let date = new Date();
|
||||
dateStr.value = parseTime(date,'{y}-{m}-{d} 星期{a}');
|
||||
})
|
||||
|
||||
// tab切换
|
||||
const handleTab = (index)=>{
|
||||
activeTab.value = index
|
||||
}
|
||||
// 日历
|
||||
const calendarInfo = ref({
|
||||
range: true,
|
||||
insert: false,//插入模式,可选值,ture:插入模式;false:弹窗模式;默认为插入模式
|
||||
selected: [],
|
||||
showMonth:true,
|
||||
});
|
||||
const change=(e)=> {
|
||||
console.log('change 返回:', e)
|
||||
// 模拟动态打卡
|
||||
// if (calendarInfo.value.selected.length > 5) return
|
||||
// calendarInfo.value.selected.push({
|
||||
// date: e.fulldate,
|
||||
// info: '打卡'
|
||||
// })
|
||||
}
|
||||
|
||||
const monthSwitch=(e)=>{
|
||||
console.log('monthSwitchs 返回:', e)
|
||||
}
|
||||
|
||||
// 查询列表
|
||||
let list1 = ref([]);
|
||||
let list2 = ref([]);
|
||||
let list3 = ref([]);
|
||||
const mescrollRef = ref(null);
|
||||
const upOption = ref({
|
||||
page: { num: 0, size: 10 },
|
||||
noMoreSize: 5,
|
||||
empty: {
|
||||
tip: '~ 空空如也 ~',
|
||||
icon: "../../../static/images/mescroll-empty.png"
|
||||
},
|
||||
textLoading: '加载中...',
|
||||
textNoMore: '已经到底了'
|
||||
});
|
||||
|
||||
const downOption = ref({
|
||||
auto: false,
|
||||
textInOffset: '下拉刷新',
|
||||
textOutOffset: '释放更新',
|
||||
textLoading: '刷新中...'
|
||||
});
|
||||
|
||||
let cssFlag=ref(false);//控制样式
|
||||
const mescrollInit = (mescroll) => {
|
||||
cssFlag.value = true;
|
||||
mescrollRef.value = mescroll;
|
||||
};
|
||||
|
||||
// 下拉刷新
|
||||
const downCallback = async (mescroll) => {
|
||||
try {
|
||||
console.log("下拉刷新")
|
||||
const res = await getList(1, upOption.value.page.size);
|
||||
cssFlag.value = false;
|
||||
list1.value = res.list1;
|
||||
list2.value = res.list2;
|
||||
list3.value = res.list3;
|
||||
mescroll.resetUpScroll();
|
||||
} catch (error) {
|
||||
mescroll.endErr();
|
||||
} finally {
|
||||
setTimeout(async ()=>{
|
||||
mescroll.endSuccess();
|
||||
},500);
|
||||
}
|
||||
}
|
||||
// 上拉加载更多
|
||||
const upCallback = async (mescroll) => {
|
||||
try {
|
||||
console.log("上拉加载更多")
|
||||
let res = await getList(mescroll.num, mescroll.size);
|
||||
if (mescroll.num === 1) {
|
||||
list1.value = res.list1;
|
||||
list2.value = res.list2;
|
||||
list3.value = res.list3;
|
||||
} else {
|
||||
// list.value.push(...res.list);
|
||||
}
|
||||
mescroll.endBySize(res.list.length, res.total);
|
||||
} catch (error) {
|
||||
mescroll.endErr();
|
||||
}
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
const getList = (pageIndex, pageSize) => {
|
||||
return new Promise(async (resolve) => {
|
||||
let param = {
|
||||
pageIndex,
|
||||
pageSize,
|
||||
}
|
||||
|
||||
// let res = await noticeList(param);
|
||||
let res = {
|
||||
"code": 200,
|
||||
"msg": "操作成功",
|
||||
"data": {
|
||||
list1:[
|
||||
{
|
||||
taskName:'日常巡检任务AAA日常巡检任务111',
|
||||
taskId:202512297899,
|
||||
taskStatus:3,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:0,
|
||||
total:70,
|
||||
percentage:'30%'
|
||||
},
|
||||
{
|
||||
taskName:'日常巡检任务AAA日常巡检任务222',
|
||||
taskId:202512297899,
|
||||
taskStatus:3,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:20,
|
||||
total:70,
|
||||
percentage:'40%'
|
||||
},
|
||||
{
|
||||
taskName:'日常巡检任务BBB,任务名称过长时可折行 行距35px',
|
||||
taskId:202512297899,
|
||||
taskStatus:4,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:70,
|
||||
total:70,
|
||||
percentage:'100%'
|
||||
},
|
||||
{
|
||||
taskName:'日常巡检任务ccc,任务名称',
|
||||
taskId:202512297899,
|
||||
taskStatus:5,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:70,
|
||||
total:70,
|
||||
percentage:'100%'
|
||||
},
|
||||
],
|
||||
list2:[
|
||||
{
|
||||
taskName:'日常巡检任务AAA日常巡检任务111',
|
||||
taskId:202512297899,
|
||||
taskStatus:3,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:0,
|
||||
total:70,
|
||||
percentage:'30%'
|
||||
},
|
||||
{
|
||||
taskName:'日常巡检任务AAA日常巡检任务222',
|
||||
taskId:202512297899,
|
||||
taskStatus:3,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:20,
|
||||
total:70,
|
||||
percentage:'40%'
|
||||
},
|
||||
{
|
||||
taskName:'日常巡检任务BBB,任务名称过长时可折行 行距35px',
|
||||
taskId:202512297899,
|
||||
taskStatus:4,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:70,
|
||||
total:70,
|
||||
percentage:'100%'
|
||||
},
|
||||
{
|
||||
taskName:'日常巡检任务ccc,任务名称',
|
||||
taskId:202512297899,
|
||||
taskStatus:5,
|
||||
planTime:'10:25',
|
||||
workHour:1,
|
||||
count:70,
|
||||
total:70,
|
||||
percentage:'100%'
|
||||
},
|
||||
],
|
||||
list3:[
|
||||
{
|
||||
problemDesc:'西区地下车库入口防汛物资摆放',
|
||||
problemId:202512297899,
|
||||
problemStatus:1,
|
||||
modifyTime:new Date().getTime(),
|
||||
count:0,
|
||||
},
|
||||
{
|
||||
problemDesc:'监控室消防设备阀门确保正常开启闭合',
|
||||
problemId:202512297899,
|
||||
problemStatus:2,
|
||||
modifyTime:new Date().getTime(),
|
||||
count:20,
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
let data = res.data||{};
|
||||
resolve({
|
||||
...data,
|
||||
// total: res.recordCount || 0
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 查看详情
|
||||
const handleDetail = (item) =>{
|
||||
|
||||
}
|
||||
|
||||
// 跳转webview
|
||||
const handleJump = (item)=>{
|
||||
// uni.navigateTo({
|
||||
// // url: '/pages/h5-webview/h5-webview?url=' + item.mobileLink+"&title="+item.subject
|
||||
// // url:'/pages/notice/noticeDetail?title='+item.subject+'&time='+item.createTime+'&appName='+item.appName
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.tab-list{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.tab-list .tab-item{
|
||||
color:rgba(255, 255, 255, 0.5);
|
||||
margin-right:74rpx;
|
||||
font-size:32rpx;
|
||||
padding-bottom:10rpx;
|
||||
}
|
||||
.tab-list .tab-item.active{
|
||||
border-bottom:8rpx solid #fff;
|
||||
color:#fff;
|
||||
position: relative;
|
||||
}
|
||||
.tab-item.active::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -4px;
|
||||
left:-4px;
|
||||
width: 10px;
|
||||
height: 4px;
|
||||
background: #307AF5;
|
||||
transform: skewX(45deg);
|
||||
}
|
||||
.tab-item.active::after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -4px;
|
||||
right:-4px;
|
||||
width: 10px;
|
||||
height: 4px;
|
||||
background: #307AF5;
|
||||
transform: skewX(-45deg);
|
||||
}
|
||||
.tab-item.active1::after{
|
||||
background: #4F8EF7;
|
||||
}
|
||||
/* 日历 */
|
||||
|
||||
|
||||
.scroll-h{
|
||||
/* #ifdef APP-PLUS */
|
||||
height: calc(100vh - 108px);
|
||||
/* #endif */
|
||||
/* #ifndef APP-PLUS */
|
||||
height: calc(100vh - 93px);
|
||||
/* #endif */
|
||||
}
|
||||
.head-right{
|
||||
font-size:28rpx;
|
||||
}
|
||||
.img-calendar{
|
||||
width: 30rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
.week{
|
||||
padding:0 40rpx;
|
||||
color: #fff;
|
||||
font-size:32rpx;
|
||||
margin-bottom:20rpx;
|
||||
}
|
||||
|
||||
.white-bg{
|
||||
width: 670rpx;
|
||||
padding: 30rpx 40rpx 40rpx;
|
||||
margin-bottom: 0;
|
||||
border-radius: 8px 8px 0 0;
|
||||
}
|
||||
.white-bg2{
|
||||
border-radius: 0;
|
||||
margin-top:20rpx;
|
||||
}
|
||||
.report-list{
|
||||
position: relative;
|
||||
}
|
||||
.img-w{
|
||||
width:50rpx;
|
||||
height:50rpx;
|
||||
}
|
||||
.img-complete{
|
||||
position: absolute;
|
||||
right:-40rpx;
|
||||
top:60rpx;
|
||||
width:133rpx;
|
||||
height:150rpx;
|
||||
}
|
||||
.report-border{
|
||||
border-bottom:1px solid #E7E7E7;
|
||||
width:710rpx;
|
||||
height: 1px;
|
||||
margin:20rpx 0;
|
||||
}
|
||||
.report-list .r-list{
|
||||
padding: 5rpx 0;
|
||||
}
|
||||
.report-list .r-list .r-left{
|
||||
display: flex;
|
||||
}
|
||||
.report-list .r-list .r-gray{
|
||||
margin-left:10rpx;
|
||||
}
|
||||
.report-list .r-list .r-blue{
|
||||
margin-left:10rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.report-list .r-list .r-red{
|
||||
font-weight: bold;
|
||||
}
|
||||
.report-list .r-list .r-name{
|
||||
width:525rpx
|
||||
}
|
||||
.r-left .r-l-left{
|
||||
width:280rpx;
|
||||
}
|
||||
.r-left .r-l-right{
|
||||
|
||||
}
|
||||
.no-data .no-pic{
|
||||
display: block;
|
||||
width:440rpx;
|
||||
height:210rpx;
|
||||
margin:40rpx auto;
|
||||
}
|
||||
</style>
|
||||
13
src/pages/business/polling/taskList.vue
Normal file
13
src/pages/business/polling/taskList.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
@@ -266,7 +266,7 @@ const submitForm = () => {
|
||||
//h5测试用 内网-sn123456
|
||||
//公司外网 'f3fca83f-bf56-47f4-a98b-a602ed8bddee' 529a5543-6957-401e-b090-13df6dee5429
|
||||
//友晟外网 'b97527c8-2ad4-493c-a01c-5f9d0aabaff2'
|
||||
param.uniqCode = 'b97527c8-2ad4-493c-a01c-5f9d0aabaff2';
|
||||
param.uniqCode = '4d8489b7-78cd-4db2-9227-d7c2ab2093d8';
|
||||
let res = await login(param);
|
||||
userStore.login(res);
|
||||
uni.switchTab({ url: '/pages/home/home' })
|
||||
|
||||
@@ -288,6 +288,21 @@ page {
|
||||
padding: 30rpx;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.white-bg .blue-title{
|
||||
color:#3384DF;
|
||||
font-size:38rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.white-bg .green-title{
|
||||
color:#12BC36;
|
||||
font-size:38rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.white-bg .red-title{
|
||||
color:#FF687A;
|
||||
font-size:38rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.white-bg .w-b-title {
|
||||
display: flex;
|
||||
@@ -485,6 +500,14 @@ uni-button[type='primary'][plain] {
|
||||
color: #919191;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.report-list .r-list .r-blue{
|
||||
color: #05A3F4;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.report-list .r-list .r-red{
|
||||
color: #FF2B44;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.report-list .r-list .r-right {
|
||||
margin-left: auto;
|
||||
@@ -529,6 +552,24 @@ uni-button[type='primary'][plain] {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.report-list .r-list .btn-green{
|
||||
background-color: #09BC48;
|
||||
color:#fff;
|
||||
text-align: center;
|
||||
padding:5rpx 20rpx;
|
||||
font-size:28rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.report-list .r-list .btn-red{
|
||||
background-color: #FF687A;
|
||||
color:#fff;
|
||||
text-align: center;
|
||||
padding:5rpx 20rpx;
|
||||
font-size:28rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
|
||||
.form-con {
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
@@ -648,3 +689,55 @@ uni-button[type='primary'][plain] {
|
||||
color: #fff !important;
|
||||
font-size:28rpx !important;
|
||||
}
|
||||
|
||||
/* 日历修改 begin */
|
||||
.calender-con{
|
||||
box-shadow: 0px 0px 15px 0px rgba(4, 0, 0, 0.15);
|
||||
padding-bottom:30rpx;
|
||||
}
|
||||
.calender-con .uni-calendar__header-text{
|
||||
color:#333333 !important;
|
||||
font-weight: bold !important;
|
||||
font-size: 34rpx !important;
|
||||
}
|
||||
.calender-con .uni-calendar__weeks-day{
|
||||
border:none !important;
|
||||
}
|
||||
.calender-con .uni-calendar__weeks-day-text{
|
||||
color:#333333 !important;
|
||||
font-weight: bold !important;
|
||||
font-size: 34rpx !important;
|
||||
}
|
||||
.calender-con .uni-calendar__weeks{
|
||||
padding:0 20rpx !important;
|
||||
}
|
||||
|
||||
.calender-con .uni-calendar-item__weeks-box-item{
|
||||
width:auto !important;
|
||||
height:80rpx !important;
|
||||
}
|
||||
.calender-con .uni-calendar-item--isDay{
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.calender-con .uni-calendar-item__weeks-box-text{
|
||||
background-color: #EEEEEE !important;
|
||||
width:60rpx !important;
|
||||
height:60rpx !important;
|
||||
line-height: 55rpx !important;
|
||||
border-radius: 50% !important;
|
||||
text-align: center !important;
|
||||
font-size:34rpx !important;
|
||||
color:#333333 !important;
|
||||
}
|
||||
.calender-con .uni-calendar-item--disable{
|
||||
background-color: transparent !important;
|
||||
color:#E3E3E3 !important;
|
||||
}
|
||||
.calender-con .uni-calendar-item--isDay-text{
|
||||
background-color: #FF9638 !important;
|
||||
color:#fff !important;
|
||||
}
|
||||
.calender-con .uni-calendar-item__weeks-lunar-text.uni-calendar-item--isDay-text span{
|
||||
display: none !important;
|
||||
}
|
||||
/* 日历修改 end */
|
||||
BIN
src/static/images/polling/icon-Expired.png
Normal file
BIN
src/static/images/polling/icon-Expired.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/static/images/polling/icon-calendar.png
Normal file
BIN
src/static/images/polling/icon-calendar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 461 B |
BIN
src/static/images/polling/icon-complete.png
Normal file
BIN
src/static/images/polling/icon-complete.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
BIN
src/static/images/polling/icon-pending.png
Normal file
BIN
src/static/images/polling/icon-pending.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/static/images/polling/icon-start.png
Normal file
BIN
src/static/images/polling/icon-start.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
BIN
src/static/images/polling/pic-NoResult.png
Normal file
BIN
src/static/images/polling/pic-NoResult.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
@@ -18,3 +18,14 @@ export function formatLevel(type){
|
||||
return result[type];
|
||||
}
|
||||
|
||||
// 任务(巡检)状态 1=未发布 2=已发布 3 进行中or执行中 4 已完成 5 已过期
|
||||
export function formatTaskStatus(status){
|
||||
const result = {
|
||||
1:'未发布',
|
||||
2:'已发布',
|
||||
3:'执行中',
|
||||
4:'已完成',
|
||||
5:'已过期',
|
||||
}
|
||||
return result[status];
|
||||
}
|
||||
|
||||
@@ -1,31 +1,9 @@
|
||||
|
||||
// 'use strict';
|
||||
// const uniPush = uniCloud.getPushManager({appId:"__UNI__4C459F4"}) //注意这里需要传入你的应用appId
|
||||
// exports.main = async (event) => {
|
||||
// console.log(event)
|
||||
// if(event.cid){
|
||||
// let obj = JSON.parse(event.body);
|
||||
// console.log(obj)
|
||||
// const res = await uniPush.sendMessage({
|
||||
// "push_clientid": obj.cids, // 设备id,支持多个以数组的形式指定多个设备,如["cid-1","cid-2"],数组长度不大于1000
|
||||
// "title": obj.title, // 标题
|
||||
// "content": obj.content, // 内容
|
||||
// "settings": obj.settings, // 消息有效期
|
||||
// "payload": obj.payload, // 数据
|
||||
// "category": obj.category, // HarmonyOS NEXT系统(纯血鸿蒙、非安卓鸿蒙)的消息分类,要给鸿蒙设备推送时才必传
|
||||
// "force_notification": true, //填写true,客户端就会对在线消息自动创建“通知栏消息”,不填写则需要客户端自己处理。
|
||||
// "request_id": obj.request_id ,//请求唯一标识号,10-32位之间;如果request_id重复,会导致消息丢失
|
||||
// "options":obj.options //消息分类,没申请可以不传这个参数
|
||||
// })
|
||||
// return res;
|
||||
// }
|
||||
// return {}
|
||||
// };
|
||||
|
||||
// 简单的使用示例 appId: "__UNI__4C459F4"
|
||||
// 我的 appId: "__UNI__4C459F4"
|
||||
// 718的 appId: __UNI__0B682E1
|
||||
'use strict';
|
||||
const uniPush = uniCloud.getPushManager({
|
||||
appId: "__UNI__0B682E1"
|
||||
appId: "__UNI__4C459F4"
|
||||
})
|
||||
exports.main = async (event) => {
|
||||
console.log(event)
|
||||
|
||||
Reference in New Issue
Block a user