<template>
|
<div class="app-container">
|
<el-form
|
:model="queryParams"
|
ref="queryForm"
|
size="small"
|
:inline="true"
|
label-width="68px"
|
>
|
<el-form-item label="时间" prop="createTimeList">
|
<el-date-picker
|
clearable
|
v-model="createTimeList"
|
@change="dateChangebirthday1"
|
:default-time="['00:00:00', '23:00:00']"
|
format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
type="daterange"
|
range-separator="-"
|
start-placeholder="开始日期"
|
end-placeholder="结束日期"
|
:picker-options="pickerOptions"
|
></el-date-picker>
|
</el-form-item>
|
<el-form-item label="单位" prop="compId">
|
<el-select
|
v-model="queryParams.compId"
|
placeholder="请选择单位"
|
clearable
|
style="width: 200px"
|
@change="cmp"
|
>
|
<el-option
|
v-for="dict in compList"
|
:key="dict.drugManufacturerId"
|
:label="dict.cnName"
|
:value="dict.drugManufacturerId"
|
/>
|
</el-select>
|
<!-- <el-input v-model="queryParams.compId" placeholder="请输入单位" clearable @keyup.enter.native="handleQuery" style="width: 170px"/> -->
|
</el-form-item>
|
<el-form-item label="部门" prop="deptName">
|
<el-input
|
v-model="queryParams.deptName"
|
placeholder="请输入部门"
|
clearable
|
@keyup.enter.native="handleQuery"
|
style="width: 200px"
|
/>
|
</el-form-item>
|
<el-form-item label="单位部门" prop="dwDeptId">
|
<el-select
|
v-model="queryParams.dwDeptId"
|
placeholder="请选择单位部门"
|
clearable
|
style="width: 200px"
|
@change="dw"
|
>
|
<el-option
|
v-for="dict in dwList"
|
:key="dict.id"
|
:label="dict.dwDeptName"
|
:value="dict.id"
|
/>
|
</el-select>
|
<!-- <el-input v-model="queryParams.dwDeptId" placeholder="请输入单位部门" clearable @keyup.enter.native="handleQuery" style="width: 110px"/> -->
|
</el-form-item>
|
<el-form-item label="分组" prop="groupingId">
|
<el-select
|
v-model="queryParams.groupingId"
|
placeholder="请选择分组"
|
clearable
|
style="width: 200px"
|
@change="dw"
|
>
|
<el-option
|
v-for="dict in gropList"
|
:key="dict.id"
|
:label="dict.groupingName"
|
:value="dict.id"
|
/>
|
</el-select>
|
<!-- <el-input v-model="queryParams.groupingId" placeholder="请输入分组" clearable @keyup.enter.native="handleQuery" style="width: 110px"/> -->
|
</el-form-item>
|
<!-- <el-form-item label="病种名称" prop="name">
|
<el-input
|
v-model="queryParam.name"
|
placeholder="请输入部门"
|
clearable
|
@keyup.enter.native="handleQuery"
|
style="width: 200px"
|
/>
|
</el-form-item> -->
|
<el-form-item>
|
<el-button
|
type="primary"
|
icon="el-icon-search"
|
size="mini"
|
@click="handleQuery"
|
style="margin: 0 15px;"
|
>查询</el-button
|
>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
>重置</el-button
|
>
|
</el-form-item>
|
</el-form>
|
|
<el-row :gutter="10" class="mb8">
|
<el-col :span="1.5">
|
<el-button type="primary" size="mini" @click="tongji" style="margin: 0 15px;"
|
>统计结果</el-button
|
>
|
</el-col>
|
<!-- <el-col :span="1.5">
|
<el-button type="primary" size="mini" @click="clear"
|
>清空已选输出列</el-button
|
>
|
</el-col> -->
|
</el-row>
|
|
<div style="width: 100%; margin-left: 10px; display: flex">
|
<div style="width: 40%; margin-right: 30px">
|
<el-table
|
border
|
:data="tableData"
|
style="width: 100%"
|
@selection-change="handleSelectionChanges"
|
>
|
<el-table-column type="selection" width="40" align="center" />
|
<el-table-column
|
prop="tjNumber"
|
label="体检号"
|
width="160"
|
align="center"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="name"
|
label="姓名"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="sex"
|
label="性别"
|
align="center"
|
width="70px"
|
:show-overflow-tooltip="true"
|
>
|
<template slot-scope="scope">{{
|
scope.row.sex === 0 ? "男" : "女"
|
}}</template>
|
</el-table-column>
|
<el-table-column
|
prop="age"
|
label="年龄"
|
align="center"
|
width="70"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="company"
|
label="单位"
|
align="center"
|
width="170px"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
<el-table-column
|
prop="department"
|
label="部门"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
</el-table-column>
|
</el-table>
|
</div>
|
|
<div style="width: 60%; display: flex">
|
<div class="outside1">
|
<el-input placeholder="输入关键字进行过滤" v-model="filterText">
|
</el-input>
|
<el-tree
|
ref="tree"
|
v-loading="loading"
|
:data="Treedata"
|
show-checkbox
|
node-key="proId"
|
:props="defaultProps"
|
@check-change="handleCurrentChecked"
|
:filter-node-method="filterNode"
|
>
|
</el-tree>
|
</div>
|
<div>
|
<el-table
|
:data="DataList"
|
style="width: 400px; margin-left: 40px"
|
border
|
>
|
<el-table-column prop="proName" label="已选项目列表" align="center">
|
</el-table-column>
|
</el-table>
|
</div>
|
</div>
|
</div>
|
<div style="margin-right: 64%">
|
<pagination
|
v-show="total > 0"
|
:total="total"
|
:page.sync="queryParams.page"
|
:limit.sync="queryParams.pageSize"
|
@pagination="getList"
|
/>
|
</div>
|
|
<!-- <div style="width: 100%; display: flex">
|
<el-pagination
|
v-show="totals > 0"
|
@size-change="handleSizeChange"
|
@current-change="handleCurrentChange"
|
:current-page="currentPage4"
|
:page-sizes="[10, 20, 30, 40]"
|
:page-size="10"
|
layout="total, sizes, prev, pager, next, jumper"
|
:total="totals"
|
>
|
</el-pagination>
|
</div> -->
|
<!-- 查看统计图 -->
|
<div class="dia">
|
<el-dialog
|
:title="title2"
|
:visible.sync="open"
|
width="1000px"
|
append-to-body
|
>
|
<!-- <div style="height: 620px; margin-top: 10px">
|
<div id="main" style="width: 95%; height: 400px"></div>
|
</div> -->
|
<!-- <el-card
|
class="box-card"
|
v-for="(item, index) in rongjiList"
|
:key="index"
|
>
|
<div slot="header" class="clearfix">
|
<span>{{ item.project.proName }}</span>
|
</div>
|
<div>
|
<el-table :data="item.zhengchang" style="width: 100%">
|
<el-table-column prop="orderDetailId" label="体检号" width="180">
|
</el-table-column>
|
<el-table-column prop="createBy" label="姓名" width="180">
|
</el-table-column>
|
</el-table>
|
<el-table :data="item.yichang" style="width: 100%">
|
<el-table-column prop="orderDetailId" label="体检号" width="180">
|
</el-table-column>
|
<el-table-column prop="createBy" label="姓名" width="180">
|
</el-table-column>
|
</el-table>
|
</div>
|
</el-card> -->
|
<el-collapse v-model="activeNames">
|
<el-collapse-item v-for="(item, index) in rongjiList" :key="index">
|
<template slot="title">
|
{{ item.project.proName }}
|
</template>
|
<div style="display: flex">
|
<div style="display: flex;flex-direction: column;width:50%" >
|
<span>正常</span>
|
<el-table border :data="item.zhengchang" style="width: 100%">
|
<el-table-column
|
prop="tjNumber"
|
label="体检号"
|
>
|
</el-table-column>
|
<el-table-column prop="cusName" label="姓名" >
|
</el-table-column>
|
</el-table>
|
</div>
|
<div style="display: flex;flex-direction: column;width:50%">
|
<span>异常</span>
|
<el-table border :data="item.yichang" style="width: 100%">
|
<el-table-column
|
prop="tjNumber"
|
label="体检号"
|
>
|
</el-table-column>
|
<el-table-column prop="cusName" label="姓名" >
|
</el-table-column>
|
</el-table>
|
</div><br>
|
|
</div>
|
</el-collapse-item>
|
</el-collapse>
|
</el-dialog>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
const echarts = require("echarts/lib/echarts");
|
require("echarts/lib/component/title");
|
require("echarts/lib/component/tooltip");
|
require("echarts/lib/component/legend");
|
require("echarts/lib/chart/pie");
|
import { getNewDateList } from "@/api/hosp/order";
|
import moment from "moment";
|
import VTreeTransfer from "../../system/tijian/TreeTransfer.vue";
|
import { projectGetList } from "@/api/system/tijian";
|
import {
|
getPeopleList,
|
getDeptAndDwDeptByComp,
|
getDwGroupingByDwDeptId,
|
getTjRules,
|
getStatist,
|
} from "@/api/team/disease";
|
import { listComp } from "@/api/system/comp";
|
import { getJieGuoFenXi } from "@/api/team/reportresults";
|
export default {
|
components: {
|
VTreeTransfer,
|
},
|
data() {
|
return {
|
activeNames: ["1"],
|
proIds: [],
|
filterText: "",
|
DataList: [],
|
loading: false,
|
defaultProps: {
|
children: "tjProjectList",
|
label: "proName",
|
},
|
Treedata: [],
|
rongjiList: [],
|
aids: [],
|
tjNums: [],
|
title2: "",
|
open: false,
|
currentPage4: 1,
|
gropList: [],
|
dwList: [],
|
compList: [],
|
total: 0,
|
totals: 0,
|
tableData: [],
|
tableData2: [],
|
createTimeList: [],
|
queryParam: {
|
name: null,
|
page: 1,
|
pageSize: 10,
|
groupingId: null,
|
},
|
queryParams: {
|
page: 1,
|
pageSize: 10,
|
compId: null,
|
deptName: null,
|
groupingId: null,
|
beginTime: null,
|
endTime: null,
|
dwDeptId: null,
|
},
|
pickerOptions: {
|
shortcuts: [
|
{
|
text: "最近一周",
|
onClick(picker) {
|
const end = new Date();
|
const start = new Date();
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
picker.$emit("pick", [start, end]);
|
},
|
},
|
{
|
text: "最近一个月",
|
onClick(picker) {
|
const end = new Date();
|
const start = new Date();
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
picker.$emit("pick", [start, end]);
|
},
|
},
|
{
|
text: "最近三个月",
|
onClick(picker) {
|
const end = new Date();
|
const start = new Date();
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
picker.$emit("pick", [start, end]);
|
},
|
},
|
],
|
},
|
};
|
},
|
created() {
|
this.getdate();
|
this.getNowTime();
|
|
this.getcomp();
|
this.getData();
|
this.datekey = Date.now();
|
},
|
watch: {
|
filterText(val) {
|
this.$refs.tree.filter(val);
|
},
|
},
|
methods: {
|
getdate() {
|
getNewDateList().then((res) => {
|
this.createTimeList = [
|
moment(res.data).format("YYYY-MM-DD 00:00:00"),
|
moment(res.data).format("YYYY-MM-DD 23:59:00"),
|
];
|
this.getList();
|
});
|
},
|
filterNode(value, data) {
|
if (!value) return true;
|
return data.proName.indexOf(value) !== -1;
|
},
|
getData() {
|
/** 查询部门下拉树结构 */
|
this.loading = true;
|
/** 查询部门下拉树结构 */
|
projectGetList().then((response) => {
|
this.Treedata = response.data.list;
|
this.Treedata.forEach(item => {
|
if(item.proParentId == "0"){
|
item.disabled = true
|
}
|
})
|
this.loading = false;
|
});
|
},
|
// 点击获取每个树节点
|
handleCurrentChecked(data, checked, checkedNodes) {
|
// if (!data.tjProjectList) {
|
// return;
|
// }
|
if (data.proParentId != "0") {
|
if (checked === true) {
|
this.DataList.push(data);
|
} else {
|
this.DataList.pop(data);
|
this.list1 = true;
|
}
|
}
|
|
// this.TotalPrice1 = 0;
|
// this.proIds = [];
|
// if (this.DataList.length != 0) {
|
// this.list1 = false;
|
// this.DataList.forEach((item) => {
|
// this.TotalPrice1 = item.proPrice + this.TotalPrice1;
|
// item.tjProjectList.forEach((item1) => {
|
// this.proIds.push(item1.proId);
|
// });
|
// });
|
// }
|
},
|
// / 处理默认选中当前日期
|
getNowTime() {
|
var curDate = new Date().getTime();
|
var dayNum = 7 * 24 * 3600 * 1000;
|
var threeDays = curDate - dayNum;
|
var sDay = this.getLocalTime(threeDays);
|
var end = this.getLocalTime(curDate);
|
this.createTimeList = [sDay, end];
|
},
|
add0(m) {
|
return m < 10 ? "0" + m : m;
|
},
|
getLocalTime(nS) {
|
var time = new Date(nS);
|
var y = time.getFullYear();
|
var m = time.getMonth() + 1;
|
var d = time.getDate();
|
return y + "-" + this.add0(m) + "-" + this.add0(d);
|
},
|
// 团检病种页面查询人员列表
|
getList() {
|
if(this.createTimeList){
|
this.queryParams.beginTime = this.createTimeList[0];
|
this.queryParams.endTime = this.createTimeList[1];
|
}else if(this.createTimeList == null){
|
this.queryParams.beginTime = null;
|
this.queryParams.endTime = null;
|
}
|
|
getPeopleList(this.queryParams).then((res) => {
|
this.tableData = res.data.voList;
|
this.total = res.data.total;
|
});
|
},
|
|
handleSizeChange(val) {
|
this.queryParam.pageSize = val;
|
// this.geticd();
|
},
|
handleCurrentChange(val) {
|
this.queryParam.page = val;
|
// this.geticd();
|
},
|
/** 查询体检单位信息维护列表 */
|
getcomp() {
|
listComp().then((response) => {
|
this.compList = response.rows;
|
});
|
},
|
// 根据单位查询部门和单位部门信息
|
cmp(val) {
|
let compId = val;
|
getDeptAndDwDeptByComp(compId).then((res) => {
|
this.dwList = res.data;
|
});
|
},
|
// 根据单位部门查询单位分组信息信息
|
dw(vals) {
|
let dwDeptId = vals;
|
getDwGroupingByDwDeptId(dwDeptId).then((res) => {
|
this.gropList = res.data;
|
});
|
},
|
handleSelectionChanges(selection) {
|
this.tjNums = selection.map((item) => item.tjNumber);
|
},
|
handleSelectionChange(selection) {
|
this.tableData2 = selection;
|
this.aids = selection.map((item) => item.aid);
|
},
|
clear() {
|
this.tableData2 = [];
|
},
|
/** 搜索按钮操作 */
|
handleQuery() {
|
this.queryParams.page = 1;
|
this.getList();
|
// this.queryParam.page = 1;
|
// this.geticd();
|
},
|
/** 重置按钮操作 */
|
resetQuery() {
|
this.createTimeList = []
|
this.resetForm("queryForm");
|
this.handleQuery();
|
this.loading = true;
|
},
|
dateChangebirthday1(val) {
|
this.createTimeList = val;
|
},
|
tongji() {
|
this.title2 = "统计图表";
|
if (this.tjNums.length === 0 || this.DataList === 0) {
|
this.$message.warning("请选择人员和病种!");
|
} else {
|
this.DataList.forEach((item) => {
|
this.proIds.push(item.proId);
|
});
|
let dto = {
|
proIds: this.proIds,
|
tjNums: this.tjNums,
|
};
|
|
this.open = true;
|
getJieGuoFenXi(dto).then((res) => {
|
this.rongjiList = res.data;
|
// this.$nextTick(() => {
|
// var chartDom = document.getElementById("main");
|
// var myChart = echarts.init(chartDom);
|
// var option;
|
|
// option = {
|
// title: {
|
// text: "病种统计",
|
// left: "center",
|
// },
|
// tooltip: {
|
// trigger: "item",
|
// formatter: "{a} <br/>{b} : {c} ({d}%)",
|
// },
|
// legend: {
|
// // type: 'scroll',
|
// orient: "vertical",
|
// right: 10,
|
// top: 80,
|
// bottom: 20,
|
// data: this.rongjiList,
|
// },
|
// series: [
|
// {
|
// name: "病种名称",
|
// type: "pie",
|
// radius: "55%",
|
// center: ["25%", "60%"],
|
|
// data: this.rongjiList,
|
// emphasis: {
|
// itemStyle: {
|
// shadowBlur: 10,
|
// shadowOffsetX: 0,
|
// shadowColor: "rgba(0, 0, 0, 0.5)",
|
// },
|
// },
|
// },
|
// ],
|
// };
|
|
// option && myChart.setOption(option);
|
// let sizeFun = function () {
|
// myChart.resize();
|
// };
|
// window.addEventListener("resize", sizeFun);
|
// });
|
});
|
}
|
},
|
},
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
.el-pagination {
|
margin-left: 47%;
|
}
|
// .tab3 {
|
// width: 100%;
|
// display: flex;
|
// }
|
.outside1 {
|
width: 500px;
|
max-height: 500px;
|
overflow-y:auto;
|
display: flex;
|
margin-top: 8px;
|
flex-direction: column;
|
}
|
</style>
|