|
@@ -2635,7 +2635,9 @@ export default {
|
|
|
try {
|
|
try {
|
|
|
const {options, force} = await this.getRationalSafeUse();
|
|
const {options, force} = await this.getRationalSafeUse();
|
|
|
if (options.length) {
|
|
if (options.length) {
|
|
|
- const results = await Promise.all(child.recipe_tabs.map((_, index) => this.getRationalMed2(index)));
|
|
|
|
|
|
|
+ const results = await Promise.all(child.recipe_tabs.map((_, index) => this.getRationalMed2(index, (drugid, type) => {
|
|
|
|
|
+ if (force && options.includes(type.toString())) try { zhongPrescriptionVo[index].zhongdetail.find(item => item.drugid === drugid).sign = this.getuserinfo.username; } catch (_) { }
|
|
|
|
|
+ })));
|
|
|
const tips = results.map((item, index) => {
|
|
const tips = results.map((item, index) => {
|
|
|
const value = options.map(i => item[i] ? `<div class="title">${item[i].title}</div><div class="content">${item[i].collection.join('')}</div>` : '').join('');
|
|
const value = options.map(i => item[i] ? `<div class="title">${item[i].title}</div><div class="content">${item[i].collection.join('')}</div>` : '').join('');
|
|
|
return value ? `<div style="padding-top: ${index ? 12 : 0}px;border-bottom: 1px dashed #dcdcdc;"><h2 style="margin-bottom: 16px;">${item.title}</h2>${value}</div>` : '';
|
|
return value ? `<div style="padding-top: ${index ? 12 : 0}px;border-bottom: 1px dashed #dcdcdc;"><h2 style="margin-bottom: 16px;">${item.title}</h2>${value}</div>` : '';
|
|
@@ -3448,7 +3450,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 获取右侧合理用药信息展示
|
|
// 获取右侧合理用药信息展示
|
|
|
- async getRationalMed2(index) {
|
|
|
|
|
|
|
+ async getRationalMed2(index, cb) {
|
|
|
|
|
+ if (typeof cb !== 'function') cb = () => void 0;
|
|
|
const child = this.$children.find(item => item.name === "中药处方");
|
|
const child = this.$children.find(item => item.name === "中药处方");
|
|
|
if (index == null) index = child.recipe_tabs_c;
|
|
if (index == null) index = child.recipe_tabs_c;
|
|
|
const gather = child.recipe_tabs[index].totalTableD.filter(item => item.name && item.medid).map(item => item.medid);
|
|
const gather = child.recipe_tabs[index].totalTableD.filter(item => item.name && item.medid).map(item => item.medid);
|
|
@@ -3471,6 +3474,7 @@ export default {
|
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
<span class="met-value">${ref[item.matdosage]}</span>
|
|
<span class="met-value">${ref[item.matdosage]}</span>
|
|
|
</div>`);
|
|
</div>`);
|
|
|
|
|
+ cb(item.medid, i);
|
|
|
}
|
|
}
|
|
|
if (item.matsjj) {
|
|
if (item.matsjj) {
|
|
|
const ref = {1: '慎用', 2: '忌用', 3: '禁用'}, i = 2;
|
|
const ref = {1: '慎用', 2: '忌用', 3: '禁用'}, i = 2;
|
|
@@ -3479,6 +3483,7 @@ export default {
|
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
<span class="met-value">${ref[item.matsjj]}</span>
|
|
<span class="met-value">${ref[item.matsjj]}</span>
|
|
|
</div>`);
|
|
</div>`);
|
|
|
|
|
+ cb(item.medid, i);
|
|
|
}
|
|
}
|
|
|
if (item.matyfsjj) {
|
|
if (item.matyfsjj) {
|
|
|
const color = item.matyfsjj === '3' ? 'red' : 'blue';
|
|
const color = item.matyfsjj === '3' ? 'red' : 'blue';
|
|
@@ -3488,6 +3493,7 @@ export default {
|
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
<span class="met-value">${ref[item.matyfsjj]}</span>
|
|
<span class="met-value">${ref[item.matyfsjj]}</span>
|
|
|
</div>`);
|
|
</div>`);
|
|
|
|
|
+ cb(item.medid, i);
|
|
|
}
|
|
}
|
|
|
if (item.matysjj) {
|
|
if (item.matysjj) {
|
|
|
const ref = {}, i = 4;
|
|
const ref = {}, i = 4;
|
|
@@ -3496,6 +3502,7 @@ export default {
|
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
<span class="met-value">${item.matysjj || '无'}</span>
|
|
<span class="met-value">${item.matysjj || '无'}</span>
|
|
|
</div>`);
|
|
</div>`);
|
|
|
|
|
+ cb(item.medid, i);
|
|
|
}
|
|
}
|
|
|
if (item.matdxsm) {
|
|
if (item.matdxsm) {
|
|
|
const color = 'red';
|
|
const color = 'red';
|
|
@@ -3505,6 +3512,7 @@ export default {
|
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
<span class="met-value">${item.matdxsm || '无'}</span>
|
|
<span class="met-value">${item.matdxsm || '无'}</span>
|
|
|
</div>`);
|
|
</div>`);
|
|
|
|
|
+ cb(item.medid, i);
|
|
|
}
|
|
}
|
|
|
if (item.matbzjj) {
|
|
if (item.matbzjj) {
|
|
|
const ref = {}, i = 6;
|
|
const ref = {}, i = 6;
|
|
@@ -3513,6 +3521,7 @@ export default {
|
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
<span class="met-value">${item.matbzjj || '无'}</span>
|
|
<span class="met-value">${item.matbzjj || '无'}</span>
|
|
|
</div>`);
|
|
</div>`);
|
|
|
|
|
+ cb(item.medid, i);
|
|
|
}
|
|
}
|
|
|
if (item.matsbf) {
|
|
if (item.matsbf) {
|
|
|
const color = 'red';
|
|
const color = 'red';
|
|
@@ -3522,6 +3531,7 @@ export default {
|
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
<span class="met-value">反${item.matsbf}</span>
|
|
<span class="met-value">反${item.matsbf}</span>
|
|
|
</div>`);
|
|
</div>`);
|
|
|
|
|
+ cb(item.medid, i);
|
|
|
}
|
|
}
|
|
|
if (item.matsjw) {
|
|
if (item.matsjw) {
|
|
|
const color = 'red';
|
|
const color = 'red';
|
|
@@ -3531,6 +3541,7 @@ export default {
|
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
<span class="met-value">畏${item.matsjw}</span>
|
|
<span class="met-value">畏${item.matsjw}</span>
|
|
|
</div>`);
|
|
</div>`);
|
|
|
|
|
+ cb(item.medid, i);
|
|
|
}
|
|
}
|
|
|
if (item.matby) {
|
|
if (item.matby) {
|
|
|
const ref = {}, i = 9;
|
|
const ref = {}, i = 9;
|
|
@@ -3539,6 +3550,7 @@ export default {
|
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
<span class="met-value">不宜与${item.matby}同用</span>
|
|
<span class="met-value">不宜与${item.matby}同用</span>
|
|
|
</div>`);
|
|
</div>`);
|
|
|
|
|
+ cb(item.medid, i);
|
|
|
}
|
|
}
|
|
|
if (item.matmindosage && item.matmaxdosage) {
|
|
if (item.matmindosage && item.matmaxdosage) {
|
|
|
try {
|
|
try {
|
|
@@ -3550,6 +3562,7 @@ export default {
|
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
<span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
<span class="met-value" style="color: red;">(${item.matmindosage}-${item.matmaxdosage})</span>
|
|
<span class="met-value" style="color: red;">(${item.matmindosage}-${item.matmaxdosage})</span>
|
|
|
</div>`);
|
|
</div>`);
|
|
|
|
|
+ cb(item.medid, i);
|
|
|
}
|
|
}
|
|
|
} catch (e) {}
|
|
} catch (e) {}
|
|
|
}
|
|
}
|