Pārlūkot izejas kodu

修改华侨医院bug

csx 5 gadus atpakaļ
vecāks
revīzija
26b0281b75

+ 2 - 2
config/dev.env.js Parādīt failu

@@ -4,7 +4,7 @@ const prodEnv = require('./prod.env')
4 4
 
5 5
 module.exports = merge(prodEnv, {
6 6
   NODE_ENV: '"development"',
7
-  BASE_API: '"http://localhost:9529"'
7
+  // BASE_API: '"http://api.xt.test.sgjyun.com"'
8 8
    //http://api.xt.test.sgjyun.com http://localhost:9529
9
-   // BASE_API: '"http://localhost:9529"'
9
+   BASE_API: '"http://localhost:9529"'
10 10
 })

+ 9 - 0
src/api/dialysis.js Parādīt failu

@@ -203,3 +203,12 @@ export function GetMonitor(params){
203 203
     params:params
204 204
   })
205 205
 }
206
+
207
+
208
+export function PostSearch(keyword) {
209
+  return request({
210
+    url: '/api/patients/search?keyword=' + keyword,
211
+    method: 'post'
212
+
213
+  })
214
+}

+ 0 - 2
src/pages/main/WaitingArea.vue Parādīt failu

@@ -195,7 +195,6 @@
195 195
         }
196 196
 
