pengjun 2 years ago
parent
commit
873d47ebf0
  1. 80
      src/components/patientRegister/PatientRegisterList.vue

80
src/components/patientRegister/PatientRegisterList.vue

@ -9,6 +9,24 @@
<!-- 取消勾选改为选中 <!-- 取消勾选改为选中
<el-table-column type="selection" width="40"/> <el-table-column type="selection" width="40"/>
--> -->
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column
v-for="(item, index) in headerCols"
align="center"
show-overflow-tooltip
:key="`col_${index}`"
:label="item.label"
:width="item.minWidth"
>
<template slot-scope="scope">
<span v-if="dropCol[index].prop == 'completeFlag'" style="color: blue">
{{ scope.row[dropCol[index].prop] }}
</span>
<span v-else>
{{ scope.row[dropCol[index].prop] }}
</span>
</template>
</el-table-column>
<el-table-column prop="completeFlag" label="体检进度" align="center"> <el-table-column prop="completeFlag" label="体检进度" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div> <div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
@ -323,6 +341,8 @@
import moment from "moment"; import moment from "moment";
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import Sortable from "sortablejs"
import { dddw, objCopy, arrayReduce, arrayExistObj, deepCopy } from "@/utlis/proFunc"; import { dddw, objCopy, arrayReduce, arrayExistObj, deepCopy } from "@/utlis/proFunc";
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue"; import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
@ -374,6 +394,44 @@ export default {
asbitemCurr: {}, //() asbitemCurr: {}, //()
}, },
quickAsb: [], // quickAsb: [], //
//
headerCols:[
{
label: "体检进度",
prop: "completeFlag",
minWidth: 100,
},
{
label: "打印",
prop: "guidePrintTimes",
minWidth: 60,
},
{
label: "锁住",
prop: "isLock",
minWidth: 60,
},
],
//
dropCol:[
{
label: "体检进度",
prop: "completeFlag",
minWidth: 100,
},
{
label: "打印",
prop: "guidePrintTimes",
minWidth: 60,
},
{
label: "锁住",
prop: "isLock",
minWidth: 60,
},
],
}; };
}, },
@ -386,7 +444,9 @@ export default {
// //
mounted() { mounted() {
this.quickAsb = this.dict.asbItemAll;
this.quickAsb = this.dict.asbItemAll;
this.dropCol = this.columnDrop(this.dropCol);
}, },
computed: { computed: {
...mapState(["window", "dict","elProgress","patientRegister", "customerOrg"]), ...mapState(["window", "dict","elProgress","patientRegister", "customerOrg"]),
@ -1246,6 +1306,24 @@ export default {
} }
}, },
columnDrop(dropCol) {
//dom
const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
Sortable.create(wrapperTr, {
animation: 180,
delay: 0,
onEnd: (evt) => {
const oldItem = dropCol[evt.oldIndex - 1];
dropCol.splice(evt.oldIndex - 1, 1);
dropCol.splice(evt.newIndex - 1, 0, oldItem);
},
});
return dropCol;
},
}, },
// //

Loading…
Cancel
Save