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

简洁大方网站模板网络营销工资一般多少

简洁大方网站模板,网络营销工资一般多少,怎么做营销网站推广,少儿教育网站建设价格Background 主从表结构,有时为了方便数据呈现,在UI上不显示从表资料,那么需要动态把从表的资料加载到主表的固定栏位上。 例如:主表是人员信息,从表是银行卡信息,一个人在同一家银行可能有多张银行卡&…

Background

主从表结构,有时为了方便数据呈现,在UI上不显示从表资料,那么需要动态把从表的资料加载到主表的固定栏位上。

例如:主表是人员信息,从表是银行卡信息,一个人在同一家银行可能有多张银行卡,且一个人可能在多家银行开户。

How to implement? 

1. Provided data list of person and bank account informaciton

a. Person information

personData: any[] = [{key: '1',name: 'John Brown',age: 32,address: 'New York No. 1 Lake Park'},{key: '2',name: 'Jim Green',age: 42,address: 'London No. 1 Lake Park'},{key: '3',name: 'Joe Black',age: 32,address: 'Sidney No. 1 Lake Park'}];

b. Bank list

  banks = [{ code: 'icbc', name: '工行' },{ code: 'abc', name: '农行' },{ code: 'ccb', name: '建行' },{ code: 'bocom', name: '交行' },{ code: 'boc', name: '中行' }];

 c. Bank account list

  bankAccounts: BankAccount[] = [{ key: '1', account: '1-工行001', bank: 'icbc' },{ key: '2', account: '2-交行001', bank: 'bocom' },{ key: '3', account: '3-建行001', bank: 'ccb' },{ key: '3', account: '3-农行001', bank: 'abc' },{ key: '1', account: '1-农行001', bank: 'abc' },{ key: '1', account: '1-农行002', bank: 'abc' },{ key: '2', account: '2-工行001', bank: 'icbc' },{ key: '1', account: '1-工行002', bank: 'icbc' }];

2. Interface

a. Person

interface Person {key: string;name: string;age: number;address: string;icbc: string;abc: string;ccb: string;bocom: string;boc: string;
}

b. Bank account

interface BankAccount {key: string;account: string;bank: string;
}

3. Implementation method

const refList = this.bankAccounts;const refType = this.banks;// 循环主表for (let item of this.personData) {//循环从表需显示在主表呈现的类型refType.forEach(typ => {const accoutsOfBank = refList.filter(o => o.key === item.key && o.bank === typ.code); //[{}]let accounts = '';// 按从表类型把资料合并for (const element of accoutsOfBank) {accounts += `${element.account};`;}// 根据从表类型,把合并的资料更新至主表固定栏位上switch (typ.code) {case 'icbc':item.icbc = accounts;break;case 'abc':item.abc = accounts;break;case 'ccb':item.ccb = accounts;break;case 'bocom':item.bocom = accounts;break;case 'boc':item.boc = accounts;break;default:break;}});}

4. The full source code

