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.

506 lines
18 KiB

2 years ago
2 years ago
3 weeks ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 weeks ago
2 years ago
3 weeks ago
2 years ago
2 years ago
1 year ago
2 years ago
3 weeks ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
3 weeks ago
1 year ago
2 years ago
1 year ago
5 days ago
1 year ago
5 days ago
1 year ago
1 year ago
1 year ago
3 weeks 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
2 years ago
2 years ago
3 weeks 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
3 weeks ago
2 months ago
3 weeks ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 months ago
3 weeks ago
2 years ago
2 years ago
2 years ago
2 years ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
2 years ago
1 month ago
3 weeks ago
1 month ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 month ago
2 years ago
1 month ago
2 years ago
1 month ago
3 weeks ago
1 month ago
2 years ago
2 years ago
1 month ago
2 years ago
3 weeks ago
1 month ago
3 weeks ago
1 month ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
3 weeks ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 month ago
3 weeks ago
1 month ago
3 weeks ago
1 month ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
  1. <template>
  2. <div>
  3. <div style="display: flex;" @contextmenu="onContextmenu">
  4. <div :style="`width:${sumWidth}px;`" @dblclick="blClick">
  5. <el-table id="tableSummary" row-key="id" :data="doctorCheck.checkSummaryList" size="samll" :height="sumHeight"
  6. width="100%" border>
  7. <el-table-column width="30" align="center">
  8. <template slot-scope="scope">
  9. <el-tag class="moveSummary" style="height:25px;padding:0 2px;cursor: move;background-color: #EEEEEE;">
  10. <div style="width: 16px;">{{ scope.$index + 1 }}</div>
  11. </el-tag>
  12. </template>
  13. </el-table-column>
  14. <el-table-column prop="summary" label="小结">
  15. <template slot="header">
  16. <div style="display: flex;justify-content:space-between;">
  17. <div>小结</div>
  18. <div></div>
  19. </div>
  20. </template>
  21. <template slot-scope="scope">
  22. <div style="display: flex;font-family: 'Microsoft YaHei';" ref="divSummary">
  23. <el-input type="textarea" v-model="scope.row.summary" :autosize="{ minRows: 1, maxRows: 100 }"
  24. placeholder="请输入小结" :style="`font-size: ${pacsDescFontSize}px;`">
  25. </el-input>
  26. <el-button type="danger" style="min-width:23px;padding:2px;" icon="el-icon-delete"
  27. @click="delSum(scope.$index)" :disabled="doctorBtnDisabled('delSum')" size="small"></el-button>
  28. </div>
  29. </template>
  30. </el-table-column>
  31. </el-table>
  32. </div>
  33. <div
  34. :style="`display: flex;position: absolute; top:${window.pageHeight - sumHeight - 226}px;right:${sumWidth + 8}px;z-index: 1;`">
  35. <div v-show="checkPagePriv(pagePriv.privs, '生成小结')">
  36. <el-button type="primary" class="btnClass" @click="btnMakeDiagnosis"
  37. :disabled="doctorBtnDisabled('btnMakeDiagnosis')">生成小结</el-button>
  38. </div>
  39. <div v-show="checkPagePriv(pagePriv.privs, '新增小结')">
  40. <el-button type="primary" class="btnClass" @click="addSummary"
  41. :disabled="doctorBtnDisabled('addSummary')">新增小结</el-button>
  42. </div>
  43. <div v-show="checkPagePriv(pagePriv.privs, '保存结果')">
  44. <el-button type="primary" class="btnClass" @click="save"
  45. :disabled="doctorBtnDisabled('save')">保存结果</el-button>
  46. </div>
  47. <div v-show="checkPagePriv(pagePriv.privs, '审核')">
  48. <el-button type="primary" class="btnClass" style="min-width: 40px;" @click="audit"
  49. :disabled="doctorBtnDisabled('audit')">审核</el-button>
  50. </div>
  51. <div v-show="checkPagePriv(pagePriv.privs, '排队')">
  52. <el-button type="primary" class="btnClass" style="min-width: 40px;" @click="fnQueue"
  53. :disabled="doctorBtnDisabled('fnQueue')">排队</el-button>
  54. </div>
  55. <div v-show="checkPagePriv(pagePriv.privs, '危急值')">
  56. <el-button type="primary" class="btnClass"
  57. :style="[{ minWidth: '40px' }, { backgroundColor: (this.doctorCheck.RegisterCheckEdit.isCriticalValue == 'Y' ? 'red' : '') }]"
  58. @click="btnCritical" :disabled="doctorBtnDisabled('btnCritical')">危急值</el-button>
  59. </div>
  60. </div>
  61. <el-tabs v-model="activeName" tab-position="top" :style="`margin-left:2px;width:${sumWidth}px;`">
  62. <el-tab-pane label="上次结果" name="preResult">
  63. <div :style="`width:100%;height:${sumHeight - 32}px;overflow-y: auto;`">
  64. <table width="100%" style="font-size:14px;border-collapse:collapse;" border="1" cellspacing="0"
  65. bordercolor="#909399">
  66. <colgroup>
  67. <col width="150">
  68. <col width="50">
  69. <col width="80">
  70. <col width="120">
  71. </colgroup>
  72. <thead>
  73. <tr height="30">
  74. <td class="tdCellClass">项目</td>
  75. <td class="tdCellClass">{{ doctorCheck.preResult.checkDate || '结果' }}</td>
  76. <td class="tdCellClass">参考范围</td>
  77. <td class="tdCellClass">单位</td>
  78. </tr>
  79. </thead>
  80. <tbody>
  81. <tr v-for="(item, index) of doctorCheck.preResult.registerCheckItems || []" :key="index" height="30">
  82. <td class="tdCellClass" style="text-align: left;">{{ item.itemName }}</td>
  83. <td
  84. :style="`padding: 0 5px;text-align:left;color: ${item.itemName == '小结' ? '#000000' : getColorStr(item.reportFontColor)};`"
  85. v-html="item.resultValue"></td>
  86. <td class="tdCellClass">{{ item.referenceRangeValue }}</td>
  87. <td class="tdCellClass">{{ item.unitName }}</td>
  88. </tr>
  89. <tr height="30">
  90. <td class="tdCellClass" style="text-align: left;">小结</td>
  91. <td class="tdCellClass" style="text-align: left;" colspan="3">
  92. <p v-for="(item, index) of doctorCheck.preResult.summarys || []" :key="index">
  93. {{ item.summary }}
  94. </p>
  95. </td>
  96. </tr>
  97. </tbody>
  98. </table>
  99. </div>
  100. </el-tab-pane>
  101. <el-tab-pane label="建议" name="suggestion" v-if="doctor_check_disp_suggestion == 'Y'">
  102. <div>
  103. <div :style="`display: flex;position: absolute;top:5px;right:5px;z-index: 1;`">
  104. <div v-show="checkPagePriv(pagePriv.privs, '新增建议')">
  105. <el-button type="primary" class="btnClass" @click="addSuggestion"
  106. :disabled="doctorBtnDisabled('addSuggestion')">新增建议</el-button>
  107. </div>
  108. </div>
  109. <div>
  110. <el-table id="tableSuggestion" row-key="id" :data="doctorCheck.checkSuggestionList" size="samll"
  111. :height="sumHeight - 32" width="100%" border>
  112. <el-table-column width="30" align="center">
  113. <template slot-scope="scope">
  114. <el-tag class="moveSuggestion"
  115. style="height:25px;padding:0 2px;cursor: move;background-color: #EEEEEE;">
  116. <div style="width: 16px;">{{ scope.$index + 1 }}</div>
  117. </el-tag>
  118. </template>
  119. </el-table-column>
  120. <el-table-column prop="suggestion" label="建议">
  121. <template slot="header">
  122. <div style="display: flex;justify-content:space-between;">
  123. <div>建议</div>
  124. <div></div>
  125. </div>
  126. </template>
  127. <template slot-scope="scope">
  128. <div style="display: flex;">
  129. <el-input type="textarea" v-model="scope.row.suggestion" :autosize="{ minRows: 1, maxRows: 100 }"
  130. :disabled="doctorBtnDisabled('delSug')" placeholder="请输入建议">
  131. </el-input>
  132. <el-button type="danger" style="min-width:23px;padding:2px;" icon="el-icon-delete"
  133. @click="delSug(scope.$index)" :disabled="doctorBtnDisabled('delSug')" size="small"></el-button>
  134. </div>
  135. </template>
  136. </el-table-column>
  137. </el-table>
  138. </div>
  139. </div>
  140. </el-tab-pane>
  141. </el-tabs>
  142. </div>
  143. <div>
  144. <!-- 分诊排队 -->
  145. <el-dialog title="分诊排队" :visible.sync="dialogWin.queue" width="800px" :append-to-body="true"
  146. :close-on-click-modal="false">
  147. <Queue :refParams="queueParams" />
  148. </el-dialog>
  149. </div>
  150. </div>
  151. </template>
  152. <script>
  153. import { mapState } from 'vuex';
  154. import Sortable from "sortablejs";
  155. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  156. import { getPagePriv, checkPagePriv, deepCopy, getColorStr, arrayExistObj } from "../../utlis/proFunc";
  157. import Queue from "../../components/queue/Queue.vue";
  158. export default {
  159. components: {
  160. Queue
  161. },
  162. props: ["registerCheckId", "isCheckPicture", "optGrant", "addSummary", "btnMakeDiagnosis", "save", "audit", "unAudit", "btnLineUp", "doctorBtnDisabled"],
  163. data() {
  164. return {
  165. queueParams: {},
  166. pagePriv: {
  167. routeUrlorPageName: 'doctorCheck', //当前页面归属路由或归属页面权限名称
  168. privs: [], // 页面权限
  169. },
  170. activeName: 'preResult',
  171. doctor_check_disp_suggestion: 'N', // 医生诊台 默认不显示建议
  172. pacsDescFontSize: 14, //结论内容的字体大小
  173. };
  174. },
  175. created() {
  176. //获取用户当前页面的权限
  177. let userPriv = window.sessionStorage.getItem('userPriv')
  178. if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  179. let LocalConfig = JSON.parse(window.localStorage.getItem("LocalConfig") || null)
  180. if (LocalConfig?.doctorCheck?.pacsDescFontSize) this.pacsDescFontSize = LocalConfig.doctorCheck.pacsDescFontSize
  181. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId: 'doctor_check_disp_suggestion' })
  182. .then(res => {
  183. if (res.code > -1) {
  184. this.doctor_check_disp_suggestion = (res.data.toUpperCase()) || "N"
  185. }
  186. })
  187. },
  188. //挂载完成
  189. mounted() {
  190. // 监听来自 Electron 的调用 右击事件
  191. if (this.$peisAPI) {
  192. try {
  193. this.$peisAPI.onContextMenuAction((data) => {
  194. this.onContextMenuDIY(data)
  195. });
  196. } catch (error) {
  197. console.error(error)
  198. }
  199. }
  200. this.rowDrop();
  201. if (this.doctor_check_disp_suggestion == 'Y') this.rowDropSuggestion()
  202. },
  203. computed: {
  204. ...mapState(['window', 'dataTransOpts', 'dict', 'doctorCheck', 'dialogWin']),
  205. //小结宽度
  206. sumWidth() {
  207. return Math.floor((this.window.pageWidth - 200 - 110 - 15 - 4) / 2);
  208. },
  209. //小结高度
  210. sumHeight() {
  211. let fixHeight = this.window.pageHeight < 600 ? 600 : this.window.pageHeight
  212. return Math.floor((fixHeight - 120 - (this.isCheckPicture ? 110 : 0)) * 2 / 5);
  213. }
  214. },
  215. methods: {
  216. checkPagePriv, getColorStr,
  217. //获取小结
  218. checkSummaryList(registerCheckId) {
  219. this.doctorCheck.checkSummaryList = [];
  220. if (!registerCheckId) return;
  221. // console.log(`/api/app/registerchecksummary/getregisterchecksummarylist?RegisterCheckId=${RegisterCheckId}`)
  222. let defaultResult = "未见明细异常"
  223. let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList, 'id', registerCheckId)
  224. if (lfind > -1) {
  225. defaultResult = this.doctorCheck.RegisterCheckList[lfind].defaultResult || defaultResult
  226. }
  227. getapi(`/api/app/registerchecksummary/getregisterchecksummarylist?RegisterCheckId=${registerCheckId}`)
  228. .then((res) => {
  229. console.log("checkSummaryList", res.data);
  230. if (res.code > -1) {
  231. this.doctorCheck.checkSummaryList = res.data;
  232. if (this.doctorCheck.checkSummaryList.length == 0) {
  233. this.doctorCheck.checkSummaryList.push({
  234. id: Math.random(),
  235. registerCheckId,
  236. summary: defaultResult,
  237. summaryFlag: 'N'
  238. })
  239. }
  240. }
  241. })
  242. .catch((err) => {
  243. this.$message({ type: "error", message: `操作失败,原因:${err}` });
  244. });
  245. },
  246. //获取建议
  247. checkSuggestionList(RegisterCheckId) {
  248. if (!RegisterCheckId) {
  249. this.doctorCheck.checkSuggestionList = [];
  250. return;
  251. }
  252. // console.log(`/api/app/registerchecksuggestion/getregisterchecksuggestionlist?RegisterCheckId=${RegisterCheckId}`)
  253. getapi(`/api/app/registerchecksuggestion/getregisterchecksuggestionlist?RegisterCheckId=${RegisterCheckId}`)
  254. .then((res) => {
  255. console.log("checkSuggestionList", res.data);
  256. if (res.code != -1) {
  257. this.doctorCheck.checkSuggestionList = res.data;
  258. }
  259. })
  260. .catch((err) => {
  261. this.$message({ type: "error", message: `操作失败,原因:${err}` });
  262. });
  263. },
  264. //获取历次结果
  265. getPreResult(RegisterCheckId) {
  266. if (!RegisterCheckId) {
  267. this.doctorCheck.preResult = {};
  268. return;
  269. }
  270. // console.log(`/api/app/registerchecksuggestion/getregisterchecksuggestionlist?RegisterCheckId=${RegisterCheckId}`)
  271. postapi('/api/app/SumSummaryReport/GetLastTimeAsbitemResult', { registerCheckId: RegisterCheckId })
  272. .then((res) => {
  273. console.log("getPreResult", res.data);
  274. if (res.code > -1) {
  275. this.doctorCheck.preResult = res.data || {};
  276. }
  277. })
  278. .catch((err) => {
  279. this.$message({ type: "error", message: `操作失败,原因:${err}` });
  280. });
  281. },
  282. //拖拽
  283. rowDrop() {
  284. this.$nextTick(() => {
  285. const el = document.querySelector("#tableSummary tbody");
  286. console.log('el0', el)
  287. const that = this;
  288. Sortable.create(el, {
  289. handle: ".moveSummary",
  290. animation: 150, // ms, number 单位:ms,定义排序动画的时间
  291. // 开始拖拽的时候
  292. onStart: (evt) => {
  293. if (this.doctorCheck.RegisterCheckEdit.completeFlag != '0') {
  294. this.$alert("项目已检或弃检,不可执行此操作!", { showClose: false })
  295. return false
  296. }
  297. },
  298. //拖拽结束
  299. onEnd({ newIndex, oldIndex }) {
  300. that.isshow = false;
  301. const currRow = that.doctorCheck.checkSummaryList.splice(oldIndex, 1)[0];
  302. that.doctorCheck.checkSummaryList.splice(newIndex, 0, currRow);
  303. console.log('el', el)
  304. },
  305. });
  306. });
  307. },
  308. //拖拽
  309. rowDropSuggestion() {
  310. this.$nextTick(() => {
  311. const el = document.querySelector("#tableSuggestion tbody");
  312. //console.log('tbody',tbody)
  313. const that = this;
  314. Sortable.create(el, {
  315. handle: ".moveSuggestion",
  316. animation: 150, // ms, number 单位:ms,定义排序动画的时间
  317. // 开始拖拽的时候
  318. onStart: (evt) => {
  319. if (this.doctorCheck.RegisterCheckEdit.completeFlag != '0') {
  320. this.$alert("项目已检或弃检,不可执行此操作!", { showClose: false })
  321. return false
  322. }
  323. },
  324. //拖拽结束
  325. onEnd({ newIndex, oldIndex }) {
  326. that.isshow = false;
  327. const currRow = that.doctorCheck.checkSuggestionList.splice(oldIndex, 1)[0];
  328. that.doctorCheck.checkSuggestionList.splice(newIndex, 0, currRow);
  329. },
  330. });
  331. });
  332. },
  333. // 分诊排队
  334. fnQueue() {
  335. if (!this.dataTransOpts.tableS.patient_register.id) {
  336. this.$message.warning({ showClose: true, message: '未获取到人员信息' })
  337. return
  338. }
  339. this.queueParams = {
  340. patientRegisterId: this.dataTransOpts.tableS.patient_register.id
  341. }
  342. this.dataTransOpts.plus.queue++
  343. this.dialogWin.queue = true
  344. },
  345. // 危急值
  346. btnCritical() {
  347. this.dialogWin.FollowCriticalCheck = true
  348. this.doctorCheck.combinationCriticalValue = true
  349. },
  350. //删除小结
  351. delSum(index) {
  352. this.$confirm("此操作将删除该记录, 是否继续?", "提示", {
  353. confirmButtonText: "是",
  354. cancelButtonText: "否",
  355. type: "warning",
  356. }).then(() => {
  357. this.doctorCheck.checkSummaryList.splice(index, 1);
  358. }).catch(err => {
  359. if (err == "cancel") {
  360. // this.$message.info("已取消删除");
  361. console.log('已取消删除')
  362. }
  363. });
  364. },
  365. addSuggestion() {
  366. this.doctorCheck.checkSuggestionList.push({
  367. id: Math.random(),
  368. registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
  369. suggestion: '',
  370. })
  371. },
  372. //删除建议明细
  373. delSug(index) {
  374. this.$confirm("此操作将删除该记录, 是否继续?", "提示", {
  375. confirmButtonText: "是",
  376. cancelButtonText: "否",
  377. type: "warning",
  378. }).then(() => {
  379. this.doctorCheck.checkSuggestionList.splice(index, 1);
  380. }).catch((err) => {
  381. if (err == "cancel") {
  382. // this.$message.info("已取消删除");
  383. console.log('已取消删除')
  384. }
  385. });
  386. },
  387. // 双击生成小结
  388. blClick() {
  389. //this.$message.warning({showClose:true,message:'双击'})
  390. if (this.doctorBtnDisabled('btnMakeDiagnosis')) {
  391. return
  392. }
  393. this.btnMakeDiagnosis()
  394. },
  395. // 右击菜单
  396. onContextmenu(event) {
  397. if (!this.$peisAPI) {
  398. return
  399. }
  400. let menus = [
  401. // { type: 'separator' },
  402. // { label: '测试菜单', itemId: '测试菜单', enabled: true },
  403. // {
  404. // label: '更多操作',
  405. // submenu: [
  406. // { label: '子菜单', itemId: '子菜单', enabled: true }
  407. // ]
  408. // }
  409. ]
  410. this.$peisAPI.showContextMenu(menus)
  411. .then(res => {
  412. console.log('res', res)
  413. })
  414. .catch(err => {
  415. console.log('err', err)
  416. })
  417. .finally(() => {
  418. console.log('finally')
  419. })
  420. },
  421. // 自定义右击事件
  422. onContextMenuDIY(data) {
  423. //this.$message({showClose:true,message:data})
  424. }
  425. },
  426. //监听事件
  427. watch: {
  428. //检查项目切换
  429. // "doctorCheck.RegisterCheckId"(newVal, oldVal) {
  430. // console.log("watch doctorCheck.RegisterCheckId newVal:", newVal, " oldVal:", oldVal);
  431. // this.checkSummaryList(newVal)
  432. // this.checkSuggestionList(newVal)
  433. // },
  434. //检查项目未切换换时 也可以强制刷新数据
  435. "dataTransOpts.refresh.register_check.S": {
  436. immediate: true,
  437. handler(newVal, oldVal) {
  438. console.log(`watch 小结 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.register_check.id}`);
  439. if (newVal != oldVal) {
  440. this.checkSummaryList(this.dataTransOpts.tableS.register_check.id)
  441. this.checkSuggestionList(this.dataTransOpts.tableS.register_check.id)
  442. this.getPreResult(this.dataTransOpts.tableS.register_check.id)
  443. }
  444. }
  445. },
  446. },
  447. };
  448. </script>
  449. <style scoped>
  450. @import '../../assets/css/global_table.css';
  451. .tdCellClass {
  452. padding: 0 5px;
  453. text-align: center;
  454. }
  455. .btnClass {
  456. margin-left: 2px;
  457. height: 22px;
  458. padding: 2px 2px;
  459. /*原始 默认值 500 */
  460. }
  461. ::v-deep .el-textarea__inner {
  462. min-height: 23px;
  463. height: 23px;
  464. line-height: 1.25;
  465. padding: 1px 15px 1px 2px;
  466. }
  467. </style>