检查功能新
This commit is contained in:
parent
bb12f57e8b
commit
b283b4286d
|
@ -0,0 +1 @@
|
||||||
|
{"containers":[],"config":{}}
|
|
@ -49,7 +49,7 @@ Page({
|
||||||
title: '加载中',
|
title: '加载中',
|
||||||
})
|
})
|
||||||
wx.request({
|
wx.request({
|
||||||
url: getApp().globalData.serverUrl + 'api/risk?a=listall&table_type=2&riskact=' + this.data.riskact,
|
url: getApp().globalData.serverUrl + 'api/risk?a=listall&table_type=2&riskact=' + this.data.riskact + '&riskacttask=' + this.data.riskacttask,
|
||||||
header: {
|
header: {
|
||||||
'content-type': 'application/json', // 默认值
|
'content-type': 'application/json', // 默认值
|
||||||
'Cookie': getApp().globalData.sessionId,
|
'Cookie': getApp().globalData.sessionId,
|
||||||
|
|
|
@ -15,6 +15,7 @@ Page({
|
||||||
wsnoread: 0,
|
wsnoread: 0,
|
||||||
jytodonum: 0,
|
jytodonum: 0,
|
||||||
tasknum: 0,
|
tasknum: 0,
|
||||||
|
tasknum2: 0,
|
||||||
checknum:0,
|
checknum:0,
|
||||||
sbtodonum:0,
|
sbtodonum:0,
|
||||||
yhgznum:0,
|
yhgznum:0,
|
||||||
|
@ -121,6 +122,7 @@ Page({
|
||||||
this.getwsnoreadnum()//未遂未读
|
this.getwsnoreadnum()//未遂未读
|
||||||
this.getjytodonum()
|
this.getjytodonum()
|
||||||
this.gettasknum()
|
this.gettasknum()
|
||||||
|
this.gettasknum2()
|
||||||
this.getchecknum()//检查任务
|
this.getchecknum()//检查任务
|
||||||
this.getsbycnum()
|
this.getsbycnum()
|
||||||
this.getyhgznum()
|
this.getyhgznum()
|
||||||
|
@ -337,6 +339,26 @@ Page({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
gettasknum2: function () {
|
||||||
|
var that = this
|
||||||
|
//获取待考
|
||||||
|
wx.request({
|
||||||
|
url: this.data.serverUrl + 'api/riskacttask?a=todonum2&table_type=2',
|
||||||
|
header: {
|
||||||
|
'content-type': 'application/json', // 默认值
|
||||||
|
'Cookie': getApp().globalData.sessionId,
|
||||||
|
},
|
||||||
|
data: {},
|
||||||
|
success: res => {
|
||||||
|
if (res.statusCode === 200) {
|
||||||
|
//console.log(res.data)
|
||||||
|
this.setData({
|
||||||
|
tasknum2: res.data.todonum,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
getchecknum: function () {
|
getchecknum: function () {
|
||||||
var that = this
|
var that = this
|
||||||
//获取待考
|
//获取待考
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<navigator url="/pages/checkjob/index2" class="weui-grid" hover-class="weui-grid_active">
|
<navigator url="/pages/checkjob/index2" class="weui-grid" hover-class="weui-grid_active">
|
||||||
<image class="weui-grid__icon" src="../images/task.png" />
|
<image class="weui-grid__icon" src="../images/task.png" />
|
||||||
<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="{{checknum2!=0}}">{{checknum}}</view>
|
<view class="weui-badge" style="position: absolute;top: 1em;right: 1em;" wx:if="{{tasknum2!=0}}">{{tasknum2}}</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
|
|
||||||
<navigator url="/pages/trouble/trouble" class="weui-grid" hover-class="weui-grid_active">
|
<navigator url="/pages/trouble/trouble" class="weui-grid" hover-class="weui-grid_active">
|
||||||
|
|
|
@ -289,12 +289,29 @@ Page({
|
||||||
var alllist = prevPage.data.alllist
|
var alllist = prevPage.data.alllist
|
||||||
alllist[this.data.riskcheckindex].trouble = res.data.trouble
|
alllist[this.data.riskcheckindex].trouble = res.data.trouble
|
||||||
alllist[this.data.riskcheckindex].yhnum = res.data.yhnum
|
alllist[this.data.riskcheckindex].yhnum = res.data.yhnum
|
||||||
prevPage.setData(
|
var pdata = {'risk': alllist[this.data.riskcheckindex].id, 'riskacttask': prevPage.data.riskacttask, 'trouble': res.data.trouble}
|
||||||
{alllist:alllist}
|
wx.request({
|
||||||
)
|
url: this.data.serverUrl + 'api/riskcheck2?a=check',
|
||||||
wx.navigateBack({
|
header: {
|
||||||
delta: 1
|
'content-type': 'application/json', //
|
||||||
})
|
'Cookie': getApp().globalData.sessionId,
|
||||||
|
},
|
||||||
|
method: 'POST',
|
||||||
|
data: pdata,
|
||||||
|
success: res => {
|
||||||
|
if (res.statusCode === 200) {
|
||||||
|
wx.hideLoading();
|
||||||
|
prevPage.setData(
|
||||||
|
{alllist:alllist}
|
||||||
|
)
|
||||||
|
wx.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
wx.hideLoading();
|
wx.hideLoading();
|
||||||
|
|
|
@ -239,12 +239,29 @@ Page({
|
||||||
var alllist = prevPage.data.alllist
|
var alllist = prevPage.data.alllist
|
||||||
alllist[this.data.riskcheckindex].trouble = res.data.trouble
|
alllist[this.data.riskcheckindex].trouble = res.data.trouble
|
||||||
alllist[this.data.riskcheckindex].yhnum = res.data.yhnum
|
alllist[this.data.riskcheckindex].yhnum = res.data.yhnum
|
||||||
prevPage.setData(
|
var pdata = {'risk': alllist[this.data.riskcheckindex].id, 'riskacttask': prevPage.data.riskacttask, 'trouble': res.data.trouble}
|
||||||
{ alllist: alllist }
|
wx.request({
|
||||||
)
|
url: this.data.serverUrl + 'api/riskcheck2?a=check',
|
||||||
wx.navigateBack({
|
header: {
|
||||||
delta: 2
|
'content-type': 'application/json', //
|
||||||
})
|
'Cookie': getApp().globalData.sessionId,
|
||||||
|
},
|
||||||
|
method: 'POST',
|
||||||
|
data: pdata,
|
||||||
|
success: res => {
|
||||||
|
if (res.statusCode === 200) {
|
||||||
|
wx.hideLoading();
|
||||||
|
prevPage.setData(
|
||||||
|
{ alllist: alllist }
|
||||||
|
)
|
||||||
|
wx.navigateBack({
|
||||||
|
delta: 2
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
wx.hideLoading();
|
wx.hideLoading();
|
||||||
|
|
|
@ -208,12 +208,29 @@ Page({
|
||||||
var alllist = prevPage.data.alllist
|
var alllist = prevPage.data.alllist
|
||||||
alllist[this.data.riskcheckindex].trouble = res.data.trouble
|
alllist[this.data.riskcheckindex].trouble = res.data.trouble
|
||||||
alllist[this.data.riskcheckindex].yhnum = res.data.yhnum
|
alllist[this.data.riskcheckindex].yhnum = res.data.yhnum
|
||||||
prevPage.setData(
|
var pdata = {'risk': alllist[this.data.riskcheckindex].id, 'riskacttask': prevPage.data.riskacttask, 'trouble': res.data.trouble}
|
||||||
{ alllist: alllist }
|
wx.request({
|
||||||
)
|
url: this.data.serverUrl + 'api/riskcheck2?a=check',
|
||||||
wx.navigateBack({
|
header: {
|
||||||
delta: 2
|
'content-type': 'application/json', //
|
||||||
})
|
'Cookie': getApp().globalData.sessionId,
|
||||||
|
},
|
||||||
|
method: 'POST',
|
||||||
|
data: pdata,
|
||||||
|
success: res => {
|
||||||
|
if (res.statusCode === 200) {
|
||||||
|
wx.hideLoading();
|
||||||
|
prevPage.setData(
|
||||||
|
{ alllist: alllist }
|
||||||
|
)
|
||||||
|
wx.navigateBack({
|
||||||
|
delta: 2
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
wx.hideLoading();
|
wx.hideLoading();
|
||||||
|
|
Loading…
Reference in New Issue