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.

510 lines
19 KiB

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