zhengchengwu 6 years ago
parent
commit
80732174d5

+ 12 - 5
src/xt_pages/dialysis/batch_print/batch_print_order.vue View File

@@ -1,10 +1,10 @@
1 1
 <template>
2
+ <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <el-button size="small" icon="el-icon-printer"  @click="printAction" type="primary">打印</el-button>
6
+    </div>
2 7
     <div class="app-container">
3
-        <el-row style="padding-bottom: 15px;">
4
-            <el-col :span="24">
5
-                <el-button type="primary" @click="printAction">打印</el-button>
6
-            </el-col>
7
-        </el-row>
8 8
         <div id="print_content">
9 9
             <div v-for="(record, index) in records" :key="index" class="print_page_main_content">
10 10
                 <div class="order-yy-name">{{orgname}}</div>
@@ -526,6 +526,7 @@
526 526
             </div>
527 527
         </div>
528 528
     </div>
529
+  </div>
529 530
 </template>
530 531
 
531 532
 <script>
@@ -534,14 +535,20 @@ import print from "print-js"
534 535
 import { GetBatchPrintDialysisData } from "@/api/print_data"
535 536
 import {jsGetAge, uParseTime} from "@/utils/tools";
536 537
 import {getDataConfig} from '@/utils/data';
538
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
537 539
 
