@@ -122,7 +122,6 @@
< el-table-column label = "类型" align = "center" prop = "" width = "120" >
< template # default = "scope" >
{ { console . log ( scope . row , 1111 ) } }
< el-radio-group
v-model = "scope.row.therapyEnum"
size = "small"
@@ -270,7 +269,6 @@
< / el -table -column >
< el-table-column label = "频次/用法" align = "center" prop = "" width = "180" >
< template # default = "scope" >
{ { console . log ( scope . row ) } }
< span v-if = "!scope.row.isEdit && scope.row.adviceType == 1" style="text-align: right" >
{{
[
@@ -879,14 +877,12 @@ function handleDiagnosisChange(item) {
function handleFocus ( row , index ) {
rowIndex . value = index ;
row . showPopover = true ;
// el-popover 懒渲染,需要等两帧组件才会挂载
const adviceType = row . adviceType !== undefined ? row . adviceType : adviceQueryParams . value . adviceType ;
// 用 adviceType + categoryCode 组合查找匹配的选项
const selectValue = ( adviceType == 1 && row . categoryCode ) ? '1-' + row . categoryCode : adviceType ;
const selectedItem = adviceTypeList . value . find ( item => item . value === selectValue ) || adviceTypeList . value . find ( item => item . adviceType === adviceType ) ;
// 诊疗(3)和手术(6)没有categoryCode, 传空字符串给refresh, 由子组件转为undefined不发送
// 药品(1)才有categoryCode( 如'1'=中成药,'2'=西药,'4'=中草药)
const categoryCode = selectedItem ? selectedItem . categoryCode : ( adviceQueryParams . value . categoryCode || '' ) ;
// 修复Bug #486: 当行没有显式选择医嘱类型时, 不传categoryCode, 让搜索在全药库中进行
const categoryCode = selectedItem ? selectedItem . categoryCode : ( row . adviceType !== undefined ? ( adviceQueryParams . value . categoryCode || '' ) : '' ) ;
const searchKey = row . adviceName || '' ;
nextTick ( ( ) => {
@@ -923,8 +919,8 @@ function handleChange(value) {
// 用 adviceType + categoryCode 组合查找匹配的选项
const selectValue = ( adviceType == 1 && row ? . categoryCode ) ? '1-' + row . categoryCode : adviceType ;
const selectedItem = adviceTypeList . value . find ( item => item . value === selectValue ) || adviceTypeList . value . find ( item => item . adviceType === adviceType ) ;
// 诊疗/手术的categoryCode为空字符串, 由子组件转为undefined不发送
const categoryCode = selectedItem ? selectedItem . categoryCode : ( adviceQueryParams . value . categoryCode || '' ) ;
// 修复Bug #486: 当行没有显式选择医嘱类型时, 不传categoryCode, 让搜索在全药库中进行
const categoryCode = selectedItem ? selectedItem . categoryCode : ( row ? . adviceType !== undefined ? ( adviceQueryParams. value . categoryCode || '' ) : '' ) ;
tableRef . refresh ( adviceType , categoryCode , value ) ;
}
}
@@ -1214,12 +1210,8 @@ function handleSave() {
getListInfo ( false ) ;
bindMethod . value = { } ;
nextId . value == 1 ;
// 处方保存成功后,自动将医嘱信息同步至患者处置记录
// handleEmrTreatment();
} else {
proxy . $modal . msgError ( res . message ) ;
conso ;
isSaving . value = false ;
}
} )
@@ -1319,22 +1311,26 @@ function handleCancelEdit(row, index) {
function handleSaveSign ( row , index ) {
if ( row . adviceType != 2 ) {
let itemNo = row . adviceType == 1 ? row . methodCode : row . adviceDefinitionId ;
getBindDevice ( { typeCode : row . adviceType , itemNo : itemNo } ) . then ( ( res ) => {
if ( res . data . length == 0 ) {
return ;
}
let openBindDialog = localStorage . getItem ( 'doctor' + userStore . id ) ;
if ( ! JSON . parse ( openBindDialog ) ) {
proxy . $refs [ 'orderBindInfoRef' ] . open ( res . data ) ;
} else {
// 如果弹窗不提示带出的项目,自动带出
// 如果有未签发的项目,并且当前的项目没有带出过绑定项目,则自动带出
if ( ! bindMethod . value [ itemNo ] ) {
handleOrderBindInfo ( res . data ) ;
bindMethod . value [ itemNo ] = true ;
if ( ! itemNo ) {
console . warn ( '绑定设备检查跳过: itemNo为空( adviceType=' + row . adviceType + ', adviceName=' + row . adviceName + ') ' ) ;
} else {
getBindDevice ( { typeCode : row . adviceType , itemNo : itemNo } ) . then ( ( res ) => {
if ( res . data . length == 0 ) {
return ;
}
}
} ) ;
let openBindDialog = localStorage . getItem ( 'doctor' + userStore . id ) ;
if ( ! JSON . parse ( openBindDialog ) ) {
proxy . $refs [ 'orderBindInfoRef' ] . open ( res . data ) ;
} else {
// 如果弹窗不提示带出的项目,自动带出
// 如果有未签发的项目,并且当前的项目没有带出过绑定项目,则自动带出
if ( ! bindMethod . value [ itemNo ] ) {
handleOrderBindInfo ( res . data ) ;
bindMethod . value [ itemNo ] = true ;
}
}
} ) ;
}
}
// 更新UI状态