浏览代码

陪检优化

seimin 4 天之前
父节点
当前提交
081eceadea

+ 8 - 1
components/showDepartmentQrcode/showDepartmentQrcode.vue

@@ -8,6 +8,7 @@
8 8
         <view class="showModel__content" v-if="userData.user.dutyDeptDTO">
9 9
           <image :src="qrCode" mode="widthFix" style="width: 100%;"></image>
10 10
           <view class="page_item_btn" @click="bindDept()"> 切换科室 </view>
11
+          <view class="page_item_btn mt8" @click="toStationaryPatient()"> 驻点患者 </view>
11 12
         </view>
12 13
         <view class="showModel__content" v-else>
13 14
           <view class="page_item_btn" @click="bindDept()"> 绑定科室 </view>
@@ -55,6 +56,12 @@
55 56
           url: `../search/search?type=showDepartmentQrcode`,
56 57
         });
57 58
       },
59
+      // 驻点患者
60
+      toStationaryPatient(){
61
+        uni.navigateTo({
62
+          url: `/pages/stationaryPatient/stationaryPatient?dutyDeptId=${this.userData.user.dutyDeptDTO.id}`,
63
+        });
64
+      },
58 65
       // 获取我的二维码
59 66
       getQrCode(){
60 67
         uni.showLoading({
@@ -90,7 +97,7 @@
90 97
       console.log(this.userData.user, 'userData');
91 98
       // 有责任科室则查询动态二维码
92 99
       this.userData.user.dutyDeptDTO && this.getQrCode();
93
-    }
100
+    },
94 101
   };
95 102
 </script>
96 103
 

+ 10 - 1
pages.json

@@ -809,7 +809,16 @@
809 809
 		      "titleNView": false
810 810
 		    }
811 811
 		  }
812
-		}
812
+		},
813
+    {
814
+      "path": "pages/stationaryPatient/stationaryPatient", // 驻点患者-列表
815
+      "style": {
816
+        "h5": {
817
+          "titleNView": false
818
+        },
819
+        "enablePullDownRefresh": true
820
+      }
821
+    }
813 822
   ],
814 823
   "globalStyle": {
815 824
     "navigationBarTextStyle": "black",

+ 347 - 0
pages/stationaryPatient/stationaryPatient.vue

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

+ 24 - 4
pages/transferWorkOrder/transferWorkOrderPatient.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <view class="transferWorkOrder">
3
-    <mSearch class="search" :mode="2" button="inside" placeholder="请搜索患者名称、住院号" v-model="keyword"></mSearch>
3
+    <mSearch class="search" :mode="2" button="inside" placeholder="请搜索患者名称、住院号" @search="doSearch()" v-model="keyword" searchButtonType="icon" searchButtonName="newicon-saoma"></mSearch>
4 4
     <scroll-view scroll-y class="list">
5 5
       <view class="item tac"><text class="green">接收人:</text>{{userDTO.name}}({{userDTO.account}})</view>
6 6
       <view class="item" v-for="item in listComputed" :key="item.id" @click="selectItem(item)">
@@ -23,11 +23,14 @@
23 23
   import { get, post, SM, webHandle } from "../../http/http.js";
24 24
   import mSearch from "@/components/mehaotian-search-revision/mehaotian-search-revision.vue";
25 25
   export default {
26
+    onShow() {
27
+      this.SMFlag = true;
28
+    },
26 29
     onLoad(options) {
27 30
       console.log('options', options);
28 31
       this.options = options || {};
29 32
       this.userDTO = { id: +this.options.userId, name: this.options.userName, account: this.options.userAccount };
30
-      this.getList();
33
+      this.getList(undefined, true);
31 34
     },
32 35
     components: {
33 36
       //引用mSearch组件,如不需要删除即可
@@ -35,6 +38,7 @@
35 38
     },
36 39
     data() {
37 40
       return {
41
+        SMFlag: true,
38 42
         keyword: '',
39 43
         hosId: uni.getStorageSync('userData').user.currentHospital.id,
40 44
         list: [],
@@ -56,6 +60,18 @@
56 60
       }
57 61
     },
58 62
     methods:{
63
+      doSearch(){
64
+        // 扫码
65
+        if (!this.SMFlag) {
66
+          return;
67
+        }
68
+        this.SMFlag = false;
69
+        SM().then((content) => {
70
+          this.keyword = content;
71
+        }).catch(err => {
72
+          this.SMFlag = true;
73
+        });
74
+      },
59 75
       submit(){
60 76
         let patientList = this.listComputed.filter(v => v.checked);
61 77
         if(!patientList.length){
@@ -122,14 +138,18 @@
122 138
           }
123 139
         })
124 140
       },
125
-      getList(keyword){
141
+      getList(keyword, isInit = false){
126 142
         uni.showLoading({
127 143
           title: "加载中",
128 144
         });
129 145
         post("/nurse/patientInspect/getUserOrderPatient", {}).then((result) => {
130 146
           uni.hideLoading();
131 147
           if (result.status == 200) {
132
-            this.list = result.list || [];
148
+            let list = result.list || [];
149
+            if(isInit && this.options.selectPatientList == 1){
150
+              list.forEach(v => (v.checked = true))
151
+            }
152
+            this.list = list;
133 153
           } else {
134 154
             uni.showToast({
135 155
               icon: "none",

+ 4 - 2
pages/transferWorkOrder/transferWorkOrderUser.vue

@@ -17,6 +17,7 @@
17 17
   export default {
18 18
     onLoad(options) {
19 19
       console.log('options', options);
20
+      this.options = options || {};
20 21
       this.getList();
21 22
     },
22 23
     onShow() {
@@ -28,6 +29,7 @@
28 29
     },
29 30
     data() {
30 31
       return {
32
+        options: {},
31 33
         keyword: '',
32 34
         hosId: uni.getStorageSync('userData').user.currentHospital.id,
33 35
         list: [],
@@ -83,7 +85,7 @@
83 85
             if (result.state == 200 || result.state == 201) {
84 86
               if(Object.prototype.toString.call(userHandoverCode) === '[object Object]' && userHandoverCode.name){
85 87
                 uni.redirectTo({
86
-                  url: `/pages/transferWorkOrder/transferWorkOrderPatient?userId=${userHandoverCode.id}&userName=${userHandoverCode.name}&userAccount=${userHandoverCode.account}`,
88
+                  url: `/pages/transferWorkOrder/transferWorkOrderPatient?userId=${userHandoverCode.id}&userName=${userHandoverCode.name}&userAccount=${userHandoverCode.account}&selectPatientList=${this.options.selectPatientList}`,
87 89
                 });
88 90
               }else{
89 91
                 uni.showToast({
@@ -110,7 +112,7 @@
110 112
         // uni.setStorageSync('transferWorkOrderUserList', userList);
111 113
         
112 114
         uni.redirectTo({
113
-          url: `/pages/transferWorkOrder/transferWorkOrderPatient?userId=${user.id}&userName=${user.name}&userAccount=${user.account}`,
115
+          url: `/pages/transferWorkOrder/transferWorkOrderPatient?userId=${user.id}&userName=${user.name}&userAccount=${user.account}&selectPatientList=${this.options.selectPatientList}`,
114 116
         });
115 117
       },
116 118
       handleSearch: debounce(function(keyword) {