|
|
@ -1,73 +1,72 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div style="display: flex;"> |
|
|
<div style="display: flex;"> |
|
|
<div style="width:50%;"> |
|
|
<div style="width:50%;"> |
|
|
<el-table id="tableSummary" row-key="id" :data="sumDoctorCheck.summaryList" width="100%" |
|
|
|
|
|
:height="window.pageHeight < 600 ? 300:window.pageHeight-300" |
|
|
|
|
|
border :row-style="{ height: '60px' }"> |
|
|
|
|
|
<el-table-column prop="summaryTitle" label="综述" > |
|
|
|
|
|
|
|
|
<el-table id="tableSummary" row-key="id" :data="sumDoctorCheck.summaryList" width="100%" |
|
|
|
|
|
:height="window.pageHeight < 600 ? 200 : window.pageHeight - 400" border :row-style="{ height: '60px' }"> |
|
|
|
|
|
<el-table-column prop="summaryTitle" label="综述"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div> |
|
|
<div> |
|
|
<el-input v-model="scope.row.summaryTitle" placeholder="请输入综述" disabled></el-input> |
|
|
<el-input v-model="scope.row.summaryTitle" placeholder="请输入综述" disabled></el-input> |
|
|
<el-table :id="scope.row.id" :row-key="scope.$index + scope.row.id" style="margin-left: 30px;" |
|
|
<el-table :id="scope.row.id" :row-key="scope.$index + scope.row.id" style="margin-left: 30px;" |
|
|
:data="scope.row.details" border @row-click="rowClick" :show-header="false" :row-style="{ height: '30px' }"> |
|
|
|
|
|
|
|
|
:data="scope.row.details" border @row-click="rowClick" :show-header="false" |
|
|
|
|
|
:row-style="{ height: '30px' }"> |
|
|
<el-table-column prop="summaryContent" label="综述"> |
|
|
<el-table-column prop="summaryContent" label="综述"> |
|
|
<template slot-scope="scope2"> |
|
|
<template slot-scope="scope2"> |
|
|
<el-input type="textarea" v-model="scope2.row.summaryContent" placeholder="请输入综述" style="width: 95%" |
|
|
<el-input type="textarea" v-model="scope2.row.summaryContent" placeholder="请输入综述" style="width: 95%" |
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag=='3' || sumDoctorCheck.sumPREdit.isAudit=='Y'" |
|
|
|
|
|
:autosize="{ minRows: 1, maxRows: 100 }"> |
|
|
|
|
|
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'" |
|
|
|
|
|
:autosize="{ minRows: 1, maxRows: 100 }"> |
|
|
</el-input> |
|
|
</el-input> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
|
<div style="width:50%;"> |
|
|
<div style="width:50%;"> |
|
|
<el-table id="tableSuggestion" row-key="id" :data="sumDoctorCheck.suggestionList" width="100%" |
|
|
|
|
|
:height="window.pageHeight < 600 ? 300:window.pageHeight-300" |
|
|
|
|
|
border :row-style="{ height: '60px' }"> |
|
|
|
|
|
|
|
|
<el-table id="tableSuggestion" row-key="id" :data="sumDoctorCheck.suggestionList" width="100%" |
|
|
|
|
|
:height="window.pageHeight < 600 ? 200 : window.pageHeight - 400" border :row-style="{ height: '60px' }"> |
|
|
<el-table-column type="index" width="30" style="vertical-align: top;"> |
|
|
<el-table-column type="index" width="30" style="vertical-align: top;"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="suggestionTitle" label="建议" > |
|
|
|
|
|
|
|
|
<el-table-column prop="suggestionTitle" label="建议"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div> |
|
|
<div> |
|
|
<el-input v-model="scope.row.suggestionTitle" placeholder="请输入建议标题" |
|
|
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag=='3' || sumDoctorCheck.sumPREdit.isAudit=='Y'" |
|
|
|
|
|
> |
|
|
|
|
|
<el-button slot="append" icon="el-icon-plus" @click="addSug(scope.$index)" |
|
|
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag=='3' || sumDoctorCheck.sumPREdit.isAudit=='Y'"></el-button> |
|
|
|
|
|
|
|
|
<el-input v-model="scope.row.suggestionTitle" placeholder="请输入建议标题" |
|
|
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'"> |
|
|
|
|
|
<el-button slot="append" icon="el-icon-plus" @click="addSug(scope.$index)" |
|
|
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'"></el-button> |
|
|
<!-- |
|
|
<!-- |
|
|
<el-button slot="append" icon="el-icon-d-caret"></el-button> |
|
|
<el-button slot="append" icon="el-icon-d-caret"></el-button> |
|
|
--> |
|
|
--> |
|
|
</el-input> |
|
|
</el-input> |
|
|
<el-table :id="'sug' + scope.row.id" row-key="displayOrder" style="margin-left: 30px;" |
|
|
<el-table :id="'sug' + scope.row.id" row-key="displayOrder" style="margin-left: 30px;" |
|
|
:data="scope.row.details" border @row-click="rowClickSug" :show-header="false" :row-style="{ height: '30px' }"> |
|
|
|
|
|
|
|
|
:data="scope.row.details" border @row-click="rowClickSug" :show-header="false" |
|
|
|
|
|
:row-style="{ height: '30px' }"> |
|
|
<el-table-column width="30"> |
|
|
<el-table-column width="30"> |
|
|
<template slot-scope="scope2"> |
|
|
<template slot-scope="scope2"> |
|
|
<div>{{ scope2.$index+1 }}</div> |
|
|
|
|
|
|
|
|
<div>{{ scope2.$index + 1 }}</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="suggestionContent" label="建议" > |
|
|
|
|
|
|
|
|
<el-table-column prop="suggestionContent" label="建议"> |
|
|
<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 type="textarea" v-model="scope2.row.suggestionContent" placeholder="请输入建议内容" |
|
|
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'" |
|
|
|
|
|
:autosize="{ minRows: 1, maxRows: 100 }"> |
|
|
</el-input> |
|
|
</el-input> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="" width="87"> |
|
|
<el-table-column label="" width="87"> |
|
|
<template slot-scope="scope2"> |
|
|
<template slot-scope="scope2"> |
|
|
<el-button type="danger" icon="el-icon-delete" @click="delSug(scope.row.details,scope2.$index)" |
|
|
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag=='3' || sumDoctorCheck.sumPREdit.isAudit=='Y'" |
|
|
|
|
|
size="small"></el-button> |
|
|
|
|
|
|
|
|
<el-button type="danger" icon="el-icon-delete" @click="delSug(scope.row.details, scope2.$index)" |
|
|
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'" |
|
|
|
|
|
size="small"></el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -81,21 +80,21 @@ export default { |
|
|
components: {}, |
|
|
components: {}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
sumDetails:[], |
|
|
|
|
|
sugDetails:[], |
|
|
|
|
|
|
|
|
sumDetails: [], |
|
|
|
|
|
sugDetails: [], |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
created() { }, |
|
|
created() { }, |
|
|
|
|
|
|
|
|
//挂载完成 |
|
|
//挂载完成 |
|
|
mounted() { |
|
|
|
|
|
|
|
|
mounted() { |
|
|
this.rowDrop(); |
|
|
this.rowDrop(); |
|
|
this.rowDropSuggestion() |
|
|
this.rowDropSuggestion() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
computed: { |
|
|
computed: { |
|
|
...mapState(['window','dict', 'doctorCheck', 'sumDoctorCheck']), |
|
|
|
|
|
|
|
|
...mapState(['window', 'dict', 'doctorCheck', 'sumDoctorCheck']), |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
@ -162,129 +161,129 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//增加建议明细 |
|
|
//增加建议明细 |
|
|
addSug(index){ |
|
|
|
|
|
|
|
|
addSug(index) { |
|
|
this.sumDoctorCheck.suggestionList[index].details.push({ |
|
|
this.sumDoctorCheck.suggestionList[index].details.push({ |
|
|
sumSuggestionHeaderId:this.sumDoctorCheck.suggestionList[index].id, |
|
|
|
|
|
|
|
|
sumSuggestionHeaderId: this.sumDoctorCheck.suggestionList[index].id, |
|
|
suggestionContent: '', |
|
|
suggestionContent: '', |
|
|
displayOrder:Math.random(), |
|
|
|
|
|
|
|
|
displayOrder: Math.random(), |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//删除建议明细 |
|
|
//删除建议明细 |
|
|
delSug(details,indexD){ |
|
|
|
|
|
details.splice(indexD,1); |
|
|
|
|
|
|
|
|
delSug(details, indexD) { |
|
|
|
|
|
details.splice(indexD, 1); |
|
|
}, |
|
|
}, |
|
|
//选择组合项目 |
|
|
//选择组合项目 |
|
|
rowClick(row) { |
|
|
rowClick(row) { |
|
|
console.log('rowClick row',row) |
|
|
|
|
|
let lfind = arrayExistObj(this.sumDoctorCheck.summaryList,'id',row.sumSummaryHeaderId) |
|
|
|
|
|
if(lfind > -1) { |
|
|
|
|
|
|
|
|
console.log('rowClick row', row) |
|
|
|
|
|
let lfind = arrayExistObj(this.sumDoctorCheck.summaryList, 'id', row.sumSummaryHeaderId) |
|
|
|
|
|
if (lfind > -1) { |
|
|
this.sumDetails = this.sumDoctorCheck.summaryList[lfind].details |
|
|
this.sumDetails = this.sumDoctorCheck.summaryList[lfind].details |
|
|
this.rowDropSumDetail(row.sumSummaryHeaderId) |
|
|
this.rowDropSumDetail(row.sumSummaryHeaderId) |
|
|
} |
|
|
} |
|
|
console.log('this.sumDetails',this.sumDetails) |
|
|
|
|
|
|
|
|
console.log('this.sumDetails', this.sumDetails) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//综述明细拖拽 |
|
|
//综述明细拖拽 |
|
|
rowDropSumDetail(id) { |
|
|
rowDropSumDetail(id) { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
const fEl = document.getElementById(id) // document.querySelector(`#${id} tbody`) querySelector为静态方法不支持动态传参; |
|
|
const fEl = document.getElementById(id) // document.querySelector(`#${id} tbody`) querySelector为静态方法不支持动态传参; |
|
|
console.log('rowDropSumDetail tbody',fEl,fEl.children) //el.childNodes,el.children |
|
|
|
|
|
const el = this.findEl(fEl,'TBODY') |
|
|
|
|
|
console.log('rowDropSumDetail tbody',el) //el.childNodes,el.children |
|
|
|
|
|
|
|
|
console.log('rowDropSumDetail tbody', fEl, fEl.children) //el.childNodes,el.children |
|
|
|
|
|
const el = this.findEl(fEl, 'TBODY') |
|
|
|
|
|
console.log('rowDropSumDetail tbody', el) //el.childNodes,el.children |
|
|
const that = this; |
|
|
const that = this; |
|
|
Sortable.create(el, { |
|
|
Sortable.create(el, { |
|
|
animation: 150, // ms, number 单位:ms,定义排序动画的时间 |
|
|
animation: 150, // ms, number 单位:ms,定义排序动画的时间 |
|
|
//拖拽结束 |
|
|
//拖拽结束 |
|
|
onEnd({ newIndex, oldIndex }) { |
|
|
|
|
|
|
|
|
onEnd({ newIndex, oldIndex }) { |
|
|
that.isshow = false; |
|
|
that.isshow = false; |
|
|
const currRow = that.sumDetails.splice(oldIndex, 1)[0]; |
|
|
const currRow = that.sumDetails.splice(oldIndex, 1)[0]; |
|
|
that.sumDetails.splice(newIndex, 0, currRow); |
|
|
|
|
|
|
|
|
that.sumDetails.splice(newIndex, 0, currRow); |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
findEl(fEl,nodeName){ |
|
|
|
|
|
|
|
|
findEl(fEl, nodeName) { |
|
|
let el = null |
|
|
let el = null |
|
|
for(let i=0;i<fEl.children.length;i++){ |
|
|
|
|
|
|
|
|
for (let i = 0; i < fEl.children.length; i++) { |
|
|
console.log(fEl.children[i].nodeName) |
|
|
console.log(fEl.children[i].nodeName) |
|
|
if(fEl.children[i].nodeName == nodeName){ |
|
|
|
|
|
|
|
|
if (fEl.children[i].nodeName == nodeName) { |
|
|
el = fEl.children[i] |
|
|
el = fEl.children[i] |
|
|
break |
|
|
break |
|
|
}else{ |
|
|
|
|
|
el = this.findEl(fEl.children[i],nodeName) |
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
el = this.findEl(fEl.children[i], nodeName) |
|
|
} |
|
|
} |
|
|
if(el) break |
|
|
|
|
|
|
|
|
if (el) break |
|
|
} |
|
|
} |
|
|
return el |
|
|
return el |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
rowClickSug(row){ |
|
|
|
|
|
console.log('rowClick row',row) |
|
|
|
|
|
let lfind = arrayExistObj(this.sumDoctorCheck.suggestionList,'id',row.sumSuggestionHeaderId) |
|
|
|
|
|
if(lfind > -1) { |
|
|
|
|
|
|
|
|
rowClickSug(row) { |
|
|
|
|
|
console.log('rowClick row', row) |
|
|
|
|
|
let lfind = arrayExistObj(this.sumDoctorCheck.suggestionList, 'id', row.sumSuggestionHeaderId) |
|
|
|
|
|
if (lfind > -1) { |
|
|
this.sugDetails = this.sumDoctorCheck.suggestionList[lfind].details |
|
|
this.sugDetails = this.sumDoctorCheck.suggestionList[lfind].details |
|
|
this.rowDropSugDetail(row.sumSuggestionHeaderId) |
|
|
this.rowDropSugDetail(row.sumSuggestionHeaderId) |
|
|
} |
|
|
} |
|
|
console.log('this.sumDetails',this.sugDetails) |
|
|
|
|
|
|
|
|
console.log('this.sumDetails', this.sugDetails) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//建议明细拖拽 |
|
|
//建议明细拖拽 |
|
|
rowDropSugDetail(id) { |
|
|
rowDropSugDetail(id) { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
const fEl = document.getElementById('sug'+id) // document.querySelector(`#${id} tbody`) querySelector为静态方法不支持动态传参; |
|
|
|
|
|
console.log('rowDropSumDetail tbody',fEl,fEl.children) //el.childNodes,el.children |
|
|
|
|
|
const el = this.findEl(fEl,'TBODY') |
|
|
|
|
|
console.log('rowDropSumDetail tbody',el) //el.childNodes,el.children |
|
|
|
|
|
|
|
|
const fEl = document.getElementById('sug' + id) // document.querySelector(`#${id} tbody`) querySelector为静态方法不支持动态传参; |
|
|
|
|
|
console.log('rowDropSumDetail tbody', fEl, fEl.children) //el.childNodes,el.children |
|
|
|
|
|
const el = this.findEl(fEl, 'TBODY') |
|
|
|
|
|
console.log('rowDropSumDetail tbody', el) //el.childNodes,el.children |
|
|
const that = this; |
|
|
const that = this; |
|
|
Sortable.create(el, { |
|
|
Sortable.create(el, { |
|
|
animation: 150, // ms, number 单位:ms,定义排序动画的时间 |
|
|
animation: 150, // ms, number 单位:ms,定义排序动画的时间 |
|
|
//拖拽结束 |
|
|
//拖拽结束 |
|
|
onEnd({ newIndex, oldIndex }) { |
|
|
|
|
|
|
|
|
onEnd({ newIndex, oldIndex }) { |
|
|
that.isshow = false; |
|
|
that.isshow = false; |
|
|
const currRow = that.sugDetails.splice(oldIndex, 1)[0]; |
|
|
const currRow = that.sugDetails.splice(oldIndex, 1)[0]; |
|
|
that.sugDetails.splice(newIndex, 0, currRow); |
|
|
|
|
|
|
|
|
that.sugDetails.splice(newIndex, 0, currRow); |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
//拖拽 |
|
|
//拖拽 |
|
|
rowDrop() { |
|
|
rowDrop() { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
const el = document.querySelector("#tableSummary tbody"); |
|
|
const el = document.querySelector("#tableSummary tbody"); |
|
|
console.log('tbody',el) |
|
|
|
|
|
|
|
|
console.log('tbody', el) |
|
|
const that = this; |
|
|
const that = this; |
|
|
Sortable.create(el, { |
|
|
Sortable.create(el, { |
|
|
animation: 150, // ms, number 单位:ms,定义排序动画的时间 |
|
|
animation: 150, // ms, number 单位:ms,定义排序动画的时间 |
|
|
//拖拽结束 |
|
|
//拖拽结束 |
|
|
onEnd({ newIndex, oldIndex }) { |
|
|
|
|
|
|
|
|
onEnd({ newIndex, oldIndex }) { |
|
|
that.isshow = false; |
|
|
that.isshow = false; |
|
|
const currRow = that.sumDoctorCheck.summaryList.splice(oldIndex, 1)[0]; |
|
|
const currRow = that.sumDoctorCheck.summaryList.splice(oldIndex, 1)[0]; |
|
|
that.sumDoctorCheck.summaryList.splice(newIndex, 0, currRow); |
|
|
|
|
|
|
|
|
that.sumDoctorCheck.summaryList.splice(newIndex, 0, currRow); |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
//拖拽 |
|
|
//拖拽 |
|
|
rowDropSuggestion() { |
|
|
rowDropSuggestion() { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
const el = document.querySelector("#tableSuggestion tbody"); |
|
|
const el = document.querySelector("#tableSuggestion tbody"); |
|
|
console.log('tbody',el) |
|
|
|
|
|
|
|
|
console.log('tbody', el) |
|
|
const that = this; |
|
|
const that = this; |
|
|
Sortable.create(el, { |
|
|
Sortable.create(el, { |
|
|
animation: 150, // ms, number 单位:ms,定义排序动画的时间 |
|
|
animation: 150, // ms, number 单位:ms,定义排序动画的时间 |
|
|
//拖拽结束 |
|
|
//拖拽结束 |
|
|
onEnd({ newIndex, oldIndex }) { |
|
|
|
|
|
|
|
|
onEnd({ newIndex, oldIndex }) { |
|
|
that.isshow = false; |
|
|
that.isshow = false; |
|
|
const currRow = that.sumDoctorCheck.suggestionList.splice(oldIndex, 1)[0]; |
|
|
const currRow = that.sumDoctorCheck.suggestionList.splice(oldIndex, 1)[0]; |
|
|
that.sumDoctorCheck.suggestionList.splice(newIndex, 0, currRow); |
|
|
|
|
|
|
|
|
that.sumDoctorCheck.suggestionList.splice(newIndex, 0, currRow); |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|