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.

132 lines
4.5 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
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
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. <!-- :row-class-name="tableRowClassName" -->
  4. <el-table :data="doctorCheck.RegisterCheckList" style="width: 100%"
  5. :height="window.pageHeight < 600 ? 400:window.pageHeight-200"
  6. border highlight-current-row ref='doctorCheck_RegisterCheckList'
  7. @row-click="rowClick">
  8. <el-table-column prop="asbitemName" label="组合项目" width="198">
  9. <template slot-scope="scope">
  10. <div>
  11. <el-tooltip class="item" effect="dark" content="未检" placement="left">
  12. <i v-show="scope.row.completeFlag == '0'" class="el-icon-circle-plus" style="font-size: 18px;color: red;"></i>
  13. </el-tooltip>
  14. <el-tooltip class="item" effect="dark" content="已检" placement="left">
  15. <i v-show="scope.row.completeFlag == '1'" class="el-icon-success" style="font-size: 18px;color: green;"></i>
  16. </el-tooltip>
  17. <el-tooltip class="item" effect="dark" content="弃检" placement="left">
  18. <i v-show="scope.row.completeFlag == '2'" class="el-icon-remove" style="font-size: 18px;"></i>
  19. </el-tooltip>
  20. {{scope.row.asbitemName}}
  21. </div>
  22. </template>
  23. </el-table-column>
  24. </el-table>
  25. </div>
  26. </template>
  27. <script>
  28. import { mapState } from 'vuex';
  29. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  30. export default {
  31. components: {},
  32. data() {
  33. return {
  34. };
  35. },
  36. created() {},
  37. //挂载完成
  38. mounted() {},
  39. computed:{
  40. ...mapState(['window','dataTransOpts','dict','doctorCheck']),
  41. },
  42. methods: {
  43. tableRowClassName({row, rowIndex}) {
  44. //console.log('tableRowClassName',rowIndex,row)
  45. if (row.completeFlag === '0') {
  46. return 'danger'; //未检
  47. } else if (row.completeFlag === '2') {
  48. return 'info'; //弃检
  49. }
  50. return '';
  51. },
  52. //选择组合项目
  53. rowClick(row){
  54. console.log('rowClick')
  55. this.doctorCheck.RegisterCheckId = row.id
  56. this.dataTransOpts.tableS.register_check.id = row.id
  57. setTimeout(() => { // 不管值是否改变,点击就强制刷新
  58. this.dataTransOpts.refresh.register_check.S++
  59. this.dataTransOpts.refresh.register_check_item.M++
  60. }, 10);
  61. // this.doctorCheck.RegisterCheckEdit = row
  62. },
  63. //获取检查组合项目
  64. registerCheckList(patientRegisterId){
  65. if(!patientRegisterId){
  66. this.doctorCheck.RegisterCheckList = []
  67. this.doctorCheck.RegisterCheckId = ''
  68. this.dataTransOpts.tableS.register_check.id = ''
  69. setTimeout(() => {
  70. this.dataTransOpts.refresh.register_check.S++
  71. this.dataTransOpts.refresh.register_check_item.M++
  72. }, 20);
  73. return
  74. }
  75. console.log(`/api/app/register-check/register-check-or-asbitem/${patientRegisterId}`)
  76. getapi(`/api/app/register-check/register-check-or-asbitem/${patientRegisterId}`)
  77. .then((res) => {
  78. console.log("registerCheckList", res.data);
  79. if (res.code != -1) {
  80. this.doctorCheck.RegisterCheckList = res.data;
  81. //查询出来 默认显示第1条记录明细、小结等
  82. if(res.data.length > 0) {
  83. this.doctorCheck.RegisterCheckId = res.data[0].id
  84. this.dataTransOpts.tableS.register_check.id = res.data[0].id
  85. // this.doctorCheck.RegisterCheckEdit = res.data[0]
  86. this.$refs['doctorCheck_RegisterCheckList'].setCurrentRow(res.data[0])
  87. }else{
  88. this.dataTransOpts.tableS.register_check.id = ''
  89. }
  90. setTimeout(() => { // 不管值是否改变,点击就强制刷新
  91. this.dataTransOpts.refresh.register_check.S++ //刷新检查医生
  92. this.dataTransOpts.refresh.register_check_item.M++ //刷新检查明细
  93. }, 10);
  94. }
  95. })
  96. .catch((err) => {
  97. this.$message({type: "error",message: `操作失败,原因:${err}`});
  98. });
  99. },
  100. },
  101. //监听事件
  102. watch: {
  103. //体检人员未切换时 也可以强制刷新数据
  104. "dataTransOpts.refresh.register_check.M":{
  105. immediate:true,
  106. handler(newVal, oldVal) {
  107. console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.dataTransOpts.tableS.patient_register.id}`);
  108. this.registerCheckList(this.dataTransOpts.tableS.patient_register.id)
  109. }
  110. },
  111. }
  112. };
  113. </script>
  114. <style scoped>
  115. </style>