caseNumber.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <template>
  2. <div class="dashboard-container">
  3. <div class="tableBox">
  4. <div class="block">
  5. <el-form style="width: 100%" ref="filterListFormRef" :model="formData" class="demo-form-inline" label-suffix=":" label-width="74px">
  6. <el-row :gutter="24">
  7. <el-col :span="7">
  8. <el-form-item label="所属院区" prop="YQ_CODE">
  9. <el-select style="width: 100%;" placeholder="请选择所属院区" v-model="formData.YQ_CODE" multiple collapse-tags
  10. clearable filterable @change="yqChange">
  11. <el-option v-for="(item, index) in searchOptions.yqArray" :key="index" :label="item.dep_name"
  12. :value="item.dep_id"></el-option>
  13. </el-select>
  14. </el-form-item>
  15. </el-col>
  16. <el-col :span="6">
  17. <el-form-item label="出院科室" prop="KS_CODE">
  18. <el-cascader style="width: 100%;" placeholder="请选择科室" v-model="formData.KS_CODE"
  19. :options="searchOptions.ksArray" filterable :props="searchOptions.cascaderProps" clearable collapse-tags
  20. @change="ksChange">
  21. </el-cascader>
  22. </el-form-item>
  23. </el-col>
  24. <el-col :span="6">
  25. <el-form-item label="出院病区" prop="BQ_CODE">
  26. <el-cascader style="width: 100%;" placeholder="请选择病区" v-model="formData.BQ_CODE"
  27. :options="searchOptions.bqArray" filterable :props="searchOptions.cascaderProps" clearable
  28. collapse-tags>
  29. </el-cascader>
  30. </el-form-item>
  31. </el-col>
  32. <el-col :span="5">
  33. <el-form-item label="病案号" prop="AAA28">
  34. <el-input style="width: 100%;" v-model="formData.AAA28" placeholder="请输入病案号"></el-input>
  35. </el-form-item>
  36. </el-col>
  37. </el-row>
  38. <el-row :gutter="24">
  39. <el-col :span="7">
  40. <el-form-item label="出院日期">
  41. <div style="width: 100%;display: flex;gap: 5px;">
  42. <el-form-item prop="start_time">
  43. <el-date-picker style="width: 94%;" v-model="formData.start_time" type="date" placeholder="请选择开始时间"
  44. value-format="yyyyMMdd" format="yyyy年MM月dd日">
  45. </el-date-picker>
  46. </el-form-item>
  47. <el-form-item prop="end_time">
  48. <el-date-picker style="width: 100%;" v-model="formData.end_time" type="date" placeholder="请选择结束时间"
  49. value-format="yyyyMMdd" format="yyyy年MM月dd日">
  50. </el-date-picker>
  51. </el-form-item>
  52. </div>
  53. </el-form-item>
  54. </el-col>
  55. <el-col :span="6">
  56. <el-form-item label="病案质量" prop="lb_level">
  57. <el-select v-model="formData.lb_level" clearable filterable placeholder="请选择病案质量" style="width: 100%;">
  58. <el-option v-for="(item, index) in searchOptions.bazlArray" :label="item.name" :value="item.id" :key="index"></el-option>
  59. </el-select>
  60. </el-form-item>
  61. </el-col>
  62. <el-col :span="6">
  63. <el-form-item label="离院方式" prop="AEM01C">
  64. <el-select v-model="formData.AEM01C" clearable filterable placeholder="请选择离院方式" style="width: 100%;">
  65. <el-option v-for="(item, index) in searchOptions.lyTypeArray" :label="item.name" :value="item.id" :key="index"></el-option>
  66. </el-select>
  67. </el-form-item>
  68. </el-col>
  69. <el-col :span="5">
  70. <el-form-item label="住院天数" prop="endDay1">
  71. <div style="width: 100%;display: flex;gap: 5px;">
  72. <el-form-item prop="endDay1">
  73. <el-input style="width: 100%;" v-model="formData.endDay1">
  74. <template slot="append">天</template>
  75. </el-input>
  76. </el-form-item>
  77. -
  78. <el-form-item prop="endDay2">
  79. <el-input style="width: 100%;" v-model="formData.endDay2">
  80. <template slot="append">天</template>
  81. </el-input>
  82. </el-form-item>
  83. </div>
  84. </el-form-item>
  85. </el-col>
  86. </el-row>
  87. <el-row :gutter="24">
  88. <el-col :span="8" :offset="16">
  89. <el-form-item style="text-align: right;">
  90. <el-button type="primary" @click="handleSearch" class="export-btn" icon="el-icon-search">查询</el-button>
  91. <el-button plain @click="handleReset" icon="el-icon-refresh">重置</el-button>
  92. <el-button type="primary" icon="el-icon-download" class="export-btn">导出数据</el-button>
  93. <el-button @click="toBack" style="float: right;">返回</el-button>
  94. </el-form-item>
  95. </el-col>
  96. </el-row>
  97. </el-form>
  98. </div>
  99. <!-- <Title :title="'病案列表'" /> -->
  100. <el-table :data="tableData" style="width: 100%">
  101. <el-table-column type="index" label="序号" width="80"></el-table-column>
  102. <el-table-column prop="score_lv" label="病案质量" width="120">
  103. <template slot-scope="scope">
  104. <div v-html="scope.row.score_lv"/>
  105. </template>
  106. </el-table-column>
  107. <el-table-column prop="AAA28" label="病案号" width="120">
  108. <template slot-scope="scope">
  109. <span class="link" @click="funGoto(scope.row.MED_REC_ID)">
  110. {{ scope.row.AAA28 }}
  111. </span>
  112. </template>
  113. </el-table-column>
  114. <el-table-column prop="AAA01" label="患者姓名" width="120"></el-table-column>
  115. <el-table-column prop="AAC01" label="出院时间" width="160"></el-table-column>
  116. <el-table-column prop="AAC11N" label="出院科室" width="150" show-overflow-tooltip></el-table-column>
  117. <el-table-column prop="AAC04" label="住院天数" width="80"></el-table-column>
  118. <el-table-column prop="AEE03" label="主治医师" width="120"></el-table-column>
  119. <el-table-column prop="AEM01C_MC" label="离院方式" width="150" show-overflow-tooltip></el-table-column>
  120. <el-table-column prop="AAB01" label="入院时间" width="160"></el-table-column>
  121. <el-table-column prop="ICD10_NAME" label="主要诊断名称" show-overflow-tooltip></el-table-column>
  122. <el-table-column prop="ICD9_NAME" label="主要手术名称" show-overflow-tooltip></el-table-column>
  123. </el-table>
  124. <!-- 分页控制 -->
  125. <mPagination v-if="tableData && tableData.length !== 0" layout="sizes, prev, pager, next, slot" :data="paginationData" @sizeChange="handleSizeChange" @pageChangeEvent="pageHasChanged"></mPagination>
  126. </div>
  127. </div>
  128. </template>
  129. <script>
  130. import Title from '@/components/Title';
  131. import { mapGetters } from 'vuex';
  132. import mPagination from '@/components/m-pagination';
  133. export default {
  134. name: 'Dashboard',
  135. components: {
  136. Title,
  137. mPagination,
  138. },
  139. computed: {
  140. ...mapGetters(['name']),
  141. },
  142. data() {
  143. let query = this.$route.query;
  144. return {
  145. formData: { // 终末病历质控-问题数量
  146. is_qx: query.is_qx,
  147. YQ_CODE: query.YQ_CODE? query.YQ_CODE.split(',') : [],
  148. KS_CODE: query.KS_CODE? query.KS_CODE.split(',') : [],
  149. BQ_CODE: query.BQ_CODE? query.BQ_CODE.split(',') : [],
  150. AAA28: query.AAA28 || '',
  151. start_time: query.startTime? query.startTime : this.storageGet('start_time'),
  152. end_time: query.endTime ? query.endTime : this.storageGet('end_time'),
  153. lb_level: '',
  154. AEM01C: '',
  155. endDay1: '',
  156. endDay2: ''
  157. },
  158. searchOptions: {
  159. yqArray: [],//院区options
  160. ksArray: [],//科室options
  161. bqArray: [],//病区options
  162. bazlArray: [], //病案质量
  163. lyTypeArray: [], //离院方式
  164. wtArray: [], // 问题描述
  165. ruleTypeArray: [], // 规则类型
  166. cascaderProps: {
  167. multiple: true, // 开启多选模式
  168. label: 'dep_name',
  169. value: 'dep_id',
  170. children: 'children',
  171. checkStrictly: true, // 允许独立选择任意层级
  172. emitPath: false, // 是否返回完整路径(true 返回路径数组,false 只返回末节点值)
  173. },
  174. },
  175. tableData: [],
  176. // 分页数据
  177. paginationData: {
  178. total: 10,
  179. currentPage: 1,
  180. pageSize: 10,
  181. },
  182. departmentList: [],
  183. };
  184. },
  185. mounted() {
  186. this.getSearchOptions();
  187. this.funQuery();
  188. },
  189. methods: {
  190. toBack() {
  191. this.$router.history.go(-1)
  192. },
  193. funGoto(val) {
  194. this.storageSet('getData', val);
  195. this.goto('/caseViews')
  196. },
  197. pageHasChanged() {
  198. this.funQuery();
  199. },
  200. handleSizeChange(size) {
  201. this.paginationData.currentPage = 1
  202. this.paginationData.pageSize = size
  203. this.funQuery();
  204. },
  205. handleSearch() {
  206. this.paginationData.currentPage = 1
  207. this.funQuery()
  208. },
  209. funQuery() {
  210. //查询
  211. this.$axios.post('CaseHistory/Terminal/blNumberTableList', {
  212. ...this.formData,
  213. YQ_CODE: this.formData.YQ_CODE.join(','),
  214. KS_CODE: this.formData.KS_CODE.join(','),
  215. BQ_CODE: this.formData.BQ_CODE.join(','),
  216. page: this.paginationData.currentPage,
  217. limit: this.paginationData.pageSize,
  218. }).then(res => {
  219. this.paginationData.total = res.data.count;
  220. this.tableData = res.data.data;
  221. });
  222. },
  223. handleReset() {
  224. this.$refs.filterListFormRef.resetFields();
  225. },
  226. getSearchOptions() {
  227. this.$axios.post('CaseHistory/Terminal/getQxBlSearchOptions', {}).then(res => {
  228. this.searchOptions.yqArray = res.data.yqArray;//院区
  229. this.searchOptions.ksArray = this.cancelChildren(res.data.ksArray);//科室
  230. this.searchOptions.bqArray = this.cancelChildren(res.data.bqArray);//病区
  231. this.searchOptions.bazlArray = res.data.bazlArray
  232. this.searchOptions.lyTypeArray = res.data.lyTypeArray
  233. this.searchOptions.wtArray = res.data.wtArray
  234. this.searchOptions.ruleTypeArray = res.data.ruleTypeArray
  235. })
  236. },
  237. // 将下拉框为空的children属性设置为undefined
  238. cancelChildren(arr) {
  239. if (!arr) {
  240. return [];
  241. }
  242. return arr.map(item => {
  243. if (item.children.length == 0) {
  244. item.children = undefined;
  245. } else {
  246. item.children.map(childreItem => {
  247. if (childreItem.children.length == 0) {
  248. childreItem.children = undefined;
  249. }
  250. return childreItem
  251. })
  252. }
  253. return item
  254. })
  255. },
  256. //院区change事件
  257. yqChange() {
  258. this.formData.KS_CODE = [];
  259. this.formData.BQ_CODE = [];
  260. this.$axios.post('CaseHistory/Terminal/getKsOptions', { 'YQ_CODE': this.formData.YQ_CODE }).then(res => {
  261. this.searchOptions.ksArray = this.cancelChildren(res.data.ksArray);//科室
  262. this.searchOptions.bqArray = this.cancelChildren(res.data.bqArray);//病区
  263. })
  264. },
  265. //科室change事件
  266. ksChange() {
  267. this.formData.BQ_CODE = [];
  268. this.$axios.post('CaseHistory/Terminal/getBqOptions', { 'KS_CODE': this.formData.KS_CODE }).then(res => {
  269. this.searchOptions.bqArray = this.cancelChildren(res.data.bqArray);//病区
  270. })
  271. },
  272. },
  273. };
  274. </script>
  275. <style lang="scss" scoped>
  276. .tableBox {
  277. background: #fff;
  278. padding: 19px;
  279. border-radius: 5px;
  280. }
  281. .block {
  282. background: #fff;
  283. width: 100%;
  284. align-items: center;
  285. border-radius: 5px;
  286. height: 75px;
  287. padding-left: 10px;
  288. margin-bottom: 20px;
  289. padding-left: 0;
  290. padding-right: 0;
  291. }
  292. </style>