|
@@ -272,13 +272,13 @@
|
|
|
</div>
|
|
</div>
|
|
|
<!-- his信息 -->
|
|
<!-- his信息 -->
|
|
|
<div class="his-msg" v-if="innerWidth>768 " style="flex-wrap: wrap;">
|
|
<div class="his-msg" v-if="innerWidth>768 " style="flex-wrap: wrap;">
|
|
|
- <div class="his-item" v-if="Object.keys(patiensMsg).length>0">
|
|
|
|
|
|
|
+ <!-- <div class="his-item" v-if="Object.keys(patiensMsg).length>0">
|
|
|
<div class="name">HIS病名:</div>
|
|
<div class="name">HIS病名:</div>
|
|
|
<div class="value">
|
|
<div class="value">
|
|
|
<el-input size="mini" disabled :value="patiensMsg.maindiagnosis.namemedicinehis ||''"></el-input>
|
|
<el-input size="mini" disabled :value="patiensMsg.maindiagnosis.namemedicinehis ||''"></el-input>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
- <div class="his-item" v-if="Object.keys(patiensMsg).length>0">
|
|
|
|
|
|
|
+ </div> -->
|
|
|
|
|
+ <!-- <div class="his-item" v-if="Object.keys(patiensMsg).length>0">
|
|
|
<div class="name">HIS证型:</div>
|
|
<div class="name">HIS证型:</div>
|
|
|
<div class="value">
|
|
<div class="value">
|
|
|
<el-input
|
|
<el-input
|
|
@@ -287,7 +287,7 @@
|
|
|
:value="patiensMsg.maindiagnosis.syndrometypeshis || ''"
|
|
:value="patiensMsg.maindiagnosis.syndrometypeshis || ''"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
<!-- 西医诊断 - 仅适宜技术处方 tab 显示 -->
|
|
<!-- 西医诊断 - 仅适宜技术处方 tab 显示 -->
|
|
|
<div class="his-item" v-if="container_i == 2 && patiensMsg.maindiagnosis">
|
|
<div class="his-item" v-if="container_i == 2 && patiensMsg.maindiagnosis">
|
|
|
<div class="name">西医主诊断:</div>
|
|
<div class="name">西医主诊断:</div>
|
|
@@ -575,7 +575,7 @@
|
|
|
<div class="pre-right" v-show="container_i==2 && !isShrink">
|
|
<div class="pre-right" v-show="container_i==2 && !isShrink">
|
|
|
<SuitTechSidePanel
|
|
<SuitTechSidePanel
|
|
|
:recommendations="rRecomendR"
|
|
:recommendations="rRecomendR"
|
|
|
- :activeId="tjRecipeId"
|
|
|
|
|
|
|
+ :activeId="suitTjRecipeId"
|
|
|
:safetyItems="suitActiveSafety"
|
|
:safetyItems="suitActiveSafety"
|
|
|
@select="onSuitRecommendSelect"
|
|
@select="onSuitRecommendSelect"
|
|
|
/>
|
|
/>
|
|
@@ -1068,7 +1068,7 @@
|
|
|
distanceTop="5vh"
|
|
distanceTop="5vh"
|
|
|
>
|
|
>
|
|
|
<div slot="body">
|
|
<div slot="body">
|
|
|
- <PrescriptionUnifySuit></PrescriptionUnifySuit>
|
|
|
|
|
|
|
+ <PrescriptionUnifySuit @turn="onSuitTechTurn"></PrescriptionUnifySuit>
|
|
|
</div>
|
|
</div>
|
|
|
</Popup>
|
|
</Popup>
|
|
|
|
|
|
|
@@ -1082,7 +1082,7 @@
|
|
|
distanceTop="5vh"
|
|
distanceTop="5vh"
|
|
|
>
|
|
>
|
|
|
<div slot="body">
|
|
<div slot="body">
|
|
|
- <PrescriptionSuit></PrescriptionSuit>
|
|
|
|
|
|
|
+ <PrescriptionSuit @turn="onSuitTechTurn"></PrescriptionSuit>
|
|
|
</div>
|
|
</div>
|
|
|
</Popup>
|
|
</Popup>
|
|
|
|
|
|
|
@@ -1178,7 +1178,8 @@ import {
|
|
|
getPreNumber,
|
|
getPreNumber,
|
|
|
getRecipePriview,
|
|
getRecipePriview,
|
|
|
getMaxMinDoaseNumber,
|
|
getMaxMinDoaseNumber,
|
|
|
- getRecipeByBasis
|
|
|
|
|
|
|
+ getRecipeByBasis,
|
|
|
|
|
+ getRecipeBySuitTech
|
|
|
} from "@/api/diagnosis.js";
|
|
} from "@/api/diagnosis.js";
|
|
|
import { numberToUpperCase } from "@/utils/format.js";
|
|
import { numberToUpperCase } from "@/utils/format.js";
|
|
|
import { addRecipeFrom } from "@/api/dataAnalysis.js";
|
|
import { addRecipeFrom } from "@/api/dataAnalysis.js";
|
|
@@ -1261,7 +1262,8 @@ export default {
|
|
|
isTuiDaoZj: false, // 中药制剂是否推导过
|
|
isTuiDaoZj: false, // 中药制剂是否推导过
|
|
|
isTuiDaoZy: false, // 中药处方是否推导过
|
|
isTuiDaoZy: false, // 中药处方是否推导过
|
|
|
raDoseShow: false,
|
|
raDoseShow: false,
|
|
|
- tjRecipeId: "", // 当前选中推荐 方剂的 id
|
|
|
|
|
|
|
+ tjRecipeId: "", // 当前选中推荐 方剂的 id(中药处方/制剂用)
|
|
|
|
|
+ suitTjRecipeId: "", // 适宜技术专用高亮 id(独立于 tjRecipeId,避免跨 tab 串扰)
|
|
|
suitActiveSafety: [], // 适宜技术右侧「安全合理检测」项目(传给 SuitTechSidePanel :safetyItems)
|
|
suitActiveSafety: [], // 适宜技术右侧「安全合理检测」项目(传给 SuitTechSidePanel :safetyItems)
|
|
|
|
|
|
|
|
isMyMade: true, // 是否是自拟处方
|
|
isMyMade: true, // 是否是自拟处方
|
|
@@ -1493,14 +1495,17 @@ export default {
|
|
|
async _processRouteQuery() {
|
|
async _processRouteQuery() {
|
|
|
const query = this.$route.query || {};
|
|
const query = this.$route.query || {};
|
|
|
console.log('query======', sessionStorage.getItem("prescr" + this.getPatiensInfo.pid));
|
|
console.log('query======', sessionStorage.getItem("prescr" + this.getPatiensInfo.pid));
|
|
|
- console.log('query.recipeID && query.kjType === "kj-fj"', query.recipeID, query.kjType === "kj-fj");
|
|
|
|
|
// 暂存处方数据(不含药品)
|
|
// 暂存处方数据(不含药品)
|
|
|
if (sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)) await this._showDataFromStorage(true);
|
|
if (sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)) await this._showDataFromStorage(true);
|
|
|
-
|
|
|
|
|
|
|
+ console.log(query,"query获取的数据")
|
|
|
// 名医名方 —> 方剂查询
|
|
// 名医名方 —> 方剂查询
|
|
|
if (query.recipeID && query.kjType === "kj-fj") await this.getPreDetal(query.recipeID);
|
|
if (query.recipeID && query.kjType === "kj-fj") await this.getPreDetal(query.recipeID);
|
|
|
// 就诊记录转方
|
|
// 就诊记录转方
|
|
|
else if (query.recipeID) await this.getRecipeDataByid(this.$route.query.recipeID);
|
|
else if (query.recipeID) await this.getRecipeDataByid(this.$route.query.recipeID);
|
|
|
|
|
+ // 适宜技术病历转方
|
|
|
|
|
+ else if (query.suitRecordId) await this.suitTechRecordTurn(query.suitRecordId);
|
|
|
|
|
+ // 处方管理 适宜技术转方
|
|
|
|
|
+ // else if (query.suitRecipeId) await this.suitRecipeIdTurn(query.suitRecipeId);
|
|
|
// 名医名方 —> 名医医案
|
|
// 名医名方 —> 名医医案
|
|
|
else if (query.doctorCase) await this.changeAndJoin();
|
|
else if (query.doctorCase) await this.changeAndJoin();
|
|
|
// 中医诊疗 -> 智能辨证
|
|
// 中医诊疗 -> 智能辨证
|
|
@@ -1521,10 +1526,13 @@ export default {
|
|
|
else if (sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)) await this._showDataFromStorage();
|
|
else if (sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)) await this._showDataFromStorage();
|
|
|
// 历史处方
|
|
// 历史处方
|
|
|
else {
|
|
else {
|
|
|
|
|
+ console.log('获取回显数据',11)
|
|
|
// 跟据就诊记录id获取处方号
|
|
// 跟据就诊记录id获取处方号
|
|
|
let res = await getPreNumber({pid: this.getPatiensInfo.pid}).catch(() => void 0);
|
|
let res = await getPreNumber({pid: this.getPatiensInfo.pid}).catch(() => void 0);
|
|
|
|
|
+ console.log('获取回显数据结果', res);
|
|
|
const has = res && res.ResultCode == 0 && res.Data.length > 0;
|
|
const has = res && res.ResultCode == 0 && res.Data.length > 0;
|
|
|
if (has) await this.getRecipeShowData();
|
|
if (has) await this.getRecipeShowData();
|
|
|
|
|
+
|
|
|
else if (this.getEditPreNo()) await this.getRecipeDataByid(this.getEditPreNo());
|
|
else if (this.getEditPreNo()) await this.getRecipeDataByid(this.getEditPreNo());
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -1598,6 +1606,11 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+ // 不管当前在哪个 tab 点推导,适宜技术都自动填入第一个推荐方案内容
|
|
|
|
|
+ // (当前 tab 是适宜技术时已由上方 inferRecipe(2,'7') 内部 fillSuitTechOnInfer 处理,此处补非适宜技术 tab)
|
|
|
|
|
+ if (current.id !== '2' && results['7']) {
|
|
|
|
|
+ this.fillSuitTechOnInfer(results['7']);
|
|
|
|
|
+ }
|
|
|
if (this.getPatiensInfo.pid) await this.getPatiensBasisM();
|
|
if (this.getPatiensInfo.pid) await this.getPatiensBasisM();
|
|
|
}
|
|
}
|
|
|
} catch (_) {}
|
|
} catch (_) {}
|
|
@@ -1635,6 +1648,7 @@ export default {
|
|
|
rRecomendR: this.rRecomendR,
|
|
rRecomendR: this.rRecomendR,
|
|
|
suggestDiag: this.suggestDiag,
|
|
suggestDiag: this.suggestDiag,
|
|
|
suggestDiagAll: this.suggestDiagAll,
|
|
suggestDiagAll: this.suggestDiagAll,
|
|
|
|
|
+ suitTjRecipeId: this.suitTjRecipeId,
|
|
|
child1: {
|
|
child1: {
|
|
|
recipe_tabs: child1.recipe_tabs,
|
|
recipe_tabs: child1.recipe_tabs,
|
|
|
recipe_tabs_c: child1.recipe_tabs_c
|
|
recipe_tabs_c: child1.recipe_tabs_c
|
|
@@ -1673,6 +1687,7 @@ export default {
|
|
|
let storageData = JSON.parse(
|
|
let storageData = JSON.parse(
|
|
|
sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)
|
|
sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)
|
|
|
);
|
|
);
|
|
|
|
|
+ console.log(storageData, "storageData");
|
|
|
let children = this.$children.filter(item => {
|
|
let children = this.$children.filter(item => {
|
|
|
return (
|
|
return (
|
|
|
item.name == "中药处方" ||
|
|
item.name == "中药处方" ||
|
|
@@ -1714,6 +1729,7 @@ export default {
|
|
|
this.rRecomendR = Array.isArray(storageData.rRecomendR) ? storageData.rRecomendR : [];
|
|
this.rRecomendR = Array.isArray(storageData.rRecomendR) ? storageData.rRecomendR : [];
|
|
|
this.suggestDiag = Array.isArray(storageData.suggestDiag) ? storageData.suggestDiag : [];
|
|
this.suggestDiag = Array.isArray(storageData.suggestDiag) ? storageData.suggestDiag : [];
|
|
|
this.suggestDiagAll = Array.isArray(storageData.suggestDiagAll) ? storageData.suggestDiagAll : [];
|
|
this.suggestDiagAll = Array.isArray(storageData.suggestDiagAll) ? storageData.suggestDiagAll : [];
|
|
|
|
|
+ this.suitTjRecipeId = storageData.suitTjRecipeId || "";
|
|
|
// child1.getSelectType("剂型", 0);
|
|
// child1.getSelectType("剂型", 0);
|
|
|
// child1.getSelectType("处方用法");
|
|
// child1.getSelectType("处方用法");
|
|
|
// child1.getSelectType("中药服药时间");
|
|
// child1.getSelectType("中药服药时间");
|
|
@@ -2560,6 +2576,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 获取数据 赋值给 适宜技术处方
|
|
// 获取数据 赋值给 适宜技术处方
|
|
|
assignRecipe3(data, loading) {
|
|
assignRecipe3(data, loading) {
|
|
|
|
|
+ console.log('适宜技术数据', data);
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
const acupointTable = this.$refs.suitScience;
|
|
const acupointTable = this.$refs.suitScience;
|
|
|
if (!acupointTable) {
|
|
if (!acupointTable) {
|
|
@@ -2636,17 +2653,31 @@ export default {
|
|
|
|
|
|
|
|
// 合并所有数据中的treatmentList
|
|
// 合并所有数据中的treatmentList
|
|
|
const mergedTreatmentList = dataArray.reduce((acc, item) => {
|
|
const mergedTreatmentList = dataArray.reduce((acc, item) => {
|
|
|
- if (item.treatmentList && Array.isArray(item.treatmentList)) {
|
|
|
|
|
- acc.push(...item.treatmentList);
|
|
|
|
|
|
|
+ // if ((item.treatmentList || item.detail) && Array.isArray(item.treatmentList || item.detail)) {
|
|
|
|
|
+ // acc.push(...(item.treatmentList || item.detail));
|
|
|
|
|
+ // }
|
|
|
|
|
+ const list = item.treatmentList?.length ? item.treatmentList : item.detail;
|
|
|
|
|
+ if (Array.isArray(list)) {
|
|
|
|
|
+ acc.push(...list);
|
|
|
}
|
|
}
|
|
|
return acc;
|
|
return acc;
|
|
|
}, []);
|
|
}, []);
|
|
|
-
|
|
|
|
|
|
|
+ // [临时诊断] 看治疗项各字段值(嘱托/金额等),定位完删除
|
|
|
|
|
+ console.log('[assignRecipe3诊断] 治疗项0 完整数据:', mergedTreatmentList[0]);
|
|
|
// 使用 loadFromServerData 加载合并后的治疗列表数据
|
|
// 使用 loadFromServerData 加载合并后的治疗列表数据
|
|
|
if (mergedTreatmentList.length > 0) {
|
|
if (mergedTreatmentList.length > 0) {
|
|
|
acupointTable.loadFromServerData(mergedTreatmentList);
|
|
acupointTable.loadFromServerData(mergedTreatmentList);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 嘱托(command)在处方级(technologies[i].command),loadFromServerData 按治疗项取不到,补设到组件
|
|
|
|
|
+ const _prescriptionCommand = techData.command || "";
|
|
|
|
|
+ acupointTable.command = _prescriptionCommand;
|
|
|
|
|
+ if (acupointTable.prescriptionDataMap) {
|
|
|
|
|
+ Object.keys(acupointTable.prescriptionDataMap).forEach(idx => {
|
|
|
|
|
+ acupointTable.prescriptionDataMap[idx].command = _prescriptionCommand;
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
loading.close();
|
|
loading.close();
|
|
|
}, 500);
|
|
}, 500);
|
|
|
},
|
|
},
|
|
@@ -3078,6 +3109,7 @@ export default {
|
|
|
// [原逻辑·保留] AcupointTable 无 recipeId 字段,child.recipeId 为 undefined,
|
|
// [原逻辑·保留] AcupointTable 无 recipeId 字段,child.recipeId 为 undefined,
|
|
|
// 覆盖会清空 inferRecipe 已设的适宜技术默认高亮(pres[0]),故不再覆盖
|
|
// 覆盖会清空 inferRecipe 已设的适宜技术默认高亮(pres[0]),故不再覆盖
|
|
|
// try { this.tjRecipeId = child.recipeId; } catch (e) { this.tjRecipeId = "" }
|
|
// try { this.tjRecipeId = child.recipeId; } catch (e) { this.tjRecipeId = "" }
|
|
|
|
|
+ // 适宜技术高亮由独立变量 suitTjRecipeId 管理(fillSuitTechOnInfer/onSuitRecommendSelect 设置),切tab无需在此处理
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
checked(item1) {
|
|
checked(item1) {
|
|
@@ -3544,6 +3576,7 @@ export default {
|
|
|
spinner: "el-icon-loading",
|
|
spinner: "el-icon-loading",
|
|
|
background: "rgba(0, 0, 0, 0.7)"
|
|
background: "rgba(0, 0, 0, 0.7)"
|
|
|
});
|
|
});
|
|
|
|
|
+ console.log(zhongyao, zhongchengyao, technology, "处方预览数据");
|
|
|
let params = {
|
|
let params = {
|
|
|
recordid: this.getPatiensInfo.pid,
|
|
recordid: this.getPatiensInfo.pid,
|
|
|
technologies: technology,
|
|
technologies: technology,
|
|
@@ -3583,6 +3616,7 @@ export default {
|
|
|
let res = await getRecipeShowData(this.getPatiensInfo.pid).catch(err => {
|
|
let res = await getRecipeShowData(this.getPatiensInfo.pid).catch(err => {
|
|
|
loading.close();
|
|
loading.close();
|
|
|
});
|
|
});
|
|
|
|
|
+ console.log(res, "处方回显数据");
|
|
|
if (res.ResultCode == 0) {
|
|
if (res.ResultCode == 0) {
|
|
|
if (!res.Data.flag) {
|
|
if (!res.Data.flag) {
|
|
|
loading.close();
|
|
loading.close();
|
|
@@ -3593,7 +3627,10 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.contentTabs[0].check = res.Data.zhongyao.length > 0;
|
|
this.contentTabs[0].check = res.Data.zhongyao.length > 0;
|
|
|
this.contentTabs[1].check = res.Data.zhongchengyao.chengDetail !== null;
|
|
this.contentTabs[1].check = res.Data.zhongchengyao.chengDetail !== null;
|
|
|
- this.contentTabs[2].check = res.Data.technology.detail !== null;
|
|
|
|
|
|
|
+ // 适宜技术回显:后端字段由 technology(单数对象) 改为 technologies(复数/数组),兼容旧字段
|
|
|
|
|
+ // const _techRaw = res.Data.technologies != null ? res.Data.technologies : res.Data.technology;
|
|
|
|
|
+ // const techList = Array.isArray(_techRaw) ? _techRaw : (_techRaw ? [_techRaw] : []);
|
|
|
|
|
+ this.contentTabs[2].check = res.Data.technologies.length > 0;
|
|
|
|
|
|
|
|
this.container_i = Math.max(this.contentTabs.findIndex(item => item.check), 0);
|
|
this.container_i = Math.max(this.contentTabs.findIndex(item => item.check), 0);
|
|
|
|
|
|
|
@@ -3612,8 +3649,11 @@ export default {
|
|
|
this._recipeIsPay(res.Data.zhongchengyao.preId, 2);
|
|
this._recipeIsPay(res.Data.zhongchengyao.preId, 2);
|
|
|
}
|
|
}
|
|
|
if (this.contentTabs[2].check) {
|
|
if (this.contentTabs[2].check) {
|
|
|
- this.assignRecipe3(res.Data.technology, loading);
|
|
|
|
|
- this._recipeIsPay(res.Data.technology.preId, 2);
|
|
|
|
|
|
|
+ // 适宜技术支持多条处方,按数组回显(assignRecipe3 内部已兼容数组并合并 treatmentList)
|
|
|
|
|
+ this.assignRecipe3(res.Data.technologies, loading);
|
|
|
|
|
+ res.Data.technologies.forEach((item, index) => {
|
|
|
|
|
+ if (item && item.preId) this._recipeIsPay(item.preId, 2, index);
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
if (this.getPatiensInfo.pid) {
|
|
if (this.getPatiensInfo.pid) {
|
|
|
this.getPatiensBasisM();
|
|
this.getPatiensBasisM();
|
|
@@ -3635,7 +3675,7 @@ export default {
|
|
|
let res = await getRecipeDataByid(params).catch(err => {
|
|
let res = await getRecipeDataByid(params).catch(err => {
|
|
|
loading.close();
|
|
loading.close();
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+console.log(res, "处方回显数据==处方管理",res.Data.type);
|
|
|
if (res.ResultCode == 0) {
|
|
if (res.ResultCode == 0) {
|
|
|
if (res.Data.type == 0) {
|
|
if (res.Data.type == 0) {
|
|
|
res.Data.zhongdetail = res.Data.detail;
|
|
res.Data.zhongdetail = res.Data.detail;
|
|
@@ -3659,11 +3699,80 @@ export default {
|
|
|
this.contentTabs[1].check = false;
|
|
this.contentTabs[1].check = false;
|
|
|
this.contentTabs[2].check = true;
|
|
this.contentTabs[2].check = true;
|
|
|
this.assignRecipe3(res.Data, loading);
|
|
this.assignRecipe3(res.Data, loading);
|
|
|
|
|
+ // 回显的是已保存处方(非推荐方案),清空推荐高亮
|
|
|
|
|
+ this.suitTjRecipeId = "";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
await this._recipeIsPay(id, 1);
|
|
await this._recipeIsPay(id, 1);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ // 适宜技术病历转方回显(getRecipeBySuitTech,入参 recordId=来源就诊记录id)
|
|
|
|
|
+ async suitTechRecordTurn(recordId) {
|
|
|
|
|
+ const loading = this.$loading({
|
|
|
|
|
+ lock: true,
|
|
|
|
|
+ text: '正在处理转方数据',
|
|
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)',
|
|
|
|
|
+ });
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await getRecipeBySuitTech({ recordId });
|
|
|
|
|
+ console.log('适宜技术病历转方回显', res);
|
|
|
|
|
+ if (res.ResultCode === 0 && res.Data) {
|
|
|
|
|
+ console.log('获取数据', res.Data);
|
|
|
|
|
+ this.container_i = 2;
|
|
|
|
|
+ this.contentTabs[0].check = false;
|
|
|
|
|
+ this.contentTabs[1].check = false;
|
|
|
|
|
+ this.contentTabs[2].check = true;
|
|
|
|
|
+ // 转方是主动换方案:清掉切tab缓存,避免 assignRecipe3 开头 restoreCachedData 拦截
|
|
|
|
|
+ if (this.$refs.suitScience) {
|
|
|
|
|
+ this.$refs.suitScience._cachedPrescriptions = null;
|
|
|
|
|
+ this.$refs.suitScience._cachedPrescriptionDataMap = null;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.assignRecipe3(res.Data, loading);
|
|
|
|
|
+ // 病历转方回显(非推荐方案),清空推荐高亮
|
|
|
|
|
+ this.suitTjRecipeId = "";
|
|
|
|
|
+ } else {
|
|
|
|
|
+ loading.close();
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ loading.close();
|
|
|
|
|
+ console.error('适宜技术病历转方失败', e);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 处方管理 适宜技术转方
|
|
|
|
|
+ async suitTechRecipeTurn(preId) {
|
|
|
|
|
+ const loading = this.$loading({
|
|
|
|
|
+ lock: true,
|
|
|
|
|
+ text: '正在处理转方数据',
|
|
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)',
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log('适宜技术处方转方入参', preId);
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await getRecipeBySuitTech({ preId });
|
|
|
|
|
+ console.log('适宜技术处方转方回显', res);
|
|
|
|
|
+ if (res.ResultCode === 0 && res.Data) {
|
|
|
|
|
+ console.log('获取数据', res.Data);
|
|
|
|
|
+ this.container_i = 2;
|
|
|
|
|
+ this.contentTabs[0].check = false;
|
|
|
|
|
+ this.contentTabs[1].check = false;
|
|
|
|
|
+ this.contentTabs[2].check = true;
|
|
|
|
|
+ // 转方是主动换方案:清掉切tab缓存,避免 assignRecipe3 开头 restoreCachedData 拦截
|
|
|
|
|
+ if (this.$refs.suitScience) {
|
|
|
|
|
+ this.$refs.suitScience._cachedPrescriptions = null;
|
|
|
|
|
+ this.$refs.suitScience._cachedPrescriptionDataMap = null;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.assignRecipe3(res.Data, loading);
|
|
|
|
|
+ // 病历转方回显(非推荐方案),清空推荐高亮
|
|
|
|
|
+ this.suitTjRecipeId = "";
|
|
|
|
|
+ } else {
|
|
|
|
|
+ loading.close();
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ loading.close();
|
|
|
|
|
+ console.error('适宜技术处方转方失败', e);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
//获取右侧协定方列表
|
|
//获取右侧协定方列表
|
|
|
async getAgreeRecipe(load = true) {
|
|
async getAgreeRecipe(load = true) {
|
|
|
if (!load) return;
|
|
if (!load) return;
|
|
@@ -3824,7 +3933,7 @@ export default {
|
|
|
loading.close();
|
|
loading.close();
|
|
|
|
|
|
|
|
let arr = [];
|
|
let arr = [];
|
|
|
-
|
|
|
|
|
|
|
+console.log(res.data, "获取的数据");
|
|
|
res.data.expList.forEach(item => {
|
|
res.data.expList.forEach(item => {
|
|
|
item.showType = 1; // 专家经验
|
|
item.showType = 1; // 专家经验
|
|
|
item.book = item.book ? item.book : "(暂无)";
|
|
item.book = item.book ? item.book : "(暂无)";
|
|
@@ -3836,7 +3945,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
// this.inferRecipeId = res.data.schemes[0].preid
|
|
// this.inferRecipeId = res.data.schemes[0].preid
|
|
|
let arr2 = res.data.expList.concat(res.data.schemes[0].pres);
|
|
let arr2 = res.data.expList.concat(res.data.schemes[0].pres);
|
|
|
-
|
|
|
|
|
|
|
+console.log(arr2, "arr2");
|
|
|
if (type == 4) {
|
|
if (type == 4) {
|
|
|
try { this.contentTabs.find(tab => tab.businesstype === businesstype).color = arr2.length > 0 ? "red" : ""; } catch (e) {}
|
|
try { this.contentTabs.find(tab => tab.businesstype === businesstype).color = arr2.length > 0 ? "red" : ""; } catch (e) {}
|
|
|
return;
|
|
return;
|
|
@@ -3862,13 +3971,13 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
this.rRecomendR = arr2;
|
|
this.rRecomendR = arr2;
|
|
|
-
|
|
|
|
|
- // 适宜技术:SuitTechSidePanel 面板只显示 pres(showType==0),默认高亮其第一项
|
|
|
|
|
- // (通用 arr2[0] 可能是专家经验 expList、面板不显示,故适宜技术覆盖为 pres[0])
|
|
|
|
|
- if (this.container_i == 2) {
|
|
|
|
|
|
|
+console.log(this.rRecomendR, "this.rRecomendR");
|
|
|
|
|
+ // 适宜技术:用独立高亮变量 suitTjRecipeId(与中药处方/制剂的 tjRecipeId 解耦),
|
|
|
|
|
+ // 仅推导(type!=3)时默认设第一个;切tab不重置,保留 fillSuitTechOnInfer/onSuitRecommendSelect 已设的值
|
|
|
|
|
+ if (this.container_i == 2 && type !== 3) {
|
|
|
const presList = (res.data.schemes && res.data.schemes[0] && res.data.schemes[0].pres) || [];
|
|
const presList = (res.data.schemes && res.data.schemes[0] && res.data.schemes[0].pres) || [];
|
|
|
if (presList.length > 0) {
|
|
if (presList.length > 0) {
|
|
|
- this.tjRecipeId = presList[0].preid || presList[0].pid || presList[0].acupreid;
|
|
|
|
|
|
|
+ this.suitTjRecipeId = presList[0].preid || presList[0].pid || presList[0].acupreid;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -3926,31 +4035,9 @@ export default {
|
|
|
this.isTuiDaoZy = true;
|
|
this.isTuiDaoZy = true;
|
|
|
}
|
|
}
|
|
|
} else if (this.container_i == 2) {
|
|
} else if (this.container_i == 2) {
|
|
|
- // 仅推导(type=1/2)时拉取推荐方案并填入;切 tab(type=3)不拉接口、不埋点,
|
|
|
|
|
- // 保留用户上次编辑/缓存(AcupointTable 是 v-show 常驻,prescriptions 切 tab 本就不丢)
|
|
|
|
|
if (type !== 3) {
|
|
if (type !== 3) {
|
|
|
- if (arr2.length > 0) {
|
|
|
|
|
- const loading3 = this.$loading({
|
|
|
|
|
- lock: true,
|
|
|
|
|
- text: '正在获取适宜技术处方数据',
|
|
|
|
|
- spinner: 'el-icon-loading',
|
|
|
|
|
- background: 'rgba(0, 0, 0, 0.7)',
|
|
|
|
|
- });
|
|
|
|
|
- try {
|
|
|
|
|
- const recipeRes = await getRecipeByBasis({
|
|
|
|
|
- sourcePid: arr2[0].pid,
|
|
|
|
|
- recordId: this.getPatiensInfo.pid || undefined,
|
|
|
|
|
- sourceType: 'localExpert',
|
|
|
|
|
- });
|
|
|
|
|
- if (recipeRes.ResultCode === 0 && recipeRes.Data) {
|
|
|
|
|
- this.assignRecipe3(recipeRes.Data, loading3);
|
|
|
|
|
- } else {
|
|
|
|
|
- loading3.close();
|
|
|
|
|
- }
|
|
|
|
|
- } catch (e) {
|
|
|
|
|
- loading3.close();
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 适宜技术推导填入第一个方案(逻辑提取到 fillSuitTechOnInfer,tcmClick 非适宜技术tab也复用)
|
|
|
|
|
+ this.fillSuitTechOnInfer(res);
|
|
|
this.addRecipeFrom("4", 2);
|
|
this.addRecipeFrom("4", 2);
|
|
|
}
|
|
}
|
|
|
if (type == 3) {
|
|
if (type == 3) {
|
|
@@ -3977,7 +4064,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 适宜技术 · 协定方转方(详情弹窗「转方」触发)
|
|
// 适宜技术 · 协定方转方(详情弹窗「转方」触发)
|
|
|
- async onSuitTechTurn(pid) {
|
|
|
|
|
|
|
+ async onSuitTechTurn(pid, detail) {
|
|
|
const loading = this.$loading({
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
lock: true,
|
|
|
text: '正在转方',
|
|
text: '正在转方',
|
|
@@ -3991,7 +4078,29 @@ export default {
|
|
|
sourceType: 'accord',
|
|
sourceType: 'accord',
|
|
|
});
|
|
});
|
|
|
if (res.ResultCode === 0 && res.Data) {
|
|
if (res.ResultCode === 0 && res.Data) {
|
|
|
|
|
+ // 协定方转方:如果详情接口返回了病名、证型、治法,覆盖页面上方的诊断信息
|
|
|
|
|
+ if (detail && this.$refs.TCM) {
|
|
|
|
|
+ if (detail.disName || detail.synName || detail.theName) {
|
|
|
|
|
+ this.$refs.TCM.setParams({
|
|
|
|
|
+ namemedicine: detail.disName || '',
|
|
|
|
|
+ disid: detail.disId || '',
|
|
|
|
|
+ symptomid: detail.synId || '',
|
|
|
|
|
+ syndrometypes: detail.synName || '',
|
|
|
|
|
+ treatment: detail.theName || ''
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ // 转方是主动换方案:清掉切tab产生的缓存,避免 assignRecipe3 开头 restoreCachedData 用旧数据拦截
|
|
|
|
|
+ if (this.$refs.suitScience) {
|
|
|
|
|
+ this.$refs.suitScience._cachedPrescriptions = null;
|
|
|
|
|
+ this.$refs.suitScience._cachedPrescriptionDataMap = null;
|
|
|
|
|
+ }
|
|
|
this.assignRecipe3(res.Data, loading);
|
|
this.assignRecipe3(res.Data, loading);
|
|
|
|
|
+ // 协定方转方:内容来自协定方(非推荐方案),清空推荐高亮,避免误高亮之前的推荐
|
|
|
|
|
+ this.suitTjRecipeId = "";
|
|
|
|
|
+ // 转方成功,关闭协定方/医派协定方查询弹窗
|
|
|
|
|
+ this.showSuitPresc = false;
|
|
|
|
|
+ this.showSuitUnifyPresc = false;
|
|
|
} else {
|
|
} else {
|
|
|
loading.close();
|
|
loading.close();
|
|
|
}
|
|
}
|
|
@@ -4022,8 +4131,13 @@ export default {
|
|
|
sourceType: 'localExpert',
|
|
sourceType: 'localExpert',
|
|
|
});
|
|
});
|
|
|
if (recipeRes.ResultCode === 0 && recipeRes.Data) {
|
|
if (recipeRes.ResultCode === 0 && recipeRes.Data) {
|
|
|
|
|
+ // 推荐方案换入是主动换方案:清掉切tab产生的缓存,避免 assignRecipe3 开头 restoreCachedData 用旧数据拦截
|
|
|
|
|
+ if (this.$refs.suitScience) {
|
|
|
|
|
+ this.$refs.suitScience._cachedPrescriptions = null;
|
|
|
|
|
+ this.$refs.suitScience._cachedPrescriptionDataMap = null;
|
|
|
|
|
+ }
|
|
|
this.assignRecipe3(recipeRes.Data, loading);
|
|
this.assignRecipe3(recipeRes.Data, loading);
|
|
|
- this.tjRecipeId = sourcePid;
|
|
|
|
|
|
|
+ this.suitTjRecipeId = sourcePid;
|
|
|
} else {
|
|
} else {
|
|
|
loading.close();
|
|
loading.close();
|
|
|
}
|
|
}
|
|
@@ -4033,6 +4147,45 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.addRecipeFrom("4", 2);
|
|
this.addRecipeFrom("4", 2);
|
|
|
},
|
|
},
|
|
|
|
|
+ // 适宜技术 · 推导后自动填入第一个推荐方案内容(不管当前在哪个 tab)
|
|
|
|
|
+ // 当前 tab 是适宜技术时由 inferRecipe(2,'7') 调用;当前 tab 非适宜技术时由 tcmClick 调用
|
|
|
|
|
+ async fillSuitTechOnInfer(res) {
|
|
|
|
|
+ if (!res || res.code !== 0 || !res.data) return;
|
|
|
|
|
+ const presList = (res.data.schemes && res.data.schemes[0] && res.data.schemes[0].pres) || [];
|
|
|
|
|
+ if (presList.length === 0) return; // 没有推荐方案则不填入
|
|
|
|
|
+ // 默认高亮第一个推荐方案(适宜技术专用高亮变量,立即生效)
|
|
|
|
|
+ this.suitTjRecipeId = presList[0].pid;
|
|
|
|
|
+ const acupointTable = this.$refs.suitScience;
|
|
|
|
|
+ if (!acupointTable) return;
|
|
|
|
|
+ if (acupointTable.isPay || acupointTable.paystate == 1) {
|
|
|
|
|
+ this.$message.error('当前为已付费处方,暂不支持推导');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ const loading = this.$loading({
|
|
|
|
|
+ lock: true,
|
|
|
|
|
+ text: '正在获取适宜技术处方数据',
|
|
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)',
|
|
|
|
|
+ });
|
|
|
|
|
+ try {
|
|
|
|
|
+ const recipeRes = await getRecipeByBasis({
|
|
|
|
|
+ sourcePid: presList[0].pid,
|
|
|
|
|
+ recordId: this.getPatiensInfo.pid || undefined,
|
|
|
|
|
+ sourceType: 'localExpert',
|
|
|
|
|
+ });
|
|
|
|
|
+ if (recipeRes.ResultCode === 0 && recipeRes.Data) {
|
|
|
|
|
+ // 推导是主动换方案:清掉切tab产生的缓存,避免 assignRecipe3 开头 restoreCachedData 用旧数据拦截
|
|
|
|
|
+ acupointTable._cachedPrescriptions = null;
|
|
|
|
|
+ acupointTable._cachedPrescriptionDataMap = null;
|
|
|
|
|
+ this.assignRecipe3(recipeRes.Data, loading);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ loading.close();
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ loading.close();
|
|
|
|
|
+ console.error('适宜技术推导填入失败', e);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
onSuitActiveProjectChange(prescription) {
|
|
onSuitActiveProjectChange(prescription) {
|
|
|
if (!prescription) {
|
|
if (!prescription) {
|
|
|
this.suitActiveSafety = [];
|
|
this.suitActiveSafety = [];
|