风险排查任务增加备注

This commit is contained in:
caoqianming 2020-10-23 15:15:24 +08:00
parent 2f2c1a0398
commit 310a90ff3a
6 changed files with 125 additions and 62 deletions

4
app.js
View File

@ -97,8 +97,8 @@ App({
perms:[], perms:[],
openid:null openid:null
}, },
serverUrl: 'https://safeyun.ctcshe.com/', //serverUrl: 'https://safeyun.ctcshe.com/',
//serverUrl: 'http://127.0.0.1:8000/', serverUrl: 'http://127.0.0.1:8002/',
//serverUrl: 'http://10.21.28.148:8000/', //serverUrl: 'http://10.21.28.148:8000/',
//serverUrl: 'http://192.168.0.103:8000/', //serverUrl: 'http://192.168.0.103:8000/',
//serverUrl:'http://10.0.11.195:8000/', //serverUrl:'http://10.0.11.195:8000/',

View File

@ -11,6 +11,9 @@ Page({
group: 0 group: 0
}, },
bindnoteInput: function (e) {
this.data.checknote = e.detail.value
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
@ -18,10 +21,28 @@ Page({
console.log(options) console.log(options)
this.data.riskact = options.riskact this.data.riskact = options.riskact
if(options.riskacttask){ if(options.riskacttask){
this.riskacttask = options.riskacttask this.data.riskacttask = options.riskacttask
this.getTaskDetail()
} }
this.getlist() this.getlist()
}, },
getTaskDetail:function() {
wx.request({
url: getApp().globalData.serverUrl + 'api/riskacttask?a=detail&id=' + this.data.riskacttask,
header: {
'content-type': 'application/json', // 默认值
'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
this.setData({
tasknote: res.data.data.tasknote,
})
}
}
});
},
getlist: function () { getlist: function () {
var page = this.data.page var page = this.data.page
wx.showLoading({ wx.showLoading({
@ -101,7 +122,6 @@ Page({
}) })
}, },
submit: function () { submit: function () {
console.log(this.data.alllist)
let alllist = this.data.alllist let alllist = this.data.alllist
let data = {'checks':[],'riskact':this.data.riskact, 'riskacttask':this.data.riskacttask} let data = {'checks':[],'riskact':this.data.riskact, 'riskacttask':this.data.riskacttask}
for (var i = 0; i < alllist.length; i++) { for (var i = 0; i < alllist.length; i++) {
@ -115,6 +135,9 @@ Page({
wx.showLoading({ wx.showLoading({
title: '提交中', title: '提交中',
}) })
if(this.data.checknote){
data.note = this.data.checknote //检查备注
}
wx.request({ wx.request({
url: getApp().globalData.serverUrl + 'api/riskcheck2?a=add', url: getApp().globalData.serverUrl + 'api/riskcheck2?a=add',
header: { header: {

View File

@ -1,4 +1,11 @@
<view class="head">共{{total}}条风险</view> <view class="head">共{{total}}条风险</view>
<view class="weui-cells weui-cells_after-title" wx:if="{{tasknote}}">
<view class="weui-cell">
<view class="weui-cell__bd">
检查说明:{{tasknote}}
</view>
</view>
</view>
<view class="weui-cells weui-cells_after-title"> <view class="weui-cells weui-cells_after-title">
<block wx:for="{{alllist}}" wx:key="unique"> <block wx:for="{{alllist}}" wx:key="unique">
<view class="weui-media-box weui-media-box_appmsg"> <view class="weui-media-box weui-media-box_appmsg">
@ -45,7 +52,15 @@
</view> </view>
</block> </block>
</view> </view>
<view class="btn-area"> <view class="weui-cells__title">检查备注</view>
<view class="weui-cells weui-cells_after-title">
<view class="weui-cell">
<view class="weui-cell__bd">
<textarea class="weui-textarea" placeholder="请输入检查备注" style="height: 4.6em" bindinput="bindnoteInput" maxlength="-1" />
</view>
</view>
</view>
<view class="btn-area" style="margin-top:6px">
<button class="weui-btn" type="primary" bindtap="submit" <button class="weui-btn" type="primary" bindtap="submit"
disabled="{{alllist[0].user__userid!=null}}">排查完毕,提交!</button> disabled="{{alllist[0].user__userid!=null}}">排查完毕,提交!</button>
</view> </view>

View File

@ -14,8 +14,26 @@ Page({
onLoad: function (options) { onLoad: function (options) {
console.log(options) console.log(options)
this.data.id = options.id this.data.id = options.id
this.getTaskDetail()
this.getlist() this.getlist()
}, },
getTaskDetail:function() {
wx.request({
url: getApp().globalData.serverUrl + 'api/riskacttask?a=detail&id=' + this.data.id,
header: {
'content-type': 'application/json', // 默认值
'Cookie': getApp().globalData.sessionId,
},
success: res => {
if (res.statusCode === 200) {
this.setData({
detaildata:res.data.data
})
}
}
});
},
getlist: function () { getlist: function () {
var page = this.data.page var page = this.data.page
wx.showLoading({ wx.showLoading({

View File

@ -1,4 +1,11 @@
<view class="head">共排查{{total}}条风险</view> <view class="head">共排查{{total}}条风险</view>
<view class="weui-cells weui-cells_after-title" wx:if="{{detaildata.note}}">
<view class="weui-cell">
<view class="weui-cell__bd">
检查描述:{{detaildata.note}}
</view>
</view>
</view>
<view class="weui-cells weui-cells_after-title"> <view class="weui-cells weui-cells_after-title">
<block wx:for="{{alllist}}" wx:key="unique"> <block wx:for="{{alllist}}" wx:key="unique">
<view class="weui-media-box weui-media-box_appmsg" > <view class="weui-media-box weui-media-box_appmsg" >

View File

@ -1,59 +1,59 @@
{ {
"description": "项目配置文件。", "description": "项目配置文件。",
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
"es6": true, "es6": true,
"enhance": false, "enhance": false,
"postcss": true, "postcss": true,
"preloadBackgroundData": false, "preloadBackgroundData": false,
"minified": true, "minified": true,
"newFeature": true, "newFeature": true,
"coverView": true, "coverView": true,
"nodeModules": true, "nodeModules": true,
"autoAudits": false, "autoAudits": false,
"showShadowRootInWxmlPanel": true, "showShadowRootInWxmlPanel": true,
"scopeDataCheck": false, "scopeDataCheck": false,
"uglifyFileName": false, "uglifyFileName": false,
"checkInvalidKey": true, "checkInvalidKey": true,
"checkSiteMap": true, "checkSiteMap": true,
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false, "babelSetting": {
"useMultiFrameRuntime": false, "ignore": [],
"useApiHook": false, "disablePlugins": [],
"babelSetting": { "outputPath": ""
"ignore": [], },
"disablePlugins": [], "useCompilerModule": true,
"outputPath": "" "userConfirmedUseCompilerModuleSwitch": false,
}, "compileHotReLoad": false,
"useIsolateContext": true, "useMultiFrameRuntime": false,
"useCompilerModule": true, "useApiHook": false,
"userConfirmedUseCompilerModuleSwitch": false, "useIsolateContext": true,
"packNpmManually": false, "packNpmManually": false,
"packNpmRelationList": [] "packNpmRelationList": []
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.9.4", "libVersion": "2.9.4",
"appid": "wx5c39b569f01c27db", "appid": "wx5c39b569f01c27db",
"projectname": "aqyj", "projectname": "aqyj",
"isGameTourist": false, "isGameTourist": false,
"simulatorType": "wechat", "simulatorType": "wechat",
"simulatorPluginLibVersion": {}, "simulatorPluginLibVersion": {},
"condition": { "condition": {
"search": { "search": {
"current": -1, "current": -1,
"list": [] "list": []
}, },
"conversation": { "conversation": {
"current": -1, "current": -1,
"list": [] "list": []
}, },
"game": { "game": {
"currentL": -1, "currentL": -1,
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": -1, "current": -1,
"list": [] "list": []
} }
} }
} }