pengjun 2 years ago
parent
commit
a0762ddc43
  1. 2
      src/components/doctorCheck/CheckItemList.vue
  2. 1
      src/components/patientRegister/PatientRegisterList.vue
  3. 36
      src/components/sumDoctorCheck/SumSug.vue

2
src/components/doctorCheck/CheckItemList.vue

@ -3,7 +3,7 @@
<el-table :data="doctorCheck.checkItemList" style="width: 100%" :height="tableHeight" border highlight-current-row <el-table :data="doctorCheck.checkItemList" style="width: 100%" :height="tableHeight" border highlight-current-row
@row-click="rowClick" size="small"> @row-click="rowClick" size="small">
<el-table-column prop="itemName" label="项目" width="180" />
<el-table-column prop="itemName" label="项目" width="220" />
<el-table-column prop="result" label="结果" min-width="200"> <el-table-column prop="result" label="结果" min-width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: flex;"> <div style="display: flex;">

1
src/components/patientRegister/PatientRegisterList.vue

@ -12,6 +12,7 @@
<el-table-column type="selection" width="40" align="center"></el-table-column> <el-table-column type="selection" width="40" align="center"></el-table-column>
<el-table-column v-for="(item, index) in dragCol" :key="index" :type="dragCol[index].type" <el-table-column v-for="(item, index) in dragCol" :key="index" :type="dragCol[index].type"
:min-width="dragCol[index].minWidth" :align="dragCol[index].align" :label="item.label" :min-width="dragCol[index].minWidth" :align="dragCol[index].align" :label="item.label"
:prop="dragCol[index].prop"
:sortable="dragCol[index].type || dragCol[index].prop == 'sn' ? false : true"> :sortable="dragCol[index].type || dragCol[index].prop == 'sn' ? false : true">
<template slot-scope="scope" v-if="!(dragCol[index].type)"> <template slot-scope="scope" v-if="!(dragCol[index].type)">
<div v-if="!dragCol[index].type"> <div v-if="!dragCol[index].type">

36
src/components/sumDoctorCheck/SumSug.vue

