specimenDetail.vue 14 KB

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