lineUp.vue 41KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869
  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. <!-- 全屏状态 -->
  14. <div id="fullscreenbroad" v-show="dialogTableVisible">
  15. <el-row class="fullRow">
  16. <el-button
  17. @click="openSetting"
  18. icon="el-icon-setting"
  19. circle
  20. id="fullscreenbroad-setting"
  21. ></el-button>
  22. <el-button
  23. type="primary"
  24. icon="el-icon-rank"
  25. v-if="showSetting"
  26. id="fullscreenbroad-setting"
  27. @click="togglefullscreen"
  28. >切换模式</el-button
  29. >
  30. <el-button
  31. type="primary"
  32. icon="el-icon-menu"
  33. v-if="showSetting"
  34. id="fullscreenbroad-setting"
  35. @click="outfullscreenboard"
  36. >退出全屏投影</el-button
  37. >
  38. </el-row>
  39. <div class="page_lineUp">
  40. <div class="lineUpTitle">
  41. <div>{{ this.$store.getters.xt_user.org.org_name }}<span>&nbsp;&nbsp;温馨提示:请注意排队叫号,依次叫号就诊上机,谢谢配合</span></div>
  42. <div>{{ newdate }}&nbsp;&nbsp;{{ time }}</div>
  43. </div>
  44. <div class="lineUpMain">
  45. <div class="lineUpMainLeft">
  46. <div class="lineUpMainLeftTitle">
  47. <p style="width:12%">排队号</p>
  48. <p style="width:14%">姓名</p>
  49. <p style="width:14%">病例号</p>
  50. <p style="width:14%">床位号</p>
  51. <p style="width:14%">治疗状态</p>
  52. <p style="width:14%">上机时间</p>
  53. <p style="width:16%">预计下机时间</p>
  54. </div>
  55. <div class="lineUpList">
  56. <div class="lineUpListOne" v-for="(item,index) in lineUpList" :key="index">
  57. <p style="width:12%">
  58. <span v-if="item.schedule_type == 1">上午</span>
  59. <span v-if="item.schedule_type == 2">下午</span>
  60. <span v-if="item.schedule_type == 3">晚上</span>
  61. {{ item.queue_no }}号
  62. </p>
  63. <p style="width:14%">{{ item.patient_name }}</p>
  64. <p style="width:14%">{{ item.dialysis_no }}</p>
  65. <p style="width:14%">{{ item.partition_name + item.bed_name }}</p>
  66. <p style="width:14%">
  67. <span v-if="item.status == 1">待接诊</span>
  68. <span v-if="item.status == 2">接诊中</span>
  69. <span v-if="item.status == 3">待上机</span>
  70. <span v-if="item.status == 4">透析中</span>
  71. <span v-if="item.status == 5">已下机</span>
  72. </p>
  73. <p style="width:14%">{{ item.start_time ? getDates(item.start_time) : '--' }}</p>
  74. <p style="width:16%">{{ item.end_time && item.start_time ? getDates(item.end_time) : '--' }}</p>
  75. </div>
  76. </div>
  77. </div>
  78. <div class="callingBox">
  79. <div :class="(queueConfig.jzjhyc == 1 && queueConfig.sjjhyc == 0) ? 'callingBoxLeft1' : 'callingBoxLeft'" v-if="queueConfig.jzjhyc == 1">
  80. <div class="callingTitle"><span style="margin: 0 auto;">接<br />诊<br />叫<br />号</span></div>
  81. <div style="flex: 1;justify-content: space-between;display: flex;flex-direction: column;">
  82. <div class="callingTop" style="margin-bottom:10px;">
  83. <div class="callingTopTip"><span style="margin: 0 auto;">正在<br />接诊</span></div>
  84. <div class="callingContent">
  85. <div>
  86. <p><span v-for="(item,index) in (receivingPatient || '').slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
  87. <p><span v-for="(item,index) in (receivingPatient || '').slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
  88. </div>
  89. </div>
  90. </div>
  91. <div class="callingTop" style="border-radius: 0 0 15px 0;">
  92. <div class="callingTopTip"><span style="margin: 0 auto;">等待<br />接诊</span></div>
  93. <div class="callingContent">
  94. <div>
  95. <p><span v-for="(item,index) in (waitDoctorList || '').slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
  96. <p><span v-for="(item,index) in (waitDoctorList || '').slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. <div :class="(queueConfig.jzjhyc == 0 && queueConfig.sjjhyc == 1) ? 'callingBoxLeft1' : 'callingBoxLeft'" v-if="queueConfig.sjjhyc == 1">
  103. <div class="callingTitle newCallingTitle"><span style="margin: 0 auto;">上<br />机<br />叫<br />号</span></div>
  104. <div style="flex: 1;justify-content: space-between;display: flex;flex-direction: column;">
  105. <div class="callingTop" style="margin-bottom:10px;">
  106. <div class="callingTopTip newCallingTopTip"><span style="margin: 0 auto;">正在<br />叫号</span></div>
  107. <div class="callingContent newCallingContent">
  108. <div>
  109. <p><span v-for="(item,index) in (upPatientList || '').slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
  110. <p><span v-for="(item,index) in (upPatientList || '').slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
  111. </div>
  112. </div>
  113. </div>
  114. <div class="callingTop" style="border-radius: 0 0 15px 0;">
  115. <div class="callingTopTip newCallingTopTip"><span style="margin: 0 auto;">等待<br />叫号</span></div>
  116. <div class="callingContent newCallingContent">
  117. <div>
  118. <p><span v-for="(item,index) in (receivingPatient || '').slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
  119. <p><span v-for="(item,index) in (receivingPatient || '').slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. <!-- <div class="page_lineUp">
  129. <div class="lineUpTitle">
  130. <div>{{ this.$store.getters.xt_user.org.org_name }}<span>&nbsp;&nbsp;温馨提示:请注意排队叫号,依次叫号就诊上机,谢谢配合</span></div>
  131. <div>{{ newdate }}&nbsp;&nbsp;{{ time }}</div>
  132. </div>
  133. <div class="lineUpMain">
  134. <div class="lineUpMainLeft">
  135. <div class="lineUpMainLeftTitle">
  136. <p style="width:12%">排队号</p>
  137. <p style="width:14%">姓名</p>
  138. <p style="width:14%">病例号</p>
  139. <p style="width:14%">床位号</p>
  140. <p style="width:14%">治疗状态</p>
  141. <p style="width:14%">上机时间</p>
  142. <p style="width:16%">预计下机时间</p>
  143. </div>
  144. <div class="lineUpList">
  145. <div class="lineUpListOne" v-for="(item,index) in 6" :key="index">
  146. <p style="width:12%">
  147. <span>上午</span>
  148. {{ 89 }}号
  149. </p>
  150. <p style="width:14%">{{ '张三' }}</p>
  151. <p style="width:14%">{{ 3023 }}</p>
  152. <p style="width:14%">{{ 'A区' + '098' }}</p>
  153. <p style="width:14%">
  154. <span>待接诊</span>
  155. </p>
  156. <p style="width:14%">07:38:00</p>
  157. <p style="width:16%">07:38:00</p>
  158. </div>
  159. </div>
  160. </div>
  161. <div class="callingBox">
  162. <div class="callingBoxLeft">
  163. <div class="callingTitle"><span style="margin: 0 auto;">接<br />诊<br />叫<br />号</span></div>
  164. <div style="flex: 1;justify-content: space-between;display: flex;flex-direction: column;">
  165. <div class="callingTop">
  166. <div class="callingTopTip"><span style="margin: 0 auto;">正在<br />接诊</span></div>
  167. <div class="callingContent">
  168. <div>
  169. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  170. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  171. </div>
  172. </div>
  173. </div>
  174. <div class="callingTop" style="border-radius: 0 0 15px 0;">
  175. <div class="callingTopTip"><span style="margin: 0 auto;">等待<br />接诊</span></div>
  176. <div class="callingContent">
  177. <div>
  178. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  179. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  180. </div>
  181. </div>
  182. </div>
  183. </div>
  184. </div>
  185. <div class="callingBoxLeft">
  186. <div class="callingTitle newCallingTitle"><span style="margin: 0 auto;">上<br />机<br />叫<br />号</span></div>
  187. <div style="flex: 1;justify-content: space-between;display: flex;flex-direction: column;">
  188. <div class="callingTop">
  189. <div class="callingTopTip newCallingTopTip"><span style="margin: 0 auto;">正在<br />叫号</span></div>
  190. <div class="callingContent newCallingContent">
  191. <div>
  192. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  193. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  194. </div>
  195. </div>
  196. </div>
  197. <div class="callingTop" style="border-radius: 0 0 15px 0;">
  198. <div class="callingTopTip newCallingTopTip"><span style="margin: 0 auto;">等待<br />叫号</span></div>
  199. <div class="callingContent newCallingContent">
  200. <div>
  201. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  202. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  203. </div>
  204. </div>
  205. </div>
  206. </div>
  207. </div>
  208. </div>
  209. </div>
  210. </div> -->
  211. </div>
  212. <div class="app-container">
  213. <div class="page_lineUp">
  214. <div class="lineUpTitle">
  215. <div>{{ this.$store.getters.xt_user.org.org_name }}<span>&nbsp;&nbsp;温馨提示:请注意排队叫号,依次叫号就诊上机,谢谢配合</span></div>
  216. <div>{{ newdate }}&nbsp;&nbsp;{{ time }}</div>
  217. </div>
  218. <div class="lineUpMain">
  219. <div class="lineUpMainLeft">
  220. <div class="lineUpMainLeftTitle">
  221. <p style="width:12%">排队号</p>
  222. <p style="width:14%">姓名</p>
  223. <p style="width:14%">病例号</p>
  224. <p style="width:14%">床位号</p>
  225. <p style="width:14%">治疗状态</p>
  226. <p style="width:14%">上机时间</p>
  227. <p style="width:16%">预计下机时间</p>
  228. </div>
  229. <div class="lineUpList">
  230. <div class="lineUpListOne" v-for="(item,index) in lineUpList" :key="index">
  231. <p style="width:12%">
  232. <span v-if="item.schedule_type == 1">上午</span>
  233. <span v-if="item.schedule_type == 2">下午</span>
  234. <span v-if="item.schedule_type == 3">晚上</span>
  235. {{ item.queue_no }}号
  236. </p>
  237. <p style="width:14%">{{ item.patient_name }}</p>
  238. <p style="width:14%">{{ item.dialysis_no }}</p>
  239. <p style="width:14%">{{ item.partition_name + item.bed_name }}</p>
  240. <p style="width:14%">
  241. <span v-if="item.status == 1">待接诊</span>
  242. <span v-if="item.status == 2">接诊中</span>
  243. <span v-if="item.status == 3">待上机</span>
  244. <span v-if="item.status == 4">透析中</span>
  245. <span v-if="item.status == 5">已下机</span>
  246. </p>
  247. <p style="width:14%">{{ item.start_time ? getDates(item.start_time) : '--' }}</p>
  248. <p style="width:16%">{{ item.end_time && item.start_time ? getDates(item.end_time) : '--' }}</p>
  249. </div>
  250. </div>
  251. </div>
  252. <div class="callingBox">
  253. <div :class="(queueConfig.jzjhyc == 1 && queueConfig.sjjhyc == 0) ? 'callingBoxLeft1' : 'callingBoxLeft'" v-if="queueConfig.jzjhyc == 1">
  254. <div class="callingTitle"><span style="margin: 0 auto;">接<br />诊<br />叫<br />号</span></div>
  255. <div style="flex: 1;justify-content: space-between;display: flex;flex-direction: column;">
  256. <div class="callingTop" style="margin-bottom:10px;">
  257. <div class="callingTopTip"><span style="margin: 0 auto;">正在<br />接诊</span></div>
  258. <div class="callingContent">
  259. <div>
  260. <p><span v-for="(item,index) in (receivingPatient || '').slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
  261. <p><span v-for="(item,index) in (receivingPatient || '').slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
  262. </div>
  263. </div>
  264. </div>
  265. <div class="callingTop" style="border-radius: 0 0 15px 0;">
  266. <div class="callingTopTip"><span style="margin: 0 auto;">等待<br />接诊</span></div>
  267. <div class="callingContent">
  268. <div>
  269. <p><span v-for="(item,index) in (waitDoctorList || '').slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
  270. <p><span v-for="(item,index) in (waitDoctorList || '').slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
  271. </div>
  272. </div>
  273. </div>
  274. </div>
  275. </div>
  276. <div :class="(queueConfig.jzjhyc == 0 && queueConfig.sjjhyc == 1) ? 'callingBoxLeft1' : 'callingBoxLeft'" v-if="queueConfig.sjjhyc == 1">
  277. <div class="callingTitle newCallingTitle"><span style="margin: 0 auto;">上<br />机<br />叫<br />号</span></div>
  278. <div style="flex: 1;justify-content: space-between;display: flex;flex-direction: column;">
  279. <div class="callingTop" style="margin-bottom:10px;">
  280. <div class="callingTopTip newCallingTopTip"><span style="margin: 0 auto;">正在<br />叫号</span></div>
  281. <div class="callingContent newCallingContent">
  282. <div>
  283. <p><span v-for="(item,index) in (upPatientList || '').slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
  284. <p><span v-for="(item,index) in (upPatientList || '').slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
  285. </div>
  286. </div>
  287. </div>
  288. <div class="callingTop" style="border-radius: 0 0 15px 0;">
  289. <div class="callingTopTip newCallingTopTip"><span style="margin: 0 auto;">等待<br />叫号</span></div>
  290. <div class="callingContent newCallingContent">
  291. <div>
  292. <p><span v-for="(item,index) in (receivingPatient || '').slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
  293. <p><span v-for="(item,index) in (receivingPatient || '').slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
  294. </div>
  295. </div>
  296. </div>
  297. </div>
  298. </div>
  299. </div>
  300. </div>
  301. </div>
  302. <!-- <div class="page_lineUp">
  303. <div class="lineUpTitle">
  304. <div>{{ this.$store.getters.xt_user.org.org_name }}<span>&nbsp;&nbsp;温馨提示:请注意排队叫号,依次叫号就诊上机,谢谢配合</span></div>
  305. <div>{{ newdate }}&nbsp;&nbsp;{{ time }}</div>
  306. </div>
  307. <div class="lineUpMain">
  308. <div class="lineUpMainLeft">
  309. <div class="lineUpMainLeftTitle">
  310. <p style="width:12%">排队号</p>
  311. <p style="width:14%">姓名</p>
  312. <p style="width:14%">病例号</p>
  313. <p style="width:14%">床位号</p>
  314. <p style="width:14%">治疗状态</p>
  315. <p style="width:14%">上机时间</p>
  316. <p style="width:16%">预计下机时间</p>
  317. </div>
  318. <div class="lineUpList">
  319. <div class="lineUpListOne" v-for="(item,index) in 6" :key="index">
  320. <p style="width:12%">
  321. <span>上午</span>
  322. {{ 89 }}号
  323. </p>
  324. <p style="width:14%">{{ '张三' }}</p>
  325. <p style="width:14%">{{ 3023 }}</p>
  326. <p style="width:14%">{{ 'A区' + '098' }}</p>
  327. <p style="width:14%">
  328. <span>待接诊</span>
  329. </p>
  330. <p style="width:14%">07:38:00</p>
  331. <p style="width:16%">07:38:00</p>
  332. </div>
  333. </div>
  334. </div>
  335. <div class="callingBox">
  336. <div class="callingBoxLeft">
  337. <div class="callingTitle"><span style="margin: 0 auto;">接<br />诊<br />叫<br />号</span></div>
  338. <div style="flex: 1;justify-content: space-between;display: flex;flex-direction: column;">
  339. <div class="callingTop">
  340. <div class="callingTopTip"><span style="margin: 0 auto;">正在<br />接诊</span></div>
  341. <div class="callingContent">
  342. <div>
  343. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  344. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  345. </div>
  346. </div>
  347. </div>
  348. <div class="callingTop" style="border-radius: 0 0 15px 0;">
  349. <div class="callingTopTip"><span style="margin: 0 auto;">等待<br />接诊</span></div>
  350. <div class="callingContent">
  351. <div>
  352. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  353. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  354. </div>
  355. </div>
  356. </div>
  357. </div>
  358. </div>
  359. <div class="callingBoxLeft">
  360. <div class="callingTitle newCallingTitle"><span style="margin: 0 auto;">上<br />机<br />叫<br />号</span></div>
  361. <div style="flex: 1;justify-content: space-between;display: flex;flex-direction: column;">
  362. <div class="callingTop">
  363. <div class="callingTopTip newCallingTopTip"><span style="margin: 0 auto;">正在<br />叫号</span></div>
  364. <div class="callingContent newCallingContent">
  365. <div>
  366. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  367. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  368. </div>
  369. </div>
  370. </div>
  371. <div class="callingTop" style="border-radius: 0 0 15px 0;">
  372. <div class="callingTopTip newCallingTopTip"><span style="margin: 0 auto;">等待<br />叫号</span></div>
  373. <div class="callingContent newCallingContent">
  374. <div>
  375. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  376. <p><span v-for="(item,index) in 3" :key="index">张三三、</span></p>
  377. </div>
  378. </div>
  379. </div>
  380. </div>
  381. </div>
  382. </div>
  383. </div>
  384. </div> -->
  385. </div>
  386. </div>
  387. </template>
  388. <script>
  389. const moment = require('moment')
  390. import BreadCrumb from "../components/bread-crumb";
  391. import screenfull from "screenfull";
  392. export default {
  393. components:{
  394. BreadCrumb
  395. },
  396. inject: ['reload'],
  397. data(){
  398. return{
  399. crumbs: [
  400. { path: false, name: "签到排队" },
  401. { path: false, name: "排队窗口" }
  402. ],
  403. dialogTableVisible:false,
  404. showSetting: false,
  405. lineUpList:[],
  406. count:0,
  407. page:1,
  408. timer:null,
  409. queueConfig:{
  410. qhsj:10,
  411. },
  412. receivingPatient:[],
  413. waitDoctorList:[],
  414. upPatientList:[],
  415. patient_id:'',
  416. timerID:null,
  417. time:'',
  418. newdate:'',
  419. voiceNum:1,
  420. voiceTime:null,
  421. voice:true,
  422. a:1,
  423. newTimes:null
  424. }
  425. },
  426. computed: {
  427. websocket() {
  428. return this.$store.state.user.websocket;
  429. },
  430. },
  431. created(){
  432. if(sessionStorage.getItem('lineUpKey') != null){
  433. if(sessionStorage.getItem('lineUpKey') == 1){
  434. this.dialogTableVisible = true
  435. }
  436. sessionStorage.removeItem('lineUpKey')
  437. sessionStorage.removeItem('signInKey')
  438. }
  439. this.initData = {
  440. cmd: "queue/join",
  441. data: {type:2,page:1,size:6},
  442. };
  443. this.websocketSend(this.initData)
  444. let newobj = {
  445. cmd: "queue/callreturn",
  446. data: {patient_id:0},
  447. };
  448. this.websocketSend(newobj)
  449. },
  450. beforeMount() {
  451. if (this.websocket) {
  452. if (this.websocket.readyState == 1) {
  453. console.log('执行1')
  454. this.websocketMess();
  455. } else {
  456. setTimeout(() => {
  457. console.log('执行2')
  458. this.websocketMess();
  459. }, 1000);
  460. }
  461. } else {
  462. setTimeout(() => {
  463. if (this.websocket.readyState == 1) {
  464. console.log('执行3')
  465. this.websocketMess();
  466. } else {
  467. setTimeout(() => {
  468. console.log('执行4')
  469. this.websocketMess();
  470. }, 1000);
  471. }
  472. }, 1000);
  473. }
  474. // this.websocketMess();
  475. },
  476. mounted(){
  477. this.timer = setInterval(() => {
  478. if(this.page < Math.ceil(this.count / 6)){
  479. console.log('执行',Math.ceil(this.count / 6),this.page)
  480. this.page++
  481. let obj = {
  482. cmd: "queue/queuelist",
  483. data: {page:this.page,size:6,sort:0}
  484. };
  485. this.websocketSend(obj)
  486. setTimeout(() => {
  487. this.websocketMess();
  488. }, 1000);
  489. }else{
  490. console.log('执行22223333')
  491. this.page = 1
  492. let a = {
  493. cmd: "queue/queuelist",
  494. data: {page:this.page,size:6,sort:0}
  495. };
  496. this.websocketSend(a)
  497. setTimeout(() => {
  498. this.websocketMess();
  499. }, 1000);
  500. }
  501. console.log('切换时间',this.queueConfig)
  502. }, 1000 * parseInt(this.queueConfig.qhsj));
  503. this.timerID = setInterval(() => {
  504. this.updateTime()
  505. }, 1000);
  506. this.newTimes = setInterval(() => {
  507. // this.reload()
  508. sessionStorage.setItem('lineUpKey',1);
  509. window.location.reload()
  510. }, 1000 * 60 * 30);
  511. },
  512. beforeDestroy(){
  513. clearInterval(this.timer);// 清除定时器
  514. this.timer = null
  515. clearInterval(this.timerID);
  516. this.timerID = null;// 清除定时器
  517. // clearInterval(this.newTimes);  // 清除定时器
  518. // this.newTimes = null
  519. let unObj = {
  520. cmd:'queue/unjoin',
  521. data:{type:2}
  522. }
  523. this.websocketSend(unObj)
  524. // this.timer = null;
  525. // let obj = {
  526. // cmd: "queue/join",
  527. // data: {type:1},
  528. // };
  529. // this.websocketSend(obj)
  530. },
  531. methods:{
  532. websocketSend(data) {
  533. try {
  534. this.websocket.send(JSON.stringify(data))
  535. } catch (error) {
  536. this.showError = true;
  537. this.showIndex = 4;
  538. this.errorInfo = "网络异常,请稍后退出重试!";
  539. }
  540. },
  541. websocketMess() {
  542. console.log('测试')
  543. this.websocket.onmessage = e => {
  544. let res = JSON.parse(e.data);
  545. // let res = re.data;
  546. console.log('res',res)
  547. if(res.channel == 'queue/join'){
  548. if(res.data.type == 2){
  549. this.queueConfig = res.data.queueConfig
  550. this.lineUpList = res.data.patientQueueList.data
  551. this.receivingPatient = res.data.receivingPatient
  552. this.waitDoctorList = res.data.waitDoctorList
  553. this.upPatientList = res.data.upPatientList
  554. this.count = res.data.patientQueueList.count
  555. // this.lineUpList.map(item => {
  556. // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  557. // // item.start_time = moment(item.start_time * 1000).format('HH:mm')
  558. // })
  559. }
  560. }else if(res.channel == 'queue/queuelist'){
  561. this.lineUpList = res.data.patientQueueList.data
  562. this.count = res.data.patientQueueList.count
  563. // this.lineUpList.map(item => {
  564. // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  565. // // item.start_time = moment(item.start_time * 1000).format('HH:mm')
  566. // if(item.start_time != null){
  567. // item.start_time = moment(item.start_time * 1000).format('HH:mm:ss')
  568. // }
  569. // if(item.status == 5 || item.end_time){
  570. // item.end_time = moment(item.end_time * 1000).format('HH:mm:ss')
  571. // }
  572. // })
  573. }else if(res.channel == 'patientCallInfo'){
  574. console.log(999999999999,res.data)
  575. let second = res.data.second
  576. let newType = res.data.type
  577. console.log('执行几次',this.voiceNum)
  578. if(this.voice == true){
  579. this.patient_id = res.data.patientInfo.patient_id
  580. this.voice = false
  581. // let time1 = null
  582. this.voicePrompt(res.data.callVolUrl)
  583. this.voiceTime = setInterval(() => {
  584. let num = null
  585. if(res.data.patientInfo.status == 2){
  586. num = parseInt(this.queueConfig.jzdcbbcs)
  587. }else if(res.data.patientInfo.status == 3){
  588. num = parseInt(this.queueConfig.sjdcbbcs)
  589. }
  590. if(this.voiceNum < num){
  591. this.voiceNum++
  592. this.voicePrompt(res.data.callVolUrl)
  593. }else{
  594. this.voiceNum = 1;
  595. this.voice = true
  596. let obj = {
  597. cmd: "queue/callreturn",
  598. data: {patient_id:this.patient_id,type:newType},
  599. };
  600. this.websocketSend(obj)
  601. clearInterval(this.voiceTime);
  602. this.voiceTime = null
  603. }
  604. },1000 * second)
  605. }else {
  606. // this.$message({
  607. // message: '警告哦,这是一条警告消息',
  608. // type: 'warning'
  609. // });
  610. }
  611. }else if(res.channel == 'updateCallList'){
  612. this.receivingPatient = res.data.queue_list
  613. }else if(res.channel == 'updateWaitCallList'){
  614. this.waitDoctorList = res.data.queue_list
  615. }else if(res.channel == 'updateUpCallList'){
  616. this.upPatientList = res.data.queue_list
  617. }
  618. // else if(res.channel == "patientQueueInfo"){
  619. // this.queueInfo = res.data.queueInfo
  620. // let obj = {
  621. // cmd: "queue/queuelist",
  622. // data: {page:1,size:10}
  623. // };
  624. // this.websocketSend(obj)
  625. // }
  626. }
  627. },
  628. updateTime() {
  629. var cd = new Date();
  630. var week = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
  631. this.time = this.zeroPadding(cd.getHours(), 2) + ':' + this.zeroPadding(cd.getMinutes(), 2) + ':' + this.zeroPadding(cd.getSeconds(), 2) + ' (' + week[cd.getDay()] + ")";
  632. this.newdate = this.zeroPadding(cd.getFullYear(), 4) + '-' + this.zeroPadding(cd.getMonth() + 1, 2) + '-' + this.zeroPadding(cd.getDate(), 2);
  633. },
  634. zeroPadding(num, digit) {
  635. var zero = '';
  636. for (var i = 0; i < digit; i++) {
  637. zero += '0';
  638. }
  639. return (zero + num).slice(-digit);
  640. },
  641. // 进入全屏
  642. fullscreenboard: function() {
  643. sessionStorage.setItem('lineUpKey',1);
  644. this.dialogTableVisible = true;
  645. // let routeData = this.$router.resolve({ path: '/fullscreenboard' })
  646. // window.open(routeData.href, '_blank')
  647. },
  648. outfullscreenboard: function() {
  649. this.dialogTableVisible = false;
  650. this.showSetting = false;
  651. },
  652. togglefullscreen: function() {
  653. if (!screenfull.enabled) {
  654. this.$message({
  655. message: "你的浏览器不支持",
  656. type: "warning"
  657. });
  658. return false;
  659. }
  660. screenfull.toggle();
  661. this.showSetting = false;
  662. },
  663. openSetting() {
  664. if (this.showSetting == false) {
  665. this.showSetting = true;
  666. } else {
  667. this.showSetting = false;
  668. }
  669. },
  670. getDates(time){
  671. return moment(time * 1000).format('HH:mm:ss')
  672. }
  673. }
  674. }
  675. </script>
  676. <style lang="scss" scoped>
  677. .main-contain{
  678. height: 100%;
  679. }
  680. .page_lineUp{
  681. height: 100%;
  682. .lineUpTitle{
  683. height: 4vh;
  684. background: #1A82BF;
  685. display: flex;
  686. justify-content: space-between;
  687. align-items: center;
  688. padding: 0 20px;
  689. color:#fff;
  690. font-size: 2vh;
  691. font-weight: 600;
  692. }
  693. .lineUpMain{
  694. background: linear-gradient(0deg, #76ECEC, #479CD2);
  695. height: 95%;
  696. padding:10px;
  697. }
  698. .lineUpMainLeft{
  699. height: 60%;
  700. border-radius: 15px;
  701. display: flex;
  702. flex-direction: column;
  703. }
  704. .lineUpMainLeftTitle{
  705. display: flex;
  706. justify-content: space-between;
  707. align-items: center;
  708. color:#fff;
  709. font-size: 4vh;
  710. font-weight: 600;
  711. height:7vh;
  712. background: #1A82BF;
  713. border-radius: 15px 15px 0 0;
  714. >p{
  715. text-align: center;
  716. }
  717. }
  718. .lineUpList{
  719. font-size: 3vh;
  720. font-weight: 600;
  721. flex: 1;
  722. >div:nth-child(odd){
  723. background: #F9FDFF;
  724. }
  725. >div:nth-child(even){
  726. background: #CCEBFF;
  727. }
  728. >div:last-child{
  729. border-radius: 0 0 15px 15px;
  730. }
  731. .lineUpListOne{
  732. height:16%;
  733. display: flex;
  734. justify-content: space-between;
  735. align-items: center;
  736. color:#1C6895;
  737. >p{
  738. width:25%;
  739. text-align: center;
  740. }
  741. }
  742. }
  743. .callingBox{
  744. height: 39%;
  745. margin-top: 10px;
  746. display: flex;
  747. justify-content: space-between;
  748. .callingBoxLeft{
  749. width: 49.5%;
  750. height: 100%;
  751. display: flex;
  752. justify-content: space-between;
  753. }
  754. .callingBoxLeft1{
  755. width: 100%;
  756. height: 100%;
  757. display: flex;
  758. justify-content: space-between;
  759. }
  760. .callingTitle{
  761. width: 10vh;
  762. height: 100%;
  763. border-radius: 15px 0 0 15px;
  764. font-size: 5vh;
  765. font-weight:600;
  766. text-align: center;
  767. color: #fff;
  768. background: #1A82BF;
  769. display: flex;
  770. align-items: center;
  771. margin-right: 5px;
  772. }
  773. .newCallingTitle{
  774. background: #1aa680;
  775. }
  776. .callingTop{
  777. height: 49.5%;
  778. border-radius: 0 15px 0 0;
  779. background: #F9FDFF;
  780. display: flex;
  781. justify-content: space-between;
  782. .callingTopTip{
  783. width: 10vh;
  784. height: 100%;
  785. color: #fff;
  786. font-size: 3vh;
  787. font-weight: 600;
  788. background: #1A82BF;
  789. display: flex;
  790. align-items: center;
  791. }
  792. .newCallingTopTip{
  793. background: #1aa680;
  794. }
  795. .callingContent{
  796. flex: 1;
  797. display: flex;
  798. flex-direction: column;
  799. font-size: 4vh;
  800. color:#1C6895;
  801. font-weight: 600;
  802. padding-left: 20px;
  803. justify-content: space-around;
  804. >p{
  805. width:100%;
  806. text-align: left;
  807. line-height: 50px;
  808. }
  809. div>:first-child{
  810. margin-bottom: 10px;
  811. }
  812. }
  813. .newCallingContent{
  814. color:#1aa680;
  815. }
  816. }
  817. }
  818. }
  819. #fullscreenbroad {
  820. position: fixed;
  821. top: 0;
  822. right: 0;
  823. bottom: 0;
  824. left: 0;
  825. overflow: auto;
  826. margin: 0;
  827. background: #fff;
  828. padding: 20px;
  829. z-index:5000;
  830. height: 100%;
  831. }
  832. #fullscreenbroad #fullscreenbroad-setting {
  833. float: right;
  834. }
  835. #fullscreenbroad .el-button + .el-button {
  836. margin-left: 0px;
  837. }
  838. #fullscreenbroad .el-button:nth-child(1) {
  839. margin-left: 10px;
  840. }
  841. #fullscreenbroad .el-button:nth-child(2) {
  842. margin-left: 10px;
  843. }
  844. .fullRow{
  845. margin-bottom: 10px;
  846. }
  847. </style>