Parcourir la source

长处方咨询与随访相关功能代码

raolu il y a 7 ans
Parent
commit
1a526a3af2

+ 158 - 1
css/consulting.css

@ -1,5 +1,9 @@
.consulting-panel{
    height: calc(100% - 150px);
    position: relative;
}
.c-12b7f5{
    color: #12b7f5;
}
.input-panel{
    height: 150px;
@ -382,4 +386,157 @@ p{
    border-radius: 2px;
    color: #12b7f5;
    margin-top: 10px;
}
}
.consult-icon{
    width: 16px;
    height: 16px;
    margin-right: 10px;
}
.icon-image:before{
    content: url(../img/img_icon.png);
}
.icon-image:hover:before{
    content: url(../img/img_icon_pre.png);
}
.icon-reply:before{
    content: url(../img/huifu_icon.png);
}
.icon-reply:hover:before{
    content: url(../img/huifu_icon_pre.png);
}
.quick-reply-panel{
    position: absolute;
    bottom: 0;
    left: 50px;
    background-color: #fff;
    border: 1px solid #e1e1e1;
    display: none;
    max-width: 50%;
}
.reply-list{
    margin: 0;
    padding: 0;
    list-style: none;
}
.reply-list li{
    border-top: 1px solid #e1e1e1;
    padding: 10px;
    text-align: center;
    word-wrap: break-word;
}
.reply-list li:first-child{
    border-top: 0;
}
.reply-list li:hover{
    color: #12b7f5;
}
.chat-right .word-bread.msg-fv{
    background-color: #f5f5fa;
    padding: 10px;
    border: none;
}
.chat-right .word-bread.msg-fv:after{
    background-color: #f5f5fa;
    border-color: #f5f5fa;
}
.msg-fv .fv-content{
    background-color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
}
.fv-remind{
    text-align: center;
    display: inline-block;
    background-color: #f5f5fa;
    padding: 8px 20px;
    border-radius: 18px;
    color: #666;
    margin-bottom: 15px;
}
.mb10-i{
    margin-bottom: 10px !important;
}
.layer-info-content{
    width: 80%;
    margin: auto;
}
body .alert-info .layui-layer-title{
    background-color: #fff;
    border-bottom: 0;
}
body .alert-info .layui-layer-content{
    padding: 0px 20px 10px;
    text-align: center;
    color: #333;
}
body .alert-info .layui-layer-btn{
    text-align: center;
    border-top: 0;
    background-color: #fff;
    padding: 20px;
}
body .alert-info .layui-layer-btn a{
    background-color: #fff;
    border: 1px solid #d7dce6;
    color: #666;
}
.flex-box-li{
    display: -webkit-box;
    display: box;
    -webkit-box-pack: center;
    -webkit-box-align: center;
}
.col-0{
    -webkit-box-flex: 0;
    box-flex: 0;
}
.col-1{
    -webkit-box-flex: 1;
    box-flex: 1;
}
body .quick-reply-setting .layui-layer-title{
    height: 40px;
    background-color: #fff;
    line-height: 40px;
    font-size: 14px;
    font-weight: normal;
    padding: 0 80px 0 10px;
}
body .quick-reply-setting .layui-layer-content{
    padding: 10px;
    color: #333;
}
body .quick-reply-setting .layui-layer-btn{
    background-color: #fff;
    border-top: 0;
    padding: 10px;
}
body .quick-reply-setting .layui-layer-btn a{
    background-color: #fafafa;
    border: 1px solid #d7dce6;
    color: #666;
}
body .quick-reply-setting .layui-layer-btn .layui-layer-btn0{
    border-color: #12b7f5;
}
body .quick-reply-setting .layui-layer-btn .layui-layer-btn1{
}
ul{
    margin: 0;
    list-style: none;
    padding: 0;
}
.reply-list2 li{
    padding: 10px 10px;
}
.link-blue,
.link-blue:hover,
.link-blue:focus
{
    color: #12b7f5;
    text-decoration: underline;
}
.work-break{
    word-wrap: break-word;
}

