zhengchengwu 6 лет назад
Родитель
Сommit
75a8298ffe

+ 9 - 0
src/api/board.js Просмотреть файл

@@ -0,0 +1,9 @@
1
+import request from '@/utils/request'
2
+
3
+export function getBoards(page){
4
+    return request({
5
+        url:'/api/dialysis/board?page=' + page,
6
+        method:'get',
7
+    })
8
+}
9
+

+ 7 - 1
src/router/index.js Просмотреть файл

@@ -336,7 +336,7 @@ export const xt_constantRouterMap = [
336 336
       // { path: 'advice', component: () => import('@/xt_pages/dialysis/doctorAdvice'), name: 'advice', meta: { title: 'advice' }},
337 337
       // { path: 'prepare', component: () => import('@/xt_pages/dialysis/dialysisPrepare'), name: 'prepare', meta: { title: 'prepare' }},
338 338
       { path: '/dialysis/watch', component: () => import('@/xt_pages/dialysis/bloodPresssWatch'), name: 'watch', meta: { title: 'watch' }},
339
-      { path: '/dialysis/details', component: () => import('@/xt_pages/dialysis/details'), name: 'details', meta: { title: 'details' }},
339
+      { path: '/dialysis/details', component: () => import('@/xt_pages/dialysis/details'), name: 'details', meta: { title: 'details' },hidden: true,is_menu: false},
340 340
       {
341 341
         path: '/dialysis/print/batch',
342 342
         component: () => import('@/xt_pages/dialysis/batch_print/batch_print_order'),
@@ -345,8 +345,14 @@ export const xt_constantRouterMap = [
345 345
         name: 'dialysis_batch_print',
346 346
         meta: { title: 'dialysis_batch_print', noCache: true }
347 347
       },
348
+      { path: '/dialysis/board', component: () => import('@/xt_pages/dialysis/bulletinBoard'), name: '数据看板', meta: { title: '数据看板' }},
348 349
     ]
349 350
   },
