123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <!doctype html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <meta charset="utf-8">
- <title>添加血压</title>
- <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
- <link rel="stylesheet" type="text/css" href="../../../iconfont/iconfont.css" />
- <link rel="stylesheet" type="text/css" href="../css/ss-style.css" />
- <link rel="stylesheet" type="text/css" href="../../../css/cross.ui.css" />
- </head>
- <body>
- <div class="c-main">
- <!--<div class="h45">
- <div class="demo-comtop">
- <a class="mui-action-back"></a>
- <h1>血压</h1>
- </div>
- </div>-->
- <div class="wis-fix c-border-b mt15">
- <ul class="c-list patient-list c-border-t mt fosx-li" data-list="patientInfo">
- <li>
- <div class="c-list-value pr30" style="width: 100px;">
- <h4><em class="star"></em>记录时间</h4>
- </div>
- <div class="c-list-info">
- <div class="input-group width-100">
- <input type="text" class="form-control width-100 no-border" style="background: #FFFFFF;" placeholder="请输入记录时间" data-time="date" value="" id="date">
- <span class="form-select-arrow"></span>
- </div>
- </div>
- </li>
- <li>
- <div class="c-list-value pr30" style="width: 100px;">
- <h4><em class="star"></em>收缩压(高压)</h4>
- </div>
- <div class="c-list-info">
- <div class="input-group width-100">
- <input type="text" class="form-control width-100 no-border" style="background: #FFFFFF;" placeholder="请输入数值" data-val="weight" value="" id="val_h">
- </div>
- </div>
- </li>
- <li>
- <div class="c-list-value pr30" style="width: 100px;">
- <h4><em class="star"></em>舒张压(低压)</h4>
- </div>
- <div class="c-list-info">
- <div class="input-group width-100">
- <input type="text" class="form-control width-100 no-border" style="background: #FFFFFF;" placeholder="请输入数值" data-val="weight" value="" id="val_l">
- </div>
- </div>
- </li>
- </ul>
- </div>
- <p class="c-f16 c5b plr15 pt10">收缩压 正常范围:<span id="minValue1">90</span>-<span id="maxValue1">139</span>mmHg</p>
- <p class="c-f16 c5b plr15 pt10">舒张压 正常范围:<span id="minValue2">60</span>-<span id="maxValue2">89</span>mmHg</p>
- <div class="bottom-box clearfix mt20 plr15">
- <a href="javascript:;" id="save" class="c-btn-full c-btn-4dcd70 c-btn-radius fl c-f18">保存</a>
- </div>
- </div>
- </body>
- <script src="../../../js/jquery/2.1.3/jquery.js"></script>
- <script src="../../../widget/mobiscroll/2.15.1/js/mobiscroll.js"></script>
- <script src="../../../widget/artDialog/6.0.5/js/dialog-plus.min.js"></script>
- <script src="../../../js/common_http.js"></script>
- <script type="text/javascript" src="../../../js/weixin_common.js" ></script>
- <link rel="stylesheet" type="text/css" href="../../../widget/mobiscroll/2.15.1/css/mobiscroll.css">
- <link rel="stylesheet" type="text/css" href="../../../widget/artDialog/6.0.5/css/ui-dialog.min.css">
- <script type="text/javascript" src="../../../js/mui.min.js"></script>
- <script src="../js/health-index.js"></script>
- <script>
- $(function() {
- //queryWarning();
- document.getElementById("save").addEventListener("tap", function() {
- var record_date = document.getElementById("date").value;
- var val_h = document.getElementById("val_h").value;
- var val_l = document.getElementById("val_l").value;
- if(!record_date){
- dialog({contentType:'tipsbox', skin:'bk-popup' , content:'请选择记录时间'}).show();
- return ;
- }
- var p = /^[1-9]([0-9])*$/;
- if(!val_h || !p.test(val_h)){
- dialog({contentType:'tipsbox', skin:'bk-popup' , content:'请输入收缩压,数值为正整数'}).show();
- return ;
- }
- if(!val_l || !p.test(val_l)){
- dialog({contentType:'tipsbox', skin:'bk-popup' , content:'请输入舒张压,数值为正整数'}).show();
- return ;
- }
- //发送请求到服务器
- addHealthIndex("", record_date, val_h, val_l, 0, 0, 0, 0, 0, 2, addBloodPressureSuccess);
-
- })
- });
- $(function() {
- /* 选择日期 */
- $('input')
- var opt1 = {
- preset: 'date',
- theme: 'ios',
- lang: 'zh',
- minDate: new Date(1900, 01, 01)
- };
- $('input[data-time=date]').mobiscroll(opt1);
- var opt3 = { //血糖时间段
- theme: 'ios',
- lang: 'zh',
- formatValue: function(d) {
- return d.join(',');
- },
- customWheels: true,
- wheels: [
- [{
- keys: ['1', '2', '3', '4', '5', '6', '7'],
- values: ['空腹血糖', '早餐后血糖', '午餐前血糖', '午餐后血糖', '晚餐前血糖', '晚餐后血糖', '睡前血糖']
- }]
- ],
- onSelect: function(valueText, inst) {
- console.info(valueText)
- var dd = eval("[" + valueText + "]");
- $('input[data-val=xuetang]').val(dd[0].values);
- },
- onShow: function() {
- ss.mobiscroll('selectWheel', ['2'], 1000, true);
- }
- };
- var xt = $('input[data-val=xuetang]').mobiscroll(opt3);
- })
-
- //查询预警成功
- function queryWarningSuccesss(res) {
- if (res.status == 200) {
- var standard = res.data.standard;
- var custom = res.data.custom;
- if(custom.length > 0){
- for (var i = 0; i < custom.length; i++) {
- var list = custom[i];
- if(list.type == 2){
- document.getElementById("minValue1").innerHTML = list.min_value_1;
- document.getElementById("maxValue1").innerHTML = list.max_value_1;
- document.getElementById("minValue2").innerHTML = list.min_value_2;
- document.getElementById("maxValue2").innerHTML = list.max_value_2;
- }
- }
- }
- else{
- for (var i = 0; i < standard.length; i++) {
- var list = standard[i];
- if(list.type == 2){
- document.getElementById("minValue1").innerHTML = list.min_value_1;
- document.getElementById("maxValue1").innerHTML = list.max_value_1;
- document.getElementById("minValue2").innerHTML = list.min_value_2;
- document.getElementById("maxValue2").innerHTML = list.max_value_2;
- }
- }
- }
- d.close();
- } else {
- queryListFailed(res);
- }
- }
- </script>
- </html>
|