123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462 |
- <template>
- <div class="main-contain new-main-contain">
- <div class="position">
- <!-- <bread-crumb :crumbs='crumbs'></bread-crumb>-->
- <bread-crumb :crumbs="crumbs"></bread-crumb>
- </div>
- <div
- class="app-container"
- style="display: flex; flex: 1; padding: 10px 20px 0px 20px"
- >
- <div class="mainLeft">
- <div>
- <div
- style="
- margin: 10px 0;
- display: flex;
- justify-content: space-between;
- "
- >
- <el-input
- size="small"
- style="width: 130px"
- v-model="keywords"
- class="filter-item"
- placeholder="请输入患者名称"
- />
- <el-button
- size="small"
- class="filter-item"
- type="primary"
- @click="searchAction"
- >搜索
- </el-button>
- </div>
-
- <el-table
- :row-class-name="tableRowClassName"
- @row-click="onRowClick"
- :data="patientTableData"
- :height="tableHeight"
- border
- style="width: 100%"
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266',
- }"
- highlight-current-row
- ref="singleTable"
- @current-change="handleCurrentChange"
- >
- <el-table-column align="center" prop="name" label="姓名" wdith="89">
- <template slot-scope="scope">{{ scope.row.name }}</template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <div class="mainRight">
- <el-tabs v-model="titleType">
- <el-tab-pane label="明细" name="明细"></el-tab-pane>
- <el-tab-pane label="汇总" name="汇总"></el-tab-pane>
- </el-tabs>
- <detail-statistics
- v-if="titleType == '明细'"
- :patient_id="patient_id"
- ref="child"
- ></detail-statistics>
- <gather-statistics
- v-if="titleType == '汇总'"
- :patient_id="patient_id"
- ref="childOne"
- ></gather-statistics>
- </div>
- </div>
- </div>
- </template>
-
- <script>
- import { GetDetailPatients } from "@/api/his/his_tools";
- import BreadCrumb from "@/xt_pages/components/bread-crumb";
-
- import DetailStatistics from "./components/detailStatistics";
- import GatherStatistics from "./components/gatherStatistics";
- export default {
- components: {
- GatherStatistics,
- DetailStatistics,
- BreadCrumb,
- },
- data() {
- return {
- currentRowIndex: 0,
- patientTableData: [],
- tableHeight: 400,
- crumbs: [
- { path: false, name: "His工具" },
- { path: false, name: "明细汇总统计" },
- ],
- titleType: "明细",
- patient_id: 0,
- keywords: "",
- };
- },
-
- // beforeRouteEnter(to, from, next){
- // if(from.path == '/hisTool/detailPrint'){
- // next((vm) => {
- // vm.titleType = "明细"
- // })
- // }else if(from.path == '/hisTool/gatherPrint'){
- // vm.titleType = "汇总"
- // next((vm) => {
- // vm.titleType = "汇总"
- // })
- // }else{
- // next()
- // }
- // },
-
- //判断列表页是否刷新
- beforeRouteLeave(to, from, next) {
- console.log(to, "beforeRouteEnter");
- if (to.path != "/hisTool/detailPrint"&&to.path != "/hisTool/gatherPrint") {
- this.$store.getters.pagedata.list.table_id = 0
- next()
- } else {
- next()
- }
- },
-
- watch:{
- 'titleType':{
- handler(val){
- this.$store.commit('SET_PAGENAME',val)
- }
- }
- },
-
- methods: {
- getPatientList() {
- var params = {
- keyword: this.keywords,
- };
- GetDetailPatients(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.patientTableData = response.data.data.patient;
- this.patient_id = this.patientTableData[0].id;
- if (this.$store.getters.pagedata.list.table_id == 0) {
- this.$refs.singleTable.setCurrentRow(this.patientTableData[0]);
- } else {
- this.$refs.singleTable.setCurrentRow(
- this.patientTableData[
- this.$store.getters.pagedata.list.table_id
- ]
- );
- }
- }
- });
- },
-
- tableRowClassName({ row, rowIndex }) {
- row.row_index = rowIndex;
- },
-
- onRowClick(row, event, column) {
- this.currentRowIndex = row.row_index;
- console.log(this.currentRowIndex, "this.currentRowIndex");
- this.$store.commit("SET_PAGEDATA", {
- table_id: this.currentRowIndex,
- });
- console.log(this.$store.getters.pagedata.list.table_id, "kk");
- },
- searchAction() {
- this.getPatientList();
- },
- handleCurrentChange(row) {
- this.patient_id = row.id;
- // console.log(this.patientTableData[this.currentRowIndex],'this.tableData[this.currentRowIndex]')
- // this.$refs.singleTable.setCurrentRow(this.tableData[this.currentRowIndex])
- // this.$refs.child.getHisSummaryDetailList()
- // this.$refs.childOne.getGatherDetailList()
- },
- },
- created() {
-
- let type = this.$store.getters.pagedata.pagestate
- if(type == ""){
- this.titleType = "明细"
- }else{
- this.titleType = type
- }
- const tableHeight = document.body.clientHeight - 290;
- this.tableHeight = tableHeight;
- this.getPatientList();
-
- },
-
- mounted() {}
- };
- </script>
-
- <style lang="scss" scoped>
- .new-main-contain {
- height: 100%;
- display: flex;
- flex-direction: column;
- }
-
- .app-container {
- height: 100%;
- }
-
- .mainCell {
- height: 36px;
- display: flex;
- align-items: center;
- }
-
- .mainLeft {
- width: 200px;
- height: 100%;
- display: flex;
- flex-direction: column;
-
- .el-radio {
- margin-right: 5px;
- }
- }
- .mainRight {
- margin-left: 10px;
- flex: 1;
- height: 100%;
- display: flex;
- flex-direction: column;
- overflow-y: auto;
-
- .cellSpan {
- min-width: 80px;
- display: inline-block;
- margin-right: 10px;
- }
- }
- .mainCenter {
- display: flex;
- flex: 1;
- }
-
- .centerLeft {
- flex: 1;
- display: flex;
- flex-direction: column;
- position: relative;
-
- .el-form-item {
- width: 32%;
- margin-right: 1%;
- float: left;
- }
-
- .el-form-item__label {
- text-align: left;
- }
- }
- .backColor {
- background: #f6f8f9;
- height: 5px;
- margin-bottom: 5px;
- }
-
- .tabsBox {
- position: relative;
- height: 76%;
- overflow-y: auto;
- margin-bottom: 60px;
-
- .el-tabs__item {
- padding: 0 10px;
- }
- }
- .preTabs {
- height: 100%;
- display: flex;
- flex-direction: column;
-
- .el-tabs__content {
- flex: 1;
- overflow-y: auto;
- }
- }
-
- .costBox {
- width: 100%;
- height: 60px;
- background: #fff;
- position: absolute;
- bottom: 0;
- display: flex;
- align-items: center;
- }
-
- .addTab {
- position: absolute;
- right: 0;
- top: 14px;
- z-index: 20;
- }
-
- .centerRight {
- width: 300px;
- margin-left: 10px;
- display: flex;
- flex-direction: column;
- position: relative;
- }
-
- .rightTab {
- height: 40px;
- width: 100%;
- border: 1px solid #d2d2d2;
- box-sizing: border-box;
-
- p {
- width: 50%;
- height: 40px;
- line-height: 40px;
- text-align: center;
- background: #eee;
- float: left;
- }
-
- > p:last-child {
- border-left: 1px solid #d2d2d2;
- float: right;
- }
-
- .activeP {
- background: #409eff;
- color: #fff;
- }
- }
- .comfirmBox {
- width: 100%;
- height: 60px;
- background: #fff;
- position: absolute;
- bottom: 0;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
-
- .mainHeader {
- width: 100%;
- background: #fff;
- position: fixed;
- z-index: 100;
- height: 36px;
- }
-
- .titleBox {
- position: fixed;
- z-index: 99;
- background: #fff;
- }
-
- .fixedCell {
- position: fixed;
- z-index: 99;
- right: 30px;
- background: #fff;
- width: 300px;
- display: flex;
- justify-content: space-between;
- }
- </style>
-
- <style lang="scss">
- .centerLeft {
- .el-form-item__label {
- text-align: left;
- }
- }
- .tabsBox {
- .el-tabs__item {
- padding: 0 10px;
- }
-
- .el-tabs--bottom
- .el-tabs--left
- > .el-tabs__header
- .el-tabs__item:nth-child(2),
- .el-tabs--bottom
- .el-tabs--right
- > .el-tabs__header
- .el-tabs__item:nth-child(2),
- .el-tabs--bottom.el-tabs--border-card
- > .el-tabs__header
- .el-tabs__item:nth-child(2),
- .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2),
- .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2),
- .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2),
- .el-tabs--top.el-tabs--border-card
- > .el-tabs__header
- .el-tabs__item:nth-child(2),
- .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) {
- padding: 0 10px;
- }
-
- .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child,
- .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child,
- .el-tabs--bottom.el-tabs--border-card
- > .el-tabs__header
- .el-tabs__item:last-child,
- .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child,
- .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child,
- .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child,
- .el-tabs--top.el-tabs--border-card
- > .el-tabs__header
- .el-tabs__item:last-child,
- .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child {
- padding: 0 10px;
- }
-
- .el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable {
- padding: 0 10px;
- }
- }
- .centerRight {
- .el-tabs__nav-scroll {
- display: flex;
- }
-
- .el-tabs__nav {
- margin: 0 auto;
- }
-
- .el-table th .cell,
- .el-table td .cell {
- padding: 0 2px;
- }
- }
- .preTabs {
- .el-tabs__content {
- }
- }
- .rightTabs {
- height: 100%;
-
- .el-tabs__content {
- }
- }
- .centerDialog {
- .el-dialog__body {
- max-height: calc(100vh - 100px) !important;
- padding: 0 20px;
- }
- }
- </style>
|