|
|
|
@ -1,31 +1,30 @@ |
|
|
|
<template> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div style="width: 180px;height:500px;margin-top: -30px;overflow: scroll;border: 1px solid;"> |
|
|
|
<div style="width: 150px;height:500px;margin-top: -30px;overflow: scroll;border: 1px solid;"> |
|
|
|
<el-tree :data="patientRegister.customerOrgTreeAll" :props="customerOrg.treeprops" @node-click="handleNode" /> |
|
|
|
</div> |
|
|
|
<div style="display: block;width:620px;margin-top: -30px; margin-left: 5px;"> |
|
|
|
<div style="display: block;width:650px;margin-top: -30px; margin-left: 5px;"> |
|
|
|
<el-table :data="dataCusOrgOCX" border height="450" highlight-current-row @row-click="rowick" size="small" |
|
|
|
@selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick"> |
|
|
|
<el-table-column prop="customerOrgId" label="体检单位" width="130"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.customerOrgId" placeholder="体检单位" style="width: 60px" size="small" |
|
|
|
value-key="id"> |
|
|
|
<el-option v-for="item in patientRegister.customerOrgTreeAll" :key="item.id" :label="item.displayName" |
|
|
|
:value="item.id" /> |
|
|
|
</el-select> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-cascader v-model="scope.row.customerOrgId" :options="patientRegister.customerOrgTreeAll" |
|
|
|
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" placeholder="请选择单位" |
|
|
|
:show-all-levels="false" disabled clearable size="small" @change="changeCustomerOrgId" style="width:125px;"> |
|
|
|
</el-cascader> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="customerOrgId" label="次数" width="45" align="center"> |
|
|
|
<el-table-column prop="customerOrgId" label="次数" width="50" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.customerOrgRegister" placeholder="次数" style="width: 60px" size="small" |
|
|
|
<el-select v-model="scope.row.customerOrgRegister" placeholder="次数" style="width: 50px" size="small" |
|
|
|
:disabled="scope.row.customerOrgId == dict.personOrgId" |
|
|
|
@change="changeMedicalTimes(scope.row.customerOrgId)" value-key="id"> |
|
|
|
<el-option v-for="item in customerOrg.customerOrgRegisterList" :key="item.id" :label="item.medicalTimes" |
|
|
|
<el-option v-for="item in scope.row.customerOrgRegisterList" :key="item.id" :label="item.medicalTimes" |
|
|
|
:value="item" /> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="dateType" label="日期方式" width="80" align="center"> |
|
|
|
<el-table-column prop="dateType" label="日期方式" width="85" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.dateType" placeholder="请选择" filterable clearable size="small"> |
|
|
|
<el-option label="登记日期" value="creationTime" /> |
|
|
|
@ -34,21 +33,21 @@ |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="startDate" label="起始日期" width="100" align="center"> |
|
|
|
<el-table-column prop="startDate" label="起始日期" width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-date-picker v-model="scope.row.startDate" type="date" placeholder="截止日期" size="small" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="endDate" label="截止日期" width="100" align="center"> |
|
|
|
<el-table-column prop="endDate" label="截止日期" width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-date-picker v-model="scope.row.endDate" type="date" placeholder="截止日期" size="small" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="customerOrgGroupIds" label="分组" width="160"> |
|
|
|
<el-table-column prop="customerOrgGroupIds" label="分组" width="215"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.customerOrgGroupIds" multiple collapse-tags filterable clearable |
|
|
|
placeholder="请选择分组" size="small"> |
|
|
|
<el-option v-for="item in dict.asbItemAll" :key="item.value" :label="item.displayName" :value="item.id" /> |
|
|
|
<el-select v-model="scope.row.customerOrgGroupIds" multiple collapse-tags filterable clearable style="width:210px;" |
|
|
|
placeholder="请选择分组" size="small" @focus="getCustGroup(scope.$index,scope.row.customerOrgRegister.id)"> |
|
|
|
<el-option v-for="item in scope.row.customerOrgGroupList" :key="item.value" :label="item.displayName" :value="item.id" /> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -99,8 +98,8 @@ export default { |
|
|
|
dateType: 'creationTime', // 登记日期:creationTime;体检日期:medicalStartDate;总检日期:summaryDate |
|
|
|
startDate: '', |
|
|
|
endDate: '', |
|
|
|
customerOrgGroupIds: [], //已选的体检次数 |
|
|
|
customerOrgGroupList: [], //已选的分组 |
|
|
|
customerOrgGroupIds: [], //已选分组 |
|
|
|
customerOrgGroupList: [], //可选的分组 |
|
|
|
}], |
|
|
|
}; |
|
|
|
}, |
|
|
|
@ -163,7 +162,7 @@ export default { |
|
|
|
if (this.preNodeId == this.curNodeId) { //第一次点击的节点和第二次点击的节点id相同 |
|
|
|
this.preNodeId = null; |
|
|
|
this.curNodeId = null; |
|
|
|
this.treeDbClick(data.id); |
|
|
|
this.treeDbClick(data); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@ -172,9 +171,10 @@ export default { |
|
|
|
}, 300) |
|
|
|
}, |
|
|
|
|
|
|
|
async treeDbClick(cusOrgId) { |
|
|
|
this.parentIds = getTreePids(this.patientRegister.customerOrgTreeAll, 'children', 'parentId', 'id', cusOrgId); |
|
|
|
this.childIds = getTreeAllChildIdsById(this.patientRegister.customerOrgTreeAll, 'children', 'id', cusOrgId); |
|
|
|
//双击树节点 后续处理 |
|
|
|
async treeDbClick(node) { |
|
|
|
this.parentIds = getTreePids(this.patientRegister.customerOrgTreeAll, 'children', 'parentId', 'id', node.id); |
|
|
|
this.childIds = getTreeAllChildIdsById(this.patientRegister.customerOrgTreeAll, 'children', 'id', node.id); |
|
|
|
|
|
|
|
//待添加的记录 |
|
|
|
let ldate = new Date(); |
|
|
|
@ -188,11 +188,11 @@ export default { |
|
|
|
customerOrgGroupIds: [], //已选的体检分组 |
|
|
|
customerOrgGroupList: [], //可选的分组 |
|
|
|
} |
|
|
|
record.customerOrgId = cusOrgId; |
|
|
|
if(cusOrgId != this.dict.personOrgId){ |
|
|
|
record.customerOrgId = node.id; |
|
|
|
if(node.id != this.dict.personOrgId){ |
|
|
|
try { |
|
|
|
// |
|
|
|
let res1 = await getapi(`/api/app/customer-org-register/in-customer-org-id/${cusOrgId}`); |
|
|
|
//let res = |
|
|
|
let res1 = await getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${cusOrgId}`); |
|
|
|
record.customerOrgRegisterList = res1.data; |
|
|
|
if(res1.data && res1.data.length > 0){ |
|
|
|
record.customerOrgRegister = res1.data[res1.data.length - 1]; |
|
|
|
@ -200,15 +200,37 @@ export default { |
|
|
|
record.endDate = res1.data[res1.data.length - 1].isComplete == 'N' ? ldate : res1.data[res1.data.length - 1].endTime; |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.log(`get: /api/app/customer-org-register/in-customer-org-id/${cusOrgId}`,error) |
|
|
|
console.log(`get: /api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${cusOrgId}`,error) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
let insableMsg = ''; |
|
|
|
this.dataCusOrgOCX.forEach(e =>{ |
|
|
|
if(this.parentIds.indexOf(e.customerOrgId) > - 1 && e.customerOrgRegister.id == record.customerOrgRegister.id){ |
|
|
|
insableMsg = "已经添加了上级节点,不可再添加此节点"; |
|
|
|
} |
|
|
|
if(this.childIds.indexOf(e.customerOrgId) > - 1 && e.customerOrgRegister.id == record.customerOrgRegister.id){ |
|
|
|
insableMsg = "已经添加了下级节点,不可再添加此节点"; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(insableMsg){ |
|
|
|
this.$message.warning(insableMsg); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this.dataCusOrgOCX.push(record); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//选分组 |
|
|
|
getCustGroup(index,groupId){ |
|
|
|
///api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=3fa85f64-5717-4562-b3fc-2c963f66afa6 |
|
|
|
getapi(`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${groupId}`).then(res =>{ |
|
|
|
if(res.code != - 1){ |
|
|
|
this.dataCusOrgOCX[index].customerOrgGroupList = res.data.items; |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
//选择单位 |
|
|
|
@ -225,7 +247,7 @@ export default { |
|
|
|
return; |
|
|
|
} |
|
|
|
getapi( |
|
|
|
`/api/app/customer-org-register/in-customer-org-id/${customerOrgId}` |
|
|
|
`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${customerOrgId}` |
|
|
|
).then((res) => { |
|
|
|
//console.log('res.data',res.data) |
|
|
|
if (res.code != -1) { |
|
|
|
@ -244,4 +266,30 @@ export default { |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style></style> |
|
|
|
<style lang="scss" scoped> |
|
|
|
::v-deep .el-input__inner { |
|
|
|
/*text-align: center;*/ |
|
|
|
padding-left: 1px; |
|
|
|
padding-right: 1px; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-table th.el-table__cell { |
|
|
|
/*text-align: center;*/ |
|
|
|
padding-left: 1px; |
|
|
|
padding-right: 1px; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-table td.el-table__cell { |
|
|
|
padding-left: 1px; |
|
|
|
padding-right: 1px; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-table .cell { |
|
|
|
padding-left: 1px; |
|
|
|
padding-right: 1px; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-icon-date:before { |
|
|
|
content: "" |
|
|
|
} |
|
|
|
</style> |