Browse Source

doctor

master
pengjun 2 years ago
parent
commit
3932a3337b
  1. 63
      src/components/doctorCheck/CheckItemList.vue
  2. 46
      src/components/doctorCheck/CheckSumSug.vue
  3. 9
      src/components/doctorCheck/PatientRegisterBase.vue
  4. 6
      src/views/doctorCheck/doctorCheck.vue

63
src/components/doctorCheck/CheckItemList.vue

@ -30,7 +30,7 @@
<!--弹窗--> <!--弹窗-->
<div> <div>
<!-- 体检人员登记 -->
<!-- 结果录入模版 -->
<el-dialog title="结果录入模版" :visible.sync="dialogWinMoreResult" width="800px" :close-on-click-modal="false"> <el-dialog title="结果录入模版" :visible.sync="dialogWinMoreResult" width="800px" :close-on-click-modal="false">
<div style="margin-top: -10px;"> <div style="margin-top: -10px;">
<div style="overflow-y:auto; height:300px;width:100%;display: flex;flex-wrap: wrap;align-content: flex-start;"> <div style="overflow-y:auto; height:300px;width:100%;display: flex;flex-wrap: wrap;align-content: flex-start;">
@ -41,8 +41,17 @@
</el-tag> </el-tag>
</div> </div>
</div> </div>
<div>特殊符号</div>
<div style="overflow-y:auto; width:100%;display: flex;flex-wrap: wrap;align-content: flex-start;">
<div v-for="item in symbols" :key="item.id" style="margin: 1px; 2px;cursor:pointer;"
@click="insertSymbols(item.displayName)" >
<el-tag style="padding: 0 3px;height: 24px;line-height: 24px;font-size: 15px;">
{{ item.displayName }}
</el-tag>
</div>
</div>
<div>录入结果</div> <div>录入结果</div>
<el-input style="width: 100%;" type="textarea" :autosize="{ minRows: 4, maxRows: 4 }"
<el-input id="resultBox" style="width: 100%;" type="textarea" :autosize="{ minRows: 4, maxRows: 4 }"
v-model="moreResult.result" /> v-model="moreResult.result" />
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -92,6 +101,12 @@ export default {
result: '', result: '',
index: 0, // index: 0, //
}, // }, //
selection: { //
start: 0, end: 0
},
symbols:[], //
}; };
}, },
@ -142,6 +157,13 @@ export default {
}); });
} }
}) })
//
getapi('/api/app/common-char/in-filter').then(res => {
if(res.code >= 0){
this.symbols = res.data.items
}
})
}, },
// //
@ -308,6 +330,8 @@ export default {
this.dialogWinMoreResult = true this.dialogWinMoreResult = true
this.watchSelection()
}, },
// //
dblclickResult(item) { dblclickResult(item) {
@ -434,6 +458,41 @@ export default {
}); });
}, },
//
insertSymbols(symbols){
let result = this.moreResult.result||''
if(result){
result = result.substring(0,this.selection.start) + symbols + result.substring(this.selection.end)
}else{
result = symbols
}
this.moreResult.result = result
this.selection.start++
this.selection.end++
},
//
getCaretPosition() {
let input = document.getElementById('resultBox');
this.selection.start = input.selectionStart;
this.selection.end = input.selectionEnd;
// console.log('selection',this.selection)
},
watchSelection() {
this.$nextTick(() => {
let that = this
let resultBox = document.getElementById('resultBox'); // //.inline-input
//
resultBox.addEventListener('click', function (event) {
//
that.getCaretPosition()
})
resultBox.addEventListener('input', function (event) {
//
that.getCaretPosition()
})
})
},
}, },
// //

46
src/components/doctorCheck/CheckSumSug.vue

