forked from kidgrow-microservices-platform

zhaoxiaohao
2021-04-22 d6c989a5d9122e5cf969dd640a92b8e12caf8aa6
kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/keaigao/AdvisoryManager_form.html
@@ -19,7 +19,7 @@
                <div class="layui-input-block" id="createTime" style="width: 245px;"/>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">开通服务</label>
                <label class="layui-form-label">咨询状态</label>
                <div class="layui-input-block" id="service"/>
            </div>
        </div>
@@ -48,7 +48,7 @@
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label" style="width: 10px;"></label>
                <div style="width: 450px; padding-left: 40px; text-align: left" id="img"/>
                <div style="width: 450px;max-height:100px; min-height: 10px; padding-left: 40px; text-align: left" id="img"/>
            </div>
        </div>
    </div>
@@ -140,14 +140,16 @@
            $("#createTime").html(adisory.createTime);
            if (adisory.type == 1) {
            if (adisory.consultationStatus == 1) {
                $("#service").html("待咨询");
            } else if (adisory.type == 2) {
            } else if (adisory.consultationStatus == 2) {
                $("#service").html("咨询中");
            } else if (adisory.type == 3) {
            } else if (adisory.consultationStatus == 3) {
                $("#service").html("待完成");
            } else if (adisory.type == 4) {
            } else if (adisory.consultationStatus == 4) {
                $("#service").html("已完成");
            } else if (adisory.consultationStatus == -1) {
                $("#service").html("已取消");
            }
            $("#doctor").html(adisory.doctorName);
@@ -158,16 +160,18 @@
            if (adisory.img !== null) {
                var url = adisory.img.split(",");
                for (var i = 0; i < url.length; i++) {
                    content += "<img src='" + url[i] + "' style='width: 25%;height: 25%'/> &nbsp;";
                    if(url[i] != ''){
                        content += "<img src='" + url[i] + "' style='width: 25%;max-height: 120px;cursor:pointer;' onclick='tipImg(this,1)'/> &nbsp;";
                    }
                }
            }
            $("#img").html(content);
            $("#one").html(adisory.age + "/" + adisory.childSex == 0 ? "女" : "男");
            $("#two").html(adisory.targetHeight + "/" + adisory.targetHeightPer);
            $("#three").html(adisory.height + "/" + adisory.heightPer);
            $("#four").html(adisory.weight + "/" + adisory.bmi);
            $("#five").html(adisory.foreastHeight);
            $("#two").html(keepOneDecimal(adisory.targetHeight) + "/" + keepOneDecimal(adisory.targetHeightPer));
            $("#three").html(keepOneDecimal(adisory.height) + "/" + keepOneDecimal(adisory.heightPer));
            $("#four").html(keepOneDecimal(adisory.weight) + "/" + keepOneDecimal(adisory.bmi));
            $("#five").html(keepOneDecimal(adisory.foreastHeight));
            if(adisory.type == 2) {
                $("#appointmentTime").html(adisory.appointmentTime);
@@ -186,6 +190,50 @@
            form.render();
        }
    })
    ;
    });
    function tipImg(obj,level){
        try{
            var navigatorName = "Microsoft Internet Explorer";
            if( navigator.appName != navigatorName ){
                if(obj.nodeName == 'IMG'){
                    var e = window.event;
                    var src = obj.src;
                    var width = obj.naturalWidth/3;
                    var height = obj.naturalHeight/3;
                    var x = (document.documentElement.clientWidth-width)/2;
                    var y = (document.documentElement.clientHeight-height)/2;
                    var curlayer;
                    if(!level){
                        curlayer = layer;
                    }else if(level==1){
                        curlayer = parent.layer;
                    }
                    var img_infor = "<img width='" + width + "' height='" + height + "' border='0' src='" + src + "' />";
                    bigImgIndex = curlayer.open({
                        content:img_infor,
                        type:1,
                        offset:[y+"px",x+"px"],
                        title:false,
                        area:['auto','auto'],
                        shade:0,
                        closeBtn:1
                    });
                }
            }
        }catch(e){
        }
    }
    function keepOneDecimal(obj){
        if(obj == '' || obj == null){
            return "";
        }
        if(isNaN(obj)){
            return obj;
        }
        return parseFloat(obj).toFixed(1);
    }
</script>