index.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <template>
  2. <div class="dashboard-container">
  3. <div class="tableBox">
  4. <div class="block">
  5. <div class="blockCon">
  6. <div class="selectDns"></div>
  7. <el-input v-model="formData.recordNum" class="width150" placeholder="病案号"></el-input>
  8. <span class="kong"></span>
  9. <el-date-picker v-model="formData.startTime" type="date" format="yyyy 年 MM 月 dd 日" value-format="yyyyMMdd" placeholder="开始日期"></el-date-picker>
  10. <el-date-picker
  11. v-model="formData.endTime"
  12. type="date"
  13. style="margin-left: 10px"
  14. format="yyyy 年 MM 月 dd 日"
  15. value-format="yyyyMMdd"
  16. placeholder="结束日期"
  17. ></el-date-picker>
  18. <span class="kong"></span>
  19. <!-- <span class="demonstration">反馈关键词</span> -->
  20. <!-- <el-input class="ins" placeholder="请输入内容"></el-input> -->
  21. <el-button type="primary" @click="funQuery">查询</el-button>
  22. <span class="kong"></span>
  23. <el-button @click="reset">重置条件</el-button>
  24. <span class="kong"></span>
  25. <el-button type="text" @click="goto('/data/query')">更多查询条件</el-button>
  26. <span class="kong"></span>
  27. <el-button type="primary" icon="el-icon-download" @click="onExport" class="export-btn">导出数据</el-button>
  28. <span class="kong"></span>
  29. <el-button style="float: right" @click="toPrePage">返回</el-button>
  30. </div>
  31. </div>
  32. <Title :title="'病案首页列表'" />
  33. <el-table :data="tableData" style="width: 100%">
  34. <el-table-column type="index" label="序号"></el-table-column>
  35. <el-table-column prop="AAA28" label="病案号">
  36. <template slot-scope="scope">
  37. <span class="blue" @click="funGoto(scope.row.MED_REC_ID)">
  38. <template>
  39. <div>
  40. {{ scope.row.AAA28 }}
  41. </div>
  42. </template>
  43. </span>
  44. </template>
  45. </el-table-column>
  46. <el-table-column prop="AAA01" label="患者姓名"></el-table-column>
  47. <el-table-column prop="AAA02C" label="性别"></el-table-column>
  48. <el-table-column prop="AAA04" label="年龄"></el-table-column>
  49. <el-table-column prop="AAA29" label="住院次数"></el-table-column>
  50. <el-table-column prop="AAC11N" label="出院科室"></el-table-column>
  51. <el-table-column prop="AAC01" label="出院日期"></el-table-column>
  52. <el-table-column prop="ADA01" label="总费用"></el-table-column>
  53. <el-table-column prop="F_D" label="药品费用"></el-table-column>
  54. <el-table-column prop="J" label="材料费用"></el-table-column>
  55. <el-table-column prop="ABC01N" label="主诊断"></el-table-column>
  56. <el-table-column prop="ICD9_NAME" label="主手术"></el-table-column>
  57. <!-- <el-table-column prop="address" label="业务操作人"> </el-table-column> -->
  58. <el-table-column prop="AAC04" label="实际住院(天)"></el-table-column>
  59. <el-table-column prop="ATTEND_GRP_NAME" label="主诊组"></el-table-column>
  60. <el-table-column prop="AEM01C" label="离院方式"></el-table-column>
  61. <el-table-column prop="AAB06C" label="入院途径"></el-table-column>
  62. </el-table>
  63. <!-- 分页控制 -->
  64. <mPagination v-if="tableData && tableData.length !== 0" :data="paginationData" @pageChangeEvent="pageHasChanged"></mPagination>
  65. </div>
  66. </div>
  67. </template>
  68. <script>
  69. import Title from '@/components/Title';
  70. import { mapGetters } from 'vuex';
  71. import mPagination from '@/components/m-pagination';
  72. import { downloadFile } from '@/httpFile';
  73. export default {
  74. name: 'Dashboard',
  75. components: {
  76. Title,
  77. mPagination,
  78. },
  79. computed: {
  80. ...mapGetters(['name']),
  81. },
  82. data() {
  83. return {
  84. formData: {
  85. // rangeDate: [],
  86. recordNum: '',
  87. startTime: '',
  88. endTime: '',
  89. },
  90. tableData: [],
  91. // 分页数据
  92. paginationData: {
  93. total: 10,
  94. currentPage: 1,
  95. pageSize: 10,
  96. },
  97. };
  98. },
  99. mounted() {
  100. this.formData.endTime = this.storageGet('endTime');
  101. this.formData.startTime = this.storageGet('startTime');
  102. this.funQuery();
  103. },
  104. beforeRouteEnter(to, from, next) {
  105. const { path } = from
  106. if (['/data/front', '/data/after', '/dashboard'].includes(path)) {
  107. next(vm => {
  108. vm.formData = {
  109. // rangeDate: [],
  110. recordNum: '',
  111. startTime: vm.storageGet('startTime'),
  112. endTime: vm.storageGet('endTime'),
  113. }
  114. vm.tableData = []
  115. vm.paginationData ={
  116. total: 10,
  117. currentPage: 1,
  118. pageSize: 10
  119. }
  120. vm.funQuery()
  121. })
  122. } else {
  123. next()
  124. }
  125. },
  126. methods: {
  127. toPrePage() {
  128. this.$router.go(-1)
  129. },
  130. funGoto(val) {
  131. this.storageSet('getData', val);
  132. this.goto('/details');
  133. },
  134. funDel() {
  135. this.formData1.seniorList.pop();
  136. },
  137. funAdd() {
  138. this.formData1.seniorList.push({
  139. key: '',
  140. value: '',
  141. type: '1',
  142. });
  143. },
  144. pageHasChanged() {
  145. this.funQuery();
  146. },
  147. // selectInfo() {
  148. // let pramse = {};
  149. // this.$axios
  150. // .post("/selectInfo")
  151. // .then((res) => {
  152. // this.payList = res.data.pay;
  153. // console.log(this.payList);
  154. // //支付方式 pay
  155. // this.departmentList = res.data.department;
  156. // //出院科室 department
  157. // this.levelList = res.data.level;
  158. // //问题属性 level
  159. // this.coderList = res.data.coder;
  160. // //编码元 coder
  161. // this.statusList = res.data.status;
  162. // this.fieldList = res.data.field;
  163. // });
  164. // },
  165. funQuery() {
  166. //查询
  167. let pramse = {
  168. // AAC01: this.formData.rangeDate, //出院时间
  169. AAC01_start_date: this.formData.startTime || '',
  170. AAC01_end_date: this.formData.endTime || '',
  171. AAA28: this.formData.recordNum,
  172. page: this.paginationData.currentPage, //页码
  173. limit: this.paginationData.pageSize, //条数
  174. };
  175. this.$axios.post('/qualityList', pramse).then(res => {
  176. console.log(res);
  177. this.paginationData.total = res.data.count;
  178. this.tableData = res.data.list;
  179. });
  180. },
  181. reset() {
  182. // 重置数据
  183. if (this.choice == 0) {
  184. Object.assign(this.$data.formData, this.$options.data().formData);
  185. } else {
  186. Object.assign(this.$data.formData, this.$options.data().formData);
  187. }
  188. },
  189. // 导出
  190. onExport() {
  191. let pramse = {
  192. start_time:this.formData.startTime,
  193. end_time:this.formData.endTime,
  194. AAA28: this.formData.recordNum,
  195. is_export: 1
  196. };
  197. this.funExeclPost('病案首页列表', pramse, '/homeErrorDataList', 'xlsx');
  198. },
  199. funExeclPost(fileName, pramse, httpUrl, format) {
  200. //导出
  201. let httpUrls = '/api' + httpUrl;
  202. downloadFile(httpUrls, pramse, format, fileName).then(res => {
  203. console.log(res);
  204. });
  205. }
  206. },
  207. };
  208. </script >
  209. <style scoped>
  210. ::v-deep.el-pagination.is-background .btn-next,
  211. ::v-deep.el-pagination.is-background .btn-prev,
  212. ::v-deep.el-pagination.is-background .el-pager li {
  213. margin: 0 5px;
  214. background-color: #fff;
  215. color: #606266;
  216. min-width: 30px;
  217. border-radius: 2px;
  218. border: 1px solid #dfe3f3;
  219. line-height: 27px;
  220. }
  221. ::v-deep.el-pagination.is-background .el-pager li:not(.disabled).active {
  222. background: #7e8bab;
  223. }
  224. ::v-deep.el-table .el-table__row td {
  225. color: #7e8bab;
  226. border-bottom: 1px solid #f4f4f4;
  227. }
  228. ::v-deep.el-table .el-table__header tr th:first-child {
  229. border-radius: 10px 0px 0px 10px;
  230. }
  231. ::v-deep.el-table .el-table__header tr th:last-child {
  232. border-radius: 0px 10px 10px 0px;
  233. }
  234. ::v-deep.el-table .el-table__header tr th {
  235. background: #f1f6ff;
  236. color: #13171e;
  237. border-bottom: 0px;
  238. }
  239. </style>
  240. <style lang="scss" scoped>
  241. .dashboard-container{
  242. padding: 0;
  243. margin: 10px !important;
  244. }
  245. .tableBox {
  246. background: #fff;
  247. padding: 19px;
  248. border-radius: 5px;
  249. font-size: 12px;
  250. }
  251. .block {
  252. border-radius: 5px;
  253. .fBtn {
  254. display: flex;
  255. align-items: center;
  256. justify-content: center;
  257. }
  258. .bnh {
  259. margin-bottom: 20px;
  260. }
  261. .barBtn {
  262. display: flex;
  263. align-items: center;
  264. justify-content: center;
  265. }
  266. .selects {
  267. width: 100%;
  268. }
  269. .rowsa {
  270. margin-bottom: 20px;
  271. }
  272. }
  273. .tableBox {
  274. background: #fff;
  275. padding: 19px;
  276. border-radius: 5px;
  277. }
  278. .dashboard {
  279. &-container {
  280. margin: 30px;
  281. }
  282. &-text {
  283. font-size: 30px;
  284. line-height: 46px;
  285. }
  286. }
  287. .pind {
  288. padding: 0 20px;
  289. }
  290. .pind10 {
  291. padding: 0 5px;
  292. }
  293. .width150 {
  294. width: 200px;
  295. }
  296. .width300 {
  297. width: 295px;
  298. }
  299. .width500 {
  300. width: 645px;
  301. }
  302. .width90 {
  303. width: 90px;
  304. }
  305. .blue {
  306. color: #185da6;
  307. }
  308. .block {
  309. background: #fff;
  310. display: block;
  311. align-items: center;
  312. border-radius: 5px;
  313. height: 75px;
  314. margin-bottom: 16px;
  315. margin-bottom: 20px;
  316. .blockCon {
  317. .selectDns {
  318. span {
  319. margin-right: 5px;
  320. }
  321. }
  322. .demonstration {
  323. margin-left: 10px;
  324. }
  325. .pickers {
  326. margin-left: 5px;
  327. }
  328. .lsxd {
  329. margin-left: 20px;
  330. }
  331. .ins {
  332. width: 150px;
  333. margin: 0 10px;
  334. }
  335. }
  336. .sc {
  337. background: #185da6;
  338. color: #fff;
  339. }
  340. }
  341. .kong {
  342. padding: 0 10px;
  343. }
  344. </style>