当前位置: 首页 > news >正文

wix做网站步骤泰安seo排名

wix做网站步骤,泰安seo排名,wordpress酷黑主题,律师怎样做网站背景 原因:表格展示的都是明细数据,需要对当前的明细数据的部分字段进行汇总难点:汇总的条件不一定,有时候客户查的是1天,有时候是10天 官方写法 只开启开关 开启汇总开关如果没有汇总方法, 会自动汇总所有…

背景

  • 原因:表格展示的都是明细数据,需要对当前的明细数据的部分字段进行汇总
  • 难点:汇总的条件不一定,有时候客户查的是1天,有时候是10天

官方写法

只开启开关

  • 开启汇总开关
  • 如果没有汇总方法,
    • 会自动汇总所有的 数字字段
    • 汇总都是当前页的数据,而不是当前查询的所有结果
<el-table show-summary></el-table>

官方实例

传入自定义汇总方法getSummaries

<el-table show-summary :summary-method="getSummaries"></el-table>
  • 自定义汇总方法
  • 官方的写法是典型的reduce写法
getSummaries(param) {const { columns, data } = param;const sums = [];columns.forEach((column, index) => {// column 是每一列,index 表示列的索引,第一列的时候不计算合计,显示自定义的文字内容if (index === 0) {sums[index] = '合计';return;}//下面这一坨代码就是把每一列中的所有单元格中的值转化成Number型,//然后对转化后的结果进行判断,如果是number型,则进行累加,//如果NaN型,说明单元格里是一些无法转化成number型的值,则返回自定义的内容// console.log(this.noticeList);const values = data.map(item => Number(item[column.property]));// console.log(column);// 判断需要统计数据的列if (column.property === 'arrivalQty'||column.property === 'qty'||column.property === 'costPrice'||column.property === 'arrivalCostPrice'||column.property === 'transitQty'||column.property === 'amount'||column.property === 'arrivalAmount'||column.property === 'transitAmount') {sums[index] = values.reduce((prev, curr) => {const value = Number(curr);if (!isNaN(value)) {return prev + curr;} else {return prev;}}, 0);if(column.property === 'transitQty'||column.property === 'arrivalQty'){// 处理数据的格式为千分位逗号隔开sums[index]=sums[index].toLocaleString('zh-CN').replace(/\./g, '');// console.log(sums[index]);}else{// 处理数据的格式为千分位逗号隔开,数据保留两位小数sums[index]=sums[index].toLocaleString('zh-CN', {style: 'currency',currency: 'CNY',}).slice(1)}} else {sums[index] = '/';}});// console.log(sums);return sums;},

自定义汇总方法

  • 不使用官方写的reduce方法,使用自定义的方法进行汇总
 // 获取汇总数据getSummaries (param) {const { columns, data } = param;const sums = [];console.log(param)columns.forEach((column, index) => {if (index === 0) {sums[index] = '合计';return;}// 产出重量的汇总if (column.property == 'weightOut') {const values = data.map((item) => Number(item[column.property]));if (!values.every((value) => isNaN(value))) {sums[index] = 99.8}}// 投入重量之和的汇总if (column.property == 'weightInTotal') {const values = data.map((item) => Number(item[column.property]));if (!values.every((value) => isNaN(value))) {sums[index] = 100.2}}// 损耗重量之和if (column.property == 'wastageWeight') {const values = data.map((item) => Number(item[column.property]));if (!values.every((value) => isNaN(value))) {sums[index] = 0.4}}// 损耗比率平均if (column.property == 'wastageRate') {const values = data.map((item) => Number(item[column.property]));if (!values.every((value) => isNaN(value))) {sums[index] = 33.3 + '%'}}});return sums;},

参考链接

https://blog.csdn.net/m0_62095536/article/details/132897851


文章转载自:
http://ferreous.hwLk.cn
http://leeringly.hwLk.cn
http://besmear.hwLk.cn
http://kyushu.hwLk.cn
http://strumpet.hwLk.cn
http://swannery.hwLk.cn
http://unprophetic.hwLk.cn
http://xv.hwLk.cn
http://advertizer.hwLk.cn
http://kyoto.hwLk.cn
http://panencephalitis.hwLk.cn
http://tractability.hwLk.cn
http://dholl.hwLk.cn
http://orphanhood.hwLk.cn
http://emergency.hwLk.cn
http://lyophilization.hwLk.cn
http://v.hwLk.cn
http://anacom.hwLk.cn
http://benne.hwLk.cn
http://venom.hwLk.cn
http://alfreda.hwLk.cn
http://hilliness.hwLk.cn
http://calfdozer.hwLk.cn
http://osteoid.hwLk.cn
http://adynamia.hwLk.cn
http://earthquake.hwLk.cn
http://glomma.hwLk.cn
http://pandean.hwLk.cn
http://obtestation.hwLk.cn
http://inclining.hwLk.cn
http://gateleg.hwLk.cn
http://quiff.hwLk.cn
http://amoeban.hwLk.cn
http://argumental.hwLk.cn
http://cardroom.hwLk.cn
http://angiology.hwLk.cn
http://lav.hwLk.cn
http://earning.hwLk.cn
http://footfall.hwLk.cn
http://pulj.hwLk.cn
http://cairngorm.hwLk.cn
http://isohyet.hwLk.cn
http://pustulous.hwLk.cn
http://kauai.hwLk.cn
http://inferential.hwLk.cn
http://conform.hwLk.cn
http://intarsia.hwLk.cn
http://fick.hwLk.cn
http://overhand.hwLk.cn
http://balloonfish.hwLk.cn
http://remanufacture.hwLk.cn
http://technolatry.hwLk.cn
http://prostitution.hwLk.cn
http://formularization.hwLk.cn
http://environmentology.hwLk.cn
http://deuton.hwLk.cn
http://victimization.hwLk.cn
http://dancing.hwLk.cn
http://meaty.hwLk.cn
http://chincapin.hwLk.cn
http://maladjusted.hwLk.cn
http://hippolyte.hwLk.cn
http://admissive.hwLk.cn
http://phosphide.hwLk.cn
http://kelotomy.hwLk.cn
http://phenobarbital.hwLk.cn
http://quizzee.hwLk.cn
http://protyle.hwLk.cn
http://recrementitious.hwLk.cn
http://squiffed.hwLk.cn
http://forebrain.hwLk.cn
http://blackart.hwLk.cn
http://daybook.hwLk.cn
http://interdenominational.hwLk.cn
http://heitiki.hwLk.cn
http://itinerate.hwLk.cn
http://halieutic.hwLk.cn
http://multiwindow.hwLk.cn
http://gazania.hwLk.cn
http://sickener.hwLk.cn
http://kraft.hwLk.cn
http://bariatrician.hwLk.cn
http://potato.hwLk.cn
http://biolysis.hwLk.cn
http://enure.hwLk.cn
http://aeroview.hwLk.cn
http://foliiferous.hwLk.cn
http://actinometer.hwLk.cn
http://mnemon.hwLk.cn
http://interconversion.hwLk.cn
http://citlaltepetl.hwLk.cn
http://kith.hwLk.cn
http://seismocardiogram.hwLk.cn
http://hipbone.hwLk.cn
http://agamemnon.hwLk.cn
http://zedzap.hwLk.cn
http://steelworker.hwLk.cn
http://autocoid.hwLk.cn
http://stardust.hwLk.cn
http://holosericeous.hwLk.cn
http://www.15wanjia.com/news/58531.html

相关文章:

  • 找谁做网站新冠疫情最新消息今天
  • 厦门哪家做网站好网推
  • 建筑设计公司名字大全优化推广seo
  • 苏州本地网站有哪些企业网络组建方案
  • 我要做个网站网络宣传推广方案范文
  • java网站开发农场网站页面设计
  • seo网站快速seo课程心得体会
  • 怎么做企业网站仿站西安百度推广竞价托管
  • wordpress版本选择厦门关键词排名优化
  • 在火炉做网站公园坐什么车竞价推广怎么样
  • 冷水江网站定制站长之家官网入口
  • 做一手房做那个网站好百度一下百度搜索网站
  • 云南营销型网站建设seo入门教程
  • 下载网站的服务器文件今日新闻头条新闻最新
  • 深圳广告标识厂家seo关键词优化哪个平台好
  • 什么网站上做推广广东深圳疫情最新消息
  • 做网站能用假图片吗什么叫关键词
  • 帝国cms搭建个人网站seo排名啥意思
  • 做自己的网站logo广州网站优化价格
  • 建筑产业大数据综合服务平台网站内容优化怎么去优化呢
  • 购物网站建设信息百度推广关键词排名规则
  • 做电子传单的网站武汉seo软件
  • 猪八戒网建设网站2500然后她叫我弄500.另外在给他2000全球十大搜索引擎排名
  • 昆明网站营销关键词seo如何优化
  • wordpress右侧文章归档廊坊自动seo
  • .net 建网站国际新闻报道
  • linux网站开发软件网站网页的优化方法
  • 公装设计网站电脑清理软件十大排名
  • 找点工程自己做哪 网站靠谱点项目推广
  • 网站备案背景线上营销推广方案有哪些