提交 73f12a9a 编写于 作者: yi.li's avatar yi.li

选择居民接口修改

上级 3a5c4cd7
......@@ -174,7 +174,7 @@ export const changeLabelName = (data) => {
export const getLabelDetail = (labelId, params) => {
return fetch({
headers,
url: getBaseUrl(`healths/labels/${labelId}/patients`),
url: getBaseUrl(`healths/labels/v2/${labelId}/patients`),
method: 'get',
params: params,
description: '获取分组详情',
......@@ -204,7 +204,7 @@ export const deleteCurrentPatients = data => {
export const saveLabelsForPatient = (labelId, data) => {
return fetch({
headers,
url: getBaseUrl(`healths/labels/${labelId}/patients`),
url: getBaseUrl(`healths/labels/v2/${labelId}/patients`),
method: 'post',
data: data,
description: '分组中添加居民',
......
......@@ -22,9 +22,9 @@
</div>
<div style="display: flex;justify-content: space-between;">
<div>
<el-form-item style="width: 100px;" prop="sex">
<el-form-item prop="sex">
<el-select
style="width: 100px;"
style="width: 100px !important;"
v-model="searchData.sex"
placeholder="请选择性别"
clearable>
......@@ -36,14 +36,14 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item style="width: 100px;" prop="ageRange">
<el-form-item prop="ageRange">
<el-select
v-model="searchData.ageRange"
multiple
collapse-tags
filterable
placeholder="请选择年龄段"
style="width: 100px;"
style="width: 100px !important;"
clearable>
<el-option
v-for="(item,index) in ageOptions"
......@@ -53,12 +53,12 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="diseaseId" style="width: 150px;">
<el-form-item prop="diseaseId">
<el-select
v-model="searchData.diseaseId"
multiple
collapse-tags
style="width: 150px;"
style="width: 150px !important;"
placeholder="请选择诊断"
clearable>
<el-option
......@@ -69,13 +69,13 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="labelId" style="width: 150px;">
<el-form-item prop="labelId">
<el-select
v-model="searchData.labelId"
multiple
collapse-tags
filterable
style="width: 150px;"
style="width: 150px !important;"
placeholder="请选择或搜索分组"
clearable>
<el-option
......@@ -86,13 +86,13 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="fuPlanIdList" v-if="selectPatientType == 1" style="width: 150px;">
<el-form-item prop="fuPlanIdList" v-if="selectPatientType == 1">
<el-select
v-model="searchData.fuPlanIdList"
multiple
collapse-tags
filterable
style="width: 150px;"
style="width: 150px !important;"
placeholder="请选择随访计划"
clearable>
<el-option
......@@ -103,12 +103,12 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="searchCondition" style="width:150px;">
<el-form-item prop="searchCondition">
<el-input
v-model="searchData.searchCondition"
placeholder="请输入姓名,手机号,身份证"
clearable
style="width:150px;">
style="width:150px !important;">
<!--<i slot="prefix" class="el-input__icon el-icon-search" @click="searchHandler" style="cursor: pointer"></i>-->
</el-input>
</el-form-item>
......@@ -276,6 +276,11 @@
patientIdList: Array,// 确定已经选过的居民
oldPatientIdList: Array,// 确定已经选过的居民
selectPatientType: Number, //获取居民列表所需字段,随访是1,分组是2,患教是3
sourceId: {
type: String,
required: false,
default: '',
},
},
watch: {
isShowSelectPatient(val){
......@@ -343,6 +348,7 @@
srvPackageId:this.srvPackageId,
addType: this.selectPatientType, //随访是1,分组是2,患教是3
fuPlanIdList: this.searchData.fuPlanIdList || [],
sourceId: this.sourceId, //若是随访的话,传planId;若是分组的话,传labeledId;
}
getPatientInfoList(data).then(res=>{
if(res.data.patientList){
......@@ -378,7 +384,7 @@
}else {
item.showDiseaseNames = '-';
}
//针对随访项目
if(this.patientIdList.length > 0){
if(this.patientIdList.includes(item.patientId)){// 如果已经选过居民
this.$nextTick(()=>{
......@@ -397,6 +403,26 @@
}
})
}
//针对分组详情
// this.patientIdList = res.data.selectedPatientIdList;
let selectedPatientIdList = res.data.selectedPatientIdList;
if(selectedPatientIdList && selectedPatientIdList.length > 0){
if(selectedPatientIdList.includes(item.patientId)){// 如果已经选过居民
this.$nextTick(()=>{
this.$refs.multipleTable.toggleRowSelection(item,true);
})
}
}
if(selectedPatientIdList && selectedPatientIdList.length > 0) {
this.patientsData.forEach((item)=>{
if(selectedPatientIdList.includes(item.patientId)){// 如果已经选过居民
item.disableNum = 0;
this.oldPatientList.push(item);
} else {
item.disableNum = 1
}
})
}
})
// console.log(this.oldPatientIdList)
......@@ -434,6 +460,8 @@
handleCurrentChangePre(val) {
this.paginationSet.pageNum = val
this.getPatientsList()
// document.querySelector('.el-table__header-wrapper').scrollTop = '-10';
console.log('滚动条置顶',document.querySelector('.el-table__header-wrapper').scrollTop)
},
clickClose(){
this.$emit('closeSelectPatient',false)
......@@ -467,6 +495,7 @@
this.showReloadModal = true;
},
handleReload() {
this.paginationSet.pageNum = 1;
this.getPatientsList();
this.showReloadModal = false;
},
......
......@@ -144,6 +144,7 @@
:oldPatientIdList="patientIdList"
@closeSelectPatient="closeSelectPatient"
:selectPatientType="selectPatientType"
:sourceId="String(this.$route.query.labelId)"
@sureSelectPatient="sureSelectPatient(arguments)"
/>
</div>
......@@ -177,6 +178,7 @@
showDeletePatientsDialog: false,
isShowSelectPatient: false,
patientIdList: [],
sourceId: '',
searchData: {
pageNo: 1, // 第几页
pageSize: 15, // 每页条数
......@@ -230,7 +232,7 @@
// console.log('获取分组详情>> ', data)
if(data.data){
this.searchData = data.data;
this.patientIdList = data.data.patientIdList;
// this.patientIdList = data.data.patientIdList;
let list = data.data.patientListsByLabelModels;
if(list && list.length > 0){
this.searchData.tableData = list;
......@@ -413,14 +415,14 @@
sureSelectPatient() {
let getArguments = arguments[0];
const selectPatients = getArguments[1]; // 每次选中获取的人
const oldPatients = getArguments[2]; // 该分组已经存在的居民
// const oldPatients = getArguments[2]; // 该分组已经存在的居民
let labelId = this.$route.query.labelId;
let patientLen = selectPatients.length;
let savePatientsList = selectPatients.concat(oldPatients);
// let savePatientsList = selectPatients.concat(oldPatients);
saveLabelsForPatient(labelId,{
newLablelName: this.$route.query.labelName,
oldLabelName: this.$route.query.labelName,
saveLists: savePatientsList,
saveLists: selectPatients,
// token:
}).then((data) => {
if(data.code == '000000') {
......
......@@ -110,7 +110,7 @@
<div slot="empty">
<div class="table-empty">
<img src="../../../assets/image/no-content1.png">
<p>没有查询到相关结果</p>
<p>暂无任何居民,去添加居民</p>
</div>
</div>
</el-table>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册