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.

1446 lines
48 KiB

2 years ago
2 years ago
1 month ago
1 month ago
4 days ago
1 month ago
4 weeks ago
1 month 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 month ago
2 years ago
1 month ago
2 years ago
2 years ago
1 year ago
3 days ago
1 month 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
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
2 years ago
2 years ago
1 year 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 month 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 month ago
1 year ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 month 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
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 month 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
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
3 weeks ago
1 month ago
3 weeks ago
2 years ago
2 years ago
1 month ago
1 year ago
1 year ago
2 months ago
1 month ago
1 month ago
2 years ago
2 years ago
2 years ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks ago
1 month ago
1 month ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 month 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
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
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
1 year ago
2 years ago
2 years ago
1 year 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
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years 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
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
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 month ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
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
1 year ago
2 years ago
1 year ago
2 years ago
3 days ago
1 month ago
3 days ago
1 month ago
3 days ago
1 month ago
3 days 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
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
2 years ago
2 years ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month 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
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
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
4 weeks ago
4 weeks 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
4 weeks 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
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years 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
2 years ago
2 years ago
1 year ago
2 months ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
3 days ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
3 days ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 month ago
3 weeks ago
1 month ago
3 weeks ago
3 days ago
3 days ago
3 days ago
3 weeks ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
3 weeks ago
2 weeks ago
3 weeks ago
2 weeks ago
3 weeks 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
1 year 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 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
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>
  3. <div @contextmenu.prevent="onContextmenu">
  4. <el-table :data="doctorCheck.checkItemList" style="width: 100%" :height="tableHeight" border highlight-current-row
  5. @row-click="rowClick" @row-dblclick="dblClick" size="small">
  6. <el-table-column prop="itemName" label="项目" min-width="160" />
  7. <el-table-column prop="result" label="结果" min-width="420">
  8. <template slot-scope="scope">
  9. <div style="display: flex;">
  10. <el-autocomplete style="width: 100%" type="textarea" v-model="scope.row.result" placeholder="请输入结果值"
  11. :disabled="rowResultDisabled(scope.row)" :autosize="{ minRows: 1, maxRows: 10 }" :ref="scope.row.itemId"
  12. :trigger-on-focus="false" :fetch-suggestions="querySearch" :data-lineModeFlag="scope.row.lineModeFlag"
  13. @input="
  14. madeTooltips(scope.$index);
  15. computeFun(scope.$index);
  16. " v-bind:class="scope.row.class">
  17. </el-autocomplete>
  18. <el-button style="min-width: 23px; padding: 2px" icon="el-icon-caret-bottom"
  19. @click="btnMoreResult(scope.row, scope.$index)" :disabled="rowResultDisabled(scope.row)"
  20. size="small"></el-button>
  21. <el-button style="min-width: 23px; padding: 2px; margin-left: 2px"
  22. @click="btnPacsResult(scope.row, scope.$index)" :disabled="rowResultDisabled(scope.row)"
  23. size="small">P</el-button>
  24. <el-button style="min-width: 23px; padding: 5.8px; margin-left: 2px"
  25. :disabled="rowResultDisabled(scope.row)" @click="btnPacsRessulst(scope.row)" size="small">S</el-button>
  26. <!-- <el-popover
  27. placement="top-end"
  28. width="500"
  29. trigger="click"
  30. :title="scope.row.itemName"
  31. >
  32. <el-tabs v-model="activeName">
  33. <el-tab-pane label="文字结果" name="first">
  34. <el-table :data="gridData">
  35. <el-table-column
  36. property="checkDate"
  37. label="检查日期"
  38. align="center"
  39. ></el-table-column>
  40. <el-table-column
  41. property="itemResult"
  42. label="项目结果"
  43. align="center"
  44. ></el-table-column>
  45. </el-table>
  46. </el-tab-pane>
  47. <el-tab-pane label="折线图" name="second">
  48. <div
  49. style="height: 200px; width: 200px"
  50. ref="chart"
  51. ></div>
  52. </el-tab-pane>
  53. </el-tabs>
  54. <el-button
  55. slot="reference"
  56. style="min-width: 23px; padding: 5.8px; margin-left: 2px"
  57. :disabled="rowResultDisabled(scope.row)"
  58. @click="btnPacsRessulst(scope.row)"
  59. size="small"
  60. >S</el-button
  61. >
  62. </el-popover> -->
  63. </div>
  64. </template>
  65. </el-table-column>
  66. <el-table-column prop="unit" label="单位" width="90" align="center" />
  67. <el-table-column prop="referenceRangeValue" label="参考范围" width="120" align="center" />
  68. <el-table-column prop="resultStatusId" label="提示" width="40" align="center">
  69. <template slot-scope="scope">
  70. <div>
  71. {{
  72. dddw(
  73. resultStatus,
  74. "id",
  75. scope.row.resultStatusId,
  76. "dataInputPrompt"
  77. )
  78. }}
  79. </div>
  80. </template>
  81. </el-table-column>
  82. <el-table-column prop="criticalFlag" label="危急值" width="50" align="center">
  83. <template slot-scope="scope">
  84. <el-button :style="[
  85. { minWidth: '23px' },
  86. { padding: '6px 2px' },
  87. {
  88. backgroundColor: scope.row.isCriticalValue == 'Y' ? 'red' : '',
  89. },
  90. ]" @click="btnCritical(scope.row)" size="small">W</el-button>
  91. </template>
  92. </el-table-column>
  93. </el-table>
  94. </div>
  95. <!--模拟弹窗-->
  96. <div v-show="hisResultDetailDialogVisible"
  97. :style="`z-index:2;border-radius: 10px;border: 1px solid #ddd;background-color:#FFF; position: absolute;top:0px;right:0px;width:200px;height: 600px;opacity:1;`">
  98. <div style="display: flex;justify-content:space-between;">
  99. <div style="margin-left: 5px;">历次明细结果</div>
  100. <div>
  101. <el-tooltip content="关闭历次明细窗口" placement="bottom" effect="light">
  102. <i class="el-icon-close" @click="hisResultDetailDialogVisible = false"
  103. style="font-size: 24px;color: red;cursor:pointer;"></i>
  104. </el-tooltip>
  105. </div>
  106. </div>
  107. <!-- 明细历次结果 -->
  108. <el-table :data="gridData" border width="100%" height="575" size="small" highlight-current-row
  109. style="border-radius:10px;">
  110. <el-table-column prop="checkDate" label="检查日期" min-width="90" align="center" />
  111. <el-table-column prop="itemResult" label="项目结果" min-width="100">
  112. <template slot-scope="scope">
  113. <div style="margin-left: 2px;">{{ scope.row.itemResult }}</div>
  114. </template>
  115. </el-table-column>
  116. </el-table>
  117. </div>
  118. <!--弹窗-->
  119. <div>
  120. <!-- 结果录入模版 -->
  121. <el-dialog title="结果录入模版" :visible.sync="dialogWinMoreResult" width="800px" :close-on-click-modal="false">
  122. <div style="margin-top: -10px" @contextmenu.prevent="onContextmenuTemplate">
  123. <el-checkbox v-model="LocalConfig.doctorCheck.isSplitChooseResult" size="small" true-label="Y"
  124. false-label="N">选结果模板时自动添加分隔符</el-checkbox>
  125. <div style="
  126. overflow-y: auto;
  127. height: 300px;
  128. width: 100%;
  129. display: flex;
  130. flex-wrap: wrap;
  131. align-content: flex-start;
  132. ">
  133. <div v-for="item in moreResult.data" :key="item.id" style="margin: 5px; cursor: pointer"
  134. @click="clickResult(item)" @dblclick="dblclickResult(item)">
  135. <el-tag size="samll" style="
  136. padding: 0 3px;
  137. height: 24px;
  138. line-height: 24px;
  139. font-size: 14px;
  140. color: #303133;
  141. background-color: white;
  142. ">{{ item.result }}</el-tag>
  143. </div>
  144. </div>
  145. <div>特殊符号</div>
  146. <div style="
  147. overflow-y: auto;
  148. width: 100%;
  149. display: flex;
  150. flex-wrap: wrap;
  151. align-content: flex-start;
  152. ">
  153. <div v-for="item in symbols" :key="item.id" style="margin: 1px 2px; cursor: pointer"
  154. @click="insertSymbols(item.displayName)">
  155. <el-tag style="
  156. padding: 0 3px;
  157. height: 24px;
  158. line-height: 24px;
  159. font-size: 15px;
  160. color: #303133;
  161. background-color: white;
  162. ">
  163. {{ item.displayName }}
  164. </el-tag>
  165. </div>
  166. </div>
  167. <div style="display: flex; justify-content: space-between">
  168. <div style="margin-top: 5px">录入结果</div>
  169. <div style="overflow-y: auto; display: flex; flex-wrap: wrap">
  170. <div v-for="item in splitSymbols" :key="item" style="margin: 1px 2px; cursor: pointer"
  171. @click="insertSymbols(item)">
  172. <el-tag style="
  173. padding: 0 3px;
  174. height: 24px;
  175. line-height: 24px;
  176. font-size: 15px;
  177. color: #303133;
  178. background-color: white;
  179. ">
  180. {{ item }}
  181. </el-tag>
  182. </div>
  183. </div>
  184. </div>
  185. <el-input id="resultBox" style="width: 100%" class="commonFont" type="textarea"
  186. :autosize="{ minRows: 4, maxRows: 4 }" v-model="moreResult.result" />
  187. </div>
  188. <span slot="footer" class="dialog-footer">
  189. <el-button @click="btnClear"> </el-button>
  190. <el-button type="primary" @click="btnOkResult('defaultResult')">默认结果</el-button>
  191. <el-button type="primary" @click="btnOkResult('')"> </el-button>
  192. <el-button @click="dialogWinMoreResult = false"> </el-button>
  193. </span>
  194. </el-dialog>
  195. <!--Pacs结果录入模版-->
  196. <el-dialog :title="'Pacs结果录入模版 -- ' + doctorCheck.checkItemList[pacsParams.index].itemName"
  197. v-if="dialogWinPacsTemplate" :visible.sync="dialogWinPacsTemplate" width="880px" :close-on-click-modal="false">
  198. <PacsTemplate :refParams="pacsParams" :refFuncOther="handlePacsResult" />
  199. </el-dialog>
  200. <!--历史结果与折线图-->
  201. <el-dialog :title="curRow.itemName" :visible.sync="previousResults" width="500px" :close-on-click-modal="true"
  202. :show-close="false" @close="resultsclose">
  203. <el-tabs v-model="activeName">
  204. <el-tab-pane label="文字结果" name="first">
  205. <el-table :data="gridData">
  206. <el-table-column property="checkDate" label="检查日期" align="center"></el-table-column>
  207. <el-table-column property="itemResult" label="项目结果" align="center"></el-table-column>
  208. </el-table>
  209. </el-tab-pane>
  210. <el-tab-pane label="折线图" name="second">
  211. <div style="height: 400px; width: 500px" ref="chart1"></div>
  212. </el-tab-pane>
  213. </el-tabs>
  214. </el-dialog>
  215. </div>
  216. </div>
  217. </template>
  218. <script>
  219. // 0-无参考范围,1-数字型,2-字符型,3-性激素
  220. import { mapState } from "vuex";
  221. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  222. import { arrayExistObj, dddw, deepCopy, getPagePriv, checkPagePriv } from "../../utlis/proFunc";
  223. import PacsTemplate from "./PacsTemplate.vue";
  224. import * as echarts from "echarts";
  225. export default {
  226. components: {
  227. PacsTemplate,
  228. },
  229. props: ["isCheckPicture", "registerCheckId", "doctor_check_check_charge"],
  230. data() {
  231. return {
  232. pagePriv: {
  233. routeUrlorPageName: "doctorCheck", //当前页面归属路由或归属页面权限名称
  234. privs: [], // 页面权限
  235. },
  236. activeName: "first",
  237. previousResults: false,
  238. gridData: [],
  239. resultStatus: [], //结果状态提示数据
  240. tipsNormal: {
  241. id: "01",
  242. displayName: "正常",
  243. dataInputPrompt: "正常",
  244. reportPrompt: "正常",
  245. reportBackgroundColor: 16777215,
  246. reportFontColor: 0,
  247. dataInputBackgroundColor: 16777215,
  248. dataInputFontColor: 0,
  249. }, //正常提示
  250. tipsError: {}, //错误提示
  251. tipsNegative: {}, //阴性提示
  252. tipsLowPositive: {}, //弱阳性提示
  253. tipsPositive: {}, //阳性提示
  254. tipsLow: {}, //偏低提示
  255. tipsHigh: {}, //偏高提示
  256. tipsSuperLow: {}, //超低提示
  257. tipsSuperHigh: {}, //超高提示
  258. tipsSuper: {}, //文字型危急值
  259. restaurants: [], //结果模版
  260. currentRow: -1, //当前操作的行
  261. dialogWinMoreResult: false,
  262. dialogWinPacsTemplate: false,
  263. moreResult: {
  264. data: [],
  265. result: "",
  266. defaultResult: "",
  267. index: 0, // 明细序列
  268. }, //结果模版
  269. selection: {
  270. // 光标位置
  271. start: 0,
  272. end: 0,
  273. },
  274. symbols: [], //特殊符号
  275. splitSymbols: [";", "、"], // 分隔符
  276. userInfo: {
  277. operatorType: "0",
  278. userId: "",
  279. user: "",
  280. },
  281. // pacs 结果录入
  282. pacsParams: {
  283. from: "doctor",
  284. refresh: -1, // 强制刷新
  285. row: {},
  286. index: 0,
  287. result: "",
  288. summary: "",
  289. },
  290. curRow: {},
  291. // 医生诊台相关的本地设置
  292. LocalConfig: {
  293. doctorCheck: {
  294. isSelectAll: 'N', // 录入结果时,是否全选
  295. pacsDescFontSize: "14px", //描述内容的字体大小
  296. isSplitChooseResult: "Y", // 选结果时,是否自动加上分隔符
  297. }
  298. },
  299. hisResultDetailDialogVisible: false, // 历史结果显示页面
  300. // 避免双击与单击冲突
  301. clickTime1: 0, //第一次点时间
  302. clickTime2: 0, //第二次点时间
  303. //身高体重血压仪项目
  304. comData: {
  305. height_item_id: '', //身高明细项目编号
  306. weight_item_id: '', //体重明细项目编号
  307. hb_item_id: '', //收缩压(高压)明细项目编号
  308. lb_item_id: '', //舒张压(低压)明细项目编号
  309. },
  310. };
  311. },
  312. created() {
  313. //获取用户当前页面的权限
  314. let userPriv = window.sessionStorage.getItem("userPriv");
  315. if (userPriv)
  316. this.pagePriv.privs = deepCopy(
  317. getPagePriv(this.pagePriv.routeUrlorPageName)
  318. );
  319. this.dictInit();
  320. let LocalConfig = JSON.parse(window.localStorage.getItem("LocalConfig") || null)
  321. if (LocalConfig?.doctorCheck?.isSelectAll) this.LocalConfig.doctorCheck.isSelectAll = LocalConfig.doctorCheck.isSelectAll
  322. if (LocalConfig?.doctorCheck?.pacsDescFontSize) this.LocalConfig.doctorCheck.pacsDescFontSize = LocalConfig.doctorCheck.pacsDescFontSize + 'px'
  323. if (LocalConfig?.doctorCheck?.isSplitChooseResult) this.LocalConfig.doctorCheck.isSplitChooseResult = LocalConfig.doctorCheck.isSplitChooseResult
  324. },
  325. //挂载完成
  326. mounted() {
  327. // 监听来自 Electron 的调用
  328. if (this.$peisAPI) {
  329. try {
  330. // 右击
  331. this.$peisAPI.onContextMenuAction((data) => {
  332. this.onContextMenuDIY(data)
  333. });
  334. // 身高体重仪、血压仪
  335. this.$peisAPI.onSerialData((data) => {
  336. this.onSerialData(data)
  337. });
  338. } catch (error) {
  339. console.error(error)
  340. }
  341. }
  342. this.checkItemList(this.dataTransOpts.tableS.register_check.id);
  343. this.userInfo.operatorType = window.sessionStorage.getItem("operatorType") || '0';
  344. this.userInfo.userId = window.sessionStorage.getItem("userId") || null;
  345. this.userInfo.user = window.sessionStorage.getItem("user") || null;
  346. },
  347. computed: {
  348. ...mapState([
  349. "window",
  350. "dataTransOpts",
  351. "dict",
  352. "dialogWin",
  353. "doctorCheck",
  354. ]),
  355. tableHeight() {
  356. let temp = this.window.pageHeight < 600 ? 600 : this.window.pageHeight;
  357. return Math.floor(
  358. ((temp - 315 - (this.isCheckPicture ? 110 : 0)) * 3) / 5
  359. );
  360. },
  361. },
  362. methods: {
  363. dddw,
  364. dictInit() {
  365. // 获取系统参数(是否显示历次明细结果)
  366. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId: 'doctor_check_disp_hisdetail' })
  367. .then(res => {
  368. if (res.code > -1) {
  369. let hisResultDetailDialogVisible = res.data || "N"
  370. if (hisResultDetailDialogVisible == 'Y') {
  371. this.hisResultDetailDialogVisible = true
  372. }
  373. }
  374. })
  375. // 获取系统参数(身高明细项目ID)
  376. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId: 'height_item_id' })
  377. .then(res => {
  378. if (res.code > -1) {
  379. this.comData.height_item_id = res.data || ""
  380. }
  381. })
  382. // 获取系统参数(体重明细项目ID)
  383. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId: 'weight_item_id' })
  384. .then(res => {
  385. if (res.code > -1) {
  386. this.comData.weight_item_id = res.data || ""
  387. }
  388. })
  389. // 获取系统参数(收缩压(高压)明细项目ID)
  390. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId: 'hb_item_id' })
  391. .then(res => {
  392. if (res.code > -1) {
  393. this.comData.hb_item_id = res.data || ""
  394. }
  395. })
  396. // 获取系统参数(舒张压(低压)明细项目ID)
  397. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId: 'lb_item_id' })
  398. .then(res => {
  399. if (res.code > -1) {
  400. this.comData.lb_item_id = res.data || ""
  401. }
  402. })
  403. //获取结果状态提示数据
  404. getapi("/api/app/result-status").then((res) => {
  405. if (res.code != -1) {
  406. this.resultStatus = res.data;
  407. this.resultStatus.forEach((e) => {
  408. switch (e.id) {
  409. case "01": // 正常
  410. e.tooltips = "tipsNormal";
  411. this.colorTrans(e, e.tooltips);
  412. break;
  413. case "02": // 错误
  414. e.tooltips = "tipsError";
  415. this.colorTrans(e, e.tooltips);
  416. break;
  417. case "03": // 阴性
  418. e.tooltips = "tipsNegative";
  419. this.colorTrans(e, e.tooltips);
  420. break;
  421. case "04": // 阳性
  422. e.tooltips = "tipsPositive";
  423. this.colorTrans(e, e.tooltips);
  424. break;
  425. case "05": // 弱阳性
  426. e.tooltips = "tipsLowPositive";
  427. this.colorTrans(e, e.tooltips);
  428. break;
  429. case "06": // 偏低
  430. e.tooltips = "tipsLow";
  431. this.colorTrans(e, e.tooltips);
  432. break;
  433. case "07": // 偏高
  434. e.tooltips = "tipsHigh";
  435. this.colorTrans(e, e.tooltips);
  436. break;
  437. case "08": // 危急值下限
  438. e.tooltips = "tipsSuperLow";
  439. this.colorTrans(e, e.tooltips);
  440. break;
  441. case "09": // 危急值上限
  442. e.tooltips = "tipsSuperHigh";
  443. this.colorTrans(e, e.tooltips);
  444. break;
  445. case "10": // 危急值
  446. e.tooltips = "tipsSuper";
  447. this.colorTrans(e, e.tooltips);
  448. break;
  449. default:
  450. e.tooltips = "tipsNormal";
  451. this.colorTrans(e, e.tooltips);
  452. break;
  453. }
  454. });
  455. }
  456. });
  457. //获取结果状态提示数据
  458. postapi("/api/app/CommonChar/GetCommonCharList", {}).then((res) => {
  459. if (res.code >= 0) {
  460. this.symbols = res.data;
  461. }
  462. });
  463. },
  464. btnPacsRessulst(row) {
  465. this.curRow = row;
  466. postapi("/api/app/RegisterCheckItem/GetItemTwoHistoricalResults", {
  467. registerCheckId: row.registerCheckId,
  468. itemId: row.itemId,
  469. }).then((res) => {
  470. if (res.code != -1) {
  471. this.previousResults = true;
  472. this.gridData = res.data;
  473. this.$nextTick(() => {
  474. this.initEcharts();
  475. });
  476. }
  477. });
  478. },
  479. initEcharts() {
  480. let yAxisData = [];
  481. let xAxisData = [];
  482. for (let i = 0; i < this.gridData.length; i++) {
  483. if (this.gridData[i].checkDate) {
  484. xAxisData.push(this.gridData[i].checkDate);
  485. yAxisData.push(this.gridData[i].itemResult);
  486. }
  487. }
  488. let myChart = echarts.init(this.$refs.chart1);
  489. let option1 = {
  490. tooltip: {
  491. trigger: "axis",
  492. confine: true,
  493. },
  494. legend: {
  495. type: "scroll",
  496. orient: "horizontal", // 垂直
  497. right: "3%", // 左对齐
  498. top: "0%", // 位于顶部
  499. },
  500. grid: {
  501. show: false,
  502. left: "2%",
  503. right: "2%",
  504. top: "6%",
  505. bottom: "0%",
  506. containLabel: true,
  507. },
  508. xAxis: {
  509. type: "category",
  510. data: xAxisData,
  511. axisLabel: {
  512. textStyle: {
  513. fontSize: "14",
  514. },
  515. },
  516. axisLine: {
  517. show: true,
  518. },
  519. },
  520. yAxis: {
  521. type: "value",
  522. axisLabel: {
  523. textStyle: {
  524. fontSize: "14",
  525. },
  526. },
  527. },
  528. series: [
  529. {
  530. name: "项目结果",
  531. type: "line",
  532. data: yAxisData,
  533. },
  534. ],
  535. };
  536. myChart.setOption(option1);
  537. },
  538. resultsclose() {
  539. this.activeName = "first";
  540. },
  541. // chartTabs(tab) {
  542. // if (tab.name == "second") {
  543. // this.$nextTick(() => {
  544. // this.initEcharts();
  545. // });
  546. // }
  547. // },
  548. // 颜色转换
  549. // displayName: "错误",
  550. // dataInputPrompt: "×",
  551. // reportPrompt: "×",
  552. // reportBackgroundColor: 2427166,
  553. // reportFontColor: 1070166,
  554. // dataInputBackgroundColor: 321313,
  555. // dataInputFontColor: 12991019,
  556. colorTrans(dataColor, frontColor) {
  557. let tempColor =
  558. "000000" + Number(dataColor.dataInputBackgroundColor).toString(16);
  559. let backgroundColor = "#" + tempColor.substring(tempColor.length - 6);
  560. tempColor = "000000" + Number(dataColor.dataInputFontColor).toString(16);
  561. let color = "#" + tempColor.substring(tempColor.length - 6);
  562. this[frontColor] = Object.assign({}, dataColor, {
  563. backgroundColor,
  564. color,
  565. });
  566. console.log(`this.${frontColor}`, this[frontColor]);
  567. },
  568. // "referenceRangeValue": "15-55",
  569. // "referenceRangeTypeFlag": "1",
  570. // "criticalRangeValue": null,
  571. // "result"
  572. madeTooltips(index) {
  573. // let ts = confirm('提示')
  574. let checkItem = this.doctorCheck.checkItemList[index];
  575. let tooltips = "tipsNormal";
  576. checkItem.class = tooltips;
  577. let referenceRangeTypeFlag = checkItem.referenceRangeTypeFlag || "0"; //参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素
  578. // console.log('madeTooltips',index,referenceRangeTypeFlag)
  579. switch (referenceRangeTypeFlag) {
  580. case "3": // 1 是数字型,3 是性激素期
  581. case "1":
  582. // console.log('1、3')
  583. if (checkItem.result) {
  584. let tempResult = checkItem.result
  585. .replaceAll("<", "")
  586. .replaceAll("≤", "")
  587. .replaceAll("≦", "")
  588. .replaceAll(">", "")
  589. .replaceAll("≥", "")
  590. .replaceAll("≧", "")
  591. .replaceAll("=", "")
  592. .replaceAll(" ", "");
  593. console.log("tempResult", isNaN(tempResult), tempResult);
  594. if (isNaN(tempResult)) break;
  595. let result = Number(tempResult);
  596. if (checkItem.referenceRangeValue) {
  597. let criticalRangeValue = checkItem.criticalRangeValue;
  598. let valueArr = checkItem.referenceRangeValue
  599. .replaceAll("--", "-")
  600. .replaceAll("〜", "-")
  601. .replaceAll("~", "-")
  602. .split("-");
  603. if (valueArr.length == 1) valueArr.unshift(0);
  604. // console.log('valueArr',checkItem.referenceRangeValue,valueArr)
  605. if (criticalRangeValue) {
  606. let criticalArr = criticalRangeValue
  607. .replaceAll("--", "-")
  608. .replaceAll("〜", "-")
  609. .replaceAll("~", "-")
  610. .split("-");
  611. if (criticalArr.length == 1) criticalArr.unshift(0);
  612. // console.log('criticalArr',checkItem.criticalRangeValue,criticalArr)
  613. if (result < Number(criticalArr[0])) {
  614. tooltips = "tipsSuperLow";
  615. } else if (result > Number(criticalArr[1])) {
  616. tooltips = "tipsSuperHigh";
  617. } else if (result < Number(valueArr[0])) {
  618. tooltips = "tipsLow";
  619. } else if (result > Number(valueArr[1])) {
  620. tooltips = "tipsHigh";
  621. }
  622. } else {
  623. if (result < Number(valueArr[0])) {
  624. tooltips = "tipsLow";
  625. } else if (result > Number(valueArr[1])) {
  626. tooltips = "tipsHigh";
  627. }
  628. }
  629. }
  630. //错误值校验
  631. let errArr = [];
  632. if (checkItem.inputCheck) {
  633. errArr = checkItem.inputCheck
  634. .replaceAll("--", "-")
  635. .replaceAll("〜", "-")
  636. .replaceAll("~", "-")
  637. .split("-");
  638. if (errArr.length == 1) errArr.unshift(-1);
  639. }
  640. if (errArr && errArr.length > 1) {
  641. if (result < Number(errArr[0]) || result > Number(errArr[1])) {
  642. tooltips = "tipsError";
  643. console.log("checkItem", checkItem);
  644. }
  645. }
  646. }
  647. break;
  648. case "2":
  649. if (checkItem.result) {
  650. if (
  651. checkItem.result.indexOf("阴性") > -1 ||
  652. checkItem.result.indexOf("-") > -1
  653. ) {
  654. tooltips = "tipsNegative";
  655. } else if (
  656. checkItem.result.indexOf("弱阳性") > -1 ||
  657. checkItem.result.indexOf("±") > -1
  658. ) {
  659. tooltips = "tipsLowPositive";
  660. } else if (
  661. checkItem.result.indexOf("阳性") > -1 ||
  662. checkItem.result.indexOf("+") > -1
  663. ) {
  664. tooltips = "tipsPositive";
  665. }
  666. }
  667. break;
  668. default:
  669. break;
  670. }
  671. // 判断后重新赋值
  672. checkItem.class = tooltips;
  673. // 保存过检查时,直接取数据库
  674. checkItem.resultStatusId = this[tooltips].id; //名称 dataInputPrompt
  675. // console.log('checkItem',checkItem)
  676. // console.log(`this.${tooltips}`,this[tooltips])
  677. },
  678. // 行结果是否可编辑
  679. rowResultDisabled(row) {
  680. return (
  681. row.isCalculationItem == "Y" ||
  682. this.doctorCheck.RegisterCheckEdit.completeFlag == "1" ||
  683. this.doctorCheck.RegisterCheckEdit.completeFlag == "2"
  684. );
  685. },
  686. btnCritical(row) {
  687. this.dialogWin.FollowCriticalCheck = true;
  688. this.doctorCheck.combinationCriticalValue = false;
  689. this.doctorCheck.singleDetailedProject = row;
  690. },
  691. //项目列为计算函数
  692. computeFun(index) {
  693. // 有计算项的,才调用计算函数
  694. let haveComputeFun = false;
  695. let checkItem = this.doctorCheck.checkItemList[index];
  696. console.log("checkItem", checkItem);
  697. let body = {
  698. registerCheckId: checkItem.registerCheckId,
  699. items: [],
  700. };
  701. this.doctorCheck.checkItemList.forEach((e) => {
  702. body.items.push({
  703. itemId: e.itemId,
  704. result: e.result,
  705. });
  706. if (e.isCalculationItem == "Y") haveComputeFun = true;
  707. });
  708. if (!haveComputeFun) return; // 有计算项的,才调用计算函数
  709. let lfind = -1;
  710. postapi(
  711. "/api/app/diagnosisfunction/getcalculationfunctionresult",
  712. body
  713. ).then((res) => {
  714. if (res.code != -1) {
  715. // console.log('res.data',res.data)
  716. res.data.items.forEach((e) => {
  717. lfind = arrayExistObj(
  718. this.doctorCheck.checkItemList,
  719. "itemId",
  720. e.itemId
  721. );
  722. if (lfind > -1) {
  723. if (e.result != this.doctorCheck.checkItemList[lfind].result) {
  724. this.doctorCheck.checkItemList[lfind].result = e.result;
  725. console.log("e", lfind, this.doctorCheck.checkItemList[lfind]);
  726. this.madeTooltips(lfind);
  727. }
  728. }
  729. });
  730. }
  731. });
  732. },
  733. // 点击结果模版按钮
  734. btnMoreResult(row, index) {
  735. this.moreResult.data = deepCopy(row.itemResultTemplates);
  736. this.moreResult.result = row.result;
  737. this.moreResult.defaultResult = row.defaultResult;
  738. this.moreResult.index = index;
  739. // "itemId": "3a0c517f-cbdb-9fff-e300-1f76b3e47580",
  740. // "result": "00000",
  741. // "diagnosisId": "3a0ed8a2-72d9-ee50-78aa-5b1f474f2921",
  742. // "isNameIntoSummary": "N",
  743. // "isResultIntoSummary": "Y",
  744. // "resultStatusId": "01",
  745. // "simpleCode": "0"
  746. this.dialogWinMoreResult = true;
  747. this.watchSelection();
  748. },
  749. // pacs结果模板
  750. btnPacsResult(row, index) {
  751. let result = row.result;
  752. let summary = "";
  753. this.doctorCheck.checkSummaryList.forEach((e, i) => {
  754. summary += e.summary;
  755. });
  756. this.pacsParams.row = row;
  757. this.pacsParams.index = index;
  758. this.pacsParams.result = result;
  759. this.pacsParams.summary = summary;
  760. this.pacsParams.refresh++;
  761. this.dialogWinPacsTemplate = true;
  762. },
  763. // pacs结果模板(备份)
  764. btnPacsResultBak(row, index) {
  765. let result = row.result;
  766. let summary = "";
  767. this.doctorCheck.checkSummaryList.forEach((e, i) => {
  768. summary += e.summary;
  769. });
  770. this.pacsParams.row = row;
  771. this.pacsParams.index = index;
  772. this.pacsParams.result = result;
  773. this.pacsParams.summary = summary;
  774. this.pacsParams.refresh++;
  775. this.dialogWinPacsTemplate = true;
  776. },
  777. // 双击选择结果模版的结果
  778. dblclickResult(item) {
  779. this.moreResult.result = "";
  780. this.clickResult(item);
  781. this.btnOkResult("");
  782. },
  783. // 单击选择结果模版的结果
  784. clickResult(item) {
  785. let moreResult = this.moreResult.result || ''
  786. // console.log('this.moreResult',JSON.stringify(this.moreResult))
  787. // console.log('item',item)
  788. //点击结果前 == 默认结果
  789. if (!moreResult || moreResult == this.moreResult.defaultResult ) {
  790. this.moreResult.result = item.result
  791. this.selection.start = length(item.result) - 1
  792. this.selection.end = this.selection.start
  793. }else if(moreResult.includes(item.result)){
  794. // 结果包含已选时,不作处理
  795. }else {
  796. let choosedResult = item.result
  797. if(this.LocalConfig.doctorCheck.isSplitChooseResult == 'Y') choosedResult = ';' + choosedResult
  798. this.insertSymbols(choosedResult)
  799. }
  800. },
  801. // 清除结果值
  802. btnClear() {
  803. this.moreResult.result = "";
  804. },
  805. btnOkResult(result) {
  806. this.doctorCheck.checkItemList[this.moreResult.index].result = result
  807. ? this.moreResult[result]
  808. : this.moreResult.result;
  809. this.madeTooltips(this.moreResult.index);
  810. this.computeFun(this.moreResult.index);
  811. this.dialogWinMoreResult = false;
  812. },
  813. // 处理 pacs 结果录入的情况
  814. handlePacsResult(row, index, pacsResult) {
  815. // console.log('row,index,pacsResult', row, index, pacsResult)
  816. // this.doctorCheck.checkItemList[index].result = pacsResult.result;
  817. /*
  818. this.doctorCheck.checkSummaryList = [
  819. {
  820. id: Math.random(),
  821. registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
  822. summary: pacsResult.summary,
  823. summaryFlag: "N",
  824. },
  825. ];
  826. */
  827. this.dialogWinPacsTemplate = false;
  828. },
  829. //选择项目
  830. rowClick(row) {
  831. this.clickTime1 = new Date().getTime()
  832. console.log('this.clickTime1', this.clickTime1)
  833. this.doctorCheck.checkItem = row;
  834. this.restaurants = row.itemResultTemplates;
  835. // 防止与双击冲突
  836. setTimeout(() => {
  837. // 首次点击才执行
  838. if (this.clickTime1 > this.clickTime2) {
  839. //显示历史明细结果
  840. if (this.hisResultDetailDialogVisible) {
  841. this.gridData = []
  842. postapi("/api/app/RegisterCheckItem/GetItemTwoHistoricalResults", {
  843. registerCheckId: row.registerCheckId,
  844. itemId: row.itemId,
  845. }).then((res) => {
  846. if (res.code != -1) {
  847. this.gridData = res.data;
  848. }
  849. });
  850. }
  851. }
  852. }, 400);
  853. },
  854. // 双击调出模版
  855. dblClick(row) {
  856. this.clickTime2 = new Date().getTime()
  857. console.log('this.clickTime2', this.clickTime2)
  858. //@click="btnMoreResult(scope.row, scope.$index)" :disabled="rowResultDisabled(scope.row)"
  859. if (this.rowResultDisabled(row)) {
  860. return
  861. }
  862. let lfind = arrayExistObj(this.doctorCheck.checkItemList, 'itemId', row.itemId)
  863. this.btnMoreResult(row, lfind)
  864. },
  865. //检查组合项目下所包含的明细项目
  866. checkItemList(RegisterCheckId) {
  867. // this.doctorCheck.checkItem = null
  868. if (!RegisterCheckId) {
  869. this.doctorCheck.checkItemList = [];
  870. this.doctorCheck.RegisterCheckEdit = {
  871. id: "",
  872. checkDoctorId: "",
  873. checkDate: "",
  874. LastModifierId: "",
  875. LastModificationTime: "",
  876. completeFlag: "",
  877. };
  878. return;
  879. }
  880. console.log(
  881. `/api/app/registercheckitem/getlistinregistercheckid?RegisterCheckId=${RegisterCheckId}`
  882. );
  883. getapi(`/api/app/registercheck/getregistercheck?id=${RegisterCheckId}`)
  884. .then((res) => {
  885. if (res.code > -1) {
  886. this.doctorCheck.RegisterCheckEdit = res.data;
  887. if (
  888. res.data.isCharge != "Y" &&
  889. this.doctor_check_check_charge == "Y"
  890. ) {
  891. this.$message.warning({
  892. showClose: true,
  893. message: `该体检人员未缴清费用!`,
  894. });
  895. }
  896. if (this.doctorCheck.RegisterCheckEdit.completeFlag == "0") {
  897. // 当前用户是检查医生时,默认当前用户
  898. if (this.userInfo.operatorType == '1' || this.userInfo.operatorType == '3') {
  899. this.doctorCheck.RegisterCheckEdit.checkDoctorId = this.userInfo.userId;
  900. }
  901. this.doctorCheck.RegisterCheckEdit.checkDate = new Date();
  902. }
  903. return getapi(
  904. `/api/app/registercheckitem/getlistinregistercheckid?RegisterCheckId=${RegisterCheckId}&PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`
  905. );
  906. }
  907. })
  908. .then((res) => {
  909. // console.log("checkItemList", res.data);
  910. if (res && res.code > -1) {
  911. res.data.forEach((e, i) => {
  912. // 虚拟显示危急状态
  913. e["criticalFlag"] = "N";
  914. });
  915. //console.log('this.doctorCheck.checkItemList',res.data)
  916. this.doctorCheck.checkItemList = res.data;
  917. this.doctorCheck.checkItemList.forEach((e, i) => {
  918. if (this.doctorCheck.RegisterCheckEdit.completeFlag == "0") {
  919. this.madeTooltips(i);
  920. } else {
  921. let lfind = arrayExistObj(
  922. this.resultStatus,
  923. "id",
  924. e.resultStatusId
  925. );
  926. if (lfind > -1) {
  927. e.class = this.resultStatus[lfind].tooltips;
  928. }
  929. }
  930. });
  931. // 光标定位第一个输入框
  932. this.$nextTick(() => {
  933. this.$refs[res.data[0].itemId].focus(); //打开光标定位到条码栏里
  934. });
  935. // 监听回车代替tab键
  936. this.enterToTab();
  937. }
  938. })
  939. .catch((err) => {
  940. this.$message.error({
  941. showClose: true,
  942. message: `操作失败,原因:${err}`,
  943. });
  944. });
  945. },
  946. querySearch(queryString, cb) {
  947. var restaurants = []; //不需要字典库显示 deepCopy(this.restaurants) [{ value: '阴性' },{ value: '阳性' }]
  948. restaurants.forEach((item) => {
  949. return (item.value = item.result);
  950. });
  951. // console.log("restaurants", restaurants);
  952. var results = queryString
  953. ? restaurants.filter(this.createFilter(queryString))
  954. : restaurants;
  955. // 调用 callback 返回建议列表的数据
  956. cb(results);
  957. },
  958. createFilter(queryString) {
  959. return (restaurant) => {
  960. return (
  961. restaurant["value"].toLowerCase().indexOf(queryString.toLowerCase()) >
  962. -1
  963. );
  964. };
  965. },
  966. handleSelect(item) {
  967. console.log("item", item);
  968. },
  969. //回车替代tab键
  970. enterToTab() {
  971. // console.log('enterToTab');
  972. this.$nextTick(() => {
  973. let inputs = document.querySelectorAll(["textarea", "input"]); //用数组可以读取多个标签的元素 //.inline-input
  974. // console.log('inputs', typeof inputs, inputs)
  975. // 为每个输入框添加键盘事件监听器
  976. inputs.forEach((input, i) => {
  977. // console.log('input',input);
  978. input.addEventListener("keydown", (event) => {
  979. // 如果按下的是回车键
  980. // console.log('data-lineModeFlag', input, input.getAttribute('data-lineModeFlag'), i);
  981. // console.log('event.keyCode', event.keyCode)
  982. switch (event.keyCode) {
  983. case 13:
  984. if (
  985. event.keyCode === 13 &&
  986. input.getAttribute("data-lineModeFlag") == "0"
  987. ) {
  988. event.preventDefault();
  989. } else {
  990. break;
  991. }
  992. case 9: // tab 键
  993. event.preventDefault();
  994. case 40: // ↓ 键
  995. for (let j = i + 1; j < inputs.length; j++) {
  996. // console.log(inputs[j], inputs[j].getAttribute('type'), inputs[j].getAttribute('placeholder'))
  997. if (inputs[j].getAttribute("placeholder") == "请输入结果值") {
  998. if (inputs[j].getAttribute("disabled") != "disabled") {
  999. // console.log('inputs[j]', inputs[j])
  1000. inputs[j].focus();
  1001. break;
  1002. }
  1003. }
  1004. }
  1005. break;
  1006. case 38: // ↑ 键
  1007. for (let j = i - 1; j > -1; j--) {
  1008. // console.log(inputs[j], inputs[j].getAttribute('type'), inputs[j].getAttribute('placeholder'))
  1009. if (inputs[j].getAttribute("placeholder") == "请输入结果值") {
  1010. if (inputs[j].getAttribute("disabled") != "disabled") {
  1011. // console.log('inputs[j]', inputs[j])
  1012. inputs[j].focus();
  1013. break;
  1014. }
  1015. }
  1016. }
  1017. break;
  1018. default:
  1019. break;
  1020. }
  1021. });
  1022. // 点击时全选结果
  1023. input.addEventListener("click", (event) => {
  1024. if (this.LocalConfig.doctorCheck.isSelectAll == 'Y') {
  1025. input.select();
  1026. }
  1027. });
  1028. });
  1029. });
  1030. },
  1031. // 光标位置插入特殊符号(插入结果)
  1032. insertSymbols(symbols) {
  1033. let result = this.moreResult.result || "";
  1034. if (result) {
  1035. result =
  1036. result.substring(0, this.selection.start) +
  1037. symbols +
  1038. result.substring(this.selection.end);
  1039. } else {
  1040. result = symbols;
  1041. }
  1042. this.moreResult.result = result;
  1043. this.selection.start = this.selection.start + length(symbols);
  1044. this.selection.end = this.selection.start;
  1045. },
  1046. // 获取光标位置的函数
  1047. getCaretPosition() {
  1048. let input = document.getElementById("resultBox");
  1049. this.selection.start = input.selectionStart;
  1050. this.selection.end = input.selectionEnd;
  1051. // console.log('selection',this.selection)
  1052. },
  1053. watchSelection() {
  1054. this.$nextTick(() => {
  1055. let that = this;
  1056. let resultBox = document.getElementById("resultBox"); //用数组可以读取多个标签的元素 //.inline-input
  1057. // 绑定键盘事件到文本框
  1058. resultBox.addEventListener("click", function (event) {
  1059. // 获取光标位置
  1060. that.getCaretPosition();
  1061. });
  1062. resultBox.addEventListener("input", function (event) {
  1063. // 获取光标位置
  1064. that.getCaretPosition();
  1065. });
  1066. });
  1067. },
  1068. // 录入结果区域 右击事件(无壳)
  1069. onContextmenuNoShell(event) {
  1070. //菜单项
  1071. let items = [];
  1072. // items.push({
  1073. // label: "一级菜单",
  1074. // children: [
  1075. // { label: "修改姓名", onClick: () => { this.fnUpBaseInfo(row, 'patientName'); } }
  1076. // ],
  1077. // onClick: () => { //菜单事件 }
  1078. // })
  1079. // 显示明细历次结果
  1080. items.push({
  1081. label: "显示明细历次结果",
  1082. onClick: () => {
  1083. this.hisResultDetailDialogVisible = true
  1084. },
  1085. })
  1086. // 预览影像报告
  1087. //if(checkPagePriv(this.pagePriv.privs, "预览影像报告"))
  1088. items.push({
  1089. label: "预览影像报告",
  1090. onClick: () => {
  1091. this.pacsReportView();
  1092. },
  1093. })
  1094. this.$contextmenu({
  1095. items,
  1096. event,
  1097. x: event.clientX,
  1098. y: event.clientY,
  1099. customClass: "custom-class",
  1100. zIndex: 3,
  1101. minWidth: 80,
  1102. });
  1103. return false;
  1104. },
  1105. // 右击菜单
  1106. onContextmenu(event) {
  1107. if (!this.$peisAPI) {
  1108. this.onContextmenuNoShell(event)
  1109. } else {
  1110. let menus = [
  1111. { type: 'separator' },
  1112. { label: '显示明细历次结果', itemId: '显示明细历次结果', enabled: true },
  1113. { label: '预览影像报告', itemId: '预览影像报告', enabled: true }
  1114. // { label: '测试菜单', itemId: '测试菜单', enabled: true },
  1115. // {
  1116. // label: '更多操作',
  1117. // submenu: [
  1118. // { label: '子菜单', itemId: '子菜单', enabled: true }
  1119. // ]
  1120. // }
  1121. ]
  1122. this.$peisAPI.showContextMenu(menus)
  1123. .then(res => {
  1124. console.log('res', res)
  1125. })
  1126. .catch(err => {
  1127. console.log('err', err)
  1128. })
  1129. .finally(() => {
  1130. console.log('finally')
  1131. })
  1132. }
  1133. },
  1134. // 模板右击
  1135. onContextmenuTemplate(event) {
  1136. if (!this.$peisAPI) return
  1137. let menus = [
  1138. // { label: '测试菜单', itemId: '测试菜单', enabled: true },
  1139. // {
  1140. // label: '更多操作',
  1141. // submenu: [
  1142. // { label: '子菜单', itemId: '子菜单', enabled: true }
  1143. // ]
  1144. // }
  1145. ]
  1146. this.$peisAPI.showContextMenu(menus)
  1147. .then(res => {
  1148. console.log('res', res)
  1149. })
  1150. .catch(err => {
  1151. console.log('err', err)
  1152. })
  1153. .finally(() => {
  1154. console.log('finally')
  1155. })
  1156. },
  1157. // 自定义右击事件
  1158. onContextMenuDIY(data) {
  1159. //this.$message({showClose:true,message:data})
  1160. switch (data) {
  1161. case '显示明细历次结果':
  1162. this.hisResultDetailDialogVisible = true
  1163. break;
  1164. case '预览影像报告':
  1165. this.pacsReportView();
  1166. break;
  1167. default:
  1168. break;
  1169. }
  1170. },
  1171. // 预览影像报告
  1172. pacsReportView() {
  1173. if (!this.$peisAPI) {
  1174. this.$message.info("此功能,需要在壳客户端才可运行!")
  1175. return
  1176. }
  1177. ///3a0c990e-5756-2dc0-19d5-69a617fe4048
  1178. let ReportCode = '0011';
  1179. let BusinessCode = this.doctorCheck.RegisterCheckId
  1180. let token = window.sessionStorage.getItem('token');
  1181. let user = window.sessionStorage.getItem('user');
  1182. let toOutShell = {
  1183. ReportCode, token, BusinessCode,
  1184. isBuildImage: 'N',
  1185. IsUploadPdf: 'N',
  1186. preViewCanPrint: 'Y',
  1187. Parameters: [
  1188. { Name: 'printer', Value: user },
  1189. { Name: 'LTS', Value: 'Y' }, //Y、N N只看不能打印
  1190. { Name: "firstPage", Value: "pic/peisReportFirstPage.jpg" },
  1191. { Name: "pageHeader", Value: "pic/peisReportPageHeader.jpg" },
  1192. { Name: "pageFooter", Value: "pic/peisReportPageFooter.jpg" },
  1193. { Name: "orgSign", Value: this.dataTransOpts.tableS.patient_register.isPatientOccupationalDisease == 'Y' ? "pic/orgSignOcc.png" : "pic/orgSign.png" },
  1194. { Name: 'picExtOne', Value: 'pic/hisLog.jpg' },
  1195. { Name: 'resultSign', Value: 'pic/resultSign.png' },
  1196. ],
  1197. };
  1198. let JSONtoOutShell = JSON.stringify(toOutShell)
  1199. console.log('$peisAPI.printPre', JSONtoOutShell)
  1200. this.$peisAPI.printPre(JSONtoOutShell)
  1201. .then(res => {
  1202. if (res) {
  1203. let lres = JSON.parse(res)
  1204. if (lres.code < 0) this.$message.error({ showClose: true, message: lres.message })
  1205. }
  1206. })
  1207. .catch(err => {
  1208. this.$message.warning(err);
  1209. });
  1210. },
  1211. // 身高体重、血压仪
  1212. onSerialData(data) {
  1213. console.log('onSerialData.data', data)
  1214. let array = data.data
  1215. for (let index = 0; index < array.length; index++) {
  1216. this.setSerialData(array[index]['deviceType'], array[index]['value'])
  1217. }
  1218. },
  1219. // 接收仪器的数据设置到体检
  1220. setSerialData(deviceType, value) {
  1221. try {
  1222. let itemIds = this.comData[deviceType].split(',')
  1223. let lfind = -1
  1224. for (let index = 0; index < itemIds.length; index++) {
  1225. lfind = arrayExistObj(this.doctorCheck.checkItemList, 'itemId', itemIds[index])
  1226. if (lfind > -1) break
  1227. }
  1228. if (lfind > -1) {
  1229. this.doctorCheck.checkItemList[lfind]['result'] = String(value)
  1230. this.madeTooltips(lfind);
  1231. this.computeFun(lfind);
  1232. }
  1233. } catch (err) {
  1234. console.error('身高体重仪数据设置体检出错:', err)
  1235. this.$message.error({ showClose: true, message: err.message })
  1236. }
  1237. },
  1238. },
  1239. //监听事件
  1240. watch: {
  1241. //检查项目切换
  1242. // "doctorCheck.RegisterCheckId":{
  1243. // immediate:true,
  1244. // handler(newVal, oldVal) {
  1245. // console.log(
  1246. // "watch doctorCheck.RegisterCheckId newVal:",
  1247. // newVal,
  1248. // " oldVal:",
  1249. // oldVal
  1250. // );
  1251. // this.checkItemList(newVal);
  1252. // }
  1253. // },
  1254. //检查项目未切换换时 也可以强制刷新数据
  1255. "dataTransOpts.refresh.register_check_item.M": {
  1256. // immediate: true,
  1257. handler(newVal, oldVal) {
  1258. console.log(
  1259. `watch 检查明细 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.register_check.id}`
  1260. );
  1261. this.checkItemList(this.dataTransOpts.tableS.register_check.id);
  1262. },
  1263. },
  1264. },
  1265. };
  1266. </script>
  1267. <style lang="scss" scoped>
  1268. @import "../../assets/css/global.css";
  1269. ::v-deep .el-table td.el-table__cell,
  1270. .el-table th.el-table__cell.is-leaf {
  1271. padding: 0;
  1272. }
  1273. ::v-deep .el-textarea__inner {
  1274. min-height: 23px;
  1275. height: 23px;
  1276. line-height: 1.25;
  1277. padding: 2px 15px 2px 2px;
  1278. font-size: v-bind("LocalConfig.doctorCheck.pacsDescFontSize");
  1279. font-family: "Microsoft YaHei";
  1280. }
  1281. /*正常*/
  1282. ::v-deep .tipsNormal .el-textarea__inner {
  1283. background-color: v-bind("tipsNormal.backgroundColor") !important;
  1284. color: v-bind("tipsNormal.color") !important;
  1285. }
  1286. /*错误*/
  1287. ::v-deep .tipsError .el-textarea__inner {
  1288. background-color: v-bind("tipsError.backgroundColor") !important;
  1289. color: v-bind("tipsError.color") !important;
  1290. }
  1291. /*阴性 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  1292. ::v-deep .tipsNegative .el-textarea__inner {
  1293. background-color: v-bind("tipsNegative.backgroundColor") !important;
  1294. color: v-bind("tipsNegative.color") !important;
  1295. }
  1296. /*弱阳性 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  1297. ::v-deep .tipsLowPositive .el-textarea__inner {
  1298. background-color: v-bind("tipsLowPositive.backgroundColor") !important;
  1299. color: v-bind("tipsLowPositive.color") !important;
  1300. }
  1301. /*阳性 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  1302. ::v-deep .tipsPositive .el-textarea__inner {
  1303. background-color: v-bind("tipsPositive.backgroundColor") !important;
  1304. color: v-bind("tipsPositive.color") !important;
  1305. }
  1306. /*偏低 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  1307. ::v-deep .tipsLow .el-textarea__inner {
  1308. background-color: v-bind("tipsLow.backgroundColor") !important;
  1309. color: v-bind("tipsLow.color") !important;
  1310. }
  1311. /*偏高 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  1312. ::v-deep .tipsHigh .el-textarea__inner {
  1313. background-color: v-bind("tipsHigh.backgroundColor") !important;
  1314. color: v-bind("tipsHigh.color") !important;
  1315. }
  1316. /*超低 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  1317. ::v-deep .tipsSuperLow .el-textarea__inner {
  1318. background-color: v-bind("tipsSuperLow.backgroundColor") !important;
  1319. color: v-bind("tipsSuperLow.color") !important;
  1320. }
  1321. /*超高 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  1322. ::v-deep .tipsSuperHigh .el-textarea__inner {
  1323. background-color: v-bind("tipsSuperHigh.backgroundColor") !important;
  1324. color: v-bind("tipsSuperHigh.color") !important;
  1325. }
  1326. /*文字性危及值 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  1327. ::v-deep .tipsSuper .el-textarea__inner {
  1328. background-color: v-bind("tipsSuper.backgroundColor") !important;
  1329. color: v-bind("tipsSuper.color") !important;
  1330. }
  1331. </style>