Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

statistics.vue 9.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  1. <template>
  2. <div class="main-contain new-main-contain">
  3. <div class="position">
  4. <!-- <bread-crumb :crumbs='crumbs'></bread-crumb>-->
  5. <bread-crumb :crumbs="crumbs"></bread-crumb>
  6. </div>
  7. <div
  8. class="app-container"
  9. style="display: flex; flex: 1; padding: 10px 20px 0px 20px"
  10. >
  11. <div class="mainLeft">
  12. <div>
  13. <div
  14. style="
  15. margin: 10px 0;
  16. display: flex;
  17. justify-content: space-between;
  18. "
  19. >
  20. <el-input
  21. size="small"
  22. style="width: 130px"
  23. v-model="keywords"
  24. class="filter-item"
  25. placeholder="请输入患者名称"
  26. />
  27. <el-button
  28. size="small"
  29. class="filter-item"
  30. type="primary"
  31. @click="searchAction"
  32. >搜索
  33. </el-button>
  34. </div>
  35. <el-table
  36. :row-class-name="tableRowClassName"
  37. @row-click="onRowClick"
  38. :data="patientTableData"
  39. :height="tableHeight"
  40. border
  41. style="width: 100%"
  42. :row-style="{ color: '#303133' }"
  43. :header-cell-style="{
  44. backgroundColor: 'rgb(245, 247, 250)',
  45. color: '#606266',
  46. }"
  47. highlight-current-row
  48. ref="singleTable"
  49. @current-change="handleCurrentChange"
  50. >
  51. <el-table-column align="center" prop="name" label="姓名" wdith="89">
  52. <template slot-scope="scope">{{ scope.row.name }}</template>
  53. </el-table-column>
  54. </el-table>
  55. </div>
  56. </div>
  57. <div class="mainRight">
  58. <el-tabs v-model="titleType">
  59. <el-tab-pane label="明细" name="明细"></el-tab-pane>
  60. <el-tab-pane label="汇总" name="汇总"></el-tab-pane>
  61. </el-tabs>
  62. <detail-statistics
  63. v-if="titleType == '明细'"
  64. :patient_id="patient_id"
  65. ref="child"
  66. ></detail-statistics>
  67. <gather-statistics
  68. v-if="titleType == '汇总'"
  69. :patient_id="patient_id"
  70. ref="childOne"
  71. ></gather-statistics>
  72. </div>
  73. </div>
  74. </div>
  75. </template>
  76. <script>
  77. import { GetDetailPatients } from "@/api/his/his_tools";
  78. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  79. import DetailStatistics from "./components/detailStatistics";
  80. import GatherStatistics from "./components/gatherStatistics";
  81. export default {
  82. components: {
  83. GatherStatistics,
  84. DetailStatistics,
  85. BreadCrumb,
  86. },
  87. data() {
  88. return {
  89. currentRowIndex: 0,
  90. patientTableData: [],
  91. tableHeight: 400,
  92. crumbs: [
  93. { path: false, name: "His工具" },
  94. { path: false, name: "明细汇总统计" },
  95. ],
  96. titleType: "明细",
  97. patient_id: 0,
  98. keywords: "",
  99. };
  100. },
  101. // beforeRouteEnter(to, from, next){
  102. // if(from.path == '/hisTool/detailPrint'){
  103. // next((vm) => {
  104. // vm.titleType = "明细"
  105. // })
  106. // }else if(from.path == '/hisTool/gatherPrint'){
  107. // vm.titleType = "汇总"
  108. // next((vm) => {
  109. // vm.titleType = "汇总"
  110. // })
  111. // }else{
  112. // next()
  113. // }
  114. // },
  115. //判断列表页是否刷新
  116. beforeRouteLeave(to, from, next) {
  117. console.log(to, "beforeRouteEnter");
  118. if (to.path != "/hisTool/detailPrint"&&to.path != "/hisTool/gatherPrint") {
  119. this.$store.getters.pagedata.list.table_id = 0
  120. next()
  121. } else {
  122. next()
  123. }
  124. },
  125. watch:{
  126. 'titleType':{
  127. handler(val){
  128. this.$store.commit('SET_PAGENAME',val)
  129. }
  130. }
  131. },
  132. methods: {
  133. getPatientList() {
  134. var params = {
  135. keyword: this.keywords,
  136. };
  137. GetDetailPatients(params).then((response) => {
  138. if (response.data.state == 0) {
  139. this.$message.error(response.data.msg);
  140. return false;
  141. } else {
  142. this.patientTableData = response.data.data.patient;
  143. this.patient_id = this.patientTableData[0].id;
  144. if (this.$store.getters.pagedata.list.table_id == 0) {
  145. this.$refs.singleTable.setCurrentRow(this.patientTableData[0]);
  146. } else {
  147. this.$refs.singleTable.setCurrentRow(
  148. this.patientTableData[
  149. this.$store.getters.pagedata.list.table_id
  150. ]
  151. );
  152. }
  153. }
  154. });
  155. },
  156. tableRowClassName({ row, rowIndex }) {
  157. row.row_index = rowIndex;
  158. },
  159. onRowClick(row, event, column) {
  160. this.currentRowIndex = row.row_index;
  161. console.log(this.currentRowIndex, "this.currentRowIndex");
  162. this.$store.commit("SET_PAGEDATA", {
  163. table_id: this.currentRowIndex,
  164. });
  165. console.log(this.$store.getters.pagedata.list.table_id, "kk");
  166. },
  167. searchAction() {
  168. this.getPatientList();
  169. },
  170. handleCurrentChange(row) {
  171. this.patient_id = row.id;
  172. // console.log(this.patientTableData[this.currentRowIndex],'this.tableData[this.currentRowIndex]')
  173. // this.$refs.singleTable.setCurrentRow(this.tableData[this.currentRowIndex])
  174. // this.$refs.child.getHisSummaryDetailList()
  175. // this.$refs.childOne.getGatherDetailList()
  176. },
  177. },
  178. created() {
  179. let type = this.$store.getters.pagedata.pagestate
  180. if(type == ""){
  181. this.titleType = "明细"
  182. }else{
  183. this.titleType = type
  184. }
  185. const tableHeight = document.body.clientHeight - 290;
  186. this.tableHeight = tableHeight;
  187. this.getPatientList();
  188. },
  189. mounted() {}
  190. };
  191. </script>
  192. <style lang="scss" scoped>
  193. .new-main-contain {
  194. height: 100%;
  195. display: flex;
  196. flex-direction: column;
  197. }
  198. .app-container {
  199. height: 100%;
  200. }
  201. .mainCell {
  202. height: 36px;
  203. display: flex;
  204. align-items: center;
  205. }
  206. .mainLeft {
  207. width: 200px;
  208. height: 100%;
  209. display: flex;
  210. flex-direction: column;
  211. .el-radio {
  212. margin-right: 5px;
  213. }
  214. }
  215. .mainRight {
  216. margin-left: 10px;
  217. flex: 1;
  218. height: 100%;
  219. display: flex;
  220. flex-direction: column;
  221. overflow-y: auto;
  222. .cellSpan {
  223. min-width: 80px;
  224. display: inline-block;
  225. margin-right: 10px;
  226. }
  227. }
  228. .mainCenter {
  229. display: flex;
  230. flex: 1;
  231. }
  232. .centerLeft {
  233. flex: 1;
  234. display: flex;
  235. flex-direction: column;
  236. position: relative;
  237. .el-form-item {
  238. width: 32%;
  239. margin-right: 1%;
  240. float: left;
  241. }
  242. .el-form-item__label {
  243. text-align: left;
  244. }
  245. }
  246. .backColor {
  247. background: #f6f8f9;
  248. height: 5px;
  249. margin-bottom: 5px;
  250. }
  251. .tabsBox {
  252. position: relative;
  253. height: 76%;
  254. overflow-y: auto;
  255. margin-bottom: 60px;
  256. .el-tabs__item {
  257. padding: 0 10px;
  258. }
  259. }
  260. .preTabs {
  261. height: 100%;
  262. display: flex;
  263. flex-direction: column;
  264. .el-tabs__content {
  265. flex: 1;
  266. overflow-y: auto;
  267. }
  268. }
  269. .costBox {
  270. width: 100%;
  271. height: 60px;
  272. background: #fff;
  273. position: absolute;
  274. bottom: 0;
  275. display: flex;
  276. align-items: center;
  277. }
  278. .addTab {
  279. position: absolute;
  280. right: 0;
  281. top: 14px;
  282. z-index: 20;
  283. }
  284. .centerRight {
  285. width: 300px;
  286. margin-left: 10px;
  287. display: flex;
  288. flex-direction: column;
  289. position: relative;
  290. }
  291. .rightTab {
  292. height: 40px;
  293. width: 100%;
  294. border: 1px solid #d2d2d2;
  295. box-sizing: border-box;
  296. p {
  297. width: 50%;
  298. height: 40px;
  299. line-height: 40px;
  300. text-align: center;
  301. background: #eee;
  302. float: left;
  303. }
  304. > p:last-child {
  305. border-left: 1px solid #d2d2d2;
  306. float: right;
  307. }
  308. .activeP {
  309. background: #409eff;
  310. color: #fff;
  311. }
  312. }
  313. .comfirmBox {
  314. width: 100%;
  315. height: 60px;
  316. background: #fff;
  317. position: absolute;
  318. bottom: 0;
  319. display: flex;
  320. align-items: center;
  321. justify-content: space-between;
  322. }
  323. .mainHeader {
  324. width: 100%;
  325. background: #fff;
  326. position: fixed;
  327. z-index: 100;
  328. height: 36px;
  329. }
  330. .titleBox {
  331. position: fixed;
  332. z-index: 99;
  333. background: #fff;
  334. }
  335. .fixedCell {
  336. position: fixed;
  337. z-index: 99;
  338. right: 30px;
  339. background: #fff;
  340. width: 300px;
  341. display: flex;
  342. justify-content: space-between;
  343. }
  344. </style>
  345. <style lang="scss">
  346. .centerLeft {
  347. .el-form-item__label {
  348. text-align: left;
  349. }
  350. }
  351. .tabsBox {
  352. .el-tabs__item {
  353. padding: 0 10px;
  354. }
  355. .el-tabs--bottom
  356. .el-tabs--left
  357. > .el-tabs__header
  358. .el-tabs__item:nth-child(2),
  359. .el-tabs--bottom
  360. .el-tabs--right
  361. > .el-tabs__header
  362. .el-tabs__item:nth-child(2),
  363. .el-tabs--bottom.el-tabs--border-card
  364. > .el-tabs__header
  365. .el-tabs__item:nth-child(2),
  366. .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2),
  367. .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2),
  368. .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2),
  369. .el-tabs--top.el-tabs--border-card
  370. > .el-tabs__header
  371. .el-tabs__item:nth-child(2),
  372. .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) {
  373. padding: 0 10px;
  374. }
  375. .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child,
  376. .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child,
  377. .el-tabs--bottom.el-tabs--border-card
  378. > .el-tabs__header
  379. .el-tabs__item:last-child,
  380. .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child,
  381. .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child,
  382. .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child,
  383. .el-tabs--top.el-tabs--border-card
  384. > .el-tabs__header
  385. .el-tabs__item:last-child,
  386. .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child {
  387. padding: 0 10px;
  388. }
  389. .el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable {
  390. padding: 0 10px;
  391. }
  392. }
  393. .centerRight {
  394. .el-tabs__nav-scroll {
  395. display: flex;
  396. }
  397. .el-tabs__nav {
  398. margin: 0 auto;
  399. }
  400. .el-table th .cell,
  401. .el-table td .cell {
  402. padding: 0 2px;
  403. }
  404. }
  405. .preTabs {
  406. .el-tabs__content {
  407. }
  408. }
  409. .rightTabs {
  410. height: 100%;
  411. .el-tabs__content {
  412. }
  413. }
  414. .centerDialog {
  415. .el-dialog__body {
  416. max-height: calc(100vh - 100px) !important;
  417. padding: 0 20px;
  418. }
  419. }
  420. </style>