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.

100 lines
3.3 KiB

3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 months ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 months ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
  1. <template>
  2. <div>
  3. <!-- :row-class-name="tableRowClassName" -->
  4. <el-table :data="doctorCheck.RegisterCheckList" border
  5. :height="(window.pageHeight < 600) ? 290 : (window.pageHeight - 350)" size="small" highlight-current-row
  6. ref="doctorCheck.RegisterCheckList" >
  7. <el-table-column prop="asbitemName" label="组合项目" min-width="120" />
  8. <el-table-column prop="completeFlag" label="状态" align="center" width="60">
  9. <template slot-scope="scope">
  10. <div :style="`color: ${setCheckStatusColor(scope.row.completeFlag)}`">
  11. {{ dddw(dict.checkCompleteFlag, 'id', scope.row.completeFlag, 'displayName') }}
  12. <!--
  13. <el-radio v-model="scope.row.checkCompleteFlag" label="0">未检</el-radio>
  14. <el-radio v-model="scope.row.checkCompleteFlag" label="1">已检</el-radio>
  15. <el-radio v-model="scope.row.checkCompleteFlag" label="2">弃检</el-radio>
  16. -->
  17. </div>
  18. </template>
  19. </el-table-column>
  20. <el-table-column prop="checkDate" label="检查日期" min-width="90" align="center">
  21. <template slot-scope="scope">
  22. <div v-if="scope.row.checkDate">
  23. {{ moment(scope.row.checkDate).format("yyyy-MM-DD") }}
  24. </div>
  25. </template>
  26. </el-table-column>
  27. </el-table>
  28. </div>
  29. </template>
  30. <script>
  31. import moment from "moment";
  32. import { mapState } from "vuex";
  33. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  34. import { dddw, setCheckStatusColor,listOrderBy } from "../../utlis/proFunc"
  35. export default {
  36. components: {},
  37. props: ["patientRegisterId","brushTimes"],
  38. data() {
  39. return {};
  40. },
  41. created() { },
  42. //挂载完成
  43. mounted() {
  44. this.registerCheckList(this.patientRegisterId)
  45. },
  46. computed: {
  47. ...mapState(["window", "dict", "dataTransOpts", "doctorCheck"]),
  48. },
  49. methods: {
  50. moment, dddw,setCheckStatusColor,
  51. tableRowClassName({ row, rowIndex }) {
  52. //console.log(row)
  53. switch (row.completeFlag) {
  54. case '0':
  55. return 'danger'; //未检
  56. case '2':
  57. return 'info'; //未检
  58. default:
  59. return '';
  60. }
  61. },
  62. //获取检查组合项目
  63. registerCheckList(patientRegisterId) {
  64. this.doctorCheck.RegisterCheckList = []
  65. if (!patientRegisterId) return
  66. postapi('/api/app/RegisterCheck/GetRegisterCheckAsbitemsByPatientRegisterId', { patientRegisterId })
  67. .then((res) => {
  68. // console.log("registerCheckList", res.data);
  69. if (res.code > -1) {
  70. this.doctorCheck.RegisterCheckList = listOrderBy(res.data,[{ colName: 'completeFlag', sortType: 'A' }])
  71. }
  72. // console.log("this.doctorCheck.RegisterCheckList", this.doctorCheck.RegisterCheckList);
  73. })
  74. .catch((err) => {
  75. this.$message.error({ showClose: true, message: `操作失败,原因:${err}` });
  76. });
  77. },
  78. },
  79. watch: {
  80. //人员ID切换
  81. //体检人员未切换时 也可以强制刷新数据
  82. "brushTimes": {
  83. // immediate:true,
  84. handler(newVal, oldVal) {
  85. console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.patientRegisterId}`);
  86. this.registerCheckList(this.patientRegisterId)
  87. }
  88. },
  89. }
  90. };
  91. </script>
  92. <style scoped></style>