|
|
@@ -3457,7 +3457,8 @@ export default {
|
|
|
matID: id,
|
|
|
matIds: [...ids.slice(0, i), ...ids.slice(i + 1)],
|
|
|
orgId: this.getuserinfo.organizationid,
|
|
|
- }).then(res => res.code === 0 ? Object.assign({matid: id}, res.data) : null).catch(err => null)
|
|
|
+ }).then(res => res.code === 0 ? Object.assign({medid: id}, res.data) : null).catch(err => null);
|
|
|
+ const get = (medid) => child.recipe_tabs[index].totalTableD.find(item => item.medid === medid);
|
|
|
|
|
|
const rationalMed = await Promise.all(gather.map(request)).then(data => data.filter(Boolean));
|
|
|
return rationalMed.reduce((data, item) => {
|
|
|
@@ -3540,12 +3541,17 @@ export default {
|
|
|
</div>`);
|
|
|
}
|
|
|
if (item.matmindosage && item.matmaxdosage) {
|
|
|
- const ref = {}, i = 10;
|
|
|
- const child = data[i] || (data[i] = {title: '超剂量药品', collection: []});
|
|
|
- child.collection.push(`<div>
|
|
|
- <span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
- <span class="met-value" style="color: red;">(${item.matmindosage}-${item.matmaxdosage})</span>
|
|
|
- </div>`);
|
|
|
+ try {
|
|
|
+ const dose = CC_Dosage2Basis(get(item.medid));
|
|
|
+ if (dose < item.matmindosage || dose > item.matmaxdosage) {
|
|
|
+ const ref = {}, i = 10;
|
|
|
+ const child = data[i] || (data[i] = {title: '超剂量药品', collection: []});
|
|
|
+ child.collection.push(`<div>
|
|
|
+ <span class="met-name" style="color: ${color};">${item.matname}</span>
|
|
|
+ <span class="met-value" style="color: red;">(${item.matmindosage}-${item.matmaxdosage})</span>
|
|
|
+ </div>`);
|
|
|
+ }
|
|
|
+ } catch (e) {}
|
|
|
}
|
|
|
return data;
|
|
|
}, {title: `中药处方${index + 1}`});
|