Browse Source

康复管理-新增康复计划按钮页面对接

zhangyanfang 6 years ago
parent
commit
2da10caf36
2 changed files with 19 additions and 16 deletions
  1. 1 2
      app/rehabilitation/html/health_control.html
  2. 18 14
      app/rehabilitation/js/health_control.js

+ 1 - 2
app/rehabilitation/html/health_control.html

@ -17,7 +17,6 @@
    <link rel="stylesheet" href="../../../plugins/layui-v2.3.0/layui/css/layui.css">
    <link rel="stylesheet" href="../css/health_control.css">
</head>
<body>
    <div id="app" v-cloak>
        <div class="re-title no-select">
@ -72,7 +71,7 @@
                今日代办
            </label>
            <div class="neironglef">
                <button>新康复安排</button>
                <button @click="newRecover()">新康复安排</button>
                <button>模版管理</button>
            </div>
        </div>

+ 18 - 14
app/rehabilitation/js/health_control.js

@ -25,10 +25,13 @@ layui.use('element', function () {
            } else {
                isStop = num == 0 ? 1 : 0
            }
          
            var params = {
                status: isStop,
                planId: planid
            }
            healthAPI.updatePlanStatusById(params).then(function (res) {
                if (res.status == 200) {
                    getDat()
@ -78,24 +81,22 @@ layui.use('element', function () {
                        var allFinishCount = val[i].allFinishCount
                        var allCount = val[i].allCount
                        var isStop = val[i].status
                        var isname = val[i].name
                        var ishospitalName=val[i].hospitalName
                        if(ishospitalName==null){
                            
                        }
                        if (isStop == 0) {
                            $(".layui-progress-bar").css({
                                "background-color": "gray"
                            })
                            $("#button_id").html("激活计划")
                        } else {
                            $(".layui-progress-bar").css({
                                "background-color": "#ff9526"
                            })
                            $("#button_id").html("终止计划")
                        }
                        if (isStop == 0) {
                            $( $(".layui-progress-bar")[i]).css({
                                 "background-color": "gray"
                             })
                            $($("#button_id")[i]).html("激活计划")
                         } else {
                             $($(".layui-progress-bar")[i]).css({
                                 "background-color": "#ff9526"
                             })
                             $($("#button_id")[i]).html("终止计划")
            
                         }
                        var progressNum = Math.ceil((allFinishCount / allCount) * 100)
                        Progress(val[i].id, progressNum + "%")
@ -262,6 +263,9 @@ layui.use('element', function () {
                conFirm("确定终止该计划吗", data.status, vm.isStop, vm.planid, vm.getDatas)
            },
            newRecover:function(){
                location.href="../../recover/html/new_recover.html"
            }
        }