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.

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