caseIndexList.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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, index) in departmentList"
  23. :key="index"
  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 (['/caseIndex', '/yypsIndex'].includes(from.path) && to.path === '/caseIndexList') {
  110. this.searchData.is_error = ''
  111. this.searchData.AAA28 = ''
  112. this.searchData.AAC11N = ''
  113. this.searchData.order = ''
  114. this.searchData.order_sort = ''
  115. this.tableData = []
  116. this.paginationData.currentPage = 1
  117. this.paginationData.pageSize = 10
  118. this.getList()
  119. }
  120. }
  121. },
  122. created() {
  123. this.getList()
  124. this.getDepartmentList()
  125. },
  126. methods: {
  127. handleSortChange(column) {
  128. const { prop, order } = column
  129. let str = ''
  130. if (order === 'descending') {
  131. str = 'desc'
  132. } else if (order === 'ascending') {
  133. str = 'asc'
  134. } else {
  135. str = null
  136. }
  137. this.searchData.order = prop
  138. this.searchData.order_sort = str
  139. this.tableData = []
  140. this.getList()
  141. },
  142. toChildrenCase() {
  143. this.$router.push({ path: '/caseIndex', query: { type: 'children' }})
  144. },
  145. getDepartmentList() {
  146. this.$axios.post("/get_department_list").then((res) => {
  147. // 不要全部选项
  148. this.departmentList = res.data
  149. });
  150. },
  151. // 获取指标数据
  152. getList() {
  153. const { time, type, ruleId, year } = this.$route.query
  154. const { currentPage, pageSize } = this.paginationData
  155. const { is_error, AAA28, AAC11N, order, order_sort } = this.searchData
  156. const params = {
  157. time,
  158. id: ruleId,
  159. data_type: type === 'numerator' ? 0 : 1,
  160. page: currentPage,
  161. page_size: pageSize,
  162. AAA28,
  163. AAC11N,
  164. year
  165. }
  166. if (order) {
  167. params.order = order
  168. params.order_sort = order_sort
  169. }
  170. if ([0, 1].includes(is_error)) {
  171. params.is_error = is_error
  172. }
  173. let url = '/get_zhibiao_list'
  174. if (this.$route.query.from === 'yypsIndex') {
  175. url = '/get_zhibiao_list_v2'
  176. }
  177. this.$axios2.post(url, params).then(res => {
  178. this.tableData = res.data.data
  179. this.paginationData.total = res.data.count
  180. })
  181. },
  182. //返回上一页
  183. toBack() {
  184. this.$router.back();
  185. },
  186. // 病案指标详情
  187. toPage(row) {
  188. this.storageSet('getData', row.MED_REC_ID);
  189. let path
  190. if (this.$route.path === '/embedIndex-caseIndexList') {
  191. path = '/embedIndex-caseViews'
  192. } else if (this.$route.path === '/reviewIndex-caseIndexList') {
  193. path = '/reviewIndex-caseViews?type_v=v2'
  194. } else {
  195. path = '/caseViews?type_v=v2'
  196. }
  197. this.goto(path);
  198. },
  199. // 分页
  200. SizeChangeEvent(val) {
  201. this.paginationData.pageSize = val;
  202. this.getList();
  203. },
  204. pageHasChanged() {
  205. this.getList();
  206. },
  207. // 搜索
  208. onSearch() {
  209. this.paginationData.currentPage = 1;
  210. this.getList();
  211. }
  212. },
  213. };
  214. </script>
  215. <style lang="scss" scoped>
  216. .box {
  217. padding: 16px;
  218. .box_wrapper {
  219. padding: 16px;
  220. background: #fff;
  221. border-radius: 5px;
  222. height: calc(100vh - 82px);
  223. .box_header {
  224. overflow: hidden;
  225. margin-bottom: 16px;
  226. .btn-box {
  227. float: right;
  228. }
  229. }
  230. }
  231. }
  232. .link{
  233. font-weight: 600;
  234. color: #409eff;
  235. cursor: pointer;
  236. }
  237. ::v-deep.el-table .el-table__header tr th {
  238. background: #f1f6ff;
  239. color: #13171e;
  240. border-bottom: 0px;
  241. }
  242. ::v-deep.el-table .el-table__row td {
  243. color: #7e8bab;
  244. border-bottom: 1px solid #f4f4f4;
  245. }
  246. ::v-deep.el-table .el-table__header tr th:first-child {
  247. border-radius: 5px 0px 0px 5px;
  248. }
  249. ::v-deep.el-table .el-table__header tr th:nth-child(3) {
  250. border-radius: 0px 5px 5px 0px;
  251. }
  252. </style>