@ -47,7 +47,12 @@
<div style="width:50%;"> <div style="width:50%;">
<el-table id="tableSuggestion" row-key="id" :data="sumDoctorCheck.suggestionList" width="100%" :height="sumHeight" <el-table id="tableSuggestion" row-key="id" :data="sumDoctorCheck.suggestionList" width="100%" :height="sumHeight"
border size="small" ref="tableSuggestion"> border size="small" ref="tableSuggestion">
<el-table-column type="index" width="30" align="center">
<el-table-column width="30" align="center">
<template slot-scope="scope">
<el-tag class="moveTag" style="cursor: move;background-color: #EEEEEE;">
<div style="width: 16px;">{{ scope.$index + 1 }}</div>
</el-tag>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="suggestionTitle" label="建议"> <el-table-column prop="suggestionTitle" label="建议">
<template slot="header"> <template slot="header">
@ -98,7 +103,9 @@
:data="scope.row.medicalInterpretations" border @row-click="rowClickSug0" :show-header="false"> :data="scope.row.medicalInterpretations" border @row-click="rowClickSug0" :show-header="false">
<el-table-column width="30"> <el-table-column width="30">
<template slot-scope="scope2"> <template slot-scope="scope2">
<div>{{ scope2.$index + 1 }}).</div>
<el-tag class="moveTag2" style="cursor: move;background-color: #EEEEEE;">
<div style="width: 16px;">{{ scope2.$index + 1 }}).</div>
</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="suggestionContent" label="建议" min-width="200"> <el-table-column prop="suggestionContent" label="建议" min-width="200">
@ -133,7 +140,9 @@
:data="scope.row.commonReasons" border @row-click="rowClickSug1" :show-header="false"> :data="scope.row.commonReasons" border @row-click="rowClickSug1" :show-header="false">
<el-table-column width="30"> <el-table-column width="30">
<template slot-scope="scope2"> <template slot-scope="scope2">
<div>{{ scope2.$index + 1 }}).</div>
<el-tag class="moveTag2" style="cursor: move;background-color: #EEEEEE;">
<div style="width: 16px;">{{ scope2.$index + 1 }}).</div>
</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="suggestionContent" label="建议" min-width="200"> <el-table-column prop="suggestionContent" label="建议" min-width="200">
@ -168,7 +177,9 @@
:data="scope.row.healthGuidances" border @row-click="rowClickSug2" :show-header="false"> :data="scope.row.healthGuidances" border @row-click="rowClickSug2" :show-header="false">
<el-table-column width="30"> <el-table-column width="30">
<template slot-scope="scope2"> <template slot-scope="scope2">
<div>{{ scope2.$index + 1 }}).</div>
<el-tag class="moveTag2" style="cursor: move;background-color: #EEEEEE;">
<div style="width: 16px;">{{ scope2.$index + 1 }}).</div>
</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="suggestionContent" label="建议" min-width="200"> <el-table-column prop="suggestionContent" label="建议" min-width="200">
@ -271,7 +282,7 @@ export default {
index: -1, index: -1,
colName: '', // colName: '', //
subIndex: -1, subIndex: -1,
}
},
}; };
}, },
@ -286,7 +297,7 @@ export default {
// //
mounted() { mounted() {
this.rowDrop();
// this.rowDrop();
this.rowDropSuggestion(); this.rowDropSuggestion();
this.dictInit() this.dictInit()
@ -822,6 +833,7 @@ export default {
return el return el
}, },
rowClickSug0(row) { rowClickSug0(row) {
this.rowClickSug(row, 0) this.rowClickSug(row, 0)
}, },
@ -829,11 +841,11 @@ export default {
this.rowClickSug(row, 1) this.rowClickSug(row, 1)
}, },
rowClickSug2(row) { rowClickSug2(row) {
// console.log('column',column.property) -- suggestionContent
this.rowClickSug(row, 2) this.rowClickSug(row, 2)
}, },
rowClickSug(row, contentType) { rowClickSug(row, contentType) {
console.log('rowClick row', row, contentType)
let lcontentType = 'healthGuidances' let lcontentType = 'healthGuidances'
switch (contentType) { switch (contentType) {
case 0: case 0:
@ -850,7 +862,7 @@ export default {
this.sugDetails = this.sumDoctorCheck.suggestionList[lfind][lcontentType] this.sugDetails = this.sumDoctorCheck.suggestionList[lfind][lcontentType]
this.rowDropSugDetail(contentType, row.sumSuggestionHeaderId) this.rowDropSugDetail(contentType, row.sumSuggestionHeaderId)
} }
console.log('this.sumDetails', lfind, this.sugDetails)
// console.log('this.sumDetails', lfind, this.sugDetails)
}, },
// //
@ -861,8 +873,9 @@ export default {
const el = this.findEl(fEl, 'TBODY') const el = this.findEl(fEl, 'TBODY')
console.log('rowDropSumDetail tbody', el) //el.childNodes,el.children console.log('rowDropSumDetail tbody', el) //el.childNodes,el.children
const that = this; const that = this;
if (this.detailsDrag) this.detailsDrag.destroy()
this.detailsDrag = Sortable.create(el, {
Sortable.create(el, {
handle: ".moveTag2",
animation: 150, // ms, number ms animation: 150, // ms, number ms
// //
onEnd({ newIndex, oldIndex }) { onEnd({ newIndex, oldIndex }) {
@ -874,7 +887,7 @@ export default {
}); });
}, },
//
//
rowDrop() { rowDrop() {
this.$nextTick(() => { this.$nextTick(() => {
const el = document.querySelector("#tableSummary tbody"); const el = document.querySelector("#tableSummary tbody");
@ -899,6 +912,7 @@ export default {
console.log('tbody', el) console.log('tbody', el)
const that = this; const that = this;
Sortable.create(el, { Sortable.create(el, {
handle: ".moveTag",
animation: 150, // ms, number ms animation: 150, // ms, number ms
// //
onEnd({ newIndex, oldIndex }) { onEnd({ newIndex, oldIndex }) {

Loading…
Cancel
Save