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.

458 lines
18 KiB

2 years ago
2 years ago
1 month ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 months ago
1 month ago
2 years ago
2 months ago
2 years ago
2 years ago
1 year ago
2 years ago
1 month 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
1 year ago
2 years ago
1 year ago
1 year 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
1 month 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 months ago
1 month ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 months ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 month ago
1 year 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
2 years ago
2 years ago
1 month ago
2 years 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
1 year 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
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;">
  4. <div :style="`width:${sumWidth}px;`" @dblclick.prevent="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" :style="[{minWidth: '40px'},{backgroundColor:(this.doctorCheck.RegisterCheckEdit.isCriticalValue=='Y'?'red':'')}]" @click="btnCritical"
  57. :disabled="doctorBtnDisabled('btnCritical')">危急值</el-button>
  58. </div>
  59. </div>
  60. <el-tabs v-model="activeName" tab-position="top" :style="`margin-left:2px;width:${sumWidth}px;`">
  61. <el-tab-pane label="上次结果" name="preResult">
  62. <div :style="`width:100%;height:${sumHeight - 32}px;overflow-y: auto;`">
  63. <table width="100%" style="font-size:14px;border-collapse:collapse;" border="1" cellspacing="0"
  64. bordercolor="#909399">
  65. <colgroup>
  66. <col width="150">
  67. <col width="50">
  68. <col width="80">
  69. <col width="120">
  70. </colgroup>
  71. <thead>
  72. <tr height="30">
  73. <td class="tdCellClass">项目</td>
  74. <td class="tdCellClass">单位</td>
  75. <td class="tdCellClass">参考范围</td>
  76. <td class="tdCellClass">{{ doctorCheck.preResult.checkDate || '结果' }}</td>
  77. </tr>
  78. </thead>
  79. <tbody>
  80. <tr v-for="(item, index) of doctorCheck.preResult.registerCheckItems || []" :key="index" height="30">
  81. <td class="tdCellClass" style="text-align: left;">{{ item.itemName }}</td>
  82. <td class="tdCellClass">{{ item.unitName }}</td>
  83. <td class="tdCellClass">{{ item.referenceRangeValue }}</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. </tr>
  88. <tr height="30">
  89. <td class="tdCellClass" style="text-align: left;">小结</td>
  90. <td class="tdCellClass" style="text-align: left;" colspan="3">
  91. <p v-for="(item, index) of doctorCheck.preResult.summarys || []" :key="index">
  92. {{ item.summary }}
  93. </p>
  94. </td>
  95. </tr>
  96. </tbody>
  97. </table>
  98. </div>
  99. </el-tab-pane>
  100. <el-tab-pane label="建议" name="suggestion" v-if="doctor_check_disp_suggestion == 'Y'">
  101. <div>
  102. <div
  103. :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. this.rowDrop();
  191. if(this.doctor_check_disp_suggestion == 'Y') this.rowDropSuggestion()
  192. },
  193. computed: {
  194. ...mapState(['window', 'dataTransOpts', 'dict', 'doctorCheck', 'dialogWin']),
  195. //小结宽度
  196. sumWidth() {
  197. return Math.floor((this.window.pageWidth - 200 - 110 - 15 - 4) / 2);
  198. },
  199. //小结高度
  200. sumHeight() {
  201. let fixHeight = this.window.pageHeight < 600 ? 600 : this.window.pageHeight
  202. return Math.floor((fixHeight - 120 - (this.isCheckPicture ? 110 : 0)) * 2 / 5);
  203. }
  204. },
  205. methods: {
  206. checkPagePriv, getColorStr,
  207. //获取小结
  208. checkSummaryList(registerCheckId) {
  209. this.doctorCheck.checkSummaryList = [];
  210. if (!registerCheckId) return;
  211. // console.log(`/api/app/registerchecksummary/getregisterchecksummarylist?RegisterCheckId=${RegisterCheckId}`)
  212. let defaultResult = "未见明细异常"
  213. let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList,'id',registerCheckId)
  214. if(lfind > -1){
  215. defaultResult = this.doctorCheck.RegisterCheckList[lfind].defaultResult || defaultResult
  216. }
  217. getapi(`/api/app/registerchecksummary/getregisterchecksummarylist?RegisterCheckId=${registerCheckId}`)
  218. .then((res) => {
  219. console.log("checkSummaryList", res.data);
  220. if (res.code > -1) {
  221. this.doctorCheck.checkSummaryList = res.data;
  222. if(this.doctorCheck.checkSummaryList.length == 0){
  223. this.doctorCheck.checkSummaryList.push({
  224. id: Math.random(),
  225. registerCheckId,
  226. summary: defaultResult,
  227. summaryFlag: 'N'
  228. })
  229. }
  230. }
  231. })
  232. .catch((err) => {
  233. this.$message({ type: "error", message: `操作失败,原因:${err}` });
  234. });
  235. },
  236. //获取建议
  237. checkSuggestionList(RegisterCheckId) {
  238. if (!RegisterCheckId) {
  239. this.doctorCheck.checkSuggestionList = [];
  240. return;
  241. }
  242. // console.log(`/api/app/registerchecksuggestion/getregisterchecksuggestionlist?RegisterCheckId=${RegisterCheckId}`)
  243. getapi(`/api/app/registerchecksuggestion/getregisterchecksuggestionlist?RegisterCheckId=${RegisterCheckId}`)
  244. .then((res) => {
  245. console.log("checkSuggestionList", res.data);
  246. if (res.code != -1) {
  247. this.doctorCheck.checkSuggestionList = res.data;
  248. }
  249. })
  250. .catch((err) => {
  251. this.$message({ type: "error", message: `操作失败,原因:${err}` });
  252. });
  253. },
  254. //获取历次结果
  255. getPreResult(RegisterCheckId) {
  256. if (!RegisterCheckId) {
  257. this.doctorCheck.preResult = {};
  258. return;
  259. }
  260. // console.log(`/api/app/registerchecksuggestion/getregisterchecksuggestionlist?RegisterCheckId=${RegisterCheckId}`)
  261. postapi('/api/app/SumSummaryReport/GetLastTimeAsbitemResult', { registerCheckId: RegisterCheckId })
  262. .then((res) => {
  263. console.log("getPreResult", res.data);
  264. if (res.code > -1) {
  265. this.doctorCheck.preResult = res.data || {};
  266. }
  267. })
  268. .catch((err) => {
  269. this.$message({ type: "error", message: `操作失败,原因:${err}` });
  270. });
  271. },
  272. //拖拽
  273. rowDrop() {
  274. this.$nextTick(() => {
  275. const el = document.querySelector("#tableSummary tbody");
  276. console.log('el0', el)
  277. const that = this;
  278. Sortable.create(el, {
  279. handle: ".moveSummary",
  280. animation: 150, // ms, number 单位:ms,定义排序动画的时间
  281. // 开始拖拽的时候
  282. onStart: (evt) => {
  283. if (this.doctorCheck.RegisterCheckEdit.completeFlag != '0') {
  284. this.$alert("项目已检或弃检,不可执行此操作!", { showClose: false })
  285. return false
  286. }
  287. },
  288. //拖拽结束
  289. onEnd({ newIndex, oldIndex }) {
  290. that.isshow = false;
  291. const currRow = that.doctorCheck.checkSummaryList.splice(oldIndex, 1)[0];
  292. that.doctorCheck.checkSummaryList.splice(newIndex, 0, currRow);
  293. console.log('el', el)
  294. },
  295. });
  296. });
  297. },
  298. //拖拽
  299. rowDropSuggestion() {
  300. this.$nextTick(() => {
  301. const el = document.querySelector("#tableSuggestion tbody");
  302. //console.log('tbody',tbody)
  303. const that = this;
  304. Sortable.create(el, {
  305. handle: ".moveSuggestion",
  306. animation: 150, // ms, number 单位:ms,定义排序动画的时间
  307. // 开始拖拽的时候
  308. onStart: (evt) => {
  309. if (this.doctorCheck.RegisterCheckEdit.completeFlag != '0') {
  310. this.$alert("项目已检或弃检,不可执行此操作!", { showClose: false })
  311. return false
  312. }
  313. },
  314. //拖拽结束
  315. onEnd({ newIndex, oldIndex }) {
  316. that.isshow = false;
  317. const currRow = that.doctorCheck.checkSuggestionList.splice(oldIndex, 1)[0];
  318. that.doctorCheck.checkSuggestionList.splice(newIndex, 0, currRow);
  319. },
  320. });
  321. });
  322. },
  323. // 分诊排队
  324. fnQueue() {
  325. if (!this.dataTransOpts.tableS.patient_register.id) {
  326. this.$message.warning({ showClose: true, message: '未获取到人员信息' })
  327. return
  328. }
  329. this.queueParams = {
  330. patientRegisterId: this.dataTransOpts.tableS.patient_register.id
  331. }
  332. this.dataTransOpts.plus.queue++
  333. this.dialogWin.queue = true
  334. },
  335. // 危急值
  336. btnCritical() {
  337. this.dialogWin.FollowCriticalCheck = true
  338. this.doctorCheck.combinationCriticalValue=true
  339. },
  340. //删除小结
  341. delSum(index) {
  342. this.$confirm("此操作将删除该记录, 是否继续?", "提示", {
  343. confirmButtonText: "是",
  344. cancelButtonText: "否",
  345. type: "warning",
  346. }).then(() => {
  347. this.doctorCheck.checkSummaryList.splice(index, 1);
  348. }).catch(err => {
  349. if (err == "cancel") {
  350. // this.$message.info("已取消删除");
  351. console.log('已取消删除')
  352. }
  353. });
  354. },
  355. addSuggestion() {
  356. this.doctorCheck.checkSuggestionList.push({
  357. id: Math.random(),
  358. registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
  359. suggestion: '',
  360. })
  361. },
  362. //删除建议明细
  363. delSug(index) {
  364. this.$confirm("此操作将删除该记录, 是否继续?", "提示", {
  365. confirmButtonText: "是",
  366. cancelButtonText: "否",
  367. type: "warning",
  368. }).then(() => {
  369. this.doctorCheck.checkSuggestionList.splice(index, 1);
  370. }).catch((err) => {
  371. if (err == "cancel") {
  372. // this.$message.info("已取消删除");
  373. console.log('已取消删除')
  374. }
  375. });
  376. },
  377. // 双击生成小结
  378. blClick(){
  379. //this.$message.warning({showClose:true,message:'双击'})
  380. if(this.doctorBtnDisabled('btnMakeDiagnosis')){
  381. return
  382. }
  383. this.btnMakeDiagnosis()
  384. },
  385. },
  386. //监听事件
  387. watch: {
  388. //检查项目切换
  389. // "doctorCheck.RegisterCheckId"(newVal, oldVal) {
  390. // console.log("watch doctorCheck.RegisterCheckId newVal:", newVal, " oldVal:", oldVal);
  391. // this.checkSummaryList(newVal)
  392. // this.checkSuggestionList(newVal)
  393. // },
  394. //检查项目未切换换时 也可以强制刷新数据
  395. "dataTransOpts.refresh.register_check.S": {
  396. immediate: true,
  397. handler(newVal, oldVal) {
  398. console.log(`watch 小结 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.register_check.id}`);
  399. if (newVal != oldVal) {
  400. this.checkSummaryList(this.dataTransOpts.tableS.register_check.id)
  401. this.checkSuggestionList(this.dataTransOpts.tableS.register_check.id)
  402. this.getPreResult(this.dataTransOpts.tableS.register_check.id)
  403. }
  404. }
  405. },
  406. },
  407. };
  408. </script>
  409. <style scoped>
  410. @import '../../assets/css/global_table.css';
  411. .tdCellClass {
  412. padding: 0 5px;
  413. text-align: center;
  414. }
  415. .btnClass {
  416. margin-left: 2px;
  417. height: 22px;
  418. padding: 2px 2px;
  419. /*原始 默认值 500 */
  420. }
  421. ::v-deep .el-textarea__inner {
  422. min-height: 23px;
  423. height: 23px;
  424. line-height: 1.25;
  425. padding: 1px 15px 1px 2px;
  426. }
  427. </style>