Browse Source

mult seo

master
pengjun 2 years ago
parent
commit
fb980aa38e
  1. 6
      src/assets/css/global.css
  2. 219
      src/components/patientRegister/PatientRegisterList.vue
  3. 2
      src/components/report/CusOrgOCX.vue
  4. 6
      src/views/report/chargeAsbitem.vue

6
src/assets/css/global.css

@ -18,6 +18,12 @@
.el-table .purple-row {
background: rgb(255, 0, 255);
}
/* 表格选中行 颜色 ::v-deep */
.el-table__body tr.current-row>td {
background-color: #409EFF !important;
}
/* 表格行背景色样式 end */
.publicfontsize{

219
src/components/patientRegister/PatientRegisterList.vue

@ -1,8 +1,11 @@
<template>
<div style="display: flex">
<div :style="'margin-left:5px;width:' + (window.pageWidth - 200 - 120 - 85) + 'px;'" @contextmenu.prevent="onContextmenu">
<el-table :data="patientRegister.prList" border :height="window.pageHeight < 600 ? 172:Math.floor((window.pageHeight - 342)*2/3)" highlight-current-row
@row-click="rowick" size="small" @selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick">
<div :style="'margin-left:5px;width:' + (window.pageWidth - 200 - 120 - 85) + 'px;'"
@contextmenu.prevent="onContextmenu">
<el-table :data="patientRegister.prList" border
:height="window.pageHeight < 600 ? 172 : Math.floor((window.pageHeight - 342) * 2 / 3)" highlight-current-row
@row-click="rowick" size="small" @selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick"
ref="info" @select="shiftSelect" :row-class-name="handleRowClassName">
<el-table-column type="selection" width="40">
</el-table-column>
<el-table-column prop="completeFlag" label="体检进度">
@ -173,7 +176,10 @@
<el-button type="" class="btnClass commonbutton" @click="guidePrint('0001', false)">指引单打印</el-button>
</div>
<div class="listBtn">
<el-button type="" class="btnClass commonbutton" @click="guidePrint('0001', true)" >指引单预览</el-button>
<el-button type="" class="btnClass commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button>
</div>
<div class="listBtn">
<el-button type="" class="btnClass commonbutton" @click="rowSelected(patientRegister.prList)">选中</el-button>
</div>
</div>
@ -306,7 +312,7 @@
import moment from "moment";
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
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 Camera from "../../components/patientRegister/Camera.vue";
@ -320,6 +326,11 @@ export default {
},
data() {
return {
startPoint: -1,// -1
endPoint: -1,// -1
pin: false,//
multipleSelection: [], //
dialogVisible: false,
dialogCamera: false,
@ -355,18 +366,58 @@ export default {
created() { },
created() {
},
//
mounted() {
this.quickAsb = this.dict.asbItemAll;
// keydown,code
window.addEventListener('keydown', code => {
// shiftkey: "Shift"
if (code.key == "Shift" && code.shiftKey) {
this.pin = true;// shift
}
console.log('this.pin', this.pin)
});
// keyup,code
window.addEventListener('keyup', code => {
// shiftcode.shiftKeytrue
if (code.key == "Shift") {
this.pin = false;// shift
// this.startPoint = undefined;//
// this.endPoint = undefined;//
}
console.log('this.pin', this.pin)
});
},
computed: {
...mapState(["window", "dict", "patientRegister", "customerOrg"]),
},
methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
handleRowClassName({ row, rowIndex }) {
// highLightBg 'selected'
console.log(rowIndex, row)
//return row.highLightBg == 'selected' ? 'high-light-bg' : '';
if (row.choosed) {
return 'current-row';
} else {
return '';
}
},
rowSelected(rows) {
rows.forEach(e => {
this.$refs['info'].toggleRowSelection(e, true);
})
},
// (isPreview)
async guidePrint(ReportCode, isPreview) {
let token = localStorage.getItem('token');
@ -439,11 +490,74 @@ export default {
}
},
handleSelectionChange(val) {
this.multipleSelection = val;
handleSelectionChange(rows) {
//this.multipleSelection = rows;
//console.log('this.multipleSelection',this.multipleSelection)
rows.forEach(item => {
item.highLightBg = 'selected';
});
//
if (!rows.length) {
this.patientRegister.prList.forEach(item => {
item.highLightBg = '';
});
}
this.multipleSelection = JSON.parse(JSON.stringify(rows));
},
// shift
shiftSelect(rows, row) {
console.log('rows, row', rows, row)
// selectDatasrows
if (this.multipleSelection.length > rows.length) {
//
row.highLightBg = '';
} else {
//
row.highLightBg = 'selected';
}
//
if (rows.length < this.multipleSelection.length) {
this.startPoint = undefined;//
this.endPoint = undefined;//
return;
}
// shift
// .
//
// index
// index
// index
if (this.pin) { // shift
if (this.startPoint || this.startPoint == 0) { //
this.endPoint = row.index;// index
if (this.startPoint > this.endPoint) { //
let temp = this.startPoint;
this.startPoint = this.endPoint;
this.endPoint = temp;
}
// handleSelectionChange
setTimeout(() => {
//
for (let i = this.startPoint + 1; i < this.endPoint; i++) {
this.$refs.info.toggleRowSelection(this.patientRegister.prList[i], true);
}
this.startPoint = undefined;//
this.endPoint = undefined;//
}, 100);
} else { //
this.startPoint = row.index;// index
}
} else { // shift
this.startPoint = undefined;//
this.endPoint = undefined;//
}
},
// /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}`)
@ -460,14 +574,45 @@ export default {
this.patientRegister.photo = ""; //
this.patientRegister.patientRegisterId = row.id;
this.patientRegister.photo = row.photo||'/pic/Photo.jpg';
this.patientRegister.photo = row.photo || '/pic/Photo.jpg';
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);
this.getPatientRegisterAbs(row.id);
//
this.patientRegister.prList.forEach(e => {
e.choosed = false;
});
if (!this.pin) { // shift
this.patientRegister.prList[row.index].choosed = true;
this.startPoint = row.index;
console.log('this.patientRegister.prList',this.pin,this.startPoint, this.patientRegister.prList)
return
} else {
if (this.startPoint == - 1) {
this.patientRegister.prList[row.index].choosed = true;
this.startPoint = row.index;
console.log('this.patientRegister.prList',this.pin, this.startPoint, this.patientRegister.prList)
return
}
if (this.startPoint > row.index) {
for (let i = row.index; i <= this.startPoint; i++) {
this.patientRegister.prList[i].choosed = true
}
} else if (this.startPoint <= row.index) {
for (let i = this.startPoint; i <= row.index; i++) {
this.patientRegister.prList[i].choosed = true
}
}
}
console.log('this.patientRegister.prList',this.pin, this.startPoint, this.patientRegister.prList)
},
//
@ -485,7 +630,7 @@ export default {
// this.patientRegister.addTimes++;
// this.patientRegister.patientRegisterTimes++;
this.patientRegister.patientRegisterRdInit.customerOrgId = this.patientRegister.query.customerOrgId;
this.formInitData = deepCopy(this.patientRegister.patientRegisterRdInit );
this.formInitData = deepCopy(this.patientRegister.patientRegisterRdInit);
this.patientRegister.patientRegisterAbs = [];
this.dialogVisible = true;
this.editTimes++; //
@ -587,7 +732,7 @@ export default {
//
async query() {
this.patientRegister.prList = [];
let body = {}
@ -610,7 +755,7 @@ export default {
if (this.patientRegister.query.startDate && this.patientRegister.query.endDate) {
body.startDate = moment(this.patientRegister.query.startDate).format("yyyy-MM-DD")
body.endDate = moment(this.patientRegister.query.endDate).format("yyyy-MM-DD")
if(body.startDate > body.endDate){
if (body.startDate > body.endDate) {
this.$message.warning("起始日期不能大于截止日期,数据校验不通过!")
return
}
@ -637,6 +782,12 @@ export default {
.then((res) => {
if (res.code != -1) {
this.patientRegister.prList = res.data.items;
//使
this.patientRegister.prList.forEach((item, index) => {
item.index = index;
item.choosed = false;
});
}
loading.close();
})
@ -890,22 +1041,22 @@ export default {
let createRegisterAsbitemDtos = [...this.asbitemBatch.asbitemsTemp];
createRegisterAsbitemDtos.forEach(e => {
delete e.asbitemName;
return e;
});
delete e.asbitemName;
return e;
});
for (let i = 0; i < this.multipleSelection.length; i++) {
createRegisterAsbitemDtos.forEach(e => {
e.patientRegisterId = this.multipleSelection[i].id;
return e;
return e;
});
body = {
organizationUnitId:this.multipleSelection[i].organizationUnitId,
organizationUnitId: this.multipleSelection[i].organizationUnitId,
createRegisterAsbitemDtos,
}
try {
await postapi('/api/app/registerasbitem/createregisterasbitemincustomerorgmany',body);
await postapi('/api/app/registerasbitem/createregisterasbitemincustomerorgmany', body);
} catch (error) {
console.log('批量增加项目错误,原因:',error);
console.log('批量增加项目错误,原因:', error);
}
}
} else {
@ -915,9 +1066,9 @@ export default {
// asbitemIds: [],
// }
let asbitemIds = [];
if(this.asbitemBatch.isDeleteGroup){
if (this.asbitemBatch.isDeleteGroup) {
body.isDeleteGroup = 'Y';
}else{
} else {
body.isDeleteGroup = 'N';
}
for (let i = 0; i < this.multipleSelection.length; i++) {
@ -928,11 +1079,11 @@ export default {
body.patientRegisterId = this.multipleSelection[i].id;
body.asbitemIds = asbitemIds
try {
await postapi('/api/app/registerasbitem/deleteregisterasbitemincustomerorgmany',body);
await postapi('/api/app/registerasbitem/deleteregisterasbitemincustomerorgmany', body);
} catch (error) {
console.log('批量删除项目错误,原因:',error);
console.log('批量删除项目错误,原因:', error);
}
}
}
@ -1026,7 +1177,7 @@ export default {
}
})
.then(res => {
console.log('res',res);
console.log('res', res);
if (res && res.toLowerCase() == 'success') {
// /api/app/lisrequest/updatelisrequestisprint
// {
@ -1125,6 +1276,8 @@ export default {
};
</script>
<style scoped>
@import "../../assets/css/global.css";
.box {
display: flex;
}
@ -1152,8 +1305,10 @@ export default {
/* 表格:单元格 行间距*/
::v-deep .el-table__cell {
padding-top: 2px; /* 表格:单元格 行间距,默认 8px */
padding-bottom: 2px; /* 表格:单元格 行间距,默认 8px */
padding-top: 2px;
/* 表格:单元格 行间距,默认 8px */
padding-bottom: 2px;
/* 表格:单元格 行间距,默认 8px */
}
::v-deep .el-table td.el-table__cell {
@ -1172,9 +1327,9 @@ input[type="number"]::-webkit-outer-spin-button {
margin: 0 !important;
}
/*
::v-deep .el-table__body tr.current-row>td {
background-color:#409EFF !important;
background-color: #409EFF !important;
}
*/
</style>

2
src/components/report/CusOrgOCX.vue

@ -415,7 +415,7 @@ export default {
padding: 2px 2px 2px 2px; /* 上,右,下,左 */
}
/* 表格单元格 .el-table .cell ,默认 10 px*/
::v-deep .cell {
padding-left: 2px;
padding-right: 2px;

6
src/views/report/chargeAsbitem.vue

@ -372,6 +372,12 @@ export default {
/* 上,右,下,左 */
}
/* 表格单元格 .el-table .cell ,默认 10 px*/
::v-deep .cell {
padding-left: 2px;
padding-right: 2px;
}
.query {
margin-left: 10px;
}

Loading…
Cancel
Save