BottleCard.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <div style="width: 230px;padding: 4px;border: 1px solid black;border-radius: 4px">
  3. <table style="width: 100%;border-spacing: 0; border-collapse: collapse;table-layout: fixed">
  4. <thead>
  5. <tr style="font-size: 20px;">
  6. <th colspan="4" style="text-align: left;font-weight: bold">
  7. {{ patInfo.patName }}
  8. </th>
  9. <th colspan="2" style="text-align: left">
  10. {{ bottleGroup }}
  11. </th>
  12. <th colspan="2" style="text-align: right">
  13. {{ patInfo.bedNo }}
  14. </th>
  15. </tr>
  16. <tr style="font-size: 14px;font-weight: bold;">
  17. <th colspan="5" style="text-align: left">
  18. <!-- {{ patInfo.patName }} -->
  19. {{ patInfo.patGender }}
  20. {{ patInfo.ageLabel }}
  21. {{ patInfo.wardName }}
  22. </th>
  23. <th colspan="3" style="text-align: right">
  24. {{ simpleYzDate }}
  25. </th>
  26. </tr>
  27. <!-- <tr>
  28. <th colspan="3" style="text-align: left">
  29. {{ patInfo.wardName }}
  30. </th>
  31. <th colspan="3">
  32. {{ bottleGroup }}
  33. </th>
  34. <th colspan="2" style="text-align: right">
  35. {{ simpleYzDate }}
  36. </th>
  37. </tr> -->
  38. </thead>
  39. <tbody>
  40. <tr>
  41. <td colspan="5">药品名称 / 规格</td>
  42. <!-- <td style="width: 36px;text-align: center;">规格</td> -->
  43. <td style="width: 36px;text-align: center;">频率</td>
  44. <td style="width: 36px;text-align: center;">用法</td>
  45. <td style="width: 36px;text-align: center;">数量</td>
  46. </tr>
  47. <tr v-for="item in drugs">
  48. <td colspan="5" style="width: 100%;height: 100%;position: relative">
  49. <div style="margin-bottom: 10px;">
  50. {{ item.drugName }}
  51. <!-- <br/>
  52. <br/> -->
  53. </div>
  54. <div style="width: 100%;text-align: center;font-weight: bold;">{{ item.specification }}</div>
  55. </td>
  56. <!-- <td>
  57. <div style="width: 20px;font-weight: bolder;padding: 0 1px;word-wrap: break-word;">
  58. {{ item.specification }}
  59. </div>
  60. </td> -->
  61. <td style="text-align: right">
  62. <div>{{ item.frequCode }}</div>
  63. <!-- <div>{{ item.startHour }}</div> -->
  64. </td>
  65. <td style="text-align: center">
  66. {{ item.instruction }}
  67. <!-- {{ drugs[0].instruction }} -->
  68. </td>
  69. <td style="text-align: center">
  70. {{ item.drugOcc }}
  71. </td>
  72. </tr>
  73. <tr>
  74. <td colspan="2" style="text-align: center;">配药时间</td>
  75. <td colspan="2" style="width: 36px;text-align: center;">加药</td>
  76. <td colspan="2" style="width: 36px;text-align: center;">摆药</td>
  77. <td colspan="2" style="width: 36px;text-align: center;">审核</td>
  78. </tr>
  79. <tr>
  80. <td colspan="2" style="text-align: center;"></td>
  81. <td colspan="2" style="width: 36px;height:30px ;text-align: center;"></td>
  82. <td colspan="2" style="width: 36px;text-align: center;"></td>
  83. <td colspan="2" style="width: 36px;text-align: center;"></td>
  84. </tr>
  85. </tbody>
  86. </table>
  87. </div>
  88. </template>
  89. <script setup>
  90. const props = defineProps({
  91. drugs: {
  92. type: Array,
  93. required: true
  94. },
  95. patInfo: {
  96. type: Object,
  97. required: true
  98. },
  99. yzDate: {
  100. type: String,
  101. required: true
  102. },
  103. bottleGroup: {
  104. type: String,
  105. required: true
  106. }
  107. })
  108. const simpleYzDate = computed(() => {
  109. console.log('yzDate',props.yzDate)
  110. if(props.yzDate instanceof Date) return ""
  111. let arr = props.yzDate.split('-')
  112. return arr[1] + '/' + arr[2]
  113. })
  114. </script>
  115. <style scoped>
  116. td {
  117. border: 1px solid black;
  118. font-size: 12px;
  119. padding: 2px;
  120. }
  121. </style>