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

选择居民接口修改

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