specimenDetail.vue 14 KB

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