Browse Source

doctor

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

63
src/components/doctorCheck/CheckItemList.vue

@ -30,7 +30,7 @@
<!--弹窗-->
<div>
<!-- 体检人员登记 -->
<!-- 结果录入模版 -->
<el-dialog title="结果录入模版" :visible.sync="dialogWinMoreResult" width="800px" :close-on-click-modal="false">
<div style="margin-top: -10px;">
<div style="overflow-y:auto; height:300px;width:100%;display: flex;flex-wrap: wrap;align-content: flex-start;">
@ -41,8 +41,17 @@
</el-tag>
</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>
<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" />
</div>
<span slot="footer" class="dialog-footer">
@ -92,6 +101,12 @@ export default {
result: '',
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.watchSelection()
},
//
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()
})
})
},
},
//

148
src/components/doctorCheck/CheckSumSug.vue

@ -1,28 +1,27 @@
<template>
<div style="display: flex;">
<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>
<el-table-column type="index" width="25" align="center"/>
<el-table-column type="index" width="25" align="center" />
<el-table-column prop="summary" label="小结">
<template slot="header">
<div style="display: flex;justify-content:space-between;">
<div>小结</div>
<div style="display: flex;">
<div v-show="checkPagePriv(pagePriv.privs,'生成小结')">
<div v-show="checkPagePriv(pagePriv.privs, '生成小结')">
<el-button type="primary" class="btnClass" @click="btnMakeDiagnosis">生成小结</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'新增小结')">
<div v-show="checkPagePriv(pagePriv.privs, '新增小结')">
<el-button type="primary" class="btnClass" @click="addSummary">新增小结</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'保存结果')">
<div v-show="checkPagePriv(pagePriv.privs, '保存结果')">
<el-button type="primary" class="btnClass" @click="save">保存结果</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'审核')">
<div v-show="checkPagePriv(pagePriv.privs, '审核')">
<el-button type="primary" class="btnClass" style="min-width: 40px;" @click="audit">审核</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'排队')">
</div>
<div v-show="checkPagePriv(pagePriv.privs, '排队')">
<el-button type="primary" class="btnClass" style="min-width: 40px;" @click="btnLineUp">排队</el-button>
</div>
</div>
@ -31,33 +30,47 @@
<template slot-scope="scope">
<div style="display: flex;">
<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-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'"
size="small"></el-button>
<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'"
size="small"></el-button>
</div>
</template>
</el-table-column>
</el-table-column>
</el-table>
</div>
<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>
<el-table-column type="index" width="25" align="center"/>
<el-table-column prop="suggestion" label="建议" >
<el-table-column type="index" width="25" align="center" />
<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">
<div style="display: flex;">
<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-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'"
<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'"
size="small"></el-button>
</div>
</template>
</el-table-column>
</el-table-column>
</el-table>
</div>
</div>
@ -66,42 +79,42 @@
import { mapState } from 'vuex';
import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { getPagePriv,checkPagePriv, deepCopy } from "../../utlis/proFunc";
import { getPagePriv, checkPagePriv, deepCopy } from "../../utlis/proFunc";
export default {
components: {},
props:["registerCheckId","isCheckPicture","optGrant","addSummary","btnMakeDiagnosis","save","audit","unAudit","btnLineUp"],
props: ["registerCheckId", "isCheckPicture", "optGrant", "addSummary", "btnMakeDiagnosis", "save", "audit", "unAudit", "btnLineUp"],
data() {
return {
pagePriv:{
routeUrlorPageName:'doctorCheck', //
privs:[] //
},
pagePriv: {
routeUrlorPageName: 'doctorCheck', //
privs: [] //
},
};
},
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))
},
//
mounted() {
mounted() {
this.rowDrop();
this.rowDropSuggestion()
},
computed: {
...mapState(['window','dataTransOpts','dict', 'doctorCheck']),
...mapState(['window', 'dataTransOpts', 'dict', 'doctorCheck']),
//
sumWidth(){
return Math.floor((this.window.pageWidth - 200 - 110 - 15 - 4)/2);
sumWidth() {
return Math.floor((this.window.pageWidth - 200 - 110 - 15 - 4) / 2);
},
//
sumHeight(){
return this.window.pageHeight < 600 ? Math.floor((480 - (this.isCheckPicture ? 110:0))*2/5):Math.floor((this.window.pageHeight - 120 - (this.isCheckPicture ? 110:0))*2/5);
sumHeight() {
return this.window.pageHeight < 600 ? Math.floor((480 - (this.isCheckPicture ? 110 : 0)) * 2 / 5) : Math.floor((this.window.pageHeight - 120 - (this.isCheckPicture ? 110 : 0)) * 2 / 5);
}
},
@ -109,7 +122,7 @@ export default {
checkPagePriv,
//
checkSummaryList(RegisterCheckId) {
if(!RegisterCheckId){
if (!RegisterCheckId) {
this.doctorCheck.checkSummaryList = [];
return;
}
@ -128,7 +141,7 @@ export default {
//
checkSuggestionList(RegisterCheckId) {
if(!RegisterCheckId){
if (!RegisterCheckId) {
this.doctorCheck.checkSuggestionList = [];
return;
}
@ -150,21 +163,21 @@ export default {
rowDrop() {
this.$nextTick(() => {
const el = document.querySelector("#tableSummary tbody");
console.log('el0',el)
console.log('el0', el)
const that = this;
Sortable.create(el, {
animation: 150, // ms, number ms
//
onEnd({ newIndex, oldIndex }) {
onEnd({ newIndex, oldIndex }) {
that.isshow = false;
const currRow = that.doctorCheck.checkSummaryList.splice(oldIndex, 1)[0];
that.doctorCheck.checkSummaryList.splice(newIndex, 0, currRow);
console.log('el',el)
that.doctorCheck.checkSummaryList.splice(newIndex, 0, currRow);
console.log('el', el)
},
});
});
},
},
//
rowDropSuggestion() {
this.$nextTick(() => {
@ -174,14 +187,14 @@ export default {
Sortable.create(el, {
animation: 150, // ms, number ms
//
onEnd({ newIndex, oldIndex }) {
onEnd({ newIndex, oldIndex }) {
that.isshow = false;
const currRow = that.doctorCheck.checkSuggestionList.splice(oldIndex, 1)[0];
that.doctorCheck.checkSuggestionList.splice(newIndex, 0, currRow);
that.doctorCheck.checkSuggestionList.splice(newIndex, 0, currRow);
},
});
});
},
},
//
delSum(index) {
@ -193,14 +206,21 @@ export default {
this.doctorCheck.checkSummaryList.splice(index, 1);
}).catch(err => {
if (err == "cancel") {
// this.$message.info("");
// this.$message.info("");
console.log('已取消删除')
}
});
},
addSuggestion() {
this.doctorCheck.checkSuggestionList.push({
id: Math.random(),
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
suggestion: '',
})
},
//
delSug(index) {
this.$confirm("此操作将删除该记录, 是否继续?", "提示", {
@ -211,12 +231,12 @@ export default {
this.doctorCheck.checkSuggestionList.splice(index, 1);
}).catch((err) => {
if (err == "cancel") {
// this.$message.info("");
// this.$message.info("");
console.log('已取消删除')
}
});
});
},
},
//
@ -228,12 +248,12 @@ export default {
// this.checkSuggestionList(newVal)
// },
//
"dataTransOpts.refresh.register_check.S":{
immediate:true,
"dataTransOpts.refresh.register_check.S": {
immediate: true,
handler(newVal, oldVal) {
console.log(`watch 小结 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.register_check.id}`);
console.log(`watch 小结 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.register_check.id}`);
this.checkSummaryList(this.dataTransOpts.tableS.register_check.id)
this.checkSuggestionList(this.dataTransOpts.tableS.register_check.id)
this.checkSuggestionList(this.dataTransOpts.tableS.register_check.id)
}
},
@ -242,16 +262,18 @@ export default {
</script>
<style scoped>
@import '../../assets/css/global_table.css';
.btnClass {
margin-left: 2px;
height: 22px;
padding: 2px 2px; /*原始 默认值 500 */
.btnClass {
margin-left: 2px;
height: 22px;
padding: 2px 2px;
/*原始 默认值 500 */
}
::v-deep .el-textarea__inner {
min-height: 23px;
height: 23px;
line-height: 1.25;
padding: 1px 15px 1px 2px;
}
</style>
}</style>

11
src/components/doctorCheck/PatientRegisterBase.vue

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

6
src/views/doctorCheck/doctorCheck.vue

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

Loading…
Cancel
Save