|
@@ -3,7 +3,6 @@ const {get, post, config, getUrlArgObject, openNewWin, titleConfig} = require('.
|
|
|
const targetUrl = '/lantone/index';
|
|
|
let treatUrl = targetUrl;
|
|
|
$(function () {
|
|
|
- $(".recipe").hide();
|
|
|
let mrId = getUrlArgObject('mrId')
|
|
|
$(".knowledge .a-link").click(function () {
|
|
|
const code = $(this).attr("code");
|
|
@@ -14,7 +13,6 @@ $(function () {
|
|
|
function renderConfig(config) {
|
|
|
const classMap = {
|
|
|
'conditionder': 'go-push',
|
|
|
- 'treatment': 'recipe',
|
|
|
'tcmknowledge': 'knowledge',
|
|
|
};
|
|
|
config.map((it) => {
|
|
@@ -27,13 +25,11 @@ function renderConfig(config) {
|
|
|
function getTcmMr(mrId, config) {
|
|
|
renderConfig(config.planDetails || []);
|
|
|
if (!mrId) { //没有mrId时不显示推送模块
|
|
|
- $(".recipe").hide();
|
|
|
$("#goPush").on("click", function () {
|
|
|
openNewWin(window.encodeURI(targetUrl + '?page=bztd&jibing='), true);
|
|
|
});
|
|
|
}else{
|
|
|
post('/sys/mr/getTcmMr', { mrId: mrId }).then((res) => {
|
|
|
- //console.log(res)
|
|
|
let data = res.data.data || {}
|
|
|
const { tcmdisease, tcmsyndrome } = data;
|
|
|
if (res.data.code === '0') {
|
|
@@ -43,7 +39,6 @@ function getTcmMr(mrId, config) {
|
|
|
});
|
|
|
getTcmData({ tcmDiag: diag, tcmSyndrome: (tcmsyndrome || {}).uniqueName }, config)
|
|
|
} else {
|
|
|
-
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -56,22 +51,13 @@ function getTcmData(param, config) {
|
|
|
const isHor = window.location.pathname.indexOf("cdssHorizontal") > -1;
|
|
|
const num = isHor ? 3 : ((item[0] || {}).number || 3);
|
|
|
const {tcmDiag, tcmSyndrome} = param;
|
|
|
- if (!tcmDiag) { //没有推送入参时不显示推送模块
|
|
|
- $(".recipe").hide();
|
|
|
- return;
|
|
|
- }
|
|
|
$("#jibing").text(tcmDiag + "-" + tcmSyndrome);
|
|
|
$('#bingming').text(tcmDiag);
|
|
|
$('#zhenghou').text(tcmSyndrome);
|
|
|
treatUrl = targetUrl + '?jibing=' + tcmDiag + "&zhengxing=" + tcmSyndrome;
|
|
|
//处方推荐
|
|
|
get(window.encodeURI('/lantone/private/zycftj?jibing=' + tcmDiag + "&zhengxing=" + tcmSyndrome)).then((res) => {
|
|
|
- console.log("窗口地址:", treatUrl)
|
|
|
let data = res.data.data || []
|
|
|
- if (!data.length) { //没有处方时不显示推送模块
|
|
|
- $(".recipe").hide();
|
|
|
- return;
|
|
|
- }
|
|
|
if (res.data.status) {
|
|
|
renderTcm(data, num)
|
|
|
$(".recipe").show();
|