index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <div class="content-container">
  3. <el-row class="tool-bar">
  4. <div class="content-title">
  5. <span> {{ title }} </span>
  6. </div>
  7. <div class="select-search">
  8. <span class="search-label">部门:</span>
  9. <group-selector />
  10. </div>
  11. <div class="select-search">
  12. <span class="search-label">年度:</span>
  13. <el-select v-model="conditions.year" filterable placeholder="年份" style="width:120px">
  14. <el-option label="2022年" :value="2022" />
  15. <el-option label="2023年" :value="2023" />
  16. <el-option label="2024年" :value="2024" />
  17. <el-option label="2025年" :value="2025" />
  18. <el-option label="2026年" :value="2026" />
  19. <el-option label="2027年" :value="2027" />
  20. </el-select>
  21. </div>
  22. <div class="select-search">
  23. <span class="search-label">月份:</span>
  24. <el-select v-model="conditions.month" filterable placeholder="月份" style="width:120px" clearable>
  25. <el-option label="1月" :value="1" />
  26. <el-option label="2月" :value="2" />
  27. <el-option label="3月" :value="3" />
  28. <el-option label="4月" :value="4" />
  29. <el-option label="5月" :value="5" />
  30. <el-option label="6月" :value="6" />
  31. <el-option label="7月" :value="7" />
  32. <el-option label="8月" :value="8" />
  33. <el-option label="9月" :value="9" />
  34. <el-option label="10月" :value="10" />
  35. <el-option label="11月" :value="11" />
  36. <el-option label="12月" :value="12" />
  37. </el-select>
  38. </div>
  39. <div class="right" style="min-width:400px;flex: 1;">
  40. <el-input v-model="conditions.keywords" class="search-input m-right-15" size="mini" placeholder="请输入内容">
  41. <el-button slot="append" icon="el-icon-search" size="mini" @click="getData()" />
  42. </el-input>
  43. <el-button class="filter-item" type="primary" icon="el-icon-document" size="mini" @click="handleExport">导出</el-button>
  44. <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-printer" size="mini" @click="handlePrint">打印</el-button>
  45. </div>
  46. </el-row>
  47. <el-row class="content-body">
  48. <vuescroll :ops="ops" style="height: calc(100vh - 250px)">
  49. <!--年度-->
  50. <el-table id="print_view" v-loading="listLoading" border :data="dataList">
  51. <el-table-column type="index" align="center" label="序号" width="80" />
  52. <el-table-column prop="groupId" header-align="center" align="center" width="300" label="部门">
  53. <template v-slot="{row}">
  54. <span> {{ row.groupName }} </span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column prop="year" header-align="center" align="center" width="300" label="医生">
  58. <template v-slot="{row}">
  59. <span> {{ row.doctorName }} </span>
  60. </template>
  61. </el-table-column>
  62. <el-table-column prop="score" header-align="center" align="center" label="评分均值">
  63. <template v-slot="{row}">
  64. <span> {{ row.score }} </span>
  65. </template>
  66. </el-table-column>
  67. <el-table-column prop="score" header-align="center" align="center" label="评价次数">
  68. <template v-slot="{row}">
  69. <span> {{ row.recordQty }} </span>
  70. </template>
  71. </el-table-column>
  72. </el-table>
  73. </vuescroll>
  74. </el-row>
  75. </div>
  76. </template>
  77. <script>
  78. import { mapGetters } from 'vuex'
  79. import vuescroll from 'vuescroll'
  80. import { doctorByList } from '@/api/hos/satisfyStatisApi'
  81. import { GroupSelector } from '@/components'
  82. export default {
  83. name: 'DoctorSatisIndex',
  84. components: { vuescroll, GroupSelector },
  85. mixins: [],
  86. props: {},
  87. data() {
  88. return {
  89. ops: {
  90. bar: {
  91. keepShow: false,
  92. background: 'rgba(144, 147, 153, 0.4)',
  93. onlyShowBarOnScroll: false
  94. }
  95. },
  96. title: '医生排名',
  97. listLoading: false,
  98. dataList: [],
  99. conditions: {
  100. keywords: undefined,
  101. groupId: undefined,
  102. year: undefined,
  103. month: undefined
  104. }
  105. }
  106. },
  107. computed: {
  108. ...mapGetters([
  109. 'userData'
  110. ])
  111. },
  112. mounted() {
  113. this.getData()
  114. },
  115. methods: {
  116. getData() {
  117. this.listLoading = true
  118. doctorByList(this.conditions).then((resp) => {
  119. this.listLoading = false
  120. const { code, msg, data } = resp
  121. if (code === 200) {
  122. this.dataList = data
  123. } else {
  124. this.$message.error(msg)
  125. }
  126. }).catch((error) => {
  127. console.log(error)
  128. })
  129. },
  130. handleExport() {
  131. },
  132. handlePrint() {
  133. }
  134. }
  135. }
  136. </script>
  137. <style lang="scss" scoped>
  138. .content-container {
  139. padding: 10px;
  140. margin: 10px;
  141. overflow: hidden;
  142. background: #193142;
  143. height: calc(100vh - 85px);
  144. p {
  145. margin: 0;
  146. line-height: 2em;
  147. padding: 0;
  148. }
  149. .tool-bar {
  150. display: flex;
  151. align-items: center;
  152. overflow: unset;
  153. .list-group {
  154. font-size: 14px;
  155. color: #C1C6C8;
  156. // overflow: hidden;
  157. padding:0 20px;
  158. .list-item {
  159. float: left;
  160. margin-right: 20px;
  161. cursor: pointer;
  162. &.active {
  163. color: #FFFFFF;
  164. border-bottom: 3px solid #08A6DC;
  165. }
  166. }
  167. }
  168. .search-label {
  169. text-align: right;
  170. font-size: 12px;
  171. font-weight: 400;
  172. color: #FFFFFF;
  173. line-height: 1;
  174. span {
  175. font-size: 20px;
  176. font-weight: 400;
  177. color: #FFFFFF;
  178. }
  179. }
  180. }
  181. }
  182. .select-search{
  183. margin-left: 20px;
  184. display: flex;
  185. justify-content: flex-start;
  186. align-items: center;
  187. }
  188. </style>