风险排查任务增加备注

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:[],
openid:null
},
serverUrl: 'https://safeyun.ctcshe.com/',
//serverUrl: 'http://127.0.0.1:8000/',
//serverUrl: 'https://safeyun.ctcshe.com/',
serverUrl: 'http://127.0.0.1:8002/',
//serverUrl: 'http://10.21.28.148:8000/',
//serverUrl: 'http://192.168.0.103:8000/',
//serverUrl:'http://10.0.11.195:8000/',

View File

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

View File

@ -1,4 +1,11 @@
<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">
<block wx:for="{{alllist}}" wx:key="unique">
<view class="weui-media-box weui-media-box_appmsg">
@ -45,7 +52,15 @@
</view>
</block>
</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"
disabled="{{alllist[0].user__userid!=null}}">排查完毕,提交!</button>
</view>

View File

@ -14,8 +14,26 @@ Page({
onLoad: function (options) {
console.log(options)
this.data.id = options.id
this.getTaskDetail()
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 () {
var page = this.data.page
wx.showLoading({

View File

@ -1,4 +1,11 @@
<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">
<block wx:for="{{alllist}}" wx:key="unique">
<view class="weui-media-box weui-media-box_appmsg" >

View File

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