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