Browse Source

drog

master
pengjun 2 years ago
parent
commit
06f3efb009
  1. 77
      src/components/doctorCheck/CheckSumSug.vue
  2. 213
      src/components/doctorCheck/PatientRegisterList.vue

77
src/components/doctorCheck/CheckSumSug.vue

@ -1,45 +1,32 @@
<template>
<div style="display: flex;">
<div style="width:50%;">
<el-table :data="doctorCheck.checkSummaryList" width="100%" height="350" border @row-click="rowClick">
<el-table-column prop="summary" label="小结" width="380" >
<el-table id="tableSummary" row-key="id" :data="doctorCheck.checkSummaryList" width="100%" height="350" border @row-click="rowClick">
<el-table-column prop="summary" label="小结" width="460" >
<template slot-scope="scope">
<el-input type="textarea" v-model="doctorCheck.checkSummaryList[scope.$index].summary"
<el-input type="textarea" v-model="scope.row.summary"
:disabled="doctorCheck.RegisterCheckEdit.completeFlag=='1' || doctorCheck.RegisterCheckEdit.completeFlag=='2'" placeholder="请输入小结">
</el-input>
</template>
</el-table-column>
<el-table-column label="排序" width="80">
<template>
<el-tag class="move" style="cursor: move; margin-left: 15px" draggable="true">
<i class="el-icon-d-caret" style="width: 1rem; height: 1rem"></i>
</el-tag>
</el-input>
</template>
</el-table-column>
</el-table-column>
</el-table>
</div>
<div style="width:50%;">
<el-table :data="doctorCheck.checkSuggestionList" width="100%" height="350" border @row-click="rowClick">
<el-table-column prop="suggestion" label="建议" width="380" >
<el-table id="tableSuggestion" row-key="id" :data="doctorCheck.checkSuggestionList" width="100%" height="350" border @row-click="rowClick">
<el-table-column prop="suggestion" label="建议" width="460" >
<template slot-scope="scope">
<el-input type="textarea" v-model="doctorCheck.checkSuggestionList[scope.$index].suggestion"
<el-input type="textarea" v-model="scope.row.suggestion"
:disabled="doctorCheck.RegisterCheckEdit.completeFlag=='1' || doctorCheck.RegisterCheckEdit.completeFlag=='2'" placeholder="请输入建议">
</el-input>
</template>
</el-table-column>
<el-table-column label="排序" width="80">
<template>
<el-tag class="move" style="cursor: move; margin-left: 15px" draggable="true">
<i class="el-icon-d-caret" style="width: 1rem; height: 1rem"></i>
</el-tag>
</template>
</el-table-column>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
<script lang="ts">
import { mapState } from 'vuex';
import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
export default {
components: {},
@ -52,7 +39,10 @@ export default {
created() { },
//
mounted() { },
mounted() {
this.rowDrop();
this.rowDropSuggestion()
},
computed: {
...mapState(['dict', 'doctorCheck']),
@ -93,6 +83,43 @@ export default {
rowClick(row) {
},
//
rowDrop() {
this.$nextTick(() => {
const el = document.querySelector("#tableSummary tbody");
//console.log('tbody',tbody)
const that = this;
Sortable.create(el, {
animation: 150, // ms, number ms
//
onEnd({ newIndex, oldIndex }) {
that.isshow = false;
const currRow = that.doctorCheck.checkSummaryList.splice(oldIndex, 1)[0];
that.doctorCheck.checkSummaryList.splice(newIndex, 0, currRow);
},
});
});
},
//
rowDropSuggestion() {
this.$nextTick(() => {
const el = document.querySelector("#tableSuggestion tbody");
//console.log('tbody',tbody)
const that = this;
Sortable.create(el, {
animation: 150, // ms, number ms
//
onEnd({ newIndex, oldIndex }) {
that.isshow = false;
const currRow = that.doctorCheck.checkSuggestionList.splice(oldIndex, 1)[0];
that.doctorCheck.checkSuggestionList.splice(newIndex, 0, currRow);
},
});
});
},
},
//

213
src/components/doctorCheck/PatientRegisterList.vue

@ -1,5 +1,6 @@
<template>
<div>
<div>
<!-- 查询条件 -->
<div style="display: flex; flex-wrap: wrap; width: 90%">
<div class="block query">
<span class="demonstration">登记日期</span>
@ -51,7 +52,7 @@
<span>性别</span>
<el-select
v-model="patientRegister.query.sex"
placeholder="请选择"
placeholder="请选择" clearable
style="width: 80px" size="small"
>
<el-option
@ -82,8 +83,8 @@
expandTrigger: 'hover',
...customerOrg.treeprops,
}"
:show-all-levels="false"
size="small"
:show-all-levels="false"
size="small" clearable
>
</el-cascader>
<el-checkbox v-model="patientRegister.query.customerOrgFlag">单位作为查询条件</el-checkbox>
@ -106,10 +107,10 @@
</div>
</div>
<!-- 人员列表 -->
<div style="display: flex;margin-top: 10px;">
<el-table :data="dataList" border width="100%" height="430" row-key="id" size="small"
class="el-table__body-wrapper tbody" highlight-current-row @row-click="rowick" ref="dataList"
@selection-change="handleSelectionChange">
class="el-table__body-wrapper tbody" highlight-current-row @row-click="rowick" ref="dataList">
<el-table-column type="selection" width="40">
</el-table-column>
@ -218,14 +219,10 @@
<div style="margin-left: 10px">
<div class="listBtn">
<el-button type="primary" @click="edit">查询</el-button>
</div>
<div class="listBtn">
<el-button type="success" @click="add">确定</el-button>
<el-button type="primary" @click="query">查询</el-button>
</div>
<div class="listBtn">
<el-button type="danger" @click="doctorCheck.doctorCheckDialogVisible=true">取消</el-button>
<el-button type="danger" @click="doctorCheck.doctorCheckDialogVisible=false">关闭</el-button>
</div>
</div>
</div>
@ -234,7 +231,7 @@
</template>
<script>
import moment from "moment";
import { mapState} from "vuex";
import { mapState, mapMutations} from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy, arrayReduce } from "@/utlis/proFunc";
@ -252,6 +249,38 @@ export default {
multipleSelection: [], //
dialogVisible: false,
dialogCamera: false,
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
@ -263,133 +292,14 @@ export default {
...mapState(["dict", "patientRegister", "customerOrg","doctorCheck"]),
},
methods: {
handleSelectionChange(val) {
this.multipleSelection = val;
//console.log('this.multipleSelection',this.multipleSelection)
},
// /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
getCustomerOrgGroup(customerOrgld) {
getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`)
.then((res) => {
console.log("getCustomerOrgGroup", res.data);
if (res.code == 1) {
this.patientRegister.customerOrgGroup = res.data;
}
});
},
...mapMutations(['doctorCheckPrBaseInit']),
//
rowick(row) {
this.patientRegister.photo = ""; //
this.patientRegister.patientRegisterId = row.id;
this.patientRegister.patientRegisterRd = row;
this.patientRegister.query.customerOrgParentId = row.customerOrgParentId;
this.patientRegister.customerOrgGroupChange = 0; //0
this.patientRegister.medicalPackageChange = 0; //0
this.getCustomerOrgGroup(row.customerOrgParentId);
this.dict.asbItem = [...this.dict.asbItemAll]
this.getPatientRegisterAbs(row.id);
},
//
add() {
let customerOrgId = this.patientRegister.query.customerOrgId;
if (!customerOrgId) {
alert("请选择单位或个人");
return;
}
//console.log('customerOrgId',customerOrgId)
this.patientRegister.patientRegisterId = "";
this.patientRegister.patientRegisterRd.photo = '';
this.patientRegister.patientRegisterRdInit.id = "";
this.patientRegister.patientRegisterRdInit.customerOrgId = this.patientRegister.query.customerOrgId;
this.patientRegister.addTimes++;
this.patientRegister.patientRegisterTimes++;
this.patientRegister.patientRegisterAbs = [];
this.dialogVisible = true;
},
edit() {
if (!this.patientRegister.patientRegisterId) {
alert("请选择要操作的记录");
return;
}
this.patientRegister.patientRegisterTimes++;
this.dialogVisible = true;
},
//
openCamera() {
if (!this.patientRegister.patientRegisterId) {
alert("请选择要操作的记录");
return;
}
this.patientRegister.cameraVisble = true;
},
//
// /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641
del() {
if (this.multipleSelection.length < 1) {
alert("请先勾选要操作的记录");
return;
}
let patientRegisterIds = [];
for (let i = 0; i < this.multipleSelection.length; i++) {
patientRegisterIds.push(this.multipleSelection[i]["id"]);
}
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
//console.log('{patientRegisterIds}',{patientRegisterIds})
return postapi(`/api/app/patient-register/delete-many`, {
patientRegisterIds,
});
})
.then((res) => {
this.$message.success("删除成功");
this.patientRegister.query.times++;
this.patientRegister.patientRegisterId = "";
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
//
delBak() {
if (!this.patientRegister.patientRegisterId) {
alert("请选择要操作的记录");
return;
}
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
//console.log('${this.patientRegister.patientRegisterId}',this.patientRegister.patientRegisterId)
return deletapi(`/api/app/patient-register/${this.patientRegister.patientRegisterId}`);
})
.then((res) => {
this.$message.success("删除成功");
this.patientRegister.query.times++;
this.patientRegister.patientRegisterId = "";
})
.catch(() => {
this.$message({ type: "info", message: "已取消删除", });
});
this.doctorCheckPrBaseInit()
this.doctorCheck.prBase.patientRegisterNo = row.patientRegisterNo
objCopy(row,this.doctorCheck.prBase)
},
ldddw(arrayData, key, value, display) {
@ -405,12 +315,9 @@ export default {
let body = {}
console.log(`this.patientRegister.query`, this.patientRegister.query)
if (this.patientRegister.query.customerOrgFlag) {
if (this.patientRegister.query.CustomerOrgParentId) {
body.customerOrgId = this.patientRegister.query.CustomerOrgParentId
} else{
if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId
}
if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId[0]
}
if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex
@ -439,25 +346,17 @@ export default {
this.dataList = res.data;
});
},
//
choose(){
console.log('choose')
},
},
//
watch: {
//
"patientRegister.query.times"(newVal, oldVal) {
if (newVal != oldVal) {
//alert('')
this.query();
}
},
//
"patientRegister.patientRegisterRd.id"(newVal, oldVal) {
if (newVal != oldVal) {
//console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
objCopy(this.patientRegister.patientRegisterRd, this.form);
}
},
},
};
</script>

Loading…
Cancel
Save