增加中医统计报表

This commit is contained in:
falcon 2020-06-19 16:27:52 +08:00
parent e61bc19123
commit e0f9e3d359
3 changed files with 196 additions and 1 deletions

View File

@ -8,7 +8,7 @@
},
"AllowedHosts": "*",
"Database": {
"ReportService": "Server=.\\SQLSERVER2008R2;Database=ReportService;User ID=sa;Password=111"
"ReportService": "Server=.\\SQLSERVER2008R2;Database=EASY_HEALTHRECORDS;User ID=sa;Password=111"
},
"urls": "http://*:9000;https://*:9001"
}

View File

@ -0,0 +1,94 @@
<div id="findPerson">
<div id="para" class="reportFilter">
<input type="hidden" name="ProcedureName" v-model="ProcedureName" />
<input type="hidden" name="reportName" v-model="reportName" />
<input type="hidden" name="sqlStr" v-model="sqlStr" />
<!--<input type="hidden" name="uid" v-model="uid" />
<input type="hidden" name="uName" v-model="uName" />-->
<!--以下部分为查询条件,根据实际需要修改-->
<label>开始时间:<input name="Kssj" type="date" value="" placeholder="输入开始时间" /></label>
<label>结束时间:<input name="Jssj" type="date" value="" placeholder="输入结束时间" /></label>
<button class="btn btn-primary" v-on:click="find">查询</button>
<button class="btn btn-primary" v-on:click="print">打印</button>
<button class="btn btn-primary" v-on:click="down" v-if="result.length > 0">下载EXCEL</button>
<!--可修改部分结束-->
</div>
<div id="result" v-if="result.length > 0">
<!--以下部分为存储过程返回数据,根据实际需要修改-->
<table class="table reportTable" id="resultTable">
<thead>
<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>
<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 findPerson = new Vue({
el: "#findPerson",
data: {
//存储过程名称
ProcedureName: "CS_zdy_zygygzltj",
//报表名称
reportName: "中医/中医工作量查询",
//除非你知道以下数据含义,否则不要修改
sqlStr: "",
url: myjs.urls.getresult,
result: [],
uid: "",
uName: "",
},
created() {
this.uid = myjs.getUId();
this.uName = myjs.getUName();
},
methods: {
find() {
var sql = myjs.createSql("#para");
this.sqlStr = sql;
console.log(sql);
myjs.post(this.url, { sql: sql }, function (d) {
findPerson.result = d;
});
},
print() {
var sql = myjs.createSql("#para");
this.sqlStr = sql;
myjs.print();
},
down() {
myjs.toExcel.tableToExcel("resultTable", this.reportName);
},
}
});
</script>

View File

@ -0,0 +1,101 @@
<!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>