When I export, I have problems with two fields, Name and Status, maybe because I have customized these two fields. Is there any solution?
columns: [
{ type: 'wbs' },
{
type: 'name', width: 250,
htmlEncode: false,
leafIconCls: null,
renderer(
{ record, value, size }:
{ record: SchedulerResourceModel & { [key: string]: any }; value: string; size: { height: number; color: string } }
): string {
// Parent rows are employees
if (record.remark) {
return `<span class='contentIcon'></span> ${encodeHtml(value)}`;
} else {
return `<i class='b-tree-icon b-icon b-icon-tree-leaf'></i> ${encodeHtml(value)}`;
}
}
},
{ type: 'startdate' },
{ type: 'enddate' },
{ type: 'effort' },
{ type: 'finishcolumn' },
{ type: 'duration' },
{
type: 'resourceassignment', width: 120, showAvatars: true, itemTpl: ({ resourceName }) => resourceName,
editor: {
picker: {
listeners: {
async selectionChange(changed) {
//from(iterable) —— 把它的参数转换成一个 Observable 实例。 该方法通常用于把一个数组转换成一个(发送多个值的)可观察对象。
const myObservable2 = from([1, 2, 3]);
const myObserver2 = myObservable2.subscribe(res => {
console.log('使用subscribe订阅的结果:', res);
})
const myObserver3 = myObservable2.toPromise().then(res => {
console.log('使用toPromise转化的结果:', res);
})
console.log(changed);
if (changed.action == "select") {
const result = await MessageDialog.confirm({
title: 'The big question',
message: 'Do you really want to select?',
okButton: 'Yes',
cancelButton: 'No'
});
if (result != MessageDialog.okButton) {
this.deselectRow(changed.selected[0])
}
}
// if (changed.action == "deselect") {
// const result = await MessageDialog.confirm({
// title: 'The big question',
// message: 'Do you really want to deselect?',
// okButton: 'Yes',
// cancelButton: 'No'
// });
// if (result != MessageDialog.okButton) {
// this.selectRow(changed.deselected[0])
// }
// }
}
},
selectionMode: {
rowCheckboxSelection: true,
multiSelect: false,
showCheckAll: false,
},
features: {
filterBar: true,
group: 'resource.orgCode',
headerMenu: false,
cellMenu: false,
},
// The extra columns are concatenated onto the base column set.
// columns: [{
// text: 'Calendar',
// // Read a nested property (name) from the resource calendar
// field: 'resource.name',
// filterable: false,
// editor: false,
// width: 200,
// }],
},
}
},
{ type: 'percentdone', showCircle: true, width: 70 },
{
type: 'predecessor',
width: 112
},
{
type: 'successor',
width: 112
},
{ type: 'schedulingmodecolumn' },
{ type: 'calendar' },
{ type: 'constrainttype' },
{ type: 'constraintdate' },
{ type: 'statuscolumn' },
{
type: 'date',
text: 'Deadline',
field: 'deadline'
},
{ type: 'addnew' }
],