feat(): 增加巡查巡检
parent
f45a17d3c2
commit
cb88decb64
|
|
@ -29,7 +29,7 @@
|
|||
<div class="navIcon">
|
||||
<image style="width: 100%; height: 100%" :src="item.icon" mode="aspectFit"></image>
|
||||
<div class="readStatus" v-show="
|
||||
(warnStatus && item.key == 2)
|
||||
(warnStatus && item.key == 2) || (xcStatus && item.key == 5)
|
||||
"></div>
|
||||
</div>
|
||||
<div class="navTxt">{{ item.value }}</div>
|
||||
|
|
@ -57,6 +57,8 @@
|
|||
import moment from 'moment'
|
||||
const warnStm = moment().subtract(1, "days").format("YYYY-MM-DD HH:mm:ss")
|
||||
const warnetm = moment().format("YYYY-MM-DD HH:mm:ss")
|
||||
const stm = moment().startOf('year').format("YYYY-MM-DD HH:mm:ss");
|
||||
const etm = moment().format("YYYY-MM-DD HH:mm:ss");
|
||||
import SkInfo from '../skInfo/index.vue'
|
||||
import YlzList from '../ylzList/index.vue'
|
||||
import SwzList from "../sws/index.vue"
|
||||
|
|
@ -73,6 +75,7 @@
|
|||
userList: uni.getStorageSync('value'),
|
||||
default_src: uni.getStorageSync('avatar'),
|
||||
messagelist: [],
|
||||
xcStatus: false,
|
||||
ylzList: [],
|
||||
swzList:[],
|
||||
warnStatus: false, //预警
|
||||
|
|
@ -80,6 +83,7 @@
|
|||
},
|
||||
onPullDownRefresh() {
|
||||
this.getYjData();
|
||||
this.getXcrwData();
|
||||
uni.$showMsg("刷新成功");
|
||||
setTimeout(function () {
|
||||
uni.stopPullDownRefresh();
|
||||
|
|
@ -112,6 +116,12 @@
|
|||
icon: '../../static/tabs/aqjc.png',
|
||||
url: '/pages/aqjc/index'
|
||||
},
|
||||
{
|
||||
value: '巡查任务',
|
||||
key: 5,
|
||||
icon: '../../static/tabs/xcrw.png',
|
||||
url: '/pages/xcrw/index'
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
@ -185,6 +195,28 @@
|
|||
uni.$showMsg();
|
||||
}
|
||||
},
|
||||
// 巡查任务
|
||||
async getXcrwData() {
|
||||
const userId = uni.getStorageSync('value').userId
|
||||
const params = {
|
||||
dateRangeSo: {
|
||||
start: stm,
|
||||
end: etm,
|
||||
},
|
||||
inspectUserId: userId,
|
||||
statusList: [0, 1]
|
||||
}
|
||||
try {
|
||||
const res = await uni.$http.post("/gunshiApp/tsg/inspect/task/list", params)
|
||||
if (res.data.data.length > 0) {
|
||||
this.xcStatus = true
|
||||
}else{
|
||||
this.xcStatus = false
|
||||
}
|
||||
} catch (error) {
|
||||
uni.$showMsg();
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
|
|
@ -194,6 +226,7 @@
|
|||
onShow() {
|
||||
var that = this;
|
||||
that.getList();
|
||||
this.getXcrwData();
|
||||
timer = setInterval(function () {
|
||||
that.getList();
|
||||
}, 10000);
|
||||
|
|
|
|||
Loading…
Reference in New Issue