Browse Source

doctor

master
pengjun 2 years ago
parent
commit
d6ecf4d602
  1. 12
      src/components/doctorCheck/CheckItemList.vue
  2. 106
      src/components/doctorCheck/RegisterCheckList.vue
  3. 47
      src/utlis/proFunc.js
  4. 2
      src/views/doctorCheck/doctorCheck.vue

12
src/components/doctorCheck/CheckItemList.vue

@ -1,5 +1,6 @@
<template>
<div>
<el-table :data="doctorCheck.checkItemList" style="width: 100%" :height="tableHeight" border highlight-current-row
@row-click="rowClick" size="small">
<el-table-column prop="itemName" label="项目" width="180" />
@ -34,21 +35,24 @@
<div style="overflow-y:auto; height:300px;width:100%;display: flex;flex-wrap: wrap;align-content: flex-start;">
<div v-for="item in moreResult.data" :key="item.id" style="margin: 5px;cursor:pointer;"
@click="clickResult(item)" @dblclick="dblclickResult(item)">
<el-tag size="samll" style="padding: 0 3px;height: 24px;line-height: 24px;font-size: 14px; color: #303133;background-color: white;">{{ item.result }}</el-tag>
<el-tag size="samll"
style="padding: 0 3px;height: 24px;line-height: 24px;font-size: 14px; color: #303133;background-color: white;">{{
item.result }}</el-tag>
</div>
</div>
<div>特殊符号</div>
<div style="overflow-y:auto; width:100%;display: flex;flex-wrap: wrap;align-content: flex-start;">
<div v-for="item in symbols" :key="item.id" style="margin: 1px; 2px;cursor:pointer;"
@click="insertSymbols(item.displayName)">
<el-tag style="padding: 0 3px;height: 24px;line-height: 24px;font-size: 15px;color: #303133;background-color: white;">
<el-tag
style="padding: 0 3px;height: 24px;line-height: 24px;font-size: 15px;color: #303133;background-color: white;">
{{ item.displayName }}
</el-tag>
</div>
</div>
<div>录入结果</div>
<el-input id="resultBox" style="width: 100%;" class="commonFont" type="textarea" :autosize="{ minRows: 4, maxRows: 4 }"
v-model="moreResult.result" />
<el-input id="resultBox" style="width: 100%;" class="commonFont" type="textarea"
:autosize="{ minRows: 4, maxRows: 4 }" v-model="moreResult.result" />
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="btnOkResult"> </el-button>

106
src/components/doctorCheck/RegisterCheckList.vue