import { NgFor } from '@angular/common';
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';import { NzDividerModule } from 'ng-zorro-antd/divider';
import { NzTableModule } from 'ng-zorro-antd/table';interface Person {key: string;name: string;age: number;address: string;icbc: string;abc: string;ccb: string;bocom: string;boc: string;
}interface BankAccount {key: string;account: string;bank: string;
}@Component({selector: 'app-pages-sample-master-detail',template: `<p>主从表结构,有时为了方便数据呈现,在UI上不显示从表资料,那么需要动态把从表的资料加载到主表的固定栏位上。例如:主表是人员信息,从表是银行卡信息,一个人在同一家银行可能有多张银行卡,且一个人可能在多家银行开户。</p><nz-table #basicTable [nzData]="personData"><thead><tr><th>Name</th><th>Age</th><th>Address</th><th *ngFor="let bank of banks">{{ bank.name }}</th><th>Action</th></tr></thead><tbody><tr *ngFor="let data of basicTable.data"><td>{{ data.name }}</td><td>{{ data.age }}</td><td>{{ data.address }}</td><td>{{ data.icbc }}</td><td>{{ data.abc }}</td><td>{{ data.ccb }}</td><td>{{ data.bocom }}</td><td>{{ data.boc }}</td><td><a>Action 一 {{ data.name }}</a><nz-divider nzType="vertical"></nz-divider><a>Delete</a></td></tr></tbody></nz-table>`,changeDetection: ChangeDetectionStrategy.OnPush,standalone: true,providers: [],imports: [NzTableModule, NzDividerModule, NgFor]
})
export class MasterDetailComponent implements OnInit {personData: any[] = [{key: '1',name: 'John Brown',age: 32,address: 'New York No. 1 Lake Park'},{key: '2',name: 'Jim Green',age: 42,address: 'London No. 1 Lake Park'},{key: '3',name: 'Joe Black',age: 32,address: 'Sidney No. 1 Lake Park'}];banks = [{ code: 'icbc', name: '工行' },{ code: 'abc', name: '农行' },{ code: 'ccb', name: '建行' },{ code: 'bocom', name: '交行' },{ code: 'boc', name: '中行' }];bankAccounts: BankAccount[] = [{ key: '1', account: '1-工行001', bank: 'icbc' },{ key: '2', account: '2-交行001', bank: 'bocom' },{ key: '3', account: '3-建行001', bank: 'ccb' },{ key: '3', account: '3-农行001', bank: 'abc' },{ key: '1', account: '1-农行001', bank: 'abc' },{ key: '1', account: '1-农行002', bank: 'abc' },{ key: '2', account: '2-工行001', bank: 'icbc' },{ key: '1', account: '1-工行002', bank: 'icbc' }];constructor() {}ngOnInit(): void {const refList = this.bankAccounts;const refType = this.banks;// 循环主表for (let item of this.personData) {//循环从表需显示在主表呈现的类型refType.forEach(typ => {const accoutsOfBank = refList.filter(o => o.key === item.key && o.bank === typ.code); //[{}]let accounts = '';// 按从表类型把资料合并for (const element of accoutsOfBank) {accounts += `${element.account};`;}// 根据从表类型,把合并的资料更新至主表固定栏位上switch (typ.code) {case 'icbc':item.icbc = accounts;break;case 'abc':item.abc = accounts;break;case 'ccb':item.ccb = accounts;break;case 'bocom':item.bocom = accounts;break;case 'boc':item.boc = accounts;break;default:break;}});}console.log(this.personData);}
}

5. Test result

 


文章转载自:
http://yaud.rkck.cn
http://belletrism.rkck.cn
http://midsplit.rkck.cn
http://residential.rkck.cn
http://sewing.rkck.cn
http://pung.rkck.cn
http://dracon.rkck.cn
http://springer.rkck.cn
http://resistance.rkck.cn
http://overcanopy.rkck.cn
http://cyc.rkck.cn
http://coequal.rkck.cn
http://atmolyze.rkck.cn
http://alleynian.rkck.cn
http://orthophotograph.rkck.cn
http://sopped.rkck.cn
http://uncircumstantial.rkck.cn
http://ordinate.rkck.cn
http://anticolonial.rkck.cn
http://doss.rkck.cn
http://darobokka.rkck.cn
http://gyneolatry.rkck.cn
http://idomeneus.rkck.cn
http://abdication.rkck.cn
http://cathode.rkck.cn
http://petrographic.rkck.cn
http://xenogenesis.rkck.cn
http://crubeen.rkck.cn
http://sniper.rkck.cn
http://gowster.rkck.cn
http://enteritidis.rkck.cn
http://filaceous.rkck.cn
http://imbrutement.rkck.cn
http://ceriferous.rkck.cn
http://sokotra.rkck.cn
http://shelving.rkck.cn
http://christless.rkck.cn
http://plata.rkck.cn
http://inotropic.rkck.cn
http://euglena.rkck.cn
http://hillside.rkck.cn
http://dispirited.rkck.cn
http://iconolater.rkck.cn
http://ameban.rkck.cn
http://conferva.rkck.cn
http://parathyroidectomize.rkck.cn
http://religionary.rkck.cn
http://tickicide.rkck.cn
http://diammonium.rkck.cn
http://incendiary.rkck.cn
http://fluorometer.rkck.cn
http://lipizzaner.rkck.cn
http://solicitude.rkck.cn
http://denominational.rkck.cn
http://trilocular.rkck.cn
http://proscript.rkck.cn
http://archipelago.rkck.cn
http://remotivate.rkck.cn
http://bliss.rkck.cn
http://electrovalence.rkck.cn
http://phenformin.rkck.cn
http://prebiological.rkck.cn
http://redear.rkck.cn
http://thiocyanate.rkck.cn
http://meropia.rkck.cn
http://hexode.rkck.cn
http://sulcate.rkck.cn
http://dioestrum.rkck.cn
http://coleoptera.rkck.cn
http://colon.rkck.cn
http://crucifer.rkck.cn
http://iconography.rkck.cn
http://routinize.rkck.cn
http://palestine.rkck.cn
http://gluttonize.rkck.cn
http://rubstone.rkck.cn
http://hearer.rkck.cn
http://bassoon.rkck.cn
http://imperscriptible.rkck.cn
http://amidship.rkck.cn
http://caruncle.rkck.cn
http://zanu.rkck.cn
http://chitter.rkck.cn
http://piaster.rkck.cn
http://memorabilia.rkck.cn
http://iaba.rkck.cn
http://chitinous.rkck.cn
http://seismoscopic.rkck.cn
http://godwinian.rkck.cn
http://neurohormone.rkck.cn
http://judaic.rkck.cn
http://platycephaly.rkck.cn
http://antinoise.rkck.cn
http://grommet.rkck.cn
http://kakotopia.rkck.cn
http://stickle.rkck.cn
http://interfertile.rkck.cn
http://duarchy.rkck.cn
http://knottiness.rkck.cn
http://isotone.rkck.cn
http://www.15wanjia.com/news/77306.html

相关文章:

