You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
3.4 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div>
  3. <el-table :data="doctorCheck.RegisterCheckList" border
  4. :height="(window.pageHeight < 600) ? 220 : (window.pageHeight - 380)" size="small" highlight-current-row
  5. ref="doctorCheck.RegisterCheckList" :row-class-name="tableRowClassName">
  6. <el-table-column prop="asbitemName" label="组合项目" width="120" />
  7. <el-table-column prop="completeFlag" label="状态" align="center">
  8. <template slot-scope="scope">
  9. <div>
  10. {{ dddw(dict.checkCompleteFlag, 'id', scope.row.completeFlag, 'displayName') }}
  11. <!--
  12. <el-radio v-model="scope.row.checkCompleteFlag" label="0">未检</el-radio>
  13. <el-radio v-model="scope.row.checkCompleteFlag" label="1">已检</el-radio>
  14. <el-radio v-model="scope.row.checkCompleteFlag" label="2">弃检</el-radio>
  15. -->
  16. </div>
  17. </template>
  18. </el-table-column>
  19. <el-table-column prop="checkDate" label="检查日期" width="90">
  20. <template slot-scope="scope">
  21. <div v-if="scope.row.checkDate">
  22. {{ moment(scope.row.checkDate).format("yyyy-MM-DD") }}
  23. </div>
  24. </template>
  25. </el-table-column>
  26. </el-table>
  27. </div>
  28. </template>
  29. <script>
  30. import moment from "moment";
  31. import { mapState } from "vuex";
  32. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  33. import { dddw } from "../../utlis/proFunc"
  34. export default {
  35. components: {},
  36. props: ["patientRegisterId"],
  37. data() {
  38. return {};
  39. },
  40. created() { },
  41. //挂载完成
  42. mounted() {
  43. if (this.patientRegisterId) {
  44. this.registerCheckList(this.patientRegisterId);
  45. }
  46. },
  47. computed: {
  48. ...mapState(["window", "dict", "doctorCheck"]),
  49. },
  50. methods: {
  51. moment, dddw,
  52. tableRowClassName({ row, rowIndex }) {
  53. //console.log(row)
  54. switch (row.completeFlag) {
  55. case '0':
  56. return 'danger'; //未检
  57. case '2':
  58. return 'info'; //未检
  59. default:
  60. return '';
  61. }
  62. },
  63. //获取检查组合项目
  64. registerCheckList(patientRegisterId) {
  65. console.log(`/api/app/register-check/register-check-or-asbitem/${patientRegisterId}`)
  66. getapi(`/api/app/register-check/register-check-or-asbitem/${patientRegisterId}`)
  67. .then((res) => {
  68. console.log("registerCheckList", res.data);
  69. if (res.code != -1) {
  70. this.doctorCheck.RegisterCheckList = res.data;
  71. }
  72. })
  73. .catch((err) => {
  74. this.$message({ type: "error", message: `操作失败,原因:${err}` });
  75. });
  76. },
  77. },
  78. watch: {
  79. //人员ID切换
  80. "patientRegisterId"(newVal, oldVal) {
  81. console.log("watch patientRegisterId newVal:", newVal, " oldVal:", oldVal);
  82. if (newVal != oldVal && newVal != '') {
  83. this.registerCheckList(newVal);
  84. }
  85. },
  86. }
  87. };
  88. </script>
  89. <style scoped>
  90. ::v-deep .el-input__inner {
  91. text-align: center;
  92. padding-left: 1px;
  93. padding-right: 1px;
  94. }
  95. ::v-deep .el-table th.el-table__cell {
  96. text-align: center;
  97. padding-left: 1px;
  98. padding-right: 1px;
  99. }
  100. ::v-deep .el-table td.el-table__cell {
  101. padding-left: 1px;
  102. padding-right: 1px;
  103. }
  104. ::v-deep .el-table .cell {
  105. padding-left: 1px;
  106. padding-right: 1px;
  107. }
  108. ::v-deep input[type="number"]::-webkit-inner-spin-button,
  109. input[type="number"]::-webkit-outer-spin-button {
  110. -webkit-appearance: none !important;
  111. margin: 0 !important;
  112. }
  113. </style>