if chatmessage.msgtype && chatmessage.msgtype == "image"
    a(href="/agent/message/image.html?id=" + chatmessage.id, data-toggle="ajax", data-width="950", data-height="600", title="图片")
        img.ukefu-media-image(src="!{chatmessage.message ? chatmessage.message : ''}", id="#{chatmessage.id}")
else if chatmessage.msgtype && chatmessage.msgtype == "cooperation"
    a(href="/agent/message/image.html?t=review&id=" + chatmessage.message, data-toggle="ajax", data-width="950", data-height="600", title="图片")
        | 系统发送了一个协作邀请
else if chatmessage.msgtype && chatmessage.msgtype == "file"
    .ukefu-message-file
        .ukefu-file-icon
            i.kfont 
        .ukefu-file-desc
            a(href=chatmessage.message, target="_blank")
                div= chatmessage.filename
                div #{chatmessage.filesize / 1024}kb
else if chatmessage.msgtype && chatmessage.msgtype == "location"
    div #{chatmessage.message}
    if systemConfig && systemConfig.mapkey && systemConfig.mapkey != ''
        .ukefu-map(id="map_" + chatmessage.id)
        script(type="text/javascript").
            var map = new BMap.Map("map_#{chatmessage.id}");
            // 创建地图实例
            var chatmessage_locy = '#{chatmessage.locy}'
            var ggPoint = new BMap.Point(chatmessage_locy ? chatmessage_locy : '0', chatmessage_locy ? chatmessage_locy : '0');  // 创建点坐标
            MapUtil.convert(map, ggPoint, "#{chatmessage.message}", "#{chatmessage.scale ? chatmessage.scale : '15'}");
else if chatmessage.msgtype && chatmessage.msgtype == "voice"
    p.weixinAudio(id="voice_media_" + chatmessage.id, style="width:" + chatmessage.duration && chatmessage.duration != '' ? chatmessage.duration > 30 ? '300px' : 50 + (chatmessage.duration * 10) + 'px' : '50px')
        audio#media(src=chatmessage.message, width="1", height="1", preload="")
        span#audio_area.db.audio_area(title=chatmessage.expmsg)
            span.audio_wrp.db
                span.audio_play_area
                    i.icon_audio_default
                    i.icon_audio_playing
                span.audio_length.tips_global
                    | #{chatmessage.duration}秒
                span#audio_progress.progress_bar(style="width: 0%;")
    if chatmessage.expmsg
        .ukefu-asr
            | #{chatmessage.expmsg}
        script(type="text/javascript").
            $('#voice_media_' + '#{chatmessage.id}').weixinAudio({
                autoplay: false
            });
else
    | !{chatmessage.message}
    if chatmessage.suggestmsg && chatmessage.suggestmsg != ""
        ul.agent-info-list
            for item in chatmessage.suggest
                li.ukefu-suggest-item
                    a.suggestitem(href="javascript:void(0)")
                        | #{item.title}







