提交 425f450c 编写于 作者: chengxiang.li's avatar chengxiang.li

fix merge

...@@ -16,8 +16,43 @@ export const getConstants = (params) => { ...@@ -16,8 +16,43 @@ export const getConstants = (params) => {
description: '获取常量', description: '获取常量',
}) })
}; };
/*获取省市县乡列表*/
export const getProvinceList = (params) => {
return fetch({
headers,
url: getBaseUrl(`basic-data/position/provinces`),
method: 'get',
params: params,
description: '获取省列表',
})
};
export const getCityList = (params) => {
return fetch({
headers,
url: getBaseUrl(`basic-data/position/cities`),
method: 'get',
params: params,
description: '获取市列表',
})
};
export const getCountyList = (params) => {
return fetch({
headers,
url: getBaseUrl(`basic-data/position/counties`),
method: 'get',
params: params,
description: '获取区县列表',
})
};
export const getTownList = (params) => {
return fetch({
headers,
url: getBaseUrl(`basic-data/position/towns`),
method: 'get',
params: params,
description: '获取乡镇列表',
})
};
/*居民管理*/ /*居民管理*/
export const getPatientList = (data) => { export const getPatientList = (data) => {
return fetch({ return fetch({
...@@ -116,6 +151,18 @@ export const deleteCurrentPatients = data => { ...@@ -116,6 +151,18 @@ export const deleteCurrentPatients = data => {
}) })
} }
<<<<<<< HEAD
=======
export const saveLabelsForPatient = (labelId, data) => {
return fetch({
headers,
url: getBaseUrl(`healths/labels/${labelId}/patients`),
method: 'post',
data: data,
description: '分组中添加居民',
})
}
>>>>>>> 4f5afc8ed770a74179b192c64944c2c0c7273804
// 获取七牛上传token // 获取七牛上传token
export const getQiniuToken = (params) => { export const getQiniuToken = (params) => {
...@@ -239,3 +286,13 @@ export const getHealthRecordList = (data) => { ...@@ -239,3 +286,13 @@ export const getHealthRecordList = (data) => {
description: '健康档案记录列表', description: '健康档案记录列表',
}) })
}; };
/*新的获取居民接口,搜索条件有变化*/
export const getPatientInfoList = (data) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/v2/infolist`),
method: 'post',
data: data,
description: '获取居民列表',
})
};
...@@ -152,6 +152,7 @@ ...@@ -152,6 +152,7 @@
deleteCurrentLabel, deleteCurrentLabel,
changeLabelName, changeLabelName,
deleteCurrentPatients, deleteCurrentPatients,
saveLabelsForPatient,
} from '@/utils/patients/patientsapi' } from '@/utils/patients/patientsapi'
import SelectPatient from './dialog/select-patitents'; import SelectPatient from './dialog/select-patitents';
...@@ -216,6 +217,7 @@ ...@@ -216,6 +217,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;
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;
...@@ -371,6 +373,7 @@ ...@@ -371,6 +373,7 @@
type: 'success' type: 'success'
}); });
this.showDeletePatientsDialog = false; this.showDeletePatientsDialog = false;
this.getDetail();
}else{ }else{
this.$message({ this.$message({
message: '请求接口失败,请重新再试', message: '请求接口失败,请重新再试',
...@@ -384,8 +387,30 @@ ...@@ -384,8 +387,30 @@
addPatientsHandler() { addPatientsHandler() {
this.isShowSelectPatient = true; this.isShowSelectPatient = true;
}, },
closeSelectPatient() {}, closeSelectPatient(val) {
sureSelectPatient(arg) { this.isShowSelectPatient = val;
},
sureSelectPatient() {
let getArguments = arguments[0];
const selectPatients = getArguments[1]; // 每次选中获取的人
let labelId = this.$route.query.labelId;
let patientLen = selectPatients.length;
saveLabelsForPatient(labelId,{
newLablelName: this.$route.query.labelName,
oldLabelName: this.$route.query.labelName,
saveLists: selectPatients,
// token:
}).then((data) => {
if(data.code == '000000') {
setTimeout(() => {
this.$message.success(`已成功添加${patientLen}位居民`)
this.isShowSelectPatient = getArguments[0];
this.getDetail();
},500)
}else {
this.$message.error(data.message)
}
})
}, },
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</bread-crumb> </bread-crumb>
<div class="f-main-content screenSet"> <div class="f-main-content screenSet">
<div class="header-title"> <div class="header-title">
<span>基本信息</span> <span>居民信息</span>
<p> <p>
<el-button plain size="small" @click="cancelEdit">取消</el-button> <el-button plain size="small" @click="cancelEdit">取消</el-button>
<el-button type="primary" size="small" @click="saveEdit">保存</el-button> <el-button type="primary" size="small" @click="saveEdit">保存</el-button>
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
<script> <script>
import BreadCrumb from '@/components/breadcrumb' import BreadCrumb from '@/components/breadcrumb'
import editInformation from './components/edit-information' import editInformation from './components/edit-information'
import { mapGetters } from 'vuex' import { getPatientDetail, savePatientInfo } from '@/utils/patients/patientsapi'
import { getPatientDetail, getRemindPatient, savePatientInfo } from '@/utils/patients/patientsapi'
export default { export default {
name: "basicInfo", name: "basicInfo",
components: { components: {
...@@ -50,11 +49,7 @@ ...@@ -50,11 +49,7 @@
this.patientId = String(this.$route.query.patientId); this.patientId = String(this.$route.query.patientId);
this.init(); this.init();
}, },
computed: { computed: {},
...mapGetters([
'_token',
])
},
methods: { methods: {
init() { init() {
getPatientDetail(this.patientId).then((data) => { getPatientDetail(this.patientId).then((data) => {
...@@ -72,10 +67,10 @@ ...@@ -72,10 +67,10 @@
addListenSave(val) { addListenSave(val) {
this.checkForm = false; this.checkForm = false;
if(val.status) { if(val.status) {
this.patientInfo = val.patientInfoForm // this.patientInfo = val.patientInfoForm
savePatientInfo(this.patientInfo).then(data => { savePatientInfo(val.patientInfoForm).then(data => {
if(data.code == '000000'){ if(data.code == '000000'){
this.$message.success('保存备注成功') this.$message.success('修改成功')
setTimeout(() => { setTimeout(() => {
this.$router.go(-1); this.$router.go(-1);
},500) },500)
...@@ -88,24 +83,6 @@ ...@@ -88,24 +83,6 @@
this.$message.error('请正确填写信息'); this.$message.error('请正确填写信息');
} }
}, },
//提醒绑定
// remindBind() {
// let remindMobileWechatPara = {
// qrcodeType: 1,
// patientId: this.patientId,
// // deviceInfo: window.getDeviceInfo()
// }
// getRemindPatient({
// ...remindMobileWechatPara
// }).then( data => {
// if(data.code == '000000') {
// this.$message.success(data.data.respMsg);
// }else {
// this.$message.error(data.message);
// }
// })
// },
}, },
filters: { filters: {
emptyFilter: function(value) { emptyFilter: function(value) {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div><p class="title">身份证:</p><p class="info">{{patientInfo.idNo | emptyFilter}}</p></div> <div><p class="title">身份证:</p><p class="info">{{patientInfo.idNo | emptyFilter}}</p></div>
</div> </div>
<div class="item"> <div class="item">
<div><p class="title">出生年月:</p><p class="info">{{birthTimeDisplay | emptyFilter}}</p></div> <div><p class="title">出生日期:</p><p class="info">{{birthTimeDisplay | emptyFilter}}{{(patientInfo.age || patientInfo.age == 0) ? `、${patientInfo.age}岁` : ''}}</p></div>
<div><p class="title">性别:</p><p class="info">{{patientInfo.sex | sexFileter}}</p></div> <div><p class="title">性别:</p><p class="info">{{patientInfo.sex | sexFileter}}</p></div>
</div> </div>
<div class="item"> <div class="item">
...@@ -53,8 +53,9 @@ ...@@ -53,8 +53,9 @@
<div><p class="title">工作单位:</p><p class="info">{{patientInfo.workplace | emptyFilter}}</p></div> <div><p class="title">工作单位:</p><p class="info">{{patientInfo.workplace | emptyFilter}}</p></div>
<div> <div>
<p class="title">微信:</p> <p class="title">微信:</p>
<p class="info" v-if="patientInfo.isWechatBind == '1'">未绑定 <el-button type="text" class="ml10" @click="remindBind" v-if="patientInfo.isRemind == '1'">提醒绑定</el-button><span class="ml10" v-if="patientInfo.isRemind == '2'">已提醒</span></p> <p class="info" v-if="patientInfo.isWechatBind == '1'">未绑定 <el-button type="text" class="ml10" @click="remindBind" style="color: #449284;" v-if="patientInfo.isRemind == '1'">提醒绑定</el-button><span class="ml10" v-if="patientInfo.isRemind == '2'">已提醒</span></p>
<p class="info" v-else-if="patientInfo.isWechatBind == '2'">已绑定 <span class="ml10">(微信名:{{patientInfo.wechatNickname | emptyFilter}}</span></p> <!--<p class="info" v-else-if="patientInfo.isWechatBind == '2'">已绑定 <span class="ml10">(微信名:{{patientInfo.wechatNickname | emptyFilter}}</span></p>-->
<p class="info" v-else-if="patientInfo.isWechatBind == '2'">{{patientInfo.wechatNickname | emptyFilter}}</p>
<p class="info" v-else>-</p> <p class="info" v-else>-</p>
</div> </div>
</div> </div>
...@@ -228,8 +229,8 @@ ...@@ -228,8 +229,8 @@
}, },
getRecordList() { getRecordList() {
let reqPara = { let reqPara = {
// patientId: this.patientId, patientId: this.patientId,
patientId: '99997701', // patientId: '99997701',
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
} }
...@@ -257,11 +258,7 @@ ...@@ -257,11 +258,7 @@
} }
}) })
}, },
tabChangeHandler(tab) { tabChangeHandler(tab) {},
// if(tab.name == 'second'){
// this.getRecordList(true);
// }
},
deletePatient() { deletePatient() {
// 把写的提示信息需要换行的地方分成数组 confirmText // 把写的提示信息需要换行的地方分成数组 confirmText
const confirmText = ['您确定要删除此居民吗?', '删除后,您将无法对该居民发送患教和进行随访,重新添加该居民依旧可查看历史发送记录及随访记录']; const confirmText = ['您确定要删除此居民吗?', '删除后,您将无法对该居民发送患教和进行随访,重新添加该居民依旧可查看历史发送记录及随访记录'];
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册