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

signIn.vue 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  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: "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: "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/queuelist",
  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. }
  277. // console.log("action", re.action);
  278. // console.log("data", JSON.stringify(res));
  279. }
  280. },
  281. updateTime() {
  282. var cd = new Date();
  283. var week = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
  284. this.time = this.zeroPadding(cd.getHours(), 2) + ':' + this.zeroPadding(cd.getMinutes(), 2) + ':' + this.zeroPadding(cd.getSeconds(), 2) + ' (' + week[cd.getDay()] + ")";
  285. this.newdate = this.zeroPadding(cd.getFullYear(), 4) + '-' + this.zeroPadding(cd.getMonth() + 1, 2) + '-' + this.zeroPadding(cd.getDate(), 2);
  286. },
  287. zeroPadding(num, digit) {
  288. var zero = '';
  289. for (var i = 0; i < digit; i++) {
  290. zero += '0';
  291. }
  292. return (zero + num).slice(-digit);
  293. },
  294. fullscreenboard: function() {
  295. sessionStorage.setItem('signInKey',1);
  296. this.dialogTableVisible = true;
  297. // let routeData = this.$router.resolve({ path: '/fullscreenboard' })
  298. // window.open(routeData.href, '_blank')
  299. },
  300. outfullscreenboard: function() {
  301. this.dialogTableVisible = false;
  302. this.showSetting = false;
  303. },
  304. togglefullscreen: function() {
  305. if (!screenfull.enabled) {
  306. this.$message({
  307. message: "你的浏览器不支持",
  308. type: "warning"
  309. });
  310. return false;
  311. }
  312. screenfull.toggle();
  313. this.showSetting = false;
  314. },
  315. openSetting() {
  316. if (this.showSetting == false) {
  317. this.showSetting = true;
  318. } else {
  319. this.showSetting = false;
  320. }
  321. },
  322. },
  323. }
  324. </script>
  325. <style lang="scss" scoped>
  326. .page_signIn{
  327. .signInTitle{
  328. height: 50px;
  329. background: #1A82BF;
  330. display: flex;
  331. justify-content: space-between;
  332. align-items: center;
  333. padding: 0 20px;
  334. color:#fff;
  335. font-size: 20px;
  336. font-weight: 600;
  337. }
  338. .signInMain{
  339. background: linear-gradient(0deg, #76ECEC, #479CD2);
  340. height: 1040px;
  341. }
  342. .signInMainLeft{
  343. width:69%;
  344. height: 980px;
  345. border-radius: 15px;
  346. }
  347. .signInMainLeft100{
  348. width:100%;
  349. height: 980px;
  350. border-radius: 15px;
  351. }
  352. .signInMainLeftTitle{
  353. display: flex;
  354. justify-content: space-between;
  355. align-items: center;
  356. color:#fff;
  357. font-size: 38px;
  358. font-weight: 600;
  359. height:80px;
  360. background: #1A82BF;
  361. border-radius: 15px 15px 0 0;
  362. >p{
  363. width:25%;
  364. text-align: center;
  365. }
  366. }
  367. .signInList{
  368. font-size: 36px;
  369. font-weight: 600;
  370. >div:nth-child(1){
  371. font-size: 50px;
  372. }
  373. >div:nth-child(2){
  374. font-size: 50px;
  375. }
  376. >div:nth-child(3){
  377. font-size: 50px;
  378. }
  379. >div:nth-child(odd){
  380. background: #F9FDFF;
  381. }
  382. >div:nth-child(even){
  383. background: #CCEBFF;
  384. }
  385. >div:last-child{
  386. border-radius: 0 0 15px 15px;
  387. }
  388. .signInListOne{
  389. height:90px;
  390. display: flex;
  391. justify-content: space-between;
  392. align-items: center;
  393. color:#1C6895;
  394. >p{
  395. width:25%;
  396. text-align: center;
  397. }
  398. }
  399. }
  400. .signInMainRight{
  401. width: 30%;
  402. height: 980px;
  403. }
  404. .noneSignInMainRight{
  405. display: none;
  406. }
  407. .signInMainRightTitle{
  408. height: 260px;
  409. border-radius: 15px 15px 0 0;
  410. background: #1A82BF;
  411. font-size: 120px;
  412. font-weight: 600;
  413. color:#fff;
  414. display: flex;
  415. align-items: center;
  416. justify-content: space-between;
  417. }
  418. .signInMainRightContent{
  419. background: #F9FDFF;
  420. height: 450px;
  421. text-align: center;
  422. font-weight: 600;
  423. color:#1C6895;
  424. box-sizing: border-box;
  425. font-size:90px;
  426. display:flex;
  427. align-items:center;
  428. flex-direction: column;
  429. justify-content: space-around;
  430. }
  431. .signInMianRightBottom{
  432. height: 270px;
  433. background: #1A82BF;
  434. border-radius: 0 0 15px 15px;
  435. font-size: 90px;
  436. font-weight: 600;
  437. color:#fff;
  438. display: flex;
  439. justify-content: space-between;
  440. align-items: center;
  441. }
  442. .signInTip{
  443. color:#fff;
  444. font-size: 18px;
  445. font-weight: 600;
  446. display: flex;
  447. align-items: center;
  448. height: 50px;
  449. background: linear-gradient(0deg, #42A9E7, #3686B9, #42A9E7);
  450. margin-top: 1px;
  451. padding-left:20px;
  452. }
  453. }
  454. #fullscreenbroad {
  455. position: fixed;
  456. top: 0;
  457. right: 0;
  458. bottom: 0;
  459. left: 0;
  460. overflow: auto;
  461. margin: 0;
  462. background: #fff;
  463. padding: 20px;
  464. z-index:5000;
  465. }
  466. #fullscreenbroad #fullscreenbroad-setting {
  467. float: right;
  468. }
  469. #fullscreenbroad .el-button + .el-button {
  470. margin-left: 0px;
  471. }
  472. #fullscreenbroad .el-button:nth-child(1) {
  473. margin-left: 10px;
  474. }
  475. #fullscreenbroad .el-button:nth-child(2) {
  476. margin-left: 10px;
  477. }
  478. .fullRow{
  479. margin-bottom: 10px;
  480. }
  481. </style>