|
|
|
@ -2,14 +2,36 @@ |
|
|
|
<div> |
|
|
|
<!--组件--> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div |
|
|
|
:style="`position: absolute; top: 0px; left: ${Math.floor((window.pageWidth - 120) / 2) - 110}px; display: flex;z-index: 3;`"> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '新增综述')"> |
|
|
|
<el-button style="height: 28px;" class="commonbutton" @click="addSummary" |
|
|
|
:disabled="sumBtnDisabled('addSummary')">新增综述</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="width:50%;"> |
|
|
|
<el-table id="tableSummary" row-key="id" :data="sumDoctorCheck.summaryList" width="100%" :height="sumHeight" |
|
|
|
border size="small"> |
|
|
|
<el-table-column type="index" width="30" align="center" /> |
|
|
|
<el-table-column prop="summaryTitle" label="综述"> |
|
|
|
<template slot="header"> |
|
|
|
<div style="display: flex;justify-content:space-between;"> |
|
|
|
<div>综述</div> |
|
|
|
<div></div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
<el-input v-model="scope.row.summaryTitle" placeholder="请输入综述" disabled></el-input> |
|
|
|
<div style="display: flex;"> |
|
|
|
<el-input v-model="scope.row.summaryTitle" placeholder="请输入综述" :ref="scope.row.id" :id="scope.row.id" |
|
|
|
:disabled="sumBtnDisabled('addSummary')"></el-input> |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '新增综述明细')" icon="el-icon-plus" |
|
|
|
style="min-width:21px;height:21px;padding:2px;" @click="addSum(scope.$index)" |
|
|
|
:disabled="sumBtnDisabled('addSummary')"></el-button> |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '删除综述')" type="danger" icon="el-icon-delete" |
|
|
|
style="margin-left: 2px;min-width:21px;height:21px;padding:2px;" @click="delSumHead(scope.$index)" |
|
|
|
:disabled="sumBtnDisabled('addSummary')"></el-button> |
|
|
|
</div> |
|
|
|
<el-table :id="scope.row.id" :row-key="scope.$index + scope.row.id" style="margin-left: 10px;" |
|
|
|
:data="scope.row.details" border @row-click="rowClick" :show-header="false"> |
|
|
|
<el-table-column width="30"> |
|
|
|
@ -19,10 +41,16 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="summaryContent" label="综述" min-width="200"> |
|
|
|
<template slot-scope="scope2"> |
|
|
|
<!--:autosize="{ minRows: 1, maxRows: 20 } "--> |
|
|
|
<el-input type="textarea" v-model="scope2.row.summaryContent" placeholder="请输入综述" disabled |
|
|
|
<div style="display: flex;"> |
|
|
|
<el-input type="textarea" v-model="scope2.row.summaryContent" placeholder="请输入综述" |
|
|
|
:disabled="sumBtnDisabled('addSummary')" :id="scope2.row.id" :ref="scope2.row.id" |
|
|
|
:autosize="{ minRows: 1, maxRows: 20 }"> |
|
|
|
</el-input> |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '删除综述明细')" type="danger" icon="el-icon-delete" |
|
|
|
style="margin-left: 2px;min-width:21px;height:21px;padding:2px;" |
|
|
|
@click="delSug(scope.row.details, scope2.$index)" |
|
|
|
:disabled="sumBtnDisabled('addSummary')"></el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="8" /> |
|
|
|
@ -268,7 +296,7 @@ export default { |
|
|
|
diagnosisesFilter: [], // 可选的诊断 |
|
|
|
choosedDiagnosisIds: [], // 已选的诊断 id 集合 |
|
|
|
disabledDiagnosisIds: [], // 不可选的诊断 id 集合 |
|
|
|
diagnosisesChoosed:[], // 已选的诊断集合 |
|
|
|
diagnosisesChoosed: [], // 已选的诊断集合 |
|
|
|
|
|
|
|
collapse: false, // 折叠/展开全部建议 |
|
|
|
|
|
|
|
@ -286,6 +314,7 @@ export default { |
|
|
|
colName: '', // |
|
|
|
subIndex: -1, |
|
|
|
}, |
|
|
|
summary_check_default_summay_modifiable: 'N', |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
@ -299,11 +328,11 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
mounted() { |
|
|
|
async mounted() { |
|
|
|
// this.rowDrop(); (综述取消拖拽) |
|
|
|
this.rowDropSuggestion(); |
|
|
|
|
|
|
|
this.dictInit() |
|
|
|
await this.dictInit() |
|
|
|
// document.addEventListener('DOMContentLoaded', function () { |
|
|
|
// const textarea = document.querySelector('textarea'); |
|
|
|
// textarea.addEventListener('input', function () { |
|
|
|
@ -336,7 +365,7 @@ export default { |
|
|
|
// }); |
|
|
|
// }, |
|
|
|
// 获取诊断数据 |
|
|
|
dictInit() { |
|
|
|
async dictInit() { |
|
|
|
|
|
|
|
// 获取诊断 /api/app/diagnosis/getlistinsuggestion , {} |
|
|
|
postapi('/api/app/Diagnosis/GetSimpleDiagnosisWithSuggestions').then(res => { |
|
|
|
@ -351,6 +380,35 @@ export default { |
|
|
|
this.symbols = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
let sysParmId = "summary_check_default_summay_modifiable" |
|
|
|
try { |
|
|
|
let sysParm = await postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId }) |
|
|
|
this.summary_check_default_summay_modifiable = sysParm.data.toUpperCase() |
|
|
|
// console.log('dictInit this.summary_check_default_summay_modifiable',this.summary_check_default_summay_modifiable,sysParm.data.toUpperCase()) |
|
|
|
} catch (error) { |
|
|
|
console.log('获取参数 summary_check_default_summay_modifiable 失败', error) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 增加综述 |
|
|
|
addSummary() { |
|
|
|
let id = String(new Date().getTime()) |
|
|
|
let pojo = { |
|
|
|
id, |
|
|
|
patientRegisterId: this.dataTransOpts.tableS.patient_register.id, |
|
|
|
summaryTitle: '', |
|
|
|
details: [{ |
|
|
|
id: 'detail' + id, |
|
|
|
summaryContent: '', |
|
|
|
}] |
|
|
|
} |
|
|
|
|
|
|
|
this.sumDoctorCheck.summaryList.push(pojo); |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs[id].focus(); |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
//增加建议 |
|
|
|
@ -424,10 +482,10 @@ export default { |
|
|
|
this.diagnosisesChoosed = [] |
|
|
|
|
|
|
|
this.diagnosises.forEach(e => { |
|
|
|
if(this.disabledDiagnosisIds.indexOf(e.id) == -1){ |
|
|
|
if(this.choosedDiagnosisIds.indexOf(e.id) == -1){ |
|
|
|
if(this.diagnosisesFilter.length < 20) this.diagnosisesFilter.push(e) |
|
|
|
}else{ |
|
|
|
if (this.disabledDiagnosisIds.indexOf(e.id) == -1) { |
|
|
|
if (this.choosedDiagnosisIds.indexOf(e.id) == -1) { |
|
|
|
if (this.diagnosisesFilter.length < 20) this.diagnosisesFilter.push(e) |
|
|
|
} else { |
|
|
|
this.diagnosisesChoosed.push(e) |
|
|
|
} |
|
|
|
} |
|
|
|
@ -441,10 +499,10 @@ export default { |
|
|
|
if (keyWords) { |
|
|
|
let diagnosisesFilter = [] |
|
|
|
this.diagnosises.forEach(e => { |
|
|
|
if(this.disabledDiagnosisIds.indexOf(e.id) == -1){ |
|
|
|
if(this.choosedDiagnosisIds.indexOf(e.id) == -1){ |
|
|
|
if(e.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 || e.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1){ |
|
|
|
if(diagnosisesFilter.length < 20) diagnosisesFilter.push(e) |
|
|
|
if (this.disabledDiagnosisIds.indexOf(e.id) == -1) { |
|
|
|
if (this.choosedDiagnosisIds.indexOf(e.id) == -1) { |
|
|
|
if (e.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 || e.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1) { |
|
|
|
if (diagnosisesFilter.length < 20) diagnosisesFilter.push(e) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -596,7 +654,20 @@ export default { |
|
|
|
// '人员已锁定,不可执行此操作' |
|
|
|
if (patientRegister.isLock && patientRegister.isLock == 'Y') return ret |
|
|
|
|
|
|
|
if (btnType && btnType == 'collapse') ret = false |
|
|
|
// console.log('btnType', btnType, this.summary_check_default_summay_modifiable) |
|
|
|
|
|
|
|
switch (btnType) { |
|
|
|
case 'collapse': |
|
|
|
return false; |
|
|
|
case 'addSummary': |
|
|
|
if (patientRegister.completeFlag && patientRegister.completeFlag != '3' && this.summary_check_default_summay_modifiable == 'Y') { |
|
|
|
return false; |
|
|
|
} else { |
|
|
|
return true; |
|
|
|
} |
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
if (patientRegister.completeFlag && patientRegister.completeFlag != '3') ret = false |
|
|
|
|
|
|
|
@ -689,6 +760,19 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 新增综述明细 |
|
|
|
addSum(index) { |
|
|
|
let id = String(new Date().getTime()) |
|
|
|
this.sumDoctorCheck.summaryList[index]['details'].push({ |
|
|
|
id, |
|
|
|
summaryContent: '', |
|
|
|
}) |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs[id].focus(); |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//增加建议明细 |
|
|
|
addSug(index, contentType) { |
|
|
|
this.suggestionCurRow = index |
|
|
|
@ -716,6 +800,24 @@ export default { |
|
|
|
console.log('this.sumDoctorCheck.suggestionList', index, this.sumDoctorCheck.suggestionList) |
|
|
|
}, |
|
|
|
|
|
|
|
//删除建议头及明细 |
|
|
|
delSumHead(index) { |
|
|
|
this.$confirm("此操作将删除该记录, 是否继续?", "提示", { |
|
|
|
confirmButtonText: "是", |
|
|
|
cancelButtonText: "否", |
|
|
|
type: "warning", |
|
|
|
}).then(() => { |
|
|
|
//删除建议 |
|
|
|
this.sumDoctorCheck.summaryList.splice(index, 1) |
|
|
|
}).catch((err) => { |
|
|
|
if (err == 'cancel') { |
|
|
|
console.log(`已取消 ${err}`) |
|
|
|
} else { |
|
|
|
this.$message.error(`操作失败 ${err}`) |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//删除建议头及明细 |
|
|
|
delSugHead(index) { |
|
|
|
this.$confirm("此操作将删除该记录, 是否继续?", "提示", { |
|
|
|
@ -734,7 +836,9 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//删除建议明细 |
|
|
|
|
|
|
|
|
|
|
|
//删除/综述建议明细 |
|
|
|
delSug(details, indexD) { |
|
|
|
this.$confirm("此操作将删除该记录, 是否继续?", "提示", { |
|
|
|
confirmButtonText: "是", |
|
|
|
@ -750,8 +854,8 @@ export default { |
|
|
|
this.$message.error(`操作失败 ${err}`) |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//选择组合项目 |
|
|
|
rowClick(row) { |
|
|
|
console.log('rowClick row', row) |
|
|
|
|