patMainPage.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625
  1. <template>
  2. <view>
  3. <nav-bar :navbarData="navbarData"></nav-bar>
  4. <view
  5. :style="' background-image:url(' + imgDomain + '/images/icon/bg_patients_bg.png)'"
  6. class="page"
  7. >
  8. <view class="main">
  9. <view class="patinfo">
  10. <view class="topinfo">
  11. <view class="paticon">
  12. <image
  13. :src="patInfo.basicInfo.patSexCode === '1' ? imgDomain + '/images/icon/gender-male.png' : imgDomain + '/images/icon/gender-female.png'"
  14. class="icon"
  15. ></image>
  16. </view>
  17. <view class="detail">
  18. <view class="item">
  19. <view class="bedcode">{{ patInfo.admInfo.admBedCode }}</view>
  20. <view class="border"></view>
  21. <view class="info">{{ patInfo.basicInfo.patName }}</view>
  22. <view v-if="patInfo.admInfo.nurseLv === '特级'" class="nurse-lv-css-red">{{ patInfo.admInfo.nurseLv }}</view>
  23. <view v-if="patInfo.admInfo.nurseLv === '一级'" class="nurse-lv-css-pink">{{ patInfo.admInfo.nurseLv }}</view>
  24. <view v-if="patInfo.admInfo.nurseLv === '二级'" class="nurse-lv-css-blue">{{ patInfo.admInfo.nurseLv }}</view>
  25. <view v-if="patInfo.admInfo.nurseLv === '三级'" class="nurse-lv-css-greenyellow">{{ patInfo.admInfo.nurseLv }}</view>
  26. </view>
  27. <view class="item">
  28. <view class="bedcode">{{ patInfo.basicInfo.patSexDesc }}</view>
  29. <view class="border"></view>
  30. <view class="info">{{ patInfo.basicInfo.patAge }}</view>
  31. <view class="border"></view>
  32. <view class="info">{{ patInfo.basicInfo.patNo }}</view>
  33. </view>
  34. <view class="item">
  35. <view class="info">入院时间:{{ patInfo.admInfo.admDatetime }}</view>
  36. </view>
  37. </view>
  38. <view class="operation">
  39. <image :src="imgDomain + '/images/icon/ydhl_scanBlue.png'" class="custom-icon" @tap="scan" />
  40. <!-- <view class="changepat" @tap="changepat">更换患者</view> -->
  41. </view>
  42. </view>
  43. <view class="bottominfo">
  44. <view class="feeitem">
  45. <view class="top">¥{{ patInfo.admInfo.patBillPatAmt }}</view>
  46. <view class="bottom">总费用</view>
  47. </view>
  48. <view class="feeitem">
  49. <view class="top">¥{{ patInfo.admInfo.accDepositIP }}</view>
  50. <view class="bottom">预缴定金</view>
  51. </view>
  52. <view class="feeitem">
  53. <view class="top">¥{{ patInfo.admInfo.purposeBlanceIP }}</view>
  54. <view class="bottom">余额</view>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="main2">
  59. <view class="moretitle">
  60. <view class="title">更多基本信息</view>
  61. <view class="viewmore" @tap="viewmore">
  62. <view class="icon">
  63. {{ moinfoflag ? '收起' : '展开' }}
  64. </view>
  65. <view :class="moinfoflag ? 'striangle' : 'ntriangle'"></view>
  66. </view>
  67. </view>
  68. <view v-if="moinfoflag" class="moreinfo">
  69. <van-row>
  70. <van-col span="6" class="title">入院诊断:</van-col>
  71. <van-col span="18" class="value">{{ patInfo.admInfo.admADDDiag }}</van-col>
  72. <van-col span="6" class="title">电话:</van-col>
  73. <van-col span="18" class="value">{{ patInfo.basicInfo.patMobile }}</van-col>
  74. <van-col span="6" class="title">婚姻状况:</van-col>
  75. <van-col span="18" class="value">{{ patInfo.basicInfo.patMaritalDesc }}</van-col>
  76. <van-col span="6" class="title">民族:</van-col>
  77. <van-col span="18" class="value">{{ patInfo.basicInfo.patNationDesc }}</van-col>
  78. <van-col span="6" class="title">文化程度:</van-col>
  79. <van-col span="18" class="value">{{ patInfo.basicInfo.patEduDesc }}</van-col>
  80. <van-col span="6" class="title">职业:</van-col>
  81. <van-col span="18" class="value">{{ patInfo.basicInfo.patOccupationDesc }}</van-col>
  82. </van-row>
  83. </view>
  84. <view class="nurserecord">
  85. <view class="toptitle">
  86. <view class="title">护理记录填写</view>
  87. <view class="viewmore" @tap="viewnurserecord">
  88. <view class="icon">
  89. {{ nurserecordflag ? '收起' : '展开' }}
  90. </view>
  91. <view :class="nurserecordflag ? 'striangle' : 'ntriangle'"></view>
  92. </view>
  93. </view>
  94. </view>
  95. <view v-if="nurserecordflag" class="morenurserecord" :style="{ height: screenHeight-330 + 'px' }">
  96. <van-row>
  97. <van-col
  98. span="8"
  99. :data-itemdata="item"
  100. @tap="gotoPage(item)"
  101. class="function"
  102. v-for="(item, index) in templateList"
  103. :key="index"
  104. >
  105. <view class="functionitem">
  106. <view class="functionicon">
  107. <image :src="imgDomain + '/images/icon/icon_nurse.png'" class="icon"></image>
  108. </view>
  109. <view class="functiondesc" :style="`color: ${item.entryedFlag === 'Y' ? '#007AFF' : '#333333'}`">
  110. {{ item.IEMRTemplateDesc }}
  111. </view>
  112. </view>
  113. </van-col>
  114. </van-row>
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. </template>
  121. <script setup>
  122. import { ref, onMounted, onUnmounted } from 'vue';
  123. import { httpconfig } from '../../config/httpconfig';
  124. import { onLoad ,onShow } from '@dcloudio/uni-app';
  125. import { $http } from '../../config/https';
  126. import Util from '../../utils/util.js';
  127. import navBar from '@/pages/components/navbar/index';
  128. // 页面背景样式
  129. let pageback = `
  130. background-size: 100% auto;
  131. background-repeat: no-repeat;
  132. background-image: url(` + httpconfig.imgDomain + `/images/icon/bg_patients_bg.png);
  133. `;
  134. // 响应式数据
  135. const height = ref('');
  136. const navbarData = ref({
  137. background: '',
  138. title: '患者主页',
  139. height: '100',
  140. bottom: true,
  141. isGoBack: true,
  142. isGoHome: true,
  143. cleanPat: 'Y'
  144. });
  145. const patInfo = ref(uni.getStorageSync('patInfo') || {});
  146. const moinfoflag = ref(false);
  147. const nurserecordflag = ref(true);
  148. const otherfunction = ref(true);
  149. const templateList = ref([]);
  150. const imgDomain = ref(httpconfig.imgDomain);
  151. const screenHeight = ref(0);
  152. // 方法定义
  153. const viewmore = () => {
  154. moinfoflag.value = !moinfoflag.value;
  155. };
  156. const viewnurserecord = () => {
  157. nurserecordflag.value = !nurserecordflag.value;
  158. };
  159. const viewotherfunction = () => {
  160. otherfunction.value = !otherfunction.value;
  161. };
  162. const getTemplateList = () => {
  163. const patInfoData = uni.getStorageSync('patInfo');
  164. const userData = uni.getStorageSync('userData');
  165. const data = {
  166. params: [
  167. {
  168. hospID: userData.hospID,
  169. admID: patInfoData.admInfo ? patInfoData.admInfo.admID : '',
  170. useFlag: 'N'
  171. }
  172. ]
  173. };
  174. $http.post('urlDeault',this, {
  175. code: '10020001',
  176. data: data,
  177. success: (res) => {
  178. templateList.value = res.result.TemplateList;
  179. }
  180. });
  181. };
  182. const gotoPage = (e) => {
  183. const patInfoData = uni.getStorageSync('patInfo');
  184. if (!patInfoData) {
  185. uni.showModal({
  186. title: '提示',
  187. content: '无患者信息,请先扫描患者腕带或选择患者!!!',
  188. showCancel: false,
  189. confirmText: '知道了'
  190. });
  191. return;
  192. }
  193. const templateID = e.id;
  194. uni.navigateTo({
  195. url: `../nurseRecordList/nurseRecordList?templateID=${templateID}&title=${e.IEMRTemplateDesc}列表&single=${e.single}`
  196. });
  197. };
  198. const changepat = () => {
  199. uni.navigateTo({
  200. url: '../wardPatList/wardPatList'
  201. });
  202. };
  203. const scan = () => {
  204. uni.scanCode({
  205. success(res) {
  206. Util.getPatInfoNew(res.result, (newPatInfo) => {
  207. patInfo.value = newPatInfo;
  208. getTemplateList();
  209. });
  210. }
  211. });
  212. };
  213. const onBackPress = () => {
  214. // 返回事件处理
  215. };
  216. onShow(() => {
  217. try {
  218. const pages = getCurrentPages()
  219. if (pages.length > 0) {
  220. const currentPage = pages[pages.length - 1]
  221. const currentRoute = currentPage.route // 当前页面路由
  222. // 更新全局变量
  223. if (uni.$appGlobal) {
  224. uni.$appGlobal.globalData.value.currentRoute = currentRoute
  225. }
  226. }
  227. } catch (err) {
  228. console.error('更新当前路由失败:', err)
  229. }
  230. })
  231. onMounted(() => {
  232. // 获取系统信息
  233. const systemInfo = uni.getSystemInfoSync()
  234. // 屏幕高度(包含状态栏、导航栏等,即整个屏幕的高度)
  235. // screenHeight.value = systemInfo.screenHeight
  236. // 可选:获取可使用窗口高度(不含导航栏/底部安全区,适合布局)
  237. screenHeight.value = systemInfo.windowHeight
  238. if (!imgDomain.value) {
  239. imgDomain.value = uni.getStorageSync('appUrlAddress');
  240. }
  241. patInfo.value = uni.getStorageSync('patInfo') || {};
  242. getTemplateList();
  243. });
  244. onUnmounted(() => {
  245. // 页面卸载时执行
  246. });
  247. // 下拉刷新
  248. const onPullDownRefresh = () => {
  249. // 下拉刷新处理
  250. };
  251. // 上拉触底
  252. const onReachBottom = () => {
  253. // 上拉触底处理
  254. };
  255. // 分享
  256. const onShareAppMessage = () => {
  257. // 分享处理
  258. };
  259. // 暴露需要在模板中使用的方法
  260. defineExpose({
  261. onBackPress,
  262. onPullDownRefresh,
  263. onReachBottom,
  264. onShareAppMessage
  265. });
  266. </script>
  267. <style>
  268. /* 样式部分保持不变 */
  269. .page {
  270. background-size: 100% auto;
  271. background-repeat: no-repeat;
  272. }
  273. .main {
  274. height: calc(100% - 28rpx);
  275. width: 100%;
  276. padding-top: 28rpx;
  277. }
  278. .main2{
  279. overflow: auto;
  280. height: calc(100% - 28rpx);
  281. }
  282. .patinfo {
  283. width: calc(100% - 60rpx);
  284. height: 338rpx;
  285. background: #fff;
  286. margin: 0 30rpx;
  287. border-radius: 8rpx;
  288. box-shadow: 0px 2px 21px 0px rgba(198, 198, 198, 0.3);
  289. }
  290. .patinfo .topinfo {
  291. display: flex;
  292. flex-direction: row;
  293. width: calc(100% - 22rpx);
  294. height: 168rpx;
  295. padding: 0 11rpx;
  296. border-bottom: 1px dashed #ccc;
  297. }
  298. .topinfo .paticon {
  299. width: 100rpx;
  300. height: 100rpx;
  301. padding: 29rpx 0;
  302. }
  303. .topinfo .detail {
  304. width: calc(100% - 270rpx);
  305. padding: 14rpx 10rpx;
  306. font-size: 14px;
  307. font-weight: 400;
  308. color: #666666;
  309. }
  310. .detail .item {
  311. display: flex;
  312. flex-direction: row;
  313. line-height: 46rpx;
  314. height: 46rpx;
  315. width: 100%;
  316. display: flex;
  317. }
  318. .item .border {
  319. border: 1rpx solid #e5e5e5;
  320. margin: 10rpx 10rpx;
  321. width: 0px;
  322. height: 28rpx;
  323. line-height: 46rpx;
  324. }
  325. .item .bedcode {
  326. width: 60rpx;
  327. }
  328. .item .info {
  329. overflow: hidden;
  330. text-overflow: ellipsis;
  331. white-space: nowrap;
  332. }
  333. .nurse-lv-css-red {
  334. background-color: red;
  335. color: #fff;
  336. border-radius: 4rpx;
  337. padding: 0rpx 18rpx;
  338. font-size: 20rpx;
  339. width: 50rpx;
  340. margin-left: 20rpx;
  341. }
  342. .nurse-lv-css-pink {
  343. background-color: pink;
  344. color: #fff;
  345. border-radius: 4rpx;
  346. padding: 0rpx 18rpx;
  347. font-size: 20rpx;
  348. width: 50rpx;
  349. margin-left: 20rpx;
  350. }
  351. .nurse-lv-css-greenyellow {
  352. background-color: rgb(93, 187, 93);
  353. color: #fff;
  354. border-radius: 4rpx;
  355. padding: 0rpx 18rpx;
  356. font-size: 20rpx;
  357. width: 50rpx;
  358. margin-left: 20rpx;
  359. }
  360. .nurse-lv-css-blue {
  361. background-color: #007aff;
  362. color: #fff;
  363. border-radius: 4rpx;
  364. padding: 0rpx 18rpx;
  365. font-size: 20rpx;
  366. width: 50rpx;
  367. margin-left: 20rpx;
  368. }
  369. .topinfo .operation {
  370. width: 160rpx;
  371. height: 140rpx;
  372. padding: 14rpx 0;
  373. display: flex;
  374. flex-direction: column;
  375. align-items: center;
  376. }
  377. .operation .custom-icon {
  378. width: 60rpx;
  379. height: 60rpx;
  380. text-align: right;
  381. }
  382. .operation .changepat {
  383. width: 150rpx;
  384. height: 50rpx;
  385. background: #007aff;
  386. border-radius: 4px;
  387. color: #fff;
  388. line-height: 50rpx;
  389. border-radius: 8rpx;
  390. text-align: center;
  391. margin-top: 20rpx;
  392. align-self: center;
  393. }
  394. .patinfo .bottominfo {
  395. display: flex;
  396. flex-direction: row;
  397. height: 170rpx;
  398. width: 100%;
  399. }
  400. .bottominfo .feeitem {
  401. width: 33.33%;
  402. height: 100%;
  403. display: flex;
  404. flex-direction: column;
  405. text-align: center;
  406. }
  407. .feeitem .top {
  408. height: 85rpx;
  409. line-height: 46rpx;
  410. font-size: 34rpx;
  411. font-weight: 500;
  412. color: #007aff;
  413. padding-top: 50rpx;
  414. }
  415. .feeitem .bottom {
  416. height: 105rpx;
  417. font-size: 28rpx;
  418. font-weight: 400;
  419. color: #333333;
  420. line-height: 20px;
  421. }
  422. .paticon .icon {
  423. width: 100rpx;
  424. height: 100rpx;
  425. }
  426. .moretitle {
  427. width: calc(100% - 56rpx);
  428. margin: 0 28rpx;
  429. height: 46rpx;
  430. font-size: 15px;
  431. border-left: 8rpx solid #007aff;
  432. font-weight: 400;
  433. color: #333333;
  434. line-height: 42rpx;
  435. margin-top: 44rpx;
  436. margin-bottom: 24rpx;
  437. }
  438. .nurserecord {
  439. width: calc(100% - 56rpx);
  440. margin: 0 28rpx;
  441. height: 46rpx;
  442. font-size: 15px;
  443. border-left: 8rpx solid #007aff;
  444. font-weight: 400;
  445. color: #333333;
  446. line-height: 42rpx;
  447. margin-top: 44rpx;
  448. margin-bottom: 24rpx;
  449. }
  450. .morenurserecord {
  451. margin: 0 28rpx;
  452. font-size: 15px;
  453. font-weight: 400;
  454. color: #333333;
  455. }
  456. .toptitle {
  457. height: 46rpx;
  458. margin-bottom: 24rpx;
  459. }
  460. .toptitle .icon {
  461. float: right;
  462. padding-left: 14rpx;
  463. font-size: 26rpx;
  464. font-weight: 400;
  465. color: #007aff;
  466. }
  467. .toptitle .title {
  468. font-size: 17px;
  469. font-weight: bold;
  470. color: #333333;
  471. line-height: 23px;
  472. padding-left: 6rpx;
  473. float: left;
  474. }
  475. .moretitle .title {
  476. font-size: 17px;
  477. font-weight: bold;
  478. color: #333333;
  479. line-height: 23px;
  480. padding-left: 6rpx;
  481. float: left;
  482. }
  483. .moretitle .title1 {
  484. font-size: 17px;
  485. font-weight: 400;
  486. color: #333333;
  487. line-height: 23px;
  488. padding-left: 6rpx;
  489. padding-bottom: 32rpx;
  490. }
  491. .viewmore {
  492. float: right;
  493. }
  494. /*倒三角*/
  495. .striangle {
  496. border-right: 7px solid transparent;
  497. border-left: 7px solid transparent;
  498. border-top: 8px solid #007aff;
  499. float: right;
  500. margin-top: 12rpx;
  501. }
  502. /*正三角*/
  503. .ntriangle {
  504. width: 0;
  505. height: 0;
  506. border-left: 7px solid transparent;
  507. border-right: 7px solid transparent;
  508. border-bottom: 8px solid #007aff;
  509. float: right;
  510. margin-top: 12rpx;
  511. }
  512. .moretitle .icon {
  513. float: right;
  514. padding-left: 14rpx;
  515. font-size: 26rpx;
  516. font-weight: 400;
  517. color: #007aff;
  518. }
  519. .moreinfo {
  520. padding: 0 34rpx;
  521. line-height: 50rpx;
  522. }
  523. .moreinfo .van-col {
  524. min-height: 50rpx;
  525. }
  526. .moreinfo .title {
  527. font-size: 28rpx;
  528. font-weight: 400;
  529. color: #666666;
  530. text-align: right;
  531. }
  532. .moreinfo .value {
  533. font-size: 28rpx;
  534. font-weight: 400;
  535. color: #333333;
  536. text-align: left;
  537. }
  538. .function {
  539. height: 160rpx;
  540. }
  541. .function .functionitem {
  542. width: 100%;
  543. line-height: 66rpx;
  544. display: flex;
  545. flex-direction: column;
  546. min-height: 160rpx;
  547. height: 160rpx;
  548. margin-bottom: 10rpx;
  549. }
  550. .functionitem .functionicon {
  551. width: 100%;
  552. height: 66rpx;
  553. text-align: center;
  554. }
  555. .functionicon .icon {
  556. width: 60rpx;
  557. height: 60rpx;
  558. float: none;
  559. }
  560. .functionitem .functiondesc {
  561. width: 60%;
  562. line-height: 40rpx;
  563. text-align: center;
  564. font-size: 26rpx;
  565. font-weight: 400;
  566. color: #333333;
  567. padding: 11rpx 20%;
  568. }
  569. </style>