@ -1,28 +1,61 @@
<template>
<div>
<!-- :row-class-name="tableRowClassName" -->
<el-table :data="doctorCheck.RegisterCheckList" style="width: 100%;"
:height="window.pageHeight < 600 ? 400 : window.pageHeight - 200" border highlight-current-row
ref='doctorCheck_RegisterCheckList' @row-click="rowClick" :row-style="{ height: '28px' }">
<el-table-column prop="asbitemName" label="组合项目" width="198">
<div :style="`overflow-y: scroll;height: ${tableHeight}px;`">
<el-collapse v-model="activeNames">
<el-collapse-item v-if="registerCheckList0.length > 0" title="普通检查" name="0">
<el-table :data="registerCheckList0" style="width: 100%;" border
highlight-current-row @row-click="rowClick" :show-header="false"
:row-style="{ height: '28px' }">
<el-table-column prop="asbitemName" label="组合项目" width="184">
<template slot-scope="scope">
<div :style="`padding: 0 5px;color: ${setColor(scope.row.completeFlag)};`">
<!--
<el-tooltip class="item" effect="dark" content="未检" placement="left">
<i v-show="scope.row.completeFlag == '0'" class="el-icon-circle-plus" style="font-size: 18px;color: red;"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="已检" placement="left">
<i v-show="scope.row.completeFlag == '1'" class="el-icon-success" style="font-size: 18px;color: green;"></i>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="弃检" placement="left">
<i v-show="scope.row.completeFlag == '2'" class="el-icon-remove" style="font-size: 18px;"></i>
</el-tooltip>
-->
{{ scope.row.asbitemName }}
</div>
</template>
</el-table-column>
</el-table>
</el-collapse-item>
<el-collapse-item v-if="registerCheckList1.length > 0" title="检验" name="1">
<el-table :data="registerCheckList1" style="width: 100%;" border
highlight-current-row @row-click="rowClick" :show-header="false"
:row-style="{ height: '28px' }">
<el-table-column prop="asbitemName" label="组合项目" width="184">
<template slot-scope="scope">
<div :style="`padding: 0 5px;color: ${setColor(scope.row.completeFlag)};`">
{{ scope.row.asbitemName }}
</div>
</template>
</el-table-column>
</el-table>
</el-collapse-item>
<el-collapse-item v-if="registerCheckList2.length > 0" title="特检" name="2">
<el-table :data="registerCheckList2" style="width: 100%;" border
highlight-current-row @row-click="rowClick" :show-header="false"
:row-style="{ height: '28px' }">
<el-table-column prop="asbitemName" label="组合项目" width="184">
<template slot-scope="scope">
<div :style="`padding: 0 5px;color: ${setColor(scope.row.completeFlag)};`">
{{ scope.row.asbitemName }}
</div>
</template>
</el-table-column>
</el-table>
</el-collapse-item>
<el-collapse-item v-if="registerCheckList3.length > 0" title="放射" name="3">
<el-table :data="registerCheckList3" style="width: 100%;" border
highlight-current-row @row-click="rowClick" :show-header="false"
:row-style="{ height: '28px' }">
<el-table-column prop="asbitemName" label="组合项目" width="184">
<template slot-scope="scope">
<div :style="`padding: 0 5px;color: ${setColor(scope.row.completeFlag)};`">
{{ scope.row.asbitemName }}
</div>
</template>
</el-table-column>
</el-table>
</el-collapse-item>
</el-collapse>
</div>
</div>
</template>
<script>
@ -34,7 +67,11 @@ export default {
components: {},
data() {
return {
activeNames:['0','1','2','3'],
registerCheckList0:[],
registerCheckList1:[],
registerCheckList2:[],
registerCheckList3:[],
};
},
@ -47,6 +84,10 @@ export default {
computed: {
...mapState(['window', 'dataTransOpts', 'dict', 'doctorCheck']),
tableHeight() {
return this.window.pageHeight < 600 ? 400 : this.window.pageHeight - 200
}
},
methods: {
@ -102,11 +143,10 @@ export default {
}
postapi('/api/app/RegisterCheck/GetRegisterCheckWithAsbitems', { patientRegisterId })
.then((res) => {
console.log("registerCheckList res.data", res.data);
// console.log("registerCheckList res.data", res.data);
if (res.code != -1) {
// this.doctorCheck.RegisterCheckList = res.data;
this.doctorCheck.RegisterCheckList = listOrderBy(res.data,[{ colName: 'checkTypeFlag', sortType: 'A' },{ colName: 'itemTypeDisplayOrder', sortType: 'A' },{ colName: 'asbitemDisplayOrder', sortType: 'A' }])
console.log("this.doctorCheck.RegisterCheckList", this.doctorCheck.RegisterCheckList);
//
this.handleRegisterCheckList(res.data)
// 1
if (res.data.length > 0) {
@ -114,7 +154,7 @@ export default {
this.dataTransOpts.tableS.register_check.id = res.data[0].id
// this.doctorCheck.RegisterCheckEdit = res.data[0]
this.$refs['doctorCheck_RegisterCheckList'].setCurrentRow(res.data[0])
// this.$refs['doctorCheck_RegisterCheckList'].setCurrentRow(res.data[0])
} else {
this.dataTransOpts.tableS.register_check.id = ''
@ -131,7 +171,13 @@ export default {
});
},
handleRegisterCheckList(registerCheckList){
this.doctorCheck.RegisterCheckList = listOrderBy(registerCheckList, [{ colName: 'checkTypeFlag', sortType: 'A' }, { colName: 'itemTypeDisplayOrder', sortType: 'A' }, { colName: 'asbitemDisplayOrder', sortType: 'A' }])
this.registerCheckList0 = this.doctorCheck.RegisterCheckList.filter(e => { return e.checkTypeFlag == '0'})
this.registerCheckList1 = this.doctorCheck.RegisterCheckList.filter(e => { return e.checkTypeFlag == '1'})
this.registerCheckList2 = this.doctorCheck.RegisterCheckList.filter(e => { return e.checkTypeFlag == '2'})
this.registerCheckList3 = this.doctorCheck.RegisterCheckList.filter(e => { return e.checkTypeFlag == '3'})
}
},
@ -148,5 +194,17 @@ export default {
}
};
</script>
<style scoped></style>
<style scoped>
::v-deep .el-collapse-item__header {
height: 32px;
line-height: 32px;
background-color: #f4f8ff;
color: #303133;
cursor: pointer;
font-size: 14px;
font-weight: 700;
text-align: center;
padding: 0 0 0 50px;
}
</style>

47
src/utlis/proFunc.js

@ -329,50 +329,49 @@ exports.getColorStr = getColorStr;
//对象数组排序 keyObjs示例:[{ colName: 'id', sortType: 'A' },] sortType: A/D(ASC/DESC)
//简单数组排序 arr.sort(a-b) 升序,arr.sort(b-a)
function listOrderBy(arr, keyObjs) {
if (!arr || arr.length < 2) return arr
if (!arr || (Array.isArray(arr) && arr.length < 2)) return arr
let arrCount = arr.length
let lkeyObjs = keyObjs
let lKeyObjs = keyObjs
let sortType = 'A' //默认升序排序
if (typeof keyObjs !== 'object') {
lkeyObjs = keyObjs.split(',')
lKeyObjs = []
let colNames = keyObjs.split(',')
colNames.forEach(colName => {
lKeyObjs.push({colName,sortType})
});
}
if (!lkeyObjs || lkeyObjs.length < 1) return arr
if (!(Array.isArray(lKeyObjs) && lKeyObjs.length > 0)) return arr
let temp = null
let sortType = 'A' //默认升序排序
try {
for (let i = 0; i < arrCount; i++) {
for (let j = 0; j < arrCount - 1; j++) {
for (let k = 0; k < lkeyObjs.length; k++) {
sortType = lkeyObjs[k][1] || 'A'
if (k == 0) {
for (let k = 0; k < lKeyObjs.length; k++) {
sortType = lKeyObjs[k]['sortType'] || 'A'
if (sortType == 'A'){
if (arr[j][lkeyObjs[k][0]] > arr[j + 1][lkeyObjs[k][0]]) {
if (arr[j][lKeyObjs[k]['colName']] > arr[j + 1][lKeyObjs[k]['colName']]) {
temp = deepCopy(arr[j])
arr[j] = deepCopy(arr[j + 1])
arr[j + 1] = deepCopy(temp)
}
break;
}else if(arr[j][lKeyObjs[k]['colName']] < arr[j + 1][lKeyObjs[k]['colName']]){
break;
}else{
if (arr[j][lkeyObjs[k][0]] < arr[j + 1][lkeyObjs[k][0]]) {
temp = deepCopy(arr[j])
arr[j] = deepCopy(arr[j + 1])
arr[j + 1] = deepCopy(temp)
}
continue
}
}else{
if (arr[j][lkeyObjs[k - 1][0]] != arr[j + 1][lkeyObjs[k - 1][0]]) break;
if (sortType == 'A') {
if (arr[j][lkeyObjs[k][0]] > arr[j + 1][lkeyObjs[k][0]]) {
if (arr[j][lKeyObjs[k]['colName']] < arr[j + 1][lKeyObjs[k]['colName']]) {
temp = deepCopy(arr[j])
arr[j] = deepCopy(arr[j + 1])
arr[j + 1] = deepCopy(temp)
}
break;
}else if(arr[j][lKeyObjs[k]['colName']] > arr[j + 1][lKeyObjs[k]['colName']]){
break;
}else{
if (arr[j][lkeyObjs[k][0]] < arr[j + 1][lkeyObjs[k][0]]) {
temp = deepCopy(arr[j])
arr[j] = deepCopy(arr[j + 1])
arr[j + 1] = deepCopy(temp)
}
continue
}
}
}

2
src/views/doctorCheck/doctorCheck.vue

@ -514,7 +514,7 @@ export default {
// }
let checkDate = this.doctorCheck.RegisterCheckEdit.checkDate || new Date();
checkDate = moment(new Date(checkDate)).format('yyyy-MM-DD HH:mm:ss'); //yyyy-MM-DD HH:mm:ss
let checkDoctorId = this.doctorCheck.RegisterCheckEdit.checkDoctorId || window.sessionStorage.getItem("user");
let checkDoctorId = this.doctorCheck.RegisterCheckEdit.checkDoctorId || null;
let registerCheckId = this.doctorCheck.RegisterCheckEdit.id
//
let registerCheckItems = []

Loading…
Cancel
Save