You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

676 lines
22 KiB

2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
4 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
4 months ago
1 year ago
4 months ago
4 months ago
2 years ago
1 year ago
2 years ago
4 months ago
2 years ago
1 year ago
2 years ago
4 months ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
4 months ago
2 years ago
1 year ago
2 years ago
4 months ago
2 years ago
2 years ago
1 year ago
4 months ago
1 year ago
4 months ago
2 years ago
1 year ago
2 years ago
4 months ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
4 months ago
1 year ago
4 months ago
4 months ago
2 years ago
1 year ago
2 years ago
4 months ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
4 months ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
4 months ago
4 months ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
4 months ago
2 years ago
1 year ago
2 years ago
4 months ago
1 year ago
4 months ago
4 months ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
4 months ago
2 years ago
1 year ago
4 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
4 months ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
4 months ago
1 year ago
4 months ago
1 year ago
4 months ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
4 months ago
2 years ago
2 years ago
2 years ago
4 months ago
4 months ago
4 months ago
2 years ago
2 years ago
2 years ago
4 months ago
4 months ago
4 months ago
2 years ago
2 years ago
4 months ago
4 months ago
4 months ago
2 years ago
4 months ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
  1. <template>
  2. <div>
  3. <!--组件主体-->
  4. <div :style="`height: ${tableHeight}px;font-size:14px;z-index:10;background-color: #f4f8ff;`">
  5. <div style="display: flex">
  6. <div>
  7. <div>
  8. <span>分诊房间:</span>
  9. <el-select v-model="LocalConfig.doctorCheck.queueRoom" placeholder="分诊房间" clearable filterable
  10. style="width: 100px" size="small">
  11. <el-option v-for="item in dict.room" :key="item.id" :label="item.displayName" :value="item.id" />
  12. </el-select>
  13. </div>
  14. <div>
  15. <el-cascader :options="dict.itemTypeTree" v-model="LocalConfig.doctorCheck.queueItemTypeIds"
  16. popper-class="example" style="width: 160px" :props="{
  17. checkStrictly: true,
  18. expandTrigger: 'hover',
  19. label: 'displayName',
  20. value: 'id',
  21. id: 'id',
  22. children: 'treeChildren',
  23. multiple: true,
  24. }" clearable filterable size="small" collapse-tags>
  25. </el-cascader>
  26. </div>
  27. </div>
  28. <div style="display: flex;flex-direction: column;justify-content: space-evenly;">
  29. <div>
  30. <el-button type="primary" class="commonbutton" :style="[
  31. { width: '40px' },
  32. { minWidth: '40px' },
  33. { height: '26px' },
  34. {
  35. backgroundColor: isSignIn == 'N' ? 'red' : '',
  36. }
  37. ]" :disabled="isSignIn == 'Y'" @click="btnIsSignIn('0')">签到</el-button>
  38. </div>
  39. <div>
  40. <el-button type="primary" class="commonbutton" style="width: 40px; min-width: 40px; height: 26px"
  41. :disabled="isSignIn == 'N'" @click="btnIsSignIn('1')">签退</el-button>
  42. </div>
  43. </div>
  44. </div>
  45. <!--
  46. <div>
  47. <span>候诊人员</span>
  48. <el-input placeholder="候诊人员" v-model="patientName" size="small" style="width: 125px;" clearable />
  49. </div>
  50. -->
  51. <div style="display: flex" @contextmenu.prevent="onContextmenu">
  52. <el-table :data="waitDetail" style="width: 100%" border highlight-current-row @row-click="rowClickWait"
  53. :row-style="{ height: '28px' }" :height="Math.floor((tableHeight - 72) / 3)" @row-contextmenu="rClick">
  54. <el-table-column type="index" label="序" width="30" align="center" />
  55. <el-table-column prop="patientName" label="姓名" width="80" align="center" />
  56. <el-table-column prop="isVip" label="Vip" width="30" align="center">
  57. <template slot-scope="scope">
  58. <div style="font-family: 'Microsoft YaHei'">
  59. {{ scope.row.isVip == "Y" ? "√" : "" }}
  60. </div>
  61. </template>
  62. </el-table-column>
  63. <el-table-column prop="queueRegisterNumber" label="号" min-width="30" align="center" />
  64. </el-table>
  65. <div style="margin-top: 20px">
  66. <div>
  67. <el-button type="primary" class="commonbutton" @click="btnCall(waitRow, '1')"
  68. style="width: 40px; min-width: 40px; height: 26px">呼叫</el-button>
  69. </div>
  70. <div style="margin: 10px 0">
  71. <el-button type="primary" class="commonbutton" @click="
  72. getQueueRegisterList(
  73. LocalConfig.doctorCheck.queueRoom,
  74. LocalConfig.doctorCheck.queueItemTypeIds
  75. )
  76. " style="width: 40px; min-width: 40px; height: 26px">刷新</el-button>
  77. </div>
  78. <!-- 分诊排队
  79. <div>
  80. <el-button type="primary" class="commonbutton" @click="fnQueue"
  81. style="width: 40px; min-width: 40px; height: 26px">排队</el-button>
  82. </div>
  83. -->
  84. </div>
  85. </div>
  86. <div style="margin-top: 6px">已呼人员</div>
  87. <div style="display: flex" @contextmenu.prevent="onContextmenu">
  88. <el-table :data="alreadyCalledDetail" style="width: 100%" border highlight-current-row @row-contextmenu="rClick"
  89. @row-click="rowClickAlready" :row-style="{ height: '28px' }" :height="Math.floor((tableHeight - 72) / 3)">
  90. <el-table-column type="index" label="序" width="30" align="center" />
  91. <el-table-column prop="patientName" label="姓名" width="80" align="center" />
  92. <el-table-column prop="isVip" label="Vip" width="30" align="center">
  93. <template slot-scope="scope">
  94. <div style="font-family: 'Microsoft YaHei'">
  95. {{ scope.row.isVip == "Y" ? "√" : "" }}
  96. </div>
  97. </template>
  98. </el-table-column>
  99. <el-table-column prop="queueRegisterNumber" label="号" min-width="30" align="center" />
  100. </el-table>
  101. <div style="margin-top: 20px">
  102. <div>
  103. <el-button type="primary" class="commonbutton" @click="btnCall(alreadyRow, '2')"
  104. style="width: 40px; min-width: 40px; height: 26px">过号</el-button>
  105. </div>
  106. </div>
  107. </div>
  108. <div style="margin-top: 6px">过号人员</div>
  109. <div style="display: flex" @contextmenu.prevent="onContextmenu">
  110. <el-table :data="overNumberDetail" style="width: 100%" border highlight-current-row @row-click="rowClickOver"
  111. :row-style="{ height: '28px' }" :height="Math.floor((tableHeight - 72) / 3)" @row-contextmenu="rClick">
  112. <el-table-column type="index" label="序" width="30" align="center" />
  113. <el-table-column prop="patientName" label="姓名" width="80" align="center" />
  114. <el-table-column prop="isVip" label="Vip" width="30" align="center">
  115. <template slot-scope="scope">
  116. <div style="font-family: 'Microsoft YaHei'">
  117. {{ scope.row.isVip == "Y" ? "√" : "" }}
  118. </div>
  119. </template>
  120. </el-table-column>
  121. <el-table-column prop="queueRegisterNumber" label="号" width="30" align="center" />
  122. </el-table>
  123. <div style="margin-top: 20px">
  124. <div>
  125. <el-button type="primary" class="commonbutton" @click="btnCall(overRow, '9')"
  126. style="width: 40px; min-width: 40px; height: 26px">重呼</el-button>
  127. </div>
  128. <div style="margin: 10px 0">
  129. <el-button type="primary" class="commonbutton" @click="btnCall(overRow, '0')"
  130. style="width: 40px; min-width: 40px; height: 26px">退回</el-button>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. <!--组件弹窗-->
  136. <div>
  137. <!-- 修改信息 -->
  138. <el-dialog title="分诊排队" :visible.sync="dialogWinQueue" width="800px" :append-to-body="true"
  139. :close-on-click-modal="false">
  140. <Queue :refParams="queueParams" />
  141. </el-dialog>
  142. </div>
  143. </div>
  144. </template>
  145. <script>
  146. import { mapState } from "vuex";
  147. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  148. import {
  149. listOrderBy,
  150. setCheckStatusColor,
  151. deepCopy,
  152. } from "../../utlis/proFunc";
  153. import Queue from "../../components/queue/Queue.vue";
  154. export default {
  155. components: {
  156. Queue,
  157. },
  158. data() {
  159. return {
  160. queueParams: {},
  161. patientName: "",
  162. waitDetail: [],
  163. alreadyCalledDetail: [],
  164. overNumberDetail: [],
  165. waitRow: {},
  166. alreadyRow: {},
  167. overRow: {},
  168. LocalConfig: {
  169. doctorCheck: {
  170. // 医生诊台
  171. isQueue: "N", //启用分诊排队
  172. queueRoom: "", //默认分诊房间
  173. queueItemTypeIds: [], // 检查类别
  174. isBroadcast: "N", // 是否广播
  175. },
  176. },
  177. LocalConfigInit: {},
  178. interval: null, // 定时器句柄
  179. queue_after_call: 'N', // 呼叫后是否自动排队
  180. queue_refresh_interval: 15, // 叫号刷新时间间隔(秒)
  181. queue_play_voice_repeate_times: 2, // 语音重复播放次数
  182. queue_play_voice_repeate_interval: 1, // 语音重复播放时间间隔(秒)
  183. isSignIn: "N", //是否签到
  184. // 避免单击事件与双击事件冲突
  185. clickTime1: 0,
  186. clickTime2: 0,
  187. dialogWinQueue:false,
  188. };
  189. },
  190. created() { },
  191. //挂载完成
  192. mounted() {
  193. this.fnMounted();
  194. },
  195. destroyed() {
  196. console.log("this.interval", JSON.stringify(this.interval));
  197. if (this.interval) clearInterval(this.interval);
  198. console.log("this.interval clearInterval", JSON.stringify(this.interval));
  199. },
  200. computed: {
  201. ...mapState([
  202. "window",
  203. "dialogWin",
  204. "dataTransOpts",
  205. "dict",
  206. "doctorCheck",
  207. ]),
  208. tableHeight() {
  209. return this.window.pageHeight < 600 ? 390 : this.window.pageHeight - 210;
  210. },
  211. },
  212. methods: {
  213. setCheckStatusColor,
  214. tableRowClassName({ row, rowIndex }) {
  215. //console.log('tableRowClassName',rowIndex,row)
  216. if (row.completeFlag === "0") {
  217. return "danger"; //未检
  218. } else if (row.completeFlag === "2") {
  219. return "info"; //弃检
  220. }
  221. return "";
  222. },
  223. async fnMounted() {
  224. this.LocalConfigInit = deepCopy(this.LocalConfig);
  225. let LocalConfig = window.localStorage.getItem("LocalConfig") || null;
  226. try {
  227. this.LocalConfig = Object.assign(
  228. {},
  229. deepCopy(this.LocalConfigInit),
  230. JSON.parse(LocalConfig) || {}
  231. );
  232. } catch (error) {
  233. console.log('window.localStorage.getItem("LocalConfig")', error);
  234. }
  235. if (this.LocalConfig.doctorCheck.isQueue == "Y") {
  236. this.dictInit().then((res) => {
  237. if (!this.LocalConfig.doctorCheck.queueRoom) {
  238. if (res.data.length > 0)
  239. this.LocalConfig.doctorCheck.queueRoom = res.data[0].id;
  240. }
  241. if (this.LocalConfig.doctorCheck.queueRoom)
  242. this.getQueueRegisterListByRoomId(
  243. this.LocalConfig.doctorCheck.queueRoom
  244. );
  245. });
  246. this.setQueueParams();
  247. try {
  248. let sysParam = await postapi(
  249. "/api/app/SysParmValue/GetSysParmValueBySysParmId",
  250. { sysParmId: "queue_refresh_interval" }
  251. );
  252. this.queue_refresh_interval = Number(sysParam.data || 15);
  253. } catch (error) {
  254. console.log(error);
  255. }
  256. // 叫号后是否自动排队
  257. try {
  258. let sysParam = await postapi(
  259. "/api/app/SysParmValue/GetSysParmValueBySysParmId",
  260. { sysParmId: "queue_after_call" }
  261. );
  262. this.queue_after_call = sysParam.data;
  263. } catch (error) {
  264. console.log(error);
  265. }
  266. // 壳端
  267. if (this.$peisAPI) {
  268. postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId", {
  269. sysParmId: "queue_play_voice_repeate_times",
  270. }).then((res) => {
  271. if (res.code > -1)
  272. this.queue_play_voice_repeate_times = Number(res.data || 2);
  273. });
  274. postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId", {
  275. sysParmId: "queue_play_voice_repeate_interval",
  276. }).then((res) => {
  277. if (res.code > -1)
  278. this.queue_play_voice_repeate_interval = Number(res.data || 1);
  279. });
  280. }
  281. // 启动自动刷新
  282. if (!this.interval && this.queue_refresh_interval != 0) {
  283. this.interval = setInterval(() => {
  284. this.getQueueRegisterList(
  285. this.LocalConfig.doctorCheck.queueRoom,
  286. this.LocalConfig.doctorCheck.queueItemTypeIds
  287. );
  288. }, this.queue_refresh_interval * 1000);
  289. }
  290. }
  291. },
  292. btnCall(refRow, completeFlag) {
  293. let prePatientRegisterId = ''
  294. let row = Object.assign({}, refRow);
  295. switch (completeFlag) {
  296. case "0": // 退回
  297. if (!row.queueRegisterId) {
  298. if (this.overNumberDetail.length > 0)
  299. row = this.overNumberDetail[0];
  300. }
  301. if (!row.queueRegisterId)
  302. this.$message.warning({
  303. showClose: true,
  304. message: "未可操作的数据,或未选择过号人员",
  305. });
  306. break;
  307. case "1": // 呼叫
  308. // 未选中时,自动选第1个
  309. if (!row.queueRegisterId) {
  310. if (this.waitDetail.length > 0) row = this.waitDetail[0];
  311. }
  312. if (!row.queueRegisterId)
  313. this.$message.warning({
  314. showClose: true,
  315. message: "未可操作的数据,或未选择候诊人员",
  316. });
  317. if (this.alreadyCalledDetail.length > 0) prePatientRegisterId = this.alreadyCalledDetail[0].patientRegisterId
  318. break;
  319. case "2": // 过号
  320. if (!row.queueRegisterId) {
  321. if (this.alreadyCalledDetail.length > 0)
  322. row = this.alreadyCalledDetail[0];
  323. }
  324. if (!row.queueRegisterId)
  325. this.$message.warning({
  326. showClose: true,
  327. message: "未可操作的数据,或未选择已呼人员",
  328. });
  329. break;
  330. case "9": // 重呼
  331. if (!row.queueRegisterId) {
  332. if (this.overNumberDetail.length > 0)
  333. queueRegisterId = this.overNumberDetail[0];
  334. }
  335. if (!row.queueRegisterId)
  336. this.$message.warning({
  337. showClose: true,
  338. message: "未可操作的数据,或未选择过号人员",
  339. });
  340. break;
  341. }
  342. // "patientRegisterId": "3a143cf9-0b1b-7765-a90a-b087c4aad1b9",
  343. // "patientRegisterNo": "003485"
  344. // 叫号即调人员信息出来 (石家庄屏蔽,后续考滤用参数控制)
  345. // if (row.patientRegisterNo) {
  346. // this.dataTransOpts.tableS.patient_register.patientRegisterNo =
  347. // row.patientRegisterNo;
  348. // this.dataTransOpts.refresh.patient_register.S++;
  349. // }
  350. if (row.queueRegisterId && completeFlag != "9") {
  351. postapi("/api/app/QueueRegister/UpdateQueueRegisterStatus", {
  352. queueRegisterId: row.queueRegisterId,
  353. completeFlag,
  354. }).then((res) => {
  355. if (res.code > -1) {
  356. if(completeFlag == '1'){
  357. this.waitRow = {}
  358. }
  359. // 刷新排队列表
  360. this.getQueueRegisterList(
  361. this.LocalConfig.doctorCheck.queueRoom,
  362. this.LocalConfig.doctorCheck.queueItemTypeIds
  363. );
  364. if (this.$peisAPI && completeFlag == "1") this.outShellCall(row);
  365. if (this.queue_after_call == 'Y' && prePatientRegisterId) return postapi('/api/app/QueueRegister/AutomaticQueuingRoom', {
  366. patientRegisterId: prePatientRegisterId
  367. })
  368. }
  369. });
  370. } else if (completeFlag == "9") {
  371. if (this.$peisAPI) this.outShellCall(row);
  372. }
  373. },
  374. // 调用壳呼叫 api
  375. outShellCall(row) {
  376. let roomName = "";
  377. postapi("/api/app/Room/Get", {
  378. roomId: this.LocalConfig.doctorCheck.queueRoom,
  379. })
  380. .then((res) => {
  381. if (res.code > -1) {
  382. roomName = res.data.displayName;
  383. return this.$peisAPI.getIsSpeechEnable();
  384. }
  385. })
  386. .then((res) => {
  387. if (res == "Y") return this.$peisAPI.speechConnect();
  388. })
  389. .then((res) => {
  390. // queue_play_voice_repeate_times: 2, // 语音重复播放次数
  391. // queue_play_voice_repeate_interval: 1, // 语音重复播放时间间隔(秒)
  392. let toOutShell = {
  393. SendText: `${row.patientName}${roomName}检查`,
  394. RepatPlayNum: this.queue_play_voice_repeate_times,
  395. Delay: this.queue_play_voice_repeate_interval,
  396. };
  397. console.log("叫号 this.$peisAPI.speechSendText",toOutShell)
  398. return this.$peisAPI.speechSendText(JSON.stringify(toOutShell));
  399. })
  400. .catch((err) => {
  401. // console.log('呼叫失败', err)
  402. this.$message.error({ showClose: true, message: err });
  403. });
  404. },
  405. dictInit() {
  406. return new Promise((resolve, reject) => {
  407. postapi("/api/app/Room/GetList")
  408. .then((res) => {
  409. if (res.code > -1) {
  410. this.dict.room = res.data;
  411. // this.tableData = res.data.filter(e => {
  412. // return medicalCenterId ? (e.medicalCenterId == medicalCenterId) : e
  413. // });
  414. resolve(res);
  415. } else {
  416. reject(res.message);
  417. }
  418. })
  419. .catch((err) => {
  420. reject(err);
  421. });
  422. });
  423. },
  424. btnIsSignIn(signInFlag) {
  425. postapi("/api/app/RegisterCheck/CreateDoctorSignIn", {
  426. roomId: this.LocalConfig.doctorCheck.queueRoom,
  427. signInFlag: signInFlag
  428. }).then((res) => {
  429. if (res.code != -1) {
  430. if (signInFlag == '0') {
  431. this.isSignIn = 'Y'
  432. } else {
  433. this.isSignIn = 'N'
  434. }
  435. }
  436. })
  437. },
  438. getQueueRegisterList(roomId, itemType) {
  439. return new Promise((resolve, reject) => {
  440. this.waitDetail = [];
  441. this.alreadyCalledDetail = [];
  442. this.overNumberDetail = [];
  443. this.waitRow = {};
  444. this.alreadyRow = {};
  445. this.overRow = {};
  446. let itemTypeIds = [];
  447. itemType.forEach((e) => {
  448. e.forEach((item) => {
  449. itemTypeIds.push(item);
  450. });
  451. });
  452. if (roomId) {
  453. postapi("/api/app/QueueRegister/GetQueueRegisterListByRoomId", {
  454. roomId,
  455. itemTypeIds,
  456. })
  457. .then((res) => {
  458. if (res.code > -1) {
  459. this.waitDetail = res.data.waitDetail;
  460. this.waitDetail.forEach(e => {
  461. e.state = 'wait'
  462. });
  463. this.alreadyCalledDetail = res.data.alreadyCalledDetail;
  464. this.alreadyCalledDetail.forEach(e => {
  465. e.state = 'alreadyCall'
  466. });
  467. this.overNumberDetail = res.data.overNumberDetail;
  468. this.overNumberDetail.forEach(e => {
  469. e.state = 'over'
  470. });
  471. resolve(res);
  472. } else {
  473. reject(res.message);
  474. }
  475. })
  476. .catch((err) => {
  477. reject(err);
  478. });
  479. } else {
  480. reject("请选择房间");
  481. }
  482. });
  483. },
  484. // 获取房间排队信息 ByRoomId
  485. getQueueRegisterListByRoomId(roomId) {
  486. if (!roomId) {
  487. this.$message.warning({ showClose: true, message: "请选择房间" });
  488. return;
  489. }
  490. postapi("/api/app/RegisterCheck/GetDoctorIsSignIn", {
  491. roomId: roomId
  492. }).then((res) => {
  493. this.isSignIn = res.data.isSignIn
  494. })
  495. this.getQueueRegisterList(
  496. roomId,
  497. this.LocalConfig.doctorCheck.queueItemTypeIds
  498. );
  499. },
  500. // 获取房间排队信息 ByRoomId
  501. getQueueRegisterListByItemTypeIds(itemTypeIds) {
  502. if (this.LocalConfig.doctorCheck.queueRoom) {
  503. this.getQueueRegisterList(
  504. this.LocalConfig.doctorCheck.queueRoom,
  505. itemTypeIds
  506. );
  507. }
  508. },
  509. setQueueParams() {
  510. this.queueParams.patientRegisterId =
  511. this.dataTransOpts.tableS.patient_register.id;
  512. },
  513. // 分诊排队
  514. fnQueue() {
  515. if (!this.queueParams.patientRegisterId) {
  516. this.$message.warning({ showClose: true, message: "未获取到人员信息" });
  517. return;
  518. }
  519. this.dataTransOpts.plus.queue++;
  520. this.dialogWinQueue = true;
  521. },
  522. // 选择候诊人员
  523. rowClickWait(row) {
  524. this.waitRow = row;
  525. this.queueParams = {
  526. patientRegisterId: row.patientRegisterId,
  527. patientName:row.patientName
  528. };
  529. },
  530. // 选择过号人员
  531. rowClickAlready(row) {
  532. this.alreadyRow = row;
  533. this.queueParams = {
  534. patientRegisterId: row.patientRegisterId,
  535. patientName:row.patientName
  536. };
  537. },
  538. // 选择过号人员
  539. rowClickOver(row) {
  540. this.overRow = row;
  541. },
  542. // 右击选择人员
  543. rClick(row, column, event) {
  544. this.queueParams = {
  545. patientRegisterId: row.patientRegisterId,
  546. patientName:row.patientName,
  547. state: row.state,
  548. queueRegisterId: row.queueRegisterId
  549. };
  550. },
  551. // 右击
  552. onContextmenu(event) {
  553. if (!this.queueParams.patientRegisterId) return false
  554. //菜单项
  555. let items = [];
  556. if (this.queueParams.state == 'wait') {
  557. items.push({
  558. label: "呼叫",
  559. onClick: () => {
  560. this.btnCall(this.queueParams, '1')
  561. },
  562. })
  563. items.push({
  564. label: "取消排队",
  565. onClick: () => {
  566. postapi('/api/app/QueueRegister/DeleteByPatientRegisterId', {
  567. patientRegisterId: this.queueParams.patientRegisterId
  568. }).then(res => {
  569. if (res.code > -1) {
  570. this.$message.success({ showClose: true, message: '操作成功!' })
  571. this.getQueueRegisterList(this.LocalConfig.doctorCheck.queueRoom, this.LocalConfig.doctorCheck.queueItemTypeIds)
  572. }
  573. })
  574. },
  575. })
  576. }
  577. items.push({
  578. label: "排队",
  579. onClick: () => {
  580. this.fnQueue()
  581. },
  582. })
  583. this.$contextmenu({
  584. items,
  585. event,
  586. x: event.clientX,
  587. y: event.clientY,
  588. customClass: "custom-class",
  589. zIndex: 3,
  590. minWidth: 80,
  591. });
  592. return false;
  593. },
  594. },
  595. //监听事件
  596. watch: {
  597. //体检人员未切换时 也可以强制刷新数据
  598. "dataTransOpts.refresh.register_check.M": {
  599. // immediate:true,
  600. handler(newVal, oldVal) {
  601. console.log(
  602. `watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.dataTransOpts.tableS.patient_register.id}`
  603. );
  604. if (newVal != oldVal) {
  605. this.fnMounted();
  606. }
  607. },
  608. },
  609. },
  610. };
  611. </script>
  612. <style scoped>
  613. ::v-deep .el-collapse-item__header {
  614. height: 32px;
  615. line-height: 32px;
  616. background-color: #f4f8ff;
  617. color: #303133;
  618. cursor: pointer;
  619. font-size: 14px;
  620. font-weight: 700;
  621. text-align: center;
  622. padding: 0 0 0 50px;
  623. }
  624. </style>