patientDetail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. <template>
  2. <view class="orderDetail">
  3. <!-- 头部 -->
  4. <view class="orderDetail_header">
  5. <view class="orderDetail_header_item" v-for="tab in tabs" :key="tab.id" :class="{active:tab.id === selectedTab}"
  6. @click="debouncedChangeTab(tab.id)">
  7. {{tab.name}}
  8. </view>
  9. </view>
  10. <!-- tab -->
  11. <!-- 患者信息 -->
  12. <view class="orderDetail_info" v-show="selectedTab === 1">
  13. <scroll-view scroll-y class="orderDetail_infoItem" v-if="info.id">
  14. <view class="orderDetail_infoItem_header">
  15. <view class="orderDetail_infoItem_header_title">
  16. <view class="icon"></view>
  17. <view class="taskNameAndWorkerName">
  18. <text class="taskName">患者姓名:{{info.patientName||'暂无'}}</text>
  19. </view>
  20. </view>
  21. <text class="orderDetail_infoItem_header_more">床号:{{info.bedNum?info.bedNum + '床':'暂无'}}</text>
  22. </view>
  23. <view class="orderDetail_infoItem_item">
  24. <view class="orderDetail_infoItem_item_content">
  25. <text class="orderDetail_infoItem_item_name">住院号</text>
  26. <text class="orderDetail_infoItem_item_value">{{info.residenceNo || '暂无'}}</text>
  27. </view>
  28. <view class="orderDetail_infoItem_item_content">
  29. <text class="orderDetail_infoItem_item_name">护理级别</text>
  30. <text class="orderDetail_infoItem_item_value">{{info.careLevel ?info.careLevel.name: '暂无'}}</text>
  31. </view>
  32. <view class="orderDetail_infoItem_item_content">
  33. <text class="orderDetail_infoItem_item_name">病情级别</text>
  34. <text class="orderDetail_infoItem_item_value">{{info.illnessState ?info.illnessState.name: '暂无'}}</text>
  35. </view>
  36. </view>
  37. </scroll-view>
  38. </view>
  39. <!-- 患者标本 -->
  40. <view class="orderDetail_info" v-show="selectedTab ===2">
  41. <scroll-view scroll-y class="orderDetail_infoItem">
  42. <view class="orderDetail_infoItem_header">
  43. <view class="orderDetail_infoItem_header_title">
  44. <view class="icon"></view>
  45. <view class="taskNameAndWorkerName">
  46. <text class="taskName">标本信息</text>
  47. </view>
  48. </view>
  49. </view>
  50. <!-- 标本信息 -->
  51. <view class="orderDetail_infoItem_item business business_specimen">
  52. <view class="inspect_specimen">
  53. <uni-table stripe emptyText="暂无更多数据">
  54. <!-- 表头行 -->
  55. <uni-tr class="th">
  56. <uni-th align="center" width="68">标本类型</uni-th>
  57. <uni-th align="center" width="71">标本编码</uni-th>
  58. <uni-th align="center" width="66">状态</uni-th>
  59. <uni-th align="center" width="71">科室</uni-th>
  60. </uni-tr>
  61. <!-- 表格数据行 -->
  62. <uni-tr v-for="data in info.specimens" :key="data.id" @click.native="toDetail(data.id,'specimen')">
  63. <uni-td align="center">{{data.stype?data.stype.name:'暂无'}}</uni-td>
  64. <uni-td align="center">{{data.scode || '暂无'}}</uni-td>
  65. <uni-td align="center">{{data.speState?data.speState.name:'暂无'}}</uni-td>
  66. <uni-td align="center" class="td" v-if="data.checkDept">
  67. {{deptDisplay==2?data.checkDept.deptalias:data.checkDept.dept}}
  68. <image class="urgent" v-if="data.urgent == 1" src="../../static/imgs/icon_ji.png" mode="widthFix">
  69. </image>
  70. </uni-td>
  71. <uni-td align="center" class="td" v-else>
  72. 暂无
  73. <image class="urgent" v-if="data.urgent == 1" src="../../static/imgs/icon_ji.png" mode="widthFix">
  74. </image>
  75. </uni-td>
  76. </uni-tr>
  77. </uni-table>
  78. </view>
  79. </view>
  80. </scroll-view>
  81. </view>
  82. <!-- 患者检查 -->
  83. <view class="orderDetail_info" v-show="selectedTab === 3">
  84. <scroll-view scroll-y class="orderDetail_infoItem">
  85. <view class="orderDetail_infoItem_header">
  86. <view class="orderDetail_infoItem_header_title">
  87. <view class="icon"></view>
  88. <view class="taskNameAndWorkerName">
  89. <text class="taskName">检查信息</text>
  90. </view>
  91. </view>
  92. </view>
  93. <!-- 检查信息 -->
  94. <view class="orderDetail_infoItem_item business business_inspect">
  95. <view class="inspect_item" v-for="item in info.inspects" :key="item.id" @click="toDetail(item.id,'inspect')">
  96. <view class="inspect_item_name">
  97. {{item.inspectName||'暂无'}}
  98. </view>
  99. <view class="inspect_item_info">
  100. <view class="inspect_item_dept">预约时间</view>
  101. <view class="inspect_item_number">
  102. {{item.yyTime || '暂无'}}
  103. </view>
  104. </view>
  105. <view class="inspect_item_info">
  106. <view class="inspect_item_dept">到达时间</view>
  107. <view class="inspect_item_number">
  108. {{item.arriveTime || '暂无'}}
  109. </view>
  110. </view>
  111. <view class="inspect_item_info">
  112. <view class="inspect_item_dept">检查状态</view>
  113. <view class="inspect_item_number">
  114. {{item.inspectState?item.inspectState.name:'暂无'}}
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. </scroll-view>
  120. </view>
  121. <!-- 底部 -->
  122. <seiminFooterBtn :btns="btns"></seiminFooterBtn>
  123. <seiminModel ref="seiminModel"></seiminModel>
  124. </view>
  125. </template>
  126. <script>
  127. import {
  128. debounce
  129. } from 'lodash/function';
  130. import {
  131. reqGetPatientInspectInfo,
  132. } from "../../request/api.js";
  133. import {
  134. mapState
  135. } from "vuex";
  136. import {
  137. GDSTATE
  138. } from "../../utils/enum.gdstate.js";
  139. import {
  140. ASSOCIATION_TYPES
  141. } from "../../utils/enum.association_types.js";
  142. import {
  143. showAppraise,
  144. openRecallModal,
  145. openExecModal,
  146. showJiaji,
  147. } from "../../utils/index.js";
  148. export default {
  149. data() {
  150. return {
  151. debouncedChangeTab: null,
  152. // 路由传参
  153. queryParams: {},
  154. // 关联类型
  155. ASSOCIATION_TYPES,
  156. // 选项卡
  157. tabs: [{
  158. id: 1,
  159. name: '患者信息'
  160. },
  161. {
  162. id: 2,
  163. name: '患者标本'
  164. },
  165. {
  166. id: 3,
  167. name: '患者检查'
  168. },
  169. ],
  170. // 当前选中的tab
  171. selectedTab: 1,
  172. // 工单信息
  173. info: {},
  174. // 流程信息
  175. logList: [],
  176. //底部按钮
  177. btns: [{
  178. name: "回到列表",
  179. type: "default",
  180. click: () => {
  181. uni.navigateTo({
  182. url: "/pages/patientList/patientList",
  183. });
  184. },
  185. }, {
  186. name: "一键建单",
  187. type: "default",
  188. click: () => {
  189. uni.navigateTo({
  190. url: "/pages/patientList/patientList",
  191. });
  192. },
  193. }],
  194. };
  195. },
  196. computed: {
  197. ...mapState('other', ["deptDisplay"]),
  198. },
  199. methods: {
  200. init(queryParams) {
  201. this.queryParams = queryParams;
  202. this.changeTab(1);
  203. },
  204. // 跳转详情
  205. toDetail(id, associationType) {
  206. uni.navigateTo({
  207. url: `/pages/detail/detail?id=${id}&associationType=${associationType}`
  208. })
  209. },
  210. // 切换tab
  211. changeTab(id) {
  212. this.selectedTab = id;
  213. switch (id) {
  214. case 1:
  215. this.getInfo(this.queryParams);
  216. break;
  217. case 2:
  218. break;
  219. case 3:
  220. break;
  221. }
  222. },
  223. //获取工单信息数据
  224. getInfo(queryParams) {
  225. uni.showLoading({
  226. mask: true,
  227. title: '加载中',
  228. })
  229. let postData = {
  230. "patientCode": queryParams.patientCode
  231. };
  232. console.log(queryParams.patientCode)
  233. reqGetPatientInspectInfo(postData).then(res => {
  234. uni.hideLoading();
  235. if (res.status == 200) {
  236. // 工单信息
  237. res.data.specimens = res.data.specimens || [];
  238. res.data.inspects = res.data.inspects || [];
  239. this.info = res.data;
  240. } else {
  241. this.$refs.seiminModel.show({
  242. skin: 'toast',
  243. icon: 'error',
  244. content: '请求失败',
  245. })
  246. }
  247. })
  248. },
  249. },
  250. onLoad(queryParams) {
  251. console.log(queryParams);
  252. this.init(queryParams);
  253. },
  254. created() {
  255. this.debouncedChangeTab = debounce(this.changeTab, 166);
  256. },
  257. beforeDestroy() {
  258. this.debouncedChangeTab.cancel()
  259. }
  260. }
  261. </script>
  262. <style lang="scss" scoped>
  263. .orderDetail {
  264. padding-bottom: 108rpx;
  265. // 头部
  266. .orderDetail_header {
  267. position: fixed;
  268. z-index: 98;
  269. width: 100%;
  270. height: 88rpx;
  271. background-color: #fff;
  272. color: #333;
  273. @include flex;
  274. .orderDetail_header_item {
  275. flex: 1;
  276. font-size: 32rpx;
  277. @include border(right);
  278. @include border(bottom);
  279. @include flex(center, center);
  280. &:last-of-type {
  281. border-right: none;
  282. }
  283. &.active {
  284. color: $defaultColor;
  285. border-bottom: 4rpx solid $defaultColor;
  286. }
  287. }
  288. }
  289. // tab
  290. // 工单详情
  291. .orderDetail_info {
  292. padding: 108rpx 24rpx 0;
  293. .orderDetail_infoItem {
  294. width: 702rpx;
  295. height: calc(100vh - 340rpx);
  296. background-color: #fff;
  297. margin-top: 8rpx;
  298. border-radius: 8rpx;
  299. position: relative;
  300. padding: 0 24rpx;
  301. font-size: 32rpx;
  302. @include border;
  303. @include semicircle(#f9fafb, 82rpx);
  304. @include flex(flex-start, stretch, column);
  305. .ji,
  306. .jiaji {
  307. width: 60rpx;
  308. position: absolute;
  309. right: 0;
  310. top: 0;
  311. }
  312. .orderDetail_infoItem_header {
  313. height: 86rpx;
  314. @include border($directive:bottom, $style:dashed);
  315. @include flex(space-between, center);
  316. .orderDetail_infoItem_header_title {
  317. color: #333;
  318. flex: 1;
  319. @include flex(flex-start, center);
  320. .icon {
  321. width: 10rpx;
  322. height: 46rpx;
  323. border-radius: 2rpx;
  324. background-color: #F0F6ED;
  325. @include btn_background;
  326. }
  327. .taskNameAndWorkerName {
  328. flex: 1;
  329. @include flex;
  330. .taskName {
  331. max-width: 10em;
  332. margin-left: 8rpx;
  333. font-size: 38rpx;
  334. font-weight: bold;
  335. @include clamp;
  336. }
  337. }
  338. }
  339. .orderDetail_infoItem_header_more {
  340. color: $defaultColor;
  341. font-weight: bold;
  342. font-size: 38rpx;
  343. @include clamp;
  344. }
  345. }
  346. .orderDetail_infoItem_item {
  347. padding-top: 12rpx;
  348. padding-bottom: 12rpx;
  349. color: #333;
  350. font-size: 30rpx;
  351. flex: 1;
  352. @include border(bottom);
  353. @include flex(flex-start, stretch, column);
  354. &.process {
  355. padding-top: 90rpx;
  356. padding-bottom: 90rpx;
  357. }
  358. &:last-of-type {
  359. border-bottom: none;
  360. }
  361. // 工单信息
  362. .orderDetail_infoItem_item_content {
  363. margin-top: 20rpx;
  364. @include flex(space-between, stretch);
  365. .orderDetail_infoItem_item_name {
  366. font-size: 34rpx;
  367. color: #666;
  368. max-width: 4em;
  369. }
  370. .orderDetail_infoItem_item_value {
  371. font-size: 38rpx;
  372. color: #333;
  373. font-weight: bold;
  374. max-width: 420rpx;
  375. text-align: justify;
  376. word-break: break-all;
  377. }
  378. }
  379. // 流程信息
  380. .orderDetail_process_item {
  381. min-height: 120rpx;
  382. line-height: 50rpx;
  383. color: #333;
  384. @include flex(center);
  385. &:last-of-type {
  386. .step_icon {
  387. &::after {
  388. display: none;
  389. }
  390. }
  391. }
  392. .step_infoStart {
  393. font-size: 28rpx;
  394. flex: 1;
  395. @include flex(flex-end);
  396. .step_time {
  397. margin-left: 16rpx;
  398. }
  399. }
  400. .step_icon {
  401. font-size: 38rpx;
  402. margin-left: 30rpx;
  403. margin-right: 30rpx;
  404. position: relative;
  405. color: #E5E9ED;
  406. &.active {
  407. color: #07863C;
  408. }
  409. &::after {
  410. content: '';
  411. position: absolute;
  412. top: 60rpx;
  413. left: 18rpx;
  414. width: 1px;
  415. height: calc(100% - 70rpx);
  416. background-color: #DDE1E5;
  417. }
  418. }
  419. .step_infoEnd {
  420. font-size: 34rpx;
  421. flex: 1;
  422. padding-bottom: 16rpx;
  423. }
  424. }
  425. // 业务信息-检查
  426. &.business_inspect {
  427. .inspect_info {
  428. font-size: 34rpx;
  429. color: #333;
  430. padding-top: 20rpx;
  431. padding-bottom: 20rpx;
  432. @include border($directive:bottom, $style:dashed);
  433. .inspect_info_block {
  434. height: 60rpx;
  435. @include flex(space-between, center);
  436. .inspect_info_left {
  437. @include flex;
  438. .inspect_info_icon {
  439. width: 50rpx;
  440. height: 50rpx;
  441. line-height: 50rpx;
  442. border-radius: 50%;
  443. font-size: 28rpx;
  444. margin-right: 8rpx;
  445. @include flex(center, center);
  446. &.green {
  447. color: $defaultColor;
  448. border: 1px solid $defaultColor;
  449. background-color: rgba(73, 184, 86, 0.1);
  450. }
  451. &.red {
  452. color: #FF3B53;
  453. border: 1px solid #FF3B53;
  454. background-color: #FFE8EB;
  455. }
  456. }
  457. .inspect_info_name {
  458. font-weight: bold;
  459. }
  460. }
  461. .inspect_info_right {
  462. font-weight: bold;
  463. }
  464. }
  465. }
  466. .inspect_item {
  467. color: #333;
  468. font-size: 34rpx;
  469. line-height: 48rpx;
  470. padding-top: 26rpx;
  471. padding-bottom: 26rpx;
  472. @include border($directive:bottom, $style:dashed);
  473. .inspect_item_name {
  474. font-weight: bold;
  475. }
  476. .inspect_item_yytime {
  477. font-weight: bold;
  478. }
  479. .inspect_item_info {
  480. margin-top: 16rpx;
  481. margin-bottom: 16rpx;
  482. @include flex(space-between, center);
  483. .inspect_item_dept {
  484. flex: 1;
  485. word-break: break-all;
  486. @include clamp;
  487. }
  488. .inspect_item_number {
  489. flex: 1;
  490. text-align: right;
  491. word-break: break-all;
  492. @include clamp;
  493. }
  494. }
  495. }
  496. }
  497. // 业务信息-标本
  498. &.business_specimen {
  499. font-size: 34rpx;
  500. .th {
  501. background-color: red;
  502. @include btn_background;
  503. th {
  504. color: #fff;
  505. }
  506. }
  507. .td {
  508. position: relative;
  509. .urgent {
  510. width: 60rpx;
  511. position: absolute !important;
  512. right: 0;
  513. top: 0;
  514. }
  515. }
  516. .table--border {
  517. border: none;
  518. }
  519. ::v-deep .uni-table {
  520. min-width: 0;
  521. }
  522. ::v-deep .uni-table-td {
  523. word-break: break-all;
  524. }
  525. }
  526. // 业务信息-药品
  527. &.business_drugsBag {
  528. .drugsBag_item {
  529. color: #333;
  530. font-size: 34rpx;
  531. margin-top: 20rpx;
  532. @include flex(space-between, center);
  533. .drugsBag_item_name {}
  534. .drugsBag_item_value {
  535. font-weight: bold;
  536. }
  537. }
  538. }
  539. }
  540. }
  541. }
  542. }
  543. </style>