caseIndexList.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. <template>
  2. <div class="box">
  3. <div class="box_wrapper">
  4. <div class="box_header">
  5. <Title :title="'指标列表'" style="margin-top: 8px;" />
  6. </div>
  7. <!-- 搜索栏 -->
  8. <div class="box_header">
  9. <el-form :inline="true" :model="searchData" class="demo-form-inline" style="float: left; ">
  10. <el-form-item label="状态" style="margin-bottom: 0">
  11. <el-select v-model="searchData.is_error" clearable placeholder="请选择">
  12. <el-option label="正确" :value="1"></el-option>
  13. <el-option label="错误" :value="0"></el-option>
  14. </el-select>
  15. </el-form-item>
  16. <el-form-item label="住院号" style="margin-bottom: 0">
  17. <el-input v-model="searchData.AAA28" clearable placeholder="请输入"></el-input>
  18. </el-form-item>
  19. <el-form-item label="科室" style="margin-bottom: 0">
  20. <el-select v-model="searchData.AAC11N" clearable filterable placeholder="请选择">
  21. <el-option
  22. v-for="item in departmentList"
  23. :key="item.id"
  24. :label="item.name"
  25. :value="item.name">
  26. </el-option>
  27. </el-select>
  28. </el-form-item>
  29. <el-form-item style="margin-bottom: 0">
  30. <el-button type="primary" @click="onSearch">查询</el-button>
  31. </el-form-item>
  32. </el-form>
  33. <div class="btn-box">
  34. <el-button v-if="$route.query.ruleId == 33" @click="toChildrenCase">子指标</el-button>
  35. <el-button type="primary">导出Excel</el-button>
  36. <el-button @click="toBack">返回</el-button>
  37. </div>
  38. </div>
  39. <!-- 列表 -->
  40. <el-table :data="tableData" @sort-change="handleSortChange" style="width: 100%">
  41. <el-table-column type="index" label="序号" align="center" width="80">
  42. <template slot-scope="scope">
  43. <span>{{ scope.$index + 1 + (paginationData.currentPage - 1) * paginationData.pageSize }}</span>
  44. </template>
  45. </el-table-column>
  46. <el-table-column prop="" label="住院号" width="90">
  47. <template slot-scope="scope">
  48. <span class="link" @click="toPage(scope.row)">{{ scope.row.AAA28 }}</span>
  49. </template>
  50. </el-table-column>
  51. <el-table-column prop="AAA01" label="患者姓名" width="120"></el-table-column>
  52. <el-table-column prop="AAC11N" label="出院科室"></el-table-column>
  53. <el-table-column prop="AAC01" label="出院时间" sortable width="160"></el-table-column>
  54. <el-table-column prop="AAB01" label="入院时间" sortable width="160"></el-table-column>
  55. <el-table-column prop="" label="状态" width="70">
  56. <template slot-scope="scope">
  57. <el-tag v-if="scope.row.numerator" type="success">正确</el-tag>
  58. <el-tag v-else type="danger">错误</el-tag>
  59. </template>
  60. </el-table-column>
  61. <el-table-column prop="" label="描述" width="800">
  62. <template slot-scope="scope">
  63. <span>{{ scope.row.description }}</span>
  64. </template>
  65. </el-table-column>
  66. </el-table>
  67. <!-- 分页 -->
  68. <el-pagination
  69. v-if="tableData && tableData.length !== 0"
  70. @size-change="SizeChangeEvent"
  71. @current-change="pageHasChanged"
  72. :total="paginationData.total"
  73. background
  74. class="table-pagination"
  75. style="margin: 30px 0px; float: right;"
  76. :page-size="paginationData.pageSize"
  77. :current-page.sync="paginationData.currentPage"
  78. layout="total, sizes, prev, pager, next, jumper"
  79. ></el-pagination>
  80. </div>
  81. </div>
  82. </template>
  83. <script>
  84. import Title from '@/components/Title';
  85. export default {
  86. components: {
  87. Title,
  88. },
  89. data() {
  90. return {
  91. searchData: {
  92. is_error: '',
  93. AAA28: '',
  94. AAC11N: '',
  95. order: '',
  96. order_sort: ''
  97. },
  98. tableData: [],
  99. paginationData: {
  100. total: 0,
  101. currentPage: 1,
  102. pageSize: 10,
  103. },
  104. departmentList: []
  105. };
  106. },
  107. watch: {
  108. $route(to, from) {
  109. if (from.path === '/caseIndex' && to.path === '/caseIndexList') {
  110. this.tableData = []
  111. this.paginationData.currentPage = 1
  112. this.paginationData.pageSize = 10
  113. this.getList()
  114. }
  115. }
  116. },
  117. created() {
  118. this.getList()
  119. this.getDepartmentList()
  120. },
  121. methods: {
  122. handleSortChange(column) {
  123. const { prop, order } = column
  124. let str = ''
  125. if (order === 'descending') {
  126. str = 'desc'
  127. } else if (order === 'ascending') {
  128. str = 'asc'
  129. } else {
  130. str = null
  131. }
  132. this.searchData.order = prop
  133. this.searchData.order_sort = str
  134. this.tableData = []
  135. this.getList()
  136. },
  137. toChildrenCase() {
  138. this.$router.push({ path: '/caseIndex', query: { type: 'children' }})
  139. },
  140. getDepartmentList() {
  141. this.$axios.post("/selectInfo").then((res) => {
  142. // 不要全部选项
  143. this.departmentList = res.data.department.slice(1, res.data.department.length)
  144. });
  145. },
  146. // 获取指标数据
  147. getList() {
  148. const { time, type, ruleId } = this.$route.query
  149. const { currentPage, pageSize } = this.paginationData
  150. const { is_error, AAA28, AAC11N, order, order_sort } = this.searchData
  151. const params = {
  152. time,
  153. id: ruleId,
  154. data_type: type === 'numerator' ? 0 : 1,
  155. page: currentPage,
  156. page_size: pageSize,
  157. AAA28,
  158. AAC11N
  159. }
  160. if (order) {
  161. params.order = order
  162. params.order_sort = order_sort
  163. }
  164. if ([0, 1].includes(is_error)) {
  165. params.is_error = is_error
  166. }
  167. this.$axios2.post('/get_zhibiao_list', params).then(res => {
  168. this.tableData = res.data.data
  169. this.paginationData.total = res.data.count
  170. })
  171. },
  172. //返回上一页
  173. toBack() {
  174. this.$router.back();
  175. },
  176. // 病案指标详情
  177. toPage(row) {
  178. this.storageSet('getData', row.MED_REC_ID);
  179. this.goto('/caseViews');
  180. },
  181. // 分页
  182. SizeChangeEvent(val) {
  183. this.paginationData.pageSize = val;
  184. this.getList();
  185. },
  186. pageHasChanged() {
  187. this.getList();
  188. },
  189. // 搜索
  190. onSearch() {
  191. this.paginationData.currentPage = 1;
  192. this.getList();
  193. }
  194. },
  195. };
  196. </script>
  197. <style lang="scss" scoped>
  198. .box {
  199. padding: 16px;
  200. .box_wrapper {
  201. padding: 16px;
  202. background: #fff;
  203. border-radius: 5px;
  204. height: calc(100vh - 82px);
  205. .box_header {
  206. overflow: hidden;
  207. margin-bottom: 16px;
  208. .btn-box {
  209. float: right;
  210. }
  211. }
  212. }
  213. }
  214. .link{
  215. font-weight: 600;
  216. color: #409eff;
  217. cursor: pointer;
  218. }
  219. ::v-deep.el-table .el-table__header tr th {
  220. background: #f1f6ff;
  221. color: #13171e;
  222. border-bottom: 0px;
  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: 5px 0px 0px 5px;
  230. }
  231. ::v-deep.el-table .el-table__header tr th:nth-child(3) {
  232. border-radius: 0px 5px 5px 0px;
  233. }
  234. </style>