From 850431360645f9c0bf726880512d2fbc3bd123ec Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Fri, 26 Nov 2021 20:22:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=A5=E9=94=80=E7=B3=BB=E7=BB=9F=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/plan/list/list.js | 48 +++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/src/pages/plan/list/list.js b/src/pages/plan/list/list.js index 34e9edd9..b0deff0f 100644 --- a/src/pages/plan/list/list.js +++ b/src/pages/plan/list/list.js @@ -1,7 +1,7 @@ import ReactDOM from 'react-dom'; import React, { Component } from 'react'; import { HashRouter as Router, Route, Link } from "react-router-dom"; -import { Button } from 'zent'; +import { Button,Alert } from 'zent'; import "./list.less" import {Input,openDialog,closeDialog,RadioGroup,Radio ,Notify,Switch ,Swiper,Dropdown,DropdownPosition,DropdownClickTrigger,Icon,MenuItem,DropdownContent,Menu,Sweetalert } from 'zent'; import "../../../assets/comm.css" @@ -34,7 +34,15 @@ export default class acclist extends React.Component{ phone_list:[], email_list:[], cur_item:null, + selectiondata:[], plan_id:0, + grantTotal:0, + receiveTotal:0, + usageTotal:0, + silentTotal:0, + receive_total:0, + usage_total:0, + silent_total:0 } } @@ -385,6 +393,31 @@ export default class acclist extends React.Component{ }); } } + //清空 + clearFn(){ + this.setState({'selectiondata':[]}) + } + //选中表格的选框 + selection(selection){ + this.setState({selectiondata:selection}); + let grantTotal=0; + let receiveTotal=0; + let usageTotal=0; + let silentTotal=0; + let receive_total=0; + let usage_total=0; + let silent_total=0; + selection.forEach(item=>{ + grantTotal+=Number(item.grant); + receiveTotal+=Number(item.receive); + usageTotal+=Number(item.usage); + silentTotal+=Number(item.silent); + receive_total+=Number(item.receive_total); + usage_total+=Number(item.usage_total); + silent_total+=Number(item.silent_total); + }); + this.setState({grantTotal,receiveTotal,usageTotal,silentTotal,receive_total,usage_total,silent_total}); + } onFilter(e){ console.log(e) this.setState({page:1}) @@ -540,6 +573,15 @@ export default class acclist extends React.Component{