index.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <div class="app-container">
  3. <el-row>
  4. <el-col :span="4" v-if="user.roleName == '科室主任'">
  5. <dtreeDoctor v-model="queryParams.userId" @handleQuery="handleQuery"></dtreeDoctor>
  6. </el-col>
  7. <el-col :span="4" v-if="user.roleName == '超级管理员' || user.roleName == '管理员'">
  8. <dtree v-model="queryParams.deptId" @handleQuery="handleQuery"></dtree>
  9. </el-col>
  10. <el-col :span="user.roleName != '医生' ? 20 : 24">
  11. <el-form :model="queryParams" ref="queryForm" :inline="true">
  12. <el-form-item prop="physician" v-if="user.roleName == '超级管理员' || user.roleName == '管理员'">
  13. <el-input v-model="queryParams.physician" placeholder="请输入主治医生" clearable @keyup.enter.native="handleQuery" class="inp" />
  14. </el-form-item>
  15. <el-form-item prop="name" label="患者姓名">
  16. <el-input v-model="queryParams.name" placeholder="请输入患者姓名" clearable @keyup.enter.native="handleQuery" class="inp" />
  17. </el-form-item>
  18. <el-form-item label="出院日期">
  19. <el-date-picker v-model="dateRange" type="daterange" start-placeholder="开始时间" end-placeholder="结束时间" value-format="yyyy-MM-dd" />
  20. </el-form-item>
  21. <el-form-item>
  22. <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
  23. <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
  24. </el-form-item>
  25. <el-button type="primary" icon="el-icon-download" @click="handleExport" style="float: right;">导出</el-button>
  26. </el-form>
  27. <el-table :data="response.rows" border height="calc(100vh - 240px)" v-loading="loading">
  28. <el-table-column type="selection" width="55" align="center" />
  29. <el-table-column label="患者姓名" align="center" prop="name" width="110" />
  30. <el-table-column label="性别" align="center" prop="state" width="70">
  31. <template slot-scope="scope">{{ scope.row.sex == 'F' ? '女' : '男' }}</template>
  32. </el-table-column>
  33. <el-table-column label="病历号" align="center" prop="blh" width="110" />
  34. <el-table-column label="入院时间" align="center" prop="admissionTime" width="160" />
  35. <el-table-column label="出院时间" align="center" prop="dischargeTime" width="160" />
  36. <el-table-column label="关注小程序" align="center" prop="state" width="100">
  37. <template slot-scope="scope">
  38. <el-tag type="danger" v-if="scope.row.isBindWx == 0">未关注</el-tag>
  39. <el-tag type="success" v-if="scope.row.isBindWx >= 1">已关注</el-tag>
  40. </template>
  41. </el-table-column>
  42. <el-table-column label="出院随访(达成率)" align="center" prop="state" width="140">
  43. <template slot-scope="scope">
  44. <div class="pro">
  45. <el-progress class="pp" :text-inside="true" :stroke-width="22" :percentage="scope.row.record > 0 ? parseInt(((scope.row.recordRead / scope.row.record) * 100).toFixed(0)) : 0"></el-progress>
  46. <div class="num">{{ scope.row.record }}次</div>
  47. </div>
  48. </template>
  49. </el-table-column>
  50. <el-table-column label="复诊提醒(达成率)" align="center" prop="state" width="140">
  51. <template slot-scope="scope">
  52. <div class="pro">
  53. <el-progress class="pp" :text-inside="true" :stroke-width="22" :percentage="scope.row.up > 0 ? parseInt(((scope.row.upRead / scope.row.up) * 100).toFixed(0)) : 0"></el-progress>
  54. <div class="num">{{ scope.row.up }}次</div>
  55. </div>
  56. </template>
  57. </el-table-column>
  58. <el-table-column label="管床医生" align="center" prop="physician" width="110" />
  59. <el-table-column label="所属科室" align="center" prop="department" width="160" />
  60. <el-table-column label="操作" align="center" width="250" fixed="right">
  61. <template slot-scope="scope">
  62. <el-button size="mini" type="text" icon="el-icon-search" @click="op('detail', scope.row)">患者信息</el-button>
  63. <el-button size="mini" type="text" icon="el-icon-document" @click="op('listByUser', scope.row, 0)">复诊提醒</el-button>
  64. <el-button size="mini" type="text" icon="el-icon-document" @click="op('listByUser', scope.row, 1)">出院随访</el-button>
  65. </template>
  66. </el-table-column>
  67. <template slot="empty">
  68. <el-empty></el-empty>
  69. </template>
  70. </el-table>
  71. <pagination v-if="response.total > 0" :total="response.total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
  72. </el-col>
  73. </el-row>
  74. </div>
  75. </template>
  76. <script>
  77. import detail from '@/views/work/visit/detail';
  78. import listByUser from '@/views/work/follow/record/listByUser';
  79. export default {
  80. name: 'Visit',
  81. data() {
  82. return {
  83. user: this.$store.state.user,
  84. dateRange: [],
  85. loading: false,
  86. queryParams: {
  87. pageNum: 1,
  88. pageSize: 10,
  89. physician: null,
  90. name: null,
  91. department: null,
  92. deptId: null,
  93. userId: null
  94. }
  95. };
  96. },
  97. created() {
  98. if (this.user.roleName == '科室主任') {
  99. this.queryParams.userId = this.user.id;
  100. }
  101. this.getList();
  102. },
  103. methods: {
  104. getList() {
  105. this.loading = true;
  106. if (this.dateRange) {
  107. this.queryParams.dateBegin = this.dateRange[0];
  108. this.queryParams.dateEnd = this.dateRange[1];
  109. }
  110. this.get({ url: '/work/visit/patientCard', data: this.queryParams, loading: 'false' }).then((response) => {
  111. this.response = response;
  112. this.loading = false;
  113. });
  114. },
  115. op(tag, row, type) {
  116. if (tag === 'detail') {
  117. this.iframe({ obj: detail, param: { id: row.id, patId: row.patId }, title: '查看患者信息', width: '75%', height: '93%' });
  118. }
  119. if (tag === 'listByUser') {
  120. this.iframe({ obj: listByUser, param: { patientId: row.patId, patientName: row.name, type: type }, title: row.name + '的' + (type == 0 ? '复诊提醒记录' : '出院随访记录'), width: '80%', height: '80%' });
  121. }
  122. },
  123. handleQuery(e) {
  124. if (e != undefined && e.deptId) {
  125. this.queryParams.userId = null;
  126. this.queryParams.deptId = e.deptId;
  127. }
  128. this.queryParams.pageNum = 1;
  129. this.getList();
  130. },
  131. resetQuery() {
  132. this.resetForm('queryForm');
  133. this.dateRange = [];
  134. this.handleQuery();
  135. },
  136. /** 导出按钮操作 */
  137. handleExport() {
  138. this.download('/work/visit/export', { ...this.queryParams }, '患者信息.xlsx');
  139. }
  140. }
  141. };
  142. </script>