351
+  {
352
+    path: '/fullscreenboard',
353
+    component: () => import('@/xt_pages/fullscreenboard/index'), 
354
+    hidden:true,
355
+  },
350 356
   {
351 357
     path: '/device',
352 358
     component: Layout,

+ 2 - 2
src/xt_pages/dialysis/batch_print/batch_print_order.vue Просмотреть файл

@@ -577,8 +577,8 @@ export default {
577 577
     },
578 578
     created() {
579 579
       var xtuser = this.$store.getters.xt_user;
580
-    //   this.orgname = xtuser.org.org_name;
581
-      this.orgname = "遂溪方济医院";
580
+      this.orgname = xtuser.org.org_name;
581
+    //   this.orgname = "遂溪方济医院";
582 582
       this.modeOptions = this.$store.getters.treatment_mode;
583 583
     //   this.replacementWays = this.$store.getters.replacement_ways;
584 584
     //   this.perfusionApparatus = this.$store.getters.perfusion_apparatus;

+ 26 - 0
src/xt_pages/dialysis/bulletinBoard.vue Просмотреть файл

@@ -0,0 +1,26 @@
1
+<template>
2
+    <div class="app-container" id="dialysis-board-box" >
3
+        <el-row>
4
+            <el-button type="primary" @click="fullscreenboard"> 全屏投影</el-button>
5
+        </el-row>
6
+        <bulletinboard></bulletinboard>
7
+    </div>
8
+</template>
9
+
10
+<script>
11
+import { getBoards } from "@/api/board";
12
+import bulletinboard from "./components/bulletinboard";
13
+import { parseTime } from "@/utils";
14
+
15
+export default {
16
+    components: { bulletinboard },
17
+    name: 'bulletinBoard',
18
+    
19
+    methods:{
20
+        fullscreenboard:function(){
21
+            let routeData = this.$router.resolve({ path: '/fullscreenboard'});
22
+            window.open(routeData.href, '_blank');
23
+        },
24
+    }
25
+}
26
+</script>

+ 169 - 0
src/xt_pages/dialysis/components/bulletinboard.vue Просмотреть файл

@@ -0,0 +1,169 @@
1
+<template>
2
+    <div  v-loading="loading" element-loading-text="加载中">
3
+        <el-menu  class="el-menu-demo" mode="horizontal" >
4
+            <el-menu-item >{{orgname}}</el-menu-item>
5
+            <el-menu-item :class="rightItem">{{week}}</el-menu-item>
6
+            <el-menu-item :class="rightItem">{{today}}</el-menu-item>
7
+        </el-menu>
8
+        <el-table
9
+            id="board-table-data"
10
+            :data="boardData"
11
+            border
12
+            style="width: 100%">
13
+            <el-table-column
14
+                align="center"
15
+                prop="date"
16
+                label="姓名"
17
+                width="180">
18
+                <template slot-scope="scope">{{scope.row.patient.name}}</template>
19
+            </el-table-column>
20
+            <el-table-column
21
+                align="center"
22
+                prop="name"
23
+                label="透析号"
24
+                width="180">
25
+                <template slot-scope="scope">{{scope.row.patient.dialysis_no}}</template>
26
+            </el-table-column>
27
+            <el-table-column
28
+                align="center"
29
+                prop="address"
30
+                label="模式">
31
+                <template slot-scope="scope">{{modeName(scope.row.mode_id)}}</template>
32
+            </el-table-column>
33
+            <el-table-column
34
+                align="center"
35
+                prop="address"
36
+                label="分区">
37
+                <template slot-scope="scope">{{scope.row.device_zone?scope.row.device_zone.name:''}}</template>
38
+            </el-table-column>
39
+            <el-table-column
40
+                align="center"
41
+                prop="address"
42
+                label="床位">
43
+                <template slot-scope="scope">{{scope.row.device_number?scope.row.device_number.number:''}}</template>
44
+            </el-table-column>
45
+            <el-table-column
46
+                align="center"
47
+                prop="address"
48
+                label="状态">
49
+                <template slot-scope="scope">{{boradData(scope.row)}}</template>
50
+            </el-table-column>
51
+            <el-table-column
52
+                align="center"
53
+                prop="address"
54
+                label="下次透析时间">
55
+                <template slot-scope="scope">{{nextSchedule(scope.row.next_schedules)}}</template>
56
+            </el-table-column>
57
+        </el-table>
58
+    </div>
59
+</template>
60
+
61
+<script>
62
+import { getBoards } from "@/api/board";
63
+import { parseTime } from "@/utils";
64
+
65
+export default {
66
+    name: 'bulletinboard',
67
+    data(){
68
+        return {
69
+            orgname: '',
70
+            today:'今天',
71
+            week:'--',
72
+            rightItem:'board-right-menu-item',
73
+            boardData: [],
74
+            showTime:10,
75
+            currentPage:0,
76
+            loading:true,
77
+            weekDay:['周日','周一','周二','周三','周四','周五','周六',],
78
+            roonOptions:{1:'上午', 2:'下午', 3:'晚上'},
79
+            modeOptions: {},
80
+        }
81
+    },
82
+    created() {
83
+        //   this.orgname = xtuser.org.org_name;
84
+        this.orgname = "遂溪方济医院";
85
+        this.modeOptions = this.$store.getters.treatment_mode;
86
+          this.initData();
87
+        // this.currentPage++;
88
+        // this.getBoards();
89
+    },
90
+    methods:{
91
+        fullscreenboard:function(){
92
+            let routeData = this.$router.resolve({ path: '/fullscreenboard'});
93
+            window.open(routeData.href, '_blank');
94
+        },
95
+        initData:function() {
96
+            var _this = this;
97
+            var timeOut = this.showTime * 1000;
98
+            this.currentPage++;
99
+            console.log("initData this.currentPage", this.currentPage);
100
+            this.getBoards();
101
+            
102
+            setTimeout(function(){
103
+                _this.initData();
104
+            }, timeOut); 
105
+        },
106
+        getBoards:function(){
107
+            getBoards(this.currentPage).then(response=>{
108
+                this.loading = false;
109
+                var r = response.data;
110
+                if (r.state == 0) {
111
+                    this.$message.error(r.msg);
112
+                    return false;
113
+                } else {
114
+                    if(r.data.boards.length==0) {
115
+                        console.log("getBoards this.currentPage", this.currentPage);
116
+                        this.currentPage = 1;
117
+                        this.getBoards();
118
+                    }else {
119
+                        this.today = r.data.today;
120
+                        this.week = (r.data.week in this.weekDay)?this.weekDay[r.data.week]:'--';
121
+                        this.boardData = r.data.boards;
122
+                    }
123
+                }
124
+            })
125
+        },
126
+        modeName:function(mode_id) {
127
+            return (mode_id in this.modeOptions)? this.modeOptions[mode_id].name:'';
128
+        },
129
+        boradData:function(record) {
130
+            if(record.dialysis_order) {
131
+                if(record.dialysis_order.stage == 2) {
132
+                    return '已下机';
133
+                }else {
134
+                    return '透析中';
135
+                }
136
+            }else if(record.sign) {
137
+                return '已签到';
138
+            }else {
139
+                return '未签到';
140
+            }
141
+        },
142
+        nextSchedule:function(nextlist){
143
+            if(nextlist.length==0) {
144
+                return '——';
145
+            }
146
+            var dayTime = parseTime(nextlist[0].schedule_date, '{m}月{d}日');
147
+            var noon = (nextlist[0].schedule_type in this.roonOptions) ? ' ' + this.roonOptions[nextlist[0].schedule_type]:'';
148
+            return dayTime + noon;
149
+        }
150
+    }
151
+}
152
+</script>
153
+<style lang="scss">
154
+#board-table-data th{
155
+    background:#f5f7fa;
156
+}
157
+</style>
158
+
159
+<style lang="scss" scoped>
160
+.board-right-menu-item{
161
+    float: right !important;
162
+}
163
+.el-menu--horizontal>.el-menu-item {
164
+    color: #000 !important;
165
+}
166
+.el-menu--horizontal {
167
+    border-bottom: 0px !important;
168
+}
169
+</style>

+ 43 - 0
src/xt_pages/fullscreenboard/index.vue Просмотреть файл

@@ -0,0 +1,43 @@
1
+<template>
2
+    <div class="app-container" id="fullscreen-board-box" >
3
+        <el-row>
4
+            <el-popover
5
+                placement="right"
6
+                title="帮助"
7
+                width="500"
8
+                trigger="hover"
9
+                content="按F11(笔记本可能是Fn+F11)可以进入/退出全屏">
10
+                <i class="el-icon-question" slot="reference"></i>
11
+                
12
+            </el-popover>
13
+        </el-row>
14
+        <bulletinboard></bulletinboard>
15
+    </div>
16
+</template>
17
+
18
+<script>
19
+import { getBoards } from "@/api/board";
20
+import bulletinboard from "@/xt_pages/dialysis/components/bulletinboard";
21
+import { parseTime } from "@/utils";
22
+
23
+export default {
24
+    components: { bulletinboard },
25
+    name: 'fullscreenboaard',
26
+}
27
+</script>
28
+<style >
29
+#fullscreen-board-box .el-menu-item{
30
+    font-size: 30px !important;
31
+}
32
+
33
+#fullscreen-board-box .board-right-menu-item{
34
+    font-size: 20px !important;
35
+}
36
+#fullscreen-board-box .el-table th>.cell {
37
+    font-size: 20px !important;
38
+}
39
+#fullscreen-board-box .el-table .cell{
40
+    font-size: 20px !important;
41
+}
42
+</style>
43
+