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.

1225 lines
42 KiB

2 years ago
2 years ago
2 years ago
3 weeks ago
2 years ago
1 month ago
2 years ago
6 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
6 months ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
4 months ago
4 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 months ago
2 years ago
2 years ago
2 years ago
2 years ago
4 months 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
4 months ago
2 years ago
4 months ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
4 months ago
4 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 months ago
2 years ago
2 months ago
2 years ago
2 months 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
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
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 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
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
4 months ago
1 month 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
6 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
6 months ago
2 months ago
6 months ago
2 years ago
2 years ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 months 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
2 years ago
4 months 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
2 years ago
2 years ago
5 months ago
2 years ago
5 months ago
2 years ago
2 years ago
2 years ago
1 year 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
2 years ago
2 years ago
2 years ago
2 months ago
5 months 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
1 year ago
2 years ago
4 months ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
5 months ago
2 years ago
2 months ago
2 years ago
5 months ago
5 months ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 months ago
2 years ago
2 years ago
1 month ago
2 years ago
2 years ago
2 years ago
6 months ago
5 months ago
6 months ago
2 months ago
5 months ago
6 months ago
4 months ago
5 months ago
5 months ago
2 months ago
5 months ago
2 months ago
5 months ago
6 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
4 months ago
4 months ago
5 months ago
2 months ago
5 months ago
5 months ago
5 months ago
6 months ago
5 months ago
2 months ago
5 months ago
6 months ago
5 months ago
6 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
2 years 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
1 year ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
6 months 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
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 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
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
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
4 months ago
2 years ago
2 years ago
2 years ago
2 years ago
4 months ago
2 years ago
2 years ago
2 years ago
2 years ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 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 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 months ago
2 years ago
2 years ago
2 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
  1. <template>
  2. <div style="display: flex;">
  3. <div>
  4. <div v-show="checkPagePriv(pagePriv.privs, '采图')">
  5. <el-button type="primary" class="btnClass" @click="btnGetPic" :disabled="doctorBtnDisabled('btnGetPic')"
  6. size="small" v-loading.fullscreen.lock="fullscreenLoading">采图</el-button>
  7. </div>
  8. <div v-show="checkPagePriv(pagePriv.privs, '导图')">
  9. <el-button type="primary" class="btnClass" @click="btnExpPic" :disabled="doctorBtnDisabled('btnExpPic')"
  10. size="small">导图</el-button>
  11. </div>
  12. <div v-show="checkPagePriv(pagePriv.privs, '保存')">
  13. <el-button type="primary" class="btnClass" @click="btnSavePic" :disabled="doctorBtnDisabled('btnSavePic')"
  14. size="small">保存</el-button>
  15. </div>
  16. <el-dropdown v-show="checkPagePriv(pagePriv.privs, '导图')" :disabled="doctorBtnDisabled('btnExpPic')">
  17. <span class="el-dropdown-link" style="color: #222531; font-weight: 700">
  18. <el-button type="primary" class="btnClass" :disabled="doctorBtnDisabled('btnExpPic')">更多</el-button>
  19. </span>
  20. <el-dropdown-menu slot="dropdown">
  21. <el-dropdown-item v-show="checkPagePriv(pagePriv.privs, 'Dcm')" @click.native="btnBrowseDcm"
  22. :disabled="doctorBtnDisabled('btnBrowseDcm')">Dcm</el-dropdown-item>
  23. <el-dropdown-item v-show="checkPagePriv(pagePriv.privs, '裁图')" @click.native="btnCutPic"
  24. :disabled="doctorBtnDisabled('btnCutPic')">裁剪图片</el-dropdown-item>
  25. <el-dropdown-item v-show="checkPagePriv(pagePriv.privs, '清理pacs结果')" @click.native="btnClean"
  26. :disabled="doctorBtnDisabled('btnClean')">清理pacs结果</el-dropdown-item>
  27. </el-dropdown-menu>
  28. </el-dropdown>
  29. </div>
  30. <!-- -->
  31. <div :style="`overflow-x: scroll;width:${Math.floor((window.pageWidth - 200 - 110 - 15 - 4))}px;`"
  32. @contextmenu.prevent="onContextmenu" ref="DivPic">
  33. <div style="display: flex;">
  34. <div class="demo-image__preview" v-for="(item, index) in checkPictures" :key="item.id"
  35. style="display: inline-block; padding: 0 0 0 2px">
  36. <div style="
  37. position: relative;
  38. font-size: 24px;
  39. margin: -6px 0 0 55px;
  40. height: 30px;
  41. z-index: 2;
  42. ">
  43. <el-tooltip content="删除该图" placement="bottom" effect="light">
  44. <i v-if="false" class="el-icon-close" @click="btnDelImage(index)" v-show="!doctorBtnDisabled('btnDelImage')"
  45. style="color: red; cursor: pointer"></i>
  46. </el-tooltip>
  47. </div>
  48. <div style="margin-top: -25px">
  49. <el-image style="width: 80px; height: 80px; border-radius: 5px" :src="imageFilePlus(item.pictureFilename)"
  50. :data-imageSeq="index" :preview-src-list="previewSrcList(checkPictures, item)">
  51. </el-image>
  52. </div>
  53. <div style="display: flex">
  54. <div style="margin: -6px 2px 0 1px">
  55. <el-tooltip content="是否打印" placement="bottom" effect="light">
  56. <el-checkbox v-model="item.isPrintTrans" @change="btnSavePic"
  57. :readonly="doctorBtnDisabled('btnSavePic')"></el-checkbox>
  58. </el-tooltip>
  59. </div>
  60. <!--
  61. <div style="font-size: 12px; margin: -2px 0 0 1px">打印</div>
  62. -->
  63. <div style="font-size: 15px; margin: -5px 2px 0 2px">
  64. <el-tooltip content="保存后,图片将按序号从小到大排序" placement="bottom" effect="light">
  65. <input placeholder="排序" v-model="item.displayOrder" @onkeyup="validateInteger(e, index)"
  66. style="width: 30px" :readonly="doctorBtnDisabled('btnSavePic')" />
  67. </el-tooltip>
  68. </div>
  69. <div v-if="false" style="margin: -6px 0 0 2px">
  70. <el-tooltip content="是否报告图片" placement="bottom" effect="light">
  71. <el-checkbox v-model="item.pictureFileType" @change="btnSavePic" true-label="1" false-label="0"
  72. :disabled="doctorBtnDisabled('btnSavePic')"></el-checkbox>
  73. </el-tooltip>
  74. </div>
  75. </div>
  76. </div>
  77. <div>
  78. <table :width="`${getPicing ? 300:0}px;`"></table>
  79. <!--是否采图进行时采图时自动滚到最右边-->
  80. <!--暴力滚动 element.scrollLeft = element.scrollWidth;-->
  81. <!--平滑滚动 element.scrollTo({ left: element.scrollWidth, behavior: 'smooth' });-->
  82. </div>
  83. </div>
  84. </div>
  85. <el-dialog title="图片上传" :visible.sync="dialogCheckPictureUpload" :close-on-click-modal="false" width="800px"
  86. @close="getCheckPictures(doctorCheck.RegisterCheckId)">
  87. <CheckPictureUpload :registerCheckId="doctorCheck.RegisterCheckId" :uploadSeq="uploadSeq"
  88. :closePicUpload="closePicUpload" />
  89. </el-dialog>
  90. <el-dialog title="Dcm查看" :visible.sync="dialogDcm" :close-on-click-modal="false" fullscreen @close="iframeSrc = ''">
  91. <div style="display: flex;">
  92. <div>
  93. <iframe :src="iframeSrc" :height="window.pageHeight - 85" :width="window.pageWidth - 260"></iframe>
  94. </div>
  95. <div style="width: 240px;margin-left: 2px;">
  96. <div style="margin-top: 5px;">
  97. <span style="color: #232748;">人员信息</span>
  98. <div style="display: flex;">
  99. <span style="width: 80px;margin: 7px 0;">检查条码</span>
  100. <el-input ref="checkRequestNo" placeholder="检查条码" v-model="checkRequestNo" size="small" clearable
  101. @keyup.native.enter="onQueryByPacsNo(checkRequestNo)" @focus="onFocus" disabled />
  102. </div>
  103. <div style="display: flex;">
  104. <span style="width: 80px;margin: 7px 0;">姓名</span>
  105. <el-input v-model="patient_register.patientName" size="small" disabled />
  106. </div>
  107. <div style="display: flex;">
  108. <span style="width: 80px;margin: 7px 0;">性别</span>
  109. <el-input v-model="patient_register.sexName" size="small" disabled />
  110. </div>
  111. <div style="display: flex;">
  112. <span style="width: 80px;margin: 7px 0;">年龄</span>
  113. <el-input v-model="patient_register.age" size="small" disabled />
  114. </div>
  115. </div>
  116. <div style="margin-top: 5px;">
  117. <div>
  118. <span>检查结果</span>
  119. <el-radio-group v-model="tabPosition">
  120. <el-radio :label="'top'">横排</el-radio>
  121. <el-radio :label="'left'">纵排</el-radio>
  122. </el-radio-group>
  123. </div>
  124. <el-tabs :tab-position="tabPosition" v-model="tabChoosed">
  125. <el-tab-pane v-for="(item, seq) in doctorCheck.checkItemList" :label="dispLabel(item.itemName)"
  126. :name="seq + ''" :key="seq">
  127. <el-input style="width: 100%;" type="textarea" v-model="item.result" placeholder="请输入检查结果"
  128. :disabled="doctorBtnDisabled('save')"
  129. :autosize="{ minRows: Math.floor((window.pageHeight - 550) / 24), maxRows: 18 }" />
  130. <div style="display: flex;justify-content: space-between;">
  131. <div></div>
  132. <div>
  133. <el-tooltip :content="`给 ${item.itemName} 项目,赋默认结果`" placement="top">
  134. <i class="el-icon-edit" @click="btnDefResult(seq)"
  135. style="font-size: 18px;color: blue;cursor:pointer;margin-right: 10px;"></i>
  136. </el-tooltip>
  137. <el-tooltip :content="`清除 ${item.itemName} 项目的检查结果`" placement="top">
  138. <i class="el-icon-delete" @click="btnClear(seq)"
  139. style="font-size: 18px;color: red;cursor:pointer;margin-right: 10px;"></i>
  140. </el-tooltip>
  141. </div>
  142. </div>
  143. </el-tab-pane>
  144. </el-tabs>
  145. </div>
  146. <div style="margin-top: 5px;">
  147. <span style="color: #232748;">检查结论</span>
  148. <el-table row-key="id" :data="doctorCheck.checkSummaryList" size="samll" height="186" width="100%" border>
  149. <el-table-column width="30" align="center">
  150. <template slot-scope="scope">
  151. <el-tag class="moveSummary" style="height:25px;padding:0 2px;cursor: move;background-color: #EEEEEE;">
  152. <div style="width: 16px;">{{ scope.$index + 1 }}</div>
  153. </el-tag>
  154. </template>
  155. </el-table-column>
  156. <el-table-column prop="summary" label="小结">
  157. <template slot="header">
  158. <div style="display: flex;justify-content:space-between;">
  159. <div>小结</div>
  160. <div></div>
  161. </div>
  162. </template>
  163. <template slot-scope="scope">
  164. <div style="display: flex;">
  165. <el-input type="textarea" v-model="scope.row.summary" :autosize="{ minRows: 1, maxRows: 100 }"
  166. placeholder="请输入小结">
  167. </el-input>
  168. <el-button type="danger" style="min-width:23px;padding:2px;" icon="el-icon-delete"
  169. @click="delSum(scope.$index)" size="small"></el-button>
  170. </div>
  171. </template>
  172. </el-table-column>
  173. </el-table>
  174. </div>
  175. <div style="display: flex;justify-content: space-between;margin-top: 10px;">
  176. <div></div>
  177. <div>
  178. <!--
  179. <el-button type="primary" @click="btnTest" class="commonbutton">测试</el-button>
  180. -->
  181. <el-button type="primary" @click="btnChooseBigtext" :disabled="doctorBtnDisabled('save')"
  182. class="commonbutton">选择描述</el-button>
  183. <el-button type="primary" @click="btnOkBigtext" :disabled="doctorBtnDisabled('save')"
  184. class="commonbutton">保存结果</el-button>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. </el-dialog>
  190. <!--Pacs结果录入模版-->
  191. <el-dialog :title="'Pacs结果录入模版 -- ' + doctorCheck.asbitemName" :visible.sync="dialogWin.PacsTemplate" width="880px"
  192. :close-on-click-modal="false">
  193. <PacsTemplate :refParams="pacsParams" :refFuncOther="handlePacsResult" />
  194. </el-dialog>
  195. <el-dialog title="裁图" :visible.sync="dialogWinCutPic" width="1300px" :close-on-click-modal="false">
  196. <PacsCutPic />
  197. </el-dialog>
  198. </div>
  199. </template>
  200. <script>
  201. import moment from "moment";
  202. import { mapState } from "vuex";
  203. import { Loading } from "element-ui";
  204. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  205. import { getPagePriv, checkPagePriv, deepCopy, arrayExistObj } from "../../utlis/proFunc";
  206. import { hadoopGet, hadoopPost, hadoopPut, hadoopDel } from "../../api/hadoopApi"
  207. import CheckPictureUpload from "./CheckPictureUpload.vue";
  208. import PacsTemplate from "./PacsTemplate.vue";
  209. import PacsCutPic from "./PacsCutPic.vue";
  210. export default {
  211. components: {
  212. CheckPictureUpload, PacsTemplate, PacsCutPic
  213. },
  214. props: ["doctorBtnDisabled", "save","patient_register","refParams"],
  215. data() {
  216. return {
  217. sysConfig: {}, //
  218. pagePriv: {
  219. routeUrlorPageName: 'doctorCheck', //当前页面归属路由或归属页面权限名称
  220. privs: [] // 页面权限
  221. },
  222. checkRequestNo: '',
  223. dialogDcm: false,
  224. iframeSrc: '',
  225. pacsParams: {
  226. from: 'dcm',
  227. refresh: -1,
  228. row: {},
  229. index: 0,
  230. result: '',
  231. summary: ''
  232. },
  233. tabPosition: 'top',
  234. tabChoosed: "0",
  235. checkPictures: [
  236. // {
  237. // id: "1",
  238. // registerCheckId: "registerCheckId",
  239. // isPrint: "Y",
  240. // isPrintTrans: true,
  241. // pictureFilename:
  242. // "https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg",
  243. // },
  244. // {
  245. // id: "2",
  246. // registerCheckId: "registerCheckId",
  247. // isPrint: "Y",
  248. // isPrintTrans: true,
  249. // pictureFilename:
  250. // "https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg",
  251. // },
  252. ],
  253. //图片上传
  254. dialogCheckPictureUpload: false,
  255. uploadSeq: 0, //第几次点图片上传,每点一次清空前次所选图片
  256. // 裁图
  257. dialogWinCutPic: false,
  258. cutPicParam: {},
  259. pictureFileType: '1',
  260. getPicing:false, //是否采图中
  261. fullscreenLoading:false, // 采图交互状态
  262. };
  263. },
  264. created() {
  265. //获取用户当前页面的权限
  266. let userPriv = window.sessionStorage.getItem('userPriv')
  267. if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  268. this.sysConfig = JSON.parse(window.sessionStorage.getItem('sysConfig'))
  269. // console.log('this.sysConfig checkPictures', this.sysConfig)
  270. },
  271. //挂载完成
  272. mounted() {
  273. // 监听来自 Electron 的调用
  274. if (this.$peisAPI) {
  275. try {
  276. //热键--采集图像
  277. this.$peisAPI.onEventFromPictureHotKeyMain((data) => {
  278. this.acceptHotKeyData('add', data)
  279. });
  280. //热键--采集图像设为打印
  281. this.$peisAPI.onEventFromPictureAndPrintHotKeyMain((data) => {
  282. this.acceptHotKeyData('addPrint', data)
  283. });
  284. //热键--设为打印
  285. this.$peisAPI.onEventFromPicturePrintHotKeyMain(() => {
  286. this.acceptHotKeyData('print')
  287. });
  288. //热键--取消打印
  289. this.$peisAPI.onEventFromPictureCancelPrintHotKeyMain(() => {
  290. this.acceptHotKeyData('unPrint')
  291. });
  292. //删除图像
  293. this.$peisAPI.onEventFromPictureDeleteHotKeyMain(() => {
  294. this.acceptHotKeyData('delete')
  295. });
  296. } catch (error) {
  297. console.error(error)
  298. }
  299. }
  300. if (this.refParams.registerCheckId) {
  301. this.getCheckPictures(this.refParams.registerCheckId);
  302. }
  303. },
  304. // 销毁前
  305. beforeDestroy(){
  306. if (this.$peisAPI) {
  307. console.log('采图 beforeDestroy')
  308. try {
  309. // 取消采图热键监听
  310. this.$peisAPI.removeAllListeners("event-from-picture-hot-key-main")
  311. this.$peisAPI.removeAllListeners("event-from-picture-and-print-hot-key-main")
  312. this.$peisAPI.removeAllListeners("event-from-picture-print-hot-key-main")
  313. this.$peisAPI.removeAllListeners("event-from-picture-cancel-print-hot-key-main")
  314. this.$peisAPI.removeAllListeners("event-from-picture-delete-hot-key-main")
  315. } catch (error) {
  316. console.error(error)
  317. }
  318. }
  319. },
  320. computed: {
  321. ...mapState([
  322. "window",
  323. "dict",
  324. "dialogWin",
  325. "dataTransOpts",
  326. "doctorCheck"
  327. ]),
  328. lmoment(date, forMat) {
  329. return moment(new Date(date)).format(forMat);
  330. },
  331. },
  332. methods: {
  333. checkPagePriv,
  334. // 根据checkId获取图片列表信息
  335. getCheckPictures(registerCheckId) {
  336. this.checkPictures = [];
  337. if (!registerCheckId) {
  338. return;
  339. }
  340. // {
  341. // "registerCheckId": "3a0f6a3c-88a5-d5f7-d59b-ef3b3807490b",
  342. // "pictureFilename": "https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg",
  343. // "isPrint": "N",
  344. // "displayOrder": 1,
  345. // "creatorName": "admin",
  346. // "lastModifierName": "admin",
  347. // "lastModificationTime": "2023-12-15T15:24:08",
  348. // "lastModifierId": "3a0c4180-107c-0c89-b25b-0bd34666dcec",
  349. // "creationTime": "2023-12-15T15:24:06",
  350. // "creatorId": "3a0c4180-107c-0c89-b25b-0bd34666dcec",
  351. // "id": "3a0f6a3c-88a5-d5f7-d59b-ef3b38074901"
  352. // }
  353. hadoopGet('pacsApi', `/api/app/registercheckpicture/getregistercheckpictureinregistercheckid?RegisterCheckId=${registerCheckId}`)
  354. // getapi(`/api/app/registercheckpicture/getregistercheckpictureinregistercheckid?RegisterCheckId=${registerCheckId}`)
  355. .then((res) => {
  356. if (res.code > -1) {
  357. this.checkPictures = res.data
  358. this.checkPictures.forEach(e => {
  359. e.isPrintTrans = e.isPrint == "Y" ? true : false
  360. });
  361. // 标记采图中,让滚动条滑到最右边……
  362. if(this.getPicing) this.setGetPicing()
  363. }
  364. });
  365. },
  366. // 生成 图片预览列表
  367. previewSrcList(oriList, curImag) {
  368. let srcList = []
  369. let image = curImag.pictureFilename.indexOf('http') > -1
  370. ? curImag.pictureFilename
  371. : (this.sysConfig.pacsApi || this.sysConfig.apiurl) + curImag.pictureFilename;
  372. srcList.push(image + `?r=${Math.random()}`)
  373. let lfind = arrayExistObj(oriList, 'id', curImag.id)
  374. if (lfind > -1) {
  375. for (let i = lfind + 1; i < oriList.length; i++) {
  376. let e = oriList[i];
  377. image = this.imageFilePlus(e.pictureFilename + `?r=${Math.random()}`)
  378. srcList.push(image)
  379. }
  380. for (let index = 0; index < lfind; index++) {
  381. let e = oriList[index];
  382. image = this.imageFilePlus(e.pictureFilename + `?r=${Math.random()}`)
  383. srcList.push(image)
  384. }
  385. }
  386. return srcList
  387. },
  388. //删除小结
  389. delSum(index) {
  390. this.$confirm("此操作将删除该记录, 是否继续?", "提示", {
  391. confirmButtonText: "是",
  392. cancelButtonText: "否",
  393. type: "warning",
  394. }).then(() => {
  395. this.doctorCheck.checkSummaryList.splice(index, 1);
  396. }).catch(err => {
  397. if (err == "cancel") {
  398. // this.$message.info("已取消删除");
  399. console.log('已取消删除')
  400. }
  401. });
  402. },
  403. // 图片文件补全路径
  404. imageFilePlus(fileName) {
  405. if (fileName.indexOf('base64') > -1 || fileName.indexOf('http') > -1) {
  406. return fileName
  407. } else {
  408. return (this.sysConfig.pacsApi || this.sysConfig.apiurl) + fileName
  409. }
  410. },
  411. // 标记采图中,让滚动条滑到最右边……
  412. setGetPicing(){
  413. let obj = this.$refs['DivPic']
  414. console.log('obj',obj)
  415. this.$nextTick(() => {
  416. //obj.scrollTo({ left: obj.scrollWidth, behavior: 'smooth' })
  417. obj.scrollLeft = obj.scrollWidth
  418. })
  419. },
  420. // 采图
  421. btnGetPic() {
  422. if (!this.doctorCheck.RegisterCheckId) {
  423. this.$message.warning({ showClose: true, message: "未选中组合项目!" });
  424. return;
  425. }
  426. if (!this.$peisAPI) {
  427. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  428. return
  429. }
  430. let toOutShell = {
  431. barCode: this.doctorCheck.checkRequestNo,
  432. patientName: this.patient_register.patientName,
  433. sexName: this.patient_register.sexName,
  434. age: (this.patient_register.age || '') + '',
  435. asbitemName: this.doctorCheck.checkRequestNo || 'temp'
  436. }
  437. // console.log('this.$peisAPI.imageAcquisition', JSON.stringify(toOutShell))
  438. /* bug ,
  439. // let loading = Loading.service({
  440. // lock: true,
  441. // text: "正在加载中,请稍后",
  442. // spinner: "el-icon-loading",
  443. // background: "rgba(0, 0, 0, 0)",
  444. // customClass: "boxStyle"
  445. // });
  446. */
  447. this.fullscreenLoading = true
  448. this.$peisAPI.imageAcquisition(JSON.stringify(toOutShell))
  449. .then(async (res) => {
  450. let lres = JSON.parse(res)
  451. console.log('this.$peisAPI.imageAcquisition', lres)
  452. if (lres.code > -1) {
  453. // 标记采图中,让滚动条滑到最右边……
  454. this.getPicing = true
  455. this.setGetPicing()
  456. for (let i = 0; i < lres.data.length; i++) {
  457. let item = lres.data[i];
  458. // FilePath:
  459. // Image
  460. // ImageFormat
  461. let baseHead = 'data:image/jpeg;base64,'
  462. switch (item.ImageFormat) {
  463. case 'png':
  464. case 'bmp':
  465. baseHead = `data:image/${item.ImageFormat};base64,`
  466. break;
  467. default:
  468. break;
  469. }
  470. this.checkPictures.push({ pictureFilename: baseHead + item.Image })
  471. let fileName = item.FilePath
  472. let dotIndex = fileName.lastIndexOf('\\');
  473. let pointIndex = fileName.lastIndexOf('.');
  474. if (dotIndex > -1) fileName = fileName.substring(dotIndex + 1, pointIndex || fileName.length);
  475. let body = {
  476. registerCheckId: this.refParams.registerCheckId,
  477. pictureBaseStrs: [{
  478. fileName,
  479. localPathName: item.FilePath,
  480. pictureBaseStr: baseHead + item.Image,
  481. isPrint: 'N'
  482. }],
  483. pictureFileType: '0' //采图暂定图0,上传暂定报告1 this.pictureFileType
  484. }
  485. try {
  486. //await postapi('/api/app/RegisterCheckPicture/InstrumentMapping', body)
  487. await hadoopPost('pacsApi', '/api/app/RegisterCheckPicture/InstrumentMapping', body)
  488. } catch (error) {
  489. console.log('btnGetPic err', error)
  490. }
  491. }
  492. this.getCheckPictures(this.refParams.registerCheckId)
  493. } else {
  494. console.log('this.$peisAPI.imageAcquisition', lres.message)
  495. }
  496. }).catch(err => {
  497. this.$message.error(err)
  498. }).finally(() => {
  499. // loading.close()
  500. this.fullscreenLoading = false
  501. });
  502. },
  503. // 接收热键采图
  504. // windows.peisAPI.receive("acceptHotKeyData",() => {
  505. // this.$message.success({showClose:true,message:'调用热键成功'})
  506. // }),
  507. acceptHotKeyData(oprType, data) {
  508. //
  509. console.log('接收壳端热键采图参数 acceptHotKeyData', oprType, data)
  510. //this.$message.success({ showClose: true, message: '调用热键成功' })
  511. if (!this.refParams.registerCheckId) {
  512. console.log("没有选中检查项目")
  513. return
  514. }
  515. // 标记采图中,让滚动条滑到最右边……
  516. this.getPicing = true
  517. this.setGetPicing()
  518. // 设置图片打印或不打印
  519. if (oprType == 'print' || oprType == 'unPrint') {
  520. let count = this.checkPictures.length
  521. if (count == 0) return
  522. // 最后采图的记录
  523. let picRd = this.checkPictures[count - 1]
  524. if (!picRd.id) return
  525. if (oprType == 'print') {
  526. picRd.isPrintTrans = true
  527. picRd.isPrint = 'Y'
  528. } else {
  529. picRd.isPrintTrans = false
  530. picRd.isPrint = 'N'
  531. }
  532. let body = [{
  533. registerCheckId: picRd.registerCheckId,
  534. pictureFilename: picRd.pictureFilename,
  535. pictureFileType: picRd.pictureFileType,
  536. registerCheckPictureId: picRd.id,
  537. isPrintTrans: picRd.isPrintTrans,
  538. isPrint: picRd.isPrint
  539. }]
  540. postapi("/api/app/registercheckpicture/UpdateRegisterCheckPictureStatusMany", body)
  541. .then((res) => {
  542. if (res.code < 0) {
  543. console.log('热键更新图片打印标识失败:', res.message)
  544. } else {
  545. this.getCheckPictures(this.refParams.registerCheckId)
  546. }
  547. })
  548. .catch(err => {
  549. console.log('热键更新图片打印标识失败:', err)
  550. });
  551. } else if (oprType == 'delete') {
  552. let count = this.checkPictures.length
  553. if (count == 0) return
  554. // 最后采图的记录
  555. let picRd = this.checkPictures[count - 1]
  556. if (!picRd.id) return
  557. postapi(`/api/app/registercheckpicture/deleteregistercheckpicturemany`, [picRd.id])
  558. .then(res => {
  559. if (res.code > -1) {
  560. this.checkPictures.splice(count - 1, 1)
  561. this.getCheckPictures(this.refParams.registerCheckId)
  562. } else {
  563. console.log("热键删除图片打印标识失败:", res.message)
  564. }
  565. })
  566. .catch(err => {
  567. console.log("热键删除图片打印标识失败:", err)
  568. })
  569. } else {
  570. try {
  571. let item = data.data[0]
  572. let baseHead = 'data:image/jpeg;base64,'
  573. switch (item.ImageFormat) {
  574. case 'png':
  575. case 'bmp':
  576. baseHead = `data:image/${item.ImageFormat};base64,`
  577. break;
  578. default:
  579. break;
  580. }
  581. let isPrintTrans = false
  582. if (oprType == 'addPrint') {
  583. item.isPrint = 'Y'
  584. isPrintTrans = true
  585. } else {
  586. item.isPrint = 'N'
  587. }
  588. // item.isPrintTrans 是否打印
  589. this.checkPictures.push({ pictureFilename: baseHead + item.Image, isPrintTrans })
  590. let fileName = item.FilePath
  591. let dotIndex = fileName.lastIndexOf('\\');
  592. let pointIndex = fileName.lastIndexOf('.');
  593. if (dotIndex > -1) fileName = Date.now() + fileName.substring(dotIndex + 1, pointIndex || fileName.length);
  594. let body = {
  595. registerCheckId: this.refParams.registerCheckId,
  596. pictureBaseStrs: [{
  597. fileName,
  598. localPathName: item.FilePath,
  599. pictureBaseStr: baseHead + item.Image,
  600. isPrint: item.isPrint
  601. }],
  602. pictureFileType: '0' //采图暂定图0,上传暂定报告1 this.pictureFileType
  603. }
  604. hadoopPost('pacsApi', '/api/app/RegisterCheckPicture/InstrumentMapping', body)
  605. .then(() => {
  606. this.getCheckPictures(this.refParams.registerCheckId)
  607. })
  608. .catch(err => {
  609. console.log('热键采图失败', err)
  610. })
  611. } catch (error) {
  612. console.log('热键采图失败', error)
  613. }
  614. }
  615. },
  616. // 显示tab标签名称,过长处理
  617. dispLabel(itemName) {
  618. return itemName.length > 5 ? (itemName.substring(0, 4) + "…") : itemName
  619. },
  620. // 清除结果
  621. btnClear(seq) {
  622. if (this.doctorBtnDisabled('save')) {
  623. this.$message.warning({ showClose: true, message: "已保存,不可操作!" })
  624. return
  625. }
  626. this.doctorCheck.checkItemList[seq].result = ''
  627. },
  628. // 默认结果
  629. btnDefResult(seq) {
  630. if (this.doctorBtnDisabled('save')) {
  631. this.$message.warning({ showClose: true, message: "已保存,不可操作!" })
  632. return
  633. }
  634. this.doctorCheck.checkItemList[seq].result = this.doctorCheck.checkItemList[seq].defaultResult
  635. },
  636. // 浏览Dcm文件
  637. btnBrowseDcm() {
  638. this.checkRequestNo = this.doctorCheck.checkRequestNo
  639. this.pacsParams.result = this.doctorCheck.checkItemList[0].result
  640. let summary = ''
  641. this.doctorCheck.checkSummaryList.forEach(e => {
  642. summary += e.summary
  643. });
  644. this.pacsParams.summary = summary
  645. this.pacsParams.row = deepCopy(this.doctorCheck.checkItemList[0])
  646. this.pacsParams.index = 0
  647. this.pacsParams.refresh++
  648. // console.log('pacsParams', this.pacsParams)
  649. let token = window.sessionStorage.getItem('token')
  650. this.iframeSrc = `${this.sysConfig.dcmViewers}/?mrn=${this.doctorCheck.checkRequestNo}&token=${token}&pacsapi=${this.sysConfig.pacsApiHttps}`
  651. // this.iframeSrc = `${this.sysConfig.dcmViewers}/viewer?StudyInstanceUIDs=1.3.12.2.1107.5.1.4.79623.30000024091203062645300000022`
  652. this.tabPosition = this.doctorCheck.checkItemList.length > 2 ? 'left' : 'top'
  653. this.tabChoosed = "0"
  654. this.dialogDcm = true
  655. },
  656. // 选择描述与结论
  657. btnChooseBigtext() {
  658. // console.log('this.pacsParams', this.pacsParams)
  659. this.pacsParams.index = parseInt(this.tabChoosed)
  660. this.pacsParams.refresh++
  661. this.dialogWin.PacsTemplate = true
  662. },
  663. // 确定描述与结论
  664. btnOkBigtext() {
  665. console.log('this.pacsParams', this.pacsParams)
  666. // this.doctorCheck.checkItemList[0].result = this.pacsParams.result
  667. /*
  668. this.doctorCheck.checkSummaryList = [{
  669. id: Math.random(),
  670. registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
  671. summary: this.pacsParams.summary,
  672. summaryFlag: 'N',
  673. }]
  674. */
  675. if (this.doctorCheck.checkSummaryList.length == 0) {
  676. this.$message.warning({ showClose: true, message: "请填写检查结论" })
  677. return
  678. }
  679. this.save()
  680. this.dialogDcm = false
  681. },
  682. // 处理 pacs 结果录入的情况
  683. handlePacsResult(row, index, pacsResult) {
  684. Object.assign(this.pacsParams, pacsResult)
  685. },
  686. // 浏览Dcm文件
  687. btnBrowseDcmBak() {
  688. if (!this.doctorCheck.RegisterCheckId) {
  689. this.$message.warning({ showClose: true, message: "未选中组合项目!" });
  690. return;
  691. }
  692. // 创建一个新的 <a> 元素
  693. let a = document.createElement('a');
  694. // 设置 href 属性为要跳转的 URL
  695. a.href = `${this.sysConfig.dcmViewers}/?mrn=24071610696`;
  696. //(可选)设置 target 属性,比如在新窗口打开
  697. a.target = '_blank';
  698. //(可选)防止浏览器将链接添加到历史记录
  699. a.rel = 'noopener noreferrer';
  700. // 将新创建的 <a> 元素添加到 DOM 中
  701. // 注意:这一步是可选的,如果你只想模拟点击而不想在页面上显示 <a> 元素,可以省略这一步
  702. // document.body.appendChild(a);
  703. // 模拟点击 <a> 元素
  704. a.click();
  705. //(可选)移除刚才添加到 DOM 中的 <a> 元素
  706. // 如果你选择了将 <a> 元素添加到 DOM 中,现在可以移除它
  707. // document.body.removeChild(a);
  708. },
  709. btnBrowseDcmBak2() {
  710. let userName = "peis", key = "peis@123"
  711. // let encodedAuthstring = btoa(this.stringToAscIIBytes(`${userName}:${key}`));
  712. let encodedAuthstring = this.toBase64FromUtf8(`${userName}:${key}`);
  713. console.log('encodedAuthstring', encodedAuthstring)
  714. const url = 'http://192.168.4.161:8042/ohif/viewer?url=../studies/dcdc7b20-fe11f38d-f5357ad7-139cd2cd-c0bd3701/ohif-dicom-json';
  715. const Authorization = 'Basic ' + encodedAuthstring;
  716. fetch(url, {
  717. headers: {
  718. 'Authorization': Authorization
  719. }
  720. })
  721. .then(response => response.json())
  722. .then(data => console.log(data))
  723. .catch(error => console.error('Error:', error));
  724. },
  725. toBase64FromUtf8(str) {
  726. // 使用 TextEncoder 将字符串转换为UTF-8字节序列
  727. const encoder = new TextEncoder();
  728. const bytes = encoder.encode(str);
  729. // 将字节序列转换为二进制字符串
  730. let binaryString = '';
  731. for (let byte of bytes) {
  732. binaryString += String.fromCharCode(byte);
  733. }
  734. // 使用 btoa 将二进制字符串转换为Base64
  735. return btoa(binaryString);
  736. },
  737. //导图(上传图片)
  738. btnExpPic() {
  739. if (!this.doctorCheck.RegisterCheckId) {
  740. this.$message.warning({ showClose: true, message: "未选中组合项目!" });
  741. return;
  742. }
  743. this.uploadSeq++;
  744. this.dialogCheckPictureUpload = true;
  745. },
  746. btnClean() {
  747. if (!this.doctorCheck.RegisterCheckId) {
  748. this.$message.warning({ showClose: true, message: "未选中组合项目!" });
  749. return;
  750. }
  751. postapi("/api/app/PacsBusiness/DeletePacsCheckDicomDataByRegisterCheckId", {
  752. registerCheckId: this.doctorCheck.RegisterCheckId
  753. })
  754. .then((res) => {
  755. if (res.code > -1) {
  756. }
  757. });
  758. },
  759. // 裁图/修图/
  760. btnCutPicBak() {
  761. // 跨域了
  762. this.dialogWinCutPic = true
  763. this.$refs.imgCutterModal.handleOpen({
  764. name: "1.png",
  765. src: "http://192.168.2.74:9529/PacsCheckPictureImg/pacs/2024/8/29//3a141f59-cf4c-5e34-966d-aec0a0eea94c//2408010001_0005.jpg.jpg",
  766. });
  767. },
  768. btnCutPic() {
  769. if (this.checkPictures.length == 0) {
  770. this.$message.warning({ showClose: true, message: "暂无可裁图片!" });
  771. return;
  772. }
  773. if (!this.$peisAPI) {
  774. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  775. return
  776. }
  777. let token = window.sessionStorage.getItem("token");
  778. let toOutShell = {
  779. asbitemName: this.doctorCheck.asbitemName,
  780. images: this.checkPictures,
  781. token,
  782. };
  783. this.$peisAPI.imageCut(JSON.stringify(toOutShell))
  784. .then(res => {
  785. let lres = JSON.parse(res)
  786. if (lres.code > -1) {
  787. this.getCheckPictures(this.refParams.registerCheckId);
  788. } else {
  789. console.log('裁图失败', lres.message)
  790. }
  791. })
  792. .catch(err => {
  793. console.log('裁图失败', err)
  794. })
  795. },
  796. //关闭上传图片窗口
  797. closePicUpload() {
  798. this.dialogCheckPictureUpload = false;
  799. },
  800. btnSavePic() {
  801. if (!this.doctorCheck.RegisterCheckId) {
  802. this.$message.warning({ showClose: true, message: "未选中组合项目!" });
  803. return;
  804. }
  805. let body = [];
  806. // [
  807. // {
  808. // "registerCheckPictureId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", // 新增无需传此值
  809. // "registerCheckId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  810. // "pictureFilename": "string",
  811. // "isPrint": "string",
  812. // "displayOrder": 0
  813. // }
  814. // ]
  815. if (this.checkPictures.length == 0) {
  816. this.$message.warning({ showClose: true, message: "没有可保存的图片数据!" });
  817. return;
  818. }
  819. let checkPictures = deepCopy(this.checkPictures);
  820. checkPictures.sort((a, b) => {
  821. let seq1 = 0;
  822. let seq2 = 0;
  823. try {
  824. seq1 = parseInt(a.displayOrder);
  825. } catch (error) {
  826. seq1 = 0;
  827. }
  828. try {
  829. seq2 = parseInt(b.displayOrder);
  830. } catch (error) {
  831. seq2 = 0;
  832. }
  833. return seq1 - seq2;
  834. });
  835. checkPictures.forEach((e) => {
  836. let item = {
  837. registerCheckId: e.registerCheckId,
  838. pictureFilename: e.pictureFilename,
  839. pictureFileType: e.pictureFileType
  840. };
  841. if (e.id) item.registerCheckPictureId = e.id;
  842. if (e.isPrintTrans) {
  843. item.isPrint = "Y";
  844. } else {
  845. item.isPrint = "N";
  846. }
  847. body.push(item);
  848. });
  849. postapi("/api/app/registercheckpicture/UpdateRegisterCheckPictureStatusMany", body)
  850. .then((res) => {
  851. if (res.code > -1) {
  852. this.getCheckPictures(checkPictures[0].registerCheckId);
  853. }
  854. });
  855. },
  856. // 删除图片
  857. btnDelImage(index) {
  858. let body = [this.checkPictures[index].id];
  859. this.delImageBatch(body)
  860. },
  861. // 批量删除图片
  862. delImageBatch(body) {
  863. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  864. confirmButtonText: "是",
  865. cancelButtonText: "否",
  866. type: "warning",
  867. })
  868. .then(() => {
  869. return postapi(`/api/app/registercheckpicture/deleteregistercheckpicturemany`, body);
  870. })
  871. .then((res) => {
  872. if (res?.code > -1) {
  873. let lfind = -1
  874. body.forEach(id => {
  875. lfind = arrayExistObj(this.checkPictures, 'id', id)
  876. if (lfind > -1) this.checkPictures.splice(lfind, 1);
  877. });
  878. }
  879. })
  880. .catch((err) => {
  881. if (err == "cancel") {
  882. this.$message.info({ showClose: true, message: "已取消" });
  883. }
  884. });
  885. },
  886. // 右击剪切图片
  887. rCutPic(start, count) {
  888. this.dataTransOpts.doctorCutPics = this.checkPictures.splice(start, count)
  889. },
  890. // 右击粘贴图片
  891. rCopyPic(imageSeq) {
  892. let body = {
  893. registerCheckPictureIds: [],
  894. registerCheckId: this.refParams.registerCheckId
  895. }
  896. this.dataTransOpts.doctorCutPics.forEach(e => {
  897. body.registerCheckPictureIds.push(e.id)
  898. e.registerCheckId = this.refParams.registerCheckId
  899. });
  900. postapi('/api/app/RegisterCheckPicture/BatchUpdateRegisterCheckIdByRegisterCheckPictureId', body)
  901. .then(res => {
  902. if (res.code > -1) {
  903. this.$message.success({ showClose: true, message: '操作成功!' })
  904. if (imageSeq == -1) {
  905. this.checkPictures = deepCopy(this.dataTransOpts.doctorCutPics)
  906. } else {
  907. this.checkPictures.splice(imageSeq, 0, deepCopy(this.dataTransOpts.doctorCutPics))
  908. }
  909. this.dataTransOpts.doctorCutPics = [] //清除剪切的缓存
  910. }
  911. })
  912. },
  913. // 右击菜单
  914. onContextmenu(event) {
  915. if (this.doctorBtnDisabled('btnSavePic')) {
  916. return false
  917. }
  918. //console.log('event',event.target,event.target.getAttribute('data-imageSeq'))
  919. let imageSeqStr = '-1'
  920. try {
  921. imageSeqStr = event.target.getAttribute('data-imageSeq').toString()
  922. } catch (error) {
  923. }
  924. //console.log('imageSeqStr',imageSeqStr)
  925. let imageSeq = Number(imageSeqStr)
  926. //console.log('imageSeq',imageSeq)
  927. //菜单项
  928. let items = [];
  929. let picNum = this.checkPictures.length
  930. if (imageSeq >= 0 && picNum > 1) {
  931. items.push({
  932. label: "剪切当前图片",
  933. onClick: () => {
  934. this.rCutPic(imageSeq, 1)
  935. },
  936. })
  937. if (imageSeq == 0) {
  938. items.push({
  939. label: "剪切当前图片后面的图片",
  940. onClick: () => {
  941. this.rCutPic(imageSeq + 1, picNum - 1 - imageSeq)
  942. },
  943. })
  944. } else if (imageSeq == picNum - 1) {
  945. items.push({
  946. label: "剪切当前图片前面的图片",
  947. onClick: () => {
  948. this.rCutPic(0, imageSeq)
  949. },
  950. })
  951. } else {
  952. items.push({
  953. label: "剪切当前图片后面的图片",
  954. onClick: () => {
  955. this.rCutPic(imageSeq + 1, picNum - 1 - imageSeq)
  956. },
  957. })
  958. items.push({
  959. label: "剪切当前图片前面的图片",
  960. onClick: () => {
  961. this.rCutPic(0, imageSeq)
  962. },
  963. })
  964. }
  965. }
  966. if (picNum > 0) {
  967. items.push({
  968. label: "剪切所有图片",
  969. onClick: () => {
  970. this.rCutPic(0, this.checkPictures.length)
  971. },
  972. })
  973. }
  974. if (this.dataTransOpts.doctorCutPics.length > 0) {
  975. items.splice(0, 0, {
  976. label: "粘贴图片",
  977. onClick: () => {
  978. this.rCopyPic(imageSeq)
  979. },
  980. })
  981. if (items.length > 1) {
  982. items.splice(1, 0, {
  983. label: "----------------"
  984. })
  985. }
  986. }
  987. // 删除图片
  988. if (picNum > 0) {
  989. items.push({
  990. label: "----------------"
  991. })
  992. if (imageSeq >= 0) {
  993. items.push({
  994. label: "删除当前图片",
  995. onClick: () => {
  996. this.delImageBatch([this.checkPictures[imageSeq].id])
  997. },
  998. })
  999. }
  1000. items.push({
  1001. label: "删除所有图片",
  1002. onClick: () => {
  1003. let body = []
  1004. this.checkPictures.forEach(e => {
  1005. body.push(e.id)
  1006. });
  1007. this.delImageBatch(body)
  1008. },
  1009. })
  1010. }
  1011. // items.push({
  1012. // label: "一级菜单",
  1013. // children: [
  1014. // { label: "修改姓名", onClick: () => { this.fnUpBaseInfo(row, 'patientName'); } }
  1015. // ],
  1016. // onClick: () => { //菜单事件 }
  1017. // })
  1018. // 显示明细历次结果
  1019. this.$contextmenu({
  1020. items,
  1021. event,
  1022. x: event.clientX,
  1023. y: event.clientY,
  1024. customClass: "custom-class",
  1025. zIndex: 3,
  1026. minWidth: 80,
  1027. });
  1028. return false;
  1029. },
  1030. validateInteger(e, index) {
  1031. var regex = /^[0-9]*$/;
  1032. console.log(e, index);
  1033. if (!regex.test(e.value)) {
  1034. // 如果输入不满足整数条件,则清除输入框内容
  1035. e.value = "";
  1036. }
  1037. },
  1038. // 通过检查条码查询相关数据
  1039. onQueryByPacsNo(checkRequestNo) {
  1040. this.checkRequestNo = checkRequestNo
  1041. this.$refs['checkRequestNo'].select()
  1042. postapi('/api/app/PacsBusiness/GetPatientRegisterWithCheckResultByCheckRequestNo', { checkRequestNo })
  1043. .then(res => {
  1044. if (res.code > -1) {
  1045. // 人员信息
  1046. this.patient_register = res.data.patientRegisterDetail
  1047. // 组合项目
  1048. this.doctorCheck.RegisterCheckList = [res.data.registerCheckDetail]
  1049. // 组合项目明细
  1050. this.doctorCheck.checkItemList = res.data.registerCheckItemDetails
  1051. // 小结与建议
  1052. this.doctorCheck.checkSummaryList = res.data.registerCheckSummaryDetails
  1053. this.doctorCheck.checkSuggestionList = res.data.registerCheckSuggestionDetails
  1054. // 上次结果
  1055. this.doctorCheck.preResult = res.data.lastTimeAsbitemResultDetail
  1056. // 检查情况
  1057. this.doctorCheck.RegisterCheckEdit = res.data.registerCheckDetail
  1058. // 图片
  1059. this.checkPictures = res.data.registerCheckPictureDetails
  1060. this.checkPictures.forEach(e => {
  1061. e.isPrintTrans = e.isPrint == "Y" ? true : false
  1062. });
  1063. this.iframeSrc = ''
  1064. this.btnBrowseDcm()
  1065. }
  1066. })
  1067. },
  1068. onFocus(event) {
  1069. this.$refs['checkRequestNo'].select()
  1070. }
  1071. },
  1072. //监听事件
  1073. watch: {
  1074. //检查项目未切换换时 也可以强制刷新数据
  1075. // "dataTransOpts.refresh.register_check_item.M": {
  1076. "refParams.brushItemList": {
  1077. // immediate: true,
  1078. handler(newVal, oldVal) {
  1079. console.log(`watch 检查图片 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.refParams.registerCheckId}`);
  1080. if (newVal != oldVal) this.getCheckPictures(this.refParams.registerCheckId);
  1081. }
  1082. },
  1083. },
  1084. };
  1085. </script>
  1086. <style scoped>
  1087. .query {
  1088. margin-left: 10px;
  1089. margin-right: 2px;
  1090. padding: 1px 1px;
  1091. }
  1092. .btnClass {
  1093. margin: 2px 2px 0;
  1094. height: 26px;
  1095. min-width: 40px;
  1096. padding: 5px 5px;
  1097. /*原始 默认值 10px 10px */
  1098. }
  1099. /* 强制出现滚动条 */
  1100. ::-webkit-scrollbar {
  1101. height: 0.5rem;
  1102. }
  1103. ::-webkit-scrollbar-thumb {
  1104. background-color: #ccc;
  1105. border-radius: 0.25rem;
  1106. }
  1107. </style>