pengjun 4 months ago
parent
commit
ac9a850a12
  1. 20
      src/components/sumDoctorCheck/SumSug.vue

20
src/components/sumDoctorCheck/SumSug.vue

@ -81,7 +81,7 @@
'展开' : '折叠' }}全部建议</el-button> '展开' : '折叠' }}全部建议</el-button>
</div> </div>
<div v-show="checkPagePriv(pagePriv.privs, '新增建议')"> <div v-show="checkPagePriv(pagePriv.privs, '新增建议')">
<el-button style="width:50px;height: 28px;" class="commonbutton" @click="addSuggtion"
<el-button style="width:50px;height: 28px;" class="commonbutton" @click="addSuggtion(curDiagSug)"
:disabled="sumBtnDisabled">新增</el-button> :disabled="sumBtnDisabled">新增</el-button>
</div> </div>
<div v-show="checkPagePriv(pagePriv.privs, '新增建议')"> <div v-show="checkPagePriv(pagePriv.privs, '新增建议')">
@ -93,7 +93,7 @@
<div style="width: 5px;cursor: col-resize;" @mousedown="startDrag">&nbsp;</div> <div style="width: 5px;cursor: col-resize;" @mousedown="startDrag">&nbsp;</div>
<div :style="`width:${dragging.sugWidthRight}px;background-color: #B9CEE9;`" @contextmenu="onContextmenuSug"> <div :style="`width:${dragging.sugWidthRight}px;background-color: #B9CEE9;`" @contextmenu="onContextmenuSug">
<el-table id="tableSuggestion" row-key="id" :data="sumDoctorCheck.suggestionList" width="100%" <el-table id="tableSuggestion" row-key="id" :data="sumDoctorCheck.suggestionList" width="100%"
:height="sumHeight" border size="small" ref="tableSuggestion" @row-contextmenu="onCellRightClick">
:height="sumHeight" border size="small" ref="tableSuggestion" @row-contextmenu="onCellRightClick" @row-click="rowClickS">
<el-table-column width="30" align="center"> <el-table-column width="30" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag class="moveTag" style="cursor: move;background-color: #EEEEEE;"> <el-tag class="moveTag" style="cursor: move;background-color: #EEEEEE;">
@ -416,6 +416,7 @@ export default {
sugWidthRight: 0 sugWidthRight: 0
}, },
curDiagSug:{}, //
}; };
}, },
@ -617,7 +618,8 @@ export default {
}, },
// //
addSuggtion() {
addSuggtion(curDiagSug) {
let id = Date.now() + String(this.sumDoctorCheck.suggestionList.length) let id = Date.now() + String(this.sumDoctorCheck.suggestionList.length)
let pojo = { let pojo = {
id, id,
@ -647,7 +649,15 @@ export default {
], ],
} }
if(curDiagSug?.id){
let lfind = arrayExistObj(this.sumDoctorCheck.suggestionList,'id',curDiagSug.id)
if(lfind > -1){
this.sumDoctorCheck.suggestionList.splice(Number(lfind) + 1,0,pojo)
}
}else{
this.sumDoctorCheck.suggestionList.push(pojo); this.sumDoctorCheck.suggestionList.push(pojo);
}
// //
this.$nextTick(() => { this.$nextTick(() => {
this.$refs[id].focus(); this.$refs[id].focus();
@ -1177,6 +1187,10 @@ export default {
console.log('this.sumDetails', this.sumDetails) console.log('this.sumDetails', this.sumDetails)
}, },
rowClickS(row){
this.curDiagSug = row
},
// //
rowDropSumDetail(id) { rowDropSumDetail(id) {
this.$nextTick(() => { this.$nextTick(() => {

Loading…
Cancel
Save