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.

821 lines
30 KiB

1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
1 year ago
1 year ago
2 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
2 months ago
1 year ago
1 year ago
2 months ago
1 year ago
1 year ago
2 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 months ago
1 year ago
2 months ago
1 year ago
2 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
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 months ago
1 year ago
2 months ago
1 year ago
2 months ago
1 year ago
2 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 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
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. <template>
  2. <div>
  3. <div class="contenttitle">
  4. 体检 /<span class="contenttitleBold">pacs看图</span>
  5. </div>
  6. <div style="display: flex;">
  7. <div v-if="LocalConfig.doctorCheck.isHaveExternal == 'N'">
  8. <div v-if="pacsType == 'image'" class="image__preview"
  9. :style="`overflow-y: auto;width: ${window.pageWidth - 330}px;height: ${window.pageHeight - 105}px;`">
  10. <div v-for="item in checkPictures" :key="item.id" style="margin-bottom: 5px;">
  11. <el-image :src="imageFilePlus(item.pictureFilename)" :preview-src-list="previewSrcList(checkPictures, item)"
  12. :style="`overflow-y: auto;max-width: ${window.pageWidth - 330}px;height: auto;`"></el-image>
  13. <div style="display: flex;justify-content: space-between;margin-top: -26px;">
  14. <div></div>
  15. <div style="display: flex;width: 60px;">
  16. <div>
  17. <el-checkbox v-model="item.isPrint" true-label="Y" false-label="N" @change="btnSavePic"></el-checkbox>
  18. </div>
  19. <div style="font-size: 14px;font-weight: 700;color: #FF0000; margin: 2px 0 0 2px;z-index: 2;">打印</div>
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. <div v-else>
  25. <iframe :src="iframeSrc" :height="window.pageHeight - 105" :width="window.pageWidth - 330"></iframe>
  26. </div>
  27. </div>
  28. <div :style="`display:${LocalConfig.doctorCheck.isHaveExternal == 'Y' ? 'flex' : 'block'};`">
  29. <!-- 查询条件 -->
  30. <div
  31. :style="`display: block;${LocalConfig.doctorCheck.isHaveExternal == 'Y' ? ('width: ' + leftWidth + 'px;') : ('margin-left: 2px;width: ' + rightWidth + 'px;')}`">
  32. <div style="display: flex;">
  33. <el-select v-model="query.dateType" placeholder="请选择" style="width: 80px" size="small">
  34. <el-option label="检查日期" value="0" />
  35. <el-option label="上传日期" value="1" />
  36. </el-select>
  37. <el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" style="width:90px;"
  38. value-format="yyyy-MM-dd" :picker-options="pickerOptions" />
  39. <span class="spanClass"></span>
  40. <el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small" style="width:90px;"
  41. value-format="yyyy-MM-dd" :picker-options="pickerOptions" />
  42. <el-button icon="el-icon-search" @click="btnQuery" type="primary"
  43. style="font-size: 20px;height:32px;min-width:30px; padding: 5px;z-index: 2;" size="small"></el-button>
  44. </div>
  45. <div style="font-size: 14px;">
  46. <span>体检单位</span>
  47. <el-select v-model="query.customerOrgIds" placeholder="请选择体检单位" :filter-method="filterMethod" default-first-option
  48. clearable filterable style="margin-left: 10px;width:225px;max-height: 32px;" size="small" multiple collapse-tags>
  49. <el-option v-for="item in customerOrg" :key="item.id" :label="item.displayName" :value="item.id">
  50. {{ item.displayName }}
  51. </el-option>
  52. </el-select>
  53. </div>
  54. <div @contextmenu.prevent="onContextmenu">
  55. <el-table :data="pacsList" style="width: 100%;" border highlight-current-row @row-click="rowClick"
  56. :height="tableHeight" :row-style="{ height: '28px' }" ref="pacsList" @cell-contextmenu="onCellRightClick">
  57. <el-table-column prop="patientName" label="姓名" min-width="80" align="center" />
  58. <el-table-column prop="checkRequestNo" label="检查条码" min-width="120" align="center" />
  59. <el-table-column prop="asbitemName" label="检查项目" show-overflow-tooltip min-width="200" />
  60. <el-table-column prop="pacsCheckDate" label="检查日期" min-width="90" align="center">
  61. <template slot-scope="scope">
  62. {{ moment(scope.row.pacsCheckDate).format("yyyy-MM-DD") }}
  63. </template>
  64. </el-table-column>
  65. <el-table-column prop="pacsUploadDate" label="上传日期" min-width="90" align="center">
  66. <template slot-scope="scope">
  67. {{ moment(scope.row.pacsUploadDate).format("yyyy-MM-DD") }}
  68. </template>
  69. </el-table-column>
  70. </el-table>
  71. </div>
  72. </div>
  73. <!-- 检查结果 -->
  74. <div :style="`display: block;margin-left: 2px;width:${rightWidth}px;`">
  75. <div v-if="false" style="margin-top: 5px;">
  76. <span style="color: #232748;">人员信息</span>
  77. <div style="display: flex;">
  78. <span style="width: 80px;margin: 7px 0;">检查条码</span>
  79. <el-input ref="checkRequestNo" placeholder="检查条码" v-model="checkRequestNo" size="small" clearable
  80. @keyup.native.enter="onQueryByPacsNo(checkRequestNo)" @focus="onFocus" disabled />
  81. </div>
  82. <div style="display: flex;">
  83. <span style="width: 80px;margin: 7px 0;">姓名</span>
  84. <el-input v-model="dataTransOpts.tableS.patient_register.patientName" size="small" disabled />
  85. </div>
  86. <div style="display: flex;">
  87. <span style="width: 80px;margin: 7px 0;">性别</span>
  88. <el-input v-model="dataTransOpts.tableS.patient_register.sexName" size="small" disabled />
  89. </div>
  90. <div style="display: flex;">
  91. <span style="width: 80px;margin: 7px 0;">年龄</span>
  92. <el-input v-model="dataTransOpts.tableS.patient_register.age" size="small" disabled />
  93. </div>
  94. </div>
  95. <div>
  96. <div style="margin-top: 5px;">
  97. <span style="color: #232748;">检查结果</span>
  98. <el-radio-group v-model="tabPosition">
  99. <el-radio :label="'top'">横排</el-radio>
  100. <el-radio :label="'left'">纵排</el-radio>
  101. </el-radio-group>
  102. </div>
  103. <el-tabs :tab-position="tabPosition" v-model="tabChoosed">
  104. <el-tab-pane v-for="(item, seq) in doctorCheck.checkItemList" :label="dispLabel(item.itemName)"
  105. :name="seq + ''" :key="seq">
  106. <el-input :style="`width: 98%;font-family: 'Microsoft YaHei';font-size: ${LocalConfig.doctorCheck.pacsDescFontSize}px;`" type="textarea"
  107. v-model="item.result" placeholder="请输入检查结果"
  108. :autosize="{ minRows: LocalConfig.doctorCheck.pacsDescLines, maxRows: LocalConfig.doctorCheck.pacsDescLines }" />
  109. <div style="display: flex;justify-content: space-between;">
  110. <div></div>
  111. <div>
  112. <el-tooltip :content="`给 ${item.itemName} 项目,赋默认结果`" placement="top">
  113. <i class="el-icon-edit" @click="btnDefResult(seq)"
  114. style="font-size: 18px;color: blue;cursor:pointer;margin-right: 10px;"></i>
  115. </el-tooltip>
  116. <el-tooltip :content="`清除 ${item.itemName} 项目的检查结果`" placement="top">
  117. <i class="el-icon-delete" @click="btnClear(seq)"
  118. style="font-size: 18px;color: red;cursor:pointer;margin-right: 10px;"></i>
  119. </el-tooltip>
  120. </div>
  121. </div>
  122. </el-tab-pane>
  123. <el-input v-if="doctorCheck.checkItemList.length == 0" :style="`margin-bottom: 20px;width: 99%;font-family: 'Microsoft YaHei';font-size: ${LocalConfig.doctorCheck.pacsDescFontSize}px;`" type="textarea"
  124. placeholder="请输入检查结果"
  125. :autosize="{ minRows: LocalConfig.doctorCheck.pacsDescLines, maxRows: LocalConfig.doctorCheck.pacsDescLines }" />
  126. </el-tabs>
  127. </div>
  128. <div style="margin-top: -15px;">
  129. <span style="color: #232748;">检查结论</span>
  130. <el-table row-key="id" :data="doctorCheck.checkSummaryList" size="samll" :height="resultHeight" width="100%" border>
  131. <el-table-column width="30" align="center">
  132. <template slot-scope="scope">
  133. <el-tag class="moveSummary" style="height:25px;padding:0 2px;cursor: move;background-color: #EEEEEE;">
  134. <div style="width: 16px;">{{ scope.$index + 1 }}</div>
  135. </el-tag>
  136. </template>
  137. </el-table-column>
  138. <el-table-column prop="summary" label="小结">
  139. <template slot="header">
  140. <div style="display: flex;justify-content:space-between;">
  141. <div>小结</div>
  142. <div></div>
  143. </div>
  144. </template>
  145. <template slot-scope="scope">
  146. <div style="display: flex;font-family: 'Microsoft YaHei';">
  147. <el-input type="textarea" v-model="scope.row.summary" :autosize="{ minRows: 1, maxRows: 100 }"
  148. placeholder="请输入小结" :style="`font-size: ${LocalConfig.doctorCheck.pacsDescFontSize}px;`">
  149. </el-input>
  150. <el-button type="danger" style="min-width:23px;padding:2px;" icon="el-icon-delete"
  151. @click="delSum(scope.$index)" size="small"></el-button>
  152. </div>
  153. </template>
  154. </el-table-column>
  155. </el-table>
  156. </div>
  157. <div style="display: flex;justify-content: space-between;margin-top: 10px;">
  158. <div>
  159. <el-checkbox v-model="autoNext" true-label="Y" false-label="N" size="small">自动下一条</el-checkbox>
  160. </div>
  161. <div>
  162. <!--
  163. <el-button type="primary" @click="btnTest" class="commonbutton">测试</el-button>
  164. -->
  165. <el-button type="primary" @click="btnChooseBigtext" style="width: 90px;" size="small" class="commonbutton"
  166. :disabled="dataTransOpts.tableS.patient_register.completeFlag == '3'">选择描述</el-button>
  167. <el-button type="primary" @click="btnOkBigtext" style="width: 90px;" size="small" class="commonbutton"
  168. :disabled="dataTransOpts.tableS.patient_register.completeFlag == '3'">保存结果</el-button>
  169. </div>
  170. </div>
  171. </div>
  172. </div>
  173. </div>
  174. <!--Pacs结果录入模版-->
  175. <el-dialog :title="'Pacs结果录入模版 -- ' + doctorCheck.asbitemName" :visible.sync="dialogWin.PacsTemplate" width="880px"
  176. :close-on-click-modal="false">
  177. <PacsTemplate :refParams="pacsParams" :refFuncOther="handlePacsResult" />
  178. </el-dialog>
  179. </div>
  180. </template>
  181. <script>
  182. import moment from "moment";
  183. import { mapState } from "vuex";
  184. import { Loading } from "element-ui";
  185. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  186. import { getPagePriv, checkPagePriv, deepCopy, arrayExistObj } from "../../utlis/proFunc";
  187. import { hadoopGet, hadoopPost, hadoopPut, hadoopDel } from "../../api/hadoopApi"
  188. import CheckPictureUpload from "./CheckPictureUpload.vue";
  189. import PacsTemplate from "./PacsTemplate.vue";
  190. export default {
  191. components: {
  192. CheckPictureUpload, PacsTemplate
  193. },
  194. data() {
  195. return {
  196. rightWidth: 430, // 右侧宽度
  197. sysConfig: {}, //
  198. pagePriv: {
  199. routeUrlorPageName: 'doctorCheck', //当前页面归属路由或归属页面权限名称
  200. privs: [] // 页面权限
  201. },
  202. query: {
  203. patientName: "",
  204. checkRequestNo: "",
  205. dateType: "1",
  206. startDate: "",
  207. endDate: "",
  208. maxResultCount: 1000,
  209. skipCount: 0,
  210. customerOrgIds:[]
  211. },
  212. rClickRow: null, //右击的行
  213. rClickColumn: null, //右击的列(预留)
  214. autoNext: 'Y', // 保存后自动下一条
  215. doctorCheckEdit: {},
  216. pacsList: [],
  217. curPacs: {},
  218. checkRequestNo: '',
  219. dialogDcm: false,
  220. iframeSrc: '',
  221. pacsParams: {
  222. from: 'dcm',
  223. refresh: -1,
  224. row: {},
  225. index: 0,
  226. result: '',
  227. summary: ''
  228. },
  229. pacsType: 'dcm', // image/dcm
  230. checkPictures: [],
  231. tabChoosed: "0",
  232. tabPosition: "top", // 多个明细检查排列方式
  233. customerOrg:[], // 单位
  234. LocalConfig: {
  235. doctorCheck: { // 医生诊台
  236. scheduledAet: '', //scheduledAet
  237. // deviceId: '', // 设备ID
  238. pacsDescLines: '5',
  239. pacsDescLineH: '18',
  240. isHaveExternal: 'N',
  241. pacsDescFontSize: 14, //描述控件的字体大小
  242. }
  243. },
  244. pacs_interface_barcode_type:'0', //pacs系统条码类型:0:检查条码,1:人员条码
  245. };
  246. },
  247. created() {
  248. //获取用户当前页面的权限
  249. let userPriv = window.sessionStorage.getItem('userPriv')
  250. if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  251. this.sysConfig = JSON.parse(window.sessionStorage.getItem('sysConfig'))
  252. let LocalConfig = JSON.parse(window.localStorage.getItem("LocalConfig") || null)
  253. if (LocalConfig?.doctorCheck?.pacsType) this.pacsType = LocalConfig.doctorCheck.pacsType
  254. if (LocalConfig?.doctorCheck?.deviceId) {
  255. this.pacsReq.deviceId = LocalConfig.doctorCheck.deviceId
  256. this.query.deviceId = LocalConfig.doctorCheck.deviceId
  257. }
  258. if (LocalConfig?.doctorCheck?.scheduledAet) this.pacsReq.scheduledAet = LocalConfig.doctorCheck.scheduledAet
  259. if (LocalConfig?.doctorCheck?.pacsDescLines) this.LocalConfig.doctorCheck.pacsDescLines = LocalConfig.doctorCheck.pacsDescLines
  260. if (LocalConfig?.doctorCheck?.pacsDescLineH) this.LocalConfig.doctorCheck.pacsDescLineH = LocalConfig.doctorCheck.pacsDescLineH
  261. if (LocalConfig?.doctorCheck?.isHaveExternal) this.LocalConfig.doctorCheck.isHaveExternal = LocalConfig.doctorCheck.isHaveExternal
  262. if (LocalConfig?.doctorCheck?.pacsDescFontSize) this.LocalConfig.doctorCheck.pacsDescFontSize = LocalConfig.doctorCheck.pacsDescFontSize
  263. // console.log('this.pacsType', this.pacsType,)
  264. //获取单位列表
  265. getapi("/api/app/customer-org/parent-all").then((res) => {
  266. if (res.code != -1) {
  267. this.customerOrgAll = res.data;
  268. let lfind = arrayExistObj(this.customerOrgAll, "id", this.dict.personOrgId);
  269. if (lfind > -1) this.customerOrgAll.splice(lfind, 1);
  270. this.customerOrg = deepCopy(this.customerOrgAll);
  271. }
  272. });
  273. // 获取系统参数(pacs系统条码类型:0:检查条码,1:人员条码)
  274. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId:'pacs_interface_barcode_type' })
  275. .then(res => {
  276. if(res.code > -1){
  277. this.pacs_interface_barcode_type = res.data||"0"
  278. }
  279. })
  280. },
  281. //挂载完成
  282. mounted() {
  283. let today = moment(new Date()).format("yyyy-MM-DD")
  284. this.query.startDate = today
  285. this.query.endDate = today
  286. this.doctorCheck.checkItemList = []
  287. this.result = ''
  288. this.summary = ''
  289. },
  290. computed: {
  291. ...mapState([
  292. "pickerOptions",
  293. "window",
  294. "dict",
  295. "dialogWin",
  296. "dataTransOpts",
  297. "doctorCheck",
  298. "patientRegister"
  299. ]),
  300. lmoment(date, forMat) {
  301. return moment(new Date(date)).format(forMat);
  302. },
  303. // 左侧宽度
  304. leftWidth() {
  305. return this.window.pageWidth - this.rightWidth - 20
  306. },
  307. // 左侧宽度
  308. resultHeight() {
  309. return this.LocalConfig.doctorCheck.isHaveExternal == 'N' ? 120 : 300
  310. },
  311. //表格高度
  312. tableHeight() {
  313. let h = Number(this.LocalConfig.doctorCheck.pacsDescLineH)
  314. let n = Number(this.LocalConfig.doctorCheck.pacsDescLines)
  315. let th = this.window.pageHeight - this.resultHeight - 270 - 76 - (n * h) - 34
  316. if (this.LocalConfig.doctorCheck.isHaveExternal == 'Y') th = this.window.pageHeight - 85 - 76
  317. return th
  318. },
  319. },
  320. methods: {
  321. checkPagePriv, moment,
  322. // 显示tab标签名称,过长处理
  323. dispLabel(itemName) {
  324. return itemName.length > 5 ? (itemName.substring(0, 4) + "…") : itemName
  325. },
  326. // 清除结果
  327. btnClear(seq) {
  328. this.doctorCheck.checkItemList[seq].result = ''
  329. },
  330. // 默认结果
  331. btnDefResult(seq) {
  332. this.doctorCheck.checkItemList[seq].result = this.doctorCheck.checkItemList[seq].defaultResult
  333. },
  334. // 生成 图片预览列表
  335. previewSrcList(oriList, curImag) {
  336. let srcList = []
  337. let image = curImag.pictureFilename.indexOf('http') > -1
  338. ? curImag.pictureFilename
  339. : (this.sysConfig.pacsApi || this.sysConfig.apiurl) + curImag.pictureFilename;
  340. srcList.push(image)
  341. let lfind = arrayExistObj(oriList, 'id', curImag.id)
  342. if (lfind > -1) {
  343. for (let i = lfind + 1; i < oriList.length; i++) {
  344. let e = oriList[i];
  345. image = this.imageFilePlus(e.pictureFilename)
  346. srcList.push(image)
  347. }
  348. for (let index = 0; index < lfind; index++) {
  349. let e = oriList[index];
  350. image = this.imageFilePlus(e.pictureFilename)
  351. srcList.push(image)
  352. }
  353. }
  354. return srcList
  355. },
  356. // 图片文件补全路径
  357. imageFilePlus(fileName) {
  358. if (fileName.indexOf('base64') > -1 || fileName.indexOf('http') > -1) {
  359. return fileName
  360. } else {
  361. return (this.sysConfig.pacsApi || this.sysConfig.apiurl) + fileName
  362. }
  363. },
  364. btnSavePic() {
  365. let body = [];
  366. // [
  367. // {
  368. // "registerCheckPictureId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", // 新增无需传此值
  369. // "registerCheckId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  370. // "pictureFilename": "string",
  371. // "isPrint": "string",
  372. // "displayOrder": 0
  373. // }
  374. // ]
  375. let checkPictures = deepCopy(this.checkPictures);
  376. checkPictures.sort((a, b) => {
  377. let seq1 = 0;
  378. let seq2 = 0;
  379. try {
  380. seq1 = parseInt(a.displayOrder);
  381. } catch (error) {
  382. seq1 = 0;
  383. }
  384. try {
  385. seq2 = parseInt(b.displayOrder);
  386. } catch (error) {
  387. seq2 = 0;
  388. }
  389. return seq1 - seq2;
  390. });
  391. checkPictures.forEach((e) => {
  392. let item = {
  393. registerCheckId: e.registerCheckId,
  394. pictureFilename: e.pictureFilename,
  395. isPrint: e.isPrint
  396. };
  397. if (e.id) item.registerCheckPictureId = e.id;
  398. body.push(item);
  399. });
  400. postapi("/api/app/registercheckpicture/UpdateRegisterCheckPictureStatusMany", body)
  401. .then((res) => {
  402. if (res.code > -1) {
  403. //this.getCheckPictures(checkPictures[0].registerCheckId);
  404. }
  405. });
  406. },
  407. filterMethod(keyWords) {
  408. if (keyWords) {
  409. this.customerOrg = [];
  410. this.customerOrgAll.forEach((item) => {
  411. if (
  412. item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 ||
  413. item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
  414. // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
  415. ) {
  416. this.customerOrg.push(item);
  417. }
  418. });
  419. } else {
  420. this.customerOrg = deepCopy(this.customerOrgAll);
  421. }
  422. },
  423. btnQuery() {
  424. let body = Object.assign({}, this.query)
  425. if (!body.checkRequestNo) delete body.checkRequestNo
  426. if (!body.patientName) delete body.patientName
  427. if (!body.startDate || !body.endDate) {
  428. this.$message.warning({ showClose: true, message: '请选择日期' })
  429. return
  430. }
  431. // 0:普通检查; 1:检验; 2:特检; 3:放射
  432. if (this.pacsType == 'image') {
  433. body.checkTypeFlag = '2'
  434. } else {
  435. body.checkTypeFlag = '3'
  436. }
  437. postapi('/api/app/PacsBusiness/GetPatientRegisterPacsCheck', body)
  438. .then(res => {
  439. if (res.code > -1) {
  440. res.data.items.forEach((e, i) => {
  441. e.seq = i // 增加序号
  442. });
  443. this.pacsList = res.data.items
  444. }
  445. })
  446. },
  447. rowClick(row) {
  448. this.curPacs = row
  449. this.onQueryByPacsNo(row.checkRequestNo)
  450. },
  451. //右击菜单
  452. onCellRightClick(row, column) {
  453. this.rClickRow = { ...row }; //右击的行记录
  454. this.rClickColumn = { ...column }; //右击的列(预留)
  455. // console.log(row, column.property);
  456. },
  457. onContextmenu(event) {
  458. //// console.log('onContextmenu',event);
  459. if (!this.rClickRow) return false;
  460. let row = { ...this.rClickRow };
  461. let items = [] //菜单项
  462. items.push({
  463. label: "清除pacs影像数据",
  464. onClick: () => {
  465. postapi("/api/app/PacsBusiness/DeletePacsCheckDicomDataByRegisterCheckId", {
  466. registerCheckId: row.registerCheckId
  467. })
  468. .then((res) => {
  469. if (res.code < 0) {
  470. this.$message.error({ showClose: true, message: res.message })
  471. }
  472. });
  473. },
  474. })
  475. this.$contextmenu({
  476. items,
  477. event,
  478. //x: event.clientX,
  479. //y: event.clientY,
  480. customClass: "custom-class",
  481. zIndex: 3,
  482. minWidth: 80,
  483. });
  484. this.rClickRow = null;
  485. return false;
  486. },
  487. //删除小结
  488. delSum(index) {
  489. this.$confirm("此操作将删除该记录, 是否继续?", "提示", {
  490. confirmButtonText: "是",
  491. cancelButtonText: "否",
  492. type: "warning",
  493. }).then(() => {
  494. this.doctorCheck.checkSummaryList.splice(index, 1);
  495. }).catch(err => {
  496. if (err == "cancel") {
  497. // this.$message.info("已取消删除");
  498. console.log('已取消删除')
  499. }
  500. });
  501. },
  502. // 浏览Dcm文件
  503. btnBrowseDcm() {
  504. // console.log('this.doctorCheck', this.doctorCheck.RegisterCheckEdit)
  505. this.checkRequestNo = this.doctorCheck.RegisterCheckEdit.checkRequestNo
  506. this.pacsParams.result = this.doctorCheck.checkItemList[0].result
  507. let summary = ''
  508. this.doctorCheck.checkSummaryList.forEach(e => {
  509. summary += e.summary
  510. });
  511. this.pacsParams.summary = summary
  512. this.pacsParams.row = deepCopy(this.doctorCheck.checkItemList[0])
  513. this.pacsParams.index = 0
  514. this.pacsParams.refresh++
  515. let barcodeNo = this.doctorCheck.RegisterCheckEdit.checkRequestNo
  516. if(this.pacs_interface_barcode_type == '1'){
  517. barcodeNo = this.dataTransOpts.tableS.patient_register.patientRegisterNo
  518. }
  519. // console.log('pacsParams', this.pacsParams)
  520. let token = window.sessionStorage.getItem('token')
  521. let url = `${this.sysConfig.dcmViewers}/?mrn=${barcodeNo}&token=${token}&pacsapi=${this.sysConfig.pacsApiHttps}`
  522. // this.iframeSrc = `${this.sysConfig.dcmViewers}/viewer?StudyInstanceUIDs=1.3.12.2.1107.5.1.4.79623.30000024091203062645300000022`
  523. this.dialogDcm = true
  524. // 有分屏且安装有壳
  525. if (this.$peisAPI && this.LocalConfig.doctorCheck.isHaveExternal == 'Y') {
  526. let inParams = ''
  527. try {
  528. inParams = JSON.stringify({ url })
  529. } catch (error) {
  530. this.$message.error({ showClose: true, message: '壳参数 JSON.stringify({ url }) 分析失败:' + error })
  531. console.log('壳参数 JSON.stringify({ url }) 分析失败:',error)
  532. return
  533. }
  534. this.$peisAPI.openExternal(inParams)
  535. .then(res => {
  536. if (res.code < 0) {
  537. this.$message.error({ showClose: true, message: '壳打开分屏失败:' + res.message })
  538. console.log( '壳打开分屏失败:',res.message)
  539. this.iframeSrc = url
  540. }
  541. })
  542. .catch(err => {
  543. this.$message.error({ showClose: true, message: '壳打开分屏失败:' + err })
  544. console.log( '壳打开分屏失败:',err)
  545. this.iframeSrc = url
  546. })
  547. .finally(() => console.log('this.$peisAPI.openExternal over'))
  548. } else {
  549. this.iframeSrc = url
  550. }
  551. },
  552. // 选择描述与结论
  553. btnChooseBigtext() {
  554. // console.log('this.pacsParams', this.pacsParams)
  555. if(this.doctorCheck.asbitemName){
  556. this.pacsParams.index = parseInt(this.tabChoosed)
  557. this.pacsParams.refresh++
  558. this.dialogWin.PacsTemplate = true
  559. }else{
  560. this.$message.warning({showClose:true,message:"没有可操作的数据!"})
  561. }
  562. },
  563. // 确定描述与结论
  564. btnOkBigtext() {
  565. // console.log('this.pacsParams', this.pacsParams)
  566. /*
  567. if (!this.pacsParams.summary) {
  568. this.$message.warning({ showClose: true, message: '请填写检查结论' })
  569. return
  570. }
  571. this.doctorCheck.checkSummaryList = [{
  572. id: Math.random(),
  573. registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
  574. summary: this.pacsParams.summary,
  575. summaryFlag: 'N',
  576. }]
  577. */
  578. if(!this.doctorCheck.asbitemName){
  579. this.$message.warning({showClose:true,message:"没有可操作的数据!"})
  580. return
  581. }
  582. if (this.doctorCheck.checkSummaryList.length < 1) {
  583. this.$message.warning({ showClose: true, message: '请填写检查结论' })
  584. return
  585. }
  586. this.save()
  587. .then(() => {
  588. if (this.autoNext == 'Y') {
  589. let lfind = arrayExistObj(this.pacsList, 'seq', this.curPacs.seq)
  590. if (lfind > -1 && this.pacsList.length - 1 > lfind) {
  591. this.rowClick(this.pacsList[lfind + 1])
  592. this.$refs['pacsList'].setCurrentRow(this.pacsList[lfind + 1]);
  593. }
  594. }
  595. })
  596. .catch(err => {
  597. console.log(err)
  598. this.$message.error({ showClose: true, message: err })
  599. })
  600. },
  601. //保存数据
  602. save() {
  603. return new Promise((resolve, reject) => {
  604. let checkDate = this.doctorCheck.RegisterCheckEdit.checkDate || new Date();
  605. checkDate = moment(new Date(checkDate)).format('yyyy-MM-DD HH:mm:ss'); //yyyy-MM-DD HH:mm:ss
  606. let checkDoctorId = this.doctorCheck.RegisterCheckEdit.checkDoctorId || null;
  607. let registerCheckId = this.doctorCheck.RegisterCheckEdit.id
  608. // 明细
  609. let registerCheckItems = []
  610. this.doctorCheck.checkItemList.forEach(e => {
  611. registerCheckItems.push({
  612. itemId: e.itemId,
  613. result: e.result,
  614. checkDoctorName: checkDoctorId,
  615. checkDate,
  616. })
  617. });
  618. // 小结
  619. let summarys = []
  620. this.doctorCheck.checkSummaryList.forEach(item => {
  621. summarys.push({
  622. summary: item.summary,
  623. summaryFlag: item.summaryFlag,
  624. })
  625. });
  626. // 建议
  627. let suggestions = []
  628. this.doctorCheck.checkSuggestionList.forEach(item => {
  629. suggestions.push({
  630. suggestion: item.suggestion
  631. })
  632. });
  633. let body = {
  634. registerCheckId,
  635. checkDoctorId,
  636. checkDate,
  637. registerCheckItems,
  638. summarys,
  639. suggestions
  640. }
  641. if (summarys.length == 0) reject('请填写结论!')
  642. postapi('/api/app/registercheck/UpdateCheckResult', body)
  643. .then(res => {
  644. if (res.code > -1) {
  645. this.doctorCheck.RegisterCheckEdit.completeFlag = '1';
  646. //更新组合项目列表记录状态
  647. let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList, 'id', body.registerCheckId)
  648. if (lfind > -1) this.doctorCheck.RegisterCheckList[lfind].completeFlag = '1'
  649. resolve(res)
  650. } else {
  651. reject(res.message)
  652. }
  653. })
  654. .catch(err => reject(err))
  655. })
  656. },
  657. // 处理 pacs 结果录入的情况
  658. handlePacsResult(row, index, pacsResult) {
  659. Object.assign(this.pacsParams, pacsResult)
  660. },
  661. // 通过检查条码查询相关数据
  662. onQueryByPacsNo(checkRequestNo) {
  663. this.checkRequestNo = checkRequestNo
  664. postapi('/api/app/PacsBusiness/GetPatientRegisterWithCheckResultByCheckRequestNo', { checkRequestNo })
  665. .then(res => {
  666. if (res.code > -1) {
  667. // 人员信息
  668. this.dataTransOpts.tableS.patient_register = res.data.patientRegisterDetail
  669. // 检查信息
  670. this.doctorCheck.RegisterCheckEdit = res.data.registerCheckDetail
  671. // 组合项目
  672. this.doctorCheck.RegisterCheckList = [res.data.registerCheckDetail]
  673. // 组合项目明细
  674. this.doctorCheck.checkItemList = res.data.registerCheckItemDetails
  675. if (this.doctorCheck.checkItemList.length > 0) {
  676. this.tabChoosed = "0"
  677. }
  678. if (this.doctorCheck.checkItemList.length > 3) {
  679. this.tabPosition = 'left'
  680. } else {
  681. this.tabPosition = 'top'
  682. }
  683. // 小结与建议
  684. this.doctorCheck.checkSummaryList = res.data.registerCheckSummaryDetails
  685. this.doctorCheck.checkSuggestionList = res.data.registerCheckSuggestionDetails
  686. // 上次结果
  687. this.doctorCheck.preResult = res.data.lastTimeAsbitemResultDetail
  688. // 检查情况
  689. this.doctorCheck.RegisterCheckEdit = res.data.registerCheckDetail
  690. // 图片
  691. this.checkPictures = res.data.registerCheckPictureDetails
  692. this.checkPictures.forEach(e => {
  693. e.isPrintTrans = e.isPrint == "Y" ? true : false
  694. });
  695. this.iframeSrc = ''
  696. this.btnBrowseDcm()
  697. }
  698. })
  699. },
  700. },
  701. //监听事件
  702. watch: {
  703. //检查项目未切换换时 也可以强制刷新数据
  704. // "dataTransOpts.refresh.register_check_item.M": {
  705. // // immediate: true,
  706. // handler(newVal, oldVal) {
  707. // console.log(`watch 检查图片 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.register_check.id}`);
  708. // if (newVal != oldVal) this.getCheckPictures(this.dataTransOpts.tableS.register_check.id);
  709. // }
  710. // },
  711. },
  712. };
  713. </script>
  714. <style scoped>
  715. .query {
  716. margin-left: 10px;
  717. margin-right: 2px;
  718. padding: 1px 1px;
  719. }
  720. .spanClass {
  721. font-size: 14px;
  722. padding: 6px 2px 0 0;
  723. }
  724. .btnClass {
  725. margin: 2px 2px 0;
  726. height: 26px;
  727. min-width: 40px;
  728. padding: 5px 5px;
  729. /*原始 默认值 10px 10px */
  730. }
  731. /* 强制出现滚动条 */
  732. ::-webkit-scrollbar {
  733. height: 0.5rem;
  734. }
  735. ::-webkit-scrollbar-thumb {
  736. background-color: #ccc;
  737. border-radius: 0.25rem;
  738. }
  739. </style>