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.

1093 lines
35 KiB

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
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
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year 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
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
2 years ago
2 years ago
2 years ago
2 years 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 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 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
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
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
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
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
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
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
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
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
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
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
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
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 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
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
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 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
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. <el-table
  4. :data="doctorCheck.checkItemList"
  5. style="width: 100%"
  6. :height="tableHeight"
  7. border
  8. highlight-current-row
  9. @row-click="rowClick"
  10. size="small"
  11. >
  12. <el-table-column prop="itemName" label="项目" width="220" />
  13. <el-table-column prop="result" label="结果" min-width="200">
  14. <template slot-scope="scope">
  15. <div style="display: flex">
  16. <el-autocomplete
  17. style="width: 100%"
  18. type="textarea"
  19. v-model="scope.row.result"
  20. placeholder="请输入结果值"
  21. :disabled="rowResultDisabled(scope.row)"
  22. :autosize="{ minRows: 1, maxRows: 10 }"
  23. :trigger-on-focus="false"
  24. :fetch-suggestions="querySearch"
  25. :data-lineModeFlag="scope.row.lineModeFlag"
  26. @input="
  27. madeTooltips(scope.$index);
  28. computeFun(scope.$index);
  29. "
  30. v-bind:class="scope.row.class"
  31. >
  32. </el-autocomplete>
  33. <el-button
  34. style="min-width: 23px; padding: 2px"
  35. icon="el-icon-caret-bottom"
  36. @click="btnMoreResult(scope.row, scope.$index)"
  37. :disabled="rowResultDisabled(scope.row)"
  38. size="small"
  39. ></el-button>
  40. <el-button
  41. style="min-width: 23px; padding: 2px; margin-left: 2px"
  42. @click="btnPacsResult(scope.row, scope.$index)"
  43. :disabled="rowResultDisabled(scope.row)"
  44. size="small"
  45. >P</el-button
  46. >
  47. <!-- <el-popover placement="top-end" width="500" trigger="click" :title="scope.row.itemName">
  48. <el-tabs v-model="activeName">
  49. <el-tab-pane label="文字结果" name="first">
  50. <el-table :data="gridData">
  51. <el-table-column
  52. width="150"
  53. property="date"
  54. label="日期"
  55. ></el-table-column>
  56. <el-table-column
  57. width="100"
  58. property="name"
  59. label="姓名"
  60. ></el-table-column>
  61. <el-table-column
  62. width="300"
  63. property="address"
  64. label="地址"
  65. ></el-table-column>
  66. </el-table>
  67. </el-tab-pane>
  68. <el-tab-pane label="折线图" name="second"></el-tab-pane>
  69. </el-tabs>
  70. <el-button
  71. slot="reference"
  72. style="min-width: 23px; padding: 5.8px; margin-left: 2px"
  73. :disabled="rowResultDisabled(scope.row)"
  74. @click="btnPacsRessulst(scope.row, scope.$index)"
  75. size="small"
  76. >S</el-button
  77. >
  78. </el-popover> -->
  79. </div>
  80. </template>
  81. </el-table-column>
  82. <el-table-column prop="unit" label="单位" width="90" align="center" />
  83. <el-table-column
  84. prop="referenceRangeValue"
  85. label="参考范围"
  86. width="120"
  87. align="center"
  88. />
  89. <el-table-column
  90. prop="resultStatusId"
  91. label="提示"
  92. width="40"
  93. align="center"
  94. >
  95. <template slot-scope="scope">
  96. <div>
  97. {{
  98. dddw(
  99. resultStatus,
  100. "id",
  101. scope.row.resultStatusId,
  102. "dataInputPrompt"
  103. )
  104. }}
  105. </div>
  106. </template>
  107. </el-table-column>
  108. <el-table-column
  109. prop="criticalFlag"
  110. label="危急值"
  111. width="50"
  112. align="center"
  113. >
  114. <template slot-scope="scope">
  115. <el-button
  116. :style="[
  117. { minWidth: '23px' },
  118. { padding: '6px 2px' },
  119. {
  120. backgroundColor: scope.row.isCriticalValue == 'Y' ? 'red' : '',
  121. },
  122. ]"
  123. @click="btnCritical(scope.row)"
  124. size="small"
  125. >W</el-button
  126. >
  127. </template>
  128. </el-table-column>
  129. </el-table>
  130. <!--弹窗-->
  131. <div>
  132. <!-- 结果录入模版 -->
  133. <el-dialog
  134. title="结果录入模版"
  135. :visible.sync="dialogWinMoreResult"
  136. width="800px"
  137. :close-on-click-modal="false"
  138. >
  139. <div style="margin-top: -10px">
  140. <el-checkbox
  141. v-model="isSplitChooseResult"
  142. size="small"
  143. true-label="Y"
  144. false-label="N"
  145. >选结果模板时自动添加分隔符</el-checkbox
  146. >
  147. <div
  148. style="
  149. overflow-y: auto;
  150. height: 300px;
  151. width: 100%;
  152. display: flex;
  153. flex-wrap: wrap;
  154. align-content: flex-start;
  155. "
  156. >
  157. <div
  158. v-for="item in moreResult.data"
  159. :key="item.id"
  160. style="margin: 5px; cursor: pointer"
  161. @click="clickResult(item)"
  162. @dblclick="dblclickResult(item)"
  163. >
  164. <el-tag
  165. size="samll"
  166. style="
  167. padding: 0 3px;
  168. height: 24px;
  169. line-height: 24px;
  170. font-size: 14px;
  171. color: #303133;
  172. background-color: white;
  173. "
  174. >{{ item.result }}</el-tag
  175. >
  176. </div>
  177. </div>
  178. <div>特殊符号</div>
  179. <div
  180. style="
  181. overflow-y: auto;
  182. width: 100%;
  183. display: flex;
  184. flex-wrap: wrap;
  185. align-content: flex-start;
  186. "
  187. >
  188. <div
  189. v-for="item in symbols"
  190. :key="item.id"
  191. style="margin: 1px 2px; cursor: pointer"
  192. @click="insertSymbols(item.displayName)"
  193. >
  194. <el-tag
  195. style="
  196. padding: 0 3px;
  197. height: 24px;
  198. line-height: 24px;
  199. font-size: 15px;
  200. color: #303133;
  201. background-color: white;
  202. "
  203. >
  204. {{ item.displayName }}
  205. </el-tag>
  206. </div>
  207. </div>
  208. <div style="display: flex; justify-content: space-between">
  209. <div style="margin-top: 5px">录入结果</div>
  210. <div style="overflow-y: auto; display: flex; flex-wrap: wrap">
  211. <div
  212. v-for="item in splitSymbols"
  213. :key="item"
  214. style="margin: 1px 2px; cursor: pointer"
  215. @click="insertSymbols(item)"
  216. >
  217. <el-tag
  218. style="
  219. padding: 0 3px;
  220. height: 24px;
  221. line-height: 24px;
  222. font-size: 15px;
  223. color: #303133;
  224. background-color: white;
  225. "
  226. >
  227. {{ item }}
  228. </el-tag>
  229. </div>
  230. </div>
  231. </div>
  232. <el-input
  233. id="resultBox"
  234. style="width: 100%"
  235. class="commonFont"
  236. type="textarea"
  237. :autosize="{ minRows: 4, maxRows: 4 }"
  238. v-model="moreResult.result"
  239. />
  240. </div>
  241. <span slot="footer" class="dialog-footer">
  242. <el-button @click="btnClear"> </el-button>
  243. <el-button type="primary" @click="btnOkResult('defaultResult')"
  244. >默认结果</el-button
  245. >
  246. <el-button type="primary" @click="btnOkResult('')"> </el-button>
  247. <el-button @click="dialogWinMoreResult = false"> </el-button>
  248. </span>
  249. </el-dialog>
  250. <!--Pacs结果录入模版-->
  251. <el-dialog
  252. :title="'Pacs结果录入模版 -- ' + doctorCheck.asbitemName"
  253. v-if="dialogWinPacsTemplate"
  254. :visible.sync="dialogWinPacsTemplate"
  255. width="880px"
  256. :close-on-click-modal="false"
  257. >
  258. <PacsTemplate
  259. :refParams="pacsParams"
  260. :refFuncOther="handlePacsResult"
  261. />
  262. </el-dialog>
  263. </div>
  264. </div>
  265. </template>
  266. <script>
  267. // 0-无参考范围,1-数字型,2-字符型,3-性激素
  268. import { mapState } from "vuex";
  269. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  270. import { arrayExistObj, dddw, deepCopy } from "../../utlis/proFunc";
  271. import PacsTemplate from "./PacsTemplate.vue";
  272. export default {
  273. components: {
  274. PacsTemplate,
  275. },
  276. props: ["isCheckPicture", "registerCheckId", "doctor_check_check_charge"],
  277. data() {
  278. return {
  279. activeName: "first",
  280. gridData: [
  281. {
  282. date: "2016-05-02",
  283. name: "王小虎",
  284. address: "上海市普陀区金沙江路 1518 弄",
  285. },
  286. {
  287. date: "2016-05-04",
  288. name: "王小虎",
  289. address: "上海市普陀区金沙江路 1518 弄",
  290. },
  291. {
  292. date: "2016-05-01",
  293. name: "王小虎",
  294. address: "上海市普陀区金沙江路 1518 弄",
  295. },
  296. {
  297. date: "2016-05-03",
  298. name: "王小虎",
  299. address: "上海市普陀区金沙江路 1518 弄",
  300. },
  301. ],
  302. resultStatus: [], //结果状态提示数据
  303. tipsNormal: {
  304. id: "01",
  305. displayName: "正常",
  306. dataInputPrompt: "正常",
  307. reportPrompt: "正常",
  308. reportBackgroundColor: 16777215,
  309. reportFontColor: 0,
  310. dataInputBackgroundColor: 16777215,
  311. dataInputFontColor: 0,
  312. }, //正常提示
  313. tipsError: {}, //错误提示
  314. tipsNegative: {}, //阴性提示
  315. tipsLowPositive: {}, //弱阳性提示
  316. tipsPositive: {}, //阳性提示
  317. tipsLow: {}, //偏低提示
  318. tipsHigh: {}, //偏高提示
  319. tipsSuperLow: {}, //超低提示
  320. tipsSuperHigh: {}, //超高提示
  321. tipsSuper: {}, //文字型危急值
  322. restaurants: [], //结果模版
  323. currentRow: -1, //当前操作的行
  324. dialogWinMoreResult: false,
  325. dialogWinPacsTemplate: false,
  326. moreResult: {
  327. data: [],
  328. result: "",
  329. defaultResult: "",
  330. index: 0, // 明细序列
  331. }, //结果模版
  332. isSplitChooseResult: "N", // 选结果时,是否自动加上分隔符
  333. selection: {
  334. // 光标位置
  335. start: 0,
  336. end: 0,
  337. },
  338. symbols: [], //特殊符号
  339. splitSymbols: [";", "、"], // 分隔符
  340. userId: "",
  341. // pacs 结果录入
  342. pacsParams: {
  343. from: "doctor",
  344. refresh: -1, // 强制刷新
  345. row: {},
  346. index: 0,
  347. result: "",
  348. summary: "",
  349. },
  350. };
  351. },
  352. created() {
  353. this.dictInit();
  354. },
  355. //挂载完成
  356. mounted() {
  357. this.checkItemList(this.dataTransOpts.tableS.register_check.id);
  358. this.userId = window.sessionStorage.getItem("userId");
  359. },
  360. computed: {
  361. ...mapState([
  362. "window",
  363. "dataTransOpts",
  364. "dict",
  365. "dialogWin",
  366. "doctorCheck",
  367. ]),
  368. tableHeight() {
  369. let temp = this.window.pageHeight < 600 ? 600 : this.window.pageHeight;
  370. return Math.floor(
  371. ((temp - 260 - (this.isCheckPicture ? 110 : 0)) * 3) / 5
  372. );
  373. },
  374. },
  375. methods: {
  376. dddw,
  377. dictInit() {
  378. //获取结果状态提示数据
  379. getapi("/api/app/result-status").then((res) => {
  380. if (res.code != -1) {
  381. this.resultStatus = res.data;
  382. this.resultStatus.forEach((e) => {
  383. switch (e.id) {
  384. case "01": // 正常
  385. e.tooltips = "tipsNormal";
  386. this.colorTrans(e, e.tooltips);
  387. break;
  388. case "02": // 错误
  389. e.tooltips = "tipsError";
  390. this.colorTrans(e, e.tooltips);
  391. break;
  392. case "03": // 阴性
  393. e.tooltips = "tipsNegative";
  394. this.colorTrans(e, e.tooltips);
  395. break;
  396. case "04": // 阳性
  397. e.tooltips = "tipsPositive";
  398. this.colorTrans(e, e.tooltips);
  399. break;
  400. case "05": // 弱阳性
  401. e.tooltips = "tipsLowPositive";
  402. this.colorTrans(e, e.tooltips);
  403. break;
  404. case "06": // 偏低
  405. e.tooltips = "tipsLow";
  406. this.colorTrans(e, e.tooltips);
  407. break;
  408. case "07": // 偏高
  409. e.tooltips = "tipsHigh";
  410. this.colorTrans(e, e.tooltips);
  411. break;
  412. case "08": // 危急值下限
  413. e.tooltips = "tipsSuperLow";
  414. this.colorTrans(e, e.tooltips);
  415. break;
  416. case "09": // 危急值上限
  417. e.tooltips = "tipsSuperHigh";
  418. this.colorTrans(e, e.tooltips);
  419. break;
  420. case "10": // 危急值
  421. e.tooltips = "tipsSuper";
  422. this.colorTrans(e, e.tooltips);
  423. break;
  424. default:
  425. e.tooltips = "tipsNormal";
  426. this.colorTrans(e, e.tooltips);
  427. break;
  428. }
  429. });
  430. }
  431. });
  432. //获取结果状态提示数据
  433. postapi("/api/app/CommonChar/GetCommonCharList", {}).then((res) => {
  434. if (res.code >= 0) {
  435. this.symbols = res.data;
  436. }
  437. });
  438. },
  439. btnPacsRessulst(row, index) {
  440. console.log("显示", row);
  441. },
  442. // 颜色转换
  443. // displayName: "错误",
  444. // dataInputPrompt: "×",
  445. // reportPrompt: "×",
  446. // reportBackgroundColor: 2427166,
  447. // reportFontColor: 1070166,
  448. // dataInputBackgroundColor: 321313,
  449. // dataInputFontColor: 12991019,
  450. colorTrans(dataColor, frontColor) {
  451. let tempColor =
  452. "000000" + Number(dataColor.dataInputBackgroundColor).toString(16);
  453. let backgroundColor = "#" + tempColor.substring(tempColor.length - 6);
  454. tempColor = "000000" + Number(dataColor.dataInputFontColor).toString(16);
  455. let color = "#" + tempColor.substring(tempColor.length - 6);
  456. this[frontColor] = Object.assign({}, dataColor, {
  457. backgroundColor,
  458. color,
  459. });
  460. console.log(`this.${frontColor}`, this[frontColor]);
  461. },
  462. // "referenceRangeValue": "15-55",
  463. // "referenceRangeTypeFlag": "1",
  464. // "criticalRangeValue": null,
  465. // "result"
  466. madeTooltips(index) {
  467. // let ts = confirm('提示')
  468. let checkItem = this.doctorCheck.checkItemList[index];
  469. let tooltips = "tipsNormal";
  470. checkItem.class = tooltips;
  471. let referenceRangeTypeFlag = checkItem.referenceRangeTypeFlag || "0"; //参考范围类别0-无参考范围,1-数字型,2-字符型,3-性激素
  472. // console.log('madeTooltips',index,referenceRangeTypeFlag)
  473. switch (referenceRangeTypeFlag) {
  474. case "3": // 1 是数字型,3 是性激素期
  475. case "1":
  476. // console.log('1、3')
  477. if (checkItem.result) {
  478. let tempResult = checkItem.result
  479. .replaceAll("<", "")
  480. .replaceAll("≤", "")
  481. .replaceAll("≦", "")
  482. .replaceAll(">", "")
  483. .replaceAll("≥", "")
  484. .replaceAll("≧", "")
  485. .replaceAll("=", "")
  486. .replaceAll(" ", "");
  487. console.log("tempResult", isNaN(tempResult), tempResult);
  488. if (isNaN(tempResult)) break;
  489. let result = Number(tempResult);
  490. if (checkItem.referenceRangeValue) {
  491. let criticalRangeValue = checkItem.criticalRangeValue;
  492. let valueArr = checkItem.referenceRangeValue
  493. .replaceAll("--", "-")
  494. .replaceAll("〜", "-")
  495. .replaceAll("~", "-")
  496. .split("-");
  497. if (valueArr.length == 1) valueArr.unshift(0);
  498. // console.log('valueArr',checkItem.referenceRangeValue,valueArr)
  499. if (criticalRangeValue) {
  500. let criticalArr = criticalRangeValue
  501. .replaceAll("--", "-")
  502. .replaceAll("〜", "-")
  503. .replaceAll("~", "-")
  504. .split("-");
  505. if (criticalArr.length == 1) criticalArr.unshift(0);
  506. // console.log('criticalArr',checkItem.criticalRangeValue,criticalArr)
  507. if (result < Number(criticalArr[0])) {
  508. tooltips = "tipsSuperLow";
  509. } else if (result > Number(criticalArr[1])) {
  510. tooltips = "tipsSuperHigh";
  511. } else if (result < Number(valueArr[0])) {
  512. tooltips = "tipsLow";
  513. } else if (result > Number(valueArr[1])) {
  514. tooltips = "tipsHigh";
  515. }
  516. } else {
  517. if (result < Number(valueArr[0])) {
  518. tooltips = "tipsLow";
  519. } else if (result > Number(valueArr[1])) {
  520. tooltips = "tipsHigh";
  521. }
  522. }
  523. }
  524. //错误值校验
  525. let errArr = [];
  526. if (checkItem.inputCheck) {
  527. errArr = checkItem.inputCheck
  528. .replaceAll("--", "-")
  529. .replaceAll("〜", "-")
  530. .replaceAll("~", "-")
  531. .split("-");
  532. if (errArr.length == 1) errArr.unshift(-1);
  533. }
  534. if (errArr && errArr.length > 1) {
  535. if (result < Number(errArr[0]) || result > Number(errArr[1])) {
  536. tooltips = "tipsError";
  537. console.log("checkItem", checkItem);
  538. }
  539. }
  540. }
  541. break;
  542. case "2":
  543. if (checkItem.result) {
  544. if (
  545. checkItem.result.indexOf("阴性") > -1 ||
  546. checkItem.result.indexOf("-") > -1
  547. ) {
  548. tooltips = "tipsNegative";
  549. } else if (
  550. checkItem.result.indexOf("弱阳性") > -1 ||
  551. checkItem.result.indexOf("±") > -1
  552. ) {
  553. tooltips = "tipsLowPositive";
  554. } else if (
  555. checkItem.result.indexOf("阳性") > -1 ||
  556. checkItem.result.indexOf("+") > -1
  557. ) {
  558. tooltips = "tipsPositive";
  559. }
  560. }
  561. break;
  562. default:
  563. break;
  564. }
  565. // 判断后重新赋值
  566. checkItem.class = tooltips;
  567. // 保存过检查时,直接取数据库
  568. checkItem.resultStatusId = this[tooltips].id; //名称 dataInputPrompt
  569. // console.log('checkItem',checkItem)
  570. // console.log(`this.${tooltips}`,this[tooltips])
  571. },
  572. // 行结果是否可编辑
  573. rowResultDisabled(row) {
  574. return (
  575. row.isCalculationItem == "Y" ||
  576. this.doctorCheck.RegisterCheckEdit.completeFlag == "1" ||
  577. this.doctorCheck.RegisterCheckEdit.completeFlag == "2"
  578. );
  579. },
  580. btnCritical(row) {
  581. this.dialogWin.FollowCriticalCheck = true;
  582. this.doctorCheck.combinationCriticalValue = false;
  583. this.doctorCheck.singleDetailedProject = row;
  584. },
  585. //项目列为计算函数
  586. computeFun(index) {
  587. // 有计算项的,才调用计算函数
  588. let haveComputeFun = false;
  589. let checkItem = this.doctorCheck.checkItemList[index];
  590. console.log("checkItem", checkItem);
  591. let body = {
  592. registerCheckId: checkItem.registerCheckId,
  593. items: [],
  594. };
  595. this.doctorCheck.checkItemList.forEach((e) => {
  596. body.items.push({
  597. itemId: e.itemId,
  598. result: e.result,
  599. });
  600. if (e.isCalculationItem == "Y") haveComputeFun = true;
  601. });
  602. if (!haveComputeFun) return; // 有计算项的,才调用计算函数
  603. let lfind = -1;
  604. postapi(
  605. "/api/app/diagnosisfunction/getcalculationfunctionresult",
  606. body
  607. ).then((res) => {
  608. if (res.code != -1) {
  609. // console.log('res.data',res.data)
  610. res.data.items.forEach((e) => {
  611. lfind = arrayExistObj(
  612. this.doctorCheck.checkItemList,
  613. "itemId",
  614. e.itemId
  615. );
  616. if (lfind > -1) {
  617. if (e.result != this.doctorCheck.checkItemList[lfind].result) {
  618. this.doctorCheck.checkItemList[lfind].result = e.result;
  619. console.log("e", lfind, this.doctorCheck.checkItemList[lfind]);
  620. this.madeTooltips(lfind);
  621. }
  622. }
  623. });
  624. }
  625. });
  626. },
  627. // 点击结果模版按钮
  628. btnMoreResult(row, index) {
  629. this.moreResult.data = deepCopy(row.itemResultTemplates);
  630. this.moreResult.result = row.result;
  631. this.moreResult.defaultResult = row.defaultResult;
  632. this.moreResult.index = index;
  633. // "itemId": "3a0c517f-cbdb-9fff-e300-1f76b3e47580",
  634. // "result": "00000",
  635. // "diagnosisId": "3a0ed8a2-72d9-ee50-78aa-5b1f474f2921",
  636. // "isNameIntoSummary": "N",
  637. // "isResultIntoSummary": "Y",
  638. // "resultStatusId": "01",
  639. // "simpleCode": "0"
  640. this.dialogWinMoreResult = true;
  641. this.watchSelection();
  642. },
  643. // pacs结果模板
  644. btnPacsResult(row, index) {
  645. let result = row.result;
  646. let summary = "";
  647. this.doctorCheck.checkSummaryList.forEach((e, i) => {
  648. summary += e.summary;
  649. });
  650. this.pacsParams.row = row;
  651. this.pacsParams.index = index;
  652. this.pacsParams.result = result;
  653. this.pacsParams.summary = summary;
  654. this.pacsParams.refresh++;
  655. this.dialogWinPacsTemplate = true;
  656. },
  657. // pacs结果模板(备份)
  658. btnPacsResultBak(row, index) {
  659. let result = row.result;
  660. let summary = "";
  661. this.doctorCheck.checkSummaryList.forEach((e, i) => {
  662. summary += e.summary;
  663. });
  664. this.pacsParams.row = row;
  665. this.pacsParams.index = index;
  666. this.pacsParams.result = result;
  667. this.pacsParams.summary = summary;
  668. this.pacsParams.refresh++;
  669. this.dialogWinPacsTemplate = true;
  670. },
  671. // 双击选择结果模版的结果
  672. dblclickResult(item) {
  673. this.moreResult.result = "";
  674. this.clickResult(item);
  675. this.btnOkResult("");
  676. },
  677. // 单击选择结果模版的结果
  678. clickResult(item) {
  679. let result = [];
  680. if (this.moreResult.result) result = this.moreResult.result.split(";");
  681. // 不用分隔符时,不判断包含关系
  682. if (this.isSplitChooseResult == "Y" && result.indexOf(item.result) > -1)
  683. return;
  684. if (this.isSplitChooseResult == "Y" || result.length == 0) {
  685. result.push(item.result);
  686. } else {
  687. result[result.length - 1] = result[result.length - 1] + item.result;
  688. }
  689. let ret = "";
  690. result.forEach((e, i) => {
  691. let splitStr = ";";
  692. if (i == 0) splitStr = "";
  693. ret += splitStr + e;
  694. });
  695. this.moreResult.result = ret;
  696. },
  697. // 清除结果值
  698. btnClear() {
  699. this.moreResult.result = "";
  700. },
  701. btnOkResult(result) {
  702. this.doctorCheck.checkItemList[this.moreResult.index].result = result
  703. ? this.moreResult[result]
  704. : this.moreResult.result;
  705. this.madeTooltips(this.moreResult.index);
  706. this.computeFun(this.moreResult.index);
  707. this.dialogWinMoreResult = false;
  708. },
  709. // 处理 pacs 结果录入的情况
  710. handlePacsResult(row, index, pacsResult) {
  711. // console.log('row,index,pacsResult', row, index, pacsResult)
  712. // this.doctorCheck.checkItemList[index].result = pacsResult.result;
  713. this.doctorCheck.checkSummaryList = [
  714. {
  715. id: Math.random(),
  716. registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
  717. summary: pacsResult.summary,
  718. summaryFlag: "N",
  719. },
  720. ];
  721. this.dialogWinPacsTemplate = false;
  722. },
  723. //选择项目
  724. rowClick(row) {
  725. this.doctorCheck.checkItem = row;
  726. this.restaurants = row.itemResultTemplates;
  727. },
  728. //检查组合项目下所包含的明细项目
  729. checkItemList(RegisterCheckId) {
  730. // this.doctorCheck.checkItem = null
  731. if (!RegisterCheckId) {
  732. this.doctorCheck.checkItemList = [];
  733. this.doctorCheck.RegisterCheckEdit = {
  734. id: "",
  735. checkDoctorId: "",
  736. checkDate: "",
  737. LastModifierId: "",
  738. LastModificationTime: "",
  739. completeFlag: "",
  740. };
  741. return;
  742. }
  743. console.log(
  744. `/api/app/registercheckitem/getlistinregistercheckid?RegisterCheckId=${RegisterCheckId}`
  745. );
  746. getapi(`/api/app/registercheck/getregistercheck?id=${RegisterCheckId}`)
  747. .then((res) => {
  748. if (res.code > -1) {
  749. this.doctorCheck.RegisterCheckEdit = res.data;
  750. if (
  751. res.data.isCharge != "Y" &&
  752. this.doctor_check_check_charge == "Y"
  753. ) {
  754. this.$message.warning({
  755. showClose: true,
  756. message: `该体检人员未缴清费用!`,
  757. });
  758. }
  759. if (this.doctorCheck.RegisterCheckEdit.completeFlag == "0") {
  760. this.doctorCheck.RegisterCheckEdit.checkDoctorId = this.userId;
  761. this.doctorCheck.RegisterCheckEdit.checkDate = new Date();
  762. }
  763. return getapi(
  764. `/api/app/registercheckitem/getlistinregistercheckid?RegisterCheckId=${RegisterCheckId}&PatientRegisterId=${this.dataTransOpts.tableS.patient_register.id}`
  765. );
  766. }
  767. })
  768. .then((res) => {
  769. // console.log("checkItemList", res.data);
  770. if (res && res.code > -1) {
  771. res.data.forEach((e, i) => {
  772. // 虚拟显示危急状态
  773. e["criticalFlag"] = "N";
  774. });
  775. this.doctorCheck.checkItemList = res.data;
  776. this.doctorCheck.checkItemList.forEach((e, i) => {
  777. if (this.doctorCheck.RegisterCheckEdit.completeFlag == "0") {
  778. this.madeTooltips(i);
  779. } else {
  780. let lfind = arrayExistObj(
  781. this.resultStatus,
  782. "id",
  783. e.resultStatusId
  784. );
  785. if (lfind > -1) {
  786. e.class = this.resultStatus[lfind].tooltips;
  787. }
  788. }
  789. });
  790. this.enterToTab();
  791. }
  792. })
  793. .catch((err) => {
  794. this.$message.error({
  795. showClose: true,
  796. message: `操作失败,原因:${err}`,
  797. });
  798. });
  799. },
  800. querySearch(queryString, cb) {
  801. var restaurants = []; //不需要字典库显示 deepCopy(this.restaurants) [{ value: '阴性' },{ value: '阳性' }]
  802. restaurants.forEach((item) => {
  803. return (item.value = item.result);
  804. });
  805. // console.log("restaurants", restaurants);
  806. var results = queryString
  807. ? restaurants.filter(this.createFilter(queryString))
  808. : restaurants;
  809. // 调用 callback 返回建议列表的数据
  810. cb(results);
  811. },
  812. createFilter(queryString) {
  813. return (restaurant) => {
  814. return (
  815. restaurant["value"].toLowerCase().indexOf(queryString.toLowerCase()) >
  816. -1
  817. );
  818. };
  819. },
  820. handleSelect(item) {
  821. console.log("item", item);
  822. },
  823. //回车替代tab键
  824. enterToTab() {
  825. // console.log('enterToTab');
  826. this.$nextTick(() => {
  827. let inputs = document.querySelectorAll(["textarea", "input"]); //用数组可以读取多个标签的元素 //.inline-input
  828. // console.log('inputs', typeof inputs, inputs)
  829. // 为每个输入框添加键盘事件监听器
  830. inputs.forEach((input, i) => {
  831. // console.log('input',input);
  832. input.addEventListener("keydown", (event) => {
  833. // 如果按下的是回车键
  834. // console.log('data-lineModeFlag', input, input.getAttribute('data-lineModeFlag'), i);
  835. // console.log('event.keyCode', event.keyCode)
  836. switch (event.keyCode) {
  837. case 13:
  838. if (
  839. event.keyCode === 13 &&
  840. input.getAttribute("data-lineModeFlag") == "0"
  841. ) {
  842. event.preventDefault();
  843. } else {
  844. break;
  845. }
  846. case 9: // tab 键
  847. event.preventDefault();
  848. case 40: // ↓ 键
  849. for (let j = i + 1; j < inputs.length; j++) {
  850. // console.log(inputs[j], inputs[j].getAttribute('type'), inputs[j].getAttribute('placeholder'))
  851. if (inputs[j].getAttribute("placeholder") == "请输入结果值") {
  852. if (inputs[j].getAttribute("disabled") != "disabled") {
  853. // console.log('inputs[j]', inputs[j])
  854. inputs[j].focus();
  855. break;
  856. }
  857. }
  858. }
  859. break;
  860. case 38: // ↑ 键
  861. for (let j = i - 1; j > -1; j--) {
  862. // console.log(inputs[j], inputs[j].getAttribute('type'), inputs[j].getAttribute('placeholder'))
  863. if (inputs[j].getAttribute("placeholder") == "请输入结果值") {
  864. if (inputs[j].getAttribute("disabled") != "disabled") {
  865. // console.log('inputs[j]', inputs[j])
  866. inputs[j].focus();
  867. break;
  868. }
  869. }
  870. }
  871. break;
  872. default:
  873. break;
  874. }
  875. });
  876. // 点击时全选结果
  877. input.addEventListener("click", (event) => {
  878. input.select();
  879. });
  880. });
  881. });
  882. },
  883. // 光标位置插入特殊符号
  884. insertSymbols(symbols) {
  885. let result = this.moreResult.result || "";
  886. if (result) {
  887. result =
  888. result.substring(0, this.selection.start) +
  889. symbols +
  890. result.substring(this.selection.end);
  891. } else {
  892. result = symbols;
  893. }
  894. this.moreResult.result = result;
  895. this.selection.start++;
  896. this.selection.end++;
  897. },
  898. // 获取光标位置的函数
  899. getCaretPosition() {
  900. let input = document.getElementById("resultBox");
  901. this.selection.start = input.selectionStart;
  902. this.selection.end = input.selectionEnd;
  903. // console.log('selection',this.selection)
  904. },
  905. watchSelection() {
  906. this.$nextTick(() => {
  907. let that = this;
  908. let resultBox = document.getElementById("resultBox"); //用数组可以读取多个标签的元素 //.inline-input
  909. // 绑定键盘事件到文本框
  910. resultBox.addEventListener("click", function (event) {
  911. // 获取光标位置
  912. that.getCaretPosition();
  913. });
  914. resultBox.addEventListener("input", function (event) {
  915. // 获取光标位置
  916. that.getCaretPosition();
  917. });
  918. });
  919. },
  920. },
  921. //监听事件
  922. watch: {
  923. //检查项目切换
  924. // "doctorCheck.RegisterCheckId":{
  925. // immediate:true,
  926. // handler(newVal, oldVal) {
  927. // console.log(
  928. // "watch doctorCheck.RegisterCheckId newVal:",
  929. // newVal,
  930. // " oldVal:",
  931. // oldVal
  932. // );
  933. // this.checkItemList(newVal);
  934. // }
  935. // },
  936. //检查项目未切换换时 也可以强制刷新数据
  937. "dataTransOpts.refresh.register_check_item.M": {
  938. // immediate: true,
  939. handler(newVal, oldVal) {
  940. console.log(
  941. `watch 检查明细 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.register_check.id}`
  942. );
  943. this.checkItemList(this.dataTransOpts.tableS.register_check.id);
  944. },
  945. },
  946. },
  947. };
  948. </script>
  949. <style lang="scss" scoped>
  950. @import "../../assets/css/global.css";
  951. ::v-deep .el-table td.el-table__cell,
  952. .el-table th.el-table__cell.is-leaf {
  953. padding: 0;
  954. }
  955. ::v-deep .el-textarea__inner {
  956. min-height: 23px;
  957. height: 23px;
  958. line-height: 1.25;
  959. padding: 2px 15px 2px 2px;
  960. }
  961. /*正常*/
  962. ::v-deep .tipsNormal .el-textarea__inner {
  963. background-color: v-bind("tipsNormal.backgroundColor") !important;
  964. color: v-bind("tipsNormal.color") !important;
  965. font-family: "Microsoft YaHei";
  966. }
  967. /*错误*/
  968. ::v-deep .tipsError .el-textarea__inner {
  969. background-color: v-bind("tipsError.backgroundColor") !important;
  970. color: v-bind("tipsError.color") !important;
  971. font-family: "Microsoft YaHei";
  972. }
  973. /*阴性 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  974. ::v-deep .tipsNegative .el-textarea__inner {
  975. background-color: v-bind("tipsNegative.backgroundColor") !important;
  976. color: v-bind("tipsNegative.color") !important;
  977. font-family: "Microsoft YaHei";
  978. }
  979. /*弱阳性 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  980. ::v-deep .tipsLowPositive .el-textarea__inner {
  981. background-color: v-bind("tipsLowPositive.backgroundColor") !important;
  982. color: v-bind("tipsLowPositive.color") !important;
  983. font-family: "Microsoft YaHei";
  984. }
  985. /*阳性 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  986. ::v-deep .tipsPositive .el-textarea__inner {
  987. background-color: v-bind("tipsPositive.backgroundColor") !important;
  988. color: v-bind("tipsPositive.color") !important;
  989. font-family: "Microsoft YaHei";
  990. }
  991. /*偏低 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  992. ::v-deep .tipsLow .el-textarea__inner {
  993. background-color: v-bind("tipsLow.backgroundColor") !important;
  994. color: v-bind("tipsLow.color") !important;
  995. font-family: "Microsoft YaHei";
  996. }
  997. /*偏高 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  998. ::v-deep .tipsHigh .el-textarea__inner {
  999. background-color: v-bind("tipsHigh.backgroundColor") !important;
  1000. color: v-bind("tipsHigh.color") !important;
  1001. font-family: "Microsoft YaHei";
  1002. }
  1003. /*超低 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  1004. ::v-deep .tipsSuperLow .el-textarea__inner {
  1005. background-color: v-bind("tipsSuperLow.backgroundColor") !important;
  1006. color: v-bind("tipsSuperLow.color") !important;
  1007. font-family: "Microsoft YaHei";
  1008. }
  1009. /*超高 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  1010. ::v-deep .tipsSuperHigh .el-textarea__inner {
  1011. background-color: v-bind("tipsSuperHigh.backgroundColor") !important;
  1012. color: v-bind("tipsSuperHigh.color") !important;
  1013. font-family: "Microsoft YaHei";
  1014. }
  1015. /*文字性危及值 v-bind("(window.pageHeight > 600 ? (window.pageHeight - 250) : 350) + 'px'") */
  1016. ::v-deep .tipsSuper .el-textarea__inner {
  1017. background-color: v-bind("tipsSuper.backgroundColor") !important;
  1018. color: v-bind("tipsSuper.color") !important;
  1019. font-family: "Microsoft YaHei";
  1020. }
  1021. ::v-deep .commonFont .el-textarea__inner {
  1022. font-family: "Microsoft YaHei";
  1023. }
  1024. </style>