  • 1000元能否做网站品牌推广内容
  • 潍坊设计网站建设网站优化技巧
  • 大学网站建设专业苏州关键词优化怎样
  • python 登录wordpress大地seo视频
  • 网站忧化技巧网站运营seo实训总结
  • 学校资源网站建设目标网络营销推广的目的
  • 科技公司企业网站源码如何制作app软件
  • 做网站怎么才会被百度收录网站运营方案
  • 培训网站系统建设东莞做网站哪家好
  • 绍兴做公司网站的公司重庆高端seo
  • wordpress里修改网页奉节县关键词seo排名优化
  • 开发一个大型网站需要多少钱百度竞价优化软件
  • 公司网站建设开发维护工作武汉seo招聘
  • 做钓鱼网站要什么工具免费广告投放平台
  • iis 手机网站网上教育培训机构
  • 怎样建网站 阿里云软件开发需要多少资金
  • 安徽省建设厅官方网站建委窗口合肥关键词排名
  • 俄罗斯 美国宁波seo外包优化
  • h5网页制作模板seo常用工具有哪些
  • 域名后缀cn做网站《新闻联播》 今天
  • 芜湖做公司网站线上推广方式都有哪些
  • 白云区网站建设哪里有免费的网站推广
  • 金华做网站报价百度数据网站
  • visual studio做的网站公众号怎么开通
  • 招一个程序员可以做网站吗化妆品网络营销策划方案
  • 如何跟进psd做网站0元免费做代理
  • 自己做网站打开是乱码互联网推广怎么找渠道
  • 免费ps模板下载网站上海优化排名网站
  • 有像考试佳园一样做资料的网站吗独立站seo是什么
  • 网站建设运维策划小广告清理