538 540
 export default {
539 541
     name: "BatchPrintOrder",
540 542
     components: {
541 543
         CheckBox,
544
+        BreadCrumb
542 545
     },
543 546
     data() {
544 547
         return {
548
+            crumbs:[
549
+                {path:false, name:'透析管理'},
550
+                {path:false, name:'批量打印'},
551
+            ],
545 552
             records: [ // 模拟有多条数据
546 553
                 // { 
547 554
                 //     monitor_records: [ {},{},{},{},{},{},{},{},{},{},{}, ],

+ 422 - 404
src/xt_pages/dialysis/bloodPresssWatch.vue View File

@@ -1,440 +1,458 @@
1 1
 <template>
2
-<div class="main-contain">
3
-  <div class="position">
4
-    <bread-crumb :crumbs='crumbs'></bread-crumb>
5
-
6
-  </div>
7
-  <div class="app-container">
8
-    <div class="cell clearfix">
9
-      <label class="title"><span class="name">{{ search_mode == 1 ? "日期查询" : "病人查询" }}</span> : </label>
10
-      <el-date-picker v-show="search_mode == 1" v-model="time" prefix-icon="el-icon-date" @change="changeTime" :editable="false"
11
-                      style="width: 250px;" type="date" placeholder="选择日期时间" align="right"
12
-                      format="yyyy-MM-dd" size="small" value-format="timestamp"></el-date-picker>
13
-      <el-input v-show="search_mode == 2" v-model="patient_search_keyword" style="width: 250px;" placeholder="病人名字、透析号">
14
-        <el-button size="small" slot="append" style="background-color: #409EFF; color: white; border-radius: 0;" icon="el-icon-search" @click="searchPatientAction"></el-button>
15
-      </el-input>
16
-      <el-button size="small" type="primary" @click="changeSearchMode">{{ search_mode == 1 ? "改为病人查询" : "改为日期查询" }}</el-button>
2
+ <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <el-button size="small" icon="el-icon-printer" :disabled="selecting_schs.length == 0" @click="batchPrintAction" type="primary">打印</el-button>
17 6
     </div>
18
-    <div class="cell clearfix">
19
-      <label class="title"><span class="name">排班班次</span> : </label>
20
-      <div class="time ">
21
-        <ul class="">
22
-          <li :class="item.value==schedulType?'active':''" @click='selectSchedulType(item.value)'
23
-              v-for="item in schedulArr" :key="item.value">{{item.label}}
24
-          </li>
25
-        </ul>
7
+    <div class="app-container">
8
+      <!-- <div class="filter-container">
9
+        <el-input style="width: 400px;" v-model="searchKey" class="filter-item"/>
10
+        <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
11
+      </div>-->
12
+      <div class="cell clearfix">
13
+        <label class="title">
14
+          <span class="name">{{ search_mode == 1 ? "日期查询" : "病人查询" }}</span> :
15
+        </label>
16
+        <el-date-picker
17
+          v-show="search_mode == 1"
18
+          v-model="time"
19
+          prefix-icon="el-icon-date"
20
+          @change="changeTime"
21
+          :editable="false"
22
+          style="width: 250px;"
23
+          type="date"
24
+          placeholder="选择日期时间"
25
+          align="right"
26
+          :picker-options="pickerOptions1"
27
+          format="yyyy-MM-dd"
28
+          value-format="timestamp"
29
+        ></el-date-picker>
30
+        <el-input
31
+          v-show="search_mode == 2"
32
+          v-model="patient_search_keyword"
33
+          style="width: 250px;"
34
+          placeholder="病人名字、透析号"
35
+        >
36
+          <el-button
37
+            slot="append"
38
+            style="background-color: #409EFF; color: white; border-radius: 0;"
39
+            icon="el-icon-search"
40
+            @click="searchPatientAction"
41
+          ></el-button>
42
+        </el-input>
43
+        <el-button
44
+          type="primary"
45
+          @click="changeSearchMode"
46
+        >{{ search_mode == 1 ? "改为病人查询" : "改为日期查询" }}</el-button>
47
+
48
+        <!-- <el-button type="primary" :disabled="selecting_schs.length == 0" @click="batchPrintAction">打印</el-button> -->
26 49
       </div>
27
-    </div>
28
-    <div class="cell clearfix">
29
-      <label class="title"><span class="name">分区</span> : </label>
30
-      <div class="time ">
31
-        <ul class="">
32
-          <li :class="item.id==partitionType?'active':''" @click='selectPartitionType(item.id)'
33
-              v-for="item in partitionArr" :key="item.id">{{item.name}}
34
-          </li>
35
-        </ul>
50
+      <div class="cell clearfix">
51
+        <label class="title">
52
+          <span class="name">排班班次</span> :
53
+        </label>
54
+        <div class="time">
55
+          <ul class>
56
+            <li
57
+              :class="item.value==schedulType?'active':''"
58
+              @click="selectSchedulType(item.value)"
59
+              v-for="item in schedulArr"
60
+              :key="item.value"
61
+            >{{item.label}}</li>
62
+          </ul>
63
+        </div>
64
+      </div>
65
+      <div class="cell clearfix">
66
+        <label class="title">
67
+          <span class="name">分区</span> :
68
+        </label>
69
+        <div class="time">
70
+          <ul class>
71
+            <li
72
+              :class="item.id==partitionType?'active':''"
73
+              @click="selectPartitionType(item.id)"
74
+              v-for="item in partitionArr"
75
+              :key="item.id"
76
+            >{{item.name}}</li>
77
+          </ul>
78
+        </div>
36 79
       </div>
37
-    </div>
38
-
39
-
40
-    <el-table
41
-      :data="SchedualPatientsTableData"
42
-      style="width: 100%"
43
-      v-loading="loading"
44
-      @current-change="clickCurrent"
45
-      :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
46
-      >
47
-      <el-table-column
48
-        prop="number"
49
-        label="机号"
50
-        align="center"
51
-       >
52
-      </el-table-column>
53
-      <el-table-column
54
-        label="排班日期"
55
-        prop="sch_time"
56
-        align="center"
57
-        width="120"
58
-      >
59
-      </el-table-column>
60
-      <el-table-column
61
-        prop="dialysis_no"
62
-        label="透析号"
63
-        align="center"
64
-
65
-     >
66
-      </el-table-column>
67
-      <el-table-column
68
-        prop="name"
69
-        label="姓名"
70
-        align="center"
71
-
72
-        >
73
-      </el-table-column>
74
-
75
-      <el-table-column
76
-        prop="mode_name"
77
-        label="透析模式"
78
-        align="center"
79
-
80
-        >
81
-      </el-table-column>
82
-
83
-      <el-table-column
84
-        prop="dialysis_before_weight"
85
-        label="透前体重 (kg)"
86
-        align="center"
87
-
88
-       >
89
-      </el-table-column>
90
-      <el-table-column
91
-        prop="dialysis_after_weight"
92
-        label="透后体重 (kg)"
93
-        align="center"
94 80
 
81
+      <el-table
82
+        :data="SchedualPatientsTableData"
83
+        style="width: 100%"
84
+        v-loading="loading"
85
+        @current-change="clickCurrent"
86
+        @selection-change="handleSelectionChange"
95 87
       >
96
-      </el-table-column>
97
-      <el-table-column label="透中血压">
98
-
99
-        <el-table-column v-for="(item, index) in labelArr" :key="index" :label="item" >
100
-          <!-- 数据的遍历  scope.row就代表数据的每一个对象-->
101
-          <template slot-scope="scope">
102
-            <!--<span>{{scope.row.bp[index].value}}</span>-->
103
-            <span>{{getValue(scope.row.bp[index])}}</span>
104
-
105
-          </template>
88
+        <el-table-column type="selection" width="45" align="center"></el-table-column>
89
+        <el-table-column prop="number" label="机号" align="center"></el-table-column>
90
+        <el-table-column label="排班日期" prop="sch_time" align="center" width="120"></el-table-column>
91
+        <el-table-column prop="dialysis_no" label="透析号" align="center"></el-table-column>
92
+        <el-table-column prop="name" label="姓名" align="center"></el-table-column>
93
+
94
+        <el-table-column prop="mode_name" label="透析模式" align="center"></el-table-column>
95
+
96
+        <el-table-column prop="dialysis_before_weight" label="透前体重 (kg)" align="center"></el-table-column>
97
+        <el-table-column prop="dialysis_after_weight" label="透后体重 (kg)" align="center"></el-table-column>
98
+        <el-table-column label="透中血压">
99
+          <el-table-column v-for="(item, index) in labelArr" :key="index" :label="item">
100
+            <!-- 数据的遍历  scope.row就代表数据的每一个对象-->
101
+            <template slot-scope="scope">
102
+              <!--<span>{{scope.row.bp[index].value}}</span>-->
103
+              <span>{{getValue(scope.row.bp[index])}}</span>
104
+            </template>
105
+          </el-table-column>
106 106
         </el-table-column>
107
+      </el-table>
107 108
 
108
-      </el-table-column>
109
-
110
-    </el-table>
111
-
112
-
113
-    <el-pagination
114
-      @current-change="handleCurrentChange"
115
-      :page-sizes="[10]"
116
-      :page-size="10"
117
-      background
109
+      <el-pagination
118 110
       align="right"
119
-      style="margin-top:20px;"
120
-      layout="total, sizes, prev, pager, next, jumper"
121
-      :total="total">
122
-    </el-pagination>
123
-
124
-
125
-  </div>
111
+        @current-change="handleCurrentChange"
112
+        :page-sizes="[10]"
113
+        :page-size="10"
114
+        background
115
+        style="margin-top:20px;"
116
+        layout="total, sizes, prev, pager, next, jumper"
117
+        :total="total"
118
+      ></el-pagination>
119
+    </div>
126 120
   </div>
127
-
128 121
 </template>
129 122
 
130 123
 
131 124
 <script>
132
-  import {
133
-    getSchedualPatient,
134
-    GetAllZone,
135
-  } from "@/api/dialysis"
136
-  import { parseTime } from '@/utils'
137
-  import BreadCrumb from "@/xt_pages/components/bread-crumb";
138
-
139
-  export default {
140
-    name: "Patient",
141
-    data() {
142
-      return {
143
-        crumbs: [
144
-          { path: false, name: '透析管理' },
145
-          { path: '/dialysis/watch', name: '透析监测' },
146
-        ],
147
-        loading: false,
148
-        time: '',
149
-
150
-        search_mode: 1, // 搜索模式 1.日期搜索 2.病人搜索
151
-        patient_search_keyword: "",
152
-
153
-        // checkAll: false,
154
-        // isIndeterminate: true,
155
-        // wechatbindimg: "",
156
-        SchedualPatientsTableData:[],
157
-        active: true,
158
-        schedulType: 0,
159
-        schedulArr: [
160
-          {value: 0, label: "全部"},
161
-          {value: 1, label: "上午"},
162
-          {value: 2, label: "下午"},
163
-          {value: 3, label: "晚上"}
164
-        ],
165
-
166
-        partitionType: 0,
167
-        // sourceType: 0,
168
-        // sourceID: 0,
169
-        // lapsetoType: 0,
170
-        // sourceArr: [
171
-        //   {value: 0, label: "全部", source: 0, lapseto: 0},
172
-        //   {value: 1, label: "门诊", source: 0, lapseto: 0},
173
-        //   {value: 2, label: "住院", source: 0, lapseto: 0}
174
-        // ],
175
-
176
-        // warnArr: [
177
-        //   {value: 0, label: "全部", source: 0, lapseto: 0},
178
-        //   {value: 1, label: "正常", source: 0, lapseto: 0},
179
-        //   {value: 2, label: "异常", source: 0, lapseto: 0}
180
-        // ],
181
-
182
-        labelArr: ['第1次','第2次','第3次','第4次','第5次','第6次','第7次'],
125
+import { getSchedualPatient, GetAllZone } from "@/api/dialysis";
126
+import { parseTime } from "@/utils";
127
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
128
+
129
+export default {
130
+  name: "Patient",
131
+  data() {
132
+    return {
133
+      crumbs:[
134
+        {path:false, name:'透析管理'},
135
+        {path:false, name:'透析监测'},
136
+      ],
137
+      loading: false,
138
+      time: "",
139
+
140
+      search_mode: 1, // 搜索模式 1.日期搜索 2.病人搜索
141
+      patient_search_keyword: "",
142
+
143
+      SchedualPatientsTableData: [],
144
+      active: true,
145
+      schedulType: 0,
146
+      schedulArr: [
147
+        { value: 0, label: "全部" },
148
+        { value: 1, label: "上午" },
149
+        { value: 2, label: "下午" },
150
+        { value: 3, label: "晚上" }
151
+      ],
152
+
153
+      partitionType: 0,
154
+
155
+      labelArr: ["第1次", "第2次", "第3次", "第4次", "第5次", "第6次", "第7次"],
156
+
157
+      pickerOptions1: {
158
+        shortcuts: [
159
+          {
160
+            text: "今天",
161
+            onClick(picker) {
162
+              picker.$emit("pick", new Date());
163
+            }
164
+          },
165
+          {
166
+            text: "昨天",
167
+            onClick(picker) {
168
+              const date = new Date();
169
+              date.setTime(date.getTime() - 3600 * 1000 * 24);
170
+              picker.$emit("pick", date);
171
+            }
172
+          },
173
+          {
174
+            text: "一周前",
175
+            onClick(picker) {
176
+              const date = new Date();
177
+              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
178
+              picker.$emit("pick", date);
179
+            }
180
+          },
181
+          {
182
+            text: "清空",
183
+            onClick(picker) {
184
+              picker.$emit("pick");
185
+            }
186
+          }
187
+        ]
188
+      },
183 189
 
184
-        // tableData: null,
185
-        // pickerOptions1: {
186
-        //   shortcuts: [
187
-        //     {
188
-        //       text: "今天",
189
-        //       onClick(picker) {
190
-        //         picker.$emit("pick", new Date());
191
-        //       }
192
-        //     },
193
-        //     {
194
-        //       text: "昨天",
195
-        //       onClick(picker) {
196
-        //         const date = new Date();
197
-        //         date.setTime(date.getTime() - 3600 * 1000 * 24);
198
-        //         picker.$emit("pick", date);
199
-        //       }
200
-        //     },
201
-        //     {
202
-        //       text: "一周前",
203
-        //       onClick(picker) {
204
-        //         const date = new Date();
205
-        //         date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
206
-        //         picker.$emit("pick", date);
207
-        //       }
208
-        //     },
209
-        //     {
210
-        //       text: "清空",
211
-        //       onClick(picker) {
212
-        //         picker.$emit("pick");
213
-        //       }
214
-        //     }
215
-        //   ]
216
-        // },
217
-        // searchKey: "",
218
-        total: 0,
219
-        listQuery: {
220
-          page: 1,
221
-          limit: 10,
222
-          schedul_type: 0,
223
-          partition_type: 0,
224
-          schedul_time: "",
225
-          keywords: "",
226
-        },
227
-        multipleSelection: [],
228
-        partitionArr: [],
229
-      };
190
+      total: 0,
191
+      listQuery: {
192
+        page: 1,
193
+        limit: 10,
194
+        schedul_type: 0,
195
+        partition_type: 0,
196
+        schedul_time: "",
197
+        keywords: ""
198
+      },
199
+      selecting_schs: [],
200
+      partitionArr: []
201
+    };
202
+  },
203
+  created() {
204
+    var date = new Date();
205
+    this.time = date;
206
+    var year = date.getFullYear();
207
+    var month = date.getMonth() + 1;
208
+    var day = date.getDate();
209
+    if (month < 10) {
210
+      month = "0" + month;
211
+    }
212
+    if (day < 10) {
213
+      day = "0" + day;
214
+    }
215
+    var nowDate = year + "-" + month + "-" + day;
216
+    var date = new Date(nowDate + " 00:00:00");
217
+    this.listQuery.schedul_time = date.getTime();
218
+    this.getAllZone();
219
+    this.getSchedualPatientList();
220
+  },
221
+  methods: {
222
+    clickCurrent(val) {
223
+      console.log(val);
224
+      this.$router.push({
225
+        path: "/dialysis/details",
226
+        query: { patient_id: val.patient_id, date: val.sch_time_int }
227
+      });
230 228
     },
231
-    components:{
232
-      BreadCrumb
229
+    handleSelectionChange(val) {
230
+      this.selecting_schs = val;
233 231
     },
234
-    created() {
235
-      var date = new Date()
236
-      this.time = date
237
-      var year = date.getFullYear()
238
-      var month = date.getMonth() + 1
239
-      var day = date.getDate()
240
-      if (month < 10) {
241
-        month = "0" + month
242
-      }
243
-      if (day < 10) {
244
-        day = "0" + day
245
-      }
246
-      var nowDate = year + "-" + month + "-" + day
247
-      var date = new Date(nowDate + " 00:00:00")
248
-      this.listQuery.schedul_time = date.getTime()
249
-      this.getAllZone()
232
+
233
+    selectSchedulType(scheduleType) {
234
+      // alert(scheduleType);/
235
+      this.schedulType = scheduleType;
236
+      this.listQuery.schedul_type = scheduleType;
237
+      this.getSchedualPatientList();
238
+    },
239
+    selectPartitionType(partitionType) {
240
+      this.partitionType = partitionType;
241
+      this.listQuery.partition_type = partitionType;
250 242
       this.getSchedualPatientList();
251 243
     },
252
-    methods: {
253
-
254
-      clickCurrent(val){
255
-        console.log(val)
256
-        this.$router.push({ path: "/dialysis/details", query: {patient_id: val.patient_id, date: val.sch_time_int}})
257
-      },
258
-      handleSelectionChange(val) {
259
-        this.multipleSelection = val;
260
-        this.pageSelect = this.multipleSelection.length;
261
-      },
262
-
263
-      selectSchedulType(scheduleType) {
264
-        // alert(scheduleType);/
265
-        this.schedulType = scheduleType;
266
-        this.listQuery.schedul_type = scheduleType;
267
-        this.getSchedualPatientList();
268
-      },
269
-      selectPartitionType(partitionType) {
270
-        this.partitionType = partitionType;
271
-        this.listQuery.partition_type = partitionType;
272
-        this.getSchedualPatientList();
273
-      },
274 244
 
275
-      changeTime() {
276
-        console.log(this.time)
277
-        this.listQuery.schedul_time = this.time;
278
-        this.getSchedualPatientList();
279
-      },
280
-      // search() {
281
-      //   this.listQuery.keywords = this.searchKey;
282
-      //   this.getSchedualPatientList();
283
-      // },
284
-      // changeOtherSearch() {
285
-      //   this.getList();
286
-      // },
287
-      getAllZone: function () {
288
-        GetAllZone().then(response => {
289
-          if (response.data.state == 0) {
290
-            this.$message.error(response.data.msg);
291
-            return false;
292
-          } else {
293
-            this.partitionArr = response.data.data.zone
294
-            this.partitionArr.unshift({"id": 0, "name": '全部'})
295
-          }
296
-        });
297
-      },
298
-      getSchedualPatientList: function () {
299
-        this.loading = true
300
-        if (this.search_mode == 1) {
301
-          this.listQuery.keywords = ""
245
+    changeTime() {
246
+      console.log(this.time);
247
+      this.listQuery.schedul_time = this.time;
248
+      this.getSchedualPatientList();
249
+    },
250
+    getAllZone: function() {
251
+      GetAllZone().then(response => {
252
+        if (response.data.state == 0) {
253
+          this.$message.error(response.data.msg);
254
+          return false;
302 255
         } else {
303
-          this.listQuery.schedul_time = ""
256
+          this.partitionArr = response.data.data.zone;
257
+          this.partitionArr.unshift({ id: 0, name: "全部" });
304 258
         }
305
-        this.SchedualPatientsTableData = []
306
-        getSchedualPatient(this.listQuery).then(response => {
307
-          if (response.data.state == 0) {
308
-            this.loading = false
309
-            this.$message.error(response.data.msg);
310
-            return false;
311
-          } else {
312
-            this.loading = false
313
-            this.total =  response.data.data.total
314
-            // console.log(response.data.data)
315
-            for (let i = 0; i < response.data.data.schedule.length; i++) {
316
-              if (response.data.data.schedule[i].patient.id > 0) {
317
-                let SchedualPatientsTable = {
318
-                  bp: []
319
-                }
320
-
321
-                SchedualPatientsTable['sch_time_int'] = response.data.data.schedule[i].schedule_date
322
-                SchedualPatientsTable['sch_time'] = parseTime(response.data.data.schedule[i].schedule_date, "{y}-{m}-{d}")
323
-                SchedualPatientsTable['dialysis_no'] = response.data.data.schedule[i].patient.dialysis_no
324
-                SchedualPatientsTable['name'] = response.data.data.schedule[i].patient.name
325
-                SchedualPatientsTable['number'] = response.data.data.schedule[i].device_number.number
326
-                SchedualPatientsTable['gender'] = response.data.data.schedule[i].patient.gender
327
-                SchedualPatientsTable['source'] = response.data.data.schedule[i].patient.source
328
-                SchedualPatientsTable['patient_id'] = response.data.data.schedule[i].patient_id
329
-                SchedualPatientsTable['mode_name'] =  response.data.data.schedule[i].treatment_mode.name
330
-                if(response.data.data.schedule[i].assessment_before_dislysis.id > 0) {
331
-                  SchedualPatientsTable['dialysis_before_weight'] = response.data.data.schedule[i].assessment_before_dislysis.weight_before
332
-                }
333
-                if(response.data.data.schedule[i].assessment_after_dislysis.id > 0) {
334
-                  SchedualPatientsTable['dialysis_after_weight'] = response.data.data.schedule[i].assessment_after_dislysis.weight_after
335
-                }
336
-
337
-                SchedualPatientsTable.bp=[]
338
-                for (let a = 0; a < response.data.data.schedule[i].monitoring_record.length; a++) {
339
-                  let bp = {}
340
-                  bp['value'] = response.data.data.schedule[i].monitoring_record[a].systolic_blood_pressure.toString()
341
-                      +"/"+response.data.data.schedule[i].monitoring_record[a].diastolic_blood_pressure.toString()
342
-
343
-                  SchedualPatientsTable.bp.unshift(bp)
344
-                }
345
-
346
-                this.SchedualPatientsTableData.push(SchedualPatientsTable)
259
+      });
260
+    },
261
+    getSchedualPatientList: function() {
262
+      this.loading = true;
263
+      if (this.search_mode == 1) {
264
+        this.listQuery.keywords = "";
265
+      } else {
266
+        this.listQuery.schedul_time = "";
267
+      }
268
+      this.SchedualPatientsTableData = [];
269
+      getSchedualPatient(this.listQuery).then(response => {
270
+        if (response.data.state == 0) {
271
+          this.loading = false;
272
+          this.$message.error(response.data.msg);
273
+          return false;
274
+        } else {
275
+          this.loading = false;
276
+          this.total = response.data.data.total;
277
+          // console.log(response.data.data)
278
+          for (let i = 0; i < response.data.data.schedule.length; i++) {
279
+            if (response.data.data.schedule[i].patient.id > 0) {
280
+              let SchedualPatientsTable = {
281
+                bp: []
282
+              };
283
+
284
+              SchedualPatientsTable["sch_id"] = response.data.data.schedule[i].id
285
+              SchedualPatientsTable["sch_time_int"] =
286
+                response.data.data.schedule[i].schedule_date;
287
+              SchedualPatientsTable["sch_time"] = parseTime(
288
+                response.data.data.schedule[i].schedule_date,
289
+                "{y}-{m}-{d}"
290
+              );
291
+              SchedualPatientsTable["dialysis_no"] =
292
+                response.data.data.schedule[i].patient.dialysis_no;
293
+              SchedualPatientsTable["name"] =
294
+                response.data.data.schedule[i].patient.name;
295
+              SchedualPatientsTable["number"] =
296
+                response.data.data.schedule[i].device_number.number;
297
+              SchedualPatientsTable["gender"] =
298
+                response.data.data.schedule[i].patient.gender;
299
+              SchedualPatientsTable["source"] =
300
+                response.data.data.schedule[i].patient.source;
301
+              SchedualPatientsTable["patient_id"] =
302
+                response.data.data.schedule[i].patient_id;
303
+              SchedualPatientsTable["mode_name"] =
304
+                response.data.data.schedule[i].treatment_mode.name;
305
+              if (
306
+                response.data.data.schedule[i].assessment_before_dislysis.id > 0
307
+              ) {
308
+                SchedualPatientsTable["dialysis_before_weight"] =
309
+                  response.data.data.schedule[
310
+                    i
311
+                  ].assessment_before_dislysis.weight_before;
312
+              }
313
+              if (
314
+                response.data.data.schedule[i].assessment_after_dislysis.id > 0
315
+              ) {
316
+                SchedualPatientsTable["dialysis_after_weight"] =
317
+                  response.data.data.schedule[
318
+                    i
319
+                  ].assessment_after_dislysis.weight_after;
320
+              }
347 321
 
322
+              SchedualPatientsTable.bp = [];
323
+              for (
324
+                let a = 0;
325
+                a < response.data.data.schedule[i].monitoring_record.length;
326
+                a++
327
+              ) {
328
+                let bp = {};
329
+                bp["value"] =
330
+                  response.data.data.schedule[i].monitoring_record[
331
+                    a
332
+                  ].systolic_blood_pressure.toString() +
333
+                  "/" +
334
+                  response.data.data.schedule[i].monitoring_record[
335
+                    a
336
+                  ].diastolic_blood_pressure.toString();
337
+
338
+                SchedualPatientsTable.bp.unshift(bp);
348 339
               }
340
+
341
+              this.SchedualPatientsTableData.push(SchedualPatientsTable);
349 342
             }
350 343
           }
351
-        });
352
-
353
-
354
-      },getValue:function (val) {
355
-        if(val != undefined){
356
-          return val.value
357
-        }else{
358
-          return ''
359
-        }
360
-      },
361
-      handleCurrentChange(val) {
362
-        this.listQuery.page = val;
363
-        this.getSchedualPatientList();
364
-      },
365
-      changeSearchMode: function() {
366
-        if (this.search_mode == 1) {
367
-          this.search_mode = 2
368
-        } else {
369
-          this.search_mode = 1
370
-        }
371
-      },
372
-      searchPatientAction: function() {
373
-        this.listQuery.keywords = this.patient_search_keyword
374
-        console.log(this.patient_search_keyword)
375
-        if (this.patient_search_keyword.length == 0) {
376
-          return
377 344
         }
378
-        this.getSchedualPatientList()
379
-      },
380
-
381
-
345
+      });
346
+    },
347
+    getValue: function(val) {
348
+      if (val != undefined) {
349
+        return val.value;
350
+      } else {
351
+        return "";
352
+      }
353
+    },
354
+    handleCurrentChange(val) {
355
+      this.listQuery.page = val;
356
+      this.getSchedualPatientList();
357
+    },
358
+    changeSearchMode: function() {
359
+      if (this.search_mode == 1) {
360
+        this.search_mode = 2;
361
+      } else {
362
+        this.search_mode = 1;
363
+      }
364
+    },
365
+    searchPatientAction: function() {
366
+      this.listQuery.keywords = this.patient_search_keyword;
367
+      console.log(this.patient_search_keyword);
368
+      if (this.patient_search_keyword.length == 0) {
369
+        return;
370
+      }
371
+      this.getSchedualPatientList();
372
+    },
373
+    batchPrintAction: function() {
374
+      var sch_ids = []
375
+      for (let index = 0; index < this.selecting_schs.length; index++) {
376
+        sch_ids.push(this.selecting_schs[index].sch_id)
377
+      }
378
+      this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids)
379
+      this.$router.push({ path: "/dialysis/print/batch" });
382 380
     }
381
+  },
382
+  components: {
383
+      BreadCrumb
383 384
   }
385
+};
384 386
 </script>
385 387
 
386 388
 <style rel="stylesheet/scss" lang="scss" scoped>
387
-  .app-container {
388
-    // margin: 20px;
389
-    font-size: 15px;
390
-    .filter-container {
391
-      padding-bottom: 5px;
389
+.app-container {
390
+//   margin: 20px;
391
+  font-size: 15px;
392
+  .filter-container {
393
+    padding-bottom: 5px;
394
+  }
395
+  .cqd-dataTitle{
396
+    color: #303133;
397
+    font-size: 14px;
398
+    border-bottom: 2px #E4E7ED solid;
399
+    height: 36px;
400
+    line-height: 36px;
401
+    margin: 0 0 25px 0;
402
+    position: relative;
403
+  }
404
+  .cqd-dataTitle::before {
405
+      position: absolute;
406
+      left: 0;
407
+      bottom: -2px;
408
+      content: "";
409
+      width: 42px;
410
+      height: 2px;
411
+      background: #409eff;
412
+  }
413
+  .search-component {
414
+    width: 500px;
415
+    .searchBox {
416
+      width: 300px;
417
+      height: 36px;
418
+      line-height: 36px;
419
+      padding-left: 15px;
420
+      border: 1px #dcdfe6 solid;
421
+      border-right: none;
422
+      outline: none;
423
+      float: left;
424
+      border-radius: 6px 0 0 6px;
425
+      font-size: 14px;
426
+      color: #333;
427
+      background: #fff;
428
+      box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
392 429
     }
393
-    .search-component {
394
-      width: 500px;
395
-      .searchBox {
396
-        width: 300px;
397
-        height: 36px;
398
-        line-height: 36px;
399
-        padding-left: 15px;
400
-        border: 1px #dcdfe6 solid;
401
-        border-right: none;
402
-        outline: none;
403
-        float: left;
404
-        border-radius: 6px 0 0 6px;
405
-        font-size: 14px;
406
-        color: #333;
407
-        background: #fff;
408
-        box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
409
-      }
410
-      .searchBtn {
411
-        background-color: #409eff;
412
-        color: #fff;
413
-        font-size: 15px;
414
-        text-align: center;
415
-        height: 36px;
416
-        line-height: 36px;
417
-        float: left;
418
-        outline: none;
419
-        width: 70px;
420
-        border: none;
421
-        border-radius: 0 6px 6px 0;
422
-        font-family: "Microsoft Yahei";
423
-        cursor: pointer;
424
-      }
430
+    .searchBtn {
431
+      background-color: #409eff;
432
+      color: #fff;
433
+      font-size: 15px;
434
+      text-align: center;
435
+      height: 36px;
436
+      line-height: 36px;
437
+      float: left;
438
+      outline: none;
439
+      width: 70px;
440
+      border: none;
441
+      border-radius: 0 6px 6px 0;
442
+      font-family: "Microsoft Yahei";
443
+      cursor: pointer;
425 444
     }
426
-
427
-    .amount {
428
-      font-weight: normal;
429
-      padding: 10px 0 0 0;
430
-      color: #606266;
431
-      font-size: 14px;
432
-      span {
433
-        color: #ef2525;
434
-        font-family: "Arial";
435
-        padding: 0 2px;
436
-      }
445
+  }
446
+  .amount {
447
+    font-weight: normal;
448
+    padding: 10px 0 0 0;
449
+    color: #606266;
450
+    font-size: 14px;
451
+    span {
452
+      color: #ef2525;
453
+      font-family: "Arial";
454
+      padding: 0 2px;
437 455
     }
438 456
   }
439
-</style>
440
-
457
+}
458
+</style>

+ 1 - 3
src/xt_pages/dialysis/bulletinBoard.vue View File

@@ -2,11 +2,9 @@
2 2
   <div class="main-contain">
3 3
     <div class="position">
4 4
       <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <el-button size="small" icon="el-icon-menu" @click="fullscreenboard" type="primary">全屏投影</el-button>
5 6
     </div>
6 7
     <div class="app-container" id="dialysis-board-box">
7
-      <el-row>
8
-        <el-button type="primary" @click="fullscreenboard"> 全屏投影</el-button>
9
-      </el-row>
10 8
       <bulletinboard></bulletinboard>
11 9
     </div>
12 10
   </div>

File diff suppressed because it is too large
+ 1003 - 992
src/xt_pages/dialysis/dialysisPrintOrder.vue


+ 225 - 0
src/xt_pages/user/components/PatientSidebar.1.vue View File

@@ -0,0 +1,225 @@
1
+<template>
2
+  <div>
3
+
4
+
5
+    <div class="patient-menu">
6
+
7
+      <el-autocomplete
8
+        style="margin: 5px"
9
+        popper-class="my-autocomplete"
10
+        v-model="value"
11
+        :fetch-suggestions="querySearchAsync"
12
+        :trigger-on-focus="false"
13
+        placeholder="病人名字或者透析号"
14
+        @select="handleSelect"
15
+       >
16
+        <i
17
+          class="el-icon-search el-input__icon"
18
+          slot="suffix"
19
+         >
20
+        </i>
21
+        <template slot-scope="{ item }">
22
+          <div class="name">{{ item.name }}</div>
23
+        </template>
24
+      </el-autocomplete>
25
+
26
+
27
+
28
+      <el-select v-model="selectID" style="margin-top:10px;text-align: center;" @change="changePatient"
29
+                 placeholder="请选择">
30
+        <el-option
31
+          v-for="item in patientsList"
32
+          :key="item.id"
33
+          :label="item.name"
34
+          :value="item.id">
35
+        </el-option>
36
+      </el-select>
37
+
38
+      <el-menu :default-active="defaultActive" class="el-menu-vertical-demo patient-center-menu">
39
+        <el-submenu index="1">
40
+          <template slot="title">
41
+            <i class="el-icon-setting"></i>
42
+            <span>电子病历</span>
43
+          </template>
44
+          <router-link :to="'/patients/patient/'+this.id">
45
+            <el-menu-item index="1-1">基本信息</el-menu-item>
46
+          </router-link>
47
+          <router-link :to="'/patients/patient/'+this.id+'/doctorAdvice'">
48
+            <el-menu-item index="1-4">医嘱管理</el-menu-item>
49
+          </router-link>
50
+          <router-link :to="'/patients/course?id='+this.id">
51
+            <el-menu-item index="1-2">病程管理</el-menu-item>
52
+          </router-link>
53
+          <router-link :to="'/patients/inspection?id='+this.id">
54
+            <el-menu-item index="1-3">检验检查</el-menu-item>
55
+          </router-link>
56
+          <router-link :to="'/patients/rescue?id='+this.id">
57
+            <el-menu-item index="1-5">抢救记录</el-menu-item>
58
+          </router-link>
59
+          <!-- <router-link :to="'/patients/patient/'+this.id+'/weight'">
60
+              <el-menu-item  index="2-5">干体重</el-menu-item>
61
+          </router-link> -->
62
+        </el-submenu>
63
+        <el-submenu index="2">
64
+          <template slot="title">
65
+            <i class="el-icon-setting"></i>
66
+            <span>透析管理</span>
67
+          </template>
68
+          <router-link :to="'/patients/patient/'+this.id+'/dialysisSolution'">
69
+            <el-menu-item index="2-1">长期透析处方</el-menu-item>
70
+          </router-link>
71
+          <router-link :to="'/patients/patient/'+this.id+'/dialysisRecord'">
72
+            <el-menu-item index="2-2">透析记录</el-menu-item>
73
+          </router-link>
74
+          <router-link :to="'/patients/patient/'+this.id+'/scheduling'">
75
+            <el-menu-item index="2-4">排班信息</el-menu-item>
76
+          </router-link>
77
+          <router-link :to="'/patients/patient/'+this.id+'/proeducation'">
78
+            <el-menu-item index="2-5">宣教信息</el-menu-item>
79
+          </router-link>
80
+          <!-- <router-link :to="'/patients/patient/'+this.id+'/weight'">
81
+              <el-menu-item  index="2-5">干体重</el-menu-item>
82
+          </router-link> -->
83
+        </el-submenu>
84
+     
85
+      </el-menu>
86
+    </div>
87
+    <div class="patient-app-container ">
88
+      <span class="patient-name">姓名:{{currentPatient.name}} &nbsp;&nbsp; 性别:{{tranSex(currentPatient.gender)}} &nbsp;&nbsp; 年龄:{{tranAge(currentPatient.birthday)}} &nbsp;&nbsp; 透析号:{{currentPatient.dialysis_no}} </span>
89
+    </div>
90
+  </div>
91
+
92
+</template>
93
+<script>
94
+
95
+  import {fetchAllList,PostSearch} from "@/api/patient";
96
+  import {jsGetAge, uParseTime} from "@/utils/tools";
97
+
98
+  export default {
99
+    name: "patientSidebar",
100
+    value:'',
101
+    searchArray:[],
102
+    props: {
103
+      id: 0,
104
+      defaultActive: {
105
+        type: String,
106
+        default: '1-1',
107
+      },
108
+
109
+    },
110
+    data() {
111
+      return {
112
+        thedefaultActive: 1,
113
+        patientsList: null,
114
+        currentPatient: {},
115
+        selectID: 0,
116
+        keyword:'',
117
+        value:'',
118
+      }
119
+    },
120
+    methods: {
121
+      changePatient(value) {
122
+        console.log(value)
123
+        this.$router.push("/patients/patient/" + value);
124
+      },
125
+      getList() {
126
+        fetchAllList().then(response => {
127
+          if (response.data.state == 1) {
128
+            this.patientsList = response.data.data.patients;
129
+            var len = this.patientsList.length;
130
+            if (len > 0) {
131
+              for (let index = 0; index < len; index++) {
132
+                if (this.patientsList[index].id == this.id) {
133
+                  this.currentPatient = this.patientsList[index];
134
+
135
+                  this.selectID = this.patientsList[index].id;
136
+                  this.$emit('tran-patient', this.currentPatient);
137
+                  break;
138
+                }
139
+              }
140
+            }
141
+          }
142
+        });
143
+      },
144
+      tranAge(birthday) {
145
+        var birth = uParseTime(birthday, '{y}-{m}-{d}');
146
+        return jsGetAge(birth, '-');
147
+      },
148
+      tranSex(gender) {
149
+        var sex = "未知";
150
+        switch (gender) {
151
+          case 1:
152
+            sex = "男"
153
+            break;
154
+          case 2:
155
+            sex = "女"
156
+            break;
157
+          default:
158
+            break;
159
+        }
160
+        return sex;
161
+      },querySearchAsync(keyword,cb){
162
+        let key = ""
163
+        if(keyword != undefined){
164
+          key = keyword
165
+        }
166
+        let searchArray = []
167
+        PostSearch(key).then(response => {
168
+          if (response.data.state == 1) {
169
+            searchArray =response.data.data.patient
170
+            cb(searchArray)
171
+          }else{
172
+            this.$message.error(response.data.msg);
173
+            cb([])
174
+
175
+          }
176
+
177
+        });
178
+
179
+      },handleSelect(val){
180
+        this.$router.push("/patients/patient/" + val.id);
181
+
182
+
183
+      }
184
+
185
+    },
186
+    created() {
187
+      this.getList();
188
+    },
189
+  };
190
+</script>
191
+
192
+<style>
193
+
194
+  .patient-menu {
195
+    -webkit-transition: width 0.28s;
196
+    transition: width 0.28s;
197
+    width: 180px !important;
198
+    height: 100%;
199
+    position: relative;
200
+    font-size: 0px;
201
+    top: 0;
202
+    float: left;
203
+    bottom: 0;
204
+    left: 0;
205
+    /* z-index: 99; */
206
+    overflow: hidden;
207
+  }
208
+
209
+  .patient-center-menu .el-icon-arrow-down:before {
210
+    content: '';
211
+  }
212
+
213
+  .patient-app-container {
214
+    margin-left: 180px;
215
+    background: #fff; 
216
+  }
217
+   .patient-name{
218
+      color: #303133;
219
+      font-size: 15px;
220
+      padding-top: 15px;
221
+      padding-left: 15px;
222
+      display: inline-block;
223
+      
224
+    }
225
+</style>

+ 104 - 50
src/xt_pages/user/components/PatientSidebar.vue View File

@@ -25,8 +25,7 @@
25 25
 
26 26
 
27 27
 
28
-      <el-select v-model="selectID" style="margin-top:10px;text-align: center;" @change="changePatient"
29
-                 placeholder="请选择">
28
+      <el-select v-model="selectID" style="margin:10px 5px 0px 5px;text-align: center;" @change="changePatient" placeholder="请选择">
30 29
         <el-option
31 30
           v-for="item in patientsList"
32 31
           :key="item.id"
@@ -35,54 +34,16 @@
35 34
         </el-option>
36 35
       </el-select>
37 36
 
38
-      <el-menu :default-active="defaultActive" class="el-menu-vertical-demo patient-center-menu">
39
-        <el-submenu index="1">
40
-          <template slot="title">
41
-            <i class="el-icon-setting"></i>
42
-            <span>电子病历</span>
43
-          </template>
44
-          <router-link :to="'/patients/patient/'+this.id">
45
-            <el-menu-item index="1-1">基本信息</el-menu-item>
46
-          </router-link>
47
-          <router-link :to="'/patients/patient/'+this.id+'/doctorAdvice'">
48
-            <el-menu-item index="1-4">医嘱管理</el-menu-item>
49
-          </router-link>
50
-          <router-link :to="'/patients/course?id='+this.id">
51
-            <el-menu-item index="1-2">病程管理</el-menu-item>
52
-          </router-link>
53
-          <router-link :to="'/patients/inspection?id='+this.id">
54
-            <el-menu-item index="1-3">检验检查</el-menu-item>
55
-          </router-link>
56
-          <router-link :to="'/patients/rescue?id='+this.id">
57
-            <el-menu-item index="1-5">抢救记录</el-menu-item>
58
-          </router-link>
59
-          <!-- <router-link :to="'/patients/patient/'+this.id+'/weight'">
60
-              <el-menu-item  index="2-5">干体重</el-menu-item>
61
-          </router-link> -->
62
-        </el-submenu>
63
-        <el-submenu index="2">
64
-          <template slot="title">
65
-            <i class="el-icon-setting"></i>
66
-            <span>透析管理</span>
67
-          </template>
68
-          <router-link :to="'/patients/patient/'+this.id+'/dialysisSolution'">
69
-            <el-menu-item index="2-1">长期透析处方</el-menu-item>
70
-          </router-link>
71
-          <router-link :to="'/patients/patient/'+this.id+'/dialysisRecord'">
72
-            <el-menu-item index="2-2">透析记录</el-menu-item>
73
-          </router-link>
74
-          <router-link :to="'/patients/patient/'+this.id+'/scheduling'">
75
-            <el-menu-item index="2-4">排班信息</el-menu-item>
76
-          </router-link>
77
-          <router-link :to="'/patients/patient/'+this.id+'/proeducation'">
78
-            <el-menu-item index="2-5">宣教信息</el-menu-item>
79
-          </router-link>
80
-          <!-- <router-link :to="'/patients/patient/'+this.id+'/weight'">
81
-              <el-menu-item  index="2-5">干体重</el-menu-item>
82
-          </router-link> -->
83
-        </el-submenu>
84
-     
85
-      </el-menu>
37
+      <el-tree
38
+        :data="treeData"
39
+        accordion
40
+        node-key="name" 
41
+        :key="treeKey" 
42
+        :current-node-key="treeKey" 
43
+        :default-expanded-keys="[defaultActive]"
44
+        @node-click="handleNodeClick"
45
+        >
46
+      </el-tree>
86 47
     </div>
87 48
     <div class="patient-app-container ">
88 49
       <span class="patient-name">姓名:{{currentPatient.name}} &nbsp;&nbsp; 性别:{{tranSex(currentPatient.gender)}} &nbsp;&nbsp; 年龄:{{tranAge(currentPatient.birthday)}} &nbsp;&nbsp; 透析号:{{currentPatient.dialysis_no}} </span>
@@ -115,9 +76,83 @@
115 76
         selectID: 0,
116 77
         keyword:'',
117 78
         value:'',
79
+        treeKey:'',
80
+        treeData:[
81
+          {
82
+            name:'1',
83
+            label: '电子病历',
84
+            children: [
85
+              {
86
+                name:'1-1',
87
+                label: '基本信息',
88
+              },
89
+              {
90
+                name:'1-4',
91
+                label: '医嘱管理',
92
+              },
93
+              {
94
+                name:'1-2',
95
+                label: '病程管理',
96
+              },
97
+              {
98
+                name:'1-3',
99
+                label: '检验检查',
100
+              },
101
+              {
102
+                name:'1-5',
103
+                label: '抢救记录',
104
+              }
105
+            ]
106
+          },
107
+          {
108
+            name:'2',
109
+            label: '透析管理',
110
+            children: [
111
+              {
112
+                name:'2-1',
113
+                label: '长期透析处方',
114
+              },
115
+              {
116
+                name:'2-2',
117
+                label: '透析记录',
118
+              },
119
+              {
120
+                name:'2-4',
121
+                label: '排班信息',
122
+              },
123
+              {
124
+                name:'2-5',
125
+                label: '宣教信息',
126
+              }
127
+            ]
128
+          }
129
+        ],
118 130
       }
119 131
     },
120 132
     methods: {
133
+      
134
+      handleNodeClick(data) {
135
+        var name = data.name;
136
+        if (name=='1-1') {
137
+          this.$router.push({path:'/patients/patient/' + this.id});
138
+        } else if (name=='1-2') {
139
+          this.$router.push({path:'/patients/course?id='+this.id});
140
+        } else if (name=='1-3') {
141
+          this.$router.push({path:'/patients/inspection?id='+this.id});
142
+        } else if (name=='1-4') {
143
+          this.$router.push({path:'/patients/patient/'+this.id+'/doctorAdvice'});
144
+        } else if (name=='1-5') {
145
+          this.$router.push({path:'/patients/rescue?id='+this.id});
146
+        } else if (name=='2-1') {
147
+          this.$router.push({path:'/patients/patient/'+this.id+'/dialysisSolution'});
148
+        }else if (name=='2-2') {
149
+          this.$router.push({path:'/patients/patient/'+this.id+'/dialysisRecord'});
150
+        }else if (name=='2-4') {
151
+          this.$router.push({path:'/patients/patient/'+this.id+'/scheduling'});
152
+        }else if (name=='2-5') {
153
+          this.$router.push({path:'/patients/patient/'+this.id+'/proeducation'});
154
+        }
155
+      },
121 156
       changePatient(value) {
122 157
         console.log(value)
123 158
         this.$router.push("/patients/patient/" + value);
@@ -184,6 +219,7 @@
184 219
 
185 220
     },
186 221
     created() {
222
+      this.treeKey = this.defaultActive;
187 223
       this.getList();
188 224
     },
189 225
   };
@@ -191,6 +227,24 @@
191 227
 
192 228
 <style>
193 229
 
230
+    .el-tree-node__content {
231
+        font-size: 14px;
232
+        height: 40px;
233
+        font-weight: 400;
234
+    }
235
+    .el-tree-node__label:hover {
236
+        color: #0593D3;
237
+    }
238
+    .el-tree-node:focus>.el-tree-node__content {
239
+        color: #0593D3;
240
+    }
241
+    .el-tree-node .el-tree-node.is-current>.el-tree-node__content{
242
+        color: #0593D3;
243
+        /* background-color: transparent; */
244
+    }
245
+    .el-tree {
246
+      background: #f6f8f9;
247
+    }
194 248
   .patient-menu {
195 249
     -webkit-transition: width 0.28s;
196 250
     transition: width 0.28s;