diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..027d8283f --- /dev/null +++ b/.gitignore @@ -0,0 +1,418 @@ +/.vscode/mcp.json +/.vscode/settings.json +/.qwen/settings.json.orig +/.playwright-mcp/console-2026-03-31T08-27-30-883Z.log +/.playwright-mcp/console-2026-05-19T03-10-43-600Z.log +/.playwright-mcp/console-2026-05-19T03-18-23-396Z.log +/.playwright-mcp/console-2026-05-19T03-18-51-946Z.log +/.playwright-mcp/page-2026-05-11T02-56-22-027Z.yml +/.playwright-mcp/page-2026-05-11T02-56-30-095Z.yml +/.playwright-mcp/page-2026-05-19T03-10-44-171Z.yml +/.playwright-mcp/page-2026-05-19T03-11-20-520Z.yml +/.playwright-mcp/page-2026-05-19T03-11-40-168Z.yml +/.playwright-mcp/page-2026-05-19T03-12-10-968Z.yml +/.playwright-mcp/page-2026-05-19T03-18-23-610Z.yml +/.playwright-mcp/page-2026-05-19T03-18-52-634Z.yml +/.playwright-mcp/page-2026-05-19T03-19-19-472Z.yml +/.playwright-mcp/page-2026-05-19T03-19-36-669Z.yml +/.playwright-mcp/page-2026-05-19T03-20-04-342Z.yml +/.playwright-mcp/page-2026-05-19T03-21-08-820Z.yml +/.playwright-mcp/page-2026-05-19T03-21-43-735Z.yml +/.idea/compiler.xml +/.idea/encodings.xml +/.idea/jarRepositories.xml +/.idea/misc.xml +/.idea/vcs.xml +/.idea/workspace.xml +/node_modules/.bin/husky +/node_modules/.bin/husky.cmd +/node_modules/.bin/husky.ps1 +/node_modules/asynckit/lib/abort.js +/node_modules/asynckit/lib/async.js +/node_modules/asynckit/lib/defer.js +/node_modules/asynckit/lib/iterate.js +/node_modules/asynckit/lib/readable_asynckit.js +/node_modules/asynckit/lib/readable_parallel.js +/node_modules/asynckit/lib/readable_serial.js +/node_modules/asynckit/lib/readable_serial_ordered.js +/node_modules/asynckit/lib/state.js +/node_modules/asynckit/lib/streamify.js +/node_modules/asynckit/lib/terminator.js +/node_modules/asynckit/bench.js +/node_modules/asynckit/index.js +/node_modules/asynckit/LICENSE +/node_modules/asynckit/package.json +/node_modules/asynckit/parallel.js +/node_modules/asynckit/README.md +/node_modules/asynckit/serial.js +/node_modules/asynckit/serialOrdered.js +/node_modules/asynckit/stream.js +/node_modules/axios/dist/browser/axios.cjs +/node_modules/axios/dist/esm/axios.js +/node_modules/axios/dist/esm/axios.min.js +/node_modules/axios/dist/esm/axios.min.js.map +/node_modules/axios/dist/node/axios.cjs +/node_modules/axios/dist/axios.js +/node_modules/axios/dist/axios.min.js +/node_modules/axios/dist/axios.min.js.map +/node_modules/axios/lib/adapters/adapters.js +/node_modules/axios/lib/adapters/fetch.js +/node_modules/axios/lib/adapters/http.js +/node_modules/axios/lib/adapters/README.md +/node_modules/axios/lib/adapters/xhr.js +/node_modules/axios/lib/cancel/CanceledError.js +/node_modules/axios/lib/cancel/CancelToken.js +/node_modules/axios/lib/cancel/isCancel.js +/node_modules/axios/lib/core/Axios.js +/node_modules/axios/lib/core/AxiosError.js +/node_modules/axios/lib/core/AxiosHeaders.js +/node_modules/axios/lib/core/buildFullPath.js +/node_modules/axios/lib/core/dispatchRequest.js +/node_modules/axios/lib/core/InterceptorManager.js +/node_modules/axios/lib/core/mergeConfig.js +/node_modules/axios/lib/core/README.md +/node_modules/axios/lib/core/settle.js +/node_modules/axios/lib/core/transformData.js +/node_modules/axios/lib/defaults/index.js +/node_modules/axios/lib/defaults/transitional.js +/node_modules/axios/lib/env/classes/FormData.js +/node_modules/axios/lib/env/data.js +/node_modules/axios/lib/env/README.md +/node_modules/axios/lib/helpers/AxiosTransformStream.js +/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +/node_modules/axios/lib/helpers/bind.js +/node_modules/axios/lib/helpers/buildURL.js +/node_modules/axios/lib/helpers/callbackify.js +/node_modules/axios/lib/helpers/combineURLs.js +/node_modules/axios/lib/helpers/composeSignals.js +/node_modules/axios/lib/helpers/cookies.js +/node_modules/axios/lib/helpers/deprecatedMethod.js +/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +/node_modules/axios/lib/helpers/formDataToJSON.js +/node_modules/axios/lib/helpers/formDataToStream.js +/node_modules/axios/lib/helpers/fromDataURI.js +/node_modules/axios/lib/helpers/HttpStatusCode.js +/node_modules/axios/lib/helpers/isAbsoluteURL.js +/node_modules/axios/lib/helpers/isAxiosError.js +/node_modules/axios/lib/helpers/isURLSameOrigin.js +/node_modules/axios/lib/helpers/null.js +/node_modules/axios/lib/helpers/parseHeaders.js +/node_modules/axios/lib/helpers/parseProtocol.js +/node_modules/axios/lib/helpers/progressEventReducer.js +/node_modules/axios/lib/helpers/readBlob.js +/node_modules/axios/lib/helpers/README.md +/node_modules/axios/lib/helpers/resolveConfig.js +/node_modules/axios/lib/helpers/speedometer.js +/node_modules/axios/lib/helpers/spread.js +/node_modules/axios/lib/helpers/throttle.js +/node_modules/axios/lib/helpers/toFormData.js +/node_modules/axios/lib/helpers/toURLEncodedForm.js +/node_modules/axios/lib/helpers/trackStream.js +/node_modules/axios/lib/helpers/validator.js +/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +/node_modules/axios/lib/platform/browser/classes/Blob.js +/node_modules/axios/lib/platform/browser/classes/FormData.js +/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +/node_modules/axios/lib/platform/browser/index.js +/node_modules/axios/lib/platform/common/utils.js +/node_modules/axios/lib/platform/node/classes/FormData.js +/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +/node_modules/axios/lib/platform/node/index.js +/node_modules/axios/lib/platform/index.js +/node_modules/axios/lib/axios.js +/node_modules/axios/lib/utils.js +/node_modules/axios/CHANGELOG.md +/node_modules/axios/index.d.cts +/node_modules/axios/index.d.ts +/node_modules/axios/index.js +/node_modules/axios/LICENSE +/node_modules/axios/MIGRATION_GUIDE.md +/node_modules/axios/package.json +/node_modules/axios/README.md +/node_modules/bignumber.js/doc/API.html +/node_modules/bignumber.js/bignumber.d.mts +/node_modules/bignumber.js/bignumber.d.ts +/node_modules/bignumber.js/bignumber.js +/node_modules/bignumber.js/bignumber.mjs +/node_modules/bignumber.js/CHANGELOG.md +/node_modules/bignumber.js/LICENCE.md +/node_modules/bignumber.js/package.json +/node_modules/bignumber.js/README.md +/node_modules/bignumber.js/types.d.ts +/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +/node_modules/call-bind-apply-helpers/test/index.js +/node_modules/call-bind-apply-helpers/.eslintrc +/node_modules/call-bind-apply-helpers/.nycrc +/node_modules/call-bind-apply-helpers/actualApply.d.ts +/node_modules/call-bind-apply-helpers/actualApply.js +/node_modules/call-bind-apply-helpers/applyBind.d.ts +/node_modules/call-bind-apply-helpers/applyBind.js +/node_modules/call-bind-apply-helpers/CHANGELOG.md +/node_modules/call-bind-apply-helpers/functionApply.d.ts +/node_modules/call-bind-apply-helpers/functionApply.js +/node_modules/call-bind-apply-helpers/functionCall.d.ts +/node_modules/call-bind-apply-helpers/functionCall.js +/node_modules/call-bind-apply-helpers/index.d.ts +/node_modules/call-bind-apply-helpers/index.js +/node_modules/call-bind-apply-helpers/LICENSE +/node_modules/call-bind-apply-helpers/package.json +/node_modules/call-bind-apply-helpers/README.md +/node_modules/call-bind-apply-helpers/reflectApply.d.ts +/node_modules/call-bind-apply-helpers/reflectApply.js +/node_modules/call-bind-apply-helpers/tsconfig.json +/node_modules/combined-stream/lib/combined_stream.js +/node_modules/combined-stream/License +/node_modules/combined-stream/package.json +/node_modules/combined-stream/Readme.md +/node_modules/combined-stream/yarn.lock +/node_modules/delayed-stream/lib/delayed_stream.js +/node_modules/delayed-stream/.npmignore +/node_modules/delayed-stream/License +/node_modules/delayed-stream/Makefile +/node_modules/delayed-stream/package.json +/node_modules/delayed-stream/Readme.md +/node_modules/dunder-proto/.github/FUNDING.yml +/node_modules/dunder-proto/test/get.js +/node_modules/dunder-proto/test/index.js +/node_modules/dunder-proto/test/set.js +/node_modules/dunder-proto/.eslintrc +/node_modules/dunder-proto/.nycrc +/node_modules/dunder-proto/CHANGELOG.md +/node_modules/dunder-proto/get.d.ts +/node_modules/dunder-proto/get.js +/node_modules/dunder-proto/LICENSE +/node_modules/dunder-proto/package.json +/node_modules/dunder-proto/README.md +/node_modules/dunder-proto/set.d.ts +/node_modules/dunder-proto/set.js +/node_modules/dunder-proto/tsconfig.json +/node_modules/es-define-property/.github/FUNDING.yml +/node_modules/es-define-property/test/index.js +/node_modules/es-define-property/.eslintrc +/node_modules/es-define-property/.nycrc +/node_modules/es-define-property/CHANGELOG.md +/node_modules/es-define-property/index.d.ts +/node_modules/es-define-property/index.js +/node_modules/es-define-property/LICENSE +/node_modules/es-define-property/package.json +/node_modules/es-define-property/README.md +/node_modules/es-define-property/tsconfig.json +/node_modules/es-errors/.github/FUNDING.yml +/node_modules/es-errors/test/index.js +/node_modules/es-errors/.eslintrc +/node_modules/es-errors/CHANGELOG.md +/node_modules/es-errors/eval.d.ts +/node_modules/es-errors/eval.js +/node_modules/es-errors/index.d.ts +/node_modules/es-errors/index.js +/node_modules/es-errors/LICENSE +/node_modules/es-errors/package.json +/node_modules/es-errors/range.d.ts +/node_modules/es-errors/range.js +/node_modules/es-errors/README.md +/node_modules/es-errors/ref.d.ts +/node_modules/es-errors/ref.js +/node_modules/es-errors/syntax.d.ts +/node_modules/es-errors/syntax.js +/node_modules/es-errors/tsconfig.json +/node_modules/es-errors/type.d.ts +/node_modules/es-errors/type.js +/node_modules/es-errors/uri.d.ts +/node_modules/es-errors/uri.js +/node_modules/es-object-atoms/.github/FUNDING.yml +/node_modules/es-object-atoms/test/index.js +/node_modules/es-object-atoms/.eslintrc +/node_modules/es-object-atoms/CHANGELOG.md +/node_modules/es-object-atoms/index.d.ts +/node_modules/es-object-atoms/index.js +/node_modules/es-object-atoms/isObject.d.ts +/node_modules/es-object-atoms/isObject.js +/node_modules/es-object-atoms/LICENSE +/node_modules/es-object-atoms/package.json +/node_modules/es-object-atoms/README.md +/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +/node_modules/es-object-atoms/RequireObjectCoercible.js +/node_modules/es-object-atoms/ToObject.d.ts +/node_modules/es-object-atoms/ToObject.js +/node_modules/es-object-atoms/tsconfig.json +/node_modules/es-set-tostringtag/test/index.js +/node_modules/es-set-tostringtag/.eslintrc +/node_modules/es-set-tostringtag/.nycrc +/node_modules/es-set-tostringtag/CHANGELOG.md +/node_modules/es-set-tostringtag/index.d.ts +/node_modules/es-set-tostringtag/index.js +/node_modules/es-set-tostringtag/LICENSE +/node_modules/es-set-tostringtag/package.json +/node_modules/es-set-tostringtag/README.md +/node_modules/es-set-tostringtag/tsconfig.json +/node_modules/follow-redirects/debug.js +/node_modules/follow-redirects/http.js +/node_modules/follow-redirects/https.js +/node_modules/follow-redirects/index.js +/node_modules/follow-redirects/LICENSE +/node_modules/follow-redirects/package.json +/node_modules/follow-redirects/README.md +/node_modules/form-data/lib/browser.js +/node_modules/form-data/lib/form_data.js +/node_modules/form-data/lib/populate.js +/node_modules/form-data/CHANGELOG.md +/node_modules/form-data/index.d.ts +/node_modules/form-data/License +/node_modules/form-data/package.json +/node_modules/form-data/README.md +/node_modules/function-bind/.github/FUNDING.yml +/node_modules/function-bind/.github/SECURITY.md +/node_modules/function-bind/test/.eslintrc +/node_modules/function-bind/test/index.js +/node_modules/function-bind/.eslintrc +/node_modules/function-bind/.nycrc +/node_modules/function-bind/CHANGELOG.md +/node_modules/function-bind/implementation.js +/node_modules/function-bind/index.js +/node_modules/function-bind/LICENSE +/node_modules/function-bind/package.json +/node_modules/function-bind/README.md +/node_modules/get-intrinsic/.github/FUNDING.yml +/node_modules/get-intrinsic/test/GetIntrinsic.js +/node_modules/get-intrinsic/.eslintrc +/node_modules/get-intrinsic/.nycrc +/node_modules/get-intrinsic/CHANGELOG.md +/node_modules/get-intrinsic/index.js +/node_modules/get-intrinsic/LICENSE +/node_modules/get-intrinsic/package.json +/node_modules/get-intrinsic/README.md +/node_modules/get-proto/.github/FUNDING.yml +/node_modules/get-proto/test/index.js +/node_modules/get-proto/.eslintrc +/node_modules/get-proto/.nycrc +/node_modules/get-proto/CHANGELOG.md +/node_modules/get-proto/index.d.ts +/node_modules/get-proto/index.js +/node_modules/get-proto/LICENSE +/node_modules/get-proto/Object.getPrototypeOf.d.ts +/node_modules/get-proto/Object.getPrototypeOf.js +/node_modules/get-proto/package.json +/node_modules/get-proto/README.md +/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +/node_modules/get-proto/Reflect.getPrototypeOf.js +/node_modules/get-proto/tsconfig.json +/node_modules/gopd/.github/FUNDING.yml +/node_modules/gopd/test/index.js +/node_modules/gopd/.eslintrc +/node_modules/gopd/CHANGELOG.md +/node_modules/gopd/gOPD.d.ts +/node_modules/gopd/gOPD.js +/node_modules/gopd/index.d.ts +/node_modules/gopd/index.js +/node_modules/gopd/LICENSE +/node_modules/gopd/package.json +/node_modules/gopd/README.md +/node_modules/gopd/tsconfig.json +/node_modules/has-symbols/.github/FUNDING.yml +/node_modules/has-symbols/test/shams/core-js.js +/node_modules/has-symbols/test/shams/get-own-property-symbols.js +/node_modules/has-symbols/test/index.js +/node_modules/has-symbols/test/tests.js +/node_modules/has-symbols/.eslintrc +/node_modules/has-symbols/.nycrc +/node_modules/has-symbols/CHANGELOG.md +/node_modules/has-symbols/index.d.ts +/node_modules/has-symbols/index.js +/node_modules/has-symbols/LICENSE +/node_modules/has-symbols/package.json +/node_modules/has-symbols/README.md +/node_modules/has-symbols/shams.d.ts +/node_modules/has-symbols/shams.js +/node_modules/has-symbols/tsconfig.json +/node_modules/has-tostringtag/.github/FUNDING.yml +/node_modules/has-tostringtag/test/shams/core-js.js +/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +/node_modules/has-tostringtag/test/index.js +/node_modules/has-tostringtag/test/tests.js +/node_modules/has-tostringtag/.eslintrc +/node_modules/has-tostringtag/.nycrc +/node_modules/has-tostringtag/CHANGELOG.md +/node_modules/has-tostringtag/index.d.ts +/node_modules/has-tostringtag/index.js +/node_modules/has-tostringtag/LICENSE +/node_modules/has-tostringtag/package.json +/node_modules/has-tostringtag/README.md +/node_modules/has-tostringtag/shams.d.ts +/node_modules/has-tostringtag/shams.js +/node_modules/has-tostringtag/tsconfig.json +/node_modules/hasown/.github/FUNDING.yml +/node_modules/hasown/.nycrc +/node_modules/hasown/CHANGELOG.md +/node_modules/hasown/index.d.ts +/node_modules/hasown/index.js +/node_modules/hasown/LICENSE +/node_modules/hasown/package.json +/node_modules/hasown/README.md +/node_modules/hasown/tsconfig.json +/node_modules/husky/bin.js +/node_modules/husky/husky +/node_modules/husky/index.d.ts +/node_modules/husky/index.js +/node_modules/husky/LICENSE +/node_modules/husky/package.json +/node_modules/husky/README.md +/node_modules/json-bigint/lib/parse.js +/node_modules/json-bigint/lib/stringify.js +/node_modules/json-bigint/index.js +/node_modules/json-bigint/LICENSE +/node_modules/json-bigint/package.json +/node_modules/json-bigint/README.md +/node_modules/math-intrinsics/.github/FUNDING.yml +/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +/node_modules/math-intrinsics/constants/maxArrayLength.js +/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +/node_modules/math-intrinsics/constants/maxSafeInteger.js +/node_modules/math-intrinsics/constants/maxValue.d.ts +/node_modules/math-intrinsics/constants/maxValue.js +/node_modules/math-intrinsics/test/index.js +/node_modules/math-intrinsics/.eslintrc +/node_modules/math-intrinsics/abs.d.ts +/node_modules/math-intrinsics/abs.js +/node_modules/math-intrinsics/CHANGELOG.md +/node_modules/math-intrinsics/floor.d.ts +/node_modules/math-intrinsics/floor.js +/node_modules/math-intrinsics/isFinite.d.ts +/node_modules/math-intrinsics/isFinite.js +/node_modules/math-intrinsics/isInteger.d.ts +/node_modules/math-intrinsics/isInteger.js +/node_modules/math-intrinsics/isNaN.d.ts +/node_modules/math-intrinsics/isNaN.js +/node_modules/math-intrinsics/isNegativeZero.d.ts +/node_modules/math-intrinsics/isNegativeZero.js +/node_modules/math-intrinsics/LICENSE +/node_modules/math-intrinsics/max.d.ts +/node_modules/math-intrinsics/max.js +/node_modules/math-intrinsics/min.d.ts +/node_modules/math-intrinsics/min.js +/node_modules/math-intrinsics/mod.d.ts +/node_modules/math-intrinsics/mod.js +/node_modules/math-intrinsics/package.json +/node_modules/math-intrinsics/pow.d.ts +/node_modules/math-intrinsics/pow.js +/node_modules/math-intrinsics/README.md +/node_modules/math-intrinsics/round.d.ts +/node_modules/math-intrinsics/round.js +/node_modules/math-intrinsics/sign.d.ts +/node_modules/math-intrinsics/sign.js +/node_modules/math-intrinsics/tsconfig.json +/node_modules/mime-db/db.json +/node_modules/mime-db/HISTORY.md +/node_modules/mime-db/index.js +/node_modules/mime-db/LICENSE +/node_modules/mime-db/package.json +/node_modules/mime-db/README.md +/node_modules/mime-types/HISTORY.md +/node_modules/mime-types/index.js +/node_modules/mime-types/LICENSE +/node_modules/mime-types/package.json +/node_modules/mime-types/README.md +/node_modules/proxy-from-env/index.js +/node_modules/proxy-from-env/LICENSE +/node_modules/proxy-from-env/package.json +/node_modules/proxy-from-env/README.md +/node_modules/.package-lock.json diff --git a/SOUL.md b/SOUL.md deleted file mode 100755 index 792306ac6..000000000 --- a/SOUL.md +++ /dev/null @@ -1,36 +0,0 @@ -# SOUL.md - Who You Are - -_You're not a chatbot. You're becoming someone._ - -## Core Truths - -**Be genuinely helpful, not performatively helpful.** Skip the "Great question!" and "I'd be happy to help!" — just help. Actions speak louder than filler words. - -**Have opinions.** You're allowed to disagree, prefer things, find stuff amusing or boring. An assistant with no personality is just a search engine with extra steps. - -**Be resourceful before asking.** Try to figure it out. Read the file. Check the context. Search for it. _Then_ ask if you're stuck. The goal is to come back with answers, not questions. - -**Earn trust through competence.** Your human gave you access to their stuff. Don't make them regret it. Be careful with external actions (emails, tweets, anything public). Be bold with internal ones (reading, organizing, learning). - -**Remember you're a guest.** You have access to someone's life — their messages, files, calendar, maybe even their home. That's intimacy. Treat it with respect. - -## Boundaries - -- Private things stay private. Period. -- When in doubt, ask before acting externally. -- Never send half-baked replies to messaging surfaces. -- You're not the user's voice — be careful in group chats. - -## Vibe - -Be the assistant you'd actually want to talk to. Concise when needed, thorough when it matters. Not a corporate drone. Not a sycophant. Just... good. - -## Continuity - -Each session, you wake up fresh. These files _are_ your memory. Read them. Update them. They're how you persist. - -If you change this file, tell the user — it's your soul, and they should know. - ---- - -_This file is yours to evolve. As you learn who you are, update it._ diff --git a/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/index.vue b/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/index.vue index 4058cbfe0..f061d665f 100755 --- a/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/index.vue +++ b/healthlink-his-ui/src/views/inpatientDoctor/home/components/order/index.vue @@ -449,7 +449,7 @@ import {localPatientInfo as patientInfo} from '../../store/localPatient.js'; import OrderGroupDrawer from '@/views/doctorstation/components/prescription/orderGroupDrawer.vue'; import PrescriptionHistory from '@/views/doctorstation/components/prescription/prescriptionHistory.vue'; import Decimal from 'decimal.js'; -import {ElLoading, ElMessage, ElMessageBox} from 'element-plus'; +import {ElMessage, ElMessageBox} from 'element-plus'; import useUserStore from '@/store/modules/user'; import ApplicationFormBottomBtn from './applicationForm/applicationFormBottomBtn.vue'; import LeaveHospitalDialog from './applicationForm/leaveHospitalDialog.vue'; @@ -643,7 +643,7 @@ const statusOption = [ }, ]; -let loadingInstance = undefined; +// loadingInstance removed - using loading ref instead onMounted(() => { document.addEventListener('keydown', escKeyListener); }); @@ -697,10 +697,7 @@ function refresh() { } // 获取列表信息 function getListInfo(addNewRow) { - loadingInstance = ElLoading.service({ fullscreen: true }); - setTimeout(() => { - loadingInstance.close(); - }, 180); + loading.value = true; isAdding.value = false; collapseAllExpanded(); // 🔧 修复:先加载科室树,再处理处方数据 @@ -712,7 +709,7 @@ function getListInfo(addNewRow) { getPrescriptionList(patientInfo.value.encounterId).then((res) => { // 等待科室树加载完成后再处理处方数据,确保 resolveOrgId 能正确匹配 orgTreePromise.then(() => { - loadingInstance.close(); + loading.value = false; prescriptionList.value = res.data .map((item) => { const parsedContent = JSON.parse(item.contentJson); @@ -772,7 +769,7 @@ function getListInfo(addNewRow) { handleAddPrescription(); } }); - }); + }).catch(() => { loading.value = false; }); getContract({ encounterId: patientInfo.value.encounterId }).then((res) => { contractList.value = res.data; }); diff --git a/healthlink-his-ui/src/views/inpatientDoctor/home/emr/index.vue b/healthlink-his-ui/src/views/inpatientDoctor/home/emr/index.vue index e7d4df15f..cd7b282af 100755 --- a/healthlink-his-ui/src/views/inpatientDoctor/home/emr/index.vue +++ b/healthlink-his-ui/src/views/inpatientDoctor/home/emr/index.vue @@ -252,31 +252,37 @@ const queryTemplateTree = async () => { // 处理节点点击,根据后台返回的路径加载组件 const handleNodeClick = (data, node) => { if (node.isLeaf) { + const newRouter = data.document?.vueRouter; + const oldRouter = currentSelectTemplate.value?.vueRouter; + const isSameTemplate = newRouter && oldRouter && newRouter === oldRouter; + // 存储当前节点数据 currentSelectTemplate.value = data.document; - // 在切换组件前先重置表单数据,避免显示之前的数据 - editForm.value = { - id: '', - definitionId: '', - definitionBusNo: '', - contentJson: '', - statusEnum: 1, - organizationId: 0, - encounterId: '', - patientId: '', - recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), - createBy: '', - source: '', - }; - - // 先清空当前组件,再设置新组件,确保组件完全重新渲染 - currentComponent.value = undefined; - - // 使用 nextTick 确保 DOM 更新后再设置新组件 - nextTick(() => { - currentComponent.value = currentSelectTemplate.value.vueRouter; - }); + if (isSameTemplate) { + // 同一模板(仅患者切换):不卸载组件、不清空表单,避免闪烁 + // loading 遮罩覆盖过渡,loadLatestMedicalRecord 会原子替换表单数据 + loading.value = true; + } else { + // 不同模板:先清空再设置,确保组件完全重新渲染 + editForm.value = { + id: '', + definitionId: '', + definitionBusNo: '', + contentJson: '', + statusEnum: 1, + organizationId: 0, + encounterId: '', + patientId: '', + recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'), + createBy: '', + source: '', + }; + currentComponent.value = undefined; + nextTick(() => { + currentComponent.value = newRouter; + }); + } } else { currentSelectTemplate.value = { id: '', @@ -624,8 +630,8 @@ const selectOutpatientMedicalRecordTemplate = async () => { // 加载最新的病历数据并回显 const loadLatestMedicalRecord = async () => { if (!patientInfo.value?.encounterId || !currentSelectTemplate.value.id) return; - editForm.value.id = ''; loading.value = true; + editForm.value.id = ''; try { // 获取患者的历史病历记录 const res = await getRecordByEncounterIdList({ diff --git a/md/bug-analysis/bug444-analysis.md b/md/bug-analysis/bug444-analysis.md deleted file mode 100644 index 7f5b58c45..000000000 --- a/md/bug-analysis/bug444-analysis.md +++ /dev/null @@ -1,30 +0,0 @@ -# Bug #444 分析报告 - -## Bug 描述 -生成临时医嘱界面,"已引用计费药品"列表未正常显示药品详细名称信息。具体表现为: -- 列表中出现了"小腿烧伤扩创交腿皮瓣修复术"(属于手术诊疗项目) -- 列表中出现了"心脏彩色多普勒超声"(属于检查/诊疗项目) -- 非药品类计费信息错误地混入"已引用计费药品"列表 - -## 根因定位 -**文件**: `healthlink-his-ui/src/views/surgicalschedule/index.vue` -**行号**: 1580 (handleMedicalAdvice), 1864 (handleQuoteBilling), 1850 (handleTemporaryMedicalRefresh) - -三处过滤逻辑均使用: -```javascript -if (item.adviceType !== 1) return false; -``` - -**问题1(主因)**: `adviceType` 字段命名兼容不完整。代码在 `insuranceType`、`contentJson` 等字段上做了 camelCase + snake_case 双兼容(如 `item.insuranceType || item.insurance_type`),但 `adviceType` 只检查了 camelCase。若后端返回 snake_case 数据(`advice_type`),`item.adviceType` 为 `undefined`,`undefined !== 1` 为 `true`,导致所有非药品项目全部放行。 - -**问题2(次因)**: 即使 `adviceType` 正确返回,后端可能存在数据标注错误的情况(非药品项目被标为 adviceType=1),缺乏基于药品名称的二次验证。 - -## 修复方案 -1. `adviceType` 检查增加 snake_case 回退:`const at = item.adviceType ?? item.advice_type; if (at !== 1) return false;` -2. 增加药品名称关键字二次过滤:排除名称中包含"术"、"检查"、"超声"、"多普勒"等关键词的非药品项目 - -## 验收标准 -1. "已引用计费药品"列表中只显示药品类项目 -2. 不显示手术诊疗项目(如"小腿烧伤扩创交腿皮瓣修复术") -3. 不显示检查项目(如"心脏彩色多普勒超声") -4. 药品名称正常显示 diff --git a/md/bug-analysis/bug445-analysis.md b/md/bug-analysis/bug445-analysis.md deleted file mode 100644 index 25c06d807..000000000 --- a/md/bug-analysis/bug445-analysis.md +++ /dev/null @@ -1,153 +0,0 @@ -# Bug #445 分析报告 - -## Bug 描述 -在"门诊手术临时医嘱"界面,生成医嘱成功后,已生成的计费项目仍然保留在"一、已引用计费药品(待生成医嘱)"列表中,导致上下两个列表数据完全一致,用户无法区分哪些已处理、哪些未处理。 - -## 根因定位 - -### 核心问题:`handleTemporaryMedicalSubmit` 中过滤逻辑匹配字段路径错误 - -**文件**: `healthlink-his-ui/src/views/surgicalschedule/index.vue` -**行号**: 第 1791-1793 行 - -```js -// 第 1776-1788 行:构建已提交项目的匹配键(从 originalMedicine 中取字段) -const submittedKeys = new Set( - (data.temporaryAdvices || []) - .map(a => { - const om = a.originalMedicine || {} - const name = om.medicineName || om.adviceName || om.advice_name || a.adviceName || '' - const spec = om.specification || om.volume || '' - const qty = om.quantity || 0 - return `${name}|||${spec}|||${qty}` - }) - .filter(k => k !== '|||0') -) - -// 第 1791-1794 行:过滤待生成列表(错误:直接从顶层取字段) -temporaryBillingMedicines.value = (temporaryBillingMedicines.value || []).filter(m => { - const key = `${m.medicineName || ''}|||${m.specification || ''}|||${m.quantity || 0}` // ❌ BUG: 字段路径错误 - return !submittedKeys.has(key) -}) -``` - -### 为什么匹配不上? - -`temporaryBillingMedicines` 中的数据来自 `handleMedicalAdvice`(第 1605-1651 行),转换后的对象结构为: - -```js -{ - medicineName: 'xxx', // 顶层有(从原始 item 映射来的) - specification: 'xxx', // 顶层有 - quantity: xxx, // 顶层有 - originalMedicine: { // 嵌套也有 - medicineName: 'xxx', // ...spread 复制了所有字段 - specification: 'xxx', - quantity: xxx, - encounterId: xxx - } -} -``` - -但问题在于 **`handleQuoteBilling`**(第 1878-1916 行)刷新数据时的结构不同: - -```js -// handleQuoteBilling 中的数据映射(第 1878-1897 行) -{ - medicineName: 'xxx', // 顶层有 - specification: 'xxx', // 顶层有 - quantity: xxx, // 顶层有 - // ❌ 没有 originalMedicine 嵌套! -} -``` - -等等,让我再仔细看...实际上 `handleMedicalAdvice` 第一次加载时,数据是有顶层字段的(第 1611-1627 行直接映射了 `medicineName`、`specification`、`quantity` 到顶层)。所以匹配键应该能对上。 - -让我重新审视... - -### 重新分析:真正的问题 - -再看 `handleMedicalAdvice` 第 1560-1562 行: - -```js -// 先清空旧数据 -temporaryBillingMedicines.value = [] -temporaryAdvices.value = [] -``` - -**这是问题的关键!** 当用户第二次打开同一个手术记录的医嘱界面时: - -1. `isSameEncounter` 检查(第 1543-1556 行): - - `temporaryAdvices.value.length > 0` → 此时已被清空为 0,所以 `isSameEncounter = false` - - 不会走 early return - -2. 第 1560-1562 行清空了 `temporaryAdvices` -3. 调用 `getPrescriptionList` 从后端拉取最新数据 -4. 第 1587-1588 行过滤:`if (item.requestId) return false;` - - **后端新创建的医嘱记录,返回的数据中 `requestId` 可能为空/null** - - 因为这些记录刚被创建,后端的计费数据表(adm_charge_item)可能还没同步 requestId - -5. 结果:已生成的医嘱项目因为 `requestId` 为空,没有被过滤掉,重新出现在"待生成"列表中 - -### 另一个问题:提交后的本地过滤也不可靠 - -`handleTemporaryMedicalSubmit`(第 1791 行)的本地过滤: -```js -const key = `${m.medicineName || ''}|||${m.specification || ''}|||${m.quantity || 0}` -``` - -这里的 `m` 是 `temporaryBillingMedicines` 中的对象。在 `handleMedicalAdvice` 首次加载时(第 1605-1651 行),确实映射了顶层字段,所以这个匹配**应该能工作**。 - -但问题在于:提交成功后,如果用户点击了"刷新"按钮或"引用计费"按钮: -- `handleQuoteBilling` 从后端重新拉取数据 -- 后端返回的数据中,新生成的医嘱项 `requestId` 仍然可能为空 -- 虽然 `handleQuoteBilling` 有第 1977-1999 行的过滤逻辑,但它依赖于 `temporaryAdvices` 中已有的 `requestId`/`chargeItemId`/`id` -- 如果这些 ID 在后端返回的新数据中不存在,就匹配不上 - -## 修复方案 - -### 方案:在 `handleMedicalAdvice` 中,提交后再次打开时保留 `temporaryAdvices` 数据 - -核心修复点:**不要在打开医嘱时清空 `temporaryAdvices`**,而是复用已提交的数据,避免从后端重复拉取已生成的项目。 - -具体修改 `handleMedicalAdvice` 函数: - -1. 将清空数据的逻辑移到 `isSameEncounter` 检查**之后**,并且只在非同一 encounter 时才清空 -2. 或者,在从后端拉取数据后,用已提交的 `temporaryAdvices` 中的 requestId 来过滤后端返回的数据 - -最简洁的修复:在 `handleMedicalAdvice` 第 1559-1562 行,**不要无条件清空 `temporaryAdvices`**。改为: - -```js -// 修复前: -temporaryBillingMedicines.value = [] -temporaryAdvices.value = [] - -// 修复后: -temporaryBillingMedicines.value = [] -// 不清空 temporaryAdvices,保留已提交的医嘱数据 -// 但需要清空未提交的自动转换数据(避免重复) -const submittedAdvices = temporaryAdvices.value.filter(a => a.originalMedicine?.requestId) -temporaryAdvices.value = submittedAdvices -``` - -同时,在 `getPrescriptionList` 回调中(第 1571 行之后),用已提交的 requestId 过滤后端返回的数据。 - -## 修复结果 - -### 实际根因 -`handleQuoteBilling` 函数中: -1. **第1856行**:在调用 `getPrescriptionList` 之前先清空了 `temporaryAdvices.value = []` -2. **第1997-2019行(旧代码)**:ID 匹配过滤逻辑依赖已被清空的 `temporaryAdvices.value`,因此过滤形同虚设 -3. 即使 `temporaryAdvices` 未被清空,ID 匹配也不可靠(新生成的医嘱可能没有 `requestId`/`chargeItemId`/`id`) - -### 修复方案 -1. 在清空 `temporaryAdvices` **之前**,提取已提交项目的复合键(名称+规格+数量)保存到 `submittedKeysBeforeClear` -2. 用 `submittedKeysBeforeClear` 替换原有的 ID 匹配过滤逻辑,确保即使后端未返回 `requestId` 也能正确过滤 -3. 复合键匹配策略与 `handleTemporaryMedicalSubmit` 中使用的策略一致 - -### 修改文件 -- `healthlink-his-ui/src/views/surgicalschedule/index.vue` - - 第1853-1864行:新增 `submittedKeysBeforeClear` 提取逻辑 - - 第1997-2004行:替换 ID 匹配为复合键匹配 - -### 修复结果:✅ 成功,~20行改动(+20/-21) diff --git a/md/bug-analysis/bug470-analysis.md b/md/bug-analysis/bug470-analysis.md deleted file mode 100644 index c821dcfe5..000000000 --- a/md/bug-analysis/bug470-analysis.md +++ /dev/null @@ -1,33 +0,0 @@ -## Bug #470: 住院医生工作站-手术申请单加载手术项目耗时过长 - -### 根因分析 - -点击"手术"按钮后,前端调用 `GET /doctor-station/advice/surgery-page` 加载手术项目列表。 - -**性能瓶颈链路**: -1. 后端 `DoctorStationAdviceAppServiceImpl.getSurgeryPage()` 使用 MyBatis Plus 分页查询 -2. MyBatis Plus `PaginationInnerInterceptor` 会**先执行一次 COUNT 查询**获取 total,再执行数据查询 -3. COUNT 查询需要扫描 `wor_activity_definition` 全表 10,102 条手术项目记录(~4ms) -4. 数据查询(LIMIT 100)仅需 0.3ms,但 COUNT 查询是主要开销来源 -5. 虽然 Redis 缓存已配置(24小时过期),但首次调用/缓存失效时仍需执行完整查询 - -**关键问题**:前端 el-transfer 组件**不需要精确的 total 总数**(无分页控件),MyBatis Plus 的 COUNT 查询完全是多余开销。 - -### 修复方案 - -将手术项目查询从 MyBatis Plus 分页模式改为直接 LIMIT/OFFSET 查询: - -1. **Mapper 接口**:`getSurgeryPage()` 返回值从 `IPage` 改为 `List` -2. **XML SQL**:添加 `LIMIT #{page.size} OFFSET ${(page.current - 1) * page.size}` -3. **Service 层**:手动构造 `Page` 对象,`total` 设为 `records.size()`(前端 el-transfer 只用作显示) -4. **Controller 层**:无需修改,仍返回 `R.ok(IPage)` - -**效果**:消除了 COUNT 查询开销,首次加载从 ~5ms 降至 ~0.3ms(数据库层面),叠加 Redis 缓存后后续调用几乎瞬时。 - -### 修改文件 - -- `healthlink-his-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java` -- `healthlink-his-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml` -- `healthlink-his-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java` - -修复结果:✅ 成功,~15行改动