197 197
         if (this.select_index == 2) {
198
-          console.log('点击了第二个')
199 198
           var scheduals = []
200 199
           for (let index = 0; index < this.scheduals.length; index++) {
201 200
             const schedual = this.scheduals[index]
@@ -206,7 +205,6 @@
206 205
           return this.processScheduals(scheduals)
207 206
           // return scheduals;
208 207
         } else if (this.select_index == 1) {
209
-          console.log('点击了第三个')
210 208
           var scheduals = []
211 209
           for (let index = 0; index < this.scheduals.length; index++) {
212 210
             const schedual = this.scheduals[index]

+ 60 - 22
src/pages/main/add_urgent_schedule.vue Parādīt failu

@@ -25,16 +25,43 @@
25 25
             <div class="field_panel">
26 26
               <van-field v-model="date" class="field"></van-field>
27 27
             </div>
28
+
28 29
           </van-col>
30
+
31
+
29 32
         </van-row>
30 33
         <van-row class="row">
34
+
31 35
           <van-col :span="9">
32 36
             <span class="title">患者:</span>
33 37
             <div class="field_panel">
34
-              <van-field ref="patient_field" @focus="selectPatientAction" :value="patient_name" class="field"
35
-                         left-icon="arrow-down"></van-field>
38
+                <van-field ref="patient_field" @focus="selectPatientAction" :value="patient_name" class="field"
39
+                           left-icon="arrow-down"></van-field>
40
+            </div>
41
+          </van-col>
42
+
43
+          <van-col :span="9">
44
+
45
+            <div class="field_panel">
46
+              <el-autocomplete
47
+                style="float: right"
48
+                popper-class="my-autocomplete"
49
+                v-model="value"
50
+                :fetch-suggestions="querySearchAsync"
51
+                :trigger-on-focus="false"
52
+                placeholder="请输入病人名字"
53
+                @select="handleSelect"
54
+              >
55
+                <i class="el-icon-search el-input__icon" slot="suffix"> </i>
56
+                <template slot-scope="{ item }">
57
+                  <div class="name">{{ item.name }}</div>
58
+                </template>
59
+              </el-autocomplete>
36 60
             </div>
37 61
           </van-col>
62
+
63
+        </van-row>
64
+        <van-row class="row">
38 65
           <van-col :span="9">
39 66
             <span class="title">班次:</span>
40 67
             <div class="field_panel">
@@ -42,8 +69,7 @@
42 69
                          left-icon="arrow-down"></van-field>
43 70
             </div>
44 71
           </van-col>
45
-        </van-row>
46
-        <van-row class="row">
72
+
47 73
           <van-col :span="9">
48 74
             <span class="title">治疗模式:</span>
49 75
             <div class="field_panel">
@@ -88,7 +114,7 @@
88 114
 <script>
89 115
   import SideBar from '@/pages/layout/SideBar'
90 116
   import {parseTime} from '@/utils'
91
-  import {getUrgentScheduleInitData, postUrgentSchedule} from '@/api/dialysis'
117
+  import {getUrgentScheduleInitData, PostSearch, postUrgentSchedule} from '@/api/dialysis'
92 118
   import {Dialog, Toast} from 'vant'
93 119
 
94 120
   export default {
@@ -99,7 +125,7 @@
99 125
     data () {
100 126
       return {
101 127
         loading: false,
102
-
128
+        value: '',
103 129
         date: '2019-09-09',
104 130
         patient_id: 0,
105 131
         mode_id: 0,
@@ -196,10 +222,10 @@
196 222
           this.modes = rs.data.data.modes
197 223
           this.origin_device_numbers = rs.data.data.device_numbers
198 224
 
199
-          for (let i = this.origin_schedules.length-1; i >= 0 ; i--) {
200
-            for (let y = this.origin_device_numbers.length-1; y >=0 ; y--){
201
-              if(this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id){
202
-                this.origin_device_numbers.splice(y,1)
225
+          for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
226
+            for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
227
+              if (this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id) {
228
+                this.origin_device_numbers.splice(y, 1)
203 229
               }
204 230
             }
205 231
           }
@@ -242,14 +268,26 @@
242 268
       })
243 269
     },
244 270
     methods: {
245
-      // getDeviceNumberNames: function(device_numbers) {
246
-      //     var names = []
247
-      //     for (let index = 0; index < device_numbers.length; index++) {
248
-      //         const device_number = device_numbers[index];
249
-      //         names.push(device_number.number)
250
-      //     }
251
-      //     return names
252
-      // },
271
+      handleSelect (val) {
272
+        this.patient_name = val.name
273
+        this.patient_id = val.id
274
+      },
275
+      querySearchAsync (keyword, cb) {
276
+        let key = ''
277
+        if (keyword != undefined) {
278
+          key = keyword
279
+        }
280
+        let searchArray = []
281
+        PostSearch(key).then(response => {
282
+          if (response.data.state == 1) {
283
+            searchArray = response.data.data.patient
284
+            cb(searchArray)
285
+          } else {
286
+            this.$message.error(response.data.msg)
287
+            cb([])
288
+          }
289
+        })
290
+      },
253 291
 
254 292
       selectPatientAction: function () {
255 293
         this.$refs.patient_field.blur()
@@ -302,10 +340,10 @@
302 340
             this.modes = rs.data.data.modes
303 341
             this.origin_device_numbers = rs.data.data.device_numbers
304 342
 
305
-            for (let i = this.origin_schedules.length-1; i >= 0 ; i--) {
306
-              for (let y = this.origin_device_numbers.length-1; y >=0 ; y--){
307
-                if(this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id){
308
-                  this.origin_device_numbers.splice(y,1)
343
+            for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
344
+              for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
345
+                if (this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id) {
346
+                  this.origin_device_numbers.splice(y, 1)
309 347
                 }
310 348
               }
311 349
             }

+ 27 - 2
src/pages/main/dialog/ComputerDialog.vue Parādīt failu

@@ -24,6 +24,14 @@
24 24
             </div>
25 25
           </div>
26 26
 
27
+          <div class="item" @click="select_puncture_nurse">
28
+            <h2 class="name">穿刺者</h2>
29
+            <div class="content">
30
+              <span class="text" style="width: 100px">{{ admin_map[puncture_nurse_id].name}}</span>
31
+              <span class="iconfont">&#xe6f9;</span>
32
+            </div>
33
+          </div>
34
+
27 35
 
28 36
           <div class="item">
29 37
             <h2 class="name">上机时间</h2>
@@ -72,6 +80,8 @@ export default {
72 80
       start_time_str: "",
73 81
       bed_id: 0,
74 82
       nurse_id: 0,
83
+      puncture_nurse_id: 0,
84
+
75 85
       zone_beds: [], // 该排班的区里的床位
76 86
     }
77 87
   },
@@ -127,6 +137,11 @@ export default {
127 137
 
128 138
     this.bed_id = (this.record == null || this.record.id == '') ? this.schedule.bed_id : this.record.bed_id
129 139
     this.nurse_id = (this.record == null || this.record.id == '') ? this.$store.getters.user.user.id : this.record.start_nurse
140
+    this.puncture_nurse_id = (this.record == null || this.record.id == '') ? this.$store.getters.user.user.id : this.record.puncture_nurse
141
+
142
+    if(this.puncture_nurse_id == 0){
143
+      this.puncture_nurse_id =  this.$store.getters.user.user.id
144
+    }
130 145
 
131 146
     var beds = []
132 147
     for (let index = 0; index < this.device_numbers.length; index++) {
@@ -155,7 +170,7 @@ export default {
155 170
       ParamsQuery["nurse"] = this.nurse_id
156 171
       ParamsQuery["bed"] = this.bed_id
157 172
       ParamsQuery["start_time"] = this.start_time_str
158
-
173
+      ParamsQuery["puncture_nurse"] = this.puncture_nurse_id
159 174
 
160 175
       startDialysis(ParamsQuery).then(response => {
161 176
         if (response.data.state == 0) {
@@ -194,11 +209,21 @@ export default {
194 209
       this.selecting = true
195 210
       var t = this
196 211
       this.$refs.selector.showSingleSelect(this.admins, this.nurse_id, "选择上机护士", "name", "id", function(select_id) {
197
-        console.log("nurse id: ", select_id)
198 212
         t.nurse_id = select_id
199 213
       }, function() {
200 214
         t.selecting = false
201 215
       })
216
+    },select_puncture_nurse:function(){
217
+      if (this.record.id != 0) {
218
+        return
219
+      }
220
+      this.selecting = true
221
+      var t = this
222
+      this.$refs.selector.showSingleSelect(this.admins, this.puncture_nurse_id, "选择穿刺护士", "name", "id", function(select_id) {
223
+        t.puncture_nurse_id = select_id
224
+      }, function() {
225
+        t.selecting = false
226
+      })
202 227
     },
203 228
     open:function(){
204 229
       this.selecting = false;

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 685 - 673
src/pages/main/template/DialysisPrintOrderTwo.vue


+ 12 - 1
src/pages/main/today/dialysisComputer.vue Parādīt failu

@@ -13,6 +13,11 @@
13 13
           <span class="content">{{nurse}}</span>
14 14
         </li>
15 15
 
16
+        <li>
17
+          <label>穿刺者 : </label>
18
+          <span class="content">{{puncture_nurse}}</span>
19
+        </li>
20
+
16 21
         <li>
17 22
           <label>上机时间 : </label>
18 23
           <span class="content" style="font-size: 15px">{{start_time}}</span>
@@ -76,7 +81,13 @@
76 81
         }
77 82
         return parseTime(this.record.start_time, '{y}年{m}月{d}日 {h}时{i}分')
78 83
 
79
-      },
84
+      },puncture_nurse:function () {
85
+        if (this.record == null || this.record.id == '') {
86
+          return '-'
87
+        }
88
+        return this.admin_map[this.record.puncture_nurse] == null ? '' : this.admin_map[this.record.puncture_nurse].name
89
+
90
+      }
80 91
     },
81 92
     methods: {}
82 93
   }