stationaryPatient.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <template>
  2. <view class="incidentList">
  3. <view class="head">
  4. <mSearch class="search" :mode="2" button="inside" placeholder="请输入关键字" @input="changeInp" @search="doSearch()" v-model="keyword" searchButtonType="icon" searchButtonName="newicon-saoma"></mSearch>
  5. </view>
  6. <view class="body" v-if="dataInfo.list.length">
  7. <view class="body_item" v-for="data in dataInfo.list" :key="data.id" @click="toDetail(data)">
  8. <view class="body_item_head">
  9. <text>
  10. <text class="sign signRed">{{ data.careLevel ? data.careLevel.name : '' }}<template v-if="data.careLevel && data.illnessState">、</template>{{ data.illnessState ? data.illnessState.name : '' }}</text> {{ data.patientName }}<text v-if="data.bedNum">({{ data.bedNum }})</text>
  11. </text>
  12. <text>{{ data.state ? data.state.name : '' }}</text>
  13. </view>
  14. <view class="body_item_content">
  15. <view class="body_item_content_p">
  16. <text class="name ellipsis">住院号:{{data.patientCode}}</text>
  17. <text>{{(data.patientDTO && data.patientDTO.gender) ? data.patientDTO.gender.name : ''}}<text v-if="data.age !== undefined" class="ml24">{{data.age}}<text v-if="data.age !== undefined">岁</text></text></text>
  18. </view>
  19. <view class="body_item_content_p">
  20. <text class="name ellipsis">患者科室:{{ data.deptDTO ? data.deptDTO.dept : '' }}</text>
  21. <text>{{data.tripTypeDTO ? data.tripTypeDTO.inspectMode : ''}}</text>
  22. </view>
  23. <view class="body_item_content_p">
  24. <text class="name ellipsis">签到信息:{{data.signDeptDTO ? data.signDeptDTO.dept : ''}}</text>
  25. <text>{{data.signTime | formatDate('MM-dd hh:mm')}}</text>
  26. </view>
  27. </view>
  28. <view class="body_item_foot" v-if="stationaryTransfer || stationaryReturn">
  29. <view class="btns pt0">
  30. <button @click.stop="stationaryTransferFun(data)" type="default" class="primaryButton btn" v-if="stationaryTransfer && data.reAssign == 1">转派</button>
  31. <button @click.stop="stationaryReturnFun(data)" type="default" class="primaryButton btn" v-if="stationaryReturn">发起回科</button>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="zanwu" v-else>
  37. <text class="newicon newicon-zanwu"></text>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. import { get, post, SM, deleteIt, webHandle } from "../../http/http.js";
  43. import debounce from 'lodash-es/debounce';
  44. import mSearch from "@/components/mehaotian-search-revision/mehaotian-search-revision.vue";
  45. export default {
  46. onShow() {
  47. this.SMFlag = true;
  48. },
  49. components: {
  50. //引用mSearch组件,如不需要删除即可
  51. mSearch,
  52. },
  53. data(){
  54. return {
  55. stationaryTransfer: false,//转派
  56. stationaryReturn: false,//发起回科
  57. options: {},
  58. keyword: '',
  59. SMFlag: true,
  60. loginUser: uni.getStorageSync('userData').user,
  61. menuList: uni.getStorageSync('userData').menu,
  62. hosId: uni.getStorageSync('userData').user.currentHospital.id,
  63. dataInfo: {
  64. list: [],//工单列表
  65. idx: 0,//页码
  66. hasMore: true,//是否有更多数据
  67. }
  68. }
  69. },
  70. methods: {
  71. handleSearch: debounce(function(keyword) {
  72. this.getList(0);
  73. }, 500),
  74. //防抖搜索
  75. changeInp(event) {
  76. this.inputChange(event);
  77. },
  78. //监听输入
  79. inputChange(event) {
  80. let keyword = event.detail ? event.detail.value : event;
  81. this.handleSearch(keyword);
  82. },
  83. doSearch(){
  84. // 扫码
  85. if (!this.SMFlag) {
  86. return;
  87. }
  88. this.SMFlag = false;
  89. SM().then((content) => {
  90. this.keyword = content;
  91. this.getList(0);
  92. }).catch(err => {
  93. this.SMFlag = true;
  94. });
  95. },
  96. // 初始化
  97. onLoadFn(){
  98. this.getList(0);
  99. },
  100. // 获取列表信息
  101. getList(idx){
  102. uni.showLoading({
  103. title: "加载中",
  104. mask: true,
  105. });
  106. this.dataInfo.idx = idx === undefined ? this.dataInfo.idx : idx;
  107. if(this.dataInfo.idx === 0){
  108. this.dataInfo.list = [];
  109. }
  110. let postData = {
  111. "idx": this.dataInfo.idx,
  112. "sum": 20,
  113. "patientInspectLog": {
  114. "hosId": this.hosId,
  115. "cascadeSignDept": +this.options.dutyDeptId,
  116. "patientKey": this.keyword || undefined,
  117. "reAssign": 1, //是否可以转派
  118. }
  119. }
  120. post("/simple/data/fetchDataList/patientInspectLog", postData).then(res => {
  121. uni.hideLoading();
  122. uni.stopPullDownRefresh();
  123. if(res.status == 200){
  124. let list = res.list || [];
  125. if(list.length){
  126. this.dataInfo.hasMore = true;
  127. this.dataInfo.list = this.dataInfo.idx === 0 ? list : this.dataInfo.list.concat(list);
  128. }else{
  129. this.dataInfo.hasMore = false;
  130. }
  131. }else{
  132. uni.showToast({
  133. icon: 'none',
  134. title: res.msg || '请求数据失败!'
  135. });
  136. }
  137. })
  138. },
  139. // 详情
  140. toDetail(data){
  141. uni.navigateTo({
  142. url: `/pages/patientInspectLog/patientInspectLogDetail?patientInspectLogId=${data.id}`
  143. })
  144. },
  145. // 转派
  146. stationaryTransferFun(data){
  147. uni.navigateTo({
  148. url: `/pages/transferWorkOrder/transferWorkOrderUser?selectPatientId=${data.patientId}`,
  149. });
  150. },
  151. // 发起回科
  152. stationaryReturnFun(data){
  153. uni.navigateTo({
  154. url: `/pages/newSendBack/sendBackPatient/sendBackPatient?patientId=${data.patientId}&patientName=${data.patientName}&patientResidenceNo=${data.patientDTO ? data.patientDTO.residenceNo : ''}&patientCode=${data.patientCode}`,
  155. });
  156. },
  157. },
  158. onLoad(options){
  159. console.log('options', options)
  160. this.options = options || {};
  161. this.stationaryTransfer = this.menuList.some(v => v.link == 'stationaryTransfer');
  162. this.stationaryReturn = this.menuList.some(v => v.link == 'stationaryReturn');
  163. this.onLoadFn();
  164. },
  165. onTabItemTap(){
  166. this.onLoadFn();
  167. },
  168. onPullDownRefresh(){
  169. this.getList(0);
  170. },
  171. onReachBottom(){
  172. this.dataInfo.idx += 1;
  173. if (this.dataInfo.hasMore) {
  174. this.getList(); // 当触底时加载更多数据
  175. }
  176. },
  177. };
  178. </script>
  179. <style lang="scss" scoped>
  180. .search{
  181. padding: 10rpx 24rpx;
  182. }
  183. .toolbar {
  184. position: fixed;
  185. left: 0;
  186. bottom: var(--window-bottom);
  187. z-index: 99;
  188. width: 100%;
  189. height: 88rpx;
  190. display: flex;
  191. justify-content: center;
  192. align-items: center;
  193. box-sizing: border-box;
  194. border-radius: 4rpx;
  195. background-color: #E5E8ED;
  196. .toolbar-icon {
  197. font-size: 52rpx;
  198. margin-right: 16rpx;
  199. color: #49B856;
  200. }
  201. .toolbar-sao {
  202. font-size: 36rpx;
  203. color: #333;
  204. }
  205. }
  206. page{
  207. height: calc(100vh - var(--window-bottom));
  208. }
  209. .incidentList{
  210. display: flex;
  211. flex-direction: column;
  212. justify-content: space-between;
  213. .head{
  214. height: 88rpx;
  215. display: flex;
  216. align-items: center;
  217. position: fixed;
  218. z-index: 99;
  219. width: 100%;
  220. background-color: #fff;
  221. font-size: 30rpx;
  222. .tab{
  223. flex: 1;
  224. display: flex;
  225. justify-content: center;
  226. align-items: center;
  227. border-bottom: 4rpx solid transparent;
  228. &.active{
  229. color: #49b856;
  230. border-color: #49b856;
  231. }
  232. }
  233. .filter{
  234. width: 84rpx;
  235. display: flex;
  236. justify-content: center;
  237. align-items: center;
  238. .newicon-shaixuan{
  239. font-size: 36rpx;
  240. color: #2C2C2C;
  241. }
  242. }
  243. }
  244. .body{
  245. margin-bottom: calc(var(--window-bottom) + 88rpx);
  246. margin-top: 88rpx;
  247. border-top: 6rpx solid #EBEBEB;
  248. .body_item{
  249. border-bottom: 8rpx solid #EBEBEB;
  250. .body_item_head{
  251. word-break: break-all;
  252. text-align: justify;
  253. text-align: left;
  254. margin: 24rpx;
  255. font-size: 30rpx;
  256. display: flex;
  257. align-items: center;
  258. justify-content: space-between;
  259. .sign{
  260. margin-right: 16rpx;
  261. color: #49B856;
  262. &.signRed{
  263. color: #FF0000;
  264. }
  265. }
  266. }
  267. .body_item_content{
  268. border-top: 1rpx solid #D8D8D8;
  269. padding: 24rpx;
  270. .body_item_content_p{
  271. color: #6A6A6A;
  272. font-size: 26rpx;
  273. display: flex;
  274. justify-content: space-between;
  275. align-items: center;
  276. margin-bottom: 24rpx;
  277. &:last-of-type{
  278. margin-bottom: 0;
  279. }
  280. .name{
  281. flex: 1;
  282. }
  283. .status{
  284. padding: 4rpx 10rpx;
  285. border-radius: 20rpx;
  286. background-color: #DBE8FE;
  287. font-size: 22rpx;
  288. color: #006CF9;
  289. }
  290. .icon_all{
  291. .mic-filled,
  292. .image-filled
  293. {
  294. margin-left: 16rpx;
  295. }
  296. }
  297. }
  298. }
  299. .body_item_foot{
  300. border-top: 1rpx solid #D8D8D8;
  301. font-size: 26rpx;
  302. padding: 24rpx;
  303. .foot_info{
  304. display: flex;
  305. justify-content: space-between;
  306. align-items: center;
  307. .phone-filled{
  308. margin-left: 5rpx;
  309. }
  310. }
  311. .btns{
  312. display: flex;
  313. button{
  314. flex: 1;
  315. margin-right: 24rpx;
  316. &:last-of-type{
  317. margin-right: 0;
  318. }
  319. }
  320. }
  321. }
  322. }
  323. }
  324. .zanwu{
  325. box-sizing: border-box;
  326. margin-bottom: calc(var(--window-bottom) + 88rpx);
  327. margin-top: 88rpx;
  328. border-top: 6rpx solid #EBEBEB;
  329. height: calc(100vh - var(--window-bottom) - 176rpx);
  330. display: flex;
  331. justify-content: center;
  332. background-color: #F7F7F7;
  333. .newicon-zanwu{
  334. font-size: 256rpx;
  335. color: #D6D6D6;
  336. margin-top: 140rpx;
  337. }
  338. }
  339. }
  340. </style>