隐患跟踪页面初步
This commit is contained in:
parent
fceae51ecb
commit
e1f68a7a14
3
app.json
3
app.json
|
@ -85,7 +85,8 @@
|
||||||
"pages/inspect/detail2",
|
"pages/inspect/detail2",
|
||||||
"pages/inspect/handle",
|
"pages/inspect/handle",
|
||||||
"pages/train/access",
|
"pages/train/access",
|
||||||
"pages/dickey/treeselect"
|
"pages/dickey/treeselect",
|
||||||
|
"pages/troublefollow/index"
|
||||||
],
|
],
|
||||||
"window": {
|
"window": {
|
||||||
"backgroundTextStyle": "light",
|
"backgroundTextStyle": "light",
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -16,6 +16,7 @@ Page({
|
||||||
tasknum: 0,
|
tasknum: 0,
|
||||||
checknum:0,
|
checknum:0,
|
||||||
sbtodonum:0,
|
sbtodonum:0,
|
||||||
|
yhgznum:0,
|
||||||
serverUrl: getApp().globalData.serverUrl,
|
serverUrl: getApp().globalData.serverUrl,
|
||||||
isGjjt:false,
|
isGjjt:false,
|
||||||
// Banner数据
|
// Banner数据
|
||||||
|
@ -125,6 +126,7 @@ Page({
|
||||||
this.gettasknum()
|
this.gettasknum()
|
||||||
this.getchecknum()//检查任务
|
this.getchecknum()//检查任务
|
||||||
this.getsbycnum()
|
this.getsbycnum()
|
||||||
|
this.getyhgznum()
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面隐藏
|
* 生命周期函数--监听页面隐藏
|
||||||
|
@ -378,6 +380,25 @@ Page({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getyhgznum: function () {
|
||||||
|
var that = this
|
||||||
|
//获取待办异常
|
||||||
|
wx.request({
|
||||||
|
url: this.data.serverUrl + 'api/troublefollowtask?a=mytodonum',
|
||||||
|
header: {
|
||||||
|
'content-type': 'application/json', // 默认值
|
||||||
|
'Cookie': getApp().globalData.sessionId,
|
||||||
|
},
|
||||||
|
data: {},
|
||||||
|
success: res => {
|
||||||
|
if (res.statusCode === 200) {
|
||||||
|
this.setData({
|
||||||
|
yhgznum: res.data.mytodonum,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
taptest: function () {
|
taptest: function () {
|
||||||
if (getApp().globalData.userInfo.perms != undefined) {
|
if (getApp().globalData.userInfo.perms != undefined) {
|
||||||
if (getApp().globalData.userInfo.perms.indexOf(25) != -1) {//考试功能
|
if (getApp().globalData.userInfo.perms.indexOf(25) != -1) {//考试功能
|
||||||
|
|
|
@ -30,6 +30,13 @@
|
||||||
<view class="weui-grid__label">事故隐患</view>
|
<view class="weui-grid__label">事故隐患</view>
|
||||||
<view class="weui-badge" style="position: absolute;top: 1em;right: 1em;" wx:if="{{yhtodonum!=0}}">{{yhtodonum}}</view>
|
<view class="weui-badge" style="position: absolute;top: 1em;right: 1em;" wx:if="{{yhtodonum!=0}}">{{yhtodonum}}</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
|
|
||||||
|
<navigator url="/pages/troublefollow/index" class="weui-grid" hover-class="weui-grid_active">
|
||||||
|
<image class="weui-grid__icon" src="../images/troublefollow.png" />
|
||||||
|
<view class="weui-grid__label">隐患跟踪</view>
|
||||||
|
<view class="weui-badge" style="position: absolute;top: 1em;right: 1em;" wx:if="{{yhgznum!=0}}">{{yhgznum}}</view>
|
||||||
|
</navigator>
|
||||||
|
|
||||||
<navigator url="/pages/observe/observe" class="weui-grid" hover-class="weui-grid_active">
|
<navigator url="/pages/observe/observe" class="weui-grid" hover-class="weui-grid_active">
|
||||||
<image class="weui-grid__icon" src="../images/watch.png" />
|
<image class="weui-grid__icon" src="../images/watch.png" />
|
||||||
<view class="weui-grid__label">行为观察</view>
|
<view class="weui-grid__label">行为观察</view>
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
// pages/troublefollow/index.js
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad: function (options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage: function () {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"usingComponents": {}
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
<!--pages/troublefollow/index.wxml-->
|
||||||
|
<text>pages/troublefollow/index.wxml</text>
|
|
@ -0,0 +1 @@
|
||||||
|
/* pages/troublefollow/index.wxss */
|
Loading…
Reference in New Issue