@ -1,8 +1,7 @@
<template> <template>
<div style="display: flex;"> <div style="display: flex;">
<div :style="`width:${sumWidth}px;`"> <div :style="`width:${sumWidth}px;`">
<el-table id="tableSummary" row-key="id" :data="doctorCheck.checkSummaryList" size="samll"
:height="sumHeight"
<el-table id="tableSummary" row-key="id" :data="doctorCheck.checkSummaryList" size="samll" :height="sumHeight"
width="100%" border> width="100%" border>
<el-table-column type="index" width="25" align="center" /> <el-table-column type="index" width="25" align="center" />
<el-table-column prop="summary" label="小结"> <el-table-column prop="summary" label="小结">
@ -31,9 +30,11 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: flex;"> <div style="display: flex;">
<el-input type="textarea" v-model="scope.row.summary" :autosize="{ minRows: 1, maxRows: 100 }" <el-input type="textarea" v-model="scope.row.summary" :autosize="{ minRows: 1, maxRows: 100 }"
:disabled="doctorCheck.RegisterCheckEdit.completeFlag=='1' || doctorCheck.RegisterCheckEdit.completeFlag=='2'" placeholder="请输入小结">
:disabled="doctorCheck.RegisterCheckEdit.completeFlag == '1' || doctorCheck.RegisterCheckEdit.completeFlag == '2'"
placeholder="请输入小结">
</el-input> </el-input>
<el-button type="danger" style="min-width:23px;padding:2px;" icon="el-icon-delete" @click="delSum(scope.$index)"
<el-button type="danger" style="min-width:23px;padding:2px;" icon="el-icon-delete"
@click="delSum(scope.$index)"
:disabled="doctorCheck.RegisterCheckEdit.completeFlag == '1' || doctorCheck.RegisterCheckEdit.completeFlag == '2'" :disabled="doctorCheck.RegisterCheckEdit.completeFlag == '1' || doctorCheck.RegisterCheckEdit.completeFlag == '2'"
size="small"></el-button> size="small"></el-button>
</div> </div>
@ -42,17 +43,29 @@
</el-table> </el-table>
</div> </div>
<div :style="`margin-left:2px;width:${sumWidth}px;`"> <div :style="`margin-left:2px;width:${sumWidth}px;`">
<el-table id="tableSuggestion" row-key="id" :data="doctorCheck.checkSuggestionList" size="samll"
:height="sumHeight"
<el-table id="tableSuggestion" row-key="id" :data="doctorCheck.checkSuggestionList" size="samll" :height="sumHeight"
width="100%" border> width="100%" border>
<el-table-column type="index" width="25" align="center" /> <el-table-column type="index" width="25" align="center" />
<el-table-column prop="suggestion" label="建议"> <el-table-column prop="suggestion" label="建议">
<template slot="header">
<div style="display: flex;justify-content:space-between;">
<div>建议</div>
<div style="display: flex;">
<div v-show="checkPagePriv(pagePriv.privs, '新增建议')">
<el-button type="primary" class="btnClass" @click="addSuggestion"
:disabled="doctorCheck.RegisterCheckEdit.completeFlag == '1' || doctorCheck.RegisterCheckEdit.completeFlag == '2'">新增建议</el-button>
</div>
</div>
</div>
</template>
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: flex;"> <div style="display: flex;">
<el-input type="textarea" v-model="scope.row.suggestion" :autosize="{ minRows: 1, maxRows: 100 }" <el-input type="textarea" v-model="scope.row.suggestion" :autosize="{ minRows: 1, maxRows: 100 }"
:disabled="doctorCheck.RegisterCheckEdit.completeFlag=='1' || doctorCheck.RegisterCheckEdit.completeFlag=='2'" placeholder="请输入建议">
:disabled="doctorCheck.RegisterCheckEdit.completeFlag == '1' || doctorCheck.RegisterCheckEdit.completeFlag == '2'"
placeholder="请输入建议">
</el-input> </el-input>
<el-button type="danger" style="min-width:23px;padding:2px;" icon="el-icon-delete" @click="delSug(scope.$index)"
<el-button type="danger" style="min-width:23px;padding:2px;" icon="el-icon-delete"
@click="delSug(scope.$index)"
:disabled="doctorCheck.RegisterCheckEdit.completeFlag == '1' || doctorCheck.RegisterCheckEdit.completeFlag == '2'" :disabled="doctorCheck.RegisterCheckEdit.completeFlag == '1' || doctorCheck.RegisterCheckEdit.completeFlag == '2'"
size="small"></el-button> size="small"></el-button>
</div> </div>
@ -197,10 +210,17 @@ export default {
console.log('已取消删除') console.log('已取消删除')
} }
}); });
},
addSuggestion() {
this.doctorCheck.checkSuggestionList.push({
id: Math.random(),
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
suggestion: '',
})
}, },
// //
delSug(index) { delSug(index) {
this.$confirm("此操作将删除该记录, 是否继续?", "提示", { this.$confirm("此操作将删除该记录, 是否继续?", "提示", {
@ -242,16 +262,18 @@ export default {
</script> </script>
<style scoped> <style scoped>
@import '../../assets/css/global_table.css'; @import '../../assets/css/global_table.css';
.btnClass { .btnClass {
margin-left: 2px; margin-left: 2px;
height: 22px; height: 22px;
padding: 2px 2px; /*原始 默认值 500 */
padding: 2px 2px;
/*原始 默认值 500 */
} }
::v-deep .el-textarea__inner { ::v-deep .el-textarea__inner {
min-height: 23px; min-height: 23px;
height: 23px; height: 23px;
line-height: 1.25; line-height: 1.25;
padding: 1px 15px 1px 2px; padding: 1px 15px 1px 2px;
}
</style>
}</style>

9
src/components/doctorCheck/PatientRegisterBase.vue

@ -139,7 +139,7 @@ export default {
this.enterToQuery() this.enterToQuery()
// //
this.getPatientRegister(this.dataTransOpts.tableS.patient_register.id)
this.getPatientRegister(this.dataTransOpts.tableS.patient_register.patientRegisterNo)
}, },
computed: { computed: {
@ -224,11 +224,10 @@ export default {
.then(res => { .then(res => {
if (res.code != -1) { if (res.code != -1) {
if (res.data.items.length == 1) { if (res.data.items.length == 1) {
this.dataTransOpts.tableS.patient_register.id = res.data.items[0].id
this.dataTransOpts.tableS.patient_register.patientRegisterNo = res.data.items[0].patientRegisterNo
setTimeout(() => {
this.dataTransOpts.tableS.patient_register = res.data.items[0]
// this.dataTransOpts.tableS.patient_register.id = res.data.items[0].id
// this.dataTransOpts.tableS.patient_register.patientRegisterNo = res.data.items[0].patientRegisterNo
this.dataTransOpts.refresh.patient_register.S++ this.dataTransOpts.refresh.patient_register.S++
}, 10);
// this.getPatientRegister(res.data.items[0].id) // this.getPatientRegister(res.data.items[0].id)
} else if (res.data.items.length > 1) { } else if (res.data.items.length > 1) {
this.PatientRegisterList = res.data.items this.PatientRegisterList = res.data.items

6
src/views/doctorCheck/doctorCheck.vue

@ -391,11 +391,7 @@ export default {
summary: '', summary: '',
summaryFlag: 'N', summaryFlag: 'N',
}) })
this.doctorCheck.checkSuggestionList.push({
id:Math.random(),
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
suggestion: '',
})
}, },
// //

Loading…
Cancel
Save