+ 1 - 0
js/buz/followup/drugs.js

@ -68,6 +68,7 @@ function bindEvents(){
        }, function(){
            //清空数据
            clearDrugsInfo();
            layer.close(layer.index);
        });
    });
    

+ 402 - 7
js/buz/prescription-consulting.js

@ -1,11 +1,16 @@
var request = getRequest(),
    sessionId = request.sessionId,
    patiCode,
    patiName,
    consultCode,
    prescriptionStatus,
    prescriptionCode;
    prescriptionCode,
    page = 1,
    members = [];
    members = [],
    fv_id,
    quickReplyList,
    survey_1_obj, //身体异常症状问卷obj
    survey_2_obj; //体征及生活方式调查问卷obj
var docInfo = window.localStorage.getItem("docInfo");
docInfo = JSON.parse(docInfo);
@ -20,6 +25,12 @@ $(function(){
    //获得会话参与人员
    consultingAPI.getMembers(sessionId).then(function(res){
        members = res;
        for(var i=0; i<members.length; i++){
            if(members[i].is_patient == 1){
                patiName = members[i].name;
                break;
            }
        }
        getMessage(true);
    })
    getPrescriptionInfo();
@ -153,6 +164,12 @@ function getPrescriptionInfo(){
    var params = { consult: consultCode};
    consultingAPI.getPrescriptionInfo({data: params}).then(function(res){
        if(res.status == 200){
            //获得随访相关内容
            var followup = res.data.followup;
            if(followup){
                followup = JSON.parse(followup);
                fv_id = followup.id;
            }
            var html = template('prescriptionInfo_tmp', res.data);
            prescriptionStatus = res.data.status;
            prescriptionCode = res.data.code;
@ -160,7 +177,7 @@ function getPrescriptionInfo(){
            $(".status-btn").text(statusName);
            $("#prescriptionInfo").empty().append(html);
            $("#prescriptionInfo").slimscroll({
                height: 'calc(100% - 60px)',
                height: '100%',
                width: '100%'
            });
        }else{
@ -353,14 +370,392 @@ function bindEvents(){
    });
    //查看详情
    $("body").on('click', '.view-detail', function(res){
    $("body").on('click', '.view-detail', function(){
        //修改顶部tab页面的
        var url = parent.document.getElementById("tab").src;
        parent.document.getElementById("tab").src = "prescription-tabs.html?sessionId="+sessionId+"&patiCode="+patiCode+"&code="+prescriptionCode+"&tab=1&fromTabIdx=0";
    });
    
    template.helper('getSourceUrl', function(str){
        return APIService.getImgUrl(str);
    });
    
    //导入随访相关控件监听
    $("body").on('click', '.import-fv', function(){
        var $this = $(this),
            type = $this.attr("data-type"), // 1-血压,2-血糖
            health = $this.attr("data-health"),
            params = {
                prescriptioncode: prescriptionCode,
                followupid: fv_id,
                healthindexid: health
            };
        if(type == 1){
            consultingAPI.importbloodpressure(params).then(function(res){
                if(res.status == 200){
                    showSuccessMsg("已填入");
                }else{
                    showErrorMsg(res.msg)
                }
            })
        }else if(type == 2){
            consultingAPI.importbloodsugar(params).then(function(res){
                if(res.status == 200){
                    showSuccessMsg("已填入");
                }else{
                    showErrorMsg(res.msg)
                }
            })
        }
    });
    
    //导入药品到随访记录中
    $(".import-drugs").on('click', function(){
        var params = {
            prescriptioncode: prescriptionCode,
            followupid: fv_id
        };
        consultingAPI.importdrugs(params).then(function(res){
            if(res.status == 200){
                showSuccessMsg("已将续方药品填入本次随访记录");
            }else{
                showErrorMsg(res.msg);
            }
        });
    });
    
    //查看问卷记录
    $("body").on('click', '.view-survey', function(){
        var $this = $(this),
            msgType = $this.attr("data-type");
            
        parent.gotoPrescriptionTab(8);
    });
    
    //快捷回复相关监听事件
    bindReplyEvents();
}
//-------------------------------快捷回复相关内容--------------------------
var count = 0;
function showQuickReplyPanel(e){
    var $el = $(e),
        offset = $el.offset();
    if(count == 0){
        $(".quick-reply-panel").css({"left": offset.left});
        //获得快捷回复列表
        getQuickReplayList();
        $(".quick-reply-panel").toggle("show");
    }else{
        //渲染前4条记录
        var list = quickReplyList.slice(0, 4),
            html = template("quick_reply_tmp", {list: list});
        $(".quick-reply-panel ul").empty().append(html);
        $(".quick-reply-panel").toggle("show");
    }
}
function getQuickReplayList(){
    consultingAPI.getReplyList({type: 1}).then(function(res){
        if(res.status == 200){
            count ++;
            formatReplyList(res.data);
            
            //渲染前4条记录
            var list = quickReplyList.slice(0, 4),
                html = template("quick_reply_tmp", {list: list});
            $(".quick-reply-panel ul").empty().append(html);
            
            //判断问卷是否填写
            getFollowupContentList();
        }else{
            showErrorMsg(res.msg);
        }
    })
}
function formatReplyList(data){
    quickReplyList = _.map(data, function(o){
        //"systag":0为医生自定义消息,大于0的为系统该消息,1体征生活方式 2症状 3血糖 4血压
        if(o.systag == 1 || o.systag == 2){
            o.name = "survey"; //问卷 
        }else if(o.systag == 3 || o.systag == 4){
            o.name = "test"; //体检
        }else{
            o.name = "";
        }
        if(o.systag == 1 || o.systag == 3){
            o.tagType = 2;
        }else if(o.systag == 2 || o.systag == 4){
            o.tagType = 1;
        }else{
            o.tagType = 0;
        }
        return o;
    });
}
template.helper('getSourceUrl', function(str){
    return APIService.getImgUrl(str);
})
//获得问卷列表,判断个问卷是否已经填写
function getFollowupContentList(){
    var params = {
        prescriptioncode: prescriptionCode
    };
    consultingAPI.getFollowupCountList(params).then(function(res){
        if(res.status == 200){
            //'type': '1',//1身份异常症状问卷,2体征及生活方式调查问卷
            // 'statue': '1',//1已填写,2未填写
            var len = res.data.length;
            for(i=0; i<len; i++){
                var item = res.data[i];
                if(item.type == '1'){
                    survey_1_obj = item;
                }
                if(item.type == '2'){
                    survey_2_obj = item;
                }
            }
        }else{
            showErrorMsg(res.msg);
        }
    })
}
function bindReplyEvents(){
    $("body").on('click', ".reply-item", function(){
        var $this = $(this),
            json = $this.data("json"),
            name = json.name,
            type = json.tagType;
        
        var params = {
            prescriptionCode: prescriptionCode,
            type: type,
            followupid: fv_id
        };
        if(name == "test"){ //发送血糖血压快捷回复咨询
            consultingAPI.addPrescriptionBloodStatusConsult(params).then(function(res){
                if(res.status == 200){
                    $(".quick-reply-panel").hide();
                    layer.close(layer.index);
                    //发送成功后,socket会响应退出最新的消息
                }else{
                    showErrorMsg(res.msg);
                }
            })
        }else if(name == "survey"){//发送问卷快捷回复咨询
            //判断是否已经填写过问卷
            if(type == '1' && survey_1_obj.statue == '1'){
                var content = "居民"+patiName+"已在"+survey_1_obj.createtime+"填写"+survey_1_obj.name;
                layer.open({
                    title: " ",
                    content: content,
                    skin: 'alert-info',
                    btn: ['查看问卷'],
                    yes: function(index){
                        parent.gotoPrescriptionTab(8);
                        layer.close(index);
                    }
                });
                return false;
            }
            if(type == '2' && survey_2_obj.statue == '1'){
                var content = "居民"+patiName+"已在<br/>"+survey_2_obj.createtime+"填写"+survey_2_obj.name;
                layer.open({
                    title: " ",
                    content: content,
                    skin: 'alert-info',
                    btn: ['查看问卷'],
                    yes: function(index){
                        parent.gotoPrescriptionTab(8);
                        layer.close(index);
                    }
                });
                return false;
            }
            consultingAPI.addPrescriptionFollowupContentConsult(params).then(function(res){
                if(res.status == 200){
                    layer.close(layer.index);
                    $(".quick-reply-panel").hide();
                    //发送成功后,socket会响应退出最新的消息
                }else{
                    showErrorMsg(res.msg);
                }
            })
        }else{
            //发送普通文本
            sendMessage(1, json.content);
            var obj = {
                content: json.content,
                content_type: '1',
                sender_id: docInfo.code,
                timestamp: new Date().getTime()
            }
            var html = formatMsg(obj);
            
            $("#talkBox").append(html);
            $("#talkBox").slimscroll({
                scrollTo: 'bottom'
            });
            layer.close(layer.index);
            $(".quick-reply-panel").hide();
        }
    });
    
    $("body").on("click", '.addMore', function(){
        showReplyListPanel();
        $(".quick-reply-panel").hide();
    })
    
    template.helper("getJsonStr", function(obj){
        if(typeof obj == "object"){
            return JSON.stringify(obj);
        }else{
            return "";
        }
    });
    
    $("body").on("click", ".del-icon", function(e){
        e.stopPropagation();
        var $this = $(this),
            $parent = $this.closest(".reply-item"),
            json = $parent.data("json"),
            systag = json.systag;
        if(systag > 0){
            layer.msg('系统默认回复内容不可删除');
        }else{
            //删除快捷回复
            consultingAPI.deleteQuickReply({id: json.id}).then(function(res){
                if(res.status == 200){
                    showSuccessMsg(res.msg);
                    $parent.remove();
                    //将quickReplyList数组中对应的元素删除
                    for(i=0; i< quickReplyList.length; i++){
                        var item = quickReplyList[i];
                        if(item.id == json.id){
                            quickReplyList.splice(i, 1);
                            break;
                        }
                    }
                }else{
                    showErrorMsg(res.msg);
                }
            });
        }
    });
    
    $("body").on('click', '.up-icon', function(e){
        e.stopPropagation();
        var li = this.parentNode.parentNode;
        if(li.previousElementSibling){
            swapNode(li,li.previousElementSibling);
        }
    });
    
    $("body").on('click', '.down-icon', function(e){
        e.stopPropagation();
        //通过链接对象获取表格行的引用
        var li = this.parentNode.parentNode;
        //如果不是最后一行,则与下一行交换顺序
        if(li.nextElementSibling){
            swapNode(li,li.nextElementSibling);
        }
    })
}
function showReplyListPanel(){
    //准备content html 内容
    var html = template('reply_tmp', {list: quickReplyList});
    layer.open({
        type: "1",
        title: '<img src="img/shezi_tankuang_icon.png" class="mr10">快捷回复设置',
        content: html,
        area: ['430px', '360px'],
        skin: 'quick-reply-setting',
        btn: ['添加', '取消'],
        yes: function(index){
            var html2 = '<div class="pl30 pr20"><p>回复内容:</p><textarea style="margin:0px; width: 100%; height: 80px;" maxlength="100" id="reply_content"></textarea></div>';
            layer.open({
                type: "1",
                title: '<img src="img/shezi_tankuang_icon.png" class="mr10">添加自动回复',
                content: html2,
                area: ['420px', '227px'],
                skin: 'quick-reply-setting',
                btn: ['确定', '取消'],
                yes: function(index2){
                    var text = $.trim($("#reply_content").val());
                    saveNewReply(text, index2);
                }
            });
        }
    });
}
//定义通用的函数交换两个结点显示的内容,不移动DOM
function swapNode(node1,node2){
    //获取两个节点的json数据和content数据
    var json1 = $(node1).attr("data-json"),
        content1 = $(node1).find(".content").text(),
        id1 = $(node1).data("id"),
        json2 = $(node2).attr("data-json"),
        content2 = $(node2).find(".content").text(),
        id2 = $(node2).data("id");
    
    $(node1).attr("data-json", json2);
    //data修改和attr修改不一致
    $(node1).data("id", id2);
    $(node1).attr("data-id", id2);
    $(node1).find(".content").text(content2);
    $(node2).attr("data-json", json1);
    $(node2).data("id", id1);
    $(node2).attr("data-id", id1);
    $(node2).find(".content").text(content1);
    //请求排序接口
    sortQuickReply();
}
function sortQuickReply(){
    var $lis = $(".reply-list2 li"),
        len = $lis.length,
        ids = [];
    
    for(i=0; i<len; i++){
        var $li = $($lis[i]),
            id = $li.data("id");
        ids.push(id);
    }
    //重新排序
    var params = {
        id: ids.join(","),
        type: 1 //"type":1,//快捷回复类型(1为续方咨询,0为健康咨询)
    };
    consultingAPI.sortList(params).then(function(res){
        consultingAPI.getReplyList({type: 1}).then(function(res){
            if(res.status == 200){
                formatReplyList(res.data);
            }
        })
    })
}
function saveNewReply(text, layerIndex){
    var params = {
        content: text,
        type: 1
    }
    consultingAPI.addQuickReply(params).then(function(res){
        if(res.status == 200){
            showSuccessMsg("保存成功");
            consultingAPI.getReplyList({type: 1}).then(function(res){
                if(res.status == 200){
                    formatReplyList(res.data);
                    //重新渲染列表
                    var html = template('reply_tmp', {list: quickReplyList});
                    var preLayerIndex = layerIndex - 1;
                    $("#layui-layer"+preLayerIndex).find(".layui-layer-content").empty().append(html);
                    layer.close(layerIndex);
                }
            })
        }else{
            showErrorMsg(res.msg);
        }
    });
}

+ 34 - 4
js/buz/prescription-tabs.js

@ -18,38 +18,47 @@ var reqLinkList = []; //记录切换tab时访问的路径集合,方便返回
//初始tab的链接
var links = [{
    index: 1,
    url: 'prescription-consulting.html?from=tab&sessionId='+sessionId,
    name: '咨询',
    class: ''
},{
    index: 2,
    url: 'prescription-detail.html?from=tab&code='+prescriptionCode+'&id='+teamCode,
    name: '续方详情',
    class: ''
},{
    index: 3,
    url: 'order-tracking.html?from=tab&code='+prescriptionCode,
    name: '订单跟踪',
    class: '',
},{
    index: 4,
    url: 'body-record.html?from=tab&patiCode='+patiCode,
    name: '体征记录',
    class: ''
},{
    index: 5,
    url: 'jianchajianyan.html?from=tab&patient='+patiCode,
    name: '检查检验',
    class: ''
},{
    index: 6,
    url: 'jw-prescription-list.html?from=tab&patient='+patiCode,
    name: '诊断/处方',
    class: ''
},{
    index: 7,
    url: 'prescription-list.html?from=tab&teamCode='+teamCode+'&patient='+patiCode,
    name: '历史续方',
    class: ''
},{
    url: '',
    index: 8,
    url: 'fv-survey.html?from=tab&fv_id='+fv_id+'&code='+prescriptionCode,
    name: '问卷调查',
    class: ''
},{
    index: 9,
    url: 'page/followup/followup-main.html?fv_id='+fv_id+'&patiCode='+patiCode+'&fv_class='+fv_class,
    name: '随访记录',
    class: ''
@ -133,7 +142,7 @@ function initPage(){
            var url = links[tab].url+'&from=tab&fromTabIdx='+fromTabIdx;
        }
        
//      parent.document.getElementById('main').src = url;
        parent.document.getElementById('main').src = url;
    })
}
@ -153,7 +162,19 @@ function toPrePrescriptionTab() {
    history.go(-1);
}
top.toPrePrescriptionTab = toPrePrescriptionTab
top.toPrePrescriptionTab = toPrePrescriptionTab;
//跳转去置顶的tab
function gotoPrescriptionTab(index){
    console.log(index);
    var url = links[index -1].url;
    console.log(url);
    $("#tabs li").removeClass("active");
    $("#tabs li").eq(index -1).addClass("active");
    reqLinkList.push(url);
    parent.document.getElementById('main').src = url;
}
parent.gotoPrescriptionTab = gotoPrescriptionTab;
function getPrescriptionInfo(){
    patiCode = sessionId.split("_")[0];
@ -217,38 +238,47 @@ function getPrescriptionInfoByCode(){
function updateLinkInfo(){
    links = [{
        index: 1,
        url: 'prescription-consulting.html?from=tab&sessionId='+sessionId,
        name: '咨询',
        class: ''
    },{
        index: 2,
        url: 'prescription-detail.html?from=tab&code='+prescriptionCode+'&id='+teamCode,
        name: '续方详情',
        class: ''
    },{
        index: 3,
        url: 'order-tracking.html?from=tab&code='+prescriptionCode,
        name: '订单跟踪',
        class: '',
    },{
        index: 4,
        url: 'body-record.html?from=tab&patiCode='+patiCode,
        name: '体征记录',
        class: ''
    },{
        index: 5,
        url: 'jianchajianyan.html?from=tab&patient='+patiCode,
        name: '检查检验',
        class: ''
    },{
        index: 6,
        url: 'jw-prescription-list.html?from=tab&patient='+patiCode,
        name: '诊断/处方',
        class: ''
    },{
        index: 7,
        url: 'prescription-list.html?from=tab&teamCode='+teamCode+'&patient='+patiCode,
        name: '历史续方',
        class: ''
    },{
        url: '',
        index: 8,
        url: 'fv-survey.html?from=tab&fv_id='+fv_id+'&code='+prescriptionCode,
        name: '问卷调查',
        class: ''
    },{
        index: 9,
        url: 'page/followup/followup-main.html?fv_id='+fv_id+'&patiCode='+patiCode+'&fv_class='+fv_class,
        name: '随访记录',
        class: ''

+ 52 - 0
js/consulting-api.js

@ -48,6 +48,58 @@
        //通过续方code,获得续方详情
        getPrescriptionInfoByCode: function(data){
            return APIService.httpGet('doctor/prescriptionInfo/getContinuedPrescriptionAsDoctor', data);
        },
        //快捷回复列表
        getReplyList: function(data){
            return APIService.httpPost('/doctor/reply/list', {data: data});
        },
        //发送血糖血压快捷回复咨询
        addPrescriptionBloodStatusConsult: function(data){
            return APIService.httpPost('/doctor/consult/addPrescriptionBloodStatusConsult', {data: data});
        },
        //发送问卷快捷回复咨询
        addPrescriptionFollowupContentConsult: function(data){
            return APIService.httpPost('/doctor/consult/addPrescriptionFollowupContentConsult', {data: data});
        },
        //获得问卷列表
        getFollowupCountList: function(data){
            return APIService.httpGet("/doctor/prescription/followupcontent/list", {data: data});
        },
        //删除快捷回复内容
        deleteQuickReply: function(data){
            return APIService.httpPost("doctor/reply/delete", {data: data});
        },
        //添加快捷回复内容
        addQuickReply: function(data){
            return APIService.httpPost("/doctor/reply/add", {data: data});
        },
        //修改快捷回复
        modifyQuickReply: function(data){
            return APIService.httpPost('/doctor/reply/modify', {data: data});
        },
        //快捷回复排序
        sortList: function(data){
            return APIService.httpPost('doctor/reply/sortList', {data: data});
        },
        //续方药品导入随访记录
        importdrugs: function(data){
            return APIService.httpPost('/doctor/prescription/followupcontent/importdrugs', {data: data});
        },
        //续方续方患者的血糖导入随访记录
        importbloodsugar: function(data){
            return APIService.httpPost('/doctor/prescription/followupcontent/importbloodsugar', {data: data});
        },
        //续方续方患者的血压导入随访记录
        importbloodpressure: function(data){
            return APIService.httpPost('/doctor/prescription/followupcontent/importbloodpressure', {data: data});
        },
        //问卷导入随访记录
        importfollowupcontent: function(data){
            return APIService.httpPost('/doctor/prescription/followupcontent/importfollowupcontent', {data: data});
        },
        //获得问卷详情
        getSurveyInfo: function(data){
            return APIService.httpGet('/doctor/prescription/followupcontent/getinfo', {data: data});
        }
    };

+ 5 - 1
jw-prescription-info.html

@ -20,6 +20,10 @@
    .container{
        width: 100% !important;
    }
    .btn-blue {
        background-color: #12b7f5;
        color: #fff;
    }
    </style>
</head>
<body class="white-bg plr10">
@ -27,7 +31,7 @@
    </div>
    <div class="c-tac mb20 mt20">
        <button id="fvBtn" type="button" class="btn btn-w-m btn-primary mlr20" style="display: none;">填入随访记录</button>
        <button id="fvBtn" type="button" class="btn btn-w-m btn-blue mlr20" style="display: none;">填入随访记录</button>
        <button id="backBtn" type="button" class="btn btn-w-m btn-danger mlr20">返回</button>
    </div>

+ 95 - 5
prescription-consulting.html

@ -15,6 +15,7 @@
    <link href="css/plugins/toastr/toastr.min.css" rel="stylesheet">
    <link href="js/plugins/fancybox/jquery.fancybox.css" rel="stylesheet">
    <link href="js/plugins/artDialog/6.0.5/api/css/ui-dialog.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="js/plugins/layer/skin/layer.css"/>
    <link href="css/style.css" rel="stylesheet">
    <link rel="stylesheet" href="css/consulting.css">
    <link rel="stylesheet" href="css/plugins/plyr/plyr.css">
@ -33,16 +34,25 @@
            
        </div>
        <div class="ui-col-1" style="height: 100%">
            <div class="ptb20 plr10" id="prescriptionInfo"></div>
            <div style="height: calc(100% - 102px)">
                <div class="ptb20 plr10" id="prescriptionInfo"></div>
            </div>
            <div class="text-center">
                <div class="mb30"><a class="link-blue import-drugs">填入随访记录</a></div>
                <span class="status-btn"></span>
            </div>
        </div>
        <div class="quick-reply-panel">
            <ul class="reply-list">
                
            </ul>
        </div>
    </div>
    <div class="input-panel">
        <div class="action-panel">
            <i class="fa fa-picture-o c-666" onclick="file_head.click()"></i>
            <span class="consult-icon icon-image" onclick="file_head.click()"></span>
            <input type="file" class="hidden" id="file_head" accept="image/*">
            <span class="consult-icon icon-reply" onclick="showQuickReplyPanel(this)"></span>
        </div>
        <div id="input_content" type="text" class="input-msg width-100" ></div>
        <button class="btn send-btn" type="button"><i class="fa fa-send mr5"></i>发送</button>
@ -55,7 +65,7 @@
    <!-- 消息模板 -->
    <script type="text/html" id="msg_tmp">
        <div class="time-tips"><span>{{time}}</span></div>
        <dl class="{{if isSelf}}chat-right{{else}}chat-left{{/if}}">
        <dl class="{{if isSelf}}chat-right{{else}}chat-left{{/if}} {{if type==17}}mb10-i{{/if}}">
            <dt style="height: auto; text-align: center;">
                <img src="{{img}}" class="images-cycle"/>
            </dt>
@ -124,20 +134,68 @@
                <a href="javascript:void(0);" class="view-detail c-f14">点此查看详情</a>
            </dd>
            {{/if}}
            <!-- 添加随访相关的体统消息 -->
            {{if type == 16}}
            {{if isSelf}}
            <dd class="word-bread msg-fv">
                <div class="fv-content">
                    <span class="c-333 c-f14 bgc-fff">{{content.text}}</span>
                </div>
            </dd>
            {{else}}
            <dd class="word-bread sys-msg">
                <div class="c-f14 sys-header mb5">
                    <img src="img/xitongtixing_im_icon.png" width="14">本消息为系统提示
                </div>
                <p class="c-333 c-f14">{{content.tzMsg}}</p>
                <p class="c-333 c-f14">{{content.tzTime}}</p>
                <p class="c-333 c-f14">
                    {{content.tzAlert}}
                    {{if content.needUpload == "false"}}
                    <a href="javascript:void(0);" class="import-fv c-f14 link-blue" data-type="{{content.type}}" data-health="{{content.healthindexid}}">自动填入本次随访记录</a>
                    {{/if}}
                </p>
            </dd>
            {{/if}}
            {{/if}}
            {{if type == 17}}
            {{if isSelf}}
            <dd class="word-bread msg-fv">
                <div class="fv-content">
                    <span class="c-333 c-f14 bgc-fff">{{content.text}}</span>
                </div>
            </dd>
            {{else}}
            <dd class="word-bread sys-msg">
                <div class="c-f14 sys-header mb5">
                    <img src="img/xitongtixing_im_icon.png" width="14">本消息为系统提示
                </div>
                <p class="c-333 c-f14">
                    {{content.text}}
                    <a href="javascript:void(0);" class="view-survey c-f14 link-blue" data-type="{{content.msgType}}">查看</a>
                </p>
            </dd>
            {{/if}}
            {{/if}}
        </div>
        </dl>
        {{if type == 17 && isSelf}}
        <div class="text-center">
            <span class="fv-remind">{{content.doctorremind}}</span>
        </div>
        {{/if}}
    </script>
    <script type="text/html" id="prescriptionInfo_tmp">
        <h4 class="text-center">{{symptoms}}-续方咨询</h4>
        <p class="mt20">诊断结果</p>
        <p class="mt20">诊断结果:</p>
        <p>
            {{each prescriptionDt as dt}}
            {{dt.name}}
            {{/each}}
        </p>
        <p class="mt30">药品</p>
        <p class="mt30">药品:</p>
        <ul class="" style="padding:0">
            {{each prescriptionInfo as dg}}
            <li class="ui-grid">
@ -147,6 +205,37 @@
            {{/each}}
        </ul>
    </script>
    
    <!--快捷回复模板-->
    <script type="text/html" id="quick_reply_tmp">
        {{each list as it}}
        <li data-json="{{it | getJsonStr}}" class="reply-item">
            {{it.content}}
        </li>
        {{/each}}
        <li data-name="add" class="c-12b7f5 addMore"><img src="img/tianjia_icon.png" class="mr5">更多快捷回复</li>
    </script>
    <!--快捷回复列表模板 -->
    <script type="text/html" id="reply_tmp">
        <ul class="reply-list2">
        {{each list as it index}}
        <li data-json="{{it | getJsonStr}}" data-id="{{it.id}}" class="flex-box-li reply-item">
            <div class="col-0" style="width:30px;">
                <img src="img/qingchu_icon.png" class="del-icon">
            </div>
            <div class="col-1 mr10 content work-break">{{it.content}}</div>
            <div class="col-0" style="width:60px;">
                {{if index > 0}}
                <img src="img/shanyi_icon.png" class="mr10 up-icon">
                {{else}}
                <span style="margin-right: 33px;"></span>
                {{/if}}
                <img src="img/xiayi_icon.png" class="down-icon">
            </div>
        </li>
        {{/each}}
        </ul>
    </script>
</body>
<script>
    (function(d,u){var a=new XMLHttpRequest(),b=d.body;if("withCredentials" in a){a.open("GET",u,true);a.send();a.onload=function(){var c=d.createElement("div");c.setAttribute("hidden","");c.innerHTML=a.responseText;b.insertBefore(c,b.childNodes[0])}}})(document, "css/plugins/plyr/sprite.svg");
@ -161,6 +250,7 @@
<script src="js/plugins/pace/pace.min.js"></script>
<script src="js/plugins/toastr/toastr.min.js"></script>
<script src="js/es6-promise.js"></script>
<script src="js/underscore.js" type="text/javascript" charset="utf-8"></script>
<script src="js/util.js"></script>
<script src="js/template.js"></script>
<script src="js/api-service.js"></script>