客户端导出组织架构图的时候头像没有导出

我用客户端导出组织架构图的时候人员的头像无法导出,导出来是空白的。用官方的服务导出是可以导出的,但是人员多了会报错:

 const nodeFormatter = function (width, height) {
                    var outerStyle = {
                        width: '100%',
                        height: '100%',
                        display: 'flex',
                        'flex-direction': 'row',
                        'align-items': 'center',
                        'justify-content': 'center'
                    }, imageStyle = {
                        'max-height': '100%',
                        'border-radius': '50%'
                    }, innerStyle: any = {
                        width: '100%',
                        padding: 0,
                        'text-align': 'center',
                        'white-space': 'normal'
                    }, nameStyle = {
                        margin: 0
                    }, titleStyle = {
                        margin: 0
                    }, descriptionStyle = {
                        opacity: 0.75,
                        margin: '5px'
                    };


                    // eslint-disable-next-line valid-jsdoc
                    /**
                     * @private
                     */
                    function styleAttr(style) {
                        return Object.keys(style).reduce(function (str, key) {
                            return str + key + ':' + style[key] + ';';
                        }, 'style="') + '"';
                    }
                    if (this.point.image) {
                        imageStyle['max-width'] = '30%';
                        innerStyle.width = '70%';
                    }
                    // PhantomJS doesn't support flex, roll back to absolute
                    // positioning
                    if (this.series.chart.renderer.forExport) {
                        outerStyle.display = 'block';

                        innerStyle.position = 'absolute';
                        innerStyle.left = this.point.image ? '30%' : 0;
                        innerStyle.top = 0;

                        // 修改的地方1
                        let offset = (width - height * 0.3) / 2 + 'px';
                        outerStyle['padding-top'] = offset;
                        innerStyle.top = offset;

                    }
                    var html = '<div ' + styleAttr(outerStyle) + '>';
                    if (this.point.image) {
                        console.log(this.point.image)
                        html += '<img src="' + this.point.image + '" ' +
                            styleAttr(imageStyle) + '>';
                    }
                    html += '<div ' + styleAttr(innerStyle) + '>';
                    if (this.point.name) {
                        html += '<h4 ' + styleAttr(nameStyle) + '>' +
                            this.point.name + '</h4>';
                    }
                    if (this.point.title) {
                        html += '<p ' + styleAttr(titleStyle) + '>' +
                            (this.point.title || '') + '</p>';
                    }
                    if (this.point.description) {
                        html += '<p ' + styleAttr(descriptionStyle) + '>' +
                            this.point.description + '</p>';
                    }
                    html += '</div>' +
                        '</div>';
                    return html;
                }

                res.nodes.forEach(item => {
                    item.parentId = item.pid
                })
                let series: any = {
                    type: 'organization',
                    nodeWidth: 100, // 高度
                    nodeHeight: 180, // 宽度
                    color: '#fff',
                    zoom: true,
                    colorByPoint: false,
                    nodes: res.nodes,
                    dataLabels: {
                        nodeFormatter: function () {
                            return nodeFormatter.call(this, 100, 180)
                        }
                    }
                }
                this.chart = (Highcharts as any).chart(this.el.nativeElement.querySelector('.chartContainer'), {

                    title: {
                        text:"&nbsp;&nbsp;&nbsp;"+localStorage.getItem('projectName')+"&nbsp;&nbsp;&nbsp;"
                    },
                    exporting: {
                        buttons:{
                            contextButton:{
                                menuItems:[
                                    {
                                        text:'下载PDF文件',
                                        onclick:function(){
                                            this.exportChart({
                                                type:'application/pdf',
                                                filename: 'my-pdf'
                                            })
                                        }
                                    }
                                ]
                            }
                        },
                        // enabled: true,
                        chartOptions: { // specific options for the exported image
                            plotOptions: {
                                series: {
                                    dataLabels: {
                                        enabled: true
                                    }
                                }
                            }
                        },
                    },
                    credits: {
                        enabled: false
                    },
                    chart: {
                        // spacingTop: 40,
                        backgroundColor: '#fff',
                        "zoomType": "x",
                        "inverted": true,
                        // height: 401,
                        // width: 930,
                    },
                    tooltip: {
                        outside: true,
                        enabled: false
                    },
                    series: [series],
                    navigation: {
                        buttonOptions: {
                            enabled: true,

                            // y: -25
                        }
                    }
                })

目前客户端导出的样子:

客户端导出的话,如果包含图片,会有一些限制,参考一下文档中的说明

用服务器导出的话,官方提供的有提交数据大小的限制,建议您们自己在本地搭建自己的服务器。

感谢回复!
我现在在本地搭好了服务器,可以导出,但是头像图片仍然无法导出是为什么?


1.有时候数据多了 还是会这样报错
2.导出pdf报错尤其频繁
3.有时会报这个错误245Unchecked runtime.lastError: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received