specimenDetail.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. <template>
  2. <view class="specimenCheckingDetail">
  3. <view class="page_tab">
  4. <view class="page_tab_bar active">
  5. <picker class="more_picker" @change="execFilter($event)" :value="index" :range="array" range-key="nameNum">
  6. <view class="more_picker_text">{{ array[index].name }}<text class="tab_num">( {{ array[index].total }} )</text></view>
  7. <view class="more"></view>
  8. </picker>
  9. </view>
  10. </view>
  11. <view class="zwsj" v-if="list.length == 0">
  12. <image class="zwsj-img" mode="widthFix" src="../../static/img/zanwushuju.png"></image>
  13. <view class="zwsj-txt">暂无数据</view>
  14. </view>
  15. <view class="page_item_wrap" v-for="item in list" :key="item.id">
  16. <view class="page_item">
  17. <view class="page_item_top">
  18. <view class="page_item_top-inner">
  19. <view class="page_item_top_L">
  20. <view class="L_text">{{ item.scode }}<text v-if="item.stype">({{item.stype.name}})</text></view>
  21. </view>
  22. <view class="page_item_top_R">
  23. <text :style="{color:item.urgent == 1?'red':'green'}">{{item.urgent == 1 ? "急" : "普"}}</text>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="page_item_cont">
  28. <view class="page_item_cont_T">
  29. <view class="page_item_cont_title">
  30. <view> 检验项目 </view>
  31. <view class="text_big">{{ item.specimenDesc || "无" }}</view>
  32. </view>
  33. <view class="page_item_cont_title">
  34. <view> 患者姓名 </view>
  35. <view class="text_big">{{ item.patientName }}<text v-if="item.bedNum">({{item.bedNum}})</text></view>
  36. </view>
  37. <view class="page_item_cont_title">
  38. <view> 住院号 </view>
  39. <view class="text_big">{{item.residenceNo||'无'}}</text></view>
  40. </view>
  41. <view class="page_item_cont_title">
  42. <view> 收取人 </view>
  43. <view class="text_big">{{item.receiverName||'无'}}</text></view>
  44. </view>
  45. <view class="page_item_cont_title">
  46. <view> 收取时间 </view>
  47. <view class="text_big">{{item.arriveTime||'无'}}</text></view>
  48. </view>
  49. <view class="page_item_cont_title">
  50. <view class="text_big">{{
  51. item.sickRoom ? item.sickRoom.dept : "无"
  52. }}</view>
  53. <text style="width: 4em;text-align: center;" class="icon_transport transport-arrow-right-full"></text>
  54. <view class="text_big">{{
  55. item.checkDept ? item.checkDept.dept : "无"
  56. }}</view>
  57. </view>
  58. </view>
  59. </view>
  60. <view class="L"></view>
  61. <view class="R"></view>
  62. </view>
  63. <view class="L-l"></view>
  64. <view class="R-l"></view>
  65. </view>
  66. <view class="foot_btn2">
  67. <view class="btn2" @click="goto()">返回</view>
  68. </view>
  69. </view>
  70. </template>
  71. <script>
  72. import {
  73. get,
  74. post,
  75. webHandle
  76. } from "../../http/http.js";
  77. export default {
  78. data() {
  79. return {
  80. id: 0,
  81. index: 0,
  82. arrayKey: 0,
  83. array: [
  84. { id: 0, name: '全部', total: '', nameNum: ''}
  85. ],
  86. idx: 0,
  87. workOrderId: 0,
  88. associationTypeValue: '',
  89. list: [],
  90. };
  91. },
  92. methods: {
  93. // 筛选
  94. execFilter({
  95. detail: {
  96. value
  97. }
  98. }) {
  99. this.index = value;
  100. this.arrayKey = this.array[value].id;
  101. this.getList();
  102. },
  103. // 获取标本类型
  104. // getSpecimenType(){
  105. // let array = [{ id: 0, name: '全部'}];
  106. // post(`/common/common/getDictionary`, {"type":"list","key":"specimen_type"}).then((res) => {
  107. // this.array = array.concat(res) || array;
  108. // });
  109. // },
  110. // 获取检验项目
  111. getSpecimenDesc(){
  112. post(`/api/specimenDesc/specimenCount`, {
  113. "hosId": uni.getStorageSync('userData').user.currentHospital.id,
  114. "gdId": this.workOrderId,
  115. }).then((res) => {
  116. res.data = res.data || [];
  117. let array = [{ id: 0, name: '全部', total: '', nameNum: ''}];
  118. array[0].total = res.total;
  119. array[0].nameNum = `全部(${res.total})`;
  120. this.array = array.concat(res.data.map( v=> ({id: --this.id, name: v[0] || '', nameNum: `${v[0] || ''}(${v[1]})`, total: v[1]})));
  121. });
  122. },
  123. // 获取标本列表
  124. getList(isAccumulate = false) {
  125. uni.showLoading({
  126. mask: true,
  127. title: "加载中",
  128. });
  129. let postData = {
  130. "idx": isAccumulate ? ++this.idx : 0,
  131. "sum": 20,
  132. "specimen": {
  133. "gdid": this.workOrderId,
  134. "hosId": uni.getStorageSync('userData').user.currentHospital.id,
  135. // "stype": this.array[this.index].id ? { id: this.array[this.index].id } : undefined,
  136. "specimenDesc": this.array[this.index].id ? this.array[this.index].name : undefined,
  137. "orderBy": 'arrive_time desc',
  138. }
  139. };
  140. post(`/simple/data/fetchDataList/specimen`, postData).then((res) => {
  141. uni.hideLoading();
  142. uni.stopPullDownRefresh();
  143. if (res.status == 200) {
  144. if(isAccumulate){
  145. this.list = this.list.concat(res.list);
  146. if(!res.list.length){
  147. uni.showToast({
  148. icon: 'none',
  149. title: '没有更多数据了',
  150. })
  151. }
  152. }else{
  153. this.list = res.list;
  154. }
  155. } else {
  156. uni.showToast({
  157. icon: "none",
  158. title: res.msg || "接口获取数据失败!",
  159. });
  160. }
  161. });
  162. },
  163. // 返回
  164. goto() {
  165. uni.navigateBack();
  166. },
  167. },
  168. onLoad(options) {
  169. console.log(options, "标本详情");
  170. this.workOrderId = options.workOrderId;
  171. this.associationTypeValue = options.associationTypeValue;
  172. this.getList();
  173. this.getSpecimenDesc();
  174. // #ifdef APP-PLUS
  175. webHandle("no", "app");
  176. // #endif
  177. // #ifdef H5
  178. webHandle("no", "wx");
  179. // #endif
  180. },
  181. onPullDownRefresh() {
  182. this.getList();
  183. },
  184. // 上拉加载
  185. onReachBottom(){
  186. console.log('到底了');
  187. this.getList(true);
  188. }
  189. };
  190. </script>
  191. <style lang="less" scoped>
  192. .specimenCheckingDetail {
  193. padding-top: 96rpx;
  194. padding-bottom: 100rpx;
  195. .page_tab {
  196. width: 100%;
  197. height: 96rpx;
  198. display: flex;
  199. position: fixed;
  200. left: 0;
  201. top: 0;
  202. z-index: 999;
  203. .more {
  204. position: absolute;
  205. right: 20rpx;
  206. width: 40rpx;
  207. height: 4rpx;
  208. border-top: 2px solid #49b856;
  209. border-bottom: 2px solid #49b856;
  210. background-color: #49b856;
  211. padding: 5px 0;
  212. background-clip: content-box;
  213. z-index: 9999;
  214. top: 50%;
  215. transform: translateY(-50%);
  216. }
  217. .more_picker {
  218. position: absolute;
  219. right: 0;
  220. width: 100%;
  221. height: 100%;
  222. z-index: 9999;
  223. .more_picker_text{
  224. height: 100%;
  225. display: flex;
  226. justify-content: center;
  227. align-items: center;
  228. }
  229. }
  230. .page_tab_bar {
  231. flex: 1;
  232. font-size: 36rpx;
  233. background: #fff;
  234. display: flex;
  235. justify-content: center;
  236. align-items: center;
  237. position: relative;
  238. &:after {
  239. content: "";
  240. position: absolute;
  241. left: 0;
  242. bottom: 0;
  243. height: 2rpx;
  244. width: 100%;
  245. background-color: transparent;
  246. }
  247. .tab_num {
  248. color: #ff3b53;
  249. margin-left: 8rpx;
  250. }
  251. &.active {
  252. color: #49b856;
  253. &:after {
  254. background-color: #49b856;
  255. }
  256. }
  257. }
  258. }
  259. .page_header {
  260. margin: 20rpx;
  261. padding: 16rpx;
  262. border: 2rpx solid #e5e9ed;
  263. background: #fff;
  264. border-radius: 8rpx;
  265. .page_header_item {
  266. margin-bottom: 16rpx;
  267. .page_header_title {
  268. margin-bottom: 8rpx;
  269. font-weight: bold;
  270. }
  271. .page_header_content {
  272. display: flex;
  273. image {
  274. height: 100rpx;
  275. width: 30%;
  276. margin: 0 8rpx;
  277. }
  278. }
  279. }
  280. }
  281. .zwsj {
  282. position: absolute;
  283. left: 0;
  284. top: 0;
  285. right: 0;
  286. bottom: 0;
  287. display: flex;
  288. justify-content: center;
  289. align-items: center;
  290. flex-direction: column;
  291. .zwsj-img {
  292. width: 560rpx;
  293. }
  294. .zwsj-txt {
  295. font-size: 36rpx;
  296. font-weight: 700;
  297. margin-top: 20rpx;
  298. text-align: center;
  299. }
  300. }
  301. .page_item_wrap {
  302. width: 100%;
  303. height: auto;
  304. box-sizing: border-box;
  305. position: relative;
  306. margin-bottom: 16rpx;
  307. .page_item {
  308. margin-top: 16rpx;
  309. margin-bottom: 124rpx;
  310. background: #fff;
  311. border-radius: 8rpx;
  312. margin: 0 20rpx;
  313. border: 2rpx solid #e5e9ed;
  314. position: relative;
  315. overflow: hidden;
  316. padding: 0 16rpx;
  317. .L {
  318. width: 40rpx;
  319. height: 40rpx;
  320. border-radius: 50%;
  321. background: #f9fafb;
  322. position: absolute;
  323. left: -20rpx;
  324. top: 68rpx;
  325. border: 2rpx solid #e5e9ed;
  326. }
  327. .R {
  328. width: 40rpx;
  329. height: 40rpx;
  330. border-radius: 50%;
  331. background: #f9fafb;
  332. position: absolute;
  333. float: right;
  334. right: -20rpx;
  335. top: 68rpx;
  336. border: 2rpx solid #e5e9ed;
  337. }
  338. .starting {
  339. width: 50rpx;
  340. height: 50rpx;
  341. color: #fff;
  342. background: #49b856;
  343. display: inline-block;
  344. border-radius: 50%;
  345. text-align: center;
  346. line-height: 46rpx;
  347. font-size: 32rpx;
  348. margin-right: 6rpx;
  349. }
  350. .End {
  351. width: 50rpx;
  352. height: 50rpx;
  353. color: #fff;
  354. background: #39b199;
  355. display: inline-block;
  356. border-radius: 50%;
  357. text-align: center;
  358. line-height: 46rpx;
  359. font-size: 32rpx;
  360. margin-right: 6rpx;
  361. }
  362. .page_item_top {
  363. height: 88rpx;
  364. border-bottom: 2rpx dashed #e5e9ed;
  365. padding: 0 16rpx;
  366. .page_item_top-inner {
  367. display: flex;
  368. justify-content: space-between;
  369. align-items: center;
  370. height: 100%;
  371. .page_item_top_L {
  372. .emergencys {
  373. background: #ff3b53 !important;
  374. width: 124rpx !important;
  375. }
  376. .emergency {
  377. background: #ff3b53 !important;
  378. }
  379. .emergency1 {
  380. background: #49b856 !important;
  381. }
  382. .page_item_cont_start {
  383. text-align: center;
  384. height: 44rpx;
  385. width: 104rpx;
  386. line-height: 44rpx;
  387. border-radius: 8rpx;
  388. background: #49b856;
  389. color: #fff;
  390. display: inline-block;
  391. }
  392. .L_time {
  393. color: #6cc076;
  394. font-size: 32rpx;
  395. }
  396. .L_text {
  397. font-size: 32rpx;
  398. font-weight: 700;
  399. }
  400. }
  401. .page_item_top_R {
  402. font-size: 32rpx;
  403. .back {
  404. background-color: #49b856;
  405. }
  406. .L_iocn {
  407. color: rgb(7, 134, 60);
  408. font-size: 36rpx;
  409. font-weight: 700;
  410. }
  411. }
  412. }
  413. }
  414. .page_item_cont {
  415. min-height: 90rpx;
  416. padding: 0 16rpx;
  417. text-align: left;
  418. position: relative;
  419. .text_big {
  420. font-size: 32rpx;
  421. font-weight: 700;
  422. margin-top: 10rpx;
  423. p {
  424. font-weight: 700;
  425. line-height: 1.5;
  426. }
  427. }
  428. .page_item_cont_T {
  429. padding-top: 28rpx;
  430. padding-bottom: 28rpx;
  431. font-size: 28rpx;
  432. .page_item_cont_title {
  433. height: 100%;
  434. font-size: 32rpx;
  435. display: flex;
  436. justify-content: space-between;
  437. align-items: center;
  438. }
  439. }
  440. .page_item_cont_B {
  441. padding-top: 28rpx;
  442. margin-bottom: 28rpx;
  443. .page_item_cont_title {
  444. font-size: 32rpx;
  445. display: flex;
  446. justify-content: space-between;
  447. }
  448. .page_item_cont_title1 {
  449. height: 60rpx;
  450. line-height: 60rpx;
  451. font-size: 32rpx;
  452. padding-left: 64rpx;
  453. }
  454. }
  455. }
  456. .page_item_foot {
  457. border-top: 2rpx dashed #e5e9ed;
  458. border-bottom: 2rpx dashed #e5e9ed;
  459. padding: 28rpx 16rpx;
  460. text-align: left;
  461. .page_item_foot_text {
  462. font-size: 32rpx;
  463. margin-bottom: 20rpx;
  464. .text1 {
  465. color: rgb(102, 102, 102);
  466. }
  467. .text2 {
  468. float: right;
  469. font-weight: 700;
  470. }
  471. }
  472. }
  473. #infos {
  474. display: none;
  475. }
  476. .page_item_infos {
  477. padding-bottom: 20rpx;
  478. border-bottom: 2rpx dashed #e5e9ed;
  479. .page_item_info2 {
  480. text-align: left;
  481. line-height: 60rpx;
  482. font-size: 32rpx;
  483. padding-left: 16rpx;
  484. .page_item_foot_text {
  485. font-size: 32rpx;
  486. margin-bottom: 20rpx;
  487. .text1 {
  488. color: rgb(102, 102, 102);
  489. }
  490. .text2 {
  491. float: right;
  492. font-weight: 700;
  493. }
  494. }
  495. }
  496. }
  497. }
  498. .L-l {
  499. width: 2rpx;
  500. height: 40rpx;
  501. background: #f9fafb;
  502. position: absolute;
  503. left: 20rpx;
  504. top: 72rpx;
  505. }
  506. .R-l {
  507. width: 2rpx;
  508. height: 40rpx;
  509. background: #f9fafb;
  510. position: absolute;
  511. right: 20rpx;
  512. top: 72rpx;
  513. }
  514. }
  515. .foot_btn2 {
  516. position: fixed;
  517. bottom: 0;
  518. width: 100vw;
  519. padding: 0 20rpx;
  520. box-sizing: border-box;
  521. line-height: 66rpx;
  522. height: 100rpx;
  523. border-top: 2rpx solid #e5e9ed;
  524. background: #f9fafb;
  525. text-align: center;
  526. display: flex;
  527. justify-content: center;
  528. align-items: center;
  529. .btn2 {
  530. height: 66rpx;
  531. flex: 1;
  532. margin: 16rpx 16rpx 0;
  533. background-image: linear-gradient(to right, #72c172, #3bb197);
  534. color: #fff;
  535. border-radius: 8rpx;
  536. font-size: 32rpx;
  537. }
  538. }
  539. }
  540. </style>