my_list.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  1. <template>
  2. <scroll-view :scroll-y="!models.disjunctor" @scroll="scrollList" :scroll-top="scroll_t" class="my_list">
  3. <view class="my_list_top">
  4. <view class="my_list_topL" @click="act()">
  5. 筛选
  6. <text class="cubeic-pulldown icon_transport transport-paixujiantouxia" v-if="!actType"></text>
  7. <text class="cubeic-pullup icon_transport transport-paixujiantoushang" v-if="actType"></text>
  8. </view>
  9. <view class="my_list_topC">
  10. <input type="text" placeholder="请输入关键字" v-model="listData.workOrder.keyWord" />
  11. </view>
  12. <view class="my_list_topR" @click="search(listData)"> 搜索 </view>
  13. </view>
  14. <view class="my_list_tops" id="actType" :animation="animationData" v-if="actType">
  15. <view class="tops">
  16. <view>类型筛选</view>
  17. <view class="tops_cont">
  18. <view v-for="(data, i) of typeData" :key="i" :class="{ ac: checkedSear[data.id] }"
  19. @click="sxTab(data.associationTypes, data.id)" :id="data.id">
  20. {{ data.name }}
  21. </view>
  22. </view>
  23. </view>
  24. <view class="tops">
  25. <view>工单筛选</view>
  26. <view class="tops_cont1">
  27. <view :class="{ gdType: listData.workOrder.abnormityType == 0 }" @click="gdTab(0)">
  28. 正常工单
  29. </view>
  30. <view :class="{ gdType: listData.workOrder.abnormityType == 1 }" @click="gdTab(1)">
  31. 异常工单
  32. </view>
  33. </view>
  34. </view>
  35. <view class="foot_btn2">
  36. <view class="btn1" :class="{ btnType: btnType == 1 }" @click="ok(listData)">
  37. 确定
  38. </view>
  39. <view class="btn2" @click="Reset()"> 重置 </view>
  40. </view>
  41. </view>
  42. <view class="item" @click="item()">
  43. <view class="page_items" v-if="workData && workData.length > 0">
  44. <view class="page_item" v-for="(infoDATA, i) of workData" :key="i" @click="detailIt(infoDATA)">
  45. <view class="page_item_top">
  46. <view class="page_item_top_L">
  47. <text class="L_text">单号:{{ infoDATA.gdcode }}</text>
  48. <view class="page_item_cont_start emergency1" v-if="infoDATA.emergencyType.value == 1">
  49. <text>
  50. <text
  51. class="cubeic-star icon_transport transport-shiwujiaoxing"></text>{{ infoDATA.emergencyType.name }}</text>
  52. </view>
  53. <view class="page_item_cont_start emergency" v-if="infoDATA.emergencyType.value == 2">
  54. <text>
  55. <text
  56. class="cubeic-star icon_transport transport-shiwujiaoxing"></text>{{ infoDATA.emergencyType.name }}</text>
  57. </view>
  58. <view class="page_item_cont_start emergencys" v-if="infoDATA.emergencyType.value == 3">
  59. <text>
  60. <text
  61. class="cubeic-star icon_transport transport-shiwujiaoxing"></text>{{ infoDATA.emergencyType.name }}</text>
  62. </view>
  63. </view>
  64. <view class="page_item_top_L">
  65. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'specimen'">标本</text>
  66. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'specimenPlan'">标本</text>
  67. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'drugsBag'">药品</text>
  68. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'jPBag'">静配</text>
  69. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'inspect'">陪检</text>
  70. <text class="L_iocn" v-if="
  71. infoDATA.taskType.associationType.value == 'patientTransport'
  72. ">转运</text>
  73. <text class="L_iocn" v-if="infoDATA.taskType.associationType.value == 'other'">其他</text>
  74. </view>
  75. <view class="page_item_top_R">
  76. <view class="num" v-if="infoDATA.gdState.value != 6">
  77. {{infoDATA.grade?(infoDATA.grade.gradeTotal>=0?'+'+infoDATA.grade.gradeTotal:'-'+infoDATA.grade.gradeTotal):''}}
  78. </view>
  79. <view class="num" v-if="infoDATA.gdState.value == 6">
  80. 未评价
  81. </view>
  82. </view>
  83. <view class="L"> </view>
  84. <view class="R"> </view>
  85. </view>
  86. <view class="page_item_cont">
  87. <view class="page_item_cont_T">
  88. <view class="page_item_cont_title">
  89. <text> <text class="starting">起</text> 点科室</text>
  90. <text class="text_big"> {{ infoDATA.startDept.dept }}</text>
  91. </view>
  92. </view>
  93. <view class="line"> </view>
  94. <view class="page_item_cont_B">
  95. <view class="page_item_cont_title" v-for="(dept, i) of infoDATA.middleDept" :key="i">
  96. <view v-if="infoDATA.taskType.associationType.value == 'inspect'">
  97. <text> <text class="End">检</text> 查科室</text>
  98. <text class="text_big"> {{ dept.dept }}</text>
  99. <view></view>
  100. </view>
  101. </view>
  102. <view class="page_item_cont_title" v-for="(dept, i) of infoDATA.endDepts" :key="i">
  103. <view v-if="infoDATA.taskType.associationType.value != 'inspect'">
  104. <text> <text class="End">终</text> 点科室</text>
  105. <text class="text_big"> {{ dept.dept }}</text>
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. <view class="page_item_foot">
  111. <view class="page_item_foot_text">
  112. <text class="text1">完成时间</text>&nbsp;&nbsp;
  113. <text class="text1">{{ infoDATA.completeTime || 0 }}</text>
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. <!-- 弹窗 -->
  120. <showIntegralModel :disjunctor="models.disjunctor" :operate="models.operate" :timestamp="models.timestamp"
  121. :orderId="models.orderId" @know="know()"></showIntegralModel>
  122. <!-- 未评价弹窗提示 -->
  123. <showModel :title="models6.title" :icon="models6.icon" :disjunctor="models6.disjunctor" :content="models6.content"
  124. @know="know6" :operate="models6.operate"></showModel>
  125. </scroll-view>
  126. </template>
  127. <script>
  128. import {
  129. get,
  130. post,
  131. webHandle
  132. } from "../../http/http.js";
  133. import showIntegralModel from "../../components/showIntegralModel/showIntegralModel.vue";
  134. import showModel from "../../components/showModel/showModel.vue";
  135. export default {
  136. data() {
  137. return {
  138. // 弹窗model
  139. models6: {
  140. disjunctor: false,
  141. },
  142. //滚动距离
  143. scroll_t: 0,
  144. scroll_t_old: 0,
  145. // 弹窗model
  146. models: {
  147. disjunctor: false,
  148. },
  149. animationData: {}, //动画
  150. actType: false,
  151. btnType: 1,
  152. checkedSear: {}, //筛选多选box
  153. types: "",
  154. typeData: [],
  155. listData: {
  156. idx: 0,
  157. sum: 20,
  158. workOrder: {
  159. abnormityType: "0",
  160. associationTypes: [],
  161. keyWord: "",
  162. },
  163. },
  164. workData: [],
  165. };
  166. },
  167. components: {
  168. showIntegralModel,
  169. showModel,
  170. },
  171. methods: {
  172. //滚动距离
  173. scrollList(e) {
  174. this.scroll_t_old = e.detail.scrollTop;
  175. },
  176. // 知道了
  177. know() {
  178. this.scroll_t = this.scroll_t_old;
  179. this.models.disjunctor = false;
  180. },
  181. //未评价弹窗知道了
  182. know6() {
  183. this.models6.disjunctor = false;
  184. },
  185. //积分详情
  186. detailIt(infoDATA) {
  187. if (infoDATA.gdState.value == 6) {
  188. this.models6 = {
  189. disjunctor: true,
  190. content: "暂未评价,无法查看积分详情",
  191. icon: "warn",
  192. operate: {
  193. know: "知道了"
  194. },
  195. };
  196. return;
  197. }
  198. this.models.disjunctor = true;
  199. this.models.orderId = infoDATA.id;
  200. this.models.timestamp = Date.now();
  201. },
  202. item() {
  203. this.actType = false;
  204. this.animation.opacity(0).step();
  205. this.animationData = this.animation.export();
  206. },
  207. // 确定
  208. ok(data) {
  209. this.getData(data);
  210. this.actType = false;
  211. this.animation.opacity(0).step();
  212. this.animationData = this.animation.export();
  213. },
  214. // 搜索
  215. search(data) {
  216. this.getData(data);
  217. this.actType = false;
  218. this.animation.opacity(0).step();
  219. this.animationData = this.animation.export();
  220. },
  221. // 重置
  222. Reset() {
  223. for (var k in this.checkedSear) {
  224. this.checkedSear[k] = false;
  225. }
  226. this.listData.workOrder.associationType = [];
  227. this.listData.workOrder.abnormityType = "0";
  228. this.listData.workOrder.keyWord = "";
  229. this.getData(this.listData);
  230. },
  231. // 筛选
  232. act() {
  233. if (this.actType) {
  234. //当前状态时展开
  235. this.animation.opacity(0).step();
  236. this.animationData = this.animation.export();
  237. } else {
  238. //seimin
  239. this.animation.opacity(1).step();
  240. this.animationData = this.animation.export();
  241. }
  242. this.actType = !this.actType;
  243. },
  244. // 类型筛选
  245. sxTab(type, id) {
  246. this.$set(this.checkedSear, id, !this.checkedSear[id]);
  247. let checkedArr = [];
  248. for (var k in this.checkedSear) {
  249. if (this.checkedSear[k]) {
  250. checkedArr.push(k);
  251. }
  252. }
  253. this.listData.workOrder.associationTypes = checkedArr;
  254. },
  255. gdTab(type) {
  256. this.listData.workOrder.abnormityType = type;
  257. },
  258. getType() {
  259. let data = {
  260. type: "list",
  261. key: "association_types",
  262. };
  263. post("/common/common/getDictionary", data).then((res) => {
  264. for (var i = 0; i < res.length; i++) {
  265. let list = {
  266. name: "",
  267. associationTypes: "",
  268. id: "",
  269. };
  270. list.name = res[i].name;
  271. list.associationTypes = res[i].value;
  272. list.id = res[i].id;
  273. this.typeData.push(list);
  274. let id = res[i].id;
  275. this.$set(this.checkedSear, id, false);
  276. }
  277. });
  278. },
  279. getData(data) {
  280. uni.showLoading({
  281. title: '加载中',
  282. mask: true
  283. });
  284. post("/api/getOrdersByDate/" + this.types, data).then((res) => {
  285. uni.hideLoading();
  286. if (res.status == 200) {
  287. this.workData = res.data.data;
  288. } else {
  289. uni.showToast({
  290. icon: "none",
  291. title: "请求失败!",
  292. });
  293. }
  294. });
  295. },
  296. },
  297. onLoad(options) {
  298. console.log(options)
  299. this.types = options.type;
  300. this.getType();
  301. this.getData(this.listData);
  302. // 创建动画
  303. this.animation = uni.createAnimation({
  304. duration: 500,
  305. timingFunction: "ease",
  306. });
  307. // #ifdef APP-PLUS
  308. webHandle("no", "app");
  309. // #endif
  310. // #ifdef H5
  311. webHandle("no", "wx");
  312. // #endif
  313. },
  314. onUnload() {
  315. // 页面关闭后清空数据
  316. this.animationData = {};
  317. },
  318. };
  319. </script>
  320. <style lang="less">
  321. .my_list {
  322. height: 100vh;
  323. .my_list_top {
  324. height: 90rpx;
  325. background: #fff;
  326. line-height: 90rpx;
  327. border-bottom: 2rpx solid rgb(142, 157, 158);
  328. position: fixed;
  329. top: 0;
  330. width: 100%;
  331. z-index: 999;
  332. display: flex;
  333. align-items: center;
  334. justify-content: space-between;
  335. .my_list_topL {
  336. float: left;
  337. width: 22%;
  338. height: 100%;
  339. font-size: 32rpx;
  340. text-align: center;
  341. display: flex;
  342. justify-content: center;
  343. align-items: center;
  344. text {
  345. font-size: 34rpx;
  346. }
  347. }
  348. .my_list_topC {
  349. float: left;
  350. width: 55%;
  351. input {
  352. height: 60rpx;
  353. border: 2rpx solid rgb(142, 157, 158);
  354. border-radius: 40rpx;
  355. width: 100%;
  356. padding-left: 10rpx;
  357. padding-right: 10rpx;
  358. }
  359. }
  360. .my_list_topR {
  361. float: right;
  362. width: 22%;
  363. height: 100%;
  364. font-size: 32rpx;
  365. text-align: center;
  366. }
  367. }
  368. .my_list_tops {
  369. background: #fff;
  370. position: fixed;
  371. padding-top: 20rpx;
  372. z-index: 999;
  373. top: 92rpx;
  374. width: 100%;
  375. opacity: 0;
  376. .tops {
  377. height: 100%;
  378. text-align: left;
  379. padding-left: 30rpx;
  380. font-size: 32rpx;
  381. .tops_cont {
  382. height: 100%;
  383. margin-top: 10rpx;
  384. overflow: hidden;
  385. display: flex;
  386. flex-wrap: wrap;
  387. justify-content: space-between;
  388. view {
  389. width: 32%;
  390. height: 70rpx;
  391. line-height: 70rpx;
  392. // float: left;
  393. text-align: center;
  394. // margin-right: 2%;
  395. color: rgb(142, 157, 158);
  396. background: rgb(249, 250, 251);
  397. border-radius: 8rpx;
  398. margin-bottom: 2%;
  399. }
  400. .ac {
  401. color: #fff !important;
  402. background-image: linear-gradient(to right,
  403. #72c172,
  404. #3bb197) !important;
  405. }
  406. .ac1 {
  407. display: inline-block;
  408. }
  409. }
  410. .tops_cont1 {
  411. height: 100rpx;
  412. margin-top: 10rpx;
  413. overflow: hidden;
  414. view {
  415. width: 45%;
  416. color: rgb(142, 157, 158);
  417. height: 70rpx;
  418. line-height: 70rpx;
  419. float: left;
  420. text-align: center;
  421. margin-right: 2%;
  422. background: rgb(249, 250, 251);
  423. border-radius: 8rpx;
  424. }
  425. }
  426. .tops_cont2 {
  427. height: 90rpx;
  428. line-height: 90rpx;
  429. }
  430. .lxType {
  431. color: #fff !important;
  432. background-image: linear-gradient(to right,
  433. #72c172,
  434. #3bb197) !important;
  435. }
  436. .gdType {
  437. color: #fff !important;
  438. background-image: linear-gradient(to right,
  439. #72c172,
  440. #3bb197) !important;
  441. }
  442. }
  443. .foot_btn2 {
  444. position: absolute;
  445. width: 100%;
  446. line-height: 90rpx;
  447. height: 90rpx;
  448. border-top: 2rpx solid #e5e9ed;
  449. border-bottom: 2rpx solid #e5e9ed;
  450. background: #f9fafb;
  451. text-align: center;
  452. view {
  453. height: 90rpx;
  454. width: 49%;
  455. color: rgb(153, 153, 153);
  456. font-size: 32rpx;
  457. }
  458. .btn1 {
  459. float: left;
  460. }
  461. .btn2 {
  462. float: right;
  463. border-left: 2rpx solid #e5e9ed;
  464. }
  465. }
  466. .btnType {
  467. color: rgb(102, 102, 102) !important;
  468. }
  469. }
  470. .item {
  471. padding: 0 20rpx;
  472. margin-top: 120rpx;
  473. .page_items {
  474. margin-bottom: 110rpx;
  475. .page_item {
  476. margin-top: 16rpx;
  477. min-height: 356rpx;
  478. background: #fff;
  479. border-radius: 8rpx;
  480. overflow: hidden;
  481. padding: 0 16rpx;
  482. border: 2rpx solid #e5e9ed;
  483. .L {
  484. width: 40rpx;
  485. height: 40rpx;
  486. border-radius: 50%;
  487. background: #f9fafb; // background: blue;
  488. position: relative;
  489. left: -50rpx;
  490. top: 66rpx;
  491. }
  492. .R {
  493. width: 40rpx;
  494. height: 40rpx;
  495. border-radius: 50%;
  496. background: #f9fafb;
  497. position: relative;
  498. float: right;
  499. right: -50rpx;
  500. top: 26rpx;
  501. }
  502. .starting {
  503. width: 50rpx;
  504. height: 50rpx;
  505. color: #fff;
  506. background: #49b856;
  507. display: inline-block;
  508. border-radius: 50%;
  509. text-align: center;
  510. line-height: 46rpx;
  511. font-size: 32rpx;
  512. margin-right: 6rpx;
  513. }
  514. .End {
  515. width: 50rpx;
  516. height: 50rpx;
  517. color: #fff;
  518. background: #39b199;
  519. display: inline-block;
  520. border-radius: 50%;
  521. text-align: center;
  522. line-height: 46rpx;
  523. font-size: 32rpx;
  524. margin-right: 6rpx;
  525. }
  526. .page_item_top {
  527. height: 86rpx;
  528. border-bottom: 2rpx dashed #e5e9ed;
  529. .page_item_top_L {
  530. height: 100%;
  531. float: left;
  532. line-height: 88rpx;
  533. .ac {
  534. width: 32rpx;
  535. height: 32rpx;
  536. border: 2rpx solid #ccc;
  537. display: inline-block;
  538. position: relative;
  539. top: 6rpx;
  540. display: none;
  541. text {
  542. width: 24rpx;
  543. height: 24rpx;
  544. background: #39b199;
  545. display: block;
  546. margin: 0 auto;
  547. margin-top: 4rpx;
  548. }
  549. }
  550. .ac1 {
  551. width: 32rpx;
  552. height: 32rpx;
  553. border: 2rpx solid #ccc;
  554. display: inline-block;
  555. position: relative;
  556. top: 6rpx;
  557. }
  558. .emergencys {
  559. background: #ff3b53 !important;
  560. width: 124rpx !important;
  561. }
  562. .emergency {
  563. background: #ff3b53 !important;
  564. }
  565. .emergency1 {
  566. background: #49b856 !important;
  567. }
  568. .page_item_cont_start {
  569. text-align: center;
  570. height: 44rpx;
  571. width: 104rpx;
  572. line-height: 44rpx;
  573. border-radius: 8rpx;
  574. background: #49b856;
  575. color: #fff;
  576. display: inline-block;
  577. font-size: 28rpx;
  578. margin-left: 16rpx;
  579. }
  580. .L_time {
  581. color: #6cc076;
  582. font-size: 32rpx;
  583. }
  584. .L_text {
  585. font-size: 32rpx;
  586. display: inline-block;
  587. font-weight: 700;
  588. }
  589. .L_iocn {
  590. display: inline-block;
  591. height: 52rpx;
  592. color: rgb(7, 134, 60);
  593. font-size: 28rpx;
  594. font-weight: 700;
  595. margin-left: 20rpx;
  596. }
  597. }
  598. .page_item_top_R {
  599. height: 60rpx;
  600. float: right;
  601. padding-top: 20rpx;
  602. font-size: 32rpx;
  603. position: absolute;
  604. right: 50rpx;
  605. line-height: 48rpx;
  606. .num {
  607. color: rgb(7, 134, 60);
  608. }
  609. .num1 {
  610. color: #ff3b53 !important;
  611. }
  612. }
  613. }
  614. .page_item_cont {
  615. min-height: 180rpx;
  616. padding: 0 16rpx;
  617. text-align: left;
  618. position: relative;
  619. .text_big {
  620. font-size: 32rpx;
  621. position: absolute;
  622. right: 16rpx;
  623. font-weight: 700;
  624. margin-top: 10rpx;
  625. }
  626. .text_big2 {
  627. font-size: 32rpx;
  628. position: absolute;
  629. right: 16rpx;
  630. font-weight: 700;
  631. }
  632. .line {
  633. height: 20rpx;
  634. width: 2rpx;
  635. border-left: 2rpx solid #e5e9ed;
  636. position: absolute;
  637. top: 82rpx;
  638. left: 40rpx;
  639. }
  640. .lines {
  641. height: 40%;
  642. width: 2rpx;
  643. border-left: 2rpx solid #e5e9ed;
  644. position: absolute;
  645. top: 23%;
  646. left: 36rpx;
  647. }
  648. .page_item_cont_T {
  649. padding-top: 28rpx;
  650. font-size: 28rpx;
  651. .page_item_cont_title {
  652. height: 100%;
  653. font-size: 32rpx;
  654. }
  655. }
  656. .page_item_cont_B {
  657. padding-top: 28rpx;
  658. margin-bottom: 28rpx;
  659. .page_item_cont_title {
  660. height: 60rpx;
  661. font-size: 32rpx;
  662. }
  663. .page_item_cont_title1 {
  664. height: 60rpx;
  665. line-height: 60rpx;
  666. font-size: 32rpx;
  667. padding-left: 64rpx;
  668. }
  669. }
  670. }
  671. .page_item_foot {
  672. border-top: 2rpx dashed #e5e9ed;
  673. padding: 28rpx 16rpx;
  674. text-align: left;
  675. .page_item_foot_text {
  676. height: 48rpx;
  677. font-size: 32rpx;
  678. line-height: 48rpx;
  679. margin-bottom: 20rpx;
  680. .text1 {
  681. color: rgb(102, 102, 102);
  682. }
  683. .text2 {
  684. float: right;
  685. font-weight: 700;
  686. }
  687. }
  688. }
  689. #infos {
  690. display: none;
  691. }
  692. .page_item_infos {
  693. padding-bottom: 20rpx;
  694. border-bottom: 2rpx dashed #e5e9ed;
  695. .page_item_info2 {
  696. text-align: left;
  697. line-height: 60rpx;
  698. font-size: 32rpx;
  699. padding-left: 16rpx;
  700. .page_item_foot_text {
  701. height: 48rpx;
  702. font-size: 32rpx;
  703. line-height: 48rpx;
  704. margin-bottom: 20rpx;
  705. .text1 {
  706. color: rgb(102, 102, 102);
  707. }
  708. .text2 {
  709. float: right;
  710. font-weight: 700;
  711. }
  712. }
  713. }
  714. }
  715. }
  716. }
  717. }
  718. }
  719. </style>