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.

848 lines
30 KiB

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
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
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
12 months ago
2 years ago
12 months ago
2 years ago
12 months ago
2 years ago
1 year ago
2 years ago
12 months ago
12 months ago
12 months 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
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year 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
12 months ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
12 months ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
12 months 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
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
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
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year 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
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year 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
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year 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
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
12 months ago
2 years ago
12 months 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
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year 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
  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">采图</el-button>
  7. </div>
  8. <div v-show="checkPagePriv(pagePriv.privs, 'Dcm')">
  9. <el-button type="primary" class="btnClass" @click="btnBrowseDcm" :disabled="doctorBtnDisabled('btnBrowseDcm')"
  10. size="small">Dcm</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, '导图')" @click.native="btnExpPic"
  22. :disabled="doctorBtnDisabled('btnExpPic')">导入图片</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. <div style="display: flex;">
  33. <div class="demo-image__preview" v-for="(item, index) in checkPictures" :key="item.id"
  34. style="display: inline-block; padding: 0 0 0 2px">
  35. <div style="
  36. position: relative;
  37. font-size: 24px;
  38. margin: -6px 0 0 55px;
  39. height: 30px;
  40. z-index: 2;
  41. ">
  42. <el-tooltip content="删除该图" placement="bottom" effect="light">
  43. <i class="el-icon-close" @click="btnDelImage(index)" v-show="!doctorBtnDisabled('btnDelImage')"
  44. style="color: red; cursor: pointer"></i>
  45. </el-tooltip>
  46. </div>
  47. <div style="margin-top: -25px">
  48. <el-image style="width: 80px; height: 80px; border-radius: 5px" :src="imageFilePlus(item.pictureFilename)"
  49. :preview-src-list="previewSrcList(checkPictures, item)">
  50. </el-image>
  51. </div>
  52. <div style="display: flex">
  53. <div style="margin: -6px 2px 0 1px">
  54. <el-tooltip content="是否打印" placement="bottom" effect="light">
  55. <el-checkbox v-model="item.isPrintTrans" @change="btnSavePic"
  56. :disabled="doctorBtnDisabled('btnSavePic')"></el-checkbox>
  57. </el-tooltip>
  58. </div>
  59. <!--
  60. <div style="font-size: 12px; margin: -2px 0 0 1px">打印</div>
  61. -->
  62. <div style="font-size: 15px; margin: -5px 2px 0 2px">
  63. <el-tooltip content="保存后,图片将按序号从小到大排序" placement="bottom" effect="light">
  64. <input placeholder="排序" v-model="item.displayOrder" @onkeyup="validateInteger(e, index)"
  65. style="width: 30px" :disabled="doctorBtnDisabled('btnSavePic')" />
  66. </el-tooltip>
  67. </div>
  68. <div style="margin: -6px 0 0 2px">
  69. <el-tooltip content="是否报告图片" placement="bottom" effect="light">
  70. <el-checkbox v-model="item.pictureFileType" @change="btnSavePic" true-label="1" false-label="0"
  71. :disabled="doctorBtnDisabled('btnSavePic')"></el-checkbox>
  72. </el-tooltip>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. <el-dialog title="图片上传" :visible.sync="dialogCheckPictureUpload" :close-on-click-modal="false" width="800px"
  79. @close="getCheckPictures(doctorCheck.RegisterCheckId)">
  80. <CheckPictureUpload :registerCheckId="doctorCheck.RegisterCheckId" :uploadSeq="uploadSeq"
  81. :closePicUpload="closePicUpload" />
  82. </el-dialog>
  83. <el-dialog title="Dcm查看" :visible.sync="dialogDcm" :close-on-click-modal="false" fullscreen @close="iframeSrc = ''">
  84. <div style="display: flex;">
  85. <div>
  86. <iframe :src="iframeSrc" :height="window.pageHeight - 85" :width="window.pageWidth - 260"></iframe>
  87. </div>
  88. <div style="width: 240px;margin-left: 2px;">
  89. <div style="margin-top: 5px;">
  90. <span style="color: #232748;">人员信息</span>
  91. <div style="display: flex;">
  92. <span style="width: 80px;margin: 7px 0;">检查条码</span>
  93. <el-input ref="checkRequestNo" placeholder="检查条码" v-model="checkRequestNo" size="small" clearable
  94. @keyup.native.enter="onQueryByPacsNo(checkRequestNo)" @focus="onFocus" disabled />
  95. </div>
  96. <div style="display: flex;">
  97. <span style="width: 80px;margin: 7px 0;">姓名</span>
  98. <el-input v-model="dataTransOpts.tableS.patient_register.patientName" size="small" disabled />
  99. </div>
  100. <div style="display: flex;">
  101. <span style="width: 80px;margin: 7px 0;">性别</span>
  102. <el-input v-model="dataTransOpts.tableS.patient_register.sexName" size="small" disabled />
  103. </div>
  104. <div style="display: flex;">
  105. <span style="width: 80px;margin: 7px 0;">年龄</span>
  106. <el-input v-model="dataTransOpts.tableS.patient_register.age" size="small" disabled />
  107. </div>
  108. </div>
  109. <div style="margin-top: 5px;">
  110. <div>
  111. <span>检查结果</span>
  112. <el-radio-group v-model="tabPosition">
  113. <el-radio :label="'top'">横排</el-radio>
  114. <el-radio :label="'left'">纵排</el-radio>
  115. </el-radio-group>
  116. </div>
  117. <el-tabs :tab-position="tabPosition" v-model="tabChoosed">
  118. <el-tab-pane v-for="(item, seq) in doctorCheck.checkItemList" :label="dispLabel(item.itemName)"
  119. :name="seq + ''" :key="seq">
  120. <el-input style="width: 100%;" type="textarea" v-model="item.result" placeholder="请输入检查结果"
  121. :disabled="doctorBtnDisabled('save')"
  122. :autosize="{ minRows: Math.floor((window.pageHeight - 550) / 24), maxRows: 18 }" />
  123. <div style="display: flex;justify-content: space-between;">
  124. <div></div>
  125. <div>
  126. <el-tooltip :content="`给 ${item.itemName} 项目,赋默认结果`" placement="top">
  127. <i class="el-icon-edit" @click="btnDefResult(seq)"
  128. style="font-size: 18px;color: blue;cursor:pointer;margin-right: 10px;"></i>
  129. </el-tooltip>
  130. <el-tooltip :content="`清除 ${item.itemName} 项目的检查结果`" placement="top">
  131. <i class="el-icon-delete" @click="btnClear(seq)"
  132. style="font-size: 18px;color: red;cursor:pointer;margin-right: 10px;"></i>
  133. </el-tooltip>
  134. </div>
  135. </div>
  136. </el-tab-pane>
  137. </el-tabs>
  138. </div>
  139. <div style="margin-top: 5px;">
  140. <span style="color: #232748;">检查结论</span>
  141. <el-table row-key="id" :data="doctorCheck.checkSummaryList" size="samll" height="186" width="100%" border>
  142. <el-table-column width="30" align="center">
  143. <template slot-scope="scope">
  144. <el-tag class="moveSummary" style="height:25px;padding:0 2px;cursor: move;background-color: #EEEEEE;">
  145. <div style="width: 16px;">{{ scope.$index + 1 }}</div>
  146. </el-tag>
  147. </template>
  148. </el-table-column>
  149. <el-table-column prop="summary" label="小结">
  150. <template slot="header">
  151. <div style="display: flex;justify-content:space-between;">
  152. <div>小结</div>
  153. <div></div>
  154. </div>
  155. </template>
  156. <template slot-scope="scope">
  157. <div style="display: flex;">
  158. <el-input type="textarea" v-model="scope.row.summary" :autosize="{ minRows: 1, maxRows: 100 }"
  159. placeholder="请输入小结">
  160. </el-input>
  161. <el-button type="danger" style="min-width:23px;padding:2px;" icon="el-icon-delete"
  162. @click="delSum(scope.$index)" size="small"></el-button>
  163. </div>
  164. </template>
  165. </el-table-column>
  166. </el-table>
  167. </div>
  168. <div style="display: flex;justify-content: space-between;margin-top: 10px;">
  169. <div></div>
  170. <div>
  171. <!--
  172. <el-button type="primary" @click="btnTest" class="commonbutton">测试</el-button>
  173. -->
  174. <el-button type="primary" @click="btnChooseBigtext" :disabled="doctorBtnDisabled('save')"
  175. class="commonbutton">选择描述</el-button>
  176. <el-button type="primary" @click="btnOkBigtext" :disabled="doctorBtnDisabled('save')"
  177. class="commonbutton">保存结果</el-button>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. </el-dialog>
  183. <!--Pacs结果录入模版-->
  184. <el-dialog :title="'Pacs结果录入模版 -- ' + doctorCheck.asbitemName" :visible.sync="dialogWin.PacsTemplate" width="880px"
  185. :close-on-click-modal="false">
  186. <PacsTemplate :refParams="pacsParams" :refFuncOther="handlePacsResult" />
  187. </el-dialog>
  188. <el-dialog title="裁图" :visible.sync="dialogWinCutPic" width="1300px" :close-on-click-modal="false">
  189. <PacsCutPic />
  190. </el-dialog>
  191. </div>
  192. </template>
  193. <script>
  194. import moment from "moment";
  195. import { mapState } from "vuex";
  196. import { Loading } from "element-ui";
  197. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  198. import { getPagePriv, checkPagePriv, deepCopy, arrayExistObj } from "../../utlis/proFunc";
  199. import { hadoopGet, hadoopPost, hadoopPut, hadoopDel } from "../../api/hadoopApi"
  200. import CheckPictureUpload from "./CheckPictureUpload.vue";
  201. import PacsTemplate from "./PacsTemplate.vue";
  202. import PacsCutPic from "./PacsCutPic.vue";
  203. export default {
  204. components: {
  205. CheckPictureUpload, PacsTemplate, PacsCutPic
  206. },
  207. props: ["doctorBtnDisabled", "save"],
  208. data() {
  209. return {
  210. sysConfig: {}, //
  211. pagePriv: {
  212. routeUrlorPageName: 'doctorCheck', //当前页面归属路由或归属页面权限名称
  213. privs: [] // 页面权限
  214. },
  215. checkRequestNo: '',
  216. dialogDcm: false,
  217. iframeSrc: '',
  218. pacsParams: {
  219. from: 'dcm',
  220. refresh: -1,
  221. row: {},
  222. index: 0,
  223. result: '',
  224. summary: ''
  225. },
  226. tabPosition: 'top',
  227. tabChoosed: "0",
  228. checkPictures: [
  229. // {
  230. // id: "1",
  231. // registerCheckId: "registerCheckId",
  232. // isPrint: "Y",
  233. // isPrintTrans: true,
  234. // pictureFilename:
  235. // "https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg",
  236. // },
  237. // {
  238. // id: "2",
  239. // registerCheckId: "registerCheckId",
  240. // isPrint: "Y",
  241. // isPrintTrans: true,
  242. // pictureFilename:
  243. // "https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg",
  244. // },
  245. ],
  246. //图片上传
  247. dialogCheckPictureUpload: false,
  248. uploadSeq: 0, //第几次点图片上传,每点一次清空前次所选图片
  249. // 裁图
  250. dialogWinCutPic: false,
  251. cutPicParam: {},
  252. pictureFileType: '1'
  253. };
  254. },
  255. created() {
  256. //获取用户当前页面的权限
  257. let userPriv = window.sessionStorage.getItem('userPriv')
  258. if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  259. this.sysConfig = JSON.parse(window.sessionStorage.getItem('sysConfig'))
  260. // console.log('this.sysConfig checkPictures', this.sysConfig)
  261. },
  262. //挂载完成
  263. mounted() {
  264. this.getCheckPictures(this.dataTransOpts.tableS.register_check.id);
  265. },
  266. computed: {
  267. ...mapState([
  268. "window",
  269. "dict",
  270. "dialogWin",
  271. "dataTransOpts",
  272. "doctorCheck",
  273. "patientRegister",
  274. "customerOrg"
  275. ]),
  276. lmoment(date, forMat) {
  277. return moment(new Date(date)).format(forMat);
  278. },
  279. },
  280. methods: {
  281. checkPagePriv,
  282. // 根据checkId获取图片列表信息
  283. getCheckPictures(registerCheckId) {
  284. this.checkPictures = [];
  285. if (!registerCheckId) {
  286. return;
  287. }
  288. // {
  289. // "registerCheckId": "3a0f6a3c-88a5-d5f7-d59b-ef3b3807490b",
  290. // "pictureFilename": "https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg",
  291. // "isPrint": "N",
  292. // "displayOrder": 1,
  293. // "creatorName": "admin",
  294. // "lastModifierName": "admin",
  295. // "lastModificationTime": "2023-12-15T15:24:08",
  296. // "lastModifierId": "3a0c4180-107c-0c89-b25b-0bd34666dcec",
  297. // "creationTime": "2023-12-15T15:24:06",
  298. // "creatorId": "3a0c4180-107c-0c89-b25b-0bd34666dcec",
  299. // "id": "3a0f6a3c-88a5-d5f7-d59b-ef3b38074901"
  300. // }
  301. hadoopGet('pacsApi', `/api/app/registercheckpicture/getregistercheckpictureinregistercheckid?RegisterCheckId=${registerCheckId}`)
  302. // getapi(`/api/app/registercheckpicture/getregistercheckpictureinregistercheckid?RegisterCheckId=${registerCheckId}`)
  303. .then((res) => {
  304. if (res.code > -1) {
  305. this.checkPictures = res.data
  306. this.checkPictures.forEach(e => {
  307. e.isPrintTrans = e.isPrint == "Y" ? true : false
  308. });
  309. }
  310. });
  311. },
  312. // 生成 图片预览列表
  313. previewSrcList(oriList, curImag) {
  314. let srcList = []
  315. let image = curImag.pictureFilename.indexOf('http') > -1
  316. ? curImag.pictureFilename
  317. : (this.sysConfig.pacsApi || this.sysConfig.apiurl) + curImag.pictureFilename;
  318. srcList.push(image)
  319. let lfind = arrayExistObj(oriList, 'id', curImag.id)
  320. if (lfind > -1) {
  321. for (let i = lfind + 1; i < oriList.length; i++) {
  322. let e = oriList[i];
  323. image = this.imageFilePlus(e.pictureFilename)
  324. srcList.push(image)
  325. }
  326. for (let index = 0; index < lfind; index++) {
  327. let e = oriList[index];
  328. image = this.imageFilePlus(e.pictureFilename)
  329. srcList.push(image)
  330. }
  331. }
  332. return srcList
  333. },
  334. //删除小结
  335. delSum(index) {
  336. this.$confirm("此操作将删除该记录, 是否继续?", "提示", {
  337. confirmButtonText: "是",
  338. cancelButtonText: "否",
  339. type: "warning",
  340. }).then(() => {
  341. this.doctorCheck.checkSummaryList.splice(index, 1);
  342. }).catch(err => {
  343. if (err == "cancel") {
  344. // this.$message.info("已取消删除");
  345. console.log('已取消删除')
  346. }
  347. });
  348. },
  349. // 图片文件补全路径
  350. imageFilePlus(fileName) {
  351. if (fileName.indexOf('base64') > -1 || fileName.indexOf('http') > -1) {
  352. return fileName
  353. } else {
  354. return (this.sysConfig.pacsApi || this.sysConfig.apiurl) + fileName
  355. }
  356. },
  357. // 采图
  358. btnGetPic() {
  359. if (!this.doctorCheck.RegisterCheckId) {
  360. this.$message.warning({ showClose: true, message: "未选中组合项目!" });
  361. return;
  362. }
  363. if (!this.$peisAPI) {
  364. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  365. return
  366. }
  367. let toOutShell = {
  368. barCode: this.doctorCheck.checkRequestNo,
  369. patientName: this.dataTransOpts.tableS.patient_register.patientName,
  370. sexName: this.dataTransOpts.tableS.patient_register.sexName,
  371. age: (this.dataTransOpts.tableS.patient_register.age || '') + '',
  372. asbitemName: this.doctorCheck.asbitemName
  373. }
  374. // console.log('this.$peisAPI.imageAcquisition', JSON.stringify(toOutShell))
  375. let loading = Loading.service({
  376. lock: true,
  377. text: "正在加载中,请稍后",
  378. spinner: "el-icon-loading",
  379. background: "rgba(0, 0, 0, 0)",
  380. customClass: "boxStyle"
  381. });
  382. this.$peisAPI.imageAcquisition(JSON.stringify(toOutShell))
  383. .then(async (res) => {
  384. let lres = JSON.parse(res)
  385. console.log('this.$peisAPI.imageAcquisition', lres)
  386. if (lres.code > -1) {
  387. for (let i = 0; i < lres.data.length; i++) {
  388. let item = lres.data[i];
  389. // FilePath:
  390. // Image
  391. // ImageFormat
  392. let baseHead = 'data:image/jpeg;base64,'
  393. switch (item.ImageFormat) {
  394. case 'png':
  395. case 'bmp':
  396. baseHead = `data:image/${item.ImageFormat};base64,`
  397. break;
  398. default:
  399. break;
  400. }
  401. this.checkPictures.push({ pictureFilename: baseHead + item.Image })
  402. let fileName = item.FilePath
  403. let dotIndex = fileName.lastIndexOf('\\');
  404. if (dotIndex > -1) fileName = fileName.substring(dotIndex, fileName.length);
  405. let body = {
  406. registerCheckId: this.dataTransOpts.tableS.register_check.id,
  407. pictureBaseStrs: [{
  408. fileName,
  409. localPathName: item.FilePath,
  410. pictureBaseStr: baseHead + item.Image
  411. }],
  412. pictureFileType: '0' //采图暂定图0,上传暂定报告1 this.pictureFileType
  413. }
  414. try {
  415. //await postapi('/api/app/RegisterCheckPicture/InstrumentMapping', body)
  416. await hadoopPost('pacsApi', '/api/app/RegisterCheckPicture/InstrumentMapping', body)
  417. } catch (error) {
  418. console.log('btnGetPic err', error)
  419. }
  420. }
  421. this.getCheckPictures(this.dataTransOpts.tableS.register_check.id)
  422. } else {
  423. console.log('this.$peisAPI.imageAcquisition', lres.message)
  424. }
  425. }).catch(err => {
  426. this.$message.error(err)
  427. }).finally(() => {
  428. loading.close()
  429. });
  430. },
  431. // 显示tab标签名称,过长处理
  432. dispLabel(itemName) {
  433. return itemName.length > 5 ? (itemName.substring(0, 4) + "…") : itemName
  434. },
  435. // 清除结果
  436. btnClear(seq) {
  437. if (this.doctorBtnDisabled('save')) {
  438. this.$message.warning({ showClose: true, message: "已保存,不可操作!" })
  439. return
  440. }
  441. this.doctorCheck.checkItemList[seq].result = ''
  442. },
  443. // 默认结果
  444. btnDefResult(seq) {
  445. if (this.doctorBtnDisabled('save')) {
  446. this.$message.warning({ showClose: true, message: "已保存,不可操作!" })
  447. return
  448. }
  449. this.doctorCheck.checkItemList[seq].result = this.doctorCheck.checkItemList[seq].defaultResult
  450. },
  451. // 浏览Dcm文件
  452. btnBrowseDcm() {
  453. this.checkRequestNo = this.doctorCheck.checkRequestNo
  454. this.pacsParams.result = this.doctorCheck.checkItemList[0].result
  455. let summary = ''
  456. this.doctorCheck.checkSummaryList.forEach(e => {
  457. summary += e.summary
  458. });
  459. this.pacsParams.summary = summary
  460. this.pacsParams.row = deepCopy(this.doctorCheck.checkItemList[0])
  461. this.pacsParams.index = 0
  462. this.pacsParams.refresh++
  463. // console.log('pacsParams', this.pacsParams)
  464. let token = window.sessionStorage.getItem('token')
  465. this.iframeSrc = `${this.sysConfig.dcmViewers}/?mrn=${this.doctorCheck.checkRequestNo}&token=${token}&pacsapi=${this.sysConfig.pacsApiHttps}`
  466. // this.iframeSrc = `${this.sysConfig.dcmViewers}/viewer?StudyInstanceUIDs=1.3.12.2.1107.5.1.4.79623.30000024091203062645300000022`
  467. this.tabPosition = this.doctorCheck.checkItemList.length > 2 ? 'left' : 'top'
  468. this.tabChoosed = "0"
  469. this.dialogDcm = true
  470. },
  471. // 选择描述与结论
  472. btnChooseBigtext() {
  473. // console.log('this.pacsParams', this.pacsParams)
  474. this.pacsParams.index = parseInt(this.tabChoosed)
  475. this.pacsParams.refresh++
  476. this.dialogWin.PacsTemplate = true
  477. },
  478. // 确定描述与结论
  479. btnOkBigtext() {
  480. console.log('this.pacsParams', this.pacsParams)
  481. // this.doctorCheck.checkItemList[0].result = this.pacsParams.result
  482. /*
  483. this.doctorCheck.checkSummaryList = [{
  484. id: Math.random(),
  485. registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
  486. summary: this.pacsParams.summary,
  487. summaryFlag: 'N',
  488. }]
  489. */
  490. if(this.doctorCheck.checkSummaryList.length == 0){
  491. this.$message.warning({showClose:true,message:"请填写检查结论"})
  492. return
  493. }
  494. this.save()
  495. this.dialogDcm = false
  496. },
  497. // 处理 pacs 结果录入的情况
  498. handlePacsResult(row, index, pacsResult) {
  499. Object.assign(this.pacsParams, pacsResult)
  500. },
  501. // 浏览Dcm文件
  502. btnBrowseDcmBak() {
  503. if (!this.doctorCheck.RegisterCheckId) {
  504. this.$message.warning({ showClose: true, message: "未选中组合项目!" });
  505. return;
  506. }
  507. // 创建一个新的 <a> 元素
  508. let a = document.createElement('a');
  509. // 设置 href 属性为要跳转的 URL
  510. a.href = `${this.sysConfig.dcmViewers}/?mrn=24071610696`;
  511. //(可选)设置 target 属性,比如在新窗口打开
  512. a.target = '_blank';
  513. //(可选)防止浏览器将链接添加到历史记录
  514. a.rel = 'noopener noreferrer';
  515. // 将新创建的 <a> 元素添加到 DOM 中
  516. // 注意:这一步是可选的,如果你只想模拟点击而不想在页面上显示 <a> 元素,可以省略这一步
  517. // document.body.appendChild(a);
  518. // 模拟点击 <a> 元素
  519. a.click();
  520. //(可选)移除刚才添加到 DOM 中的 <a> 元素
  521. // 如果你选择了将 <a> 元素添加到 DOM 中,现在可以移除它
  522. // document.body.removeChild(a);
  523. },
  524. btnBrowseDcmBak2() {
  525. let userName = "peis", key = "peis@123"
  526. // let encodedAuthstring = btoa(this.stringToAscIIBytes(`${userName}:${key}`));
  527. let encodedAuthstring = this.toBase64FromUtf8(`${userName}:${key}`);
  528. console.log('encodedAuthstring', encodedAuthstring)
  529. const url = 'http://192.168.4.161:8042/ohif/viewer?url=../studies/dcdc7b20-fe11f38d-f5357ad7-139cd2cd-c0bd3701/ohif-dicom-json';
  530. const Authorization = 'Basic ' + encodedAuthstring;
  531. fetch(url, {
  532. headers: {
  533. 'Authorization': Authorization
  534. }
  535. })
  536. .then(response => response.json())
  537. .then(data => console.log(data))
  538. .catch(error => console.error('Error:', error));
  539. },
  540. toBase64FromUtf8(str) {
  541. // 使用 TextEncoder 将字符串转换为UTF-8字节序列
  542. const encoder = new TextEncoder();
  543. const bytes = encoder.encode(str);
  544. // 将字节序列转换为二进制字符串
  545. let binaryString = '';
  546. for (let byte of bytes) {
  547. binaryString += String.fromCharCode(byte);
  548. }
  549. // 使用 btoa 将二进制字符串转换为Base64
  550. return btoa(binaryString);
  551. },
  552. //导图(上传图片)
  553. btnExpPic() {
  554. if (!this.doctorCheck.RegisterCheckId) {
  555. this.$message.warning({ showClose: true, message: "未选中组合项目!" });
  556. return;
  557. }
  558. this.uploadSeq++;
  559. this.dialogCheckPictureUpload = true;
  560. },
  561. btnClean() {
  562. if (!this.doctorCheck.RegisterCheckId) {
  563. this.$message.warning({ showClose: true, message: "未选中组合项目!" });
  564. return;
  565. }
  566. postapi("/api/app/PacsBusiness/DeletePacsCheckDicomDataByRegisterCheckId", {
  567. registerCheckId: this.doctorCheck.RegisterCheckId
  568. })
  569. .then((res) => {
  570. if (res.code > -1) {
  571. }
  572. });
  573. },
  574. // 裁图/修图/
  575. btnCutPicBak() {
  576. // 跨域了
  577. this.dialogWinCutPic = true
  578. this.$refs.imgCutterModal.handleOpen({
  579. name: "1.png",
  580. src: "http://192.168.2.74:9529/PacsCheckPictureImg/pacs/2024/8/29//3a141f59-cf4c-5e34-966d-aec0a0eea94c//2408010001_0005.jpg.jpg",
  581. });
  582. },
  583. btnCutPic() {
  584. if (this.checkPictures.length == 0) {
  585. this.$message.warning({ showClose: true, message: "暂无可裁图片!" });
  586. return;
  587. }
  588. if (!this.$peisAPI) {
  589. this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
  590. return
  591. }
  592. let token = window.sessionStorage.getItem("token");
  593. let toOutShell = {
  594. asbitemName: this.doctorCheck.asbitemName,
  595. images: this.checkPictures,
  596. token,
  597. };
  598. this.$peisAPI.imageCut(JSON.stringify(toOutShell))
  599. .then(res => {
  600. let lres = JSON.parse(res)
  601. if (lres.code > -1) {
  602. this.getCheckPictures(this.dataTransOpts.tableS.register_check.id);
  603. } else {
  604. console.log('裁图失败', lres.message)
  605. }
  606. })
  607. .catch(err => {
  608. console.log('裁图失败', err)
  609. })
  610. },
  611. //关闭上传图片窗口
  612. closePicUpload() {
  613. this.dialogCheckPictureUpload = false;
  614. },
  615. btnSavePic() {
  616. if (!this.doctorCheck.RegisterCheckId) {
  617. this.$message.warning({ showClose: true, message: "未选中组合项目!" });
  618. return;
  619. }
  620. let body = [];
  621. // [
  622. // {
  623. // "registerCheckPictureId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", // 新增无需传此值
  624. // "registerCheckId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  625. // "pictureFilename": "string",
  626. // "isPrint": "string",
  627. // "displayOrder": 0
  628. // }
  629. // ]
  630. if (this.checkPictures.length == 0) {
  631. this.$message.warning({ showClose: true, message: "没有可保存的图片数据!" });
  632. return;
  633. }
  634. let checkPictures = deepCopy(this.checkPictures);
  635. checkPictures.sort((a, b) => {
  636. let seq1 = 0;
  637. let seq2 = 0;
  638. try {
  639. seq1 = parseInt(a.displayOrder);
  640. } catch (error) {
  641. seq1 = 0;
  642. }
  643. try {
  644. seq2 = parseInt(b.displayOrder);
  645. } catch (error) {
  646. seq2 = 0;
  647. }
  648. return seq1 - seq2;
  649. });
  650. checkPictures.forEach((e) => {
  651. let item = {
  652. registerCheckId: e.registerCheckId,
  653. pictureFilename: e.pictureFilename,
  654. pictureFileType: e.pictureFileType
  655. };
  656. if (e.id) item.registerCheckPictureId = e.id;
  657. if (e.isPrintTrans) {
  658. item.isPrint = "Y";
  659. } else {
  660. item.isPrint = "N";
  661. }
  662. body.push(item);
  663. });
  664. postapi("/api/app/registercheckpicture/UpdateRegisterCheckPictureStatusMany", body)
  665. .then((res) => {
  666. if (res.code > -1) {
  667. this.getCheckPictures(checkPictures[0].registerCheckId);
  668. }
  669. });
  670. },
  671. // 删除图片
  672. btnDelImage(index) {
  673. let body = [this.checkPictures[index].id];
  674. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  675. confirmButtonText: "是",
  676. cancelButtonText: "否",
  677. type: "warning",
  678. })
  679. .then(() => {
  680. return postapi(`/api/app/registercheckpicture/deleteregistercheckpicturemany`, body);
  681. })
  682. .then((res) => {
  683. if (res && res.code > -1) {
  684. this.checkPictures.splice(index, 1);
  685. }
  686. })
  687. .catch((err) => {
  688. if (err == "cancel") {
  689. this.$message.info({ showClose: true, message: "已取消" });
  690. }
  691. });
  692. },
  693. validateInteger(e, index) {
  694. var regex = /^[0-9]*$/;
  695. console.log(e, index);
  696. if (!regex.test(e.value)) {
  697. // 如果输入不满足整数条件,则清除输入框内容
  698. e.value = "";
  699. }
  700. },
  701. // 通过检查条码查询相关数据
  702. onQueryByPacsNo(checkRequestNo) {
  703. this.checkRequestNo = checkRequestNo
  704. this.$refs['checkRequestNo'].select()
  705. postapi('/api/app/PacsBusiness/GetPatientRegisterWithCheckResultByCheckRequestNo', { checkRequestNo })
  706. .then(res => {
  707. if (res.code > -1) {
  708. // 人员信息
  709. this.dataTransOpts.tableS.patient_register = res.data.patientRegisterDetail
  710. // 组合项目
  711. this.doctorCheck.RegisterCheckList = [res.data.registerCheckDetail]
  712. // 组合项目明细
  713. this.doctorCheck.checkItemList = res.data.registerCheckItemDetails
  714. // 小结与建议
  715. this.doctorCheck.checkSummaryList = res.data.registerCheckSummaryDetails
  716. this.doctorCheck.checkSuggestionList = res.data.registerCheckSuggestionDetails
  717. // 上次结果
  718. this.doctorCheck.preResult = res.data.lastTimeAsbitemResultDetail
  719. // 检查情况
  720. this.doctorCheck.RegisterCheckEdit = res.data.registerCheckDetail
  721. // 图片
  722. this.checkPictures = res.data.registerCheckPictureDetails
  723. this.checkPictures.forEach(e => {
  724. e.isPrintTrans = e.isPrint == "Y" ? true : false
  725. });
  726. this.iframeSrc = ''
  727. this.btnBrowseDcm()
  728. }
  729. })
  730. },
  731. onFocus(event) {
  732. this.$refs['checkRequestNo'].select()
  733. }
  734. },
  735. //监听事件
  736. watch: {
  737. //检查项目未切换换时 也可以强制刷新数据
  738. "dataTransOpts.refresh.register_check_item.M": {
  739. // immediate: true,
  740. handler(newVal, oldVal) {
  741. console.log(`watch 检查图片 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.register_check.id}`);
  742. if (newVal != oldVal) this.getCheckPictures(this.dataTransOpts.tableS.register_check.id);
  743. }
  744. },
  745. },
  746. };
  747. </script>
  748. <style scoped>
  749. .query {
  750. margin-left: 10px;
  751. margin-right: 2px;
  752. padding: 1px 1px;
  753. }
  754. .btnClass {
  755. margin: 2px 2px 0;
  756. height: 26px;
  757. min-width: 40px;
  758. padding: 5px 5px;
  759. /*原始 默认值 10px 10px */
  760. }
  761. /* 强制出现滚动条 */
  762. ::-webkit-scrollbar {
  763. height: 0.5rem;
  764. }
  765. ::-webkit-scrollbar-thumb {
  766. background-color: #ccc;
  767. border-radius: 0.25rem;
  768. }
  769. </style>