fix bug
This commit is contained in:
@ -19,7 +19,7 @@ export class DatatableMancustomtableComponent implements OnInit {
|
||||
mode = 'year';
|
||||
date: any = null;
|
||||
defineDate = [];
|
||||
columns: STColumn[] =[];
|
||||
columns: STColumn[] = [];
|
||||
resourceStatus: number = 1;
|
||||
time: any = ['2022-01-01 00:00:00'];
|
||||
dateFormat = 'yyyy';
|
||||
@ -61,41 +61,104 @@ export class DatatableMancustomtableComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
};
|
||||
initST() {
|
||||
this.columns =[
|
||||
{ title: '部门', index: 'department', className: 'text-center', width: '200px' },
|
||||
{ title: '业务员', index: 'salesmen', className: 'text-center', width: '200px' },
|
||||
{ title: '已认证货主数', index: 'certifiedCount', className: 'text-center', width: '100px', iif: ()=> {
|
||||
console.log(this.resourceStatus);
|
||||
return this.resourceStatus !== 1
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '部门', index: 'department', className: 'text-center', width: '150px' },
|
||||
{ title: '业务员', index: 'salesmen', className: 'text-center', width: '150px' },
|
||||
{
|
||||
title: '已认证货主数',
|
||||
index: 'certifiedCount',
|
||||
className: 'text-center',
|
||||
width: '150px',
|
||||
iif: () => {
|
||||
return this?.resourceStatus !== 1 ? false : true;
|
||||
}
|
||||
},
|
||||
{ title: '已认证合伙人', index: 'certifiedCount', className: 'text-center', width: '150px' ,
|
||||
iif: () => {
|
||||
return this?.resourceStatus !== 2 ? false : true;
|
||||
}},
|
||||
{ title: '新增合伙人数', index: 'addCount', className: 'text-center', width: '150px' ,
|
||||
iif: () => {
|
||||
return this?.resourceStatus !== 2 ? false : true;
|
||||
}},
|
||||
{ title: '合伙人活跃率', index: 'alivePer', className: 'text-center', width: '150px' ,
|
||||
iif: () => {
|
||||
return this?.resourceStatus !== 2 ? false : true;
|
||||
} },
|
||||
{ title: '活跃合伙人数', index: 'aliveCount', className: 'text-center', width: '150px' ,
|
||||
iif: () => {
|
||||
return this?.resourceStatus !== 2 ? false : true;
|
||||
} },
|
||||
{ title: '沉默合伙人数', index: 'silentCount', className: 'text-center', width: '150px' ,
|
||||
iif: () => {
|
||||
return this?.resourceStatus !== 2 ? false : true;
|
||||
} },
|
||||
{ title: '流失合伙人数', index: 'drainCount', className: 'text-center', width: '150px' ,
|
||||
iif: () => {
|
||||
return this?.resourceStatus !== 2 ? false : true;
|
||||
}},
|
||||
{ title: '未激活合伙人数', index: 'notActiveCount', className: 'text-center', width: '150px' ,
|
||||
iif: () => {
|
||||
return this?.resourceStatus !== 2 ? false : true;
|
||||
} },
|
||||
|
||||
} },
|
||||
{ title: '已认证合伙人', index: 'certifiedCount', className: 'text-center', width: '100px' },
|
||||
{ title: '新增合伙人数', index: 'addCount', className: 'text-center', width: '100px' },
|
||||
{ title: '合伙人活跃率', index: 'alivePer', className: 'text-center', width: '100px' },
|
||||
{ title: '活跃合伙人数', index: 'aliveCount', className: 'text-center', width: '100px' },
|
||||
{ title: '沉默合伙人数', index: 'silentCount', className: 'text-center', width: '100px' },
|
||||
{ title: '流失合伙人数', index: 'drainCount', className: 'text-center', width: '100px' },
|
||||
{ title: '未激活合伙人数', index: 'notActiveCount', className: 'text-center', width: '100px' },
|
||||
|
||||
{ title: '新增货主数', index: 'addCount', className: 'text-center', width: '100px' },
|
||||
{ title: '货主活跃率', index: 'alivePer', className: 'text-center', width: '100px' },
|
||||
{
|
||||
title: '活跃货主数',
|
||||
index: 'aliveCount',
|
||||
className: 'text-center',
|
||||
width: '100px'
|
||||
},
|
||||
{ title: '沉默货主数', index: 'silentCount', className: 'text-center', width: '100px' },
|
||||
{
|
||||
title: '流失货主数',
|
||||
index: 'drainCount',
|
||||
className: 'text-right',
|
||||
width: '100px',
|
||||
},
|
||||
{ title: '未激活货主数', index: 'notActiveCount', className: 'text-center', width: '120px' }
|
||||
];
|
||||
}
|
||||
{
|
||||
title: '新增货主数',
|
||||
index: 'addCount',
|
||||
className: 'text-center',
|
||||
width: '150px',
|
||||
iif: () => {
|
||||
return this?.resourceStatus !== 1 ? false : true;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '货主活跃率',
|
||||
index: 'alivePer',
|
||||
className: 'text-center',
|
||||
width: '150px',
|
||||
iif: () => {
|
||||
return this?.resourceStatus !== 1 ? false : true;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '活跃货主数',
|
||||
index: 'aliveCount',
|
||||
className: 'text-center',
|
||||
width: '150px',
|
||||
iif: () => {
|
||||
return this?.resourceStatus !== 1 ? false : true;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '沉默货主数',
|
||||
index: 'silentCount',
|
||||
className: 'text-center',
|
||||
width: '150px',
|
||||
iif: () => {
|
||||
return this?.resourceStatus !== 1 ? false : true;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '流失货主数',
|
||||
index: 'drainCount',
|
||||
className: 'text-right',
|
||||
width: '150px',
|
||||
iif: () => {
|
||||
return this?.resourceStatus !== 1 ? false : true;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '未激活货主数',
|
||||
index: 'notActiveCount',
|
||||
className: 'text-center',
|
||||
width: '150px',
|
||||
iif: () => {
|
||||
return this?.resourceStatus !== 1 ? false : true;
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
@ -238,12 +301,10 @@ export class DatatableMancustomtableComponent implements OnInit {
|
||||
}
|
||||
selectChange(e: number) {
|
||||
console.log(e);
|
||||
|
||||
this.resourceStatus = e + 1;
|
||||
// this.initST();
|
||||
setTimeout(() => {
|
||||
this.initST();
|
||||
// this.st.load(1);
|
||||
this.st?.resetColumns();
|
||||
this.st?.load(1);
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user