patientDetail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  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. // wocao
  190. },
  191. }],
  192. };
  193. },
  194. computed: {
  195. ...mapState('other', ["deptDisplay"]),
  196. },
  197. methods: {
  198. init(queryParams) {
  199. this.queryParams = queryParams;
  200. this.changeTab(1);
  201. },
  202. // 跳转详情
  203. toDetail(id, associationType) {
  204. uni.navigateTo({
  205. url: `/pages/detail/detail?id=${id}&associationType=${associationType}`
  206. })
  207. },
  208. // 切换tab
  209. changeTab(id) {
  210. this.selectedTab = id;
  211. switch (id) {
  212. case 1:
  213. this.getInfo(this.queryParams);
  214. break;
  215. case 2:
  216. break;
  217. case 3:
  218. break;
  219. }
  220. },
  221. //获取工单信息数据
  222. getInfo(queryParams) {
  223. uni.showLoading({
  224. mask: true,
  225. title: '加载中',
  226. })
  227. let postData = {
  228. "patientCode": queryParams.patientCode
  229. };
  230. console.log(queryParams.patientCode)
  231. reqGetPatientInspectInfo(postData).then(res => {
  232. uni.hideLoading();
  233. if (res.status == 200) {
  234. // 工单信息
  235. res.data.specimens = res.data.specimens || [];
  236. res.data.inspects = res.data.inspects || [];
  237. this.info = res.data;
  238. } else {
  239. this.$refs.seiminModel.show({
  240. skin: 'toast',
  241. icon: 'error',
  242. content: '请求失败',
  243. })
  244. }
  245. })
  246. },
  247. },
  248. onLoad(queryParams) {
  249. console.log(queryParams);
  250. this.init(queryParams);
  251. },
  252. created() {
  253. this.debouncedChangeTab = debounce(this.changeTab, 166);
  254. },
  255. beforeDestroy() {
  256. this.debouncedChangeTab.cancel()
  257. }
  258. }
  259. </script>
  260. <style lang="scss" scoped>
  261. .orderDetail {
  262. padding-bottom: 108rpx;
  263. // 头部
  264. .orderDetail_header {
  265. position: fixed;
  266. z-index: 98;
  267. width: 100%;
  268. height: 88rpx;
  269. background-color: #fff;
  270. color: #333;
  271. @include flex;
  272. .orderDetail_header_item {
  273. flex: 1;
  274. font-size: 32rpx;
  275. @include border(right);
  276. @include border(bottom);
  277. @include flex(center, center);
  278. &:last-of-type {
  279. border-right: none;
  280. }
  281. &.active {
  282. color: $defaultColor;
  283. border-bottom: 4rpx solid $defaultColor;
  284. }
  285. }
  286. }
  287. // tab
  288. // 工单详情
  289. .orderDetail_info {
  290. padding: 108rpx 24rpx 0;
  291. .orderDetail_infoItem {
  292. width: 702rpx;
  293. height: calc(100vh - 340rpx);
  294. background-color: #fff;
  295. margin-top: 8rpx;
  296. border-radius: 8rpx;
  297. position: relative;
  298. padding: 0 24rpx;
  299. font-size: 32rpx;
  300. @include border;
  301. @include semicircle(#f9fafb, 82rpx);
  302. @include flex(flex-start, stretch, column);
  303. .ji,
  304. .jiaji {
  305. width: 60rpx;
  306. position: absolute;
  307. right: 0;
  308. top: 0;
  309. }
  310. .orderDetail_infoItem_header {
  311. height: 86rpx;
  312. @include border($directive:bottom, $style:dashed);
  313. @include flex(space-between, center);
  314. .orderDetail_infoItem_header_title {
  315. color: #333;
  316. flex: 1;
  317. @include flex(flex-start, center);
  318. .icon {
  319. width: 10rpx;
  320. height: 46rpx;
  321. border-radius: 2rpx;
  322. background-color: #F0F6ED;
  323. @include btn_background;
  324. }
  325. .taskNameAndWorkerName {
  326. flex: 1;
  327. @include flex;
  328. .taskName {
  329. max-width: 10em;
  330. margin-left: 8rpx;
  331. font-size: 38rpx;
  332. font-weight: bold;
  333. @include clamp;
  334. }
  335. }
  336. }
  337. .orderDetail_infoItem_header_more {
  338. color: $defaultColor;
  339. font-weight: bold;
  340. font-size: 38rpx;
  341. @include clamp;
  342. }
  343. }
  344. .orderDetail_infoItem_item {
  345. padding-top: 12rpx;
  346. padding-bottom: 12rpx;
  347. color: #333;
  348. font-size: 30rpx;
  349. flex: 1;
  350. @include border(bottom);
  351. @include flex(flex-start, stretch, column);
  352. &.process {
  353. padding-top: 90rpx;
  354. padding-bottom: 90rpx;
  355. }
  356. &:last-of-type {
  357. border-bottom: none;
  358. }
  359. // 工单信息
  360. .orderDetail_infoItem_item_content {
  361. margin-top: 20rpx;
  362. @include flex(space-between, stretch);
  363. .orderDetail_infoItem_item_name {
  364. font-size: 34rpx;
  365. color: #666;
  366. max-width: 4em;
  367. }
  368. .orderDetail_infoItem_item_value {
  369. font-size: 38rpx;
  370. color: #333;
  371. font-weight: bold;
  372. max-width: 420rpx;
  373. text-align: justify;
  374. word-break: break-all;
  375. }
  376. }
  377. // 流程信息
  378. .orderDetail_process_item {
  379. min-height: 120rpx;
  380. line-height: 50rpx;
  381. color: #333;
  382. @include flex(center);
  383. &:last-of-type {
  384. .step_icon {
  385. &::after {
  386. display: none;
  387. }
  388. }
  389. }
  390. .step_infoStart {
  391. font-size: 28rpx;
  392. flex: 1;
  393. @include flex(flex-end);
  394. .step_time {
  395. margin-left: 16rpx;
  396. }
  397. }
  398. .step_icon {
  399. font-size: 38rpx;
  400. margin-left: 30rpx;
  401. margin-right: 30rpx;
  402. position: relative;
  403. color: #E5E9ED;
  404. &.active {
  405. color: #07863C;
  406. }
  407. &::after {
  408. content: '';
  409. position: absolute;
  410. top: 60rpx;
  411. left: 18rpx;
  412. width: 1px;
  413. height: calc(100% - 70rpx);
  414. background-color: #DDE1E5;
  415. }
  416. }
  417. .step_infoEnd {
  418. font-size: 34rpx;
  419. flex: 1;
  420. padding-bottom: 16rpx;
  421. }
  422. }
  423. // 业务信息-检查
  424. &.business_inspect {
  425. .inspect_info {
  426. font-size: 34rpx;
  427. color: #333;
  428. padding-top: 20rpx;
  429. padding-bottom: 20rpx;
  430. @include border($directive:bottom, $style:dashed);
  431. .inspect_info_block {
  432. height: 60rpx;
  433. @include flex(space-between, center);
  434. .inspect_info_left {
  435. @include flex;
  436. .inspect_info_icon {
  437. width: 50rpx;
  438. height: 50rpx;
  439. line-height: 50rpx;
  440. border-radius: 50%;
  441. font-size: 28rpx;
  442. margin-right: 8rpx;
  443. @include flex(center, center);
  444. &.green {
  445. color: $defaultColor;
  446. border: 1px solid $defaultColor;
  447. background-color: rgba(73, 184, 86, 0.1);
  448. }
  449. &.red {
  450. color: #FF3B53;
  451. border: 1px solid #FF3B53;
  452. background-color: #FFE8EB;
  453. }
  454. }
  455. .inspect_info_name {
  456. font-weight: bold;
  457. }
  458. }
  459. .inspect_info_right {
  460. font-weight: bold;
  461. }
  462. }
  463. }
  464. .inspect_item {
  465. color: #333;
  466. font-size: 34rpx;
  467. line-height: 48rpx;
  468. padding-top: 26rpx;
  469. padding-bottom: 26rpx;
  470. @include border($directive:bottom, $style:dashed);
  471. .inspect_item_name {
  472. font-weight: bold;
  473. }
  474. .inspect_item_yytime {
  475. font-weight: bold;
  476. }
  477. .inspect_item_info {
  478. margin-top: 16rpx;
  479. margin-bottom: 16rpx;
  480. @include flex(space-between, center);
  481. .inspect_item_dept {
  482. flex: 1;
  483. word-break: break-all;
  484. @include clamp;
  485. }
  486. .inspect_item_number {
  487. flex: 1;
  488. text-align: right;
  489. word-break: break-all;
  490. @include clamp;
  491. }
  492. }
  493. }
  494. }
  495. // 业务信息-标本
  496. &.business_specimen {
  497. font-size: 34rpx;
  498. .th {
  499. background-color: red;
  500. @include btn_background;
  501. th {
  502. color: #fff;
  503. }
  504. }
  505. .td {
  506. position: relative;
  507. .urgent {
  508. width: 60rpx;
  509. position: absolute !important;
  510. right: 0;
  511. top: 0;
  512. }
  513. }
  514. .table--border {
  515. border: none;
  516. }
  517. ::v-deep .uni-table {
  518. min-width: 0;
  519. }
  520. ::v-deep .uni-table-td {
  521. word-break: break-all;
  522. }
  523. }
  524. // 业务信息-药品
  525. &.business_drugsBag {
  526. .drugsBag_item {
  527. color: #333;
  528. font-size: 34rpx;
  529. margin-top: 20rpx;
  530. @include flex(space-between, center);
  531. .drugsBag_item_name {}
  532. .drugsBag_item_value {
  533. font-weight: bold;
  534. }
  535. }
  536. }
  537. }
  538. }
  539. }
  540. }
  541. </style>