From 14aa52b7d11239f573813b48132224b8d9126767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Tue, 25 Jan 2022 18:21:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=A1=E5=AE=A1=E6=89=B9=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=9A=84=E4=B8=9A=E5=8A=A1=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/form/main.js | 9 ++------- src/pages/plan/key/edit.js | 24 ++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/components/form/main.js b/src/components/form/main.js index 548af503..95a3e49e 100644 --- a/src/components/form/main.js +++ b/src/components/form/main.js @@ -46,20 +46,15 @@ export default class form extends React.Component { let dom = document.getElementById(prop) let formCompontent = dom.getElementsByClassName("form-compontent") let rules_item = _.get(this.props.rules, prop) - let item = formCompontent[0].firstChild; - - + let item = formCompontent[0].firstChild; if(!rules_item) { return } for (let j = 0; j < rules_item.length; j++) { - if (rules_item[j].type == "required") { - if (e == "") { - self.removeClass(formCompontent[0]) self.isRequired(e, item.className, formCompontent[0], rules_item[j].message); break; @@ -214,7 +209,7 @@ export default class form extends React.Component { } - } + } } } } diff --git a/src/pages/plan/key/edit.js b/src/pages/plan/key/edit.js index 6bd8ce52..455ed743 100644 --- a/src/pages/plan/key/edit.js +++ b/src/pages/plan/key/edit.js @@ -710,7 +710,8 @@ export default class acclist extends React.Component{ let id = sessionStorage.getItem("keybatch_id") let approval_id = sessionStorage.getItem("approval_id") - + if(approval_id > 0) + { getApprovalsStatus(approval_id).then((res)=>{ handelResponse(res,(req,msg)=>{ if(req.status == 0) @@ -748,7 +749,26 @@ export default class acclist extends React.Component{ Notify.error(err) }) }) - + } + else{ + + keyApproval(this.state.plan_id,id,data).then((res)=>{ + handelResponse(res,(req,msg)=>{ + Notify.success("成功发起审批"); + setTimeout(()=>{ + this.props.history.push('/home/key-list/'); + },2000) + + + },(err)=>{ + Notify.error(err); + }) + }) + + + } + + }