From 576a99a95971761ba2549c118c74cc27e3e36efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Fri, 21 Jan 2022 09:40:48 +0800 Subject: [PATCH] Update step2.js --- src/pages/plan/add/step2.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/pages/plan/add/step2.js b/src/pages/plan/add/step2.js index 1c558b9d..41095451 100644 --- a/src/pages/plan/add/step2.js +++ b/src/pages/plan/add/step2.js @@ -578,15 +578,23 @@ export default class acclist extends React.Component{ importConfirmClick(){ let temp = this.state.exceldata.filter(o=>o.type == "success"); - console.log("临时",temp) + + console.log("excel数据",this.state.exceldata) + console.log(temp) let mobile_repeat= _.map(temp,(o)=>{ return o.mobile; }) - console.log("重复的手机号",mobile_repeat) + + console.log("手机重复",mobile_repeat) + this.setState({mobile_repeat:mobile_repeat}) let model = this.state.model; - model.quantity = this.state.excel_count - this.state.error_count + this.state.mobile_repeat.length; + console.log("重复号码数量",this.state.mobile_repeat.length) + model.quantity = this.state.excel_count - this.state.error_count + mobile_repeat.length; + + console.log("数量", model.quantity) + this.setState({model:model}) this.setState({accessVerify:false}) this.setState({excel_visible:false}) @@ -639,6 +647,7 @@ export default class acclist extends React.Component{ this.setState({mobile_excel:req.path}) getAccessVerification(data).then((res)=>{ + this.setState({file_loading:false}) handelResponse(res,(req,msg)=>{ console.log("验证",req) @@ -651,11 +660,10 @@ export default class acclist extends React.Component{ { this.setState({exceldata:req.validationFailed}) - this.setState({file_loading:false}) + this.setState({success_visible:true}) } else{ - this.setState({file_loading:false}) this.setState({success_visible:true}) } },(err)=>{