|
@@ -143,43 +143,43 @@
|
143
|
143
|
</template>
|
144
|
144
|
|
145
|
145
|
<script>
|
146
|
|
-import { getBoards } from "@/api/board";
|
147
|
|
-import bulletinboard from "./components/bulletinboard";
|
148
|
|
-import { parseTime } from "@/utils";
|
149
|
|
-import BreadCrumb from "../components/bread-crumb";
|
150
|
|
-import screenfull from "screenfull";
|
|
146
|
+import { getBoards } from '@/api/board'
|
|
147
|
+import bulletinboard from './components/bulletinboard'
|
|
148
|
+import { parseTime } from '@/utils'
|
|
149
|
+import BreadCrumb from '../components/bread-crumb'
|
|
150
|
+import screenfull from 'screenfull'
|
151
|
151
|
export default {
|
152
|
152
|
components: { BreadCrumb, bulletinboard },
|
153
|
|
- name: "bulletinBoard",
|
|
153
|
+ name: 'bulletinBoard',
|
154
|
154
|
data() {
|
155
|
155
|
return {
|
156
|
156
|
dialogTableVisible: false,
|
157
|
157
|
showSetting: false,
|
158
|
158
|
crumbs: [
|
159
|
|
- { path: false, name: "透析管理" },
|
160
|
|
- { path: "dialysis/board", name: "数据看板" }
|
|
159
|
+ { path: false, name: '透析管理' },
|
|
160
|
+ { path: 'dialysis/board', name: '数据看板' }
|
161
|
161
|
],
|
162
|
|
- orgname: "",
|
163
|
|
- today: "今天",
|
164
|
|
- week: "--",
|
165
|
|
- timer:null,
|
166
|
|
- rightItem: "board-right-menu-item",
|
|
162
|
+ orgname: '',
|
|
163
|
+ today: '今天',
|
|
164
|
+ week: '--',
|
|
165
|
+ timer: null,
|
|
166
|
+ rightItem: 'board-right-menu-item',
|
167
|
167
|
boardData: [],
|
168
|
168
|
showTime: 120,
|
169
|
169
|
currentPage: 0,
|
170
|
170
|
loading: true,
|
171
|
|
- weekDay: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
172
|
|
- roonOptions: { 1: "上午", 2: "下午", 3: "晚上" },
|
|
171
|
+ weekDay: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
|
172
|
+ roonOptions: { 1: '上午', 2: '下午', 3: '晚上' },
|
173
|
173
|
modeOptions: {}
|
174
|
|
- };
|
|
174
|
+ }
|
175
|
175
|
},
|
176
|
176
|
created() {
|
177
|
|
- var xtuser = this.$store.getters.xt_user;
|
178
|
|
- this.orgname = xtuser.org.org_name;
|
|
177
|
+ var xtuser = this.$store.getters.xt_user
|
|
178
|
+ this.orgname = xtuser.org.org_name
|
179
|
179
|
// this.orgname = "遂溪方济医院";
|
180
|
|
- this.modeOptions = this.$store.getters.treatment_mode;
|
181
|
|
- this.initData();
|
182
|
|
- }, beforeDestroy () {
|
|
180
|
+ this.modeOptions = this.$store.getters.treatment_mode
|
|
181
|
+ this.initData()
|
|
182
|
+ }, beforeDestroy() {
|
183
|
183
|
clearInterval(this.timer)
|
184
|
184
|
this.timer = null
|
185
|
185
|
this.$once('hook:beforeDestroy', () => {
|
|
@@ -188,92 +188,91 @@ export default {
|
188
|
188
|
},
|
189
|
189
|
methods: {
|
190
|
190
|
fullscreenboard: function() {
|
191
|
|
- this.dialogTableVisible = true;
|
|
191
|
+ this.dialogTableVisible = true
|
192
|
192
|
// let routeData = this.$router.resolve({ path: '/fullscreenboard' })
|
193
|
193
|
// window.open(routeData.href, '_blank')
|
194
|
194
|
},
|
195
|
195
|
outfullscreenboard: function() {
|
196
|
|
- this.dialogTableVisible = false;
|
197
|
|
- this.showSetting = false;
|
|
196
|
+ this.dialogTableVisible = false
|
|
197
|
+ this.showSetting = false
|
198
|
198
|
},
|
199
|
199
|
togglefullscreen: function() {
|
200
|
200
|
if (!screenfull.enabled) {
|
201
|
201
|
this.$message({
|
202
|
|
- message: "你的浏览器不支持",
|
203
|
|
- type: "warning"
|
204
|
|
- });
|
205
|
|
- return false;
|
|
202
|
+ message: '你的浏览器不支持',
|
|
203
|
+ type: 'warning'
|
|
204
|
+ })
|
|
205
|
+ return false
|
206
|
206
|
}
|
207
|
|
- screenfull.toggle();
|
208
|
|
- this.showSetting = false;
|
|
207
|
+ screenfull.toggle()
|
|
208
|
+ this.showSetting = false
|
209
|
209
|
},
|
210
|
210
|
openSetting() {
|
211
|
211
|
if (this.showSetting == false) {
|
212
|
|
- this.showSetting = true;
|
|
212
|
+ this.showSetting = true
|
213
|
213
|
} else {
|
214
|
|
- this.showSetting = false;
|
|
214
|
+ this.showSetting = false
|
215
|
215
|
}
|
216
|
216
|
},
|
217
|
217
|
initData: function() {
|
218
|
|
- var _this = this;
|
219
|
|
- var timeOut = this.showTime * 1000;
|
220
|
|
- this.currentPage++;
|
221
|
|
- this.getBoards();
|
|
218
|
+ var _this = this
|
|
219
|
+ var timeOut = this.showTime * 1000
|
|
220
|
+ this.currentPage++
|
|
221
|
+ this.getBoards()
|
222
|
222
|
|
223
|
223
|
this.timer = window.setInterval(() => {
|
224
|
224
|
setTimeout(this.getBoards(), 0)
|
225
|
|
- }, timeOut)
|
226
|
|
-
|
|
225
|
+ }, 120000)
|
227
|
226
|
},
|
228
|
227
|
getBoards: function() {
|
229
|
228
|
getBoards(this.currentPage).then(response => {
|
230
|
|
- this.loading = false;
|
231
|
|
- var r = response.data;
|
|
229
|
+ this.loading = false
|
|
230
|
+ var r = response.data
|
232
|
231
|
if (r.state == 0) {
|
233
|
|
- this.$message.error(r.msg);
|
234
|
|
- return false;
|
|
232
|
+ this.$message.error(r.msg)
|
|
233
|
+ return false
|
235
|
234
|
} else {
|
236
|
235
|
if (r.data.boards.length == 0) {
|
237
|
|
- this.currentPage = 1;
|
238
|
|
- this.getBoards();
|
|
236
|
+ this.currentPage = 1
|
|
237
|
+ // this.getBoards()
|
239
|
238
|
} else {
|
240
|
|
- this.today = r.data.today;
|
|
239
|
+ this.today = r.data.today
|
241
|
240
|
this.week =
|
242
|
|
- r.data.week in this.weekDay ? this.weekDay[r.data.week] : "--";
|
243
|
|
- this.boardData = r.data.boards;
|
|
241
|
+ r.data.week in this.weekDay ? this.weekDay[r.data.week] : '--'
|
|
242
|
+ this.boardData = r.data.boards
|
244
|
243
|
}
|
245
|
244
|
}
|
246
|
|
- });
|
|
245
|
+ })
|
247
|
246
|
},
|
248
|
247
|
modeName: function(mode_id) {
|
249
|
|
- return mode_id in this.modeOptions ? this.modeOptions[mode_id].name : "";
|
|
248
|
+ return mode_id in this.modeOptions ? this.modeOptions[mode_id].name : ''
|
250
|
249
|
},
|
251
|
250
|
boradData: function(record) {
|
252
|
251
|
if (record.dialysis_order) {
|
253
|
252
|
if (record.dialysis_order.stage == 2) {
|
254
|
|
- return "已下机";
|
|
253
|
+ return '已下机'
|
255
|
254
|
} else {
|
256
|
|
- return "透析中";
|
|
255
|
+ return '透析中'
|
257
|
256
|
}
|
258
|
257
|
} else if (record.sign) {
|
259
|
|
- return "已签到";
|
|
258
|
+ return '已签到'
|
260
|
259
|
} else {
|
261
|
|
- return "未签到";
|
|
260
|
+ return '未签到'
|
262
|
261
|
}
|
263
|
262
|
},
|
264
|
263
|
nextSchedule: function(nextlist) {
|
265
|
264
|
if (nextlist.length == 0) {
|
266
|
|
- return "——";
|
|
265
|
+ return '——'
|
267
|
266
|
}
|
268
|
|
- var dayTime = parseTime(nextlist[0].schedule_date, "{m}月{d}日");
|
|
267
|
+ var dayTime = parseTime(nextlist[0].schedule_date, '{m}月{d}日')
|
269
|
268
|
var noon =
|
270
|
269
|
nextlist[0].schedule_type in this.roonOptions
|
271
|
|
- ? " " + this.roonOptions[nextlist[0].schedule_type]
|
272
|
|
- : "";
|
273
|
|
- return dayTime + noon;
|
|
270
|
+ ? ' ' + this.roonOptions[nextlist[0].schedule_type]
|
|
271
|
+ : ''
|
|
272
|
+ return dayTime + noon
|
274
|
273
|
}
|
275
|
274
|
}
|
276
|
|
-};
|
|
275
|
+}
|
277
|
276
|
</script>
|
278
|
277
|
|
279
|
278
|
<style lang="scss" scoped>
|