patMainPage.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  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 class="morenurserecord_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. getTemplateList();
  219. const pages = getCurrentPages()
  220. if (pages.length > 0) {
  221. const currentPage = pages[pages.length - 1]
  222. const currentRoute = currentPage.route // 当前页面路由
  223. // 更新全局变量
  224. if (uni.$appGlobal) {
  225. uni.$appGlobal.globalData.value.currentRoute = currentRoute
  226. }
  227. }
  228. } catch (err) {
  229. console.error('更新当前路由失败:', err)
  230. }
  231. })
  232. onMounted(() => {
  233. // 获取系统信息
  234. const systemInfo = uni.getSystemInfoSync()
  235. // 屏幕高度(包含状态栏、导航栏等,即整个屏幕的高度)
  236. // screenHeight.value = systemInfo.screenHeight
  237. // 可选:获取可使用窗口高度(不含导航栏/底部安全区,适合布局)
  238. screenHeight.value = systemInfo.windowHeight
  239. if (!imgDomain.value) {
  240. imgDomain.value = uni.getStorageSync('appUrlAddress');
  241. }
  242. patInfo.value = uni.getStorageSync('patInfo') || {};
  243. getTemplateList();
  244. });
  245. onUnmounted(() => {
  246. // 页面卸载时执行
  247. });
  248. // 下拉刷新
  249. const onPullDownRefresh = () => {
  250. // 下拉刷新处理
  251. };
  252. // 上拉触底
  253. const onReachBottom = () => {
  254. // 上拉触底处理
  255. };
  256. // 分享
  257. const onShareAppMessage = () => {
  258. // 分享处理
  259. };
  260. // 暴露需要在模板中使用的方法
  261. defineExpose({
  262. onBackPress,
  263. onPullDownRefresh,
  264. onReachBottom,
  265. onShareAppMessage
  266. });
  267. </script>
  268. <style>
  269. /* 样式部分保持不变 */
  270. .page {
  271. background-size: 100% auto;
  272. background-repeat: no-repeat;
  273. }
  274. .main {
  275. height: calc(100% - 28rpx);
  276. width: 100%;
  277. padding-top: 28rpx;
  278. }
  279. .main2{
  280. overflow: auto;
  281. height: calc(100% - 28rpx);
  282. }
  283. .patinfo {
  284. width: calc(100% - 60rpx);
  285. height: 338rpx;
  286. background: #fff;
  287. margin: 0 30rpx;
  288. border-radius: 8rpx;
  289. box-shadow: 0px 2px 21px 0px rgba(198, 198, 198, 0.3);
  290. }
  291. .patinfo .topinfo {
  292. display: flex;
  293. flex-direction: row;
  294. width: calc(100% - 22rpx);
  295. height: 168rpx;
  296. padding: 0 11rpx;
  297. border-bottom: 1px dashed #ccc;
  298. }
  299. .topinfo .paticon {
  300. width: 100rpx;
  301. height: 100rpx;
  302. padding: 29rpx 0;
  303. }
  304. .topinfo .detail {
  305. width: calc(100% - 270rpx);
  306. padding: 14rpx 10rpx;
  307. font-size: 14px;
  308. font-weight: 400;
  309. color: #666666;
  310. }
  311. .detail .item {
  312. display: flex;
  313. flex-direction: row;
  314. line-height: 46rpx;
  315. height: 46rpx;
  316. width: 100%;
  317. display: flex;
  318. }
  319. .item .border {
  320. border: 1rpx solid #e5e5e5;
  321. margin: 10rpx 10rpx;
  322. width: 0px;
  323. height: 28rpx;
  324. line-height: 46rpx;
  325. }
  326. .item .bedcode {
  327. width: 60rpx;
  328. }
  329. .item .info {
  330. overflow: hidden;
  331. text-overflow: ellipsis;
  332. white-space: nowrap;
  333. }
  334. .nurse-lv-css-red {
  335. background-color: red;
  336. color: #fff;
  337. border-radius: 4rpx;
  338. padding: 0rpx 18rpx;
  339. font-size: 20rpx;
  340. width: 50rpx;
  341. margin-left: 20rpx;
  342. }
  343. .nurse-lv-css-pink {
  344. background-color: pink;
  345. color: #fff;
  346. border-radius: 4rpx;
  347. padding: 0rpx 18rpx;
  348. font-size: 20rpx;
  349. width: 50rpx;
  350. margin-left: 20rpx;
  351. }
  352. .nurse-lv-css-greenyellow {
  353. background-color: rgb(93, 187, 93);
  354. color: #fff;
  355. border-radius: 4rpx;
  356. padding: 0rpx 18rpx;
  357. font-size: 20rpx;
  358. width: 50rpx;
  359. margin-left: 20rpx;
  360. }
  361. .nurse-lv-css-blue {
  362. background-color: #007aff;
  363. color: #fff;
  364. border-radius: 4rpx;
  365. padding: 0rpx 18rpx;
  366. font-size: 20rpx;
  367. width: 50rpx;
  368. margin-left: 20rpx;
  369. }
  370. .topinfo .operation {
  371. width: 160rpx;
  372. height: 140rpx;
  373. padding: 14rpx 0;
  374. display: flex;
  375. flex-direction: column;
  376. align-items: center;
  377. }
  378. .operation .custom-icon {
  379. width: 60rpx;
  380. height: 60rpx;
  381. text-align: right;
  382. }
  383. .operation .changepat {
  384. width: 150rpx;
  385. height: 50rpx;
  386. background: #007aff;
  387. border-radius: 4px;
  388. color: #fff;
  389. line-height: 50rpx;
  390. border-radius: 8rpx;
  391. text-align: center;
  392. margin-top: 20rpx;
  393. align-self: center;
  394. }
  395. .patinfo .bottominfo {
  396. display: flex;
  397. flex-direction: row;
  398. height: 170rpx;
  399. width: 100%;
  400. }
  401. .bottominfo .feeitem {
  402. width: 33.33%;
  403. height: 100%;
  404. display: flex;
  405. flex-direction: column;
  406. text-align: center;
  407. }
  408. .feeitem .top {
  409. height: 85rpx;
  410. line-height: 46rpx;
  411. font-size: 34rpx;
  412. font-weight: 500;
  413. color: #007aff;
  414. padding-top: 50rpx;
  415. }
  416. .feeitem .bottom {
  417. height: 105rpx;
  418. font-size: 28rpx;
  419. font-weight: 400;
  420. color: #333333;
  421. line-height: 20px;
  422. }
  423. .paticon .icon {
  424. width: 100rpx;
  425. height: 100rpx;
  426. }
  427. .moretitle {
  428. width: calc(100% - 56rpx);
  429. margin: 0 28rpx;
  430. height: 46rpx;
  431. font-size: 15px;
  432. border-left: 8rpx solid #007aff;
  433. font-weight: 400;
  434. color: #333333;
  435. line-height: 42rpx;
  436. margin-top: 44rpx;
  437. margin-bottom: 24rpx;
  438. }
  439. .nurserecord {
  440. width: calc(100% - 56rpx);
  441. margin: 0 28rpx;
  442. height: 46rpx;
  443. font-size: 15px;
  444. border-left: 8rpx solid #007aff;
  445. font-weight: 400;
  446. color: #333333;
  447. line-height: 42rpx;
  448. margin-top: 44rpx;
  449. margin-bottom: 24rpx;
  450. }
  451. .morenurserecord {
  452. margin: 0 28rpx;
  453. font-size: 15px;
  454. font-weight: 400;
  455. color: #333333;
  456. }
  457. .morenurserecord_row{
  458. width: 100%;
  459. }
  460. .toptitle {
  461. height: 46rpx;
  462. margin-bottom: 24rpx;
  463. }
  464. .toptitle .icon {
  465. float: right;
  466. padding-left: 14rpx;
  467. font-size: 26rpx;
  468. font-weight: 400;
  469. color: #007aff;
  470. }
  471. .toptitle .title {
  472. font-size: 17px;
  473. font-weight: bold;
  474. color: #333333;
  475. line-height: 23px;
  476. padding-left: 6rpx;
  477. float: left;
  478. }
  479. .moretitle .title {
  480. font-size: 17px;
  481. font-weight: bold;
  482. color: #333333;
  483. line-height: 23px;
  484. padding-left: 6rpx;
  485. float: left;
  486. }
  487. .moretitle .title1 {
  488. font-size: 17px;
  489. font-weight: 400;
  490. color: #333333;
  491. line-height: 23px;
  492. padding-left: 6rpx;
  493. padding-bottom: 32rpx;
  494. }
  495. .viewmore {
  496. float: right;
  497. }
  498. /*倒三角*/
  499. .striangle {
  500. border-right: 7px solid transparent;
  501. border-left: 7px solid transparent;
  502. border-top: 8px solid #007aff;
  503. float: right;
  504. margin-top: 12rpx;
  505. }
  506. /*正三角*/
  507. .ntriangle {
  508. width: 0;
  509. height: 0;
  510. border-left: 7px solid transparent;
  511. border-right: 7px solid transparent;
  512. border-bottom: 8px solid #007aff;
  513. float: right;
  514. margin-top: 12rpx;
  515. }
  516. .moretitle .icon {
  517. float: right;
  518. padding-left: 14rpx;
  519. font-size: 26rpx;
  520. font-weight: 400;
  521. color: #007aff;
  522. }
  523. .moreinfo {
  524. padding: 0 34rpx;
  525. line-height: 50rpx;
  526. }
  527. .moreinfo .van-col {
  528. min-height: 50rpx;
  529. }
  530. .moreinfo .title {
  531. font-size: 28rpx;
  532. font-weight: 400;
  533. color: #666666;
  534. text-align: right;
  535. }
  536. .moreinfo .value {
  537. font-size: 28rpx;
  538. font-weight: 400;
  539. color: #333333;
  540. text-align: left;
  541. }
  542. .function {
  543. height: 160rpx;
  544. }
  545. .function .functionitem {
  546. width: 100%;
  547. line-height: 66rpx;
  548. display: flex;
  549. flex-direction: column;
  550. min-height: 160rpx;
  551. height: 160rpx;
  552. margin-bottom: 10rpx;
  553. }
  554. .functionitem .functionicon {
  555. width: 100%;
  556. height: 66rpx;
  557. text-align: center;
  558. }
  559. .functionicon .icon {
  560. width: 60rpx;
  561. height: 60rpx;
  562. float: none;
  563. }
  564. .functionitem .functiondesc {
  565. width: 60%;
  566. line-height: 40rpx;
  567. text-align: center;
  568. font-size: 26rpx;
  569. font-weight: 400;
  570. color: #333333;
  571. padding: 11rpx 20%;
  572. }
  573. </style>