<!DOCTYPE html>
<html>
<head>
    <title>中医工作量查询（克区）</title>
    <link rel="stylesheet" href="../../lib/bootstrap/dist/css/bootstrap.min.css" />
    <link rel="stylesheet" href="../../css/site.css" />
    <script src="../../lib/jquery/dist/jquery.min.js"></script>
    <script src="../../lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <script src="../../lib/jquery.cookie/jquery.cookie.min.js"></script>
    <script src="../../lib/vue/vue.min.js"></script>
    <script src="../../js/site.js" asp-append-version="true"></script>

    <style type="text/css">
        @page {
            size: auto;
        }
    </style>
</head>
<body>
    <div id="findPerson" class="table">
        <div id="result" v-if="result.length > 0">
            <table class="table">
                <thead>
                    <tr>
                        <th colspan="5">中医工作量查询（克区）</th>
                    </tr>
                    <tr>
                        <th>工号</th>
                        <th>姓名</th>
                        <th>高血压中医干预</th>
                        <th>糖尿病中医干预</th>
                        <th>老年人中医干预</th>
                        <th>孕产妇中医干预</th>
                        <th>七岁以下儿童中医干预</th>
                        <th>中医体质辨识</th>
                        <th>总量</th>
                        <th>开始时间</th>
                        <th>结束时间</th>
                    </tr>
                </thead>
                <tfoot>
                    <tr>
                        <th colspan="5">打印时间：{{printTime}}</th>
                    </tr>
                </tfoot>
                <tbody>
                    <tr v-for="i in result">
                        <td>{{i.工号}}</td>
                        <td>{{i.姓名}}</td>
                        <td>{{i.高血压中医干预}}</td>
                        <td>{{i.糖尿病中医干预}}</td>
                        <td>{{i.老年人中医干预}}</td>
                        <td>{{i.孕产妇中医干预}}</td>
                        <td>{{i.七岁以下儿童中医干预}}</td>
                        <td>{{i.中医体质辨识}}</td>
                        <td>{{i.总量}}</td>
                        <td>{{i.开始时间}}</td>
                        <td>{{i.结束时间}}</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <script type="text/javascript">
        var findPersonPrint = new Vue({
            el: "#findPerson",
            data: {
                url: myjs.urls.getresult,
                result: [],
                printTime: "",
                rc: -1,
            },
            created() {
                var _this = this;
                var sql = myjs.getSqlStr();
                console.log(sql);
                this.rc = 1;
                myjs.post(this.url, { sql: sql }, function (d) {
                    findPersonPrint.result = d;
                    _this.rc--;
                });
                this.rc++;
                myjs.GetServerTime("yyyy年MM月dd日", function (r) {
                    _this.printTime = r;
                    _this.rc--;
                });
            },
            methods: {
            },
            watch: {
                rc(newName, oldName) {
                    if (newName == 0) {
                        setTimeout("alert('按ctrl+P打印')", 1000);
                    }
                }
            }
        });
    </script>
</body>
</html>

