|
|
@@ -1068,7 +1068,7 @@
|
|
|
distanceTop="5vh"
|
|
|
>
|
|
|
<div slot="body">
|
|
|
- <PrescriptionUnifySuit @turn="onSuitTechTurn"></PrescriptionUnifySuit>
|
|
|
+ <PrescriptionUnifySuit @turn="onSuitTechTurn" @open-detail="openSuitDetail"></PrescriptionUnifySuit>
|
|
|
</div>
|
|
|
</Popup>
|
|
|
|
|
|
@@ -1082,10 +1082,18 @@
|
|
|
distanceTop="5vh"
|
|
|
>
|
|
|
<div slot="body">
|
|
|
- <PrescriptionSuit @turn="onSuitTechTurn"></PrescriptionSuit>
|
|
|
+ <PrescriptionSuit @turn="onSuitTechTurn" @open-detail="openSuitDetail"></PrescriptionSuit>
|
|
|
</div>
|
|
|
</Popup>
|
|
|
|
|
|
+ <!-- 协定方详情弹窗(查询弹窗点行查看;置于顶层,避免被查询弹窗 mask 遮挡) -->
|
|
|
+ <SuitTechAgreementDetail
|
|
|
+ :show.sync="suitDetailShow"
|
|
|
+ :detail="suitDetailData"
|
|
|
+ :loading="suitDetailLoading"
|
|
|
+ @turn="onSuitDetailTurn"
|
|
|
+ />
|
|
|
+
|
|
|
<!-- 查询舌象分析 页面768 -->
|
|
|
<Popup
|
|
|
:showDialog="showTongueAnalysis"
|
|
|
@@ -1160,6 +1168,7 @@ import medAdress from "./components/medAddress.vue";
|
|
|
import medAdressNew from "./components/medAddressNew.vue";
|
|
|
import SuitTechAgreement from "./components/SuitTechAgreement.vue";
|
|
|
import SuitTechSidePanel from "./components/SuitTechSidePanel.vue";
|
|
|
+import SuitTechAgreementDetail from "./components/SuitTechAgreementDetail.vue";
|
|
|
import {
|
|
|
getPatiensBasisM,
|
|
|
refreshElectronicInfo,
|
|
|
@@ -1206,6 +1215,7 @@ import {
|
|
|
|
|
|
import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
|
|
|
import { getExperinceDetail } from "@/api/business.js";
|
|
|
+import { getSuitableTechInfo } from "@/api/technology.js";
|
|
|
import { setTimeout } from "timers";
|
|
|
import prescribing from "../../utils/minix/prescribing";
|
|
|
|
|
|
@@ -1237,7 +1247,8 @@ export default {
|
|
|
medAdress,
|
|
|
medAdressNew,
|
|
|
SuitTechAgreement,
|
|
|
- SuitTechSidePanel
|
|
|
+ SuitTechSidePanel,
|
|
|
+ SuitTechAgreementDetail
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -1265,6 +1276,11 @@ export default {
|
|
|
tjRecipeId: "", // 当前选中推荐 方剂的 id(中药处方/制剂用)
|
|
|
suitTjRecipeId: "", // 适宜技术专用高亮 id(独立于 tjRecipeId,避免跨 tab 串扰)
|
|
|
suitActiveSafety: [], // 适宜技术右侧「安全合理检测」项目(传给 SuitTechSidePanel :safetyItems)
|
|
|
+ // 顶层协定方详情弹窗(查询弹窗点行查看;提升到顶层避免被查询弹窗 mask 遮挡)
|
|
|
+ suitDetailShow: false,
|
|
|
+ suitDetailData: {},
|
|
|
+ suitDetailLoading: false,
|
|
|
+ suitDetailPid: "",
|
|
|
|
|
|
isMyMade: true, // 是否是自拟处方
|
|
|
|
|
|
@@ -4174,6 +4190,55 @@ console.log(this.rRecomendR, "this.rRecomendR");
|
|
|
}, 500);
|
|
|
}
|
|
|
},
|
|
|
+ // 打开顶层协定方详情弹窗(查询弹窗点行触发;提到顶层,避免详情弹窗嵌套在查询弹窗里被 mask 遮挡)
|
|
|
+ async openSuitDetail(pid) {
|
|
|
+ if (!pid) return;
|
|
|
+ this.suitDetailPid = pid;
|
|
|
+ this.suitDetailLoading = true;
|
|
|
+ this.suitDetailShow = true;
|
|
|
+ try {
|
|
|
+ const res = await getSuitableTechInfo(pid);
|
|
|
+ if (res.ResultCode === 0) {
|
|
|
+ this.suitDetailData = res.Data || {};
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ console.error("获取协定方详情失败", e);
|
|
|
+ } finally {
|
|
|
+ this.suitDetailLoading = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 顶层详情弹窗点转方:走协定方转方回填(onSuitTechTurn 内部会关闭查询弹窗)
|
|
|
+ onSuitDetailTurn() {
|
|
|
+ if (!this.suitDetailPid) return;
|
|
|
+ this.suitDetailShow = false;
|
|
|
+ this.onSuitTechTurn(this.suitDetailPid, this.suitDetailData);
|
|
|
+ },
|
|
|
+ // 适宜技术·回填诊断信息:病名/证型/治法 → TCM.setParams;西医诊断 → 建议诊断(suggestDiag)
|
|
|
+ // 协定方转方 / 推荐方案载入 共用;detail 来自 getSuitableTechInfo / getLocalSuitableTechInfo
|
|
|
+ fillSuitTechDiagnosis(detail) {
|
|
|
+ if (!detail) return;
|
|
|
+ if (this.$refs.TCM && (detail.disName || detail.synName || detail.theName)) {
|
|
|
+ this.$refs.TCM.setParams({
|
|
|
+ namemedicine: detail.disName || '',
|
|
|
+ disid: detail.disId || '',
|
|
|
+ disCode: detail.disCode || '',
|
|
|
+ symptomid: detail.synId || detail.synCode || '',
|
|
|
+ syndrometypes: detail.synName || '',
|
|
|
+ treatment: detail.theName || '',
|
|
|
+ therapyCode: detail.theCode || ''
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (detail.westernCode) {
|
|
|
+ const wdCodes = String(detail.westernCode).split(',').map(s => s.trim()).filter(Boolean);
|
|
|
+ const wdNames = detail.westernDiag ? String(detail.westernDiag).split(',').map(s => s.trim()) : [];
|
|
|
+ wdCodes.forEach((code, i) => {
|
|
|
+ if (code && wdNames[i]) this.westernDiseaseNameMap[code] = wdNames[i];
|
|
|
+ });
|
|
|
+ // 已选 + 候选都用本次数据替换,避免与之前推导/转方的西医诊断累加
|
|
|
+ this.suggestDiag = wdCodes;
|
|
|
+ this.suggestDiagAll = wdCodes.map((code, i) => ({ westcode: code, westname: wdNames[i] || this.westernDiseaseNameMap[code] || code }));
|
|
|
+ }
|
|
|
+ },
|
|
|
// 适宜技术 · 协定方转方(详情弹窗「转方」触发)
|
|
|
async onSuitTechTurn(pid, detail) {
|
|
|
console.log('onSuitTechTurn 参数:', { pid, detail });
|
|
|
@@ -4201,30 +4266,8 @@ console.log(this.rRecomendR, "this.rRecomendR");
|
|
|
}
|
|
|
res.Data = checkResult.filteredData.length === 1 ? checkResult.filteredData[0] : checkResult.filteredData;
|
|
|
|
|
|
- // 协定方转方:如果详情接口返回了病名、证型、治法,覆盖页面上方的诊断信息
|
|
|
- console.log('回填诊断信息:', { detail, hasTCM: !!this.$refs.TCM });
|
|
|
- if (detail && this.$refs.TCM) {
|
|
|
- if (detail.disName || detail.synName || detail.theName) {
|
|
|
- console.log('调用 setParams:', {
|
|
|
- namemedicine: detail.disName || '',
|
|
|
- disid: detail.disId || '',
|
|
|
- disCode: detail.disCode || '',
|
|
|
- symptomid: detail.synId || detail.synCode || '',
|
|
|
- syndrometypes: detail.synName || '',
|
|
|
- treatment: detail.theName || '',
|
|
|
- therapyCode: detail.theCode || ''
|
|
|
- });
|
|
|
- this.$refs.TCM.setParams({
|
|
|
- namemedicine: detail.disName || '',
|
|
|
- disid: detail.disId || '',
|
|
|
- disCode: detail.disCode || '',
|
|
|
- symptomid: detail.synId || detail.synCode || '',
|
|
|
- syndrometypes: detail.synName || '',
|
|
|
- treatment: detail.theName || '',
|
|
|
- therapyCode: detail.theCode || ''
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
+ // 协定方转方:回填病名/证型/治法 + 建议诊断(公共方法,推荐方案也复用)
|
|
|
+ this.fillSuitTechDiagnosis(detail);
|
|
|
// 转方是主动换方案:清掉切tab产生的缓存,避免 assignRecipe3 开头 restoreCachedData 用旧数据拦截
|
|
|
if (this.$refs.suitScience) {
|
|
|
this.$refs.suitScience._cachedPrescriptions = null;
|
|
|
@@ -4247,7 +4290,7 @@ console.log(this.rRecomendR, "this.rRecomendR");
|
|
|
this.addRecipeFrom("2");
|
|
|
},
|
|
|
// 适宜技术 推荐方案
|
|
|
- async onSuitRecommendSelect(item) {
|
|
|
+ async onSuitRecommendSelect(item, detail) {
|
|
|
const sourcePid = item.pid || item.preid || item.acupreid;
|
|
|
if (!sourcePid) return;
|
|
|
// if (this.$refs.suitScience && (this.$refs.suitScience.isPay || this.$refs.suitScience.paystate == 1)) {
|
|
|
@@ -4286,6 +4329,8 @@ console.log(this.rRecomendR, "this.rRecomendR");
|
|
|
// 转方数据追加到当前处方后面(不覆盖)
|
|
|
this.assignRecipe3(recipeRes.Data, loading, true);
|
|
|
this.suitTjRecipeId = sourcePid;
|
|
|
+ // 回填病名/证型/治法 + 建议诊断(detail 由推荐详情弹窗 getLocalSuitableTechInfo 带出)
|
|
|
+ this.fillSuitTechDiagnosis(detail);
|
|
|
} else {
|
|
|
loading.close();
|
|
|
}
|