diff --git a/app.json b/app.json
index 56e16ee..1348412 100644
--- a/app.json
+++ b/app.json
@@ -64,7 +64,10 @@
"pages/risk/detail",
"pages/risktask/index",
"pages/risktask/check",
- "pages/risktask/main"
+ "pages/risktask/main",
+ "pages/riskact/index",
+ "pages/riskact/detail",
+ "pages/riskact/check"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/pages/examtest/main.js b/pages/examtest/main.js
index bd3eaf1..7a93cfb 100644
--- a/pages/examtest/main.js
+++ b/pages/examtest/main.js
@@ -76,7 +76,7 @@ Page({
},
success: res => {
if (res.statusCode === 200) {
- wx.hideLoading()
+
console.log(res.data)
let tms = res.data
this.tmdata = tms
@@ -88,6 +88,7 @@ Page({
this.setData({
tmtotal: tms.tms.length,
starttime: util.formatTime(new Date()) })
+ wx.hideLoading()
}
}
diff --git a/pages/images/risk.png b/pages/images/risk.png
new file mode 100644
index 0000000..8896952
Binary files /dev/null and b/pages/images/risk.png differ
diff --git a/pages/main/main.js b/pages/main/main.js
index 54c9967..bf266e3 100644
--- a/pages/main/main.js
+++ b/pages/main/main.js
@@ -12,7 +12,8 @@ Page({
dknum:0,
gcnoread:0,
wsnoread:0,
- jytodonum:0
+ jytodonum:0,
+ tasknum:0,
},
/**
@@ -42,6 +43,7 @@ Page({
this.getgcnoreadnum()
this.getwsnoreadnum()//未遂未读
this.getjytodonum()
+ this.gettasknum()
}else{
getApp().callback = () => {
this.getnoread()
@@ -51,6 +53,7 @@ Page({
this.getdknum()
this.getgcnoreadnum()
this.getjytodonum()
+ this.gettasknum()
};
}
@@ -248,6 +251,26 @@ Page({
}
});
},
+ gettasknum: function () {
+ var that = this
+ //获取待考
+ wx.request({
+ url: getApp().globalData.serverUrl + 'api/risktask?a=todonum',
+ header: {
+ 'content-type': 'application/json', // 默认值
+ 'Cookie': wx.getStorageSync("sessionid"),
+ },
+ data: {},
+ success: res => {
+ if (res.statusCode === 200) {
+ //console.log(res.data)
+ this.setData({
+ tasknum: res.data.todonum,
+ })
+ }
+ }
+ });
+ },
taptest:function(){
if(getApp().globalData.rights != undefined){
if (getApp().globalData.rights.indexOf('25') != -1) {//考试功能
diff --git a/pages/main/main.wxml b/pages/main/main.wxml
index 0090b14..e0ae4bb 100644
--- a/pages/main/main.wxml
+++ b/pages/main/main.wxml
@@ -5,7 +5,7 @@
排查任务
-
+ {{tasknum}}
@@ -32,6 +32,10 @@
作业许可
{{zytodonum}}
+
+
+ 风险管控
+
设备巡检
diff --git a/pages/risk/detail.js b/pages/risk/detail.js
index 25302bb..bb92b73 100644
--- a/pages/risk/detail.js
+++ b/pages/risk/detail.js
@@ -12,6 +12,9 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
+ wx.showLoading({
+ title: '',
+ })
wx.request({
url: getApp().globalData.serverUrl + 'api/risk?a=detail&id=' + options.id,
header: {
@@ -23,6 +26,7 @@ Page({
if (res.statusCode === 200) {
//console.log(res.data)
this.setData(res.data)
+ wx.hideLoading()
}
}
})
diff --git a/pages/risk/detail.wxml b/pages/risk/detail.wxml
index 0b7f595..326c98c 100644
--- a/pages/risk/detail.wxml
+++ b/pages/risk/detail.wxml
@@ -34,9 +34,7 @@
-
- 危害因素
-
+ 危害因素/标准
{{hazard}}
@@ -70,24 +68,29 @@
工程技术措施
- {{measure1}}
+ {{measure1}}
+ 无
管理措施措施
- {{measure2}}
+ {{measure2}}
+ 无
培训教育措施
- {{measure3}}
+ {{measure3}}
+ 无
个体防护措施
- {{measure4}}
+ {{measure4}}
+ 无
应急防护措施
- {{measure5}}
+ {{measure5}}
+ 无
diff --git a/pages/risk/myindex.js b/pages/risk/myindex.js
index 1103b93..c8699aa 100644
--- a/pages/risk/myindex.js
+++ b/pages/risk/myindex.js
@@ -12,8 +12,15 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
+ var url = getApp().globalData.serverUrl + 'api/risk?a=listself'
+ if(options.a=='listall'){
+ url = getApp().globalData.serverUrl + 'api/risk?a=listall&riskact='+options.riskact
+ }
+ wx.showLoading({
+ title: '',
+ })
wx.request({
- url: getApp().globalData.serverUrl + 'api/risk?a=listself',
+ url: url,
header: {
'content-type': 'application/json', //
'Cookie': wx.getStorageSync("sessionid"),
@@ -24,6 +31,7 @@ Page({
this.setData({
fxlist:res.data.rows
})
+ wx.hideLoading()
}
}
})
diff --git a/pages/risk/myindex.json b/pages/risk/myindex.json
index db1e39d..9e26dfe 100644
--- a/pages/risk/myindex.json
+++ b/pages/risk/myindex.json
@@ -1,3 +1 @@
-{
- "navigationBarTitleText": "岗位风险"
-}
\ No newline at end of file
+{}
\ No newline at end of file
diff --git a/pages/riskact/check.js b/pages/riskact/check.js
new file mode 100644
index 0000000..9321355
--- /dev/null
+++ b/pages/riskact/check.js
@@ -0,0 +1,153 @@
+// pages/risktask/check.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ page: 1,
+ riskact: 0,
+ group: 0
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ console.log(options)
+ this.data.riskact = options.riskact
+ this.getlist()
+ },
+ getlist: function () {
+ var page = this.data.page
+ wx.showLoading({
+ title: '加载中',
+ })
+ wx.request({
+ url: getApp().globalData.serverUrl + 'api/risk?a=listall&riskact=' + this.data.riskact,
+ header: {
+ 'content-type': 'application/json', // 默认值
+ 'Cookie': wx.getStorageSync("sessionid"),
+ },
+ success: res => {
+ if (res.statusCode === 200) {
+ wx.hideLoading()
+ console.log(res.data)
+ if (res.data.rows.length == 0) {
+ if (page == 1) {
+ this.setData({
+ total: 0,
+ alllist: []
+ })
+ }
+ else {
+ wx.showModal({
+ content: "已经到底啦!",
+ showCancel: false,
+ confirmText: "确定",
+ })
+ }
+ } else {
+ let list
+ if (page == 1) {
+ list = res.data.rows
+ } else {
+ list = this.data.alllist.concat(res.data.rows)
+ }
+ this.setData({
+ total: res.data.total,
+ alllist: list
+ })
+ }
+ }
+ wx.hideLoading();
+ }
+ });
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+ open: function (e) {
+ console.log(e)
+ wx.navigateTo({
+ url: '/pages/trouble/addtrouble?type=riskcheck&index=' + e.currentTarget.dataset.index,
+ })
+ },
+ submit: function () {
+ console.log(this.data.alllist)
+ let alllist = this.data.alllist
+ let data = {'checks':[]}
+ for (var i = 0; i < alllist.length; i++) {
+ if (i.trouble != undefined){
+ data.checks.push({ 'id': alllist[i].id })
+ }
+ else{
+ data.checks.push({ 'id': alllist[i].id, 'trouble': alllist[i].trouble })
+ }
+ }
+ wx.showLoading({
+ title: '提交中',
+ })
+ wx.request({
+ url: getApp().globalData.serverUrl + 'api/riskcheck?a=add',
+ header: {
+ 'content-type': 'application/json', // 默认值
+ 'Cookie': wx.getStorageSync("sessionid"),
+ },
+ method: 'POST',
+ data: data,
+ success: res => {
+ if (res.statusCode === 200) {
+ wx.navigateBack({
+ })
+ }
+ wx.hideLoading();
+ }
+ });
+ },
+})
\ No newline at end of file
diff --git a/pages/riskact/check.json b/pages/riskact/check.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/riskact/check.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/riskact/check.wxml b/pages/riskact/check.wxml
new file mode 100644
index 0000000..2359d6f
--- /dev/null
+++ b/pages/riskact/check.wxml
@@ -0,0 +1,51 @@
+ 共{{total}}条风险
+
+
+
+
+
+ 低风险
+ 一般风险
+ 较大风险
+ 重大风险
+ {{item.step}}
+
+
+ 标准/危害因素
+ {{item.hazard}}
+
+
+ 工程技术
+ {{item.measure1}}
+ 无
+
+
+ 管理措施
+ {{item.measure2}}
+ 无
+
+
+ 培训教育
+ {{item.measure3}}
+ 无
+
+
+ 个体防护
+ {{item.measure4}}
+ 无
+
+
+ 应急处理
+ {{item.measure5}}
+ 无
+
+
+ {{item.yhnum}}
+
+
+
+
+
+
+
diff --git a/pages/riskact/check.wxss b/pages/riskact/check.wxss
new file mode 100644
index 0000000..ef15154
--- /dev/null
+++ b/pages/riskact/check.wxss
@@ -0,0 +1,14 @@
+.weui-btn{
+ width:auto;
+ margin: 5px;
+}
+.container {
+ background-color: #fff;
+ color: #939393;
+}
+.head{
+ color:#fff;
+ background-color: cornflowerblue;
+ text-align: center;
+}
+
\ No newline at end of file
diff --git a/pages/riskact/detail.js b/pages/riskact/detail.js
new file mode 100644
index 0000000..6c6bc30
--- /dev/null
+++ b/pages/riskact/detail.js
@@ -0,0 +1,101 @@
+// pages/inspect/detail.js
+var util = require('../../utils/util.js')
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ fromWx:false
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ var riskactid
+ if (options.id) {
+ riskactid = options.id
+ } else {
+ let q = decodeURIComponent(options.q)
+ if (q) {
+ // console.log("index 生命周期 onload url=" + q)
+ // console.log("index 生命周期 onload 参数 trainid=" + util.getQueryString(q, 'trainid'))
+ riskactid = util.getQueryString(q, 'id')
+ this.setData({
+ fromWx: true
+ })
+ }
+ }
+ wx.showLoading({
+ title: '',
+ })
+ wx.request({
+ url: getApp().globalData.serverUrl + 'api/riskact?a=detail&id=' + riskactid,
+ header: {
+ 'content-type': 'application/json', //
+ 'Cookie': wx.getStorageSync("sessionid"),
+ },
+ method: 'GET',
+ success: res => {
+ if (res.statusCode === 200) {
+ wx.hideLoading()
+ this.setData(res.data.data)
+ }
+ }
+ })
+ },
+check:function(){
+wx.redirectTo({
+ url: 'check?riskact='+this.data.id,
+})
+},
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/riskact/detail.json b/pages/riskact/detail.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/riskact/detail.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/riskact/detail.wxml b/pages/riskact/detail.wxml
new file mode 100644
index 0000000..adea0e0
--- /dev/null
+++ b/pages/riskact/detail.wxml
@@ -0,0 +1,33 @@
+风险点信息
+
+
+ 名称
+ {{name}}
+
+
+ 类别
+ {{type__dickeyname}}
+
+
+ 所属区域
+ {{area__name}}
+
+
+ 位置
+ {{place}}
+
+
+ 风险数量
+ {{num}}
+
+
+ 风险等级
+ 低风险
+ 一般风险
+ 较大风险
+ 重大风险
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/riskact/detail.wxss b/pages/riskact/detail.wxss
new file mode 100644
index 0000000..3ba03f6
--- /dev/null
+++ b/pages/riskact/detail.wxss
@@ -0,0 +1 @@
+/* pages/riskact/detail.wxss */
\ No newline at end of file
diff --git a/pages/riskact/index.js b/pages/riskact/index.js
new file mode 100644
index 0000000..a5a18e2
--- /dev/null
+++ b/pages/riskact/index.js
@@ -0,0 +1,215 @@
+// pages/miss/miss.js
+var sliderWidth = 96;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ page: 1,
+ serverUrl: getApp().globalData.serverUrl,
+ riskactlist: [],
+ tabs: ["我的记录", "全厂风险"],
+ activeIndex: 0,
+ sliderOffset: 0,
+ sliderLeft: 0
+ },
+ tabClick: function (e) {
+ var that = this
+ that.setData({
+ sliderOffset: e.currentTarget.offsetLeft,
+ activeIndex: e.currentTarget.id
+ });
+ if (that.data.activeIndex == 0) {
+ that.getmyriskchecklist(1)
+ that.data.mypage = 1
+ }
+ else if (that.data.activeIndex == 1) {
+ that.getriskactlist(1)
+ that.data.page = 1
+ }
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ var that = this
+ wx.getSystemInfo({
+ success: function (res) {
+ that.setData({
+ sliderLeft: (res.windowWidth / that.data.tabs.length - sliderWidth) / 2,
+ sliderOffset: res.windowWidth / that.data.tabs.length * that.data.activeIndex
+ });
+ }
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ this.onPullDownRefresh()
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+ var that = this;
+ if (that.data.activeIndex == 0) {
+ that.getmyriskchecklist(1)
+ that.data.mypage = 1
+ } else if (that.data.activeIndex == 1){
+ that.getriskactlist(1);
+ this.data.page = 1;
+ }
+ wx.stopPullDownRefresh();
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ //上拉分页,将页码加1,然后调用分页函数
+ if (that.data.activeIndex == 0) {
+ this.data.mypage = this.data.mypage + 1;
+ this.getmyriskchecklist();
+ } else if (that.data.activeIndex == 1){
+ this.data.page = this.data.page + 1;
+ this.getriskactlist();
+ }
+ wx.stopPullDownRefresh();
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+ scan: function () {
+ wx.scanCode({
+ onlyFromCamera: true,
+ success(res) {
+ console.log(res)
+ let id = res.result.split('=')[1]
+ wx.navigateTo({
+ url: 'detail?id='+id,
+ })
+ }
+ })
+ },
+ getriskactlist: function (page) {
+ var that = this;
+ if (page != 1) { page = that.data.page }
+ wx.showLoading({
+ title: '加载中',
+ }),
+ wx.request({
+ url: this.data.serverUrl + 'api/riskact?a=listall&rows=10&page=' + page,
+ header: {
+ 'content-type': 'application/json', // 默认值
+ 'Cookie': wx.getStorageSync("sessionid"),
+ },
+ success: res => {
+ if (res.statusCode === 200) {
+ if (res.data.rows.length == 0) {
+ if (page == 1) {
+ this.setData({
+ total: 0,
+ riskactlist: []
+ })
+ }
+ else {
+ wx.showModal({
+ content: "已经到底啦!",
+ showCancel: false,
+ confirmText: "确定",
+ })
+ }
+ } else {
+ let list
+ if (page == 1) {
+ list = res.data.rows
+ } else {
+ list = this.data.riskactlist.concat(res.data.rows)
+ }
+ this.setData({
+ total: res.data.total,
+ riskactlist: list
+ })
+ }
+ }
+ wx.hideLoading();
+ }
+ });
+ },
+ getmyriskchecklist: function (page) {
+ var that = this;
+ if (page != 1) { page = that.data.mapage }
+ wx.showLoading({
+ title: '加载中',
+ }),
+ wx.request({
+ url: this.data.serverUrl + 'api/riskcheck?a=listself&rows=10&page=' + page,
+ header: {
+ 'content-type': 'application/json', // 默认值
+ 'Cookie': wx.getStorageSync("sessionid"),
+ },
+ success: res => {
+ if (res.statusCode === 200) {
+ if (res.data.rows.length == 0) {
+ if (page == 1) {
+ this.setData({
+ mytotal: 0,
+ riskchecklist: []
+ })
+ }
+ else {
+ wx.showModal({
+ content: "已经到底啦!",
+ showCancel: false,
+ confirmText: "确定",
+ })
+ }
+ } else {
+ let list
+ if (page == 1) {
+ list = res.data.rows
+ } else {
+ list = this.data.riskchecklist.concat(res.data.rows)
+ }
+ this.setData({
+ mytotal: res.data.total,
+ riskchecklist: list
+ })
+ }
+ }
+ wx.hideLoading();
+ }
+ });
+ },
+})
\ No newline at end of file
diff --git a/pages/riskact/index.json b/pages/riskact/index.json
new file mode 100644
index 0000000..7efa756
--- /dev/null
+++ b/pages/riskact/index.json
@@ -0,0 +1,5 @@
+{
+ "navigationBarTitleText": "风险点",
+ "enablePullDownRefresh": true,
+ "onReachBottomDistance": 50
+}
\ No newline at end of file
diff --git a/pages/riskact/index.wxml b/pages/riskact/index.wxml
new file mode 100644
index 0000000..af5d0c7
--- /dev/null
+++ b/pages/riskact/index.wxml
@@ -0,0 +1,78 @@
+
+
+
+
+ {{item}}
+
+
+
+
+
+
+
+ 共{{mytotal}}条风险排查记录
+
+
+
+
+ {{item.risk__step}}
+
+ 风险点
+ {{item.risk__riskact__name}}
+ 区域
+ {{item.risk__riskact__area__name}}
+
+
+ 排查时间
+ {{item.dotime}}
+
+
+
+ 低风险
+ 一般风险
+ 较大风险
+ 重大风险
+ 隐患
+ 正常
+
+
+
+
+
+
+
+ 共{{total}}条风险点
+
+
+
+
+ {{item.name}}
+
+ 区域
+ {{item.area__name}}
+
+
+ 风险点类别
+ {{item.type__dickeyname}}
+
+
+
+ 低风险
+ 一般风险
+ 较大风险
+ 重大风险
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/riskact/index.wxss b/pages/riskact/index.wxss
new file mode 100644
index 0000000..ef15154
--- /dev/null
+++ b/pages/riskact/index.wxss
@@ -0,0 +1,14 @@
+.weui-btn{
+ width:auto;
+ margin: 5px;
+}
+.container {
+ background-color: #fff;
+ color: #939393;
+}
+.head{
+ color:#fff;
+ background-color: cornflowerblue;
+ text-align: center;
+}
+
\ No newline at end of file
diff --git a/pages/risktask/index.js b/pages/risktask/index.js
index 3d32918..89ad83c 100644
--- a/pages/risktask/index.js
+++ b/pages/risktask/index.js
@@ -190,7 +190,7 @@ Page({
title: '加载中',
}),
wx.request({
- url: this.data.serverUrl + 'api/listtask?a=list2done&rows=10&page=' + page,
+ url: this.data.serverUrl + 'api/risktask?a=list2done&rows=10&page=' + page,
header: {
'content-type': 'application/json', // 默认值
'Cookie': wx.getStorageSync("sessionid"),
diff --git a/pages/risktask/index.wxml b/pages/risktask/index.wxml
index 557b144..7199bc5 100644
--- a/pages/risktask/index.wxml
+++ b/pages/risktask/index.wxml
@@ -9,7 +9,7 @@
- 共{{donetotal}}条已查
+ 共{{donetotal}}条
@@ -20,7 +20,7 @@
排查岗位
- {{item.risk__gkcj}} {{item.risk__group__groupname}}
+ {{item.risk__group__groupname}}
任务生成时间:{{item.taskadd}}
任务过期时间:{{item.taskexpire}}
@@ -31,6 +31,7 @@
较大风险
重大风险
已完成
+ 作废
@@ -48,7 +49,7 @@
排查岗位
- {{item.risk__gkcj}} {{item.risk__group__groupname}}
+ {{item.risk__group__groupname}}
任务生成时间:{{item.taskadd}}
任务过期时间:{{item.taskexpire}}
@@ -59,6 +60,10 @@
较大风险
重大风险
已完成
+
+ 风险数量
+ {{item.num}}
+
@@ -76,7 +81,7 @@
排查岗位
- {{item.risk__gkcj}} {{item.risk__group__groupname}}
+ {{item.risk__group__groupname}}
任务生成时间:{{item.taskadd}}
任务过期时间:{{item.taskexpire}}
@@ -96,6 +101,6 @@
-
+
\ No newline at end of file
diff --git a/pages/trouble/addtrouble.js b/pages/trouble/addtrouble.js
index d3f1b09..2a0627c 100644
--- a/pages/trouble/addtrouble.js
+++ b/pages/trouble/addtrouble.js
@@ -282,6 +282,19 @@ Page({
}
});
}
+ else if (this.data.yhtype == 'riskcheck') {
+ var pages = getCurrentPages();
+ var prevPage = pages[pages.length - 2];
+ var alllist = prevPage.data.alllist
+ alllist[this.data.riskcheckindex].trouble = res.data.trouble
+ alllist[this.data.riskcheckindex].yhnum = res.data.yhnum
+ prevPage.setData(
+ {alllist:alllist}
+ )
+ wx.navigateBack({
+ delta: 1
+ })
+ }
else{
wx.hideLoading();
wx.navigateBack()
@@ -380,6 +393,20 @@ Page({
yhdd: risktaskdata.risk__riskact__place,
riskstep: risktaskdata.risk__step,
})
+ } else if (options.type == 'riskcheck') {
+ var pages = getCurrentPages();
+ var prevPage = pages[pages.length - 2];
+ var riskcheckdata = prevPage.data.alllist[options.index]
+ console.log(riskcheckdata)
+ this.data.riskcheckdata = riskcheckdata
+ this.setData({
+ yhtype: 'riskcheck',
+ yhqy: riskcheckdata.riskact__area__id,
+ yhqy__name: riskcheckdata.riskact__area__name,
+ yhdd: riskcheckdata.riskact__place,
+ riskstep: riskcheckdata.step,
+ riskcheckindex:options.index
+ })
}
},
diff --git a/pages/trouble/addtrouble.wxml b/pages/trouble/addtrouble.wxml
index d7ccedc..abb5a13 100644
--- a/pages/trouble/addtrouble.wxml
+++ b/pages/trouble/addtrouble.wxml
@@ -3,6 +3,7 @@
错误提示
{{equipmentname}} 设备异常
风险 {{riskstep}}
+ 风险 {{riskstep}}
隐患图片
diff --git a/pages/trouble/addtroublezg.js b/pages/trouble/addtroublezg.js
index 2f27091..d430077 100644
--- a/pages/trouble/addtroublezg.js
+++ b/pages/trouble/addtroublezg.js
@@ -233,6 +233,19 @@ Page({
}
});
}
+ else if (this.data.yhtype == 'riskcheck') {
+ var pages = getCurrentPages();
+ var prevPage = pages[pages.length - 3];
+ var alllist = prevPage.data.alllist
+ alllist[this.data.riskcheckindex].trouble = res.data.trouble
+ alllist[this.data.riskcheckindex].yhnum = res.data.yhnum
+ prevPage.setData(
+ { alllist: alllist }
+ )
+ wx.navigateBack({
+ delta: 2
+ })
+ }
else{
wx.hideLoading();
wx.navigateBack({
diff --git a/pages/trouble/addtroublezg.wxml b/pages/trouble/addtroublezg.wxml
index 99a8622..3c025dc 100644
--- a/pages/trouble/addtroublezg.wxml
+++ b/pages/trouble/addtroublezg.wxml
@@ -2,6 +2,7 @@
{{inspectdata.equipment.name}} 设备异常
风险 {{risktaskdata.risk__step}}
+ 风险 {{riskstep}}
评估信息
diff --git a/pages/trouble/addtroublezp.js b/pages/trouble/addtroublezp.js
index 488314b..d8e8312 100644
--- a/pages/trouble/addtroublezp.js
+++ b/pages/trouble/addtroublezp.js
@@ -193,6 +193,19 @@ Page({
}
});
}
+ else if (this.data.yhtype == 'riskcheck') {
+ var pages = getCurrentPages();
+ var prevPage = pages[pages.length - 3];
+ var alllist = prevPage.data.alllist
+ alllist[this.data.riskcheckindex].trouble = res.data.trouble
+ alllist[this.data.riskcheckindex].yhnum = res.data.yhnum
+ prevPage.setData(
+ { alllist: alllist }
+ )
+ wx.navigateBack({
+ delta: 2
+ })
+ }
else{
wx.hideLoading();
wx.navigateBack({
diff --git a/pages/trouble/addtroublezp.wxml b/pages/trouble/addtroublezp.wxml
index c75a0a0..8eacb91 100644
--- a/pages/trouble/addtroublezp.wxml
+++ b/pages/trouble/addtroublezp.wxml
@@ -1,6 +1,8 @@
{{inspectdata.equipment.name}} 设备异常
+ 风险 {{risktaskdata.risk__step}}
+ 风险 {{riskstep}}
风险 {{inspectdata.equipment.name}}
评估信息