|
|
|
@ -1,9 +1,9 @@ |
|
|
|
<template> |
|
|
|
<div style="display: flex;"> |
|
|
|
<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="20" align="center"/> |
|
|
|
<el-table id="tableSummary" row-key="id" :data="sumDoctorCheck.summaryList" width="100%" :height="sumHeight" border |
|
|
|
size="small"> |
|
|
|
<el-table-column type="index" width="20" align="center" /> |
|
|
|
<el-table-column prop="summaryTitle" label="综述"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
@ -12,13 +12,14 @@ |
|
|
|
:data="scope.row.details" border @row-click="rowClick" :show-header="false"> |
|
|
|
<el-table-column width="30"> |
|
|
|
<template slot-scope="scope2"> |
|
|
|
<div>{{ scope2.$index + 1 }}).</div> |
|
|
|
<div>{{ scope2.$index + 1 }})</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="summaryContent" label="综述" min-width="200"> |
|
|
|
<template slot-scope="scope2"> |
|
|
|
<el-input type="textarea" v-model="scope2.row.summaryContent" placeholder="请输入综述" |
|
|
|
disabled :autosize="{ minRows: 1, maxRows: 100 }"> |
|
|
|
<!--:autosize="{ minRows: 1, maxRows: 20 } "--> |
|
|
|
<el-input type="textarea" v-model="scope2.row.summaryContent" placeholder="请输入综述" disabled |
|
|
|
:autosize="{ minRows: 1, maxRows: 20 }"> |
|
|
|
</el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -30,8 +31,8 @@ |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div style="width:50%;"> |
|
|
|
<el-table id="tableSuggestion" row-key="id" :data="sumDoctorCheck.suggestionList" width="100%" |
|
|
|
:height="sumHeight" border size="small"> |
|
|
|
<el-table id="tableSuggestion" row-key="id" :data="sumDoctorCheck.suggestionList" width="100%" :height="sumHeight" |
|
|
|
border size="small"> |
|
|
|
<el-table-column type="index" width="20" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="suggestionTitle" label="建议"> |
|
|
|
@ -42,35 +43,38 @@ |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'"> |
|
|
|
</el-input> |
|
|
|
|
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs,'新增建议明细')" type="success" icon="el-icon-plus" style="min-width:23px;height:23px;padding:2px;" @click="addSug(scope.$index)" |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '新增建议明细')" type="success" icon="el-icon-plus" |
|
|
|
style="min-width:23px;height:23px;padding:2px;" @click="addSug(scope.$index)" |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'"></el-button> |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs,'删除建议')" type="danger" icon="el-icon-delete" style="margin-left: 2px;min-width:23px;height:23px;padding:2px;" @click="delSugHead(scope.$index)" |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '删除建议')" type="danger" icon="el-icon-delete" |
|
|
|
style="margin-left: 2px;min-width:23px;height:23px;padding:2px;" @click="delSugHead(scope.$index)" |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'"></el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<el-table :id="'sug' + scope.row.id" row-key="displayOrder" style="margin-left: 10px;" |
|
|
|
:data="scope.row.details" border @row-click="rowClickSug" :show-header="false" |
|
|
|
> |
|
|
|
:data="scope.row.details" border @row-click="rowClickSug" :show-header="false"> |
|
|
|
<el-table-column width="30"> |
|
|
|
<template slot-scope="scope2"> |
|
|
|
<div>{{ scope2.$index + 1 }}).</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="suggestionContent" label="建议" min-width="200"> |
|
|
|
<template slot-scope="scope2"> |
|
|
|
<template slot-scope="scope2"> |
|
|
|
<el-input type="textarea" v-model="scope2.row.suggestionContent" placeholder="请输入建议内容" |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'" |
|
|
|
:autosize="{ minRows: 1, maxRows: 100 }" > |
|
|
|
</el-input> |
|
|
|
:autosize="{ minRows: 1, maxRows: 10 }"> |
|
|
|
</el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="suggestionContent" label="操作" width="35"> |
|
|
|
<template slot-scope="scope2"> |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs,'删除建议明细')" type="danger" style="min-width:23px;height:23px;padding:2px;" icon="el-icon-delete" @click="delSug(scope.row.details, scope2.$index)" |
|
|
|
<template slot-scope="scope2"> |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '删除建议明细')" type="danger" |
|
|
|
style="min-width:23px;height:23px;padding:2px;" icon="el-icon-delete" |
|
|
|
@click="delSug(scope.row.details, scope2.$index)" |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'" |
|
|
|
size="small"></el-button> |
|
|
|
size="small"></el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -83,25 +87,25 @@ |
|
|
|
import { mapState } from 'vuex'; |
|
|
|
import Sortable from "sortablejs"; |
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import { getPagePriv,checkPagePriv,deepCopy,arrayExistObj } from '../../utlis/proFunc'; |
|
|
|
import { getPagePriv, checkPagePriv, deepCopy, arrayExistObj } from '../../utlis/proFunc'; |
|
|
|
export default { |
|
|
|
components: {}, |
|
|
|
props:["patientRegisterId","curGetFocusSuggestionId"], |
|
|
|
props: ["patientRegisterId", "curGetFocusSuggestionId"], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
pagePriv:{ |
|
|
|
routeUrlorPageName:'sumDoctorCheck', //当前页面归属路由或归属页面权限名称 |
|
|
|
privs:[] // 页面权限 |
|
|
|
}, |
|
|
|
pagePriv: { |
|
|
|
routeUrlorPageName: 'sumDoctorCheck', //当前页面归属路由或归属页面权限名称 |
|
|
|
privs: [] // 页面权限 |
|
|
|
}, |
|
|
|
sumDetails: [], |
|
|
|
sugDetails: [], |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
created() { |
|
|
|
created() { |
|
|
|
//获取用户当前页面的权限 |
|
|
|
let userPriv = window.sessionStorage.getItem('userPriv') |
|
|
|
if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName)) |
|
|
|
if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName)) |
|
|
|
}, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
@ -109,24 +113,44 @@ export default { |
|
|
|
this.rowDrop(); |
|
|
|
this.rowDropSuggestion(); |
|
|
|
|
|
|
|
// document.addEventListener('DOMContentLoaded', function () { |
|
|
|
// const textarea = document.querySelector('textarea'); |
|
|
|
// textarea.addEventListener('input', function () { |
|
|
|
// // 当文本域内容变化时调整大小 |
|
|
|
// console.log('textarea.addEventListener',textarea.style.height) |
|
|
|
// textarea.style.height = 'auto'; // 重置高度 |
|
|
|
// // textarea.style.height = textarea.scrollHeight + 'px'; // 根据滚动高度调整高度 |
|
|
|
// }); |
|
|
|
// }); |
|
|
|
|
|
|
|
this.summaryList(this.dataTransOpts.tableS.patient_register.id) |
|
|
|
this.suggestionList(this.dataTransOpts.tableS.patient_register.id) |
|
|
|
this.suggestionList(this.dataTransOpts.tableS.patient_register.id) |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
...mapState(['window', 'dict','dataTransOpts', 'doctorCheck', 'sumDoctorCheck']), |
|
|
|
...mapState(['window', 'dict', 'dataTransOpts', 'doctorCheck', 'sumDoctorCheck']), |
|
|
|
|
|
|
|
sumHeight(){ |
|
|
|
let tempHeight = this.window.pageHeight < 600 ? 600:this.window.pageHeight |
|
|
|
sumHeight() { |
|
|
|
let tempHeight = this.window.pageHeight < 600 ? 600 : this.window.pageHeight |
|
|
|
return tempHeight - 335 |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
checkPagePriv, |
|
|
|
checkPagePriv, |
|
|
|
|
|
|
|
// textareaResize() { |
|
|
|
// const textarea = document.querySelectorAll('textarea'); |
|
|
|
// textarea.forEach(e => { |
|
|
|
// e.style.height = 'auto'; // 重置高度 |
|
|
|
// }); |
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取综述 |
|
|
|
summaryList(RegisterId) { |
|
|
|
if(!RegisterId){ |
|
|
|
if (!RegisterId) { |
|
|
|
this.sumDoctorCheck.summaryList = []; |
|
|
|
return |
|
|
|
} |
|
|
|
@ -150,8 +174,22 @@ export default { |
|
|
|
getapi(`/api/app/sumsummaryheader/getsumsummarylist?PatientRegisterId=${RegisterId}`) |
|
|
|
.then((res) => { |
|
|
|
console.log("summaryList", res.data); |
|
|
|
if (res.code != -1) { |
|
|
|
this.sumDoctorCheck.summaryList = res.data; |
|
|
|
if (res.code > -1) { |
|
|
|
let summaryList = [] |
|
|
|
res.data.forEach(e => { |
|
|
|
let details = [] |
|
|
|
e.details.forEach(e2 => { |
|
|
|
details.push({ summaryContent: ' ' }) |
|
|
|
}); |
|
|
|
summaryList.push({ id: e.id, summaryTitle: ' ', details }) |
|
|
|
}); |
|
|
|
this.sumDoctorCheck.summaryList = deepCopy(summaryList) |
|
|
|
// 自动高度有问题,需要这样处理一下 |
|
|
|
setTimeout(() => { |
|
|
|
this.sumDoctorCheck.summaryList = deepCopy(res.data); |
|
|
|
}, 10); |
|
|
|
// this.sumDoctorCheck.summaryList = res.data; |
|
|
|
// this.textareaResize() |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
@ -161,7 +199,7 @@ export default { |
|
|
|
|
|
|
|
//获取建议 |
|
|
|
suggestionList(RegisterId) { |
|
|
|
if(!RegisterId){ |
|
|
|
if (!RegisterId) { |
|
|
|
this.sumDoctorCheck.suggestionList = []; |
|
|
|
return; |
|
|
|
}; |
|
|
|
@ -211,14 +249,14 @@ export default { |
|
|
|
type: "warning", |
|
|
|
}).then(() => { |
|
|
|
//删除建议 |
|
|
|
this.sumDoctorCheck.suggestionList.splice(index,1) |
|
|
|
this.sumDoctorCheck.suggestionList.splice(index, 1) |
|
|
|
}).catch((err) => { |
|
|
|
if(err == 'cancel'){ |
|
|
|
if (err == 'cancel') { |
|
|
|
console.log(`已取消 ${err}`) |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.$message.error(`操作失败 ${err}`) |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//删除建议明细 |
|
|
|
@ -231,13 +269,13 @@ export default { |
|
|
|
//删除建议明细 |
|
|
|
details.splice(indexD, 1); |
|
|
|
}).catch((err) => { |
|
|
|
if(err == 'cancel'){ |
|
|
|
if (err == 'cancel') { |
|
|
|
console.log(`已取消 ${err}`) |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.$message.error(`操作失败 ${err}`) |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
//选择组合项目 |
|
|
|
rowClick(row) { |
|
|
|
@ -356,22 +394,22 @@ export default { |
|
|
|
//监听事件 |
|
|
|
watch: { |
|
|
|
// 虚拟表 触发强制刷新 (sumDoctor.M 合并包含:综述、建议、对比、历史等,不包含总检诊断) |
|
|
|
"dataTransOpts.refresh.sumDoctor.M":{ |
|
|
|
"dataTransOpts.refresh.sumDoctor.M": { |
|
|
|
// immediate:true, |
|
|
|
handler(newVal, oldVal) { |
|
|
|
console.log(`watch 总检--综述建议 newVal: ${newVal}, oldVal: ${oldVal} patientRegisterId: ${this.dataTransOpts.tableS.patient_register.id}`); |
|
|
|
console.log(`watch 总检--综述建议 newVal: ${newVal}, oldVal: ${oldVal} patientRegisterId: ${this.dataTransOpts.tableS.patient_register.id}`); |
|
|
|
this.summaryList(this.dataTransOpts.tableS.patient_register.id) |
|
|
|
this.suggestionList(this.dataTransOpts.tableS.patient_register.id) |
|
|
|
this.suggestionList(this.dataTransOpts.tableS.patient_register.id) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 新增时,光标定位 |
|
|
|
"curGetFocusSuggestionId":{ |
|
|
|
immediate:true, |
|
|
|
"curGetFocusSuggestionId": { |
|
|
|
immediate: true, |
|
|
|
handler(newVal, oldVal) { |
|
|
|
console.log(`watch curGetFocusSuggestionId newVal: ${newVal}, oldVal: ${oldVal}`); |
|
|
|
if(newVal){ |
|
|
|
this.$nextTick(() => { |
|
|
|
console.log(`watch curGetFocusSuggestionId newVal: ${newVal}, oldVal: ${oldVal}`); |
|
|
|
if (newVal) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs[newVal].focus(); |
|
|
|
}); |
|
|
|
} |
|
|
|
@ -385,20 +423,23 @@ export default { |
|
|
|
|
|
|
|
/* 设置单元格内内容顶对齐 */ |
|
|
|
::v-deep .el-table__cell { |
|
|
|
display: table-cell; /* 使单元格表现为表格单元 */ |
|
|
|
vertical-align: top; /* 顶对齐 el-table_2_column_2 el-table__cell */ |
|
|
|
display: table-cell; |
|
|
|
/* 使单元格表现为表格单元 */ |
|
|
|
vertical-align: top; |
|
|
|
/* 顶对齐 el-table_2_column_2 el-table__cell */ |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-textarea__inner { |
|
|
|
min-height: 23px; |
|
|
|
height: 23px; |
|
|
|
line-height: 1.25; |
|
|
|
padding: 1px 15px 1px 2px; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-input__inner { |
|
|
|
min-height: 23px; |
|
|
|
height: 23px; |
|
|
|
padding: 1px 15px 1px 2px; |
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|
|