Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

signIn.vue 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <el-button
  6. size="small"
  7. icon="el-icon-menu"
  8. @click="fullscreenboard"
  9. type="primary"
  10. >全屏投影</el-button
  11. >
  12. </div>
  13. <div id="fullscreenbroad" v-show="dialogTableVisible">
  14. <el-row class="fullRow">
  15. <el-button
  16. @click="openSetting"
  17. icon="el-icon-setting"
  18. circle
  19. id="fullscreenbroad-setting"
  20. ></el-button>
  21. <el-button
  22. type="primary"
  23. icon="el-icon-rank"
  24. v-if="showSetting"
  25. id="fullscreenbroad-setting"
  26. @click="togglefullscreen"
  27. >切换模式</el-button
  28. >
  29. <el-button
  30. type="primary"
  31. icon="el-icon-menu"
  32. v-if="showSetting"
  33. id="fullscreenbroad-setting"
  34. @click="outfullscreenboard"
  35. >退出全屏投影</el-button
  36. >
  37. </el-row>
  38. <div class="page_signIn">
  39. <div class="signInTitle">
  40. <div>{{ this.$store.getters.xt_user.org.org_name }}</div>
  41. <div>{{ newdate }}&nbsp;&nbsp;{{ time }}</div>
  42. </div>
  43. <div class="signInMain">
  44. <div style="display: flex;justify-content: space-between;padding:10px;">
  45. <div :class="Object.keys(queueInfo).length>0 ? 'signInMainLeft' : 'signInMainLeft100'">
  46. <div class="signInMainLeftTitle">
  47. <p>排队号</p>
  48. <p>姓名</p>
  49. <p>病历号</p>
  50. <p>签到时间</p>
  51. </div>
  52. <div class="signInList">
  53. <div class="signInListOne" v-for="(item,index) in signInList" :key="index">
  54. <p>
  55. <span v-if="item.schedule_type == 1">上午</span>
  56. <span v-if="item.schedule_type == 2">下午</span>
  57. <span v-if="item.schedule_type == 3">晚上</span>
  58. {{ item.queue_no }}号
  59. </p>
  60. <p>{{ item.patient_name }}</p>
  61. <p>{{ item.dialysis_no }}</p>
  62. <p>{{ item.create_time }}</p>
  63. </div>
  64. </div>
  65. </div>
  66. <div :class="Object.keys(queueInfo).length>0 ? 'signInMainRight' : 'noneSignInMainRight'" v-if='Object.keys(queueInfo).length>0'>
  67. <div class="signInMainRightTitle"><span style="margin:0 auto;" v-if='Object.keys(queueInfo).length>0'>{{ queueInfo.patient_name }}</span></div>
  68. <div class="signInMainRightContent">
  69. <p style="margin: 0 auto;display:flex;align-items: center;" v-if='Object.keys(queueInfo).length>0'><span>排队号&nbsp;</span></p>
  70. <p style="margin: 0 auto;display:flex;align-items: center;" v-if='Object.keys(queueInfo).length>0'>
  71. <span v-if="queueInfo.schedule_type == 1">上午</span>
  72. <span v-if="queueInfo.schedule_type == 2">下午</span>
  73. <span v-if="queueInfo.schedule_type == 3">晚上</span>
  74. <span style="font-size:180px;">{{ queueInfo.queue_no }}号</span>
  75. </p>
  76. </div>
  77. <div class="signInMianRightBottom"><span style="margin:0 auto;" v-if='Object.keys(queueInfo).length>0'>签到成功</span></div>
  78. </div>
  79. </div>
  80. <div class="signInTip">
  81. 温馨提示:请注意排队叫号,依次叫号就诊上机,谢谢配合
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. <div class="app-container">
  87. <div class="page_signIn">
  88. <div class="signInTitle">
  89. <div>{{ this.$store.getters.xt_user.org.org_name }}</div>
  90. <div>{{ newdate }}&nbsp;&nbsp;{{ time }}</div>
  91. </div>
  92. <div class="signInMain">
  93. <div style="display: flex;justify-content: space-between;padding:10px;">
  94. <div :class="Object.keys(queueInfo).length>0 ? 'signInMainLeft' : 'signInMainLeft100'">
  95. <div class="signInMainLeftTitle">
  96. <p>排队号</p>
  97. <p>姓名</p>
  98. <p>病历号</p>
  99. <p>签到时间</p>
  100. </div>
  101. <div class="signInList">
  102. <div class="signInListOne" v-for="(item,index) in signInList" :key="index">
  103. <p>
  104. <span v-if="item.schedule_type == 1">上午</span>
  105. <span v-if="item.schedule_type == 2">下午</span>
  106. <span v-if="item.schedule_type == 3">晚上</span>
  107. {{ item.queue_no }}号
  108. </p>
  109. <p>{{ item.patient_name }}</p>
  110. <p>{{ item.dialysis_no }}</p>
  111. <p>{{ item.create_time }}</p>
  112. </div>
  113. </div>
  114. </div>
  115. <div :class="Object.keys(queueInfo).length>0 ? 'signInMainRight' : 'noneSignInMainRight'">
  116. <div class="signInMainRightTitle"><span style="margin:0 auto;" v-if='Object.keys(queueInfo).length>0'>{{ queueInfo.patient_name }}</span></div>
  117. <div class="signInMainRightContent">
  118. <p style="margin: 0 auto;display:flex;align-items: center;" v-if='Object.keys(queueInfo).length>0'><span>排队号&nbsp;</span></p>
  119. <p style="margin: 0 auto;display:flex;align-items: center;" v-if='Object.keys(queueInfo).length>0'>
  120. <span v-if="queueInfo.schedule_type == 1">上午</span>
  121. <span v-if="queueInfo.schedule_type == 2">下午</span>
  122. <span v-if="queueInfo.schedule_type == 3">晚上</span>
  123. <span style="font-size:180px;">{{ queueInfo.queue_no }}号</span>
  124. </p>
  125. </div>
  126. <div class="signInMianRightBottom"><span style="margin:0 auto;" v-if='Object.keys(queueInfo).length>0'>签到成功</span></div>
  127. </div>
  128. </div>
  129. <div class="signInTip">
  130. 温馨提示:请注意排队叫号,依次叫号就诊上机,谢谢配合
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. </template>
  137. <script>
  138. const moment = require('moment')
  139. import BreadCrumb from "../components/bread-crumb";
  140. import screenfull from "screenfull";
  141. export default {
  142. components:{
  143. BreadCrumb
  144. },
  145. inject: ['reload'],
  146. data(){
  147. return{
  148. crumbs: [
  149. { path: false, name: "签到排队" },
  150. { path: false, name: "签到窗口" }
  151. ],
  152. dialogTableVisible:false,
  153. showSetting: false,
  154. signInList:[],
  155. queueInfo:{},
  156. count:0,
  157. page:1,
  158. timer:null,
  159. timerID:null,
  160. time:'',
  161. newdate:'',
  162. ds:null,
  163. newTimes:null
  164. }
  165. },
  166. computed: {
  167. websocket() {
  168. return this.$store.state.user.websocket;
  169. },
  170. },
  171. created(){
  172. if(sessionStorage.getItem('signIn') != null){
  173. if(sessionStorage.getItem('signIn') == 1){
  174. this.dialogTableVisible = true
  175. }
  176. sessionStorage.removeItem('signIn')
  177. }
  178. // if(sessionStorage.getItem('signInKey') != null){
  179. // if(sessionStorage.getItem('signInKey') == 1){
  180. // this.dialogTableVisible = true
  181. // }
  182. // }
  183. this.initData = {
  184. cmd: "queue/join",
  185. data: {type:1,page:1,size:10},
  186. };
  187. this.websocketSend(this.initData)
  188. },
  189. beforeMount() {
  190. this.websocketMess();
  191. },
  192. mounted(){
  193. this.timer = setInterval(() => {
  194. if(this.page < Math.ceil(this.count / 10)){
  195. console.log('执行')
  196. this.page++
  197. let obj = {
  198. cmd: "queue/queuelistbyq",
  199. data: {page:this.page,size:10,sort:1}
  200. };
  201. this.websocketSend(obj)
  202. }else{
  203. console.log('执行2222')
  204. this.page = 1
  205. let newobj = {
  206. cmd: "queue/queuelistbyq",
  207. data: {page:this.page,size:10,sort:1}
  208. };
  209. this.websocketSend(newobj)
  210. }
  211. }, 20000);
  212. this.timerID = setInterval(() => {
  213. this.updateTime()
  214. }, 1000);
  215. // this.updateTime();
  216. this.newTimes = setInterval(() => {
  217. // this.reload()
  218. sessionStorage.setItem('signIn',1);
  219. window.location.reload()
  220. }, 1000 * 60 * 30);
  221. },
  222. beforeDestroy(){
  223. clearInterval(this.timer);  // 清除定时器
  224. clearInterval(this.timerID);  // 清除定时器
  225. clearInterval(this.newTimes);  // 清除定时器
  226. this.newTimes = null
  227. let obj = {
  228. cmd: "queue/unjoin",
  229. data: {type:1},
  230. };
  231. this.websocketSend(obj)
  232. },
  233. methods:{
  234. websocketSend(data) {
  235. try {
  236. this.websocket.send(JSON.stringify(data))
  237. } catch (error) {
  238. this.showError = true;
  239. this.showIndex = 4;
  240. this.errorInfo = "网络异常,请稍后退出重试!";
  241. }
  242. },
  243. websocketMess() {
  244. this.websocket.onmessage = e => {
  245. let res = JSON.parse(e.data);
  246. // let res = re.data;
  247. console.log('res',res)
  248. if(res.channel == 'queue/join'){
  249. if(res.data.type == 1){
  250. this.signInList = res.data.patientQueueList.data
  251. this.count = res.data.patientQueueList.count
  252. this.signInList.map(item => {
  253. item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  254. })
  255. }
  256. }else if(res.channel == "patientQueueInfo"){
  257. clearTimeout(this.ds)
  258. this.ds = null
  259. this.queueInfo = res.data.queueInfo
  260. this.page = 1
  261. let obj = {
  262. cmd: "queue/queuelistbyq",
  263. data: {page:1,size:10,sort:1}
  264. };
  265. this.websocketSend(obj)
  266. this.ds = setTimeout(() => {
  267. this.queueInfo = {}
  268. }, 60000);
  269. }else if(res.channel == 'queue/queuelist'){
  270. console.log(11111111111,res.data)
  271. this.signInList = res.data.patientQueueList.data
  272. this.count = res.data.patientQueueList.count
  273. this.signInList.map(item => {
  274. item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  275. })
  276. }else if(res.channel == 'queue/queuelistbyq'){
  277. console.log(11111111111,res.data)
  278. this.signInList = res.data.patientQueueList.data
  279. this.count = res.data.patientQueueList.count
  280. this.signInList.map(item => {
  281. item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  282. })
  283. }
  284. // console.log("action", re.action);
  285. // console.log("data", JSON.stringify(res));
  286. }
  287. },
  288. updateTime() {
  289. var cd = new Date();
  290. var week = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
  291. this.time = this.zeroPadding(cd.getHours(), 2) + ':' + this.zeroPadding(cd.getMinutes(), 2) + ':' + this.zeroPadding(cd.getSeconds(), 2) + ' (' + week[cd.getDay()] + ")";
  292. this.newdate = this.zeroPadding(cd.getFullYear(), 4) + '-' + this.zeroPadding(cd.getMonth() + 1, 2) + '-' + this.zeroPadding(cd.getDate(), 2);
  293. },
  294. zeroPadding(num, digit) {
  295. var zero = '';
  296. for (var i = 0; i < digit; i++) {
  297. zero += '0';
  298. }
  299. return (zero + num).slice(-digit);
  300. },
  301. fullscreenboard: function() {
  302. sessionStorage.setItem('signInKey',1);
  303. this.dialogTableVisible = true;
  304. // let routeData = this.$router.resolve({ path: '/fullscreenboard' })
  305. // window.open(routeData.href, '_blank')
  306. },
  307. outfullscreenboard: function() {
  308. this.dialogTableVisible = false;
  309. this.showSetting = false;
  310. },
  311. togglefullscreen: function() {
  312. if (!screenfull.enabled) {
  313. this.$message({
  314. message: "你的浏览器不支持",
  315. type: "warning"
  316. });
  317. return false;
  318. }
  319. screenfull.toggle();
  320. this.showSetting = false;
  321. },
  322. openSetting() {
  323. if (this.showSetting == false) {
  324. this.showSetting = true;
  325. } else {
  326. this.showSetting = false;
  327. }
  328. },
  329. },
  330. }
  331. </script>
  332. <style lang="scss" scoped>
  333. .page_signIn{
  334. .signInTitle{
  335. height: 50px;
  336. background: #1A82BF;
  337. display: flex;
  338. justify-content: space-between;
  339. align-items: center;
  340. padding: 0 20px;
  341. color:#fff;
  342. font-size: 20px;
  343. font-weight: 600;
  344. }
  345. .signInMain{
  346. background: linear-gradient(0deg, #76ECEC, #479CD2);
  347. height: 1040px;
  348. }
  349. .signInMainLeft{
  350. width:69%;
  351. height: 980px;
  352. border-radius: 15px;
  353. }
  354. .signInMainLeft100{
  355. width:100%;
  356. height: 980px;
  357. border-radius: 15px;
  358. }
  359. .signInMainLeftTitle{
  360. display: flex;
  361. justify-content: space-between;
  362. align-items: center;
  363. color:#fff;
  364. font-size: 38px;
  365. font-weight: 600;
  366. height:80px;
  367. background: #1A82BF;
  368. border-radius: 15px 15px 0 0;
  369. >p{
  370. width:25%;
  371. text-align: center;
  372. }
  373. }
  374. .signInList{
  375. font-size: 36px;
  376. font-weight: 600;
  377. >div:nth-child(1){
  378. font-size: 50px;
  379. }
  380. >div:nth-child(2){
  381. font-size: 50px;
  382. }
  383. >div:nth-child(3){
  384. font-size: 50px;
  385. }
  386. >div:nth-child(odd){
  387. background: #F9FDFF;
  388. }
  389. >div:nth-child(even){
  390. background: #CCEBFF;
  391. }
  392. >div:last-child{
  393. border-radius: 0 0 15px 15px;
  394. }
  395. .signInListOne{
  396. height:90px;
  397. display: flex;
  398. justify-content: space-between;
  399. align-items: center;
  400. color:#1C6895;
  401. >p{
  402. width:25%;
  403. text-align: center;
  404. }
  405. }
  406. }
  407. .signInMainRight{
  408. width: 30%;
  409. height: 980px;
  410. }
  411. .noneSignInMainRight{
  412. display: none;
  413. }
  414. .signInMainRightTitle{
  415. height: 260px;
  416. border-radius: 15px 15px 0 0;
  417. background: #1A82BF;
  418. font-size: 120px;
  419. font-weight: 600;
  420. color:#fff;
  421. display: flex;
  422. align-items: center;
  423. justify-content: space-between;
  424. }
  425. .signInMainRightContent{
  426. background: #F9FDFF;
  427. height: 450px;
  428. text-align: center;
  429. font-weight: 600;
  430. color:#1C6895;
  431. box-sizing: border-box;
  432. font-size:90px;
  433. display:flex;
  434. align-items:center;
  435. flex-direction: column;
  436. justify-content: space-around;
  437. }
  438. .signInMianRightBottom{
  439. height: 270px;
  440. background: #1A82BF;
  441. border-radius: 0 0 15px 15px;
  442. font-size: 90px;
  443. font-weight: 600;
  444. color:#fff;
  445. display: flex;
  446. justify-content: space-between;
  447. align-items: center;
  448. }
  449. .signInTip{
  450. color:#fff;
  451. font-size: 18px;
  452. font-weight: 600;
  453. display: flex;
  454. align-items: center;
  455. height: 50px;
  456. background: linear-gradient(0deg, #42A9E7, #3686B9, #42A9E7);
  457. margin-top: 1px;
  458. padding-left:20px;
  459. }
  460. }
  461. #fullscreenbroad {
  462. position: fixed;
  463. top: 0;
  464. right: 0;
  465. bottom: 0;
  466. left: 0;
  467. overflow: auto;
  468. margin: 0;
  469. background: #fff;
  470. padding: 20px;
  471. z-index:5000;
  472. }
  473. #fullscreenbroad #fullscreenbroad-setting {
  474. float: right;
  475. }
  476. #fullscreenbroad .el-button + .el-button {
  477. margin-left: 0px;
  478. }
  479. #fullscreenbroad .el-button:nth-child(1) {
  480. margin-left: 10px;
  481. }
  482. #fullscreenbroad .el-button:nth-child(2) {
  483. margin-left: 10px;
  484. }
  485. .fullRow{
  486. margin-bottom: 10px;
  487. }
  488. </style>