Browse Source

doctor

master
pengjun 1 year ago
parent
commit
0206414b6c
  1. 161
      src/components/doctorCheck/CheckSumSug.vue
  2. 1
      src/store/index.js

161
src/components/doctorCheck/CheckSumSug.vue

@ -31,7 +31,7 @@
</el-table>
</div>
<div
:style="`display: flex;position: absolute; top:${window.pageHeight - sumHeight - 38}px;right:${sumWidth + 125}px;z-index: 1;`">
:style="`display: flex;position: absolute; top:${window.pageHeight - sumHeight - 42}px;right:${sumWidth + 125}px;z-index: 1;`">
<div v-show="checkPagePriv(pagePriv.privs, '生成小结')">
<el-button type="primary" class="btnClass" @click="btnMakeDiagnosis"
:disabled="doctorBtnDisabled('btnMakeDiagnosis')">生成小结</el-button>
@ -57,43 +57,90 @@
:disabled="doctorBtnDisabled('btnCritical')">危急值</el-button>
</div>
</div>
<div
:style="`display: flex;position: absolute; top:${window.pageHeight - sumHeight - 38}px;right:125px;z-index: 1;`">
<div v-show="checkPagePriv(pagePriv.privs, '新增建议')">
<el-button type="primary" class="btnClass" @click="addSuggestion"
:disabled="doctorBtnDisabled('addSuggestion')">新增建议</el-button>
</div>
</div>
<div :style="`margin-left:2px;width:${sumWidth}px;`">
<el-table id="tableSuggestion" row-key="id" :data="doctorCheck.checkSuggestionList" size="samll"
:height="sumHeight" width="100%" border>
<el-table-column width="30" align="center">
<template slot-scope="scope">
<el-tag class="moveSuggestion" style="height:25px;padding:0 2px;cursor: move;background-color: #EEEEEE;">
<div style="width: 16px;">{{ scope.$index + 1 }}</div>
</el-tag>
</template>
</el-table-column>
<el-table-column prop="suggestion" label="建议">
<template slot="header">
<div style="display: flex;justify-content:space-between;">
<div>建议</div>
<div></div>
</div>
</template>
<template slot-scope="scope">
<div style="display: flex;">
<el-input type="textarea" v-model="scope.row.suggestion" :autosize="{ minRows: 1, maxRows: 100 }"
:disabled="doctorBtnDisabled('delSug')" placeholder="请输入建议">
</el-input>
<el-button type="danger" style="min-width:23px;padding:2px;" icon="el-icon-delete"
@click="delSug(scope.$index)" :disabled="doctorBtnDisabled('delSug')" size="small"></el-button>
<el-tabs v-model="activeName" tab-position="top" :style="`margin-left:2px;width:${sumWidth}px;`">
<el-tab-pane label="上次结果" name="preResult">
<div :style="`width:100%;height:${sumHeight - 32}px;overflow-y: auto;`">
<table width="100%" style="font-size:14px;border-collapse:collapse;" border="1" cellspacing="0"
bordercolor="#909399">
<colgroup>
<col width="150">
<col width="50">
<col width="80">
<col width="120">
</colgroup>
<thead>
<tr height="30">
<td class="tdCellClass">项目</td>
<td class="tdCellClass">单位</td>
<td class="tdCellClass">参考范围</td>
<td class="tdCellClass">{{ doctorCheck.preResult.checkDate || '结果' }}</td>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) of doctorCheck.preResult.registerCheckItems || []" :key="index" height="30">
<td class="tdCellClass" style="text-align: left;">{{ item.itemName }}</td>
<td class="tdCellClass">{{ item.unitName }}</td>
<td class="tdCellClass">{{ item.referenceRangeValue }}</td>
<td
:style="`padding: 0 5px;text-align:left;color: ${item.itemName == '小结' ? '#000000' : getColorStr(item.reportFontColor)};`"
v-html="item.resultValue"></td>
</tr>
<tr height="30">
<td class="tdCellClass" style="text-align: left;">小结</td>
<td class="tdCellClass" style="text-align: left;" colspan="3">
<p v-for="(item, index) of doctorCheck.preResult.summarys || []" :key="index">
{{ item.summary }}
</p>
</td>
</tr>
</tbody>
</table>
</div>
</el-tab-pane>
<el-tab-pane label="建议" name="suggestion">
<div>
<div
:style="`display: flex;position: absolute;top:5px;right:5px;z-index: 1;`">
<div v-show="checkPagePriv(pagePriv.privs, '新增建议')">
<el-button type="primary" class="btnClass" @click="addSuggestion"
:disabled="doctorBtnDisabled('addSuggestion')">新增建议</el-button>
</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div>
<el-table id="tableSuggestion" row-key="id" :data="doctorCheck.checkSuggestionList" size="samll"
:height="sumHeight - 32" width="100%" border>
<el-table-column width="30" align="center">
<template slot-scope="scope">
<el-tag class="moveSuggestion"
style="height:25px;padding:0 2px;cursor: move;background-color: #EEEEEE;">
<div style="width: 16px;">{{ scope.$index + 1 }}</div>
</el-tag>
</template>
</el-table-column>
<el-table-column prop="suggestion" label="建议">
<template slot="header">
<div style="display: flex;justify-content:space-between;">
<div>建议</div>
<div></div>
</div>
</template>
<template slot-scope="scope">
<div style="display: flex;">
<el-input type="textarea" v-model="scope.row.suggestion" :autosize="{ minRows: 1, maxRows: 100 }"
:disabled="doctorBtnDisabled('delSug')" placeholder="请输入建议">
</el-input>
<el-button type="danger" style="min-width:23px;padding:2px;" icon="el-icon-delete"
@click="delSug(scope.$index)" :disabled="doctorBtnDisabled('delSug')" size="small"></el-button>
</div>
</template>
</el-table-column>
</el-table>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
@ -110,7 +157,7 @@
import { mapState } from 'vuex';
import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { getPagePriv, checkPagePriv, deepCopy } from "../../utlis/proFunc";
import { getPagePriv, checkPagePriv, deepCopy, getColorStr } from "../../utlis/proFunc";
import Queue from "../../components/queue/Queue.vue";
export default {
@ -125,6 +172,7 @@ export default {
routeUrlorPageName: 'doctorCheck', //
privs: [], //
},
activeName:'preResult'
};
},
@ -141,7 +189,7 @@ export default {
},
computed: {
...mapState(['window', 'dataTransOpts', 'dict', 'doctorCheck','dialogWin']),
...mapState(['window', 'dataTransOpts', 'dict', 'doctorCheck', 'dialogWin']),
//
sumWidth() {
@ -157,7 +205,7 @@ export default {
},
methods: {
checkPagePriv,
checkPagePriv, getColorStr,
//
checkSummaryList(RegisterCheckId) {
this.doctorCheck.checkSummaryList = [];
@ -194,6 +242,25 @@ export default {
});
},
//
getPreResult(RegisterCheckId) {
if (!RegisterCheckId) {
this.doctorCheck.preResult = {};
return;
}
// console.log(`/api/app/registerchecksuggestion/getregisterchecksuggestionlist?RegisterCheckId=${RegisterCheckId}`)
postapi('/api/app/SumSummaryReport/GetLastTimeAsbitemResult', { registerCheckId: RegisterCheckId })
.then((res) => {
console.log("getPreResult", res.data);
if (res.code > -1) {
this.doctorCheck.preResult = res.data || {};
}
})
.catch((err) => {
this.$message({ type: "error", message: `操作失败,原因:${err}` });
});
},
//
rowDrop() {
@ -263,7 +330,7 @@ export default {
},
//
btnCritical(){
btnCritical() {
this.dialogWin.FollowCriticalCheck = true
},
@ -323,8 +390,11 @@ export default {
immediate: true,
handler(newVal, oldVal) {
console.log(`watch 小结 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.register_check.id}`);
this.checkSummaryList(this.dataTransOpts.tableS.register_check.id)
this.checkSuggestionList(this.dataTransOpts.tableS.register_check.id)
if (newVal != oldVal) {
this.checkSummaryList(this.dataTransOpts.tableS.register_check.id)
this.checkSuggestionList(this.dataTransOpts.tableS.register_check.id)
this.getPreResult(this.dataTransOpts.tableS.register_check.id)
}
}
},
@ -334,6 +404,11 @@ export default {
<style scoped>
@import '../../assets/css/global_table.css';
.tdCellClass {
padding: 0 5px;
text-align: center;
}
.btnClass {
margin-left: 2px;
height: 22px;

1
src/store/index.js

@ -174,6 +174,7 @@ export default new Vuex.Store({
RegisterCheckId: '', //
checkItemList: [], //组合项目包含的明细项目
checkItem: {}, //单项目记录
preResult:{}, // 上次结果
checkSummaryList: [], //小结
checkSuggestionList: [], //建议
},

Loading…
Cancel
Save