department.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <template>
  2. <div class="dashboard-container">
  3. <div class="tableBox">
  4. <div class="block">
  5. <div class="blockCon">
  6. <div class="selectDns"></div>
  7. <el-select v-model="formData.Department" class="selects" placeholder="出院科室">
  8. <el-option v-for="(item, index) in departmentList" :label="item.name" :value="item.id" :key="index"></el-option>
  9. </el-select>
  10. <span class="kong"></span>
  11. <el-select v-model="formData.problem" class="selects" placeholder="问题属性">
  12. <el-option v-for="(item, index) in levelList" :label="item.name" :value="item.id" :key="index"></el-option>
  13. </el-select>
  14. <span class="kong"></span>
  15. <el-date-picker v-model="formData.startTime" type="date" format="yyyy 年 MM 月 dd 日" value-format="yyyyMMdd" placeholder="开始日期"></el-date-picker>
  16. <el-date-picker
  17. v-model="formData.endTime"
  18. type="date"
  19. style="margin-left: 10px"
  20. format="yyyy 年 MM 月 dd 日"
  21. value-format="yyyyMMdd"
  22. placeholder="结束日期"
  23. ></el-date-picker>
  24. <span class="kong"></span>
  25. <el-button type="primary" @click="funQuery">查询</el-button>
  26. <span class="kong"></span>
  27. <el-button @click="reset">重置条件</el-button>
  28. <span class="kong"></span>
  29. <el-button type="primary" icon="el-icon-download">导出Excel表格</el-button>
  30. </div>
  31. </div>
  32. <Title :title="'总缺陷列表'" />
  33. <el-table :data="tableData" style="width: 100%">
  34. <el-table-column type="index" label="序号"></el-table-column>
  35. <el-table-column prop="AAA28" label="病案号">
  36. <template slot-scope="scope">
  37. <span class="blue" @click="funGoto(scope.row.MED_REC_ID)">{{ scope.row.AAA28 }}</span>
  38. </template>
  39. </el-table-column>
  40. <el-table-column prop="AAA01" label="患者姓名"></el-table-column>
  41. <el-table-column prop="AAC03" label="出院科室"></el-table-column>
  42. <el-table-column prop="AAA01" label="出院病房"></el-table-column>
  43. <el-table-column prop="AAC01" label="出院时间"></el-table-column>
  44. <el-table-column prop="AEE04" label="住院医师"></el-table-column>
  45. <el-table-column prop="AAA01" label="缺陷项"></el-table-column>
  46. <el-table-column prop="AAA01" label="取值"></el-table-column>
  47. <el-table-column prop="desc" label="修订建议"></el-table-column>
  48. <el-table-column prop="AAA01" label="操作"></el-table-column>
  49. </el-table>
  50. <!-- 分页控制 -->
  51. <mPagination v-if="tableData && tableData.length !== 0" :data="paginationData" @pageChangeEvent="pageHasChanged"></mPagination>
  52. </div>
  53. </div>
  54. </template>
  55. <script>
  56. import Title from '@/components/Title';
  57. import { mapGetters } from 'vuex';
  58. import mPagination from '@/components/m-pagination';
  59. export default {
  60. name: 'Dashboard',
  61. components: {
  62. Title,
  63. mPagination,
  64. },
  65. computed: {
  66. ...mapGetters(['name']),
  67. },
  68. data() {
  69. return {
  70. formData: {
  71. problem: 'all',
  72. Department: '',
  73. },
  74. tableData: [],
  75. // 分页数据
  76. paginationData: {
  77. total: 10,
  78. currentPage: 1,
  79. pageSize: 10,
  80. },
  81. levelList: [], //问题属性
  82. departmentList: [],
  83. AAC11C: this.$route.query.AAC11C,
  84. };
  85. },
  86. mounted() {
  87. console.log(this.$route.query.AAC11C);
  88. this.formData.endTime = this.storageGet('endTime');
  89. this.formData.startTime = this.storageGet('startTime');
  90. this.selectInfo();
  91. this.funQuery();
  92. },
  93. methods: {
  94. selectInfo() {
  95. // let pramse = {};
  96. this.$axios.post('/selectInfo').then(res => {
  97. this.payList = res.data.pay;
  98. console.log(this.payList);
  99. //支付方式 pay
  100. this.departmentList = res.data.department;
  101. //出院科室 department
  102. this.levelList = res.data.level;
  103. });
  104. },
  105. funGoto(val) {
  106. this.storageSet('getData', val);
  107. this.goto('/details');
  108. },
  109. pageHasChanged() {
  110. this.funQuery();
  111. },
  112. funQuery() {
  113. //查询
  114. const AAC01 = [];
  115. AAC01.push(this.formData.startTime);
  116. AAC01.push(this.formData.endTime);
  117. let pramse = {
  118. AAC01, //时间段
  119. AAA28: '',
  120. start_time:this.formData.startTime,
  121. end_time:this.formData.endTime,
  122. // AAC11C: this.departId, //科室ID
  123. // level: this.formData.level, //错误等级
  124. page: this.paginationData.currentPage, //页码
  125. limit: this.paginationData.pageSize, //条数
  126. isPage:1
  127. };
  128. if (this.AAC11C) {
  129. pramse.AAC11C = this.AAC11C;
  130. }
  131. this.$axios.post('/qualityList', pramse).then(res => {
  132. console.log(res);
  133. this.paginationData.total = res.data.count;
  134. this.tableData = res.data.list;
  135. });
  136. },
  137. reset() {
  138. // 重置数据
  139. if (this.choice == 0) {
  140. Object.assign(this.$data.formData, this.$options.data().formData);
  141. } else {
  142. Object.assign(this.$data.formData, this.$options.data().formData);
  143. }
  144. },
  145. },
  146. };
  147. </script>
  148. <style scoped>
  149. ::v-deep.el-pagination.is-background .btn-next,
  150. ::v-deep.el-pagination.is-background .btn-prev,
  151. ::v-deep.el-pagination.is-background .el-pager li {
  152. margin: 0 5px;
  153. background-color: #fff;
  154. color: #606266;
  155. min-width: 30px;
  156. border-radius: 2px;
  157. border: 1px solid #dfe3f3;
  158. line-height: 27px;
  159. }
  160. ::v-deep.el-pagination.is-background .el-pager li:not(.disabled).active {
  161. background: #7e8bab;
  162. }
  163. ::v-deep.el-table .el-table__row td {
  164. color: #7e8bab;
  165. border-bottom: 1px solid #f4f4f4;
  166. }
  167. ::v-deep.el-table .el-table__header tr th:first-child {
  168. border-radius: 10px 0px 0px 10px;
  169. }
  170. ::v-deep.el-table .el-table__header tr th:last-child {
  171. border-radius: 0px 10px 10px 0px;
  172. }
  173. ::v-deep.el-table .el-table__header tr th {
  174. background: #f1f6ff;
  175. color: #13171e;
  176. border-bottom: 0px;
  177. }
  178. </style>
  179. <style lang="scss" scoped>
  180. .tableBox {
  181. background: #fff;
  182. padding: 19px;
  183. border-radius: 5px;
  184. font-size: 12px;
  185. }
  186. .block {
  187. background: #fff;
  188. border-radius: 5px;
  189. margin-bottom: 16px;
  190. padding: 20px 30px;
  191. margin-bottom: 20px;
  192. .fBtn {
  193. display: flex;
  194. align-items: center;
  195. justify-content: center;
  196. }
  197. .bnh {
  198. margin-bottom: 20px;
  199. }
  200. .barBtn {
  201. display: flex;
  202. align-items: center;
  203. justify-content: center;
  204. }
  205. // .selects {
  206. // width: 100%;
  207. // }
  208. .rowsa {
  209. margin-bottom: 20px;
  210. }
  211. }
  212. .tableBox {
  213. background: #fff;
  214. padding: 19px;
  215. border-radius: 5px;
  216. }
  217. .dashboard {
  218. &-container {
  219. margin: 30px;
  220. }
  221. &-text {
  222. font-size: 30px;
  223. line-height: 46px;
  224. }
  225. }
  226. .pind {
  227. padding: 0 20px;
  228. }
  229. .pind10 {
  230. padding: 0 5px;
  231. }
  232. .width150 {
  233. width: 200px;
  234. }
  235. .width300 {
  236. width: 295px;
  237. }
  238. .width500 {
  239. width: 645px;
  240. }
  241. .width90 {
  242. width: 90px;
  243. }
  244. .blue {
  245. color: #185da6;
  246. }
  247. .block {
  248. background: #fff;
  249. display: flex;
  250. align-items: center;
  251. border-radius: 5px;
  252. height: 75px;
  253. margin-bottom: 16px;
  254. padding-left: 0;
  255. padding-right: 0;
  256. margin-bottom: 20px;
  257. margin-bottom: 20px;
  258. .blockCon {
  259. display: flex;
  260. align-items: center;
  261. .selectDns {
  262. span {
  263. margin-right: 5px;
  264. }
  265. }
  266. .demonstration {
  267. margin-left: 10px;
  268. }
  269. .pickers {
  270. margin-left: 5px;
  271. }
  272. .lsxd {
  273. margin-left: 20px;
  274. }
  275. .ins {
  276. width: 150px;
  277. margin: 0 10px;
  278. }
  279. }
  280. .sc {
  281. background: #185da6;
  282. color: #fff;
  283. }
  284. }
  285. .kong {
  286. padding: 0 10px;
  287. }
  288. </style>