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.

92 lines
2.3 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div>
  3. <el-table :data="doctorCheck.RegisterCheckList" style="width: 100%" height="750" border
  4. :row-class-name="tableRowClassName" @row-click="rowClick">
  5. <el-table-column prop="asbitemName" label="组合项目" width="180" />
  6. </el-table>
  7. </div>
  8. </template>
  9. <script>
  10. import { mapState } from 'vuex';
  11. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  12. export default {
  13. components: {},
  14. data() {
  15. return {
  16. };
  17. },
  18. created() {},
  19. //挂载完成
  20. mounted() {},
  21. computed:{
  22. ...mapState(['dict','doctorCheck']),
  23. },
  24. methods: {
  25. tableRowClassName({row, rowIndex}) {
  26. //console.log('tableRowClassName',rowIndex,row)
  27. if (row.completeFlag === '0') {
  28. return 'warning-row'; //未检
  29. } else if (row.completeFlag === '2') {
  30. return 'refuse-row'; //弃检
  31. }
  32. return '';
  33. },
  34. //选择组合项目
  35. rowClick(row){
  36. //registerCheckId 具体动作写在相应组件监听事件中
  37. this.doctorCheck.RegisterCheckId = row.id
  38. this.doctorCheck.RegisterCheckEdit = row
  39. },
  40. //获取检查组合项目
  41. registerCheckList(patientRegisterId){
  42. console.log(`/api/app/register-check/register-check-or-asbitem/${patientRegisterId}`)
  43. getapi(`/api/app/register-check/register-check-or-asbitem/${patientRegisterId}`)
  44. .then((res) => {
  45. console.log("registerCheckList", res.data);
  46. if (res.code != -1) {
  47. this.doctorCheck.RegisterCheckList = res.data;
  48. //查询出来 默认显示第1条记录明细、小结等
  49. if(res.data.length > 0) this.doctorCheck.RegisterCheckId = res.data[0].id
  50. }
  51. })
  52. .catch((err) => {
  53. this.$message({type: "error",message: `操作失败,原因:${err}`});
  54. });
  55. },
  56. },
  57. //监听事件
  58. watch: {
  59. //体检人员切换
  60. "doctorCheck.prBase.id"(newVal, oldVal) {
  61. console.log("watch doctorCheck.prBase.id newVal:", newVal, " oldVal:", oldVal);
  62. if (newVal != oldVal && newVal != '') {
  63. this.registerCheckList(newVal)
  64. }
  65. },
  66. }
  67. };
  68. </script>
  69. <style>
  70. .el-table .warning-row {
  71. background: rgb(240,125,125);
  72. }
  73. .el-table .refuse-row {
  74. background: rgb(192,192,192);
  75. }
  76. </style>