|
@@ -4,8 +4,123 @@
|
4
|
4
|
<bread-crumb :crumbs='crumbs'></bread-crumb>
|
5
|
5
|
<el-button size="small" icon="el-icon-menu" @click="fullscreenboard" type="primary">全屏投影</el-button>
|
6
|
6
|
</div>
|
7
|
|
- <div class="app-container" id="dialysis-board-box">
|
8
|
|
- <bulletinboard></bulletinboard>
|
|
7
|
+ <div class="app-container" id="dialysis-board-box" v-loading="loading" element-loading-text="加载中">
|
|
8
|
+ <el-menu class="el-menu-demo" mode="horizontal" >
|
|
9
|
+ <el-menu-item >{{orgname}}</el-menu-item>
|
|
10
|
+ <el-menu-item :class="rightItem">{{week}}</el-menu-item>
|
|
11
|
+ <el-menu-item :class="rightItem">{{today}}</el-menu-item>
|
|
12
|
+ </el-menu>
|
|
13
|
+ <el-table
|
|
14
|
+ id="board-table-data"
|
|
15
|
+ :data="boardData"
|
|
16
|
+ border
|
|
17
|
+ :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
|
|
18
|
+ style="width: 100%">
|
|
19
|
+ <el-table-column
|
|
20
|
+ align="center"
|
|
21
|
+ prop="date"
|
|
22
|
+ label="姓名"
|
|
23
|
+ width="180">
|
|
24
|
+ <template slot-scope="scope">{{scope.row.patient.name}}</template>
|
|
25
|
+ </el-table-column>
|
|
26
|
+ <el-table-column
|
|
27
|
+ align="center"
|
|
28
|
+ prop="name"
|
|
29
|
+ label="透析号"
|
|
30
|
+ width="180">
|
|
31
|
+ <template slot-scope="scope">{{scope.row.patient.dialysis_no}}</template>
|
|
32
|
+ </el-table-column>
|
|
33
|
+ <el-table-column
|
|
34
|
+ align="center"
|
|
35
|
+ prop="address"
|
|
36
|
+ label="模式">
|
|
37
|
+ <template slot-scope="scope">{{modeName(scope.row.mode_id)}}</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_zone?scope.row.device_zone.name:''}}</template>
|
|
44
|
+ </el-table-column>
|
|
45
|
+ <el-table-column
|
|
46
|
+ align="center"
|
|
47
|
+ prop="address"
|
|
48
|
+ label="床位">
|
|
49
|
+ <template slot-scope="scope">{{scope.row.device_number?scope.row.device_number.number:''}}</template>
|
|
50
|
+ </el-table-column>
|
|
51
|
+ <el-table-column
|
|
52
|
+ align="center"
|
|
53
|
+ prop="address"
|
|
54
|
+ label="状态">
|
|
55
|
+ <template slot-scope="scope">{{boradData(scope.row)}}</template>
|
|
56
|
+ </el-table-column>
|
|
57
|
+ <el-table-column
|
|
58
|
+ align="center"
|
|
59
|
+ prop="address"
|
|
60
|
+ label="下次透析时间">
|
|
61
|
+ <template slot-scope="scope">{{nextSchedule(scope.row.next_schedules)}}</template>
|
|
62
|
+ </el-table-column>
|
|
63
|
+ </el-table>
|
|
64
|
+ </div>
|
|
65
|
+
|
|
66
|
+ <div id="fullscreenbroad" v-show="dialogTableVisible" >
|
|
67
|
+ <el-row>
|
|
68
|
+ <el-button @click="openSetting" icon="el-icon-setting" circle id="fullscreenbroad-setting"></el-button>
|
|
69
|
+ <el-button type="primary" icon="el-icon-rank" v-if="showSetting" id="fullscreenbroad-setting" @click="togglefullscreen">切换模式</el-button>
|
|
70
|
+ <el-button type="primary" icon="el-icon-menu" v-if="showSetting" id="fullscreenbroad-setting" @click="outfullscreenboard">退出全屏投影</el-button>
|
|
71
|
+
|
|
72
|
+ </el-row>
|
|
73
|
+ <el-menu class="el-menu-demo" mode="horizontal" >
|
|
74
|
+ <el-menu-item >{{orgname}}</el-menu-item>
|
|
75
|
+ <el-menu-item :class="rightItem">{{week}}</el-menu-item>
|
|
76
|
+ <el-menu-item :class="rightItem">{{today}}</el-menu-item>
|
|
77
|
+ </el-menu>
|
|
78
|
+ <el-table :data="boardData" border style="width: 100%" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}">
|
|
79
|
+ <el-table-column
|
|
80
|
+ align="center"
|
|
81
|
+ prop="date"
|
|
82
|
+ label="姓名"
|
|
83
|
+ width="180">
|
|
84
|
+ <template slot-scope="scope">{{scope.row.patient.name}}</template>
|
|
85
|
+ </el-table-column>
|
|
86
|
+ <el-table-column
|
|
87
|
+ align="center"
|
|
88
|
+ prop="name"
|
|
89
|
+ label="透析号"
|
|
90
|
+ width="180">
|
|
91
|
+ <template slot-scope="scope">{{scope.row.patient.dialysis_no}}</template>
|
|
92
|
+ </el-table-column>
|
|
93
|
+ <el-table-column
|
|
94
|
+ align="center"
|
|
95
|
+ prop="address"
|
|
96
|
+ label="模式">
|
|
97
|
+ <template slot-scope="scope">{{modeName(scope.row.mode_id)}}</template>
|
|
98
|
+ </el-table-column>
|
|
99
|
+ <el-table-column
|
|
100
|
+ align="center"
|
|
101
|
+ prop="address"
|
|
102
|
+ label="分区">
|
|
103
|
+ <template slot-scope="scope">{{scope.row.device_zone?scope.row.device_zone.name:''}}</template>
|
|
104
|
+ </el-table-column>
|
|
105
|
+ <el-table-column
|
|
106
|
+ align="center"
|
|
107
|
+ prop="address"
|
|
108
|
+ label="床位">
|
|
109
|
+ <template slot-scope="scope">{{scope.row.device_number?scope.row.device_number.number:''}}</template>
|
|
110
|
+ </el-table-column>
|
|
111
|
+ <el-table-column
|
|
112
|
+ align="center"
|
|
113
|
+ prop="address"
|
|
114
|
+ label="状态">
|
|
115
|
+ <template slot-scope="scope">{{boradData(scope.row)}}</template>
|
|
116
|
+ </el-table-column>
|
|
117
|
+ <el-table-column
|
|
118
|
+ align="center"
|
|
119
|
+ prop="address"
|
|
120
|
+ label="下次透析时间">
|
|
121
|
+ <template slot-scope="scope">{{nextSchedule(scope.row.next_schedules)}}</template>
|
|
122
|
+ </el-table-column>
|
|
123
|
+ </el-table>
|
9
|
124
|
</div>
|
10
|
125
|
</div>
|
11
|
126
|
|
|
@@ -16,25 +131,185 @@
|
16
|
131
|
import bulletinboard from './components/bulletinboard'
|
17
|
132
|
import { parseTime } from '@/utils'
|
18
|
133
|
import BreadCrumb from '../components/bread-crumb'
|
19
|
|
-
|
|
134
|
+ import screenfull from 'screenfull'
|
20
|
135
|
export default {
|
21
|
136
|
components: { BreadCrumb, bulletinboard },
|
22
|
137
|
name: 'bulletinBoard',
|
23
|
138
|
data(){
|
24
|
139
|
return{
|
|
140
|
+
|
|
141
|
+ dialogTableVisible:false,
|
|
142
|
+ showSetting:false,
|
25
|
143
|
crumbs: [
|
26
|
144
|
{ path: false, name: '透析管理' },
|
27
|
145
|
{ path: 'dialysis/board', name: '数据看板' },
|
28
|
146
|
],
|
29
|
|
-
|
|
147
|
+ orgname: '',
|
|
148
|
+ today:'今天',
|
|
149
|
+ week:'--',
|
|
150
|
+ rightItem:'board-right-menu-item',
|
|
151
|
+ boardData: [],
|
|
152
|
+ showTime:10,
|
|
153
|
+ currentPage:0,
|
|
154
|
+ loading:true,
|
|
155
|
+ weekDay:['周日','周一','周二','周三','周四','周五','周六',],
|
|
156
|
+ roonOptions:{1:'上午', 2:'下午', 3:'晚上'},
|
|
157
|
+ modeOptions: {},
|
30
|
158
|
}
|
31
|
159
|
},
|
32
|
|
-
|
|
160
|
+ created() {
|
|
161
|
+ // this.orgname = xtuser.org.org_name;
|
|
162
|
+ this.orgname = "遂溪方济医院";
|
|
163
|
+ this.modeOptions = this.$store.getters.treatment_mode;
|
|
164
|
+ this.initData();
|
|
165
|
+ },
|
33
|
166
|
methods: {
|
34
|
167
|
fullscreenboard: function() {
|
35
|
|
- let routeData = this.$router.resolve({ path: '/fullscreenboard' })
|
36
|
|
- window.open(routeData.href, '_blank')
|
|
168
|
+ this.dialogTableVisible = true;
|
|
169
|
+ // let routeData = this.$router.resolve({ path: '/fullscreenboard' })
|
|
170
|
+ // window.open(routeData.href, '_blank')
|
|
171
|
+ },
|
|
172
|
+ outfullscreenboard:function(){
|
|
173
|
+ this.dialogTableVisible = false;
|
|
174
|
+ this.showSetting = false;
|
|
175
|
+ },
|
|
176
|
+ togglefullscreen:function(){
|
|
177
|
+ if (!screenfull.enabled) {
|
|
178
|
+ this.$message({
|
|
179
|
+ message: '你的浏览器不支持',
|
|
180
|
+ type: 'warning'
|
|
181
|
+ })
|
|
182
|
+ return false
|
|
183
|
+ }
|
|
184
|
+ screenfull.toggle();
|
|
185
|
+ this.showSetting = false;
|
|
186
|
+ },
|
|
187
|
+ openSetting(){
|
|
188
|
+ if(this.showSetting==false) {
|
|
189
|
+ this.showSetting = true;
|
|
190
|
+ }else {
|
|
191
|
+ this.showSetting=false
|
|
192
|
+ }
|
|
193
|
+ },
|
|
194
|
+ initData:function() {
|
|
195
|
+ var _this = this;
|
|
196
|
+ var timeOut = this.showTime * 1000;
|
|
197
|
+ this.currentPage++;
|
|
198
|
+ this.getBoards();
|
|
199
|
+
|
|
200
|
+ setTimeout(function(){
|
|
201
|
+ _this.initData();
|
|
202
|
+ }, timeOut);
|
|
203
|
+ },
|
|
204
|
+ getBoards:function(){
|
|
205
|
+ getBoards(this.currentPage).then(response=>{
|
|
206
|
+ this.loading = false;
|
|
207
|
+ var r = response.data;
|
|
208
|
+ if (r.state == 0) {
|
|
209
|
+ this.$message.error(r.msg);
|
|
210
|
+ return false;
|
|
211
|
+ } else {
|
|
212
|
+ if(r.data.boards.length==0) {
|
|
213
|
+ console.log("getBoards this.currentPage", this.currentPage);
|
|
214
|
+ this.currentPage = 1;
|
|
215
|
+ this.getBoards();
|
|
216
|
+ }else {
|
|
217
|
+ this.today = r.data.today;
|
|
218
|
+ this.week = (r.data.week in this.weekDay)?this.weekDay[r.data.week]:'--';
|
|
219
|
+ this.boardData = r.data.boards;
|
|
220
|
+ }
|
|
221
|
+ }
|
|
222
|
+ })
|
|
223
|
+ },
|
|
224
|
+ modeName:function(mode_id) {
|
|
225
|
+ return (mode_id in this.modeOptions)? this.modeOptions[mode_id].name:'';
|
|
226
|
+ },
|
|
227
|
+ boradData:function(record) {
|
|
228
|
+ if(record.dialysis_order) {
|
|
229
|
+ if(record.dialysis_order.stage == 2) {
|
|
230
|
+ return '已下机';
|
|
231
|
+ }else {
|
|
232
|
+ return '透析中';
|
|
233
|
+ }
|
|
234
|
+ }else if(record.sign) {
|
|
235
|
+ return '已签到';
|
|
236
|
+ }else {
|
|
237
|
+ return '未签到';
|
|
238
|
+ }
|
|
239
|
+ },
|
|
240
|
+ nextSchedule:function(nextlist){
|
|
241
|
+ if(nextlist.length==0) {
|
|
242
|
+ return '——';
|
|
243
|
+ }
|
|
244
|
+ var dayTime = parseTime(nextlist[0].schedule_date, '{m}月{d}日');
|
|
245
|
+ var noon = (nextlist[0].schedule_type in this.roonOptions) ? ' ' + this.roonOptions[nextlist[0].schedule_type]:'';
|
|
246
|
+ return dayTime + noon;
|
37
|
247
|
}
|
38
|
248
|
}
|
39
|
249
|
}
|
40
|
250
|
</script>
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+<style lang="scss" scoped>
|
|
254
|
+.board-right-menu-item{
|
|
255
|
+ float: right !important;
|
|
256
|
+}
|
|
257
|
+.el-menu--horizontal>.el-menu-item {
|
|
258
|
+ color: #000 !important;
|
|
259
|
+}
|
|
260
|
+.el-menu--horizontal {
|
|
261
|
+ border-bottom: 0px !important;
|
|
262
|
+}
|
|
263
|
+</style>
|
|
264
|
+
|
|
265
|
+<style >
|
|
266
|
+#fullscreenbroad {
|
|
267
|
+ position: fixed;
|
|
268
|
+ top: 0;
|
|
269
|
+ right: 0;
|
|
270
|
+ bottom: 0;
|
|
271
|
+ left: 0;
|
|
272
|
+ overflow: auto;
|
|
273
|
+ margin: 0;
|
|
274
|
+ background: #fff;
|
|
275
|
+ padding:20px;
|
|
276
|
+
|
|
277
|
+ /* width: 100%;
|
|
278
|
+ margin-top: 0;
|
|
279
|
+ margin-bottom: 0;
|
|
280
|
+ height: 100%;
|
|
281
|
+ overflow: auto; */
|
|
282
|
+}
|
|
283
|
+
|
|
284
|
+#fullscreenbroad #fullscreenbroad-setting {
|
|
285
|
+ float: right;
|
|
286
|
+}
|
|
287
|
+#fullscreenbroad {
|
|
288
|
+ z-index: 9999 !important;
|
|
289
|
+}
|
|
290
|
+
|
|
291
|
+#fullscreenbroad .el-button+.el-button {
|
|
292
|
+ margin-left: 0px;
|
|
293
|
+}
|
|
294
|
+#fullscreenbroad .el-button:nth-child(1) {
|
|
295
|
+ margin-left: 10px;
|
|
296
|
+}
|
|
297
|
+#fullscreenbroad .el-button:nth-child(2) {
|
|
298
|
+ margin-left: 10px;
|
|
299
|
+}
|
|
300
|
+
|
|
301
|
+#fullscreenbroad .el-menu-item{
|
|
302
|
+ font-size: 30px !important;
|
|
303
|
+}
|
|
304
|
+
|
|
305
|
+#fullscreenbroad .board-right-menu-item{
|
|
306
|
+ font-size: 20px !important;
|
|
307
|
+}
|
|
308
|
+#fullscreenbroad .el-table th>.cell {
|
|
309
|
+ font-size: 20px !important;
|
|
310
|
+}
|
|
311
|
+#fullscreenbroad .el-table .cell{
|
|
312
|
+ font-size: 20px !important;
|
|
313
|
+}
|
|
314
|
+
|
|
315
|
+</style>
|