EmrYzTemperature.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <template>
  2. <div style="height: 10%;font-size: 12px;display: flex">
  3. <div style="width: 70%;color: blue;border: 1px solid #000;border-radius: 5px;padding: 0 5px">
  4. {{ otherInfo }}
  5. </div>
  6. <div style="flex: 1;color: red">
  7. 注意:体温单位为℃脉搏单位为”次m1n”,血压单位为"mmg”,Sp02
  8. 单位为“%”,体重单位为”kg”,呼吸单位为“次/min”,血糖单位
  9. ”mo1/1”
  10. </div>
  11. </div>
  12. <div style="height: 90%">
  13. <el-auto-resizer>
  14. <template #default="{ height, width }">
  15. <div style="height: 40px; ">
  16. <el-date-picker v-model="dateRange"
  17. type="daterange"
  18. format="YYYY-MM-DD"
  19. value-format="YYYY-MM-DD"
  20. :shortcuts="shortcuts"/>
  21. <el-button @click="query">查询</el-button>
  22. </div>
  23. <vxe-table :height="height - 40"
  24. border
  25. :scroll-x="{gt: 20}"
  26. :scroll-y="{gt: 50,enabled: true}"
  27. :column-config="{resizable: true}"
  28. :row-config="{ height: 24}"
  29. class="vxe-padding_zero hl-style"
  30. header-row-class-name="padding_zero"
  31. :row-class-name="rowClassName"
  32. @cell-click="rowClick"
  33. show-header-overflow
  34. show-overflow
  35. :data="listRef">
  36. <vxe-column field="recDateStr" title="日期" width="80" sortable>
  37. <template #default="{row,rowIndex}">
  38. <component :is="dateDisplay(row,row.recDateStr,rowIndex)"/>
  39. </template>
  40. </vxe-column>
  41. <vxe-column title="时间" width="40">
  42. <template #default="{row,rowIndex}">
  43. <component :is="timePlsy(row,row.recTimeStr,rowIndex)"/>
  44. </template>
  45. </vxe-column>
  46. <vxe-column field="patientState" title="病情" width="50"/>
  47. <vxe-column title="体温" width="50">
  48. <template #default="{row}">
  49. <template v-if="stringIsBlank(row.temperature1)">
  50. <span></span>
  51. </template>
  52. <template v-else>
  53. {{ row.temperature1 }}{{ row.temperature1Type }}
  54. </template>
  55. </template>
  56. </vxe-column>
  57. <vxe-colgroup title="次/min">
  58. <vxe-column field="heart" title="心率" width="40"/>
  59. <vxe-column field="pulse1" title="脉搏" width="40"/>
  60. </vxe-colgroup>
  61. <vxe-column field="breathe1" title="呼吸" width="40"/>
  62. <vxe-column field="pressure1AmAndPm" title="血压" width="60"/>
  63. <vxe-column field="spo2" title="Sp02%" width="50"/>
  64. <vxe-column field="mind" title="意识" width="40"/>
  65. <vxe-colgroup title="入量">
  66. <vxe-column field="col1Name" title="名称" width="100"/>
  67. <vxe-column field="col1Am" title="ml" width="40"/>
  68. </vxe-colgroup>
  69. <vxe-colgroup title="出量">
  70. <vxe-column field="col2Name" title="名称" width="80"/>
  71. <vxe-column field="col2Am" title="ml" width="40"/>
  72. <vxe-column title="颜色" field="urineColor" width="40"/>
  73. <vxe-column title="状态" field="shitShape" width="40"/>
  74. </vxe-colgroup>
  75. <vxe-column field="skin" title="皮肤" width="40"/>
  76. <vxe-colgroup title="管道">
  77. <vxe-column field="tubesName" title="管道名称" width="90"/>
  78. <vxe-column field="tubesStatus" title="管道情况" width="90"/>
  79. </vxe-colgroup>
  80. <vxe-column field="glu" title="血糖" width="40"/>
  81. <vxe-column field="otherInfo" title="护理措施及效果" min-width="250"/>
  82. <vxe-column field="userid" title="护士" width="70">
  83. <template #default="{row,rowIndex}">
  84. <component :is="timePlsy(row,row.userid , rowIndex)"/>
  85. </template>
  86. </vxe-column>
  87. </vxe-table>
  88. </template>
  89. </el-auto-resizer>
  90. </div>
  91. </template>
  92. <script setup name='EmrYzTemperature' lang="tsx">
  93. import {Ref, ref, onMounted} from "vue";
  94. import {getYzTemperature} from "@/api/zhu-yuan-yi-sheng/emr-patient";
  95. import {stringIsBlank} from '@/utils/blank-utils';
  96. import {stringNotBlank} from "@/utils/blank-utils";
  97. import {shortcuts} from '@/data/shortcuts'
  98. import {getServerDateApi} from "@/api/public-api";
  99. import moment from "moment";
  100. import {getFormatDatetime, currentAndAFewDaysAgo} from '@/utils/date'
  101. const props = defineProps({
  102. patNo: String,
  103. times: Number
  104. })
  105. const dateRange = ref([])
  106. const dateDisplay = (row, cellData, index) => {
  107. let temp = listRef.value[index - 1]
  108. if (temp === null || typeof temp === 'undefined') {
  109. return <span>{cellData}</span>
  110. }
  111. if (row.tempDate === temp.tempDate) {
  112. return <span></span>
  113. } else if (cellData === temp.recDateStr) {
  114. return <span></span>
  115. } else {
  116. return <span>{cellData}</span>
  117. }
  118. }
  119. const timePlsy = (row, cellData, index) => {
  120. let temp = listRef.value[index - 1]
  121. if (temp === null || typeof temp === 'undefined') {
  122. return <span>{cellData}</span>
  123. }
  124. if (row.tempDate === temp.tempDate) {
  125. return <span></span>
  126. } else {
  127. return <span>{cellData}</span>
  128. }
  129. }
  130. const drawer: Ref<boolean> = ref(false)
  131. const listRef: Ref = ref([])
  132. const mapRef: Ref = ref({})
  133. const key: Ref<string> = ref('')
  134. const otherInfo: Ref<string> = ref('')
  135. const rowClick = ({row}) => {
  136. key.value = row.tempDate
  137. let item = mapRef.value[key.value]
  138. let str = '护理记录时间:' + item.tempDate
  139. if (stringNotBlank(item.patientState)) {
  140. str += '病情:' + item.patientState
  141. }
  142. if (stringNotBlank(item.temperature1)) {
  143. str += ',' + '体温:' + item.temperature1 + item.temperature1Type + '°C'
  144. }
  145. if (stringNotBlank(item.heart)) {
  146. str += ',' + '心率:' + item.heart + '次/min'
  147. }
  148. if (stringNotBlank(item.pulse1)) {
  149. str += ',' + '脉搏:' + item.pulse1 + '次/min'
  150. }
  151. if (stringNotBlank(item.breathe1)) {
  152. str += ',' + '呼吸:' + item.breathe1 + '次/min'
  153. }
  154. if (stringNotBlank(item.pressure1AmAndPm)) {
  155. str += ',' + '血压:' + item.pressure1AmAndPm + 'mmHg'
  156. }
  157. if (stringNotBlank(item.spo2)) {
  158. str += ',' + 'Sp02%:' + item.spo2 + '%'
  159. }
  160. if (stringNotBlank(item.mind)) {
  161. str += ',' + '意识:' + item.mind
  162. }
  163. if (stringNotBlank(item.col1Name)) {
  164. str += ',' + '入量名称:' + item.col1Name
  165. }
  166. if (stringNotBlank(item.col1Am)) {
  167. str += ',' + '入量ml:' + item.col1Am
  168. }
  169. if (stringNotBlank(item.col2Name)) {
  170. str += ',' + '出量名称:' + item.col2Name
  171. }
  172. if (stringNotBlank(item.col2Am)) {
  173. str += ',' + '出量ml:' + item.col2Am
  174. }
  175. if (stringNotBlank(item.urineColor)) {
  176. str += ',' + '颜色:' + item.urineColor
  177. }
  178. if (stringNotBlank(item.shitShape)) {
  179. str += ',' + '状态:' + item.shitShape
  180. }
  181. if (stringNotBlank(item.skin)) {
  182. str += ',' + '皮肤:' + item.skin
  183. }
  184. if (stringNotBlank(item.tubesName)) {
  185. str += ',' + '状态:' + item.tubesName
  186. }
  187. if (stringNotBlank(item.tubesStatus)) {
  188. str += ',' + '管道名称:' + item.tubesStatus
  189. }
  190. if (stringNotBlank(item.glu)) {
  191. str += ',' + '管道情况:' + item.glu
  192. }
  193. if (stringNotBlank(mapRef.value[key.value]?.otherInfo)) {
  194. str += '护理措施及效果:' + mapRef.value[key.value]?.otherInfo
  195. }
  196. otherInfo.value = str
  197. }
  198. const query = () => {
  199. let param = {
  200. startTime: dateRange.value[0],
  201. endTime: dateRange.value[1],
  202. patNo: props.patNo,
  203. times: props.times
  204. }
  205. getYzTemperature(param)
  206. .then((res) => {
  207. let {list, map} = res
  208. drawer.value = true
  209. listRef.value = list
  210. mapRef.value = map
  211. })
  212. }
  213. const rowClassName = ({row}) => {
  214. if (key.value === row.tempDate) {
  215. return 'current row_padding_zero'
  216. }
  217. return 'row_padding_zero'
  218. }
  219. onMounted(async () => {
  220. dateRange.value = await currentAndAFewDaysAgo()
  221. query()
  222. })
  223. </script>
  224. <style lang="scss">
  225. .padding_zero th .vxe-cell {
  226. padding: 0 !important;
  227. }
  228. .row_padding_zero td .vxe-cell {
  229. padding: 0 !important;
  230. }
  231. .hl-style .current {
  232. background-color: #187;
  233. color: #fff;
  234. }
  235. </style>