|
|
@ -1,6 +1,7 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div> |
|
|
<div> |
|
|
<div> |
|
|
<div> |
|
|
|
|
|
<!-- |
|
|
<div style="margin-top: -20px; margin-bottom: 5px;"> |
|
|
<div style="margin-top: -20px; margin-bottom: 5px;"> |
|
|
<span>项目类别</span> |
|
|
<span>项目类别</span> |
|
|
<el-cascader :options="dict.itemTypeTree" v-model="itemTypeIds" style="margin-left: 3px;width:160px;" |
|
|
<el-cascader :options="dict.itemTypeTree" v-model="itemTypeIds" style="margin-left: 3px;width:160px;" |
|
|
@ -8,36 +9,42 @@ |
|
|
clearable filterable @change="getAsbItemByItemType" size="small"> |
|
|
clearable filterable @change="getAsbItemByItemType" size="small"> |
|
|
</el-cascader> |
|
|
</el-cascader> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
--> |
|
|
<el-table :data="tableData" border style="width: 100%" row-key="id" height="300" highlight-current-row size="small" |
|
|
<el-table :data="tableData" border style="width: 100%" row-key="id" height="300" highlight-current-row size="small" |
|
|
@selection-change="handleSelectionChange" :span-method="spanMethod" ref="tableData" |
|
|
|
|
|
:row-style="{ height: '30px' }"> |
|
|
|
|
|
|
|
|
@selection-change="handleSelectionChange" ref="tableData" :row-style="{ height: '30px' }"> |
|
|
<el-table-column type="selection" :selectable="selectable" align="center" /> |
|
|
<el-table-column type="selection" :selectable="selectable" align="center" /> |
|
|
<el-table-column label="项目类别" width="120" prop="itemTypeName" /> |
|
|
|
|
|
<el-table-column label="组合项目" width="140" prop="asbitemName" /> |
|
|
|
|
|
<!-- isItemResultMerger 项目是否可以合并 --> |
|
|
|
|
|
<el-table-column label="已合并" width="60" prop="isAsbitemMerger" align="center"> |
|
|
|
|
|
|
|
|
<el-table-column label="检查项目" width="120" prop="mergerAsbitemName" /> |
|
|
|
|
|
<el-table-column label="项目类别" min-width="120"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div>{{ scope.row.isAsbitemMerger == 'Y' ? '是' : '否' }}</div> |
|
|
|
|
|
|
|
|
<table style="border: 0;width:100%;"> |
|
|
|
|
|
<tr v-for="item in scope.row.registerCheckAsbitems"> |
|
|
|
|
|
<td>{{ item.itemTypeName }}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</table> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="合并后项目名称" width="190" prop="mergerAsbitemName"> |
|
|
|
|
|
|
|
|
<el-table-column label="组合项目" min-width="140"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div>{{ scope.row.isAsbitemMerger == 'Y' ? scope.row.mergerAsbitemName : '' }}</div> |
|
|
|
|
|
|
|
|
<table style="border: 0;width:100%;"> |
|
|
|
|
|
<tr v-for="item in scope.row.registerCheckAsbitems"> |
|
|
|
|
|
<td>{{ item.asbitemName }}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</table> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<!-- 按钮区域 --> |
|
|
<!-- 按钮区域 --> |
|
|
<div style="display: flex; margin-top: 30px; margin-left: 280px"> |
|
|
<div style="display: flex; margin-top: 30px; margin-left: 280px"> |
|
|
<div style="margin-left: 10px"> |
|
|
<div style="margin-left: 10px"> |
|
|
<el-button class="commonbutton" type="primary" @click="mergeSubmit" style="width:80px;">合并项目</el-button> |
|
|
|
|
|
|
|
|
<el-button class="commonbutton" type="primary" @click="btnSubmit('+')" style="width:80px;">合并项目</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div style="margin-left: 10px"> |
|
|
<div style="margin-left: 10px"> |
|
|
<el-button class="commonbutton" type="info" @click="unMergeSubmit" style="width:80px;">取消合并</el-button> |
|
|
|
|
|
|
|
|
<el-button class="commonbutton" type="info" @click="btnSubmit('-')" style="width:80px;">取消合并</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div style="margin-left: 10px"> |
|
|
<div style="margin-left: 10px"> |
|
|
<el-button class="commonbutton" type="danger" @click="patientRegister.mergeAsbitemVisble = false" style="width:80px;">关闭</el-button> |
|
|
|
|
|
|
|
|
<el-button class="commonbutton" type="danger" @click="patientRegister.mergeAsbitemVisble = false" |
|
|
|
|
|
style="width:80px;">关闭</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -46,7 +53,6 @@ |
|
|
<script> |
|
|
<script> |
|
|
import { mapState } from "vuex"; |
|
|
import { mapState } from "vuex"; |
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
import { examinationgender } from "@/request/systemapi"; |
|
|
|
|
|
import { dddw, arrayExistObj, deepCopy } from "../../utlis/proFunc"; |
|
|
import { dddw, arrayExistObj, deepCopy } from "../../utlis/proFunc"; |
|
|
import { getTreeAllChildIdsById } from "../../utlis/tree"; |
|
|
import { getTreeAllChildIdsById } from "../../utlis/tree"; |
|
|
// import |
|
|
// import |
|
|
@ -212,49 +218,91 @@ export default { |
|
|
// "mergerAsbitemName": "string" |
|
|
// "mergerAsbitemName": "string" |
|
|
|
|
|
|
|
|
getapi( |
|
|
getapi( |
|
|
`/api/app/registerasbitem/getmergeregisterasbitemlist?PatientRegisterId=${id}` |
|
|
|
|
|
|
|
|
`/api/app/registerasbitem/GetMergeRegisterAsbitemList?PatientRegisterId=${id}` |
|
|
).then((res) => { |
|
|
).then((res) => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
//isItemResultMerger |
|
|
//isItemResultMerger |
|
|
res.data.forEach(e =>{ |
|
|
|
|
|
//过滤不能合并的项目 |
|
|
|
|
|
if(e.isItemResultMerger.toUpperCase() == 'Y'){ |
|
|
|
|
|
this.tableDataAll.push(e); |
|
|
|
|
|
|
|
|
// res.data.forEach(e => { |
|
|
|
|
|
// //过滤不能合并的项目 |
|
|
|
|
|
// if (e.isItemResultMerger.toUpperCase() == 'Y') { |
|
|
|
|
|
// this.tableDataAll.push(e); |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
// this.getAsbItemByItemType(); |
|
|
|
|
|
this.tableData = res.data |
|
|
|
|
|
this.selectedData = [] |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
this.getAsbItemByItemType(); |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
btnSubmit(mergeType) { |
|
|
|
|
|
let registerCheckIds = []; |
|
|
|
|
|
let count = (mergeType == '+') ? 2 : 1 |
|
|
|
|
|
if (this.selectedData.length < count) { |
|
|
|
|
|
this.$message.warning({showClose:true,message:`请至少勾选 ${count} 个以上要${mergeType == '+' ? '合并' : '取消合并'}的检查项目!`}); |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
this.selectedData.forEach(e => { |
|
|
|
|
|
registerCheckIds.push(e.registerCheckId) |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (mergeType == '+') { |
|
|
|
|
|
postapi("/api/app/registerasbitem/MergeRegisterAsbitem", { registerCheckIds }).then( |
|
|
|
|
|
(res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
console.log("操作成功!"); |
|
|
|
|
|
this.getAsbItemList(this.id); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
|
|
|
} else { |
|
|
|
|
|
postapi("/api/app/registerasbitem/cancelmergeregisterasbitem", { registerCheckIds }).then( |
|
|
|
|
|
(res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
console.log("操作成功!"); |
|
|
|
|
|
this.getAsbItemList(this.id); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//手动合并项目 |
|
|
//手动合并项目 |
|
|
mergeSubmit() { |
|
|
mergeSubmit() { |
|
|
let registerAsbitemIds = []; |
|
|
|
|
|
let itemTypes = []; |
|
|
|
|
|
|
|
|
let registerCheckIds = []; |
|
|
|
|
|
// let itemTypes = []; |
|
|
|
|
|
|
|
|
this.getFinalSelected(); |
|
|
|
|
|
this.finalSelected.forEach(e => { |
|
|
|
|
|
if(itemTypes.indexOf(e.itemTypeId) < 0) itemTypes.push(e.itemTypeId); |
|
|
|
|
|
registerAsbitemIds.push(e.registerAsbitemId); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// this.getFinalSelected(); |
|
|
|
|
|
// this.finalSelected.forEach(e => { |
|
|
|
|
|
// if (itemTypes.indexOf(e.itemTypeId) < 0) itemTypes.push(e.itemTypeId); |
|
|
|
|
|
// registerAsbitemIds.push(e.registerAsbitemId); |
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
if(itemTypes.length > 1){ |
|
|
|
|
|
this.$message.warning("勾选了不同类别的项目,数据校验失败,不可执行此操作!"); |
|
|
|
|
|
|
|
|
// if (itemTypes.length > 1) { |
|
|
|
|
|
// this.$message.warning("勾选了不同类别的项目,数据校验失败,不可执行此操作!"); |
|
|
|
|
|
// return; |
|
|
|
|
|
// } |
|
|
|
|
|
if (this.selectedData.length < 2) { |
|
|
|
|
|
this.$message.warning("请勾选 2 个以上要合并的检查项目!"); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
this.selectedData.forEach(e => { |
|
|
|
|
|
registerCheckIds.push(e.registerCheckId) |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
if (registerAsbitemIds.length < 2) { |
|
|
|
|
|
this.$message.warning("请勾选 2 个以上要合并的项目!"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let body = { |
|
|
let body = { |
|
|
registerAsbitemIds, |
|
|
|
|
|
medicalCenterId: this.medicalCenterId |
|
|
|
|
|
|
|
|
registerCheckIds, |
|
|
|
|
|
// medicalCenterId: this.medicalCenterId |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
postapi("/api/app/registerasbitem/mergeregisterasbitem", body).then( |
|
|
|
|
|
|
|
|
// 合并 |
|
|
|
|
|
// { |
|
|
|
|
|
// "registerCheckIds": [ |
|
|
|
|
|
// "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
|
|
|
|
|
// ] |
|
|
|
|
|
// } |
|
|
|
|
|
postapi("/api/app/registerasbitem/MergeRegisterAsbitem", body).then( |
|
|
(res) => { |
|
|
(res) => { |
|
|
if (res.code != -1) { |
|
|
if (res.code != -1) { |
|
|
console.log("操作成功!"); |
|
|
console.log("操作成功!"); |
|
|
|