提交 0f230b01 编写于 作者: yi.li's avatar yi.li

增加接口

上级 a5336279
......@@ -22,3 +22,47 @@
padding-left: 20px;
padding-right: 20px;
}
/*重置单选按钮样式*/
.el-radio-button__orig-radio:checked+.el-radio-button__inner {
background-color: #449284;
border-color: #449284;
box-shadow: -1px 0 0 0 #449284;
}
.el-radio-button__inner:hover {
color: #449284;
}
/*重置输入框,选择框样式*/
.el-range-editor.is-active, .el-range-editor.is-active:hover, .el-select .el-input.is-focus .el-input__inner,.el-input__inner:focus{
border-color: #449284;
}
.el-select-dropdown__item.selected {
color: #449284;
}
.el-select .el-input__inner:focus {
border-color: #449284;
}
/*重置文字按钮样式*/
.el-button--text{
color: #606266;
}
.el-button--text:focus, .el-button--text:hover{
color: #449284;
}
/*重置表格选择框*/
.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
border-color: #449284;
background-color: #449284;
}
.el-checkbox__inner {
border-color: #DCDFE6!important;
}
.el-checkbox__input.is-focus,.el-checkbox__inner:hover,.el-checkbox__inner.is-focus {
border-color: #449284!important;
}
/*重置textarea聚焦样式*/
.el-textarea__inner:focus {
border-color: #449284!important;
}
......@@ -152,12 +152,21 @@ export const savePatientInfo = (data) => {
description: '保存居民信息',
})
};
export const getLabelsList = (params) => {
export const getNationsList = (params) => {
return fetch({
headers,
url: getBaseUrl(`healths/labels/`),
url: getBaseUrl(`resident/constants/nations`),
method: 'get',
params: params,
description: '获取分组列表',
description: '获取56个民族列表',
})
};
export const getHealthRecordList = (data) => {
return fetch({
headers,
url: getBaseUrl(`followup/entering/health/records`),
method: 'post',
data: data,
description: '健康档案记录列表',
})
};
......@@ -9,9 +9,9 @@
<div class="f-main-content screenSet">
<div class="header-title">
<span>基本信息</span>
<p><el-button plain size="small">取消</el-button><el-button type="primary" size="small">保存</el-button></p>
<p><el-button plain size="small">取消</el-button><el-button type="primary" size="small" @click="saveEdit">保存</el-button></p>
</div>
<edit-information></edit-information>
<edit-information :patientInfoObj="patientInfo" :checkForm="checkForm"></edit-information>
</div>
</div>
</template>
......@@ -20,7 +20,7 @@
import BreadCrumb from '@/components/breadcrumb'
import editInformation from './components/edit-information'
import { mapGetters } from 'vuex'
import { getDiseasesList, getPatientDetail, getRemindPatient, deletePatient,savePatientInfo } from '@/utils/patients/patientsapi'
import { getPatientDetail, getRemindPatient, deletePatient,savePatientInfo } from '@/utils/patients/patientsapi'
export default {
name: "basicInfo",
components: {
......@@ -34,35 +34,24 @@
curmbSecond: '我的居民',
curmbThird: '居民详情',
jumPathThird: '/patients-manage/mypatients-manage/patients-list',
patientId: '99997786', //暂时写死一个居民的patientId
patientId: '', //暂时写死一个居民的patientId
patientInfo: {
isWechatBind: 1,
remark: '',
},
showLabelName: '',
showDiseaseName: '',
birthTimeDisplay: '',
recordList: [{}],
checkForm: false
}
},
created() {
this.patientId = this.$route.query.patientId;
this.init();
// getDiseasesList().then(({data}) => {
// console.log('获取所有疾病',data)
// })
},
computed: {
// ...mapState('planManage',{
// remarkOption: state => state.remarkOption,
// templateOptions: state => state.templateOptions,
// })
...mapGetters([
'_token',
])
},
methods: {
// ...mapActions('planManage', ['getTimeNodeList','getRemarkOption','getFollowupTemplate']),
init() {
getPatientDetail(this.patientId).then((data) => {
if(data.code == '000000') {
......@@ -103,6 +92,9 @@
}
})
},
saveEdit() {
this.checkForm = true;
},
//提醒绑定
remindBind() {
let remindMobileWechatPara = {
......
......@@ -7,16 +7,25 @@
label-width="150px"
label-suffix=":"
size="small"
:inline="true">
>
<el-row>
<el-col :span="12">
<el-form-item label="居民姓名" prop="nickname">
<el-input v-model="patientInfoForm.nickname" placeholder="请输入居民姓名"></el-input>
<el-input
v-model="patientInfoForm.nickname"
placeholder="请输入居民姓名"
clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="手机号" prop="mobilePhone">
<el-input v-model="patientInfoForm.mobilePhone" maxlength="11" placeholder="请输入手机号"></el-input>
<el-input
v-model="patientInfoForm.mobilePhone"
maxlength="11"
placeholder="请输入手机号"
clearable>
</el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -24,7 +33,10 @@
<el-row>
<el-col :span="12">
<el-form-item label="诊断" prop="diseaseIdList">
<el-select v-model="patientInfoForm.diseaseIdList" multiple placeholder="请选择居民疾病诊断">
<el-select
v-model="diseaseIdList"
multiple
placeholder="请选择居民疾病诊断">
<el-option
v-for="item in diseasesList"
:key="item.diseaseId"
......@@ -36,7 +48,10 @@
</el-col>
<el-col :span="12">
<el-form-item label="分组" prop="labelIdList">
<el-select v-model="patientInfoForm.labelIdList" multiple placeholder="请选择居民分组">
<el-select
v-model="labelIdList"
multiple
placeholder="请选择居民分组">
<el-option
v-for="item in labelsList"
:key="item.labelId"
......@@ -51,7 +66,12 @@
<el-row>
<el-col :span="12">
<el-form-item label="身份证" prop="idNo">
<el-input v-model="patientInfoForm.idNo" placeholder="请输入身份证"></el-input>
<el-input
v-model="patientInfoForm.idNo"
placeholder="请输入身份证"
clearable
:disabled="hasIdNo">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -62,7 +82,8 @@
placeholder="请选择出生年月"
value-format="yyyy-MM-dd"
value="yyyy-MM-dd"
style="width:250px">
style="width:250px"
clearable>
</el-date-picker>
</el-form-item>
</el-col>
......@@ -71,7 +92,6 @@
<el-col :span="12">
<el-form-item label="年龄" prop="age">
<span>{{patientInfoForm.age}}</span>
<!--<el-input v-model="patientInfoForm.age" placeholder="请输入身份证"></el-input>-->
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -85,25 +105,31 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="常驻类型" prop="diseaseIdList">
<el-select v-model="patientInfoForm.diseaseIdList" multiple placeholder="请选择居民疾病诊断">
<el-form-item label="常驻类型" prop="permanentResidence">
<el-select
v-model="patientInfoForm.permanentResidence"
placeholder="请选择居民常驻类型"
clearable>
<el-option
v-for="item in diseasesList"
:key="item.diseaseId"
:label="item.diseaseName"
:value="item.diseaseId">
v-for="item in residenceList"
:key="item.no"
:label="item.value"
:value="item.noChar">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="民族" prop="labelIdList">
<el-select v-model="patientInfoForm.labelIdList" multiple placeholder="请选择居民分组">
<el-form-item label="民族" prop="nationality">
<el-select
v-model="patientInfoForm.nationality"
placeholder="请选择民族"
clearable>
<el-option
v-for="item in labelsList"
:key="item.labelId"
:label="item.labelName"
:value="item.labelId">
v-for="item in nationsList"
:key="item.code"
:label="item.name"
:value="item.code">
</el-option>
</el-select>
</el-form-item>
......@@ -112,12 +138,75 @@
<el-row>
<el-col :span="12">
<el-form-item label="医保号" prop="socialCard">
<el-input v-model="patientInfoForm.socialCard" placeholder="请输入居民医保卡号码"></el-input>
<el-input
v-model="patientInfoForm.socialCard"
placeholder="请输入居民医保卡号码"
clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="健康档案编号" prop="fileLocator">
<el-input v-model="patientInfoForm.fileLocator" placeholder="请输入居民健康档案编号"></el-input>
<el-input
v-model="patientInfoForm.fileLocator"
placeholder="请输入居民健康档案编号"
clearable>
</el-input>
</el-form-item>
</el-col>
</el-row>
<div class="has-header">联系方式</div>
<el-row>
<el-col :span="12">
<el-form-item label="所在地区" prop="patientAddress">
<el-input
v-model="patientInfoForm.patientAddress"
placeholder="请输入居民医保卡号码"
clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="详细地址" prop="address">
<el-input
v-model="patientInfoForm.address"
placeholder="请输入居民的详细地址"
clearable>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="工作单位" prop="workplace">
<el-input
v-model="patientInfoForm.workplace"
placeholder="请输入居民的工作单位"
clearable>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="微信" prop="address">
<p class="info" v-if="patientInfoForm.isWechatBind == '1'">未绑定 <el-button type="text" class="ml10" @click="remindBind" v-if="patientInfoForm.isRemind == '1'">提醒绑定</el-button><span class="ml10" v-if="patientInfoForm.isRemind == '2'">已提醒</span></p>
<p class="info" v-else-if="patientInfoForm.isWechatBind == '2'">已绑定 <span class="ml10">(微信名:{{patientInfoForm.wechatNickname | emptyFilter}}</span></p>
</el-form-item>
</el-col>
</el-row>
<div class="has-header">其他</div>
<el-row>
<el-col :span="16">
<el-form-item label="备注" prop="remark">
<el-input
type="textarea"
v-model="patientInfoForm.remark"
placeholder="请输入内容"
clearable
maxlength="200"
:autosize="{ minRows: 3, maxRows: 7}"
show-word-limit>
</el-input>
<span class="text-count">{{currentCount}} / 200</span>
</el-form-item>
</el-col>
</el-row>
......@@ -126,7 +215,7 @@
</template>
<script>
import { mapGetters } from 'vuex'
import { getDiseasesList, getLabelsList, getPatientDetail, getRemindPatient, deletePatient,savePatientInfo } from '@/utils/patients/patientsapi'
import { getDiseasesList, getLabelList, getConstants, getNationsList, getRemindPatient,savePatientInfo } from '@/utils/patients/patientsapi'
export default {
name: "basicInfo",
components: {},
......@@ -134,108 +223,108 @@
return {
diseasesList: [],
labelsList: [],
residenceList: [],
nationsList: [],
diseaseIdList: [],
labelIdList: [],
patientInfoForm: {
nickname: '',
mobilePhone: '',
diseaseIdList: [],
labelIdList: [],
diseases: [],
customLabels: [],
idNo: '',
birthTime: '',
age: '',
sex: null,
permanentResidence: '',
nationality: '',
socialCard: '',
fileLocator: '',
isWechatBind: 1,
isRemind: 1,
wechatNickname: '',
remark: '',
},
hasIdNo: false,
validStatus: false,
rules: {
nickname: [{required: true, message: '请输入居民姓名', trigger: ['change', 'blur'] }],
mobilePhone: [{required: true, message: '请输入手机号', trigger: ['change', 'blur'] }],
},
patientId: '99997786', //暂时写死一个居民的patientId
patientInfo: {
isWechatBind: 1,
remark: '',
},
showLabelName: '',
showDiseaseName: '',
birthTimeDisplay: '',
recordList: [{}],
}
},
props: {
patientInfoObj: Object,
checkForm: Boolean,
},
watch: {
patientInfoObj(val){
if(val){
this.patientInfoForm = val;
let customLabels = this.patientInfoForm.customLabels;
let diseases = this.patientInfoForm.diseases;
if(customLabels && customLabels.length > 0){
customLabels.forEach((kkk)=>{
this.labelIdList.push(kkk.labelId)
})
}
if(diseases && diseases.length > 0) {
diseases.forEach((kkk)=>{
this.diseaseIdList.push(kkk.diseaseId)
})
}
this.$forceUpdate();
}
},
checkForm(val){
if(val){// 触发校验
this.saveInfoData();
}
},
},
created() {
this.init();
this.initConstant();
},
computed: {
// ...mapState('planManage',{
// remarkOption: state => state.remarkOption,
// templateOptions: state => state.templateOptions,
// })
...mapGetters([
'_token',
])
]),
currentCount(){
return this.patientInfoForm.remark.length
},
},
methods: {
// ...mapActions('planManage', ['getTimeNodeList','getRemarkOption','getFollowupTemplate']),
initConstant(){
getDiseasesList().then((data) => {
if(data.code == '000000') {
this.diseasesList = data.data;
}
});
getLabelsList({
getLabelList({
type: 1,
token: 'AB2BEE40C5AD452E93688D31A14E8C12'
token: 'FFA85945A8374A4CB63A7616E38060DA',
// token: this._token,
}).then((data) => {
if(data.code == '000000') {
this.labelsList = data.data.labelNameList;
}
})
},
init() {
getPatientDetail(this.patientId).then((data) => {
if(data.code == '000000') {
this.patientInfo = data.data;
if(this.patientInfo){
let customLabels = this.patientInfo.customLabels;
let diseases = this.patientInfo.diseases;
let groupLabelNames = [];
let groupDiseaseNames = [];
//对出生日期的处理
if(this.patientInfo.birthTime){
let timeArr = this.patientInfo.birthTime.split('-');
let mm = parseInt(timeArr[1]) < 10 ? `0${parseInt(timeArr[1])}` : parseInt(timeArr[1]);
let dd = parseInt(timeArr[2]) < 10 ? `0${parseInt(timeArr[2])}` : parseInt(timeArr[2]);
this.birthTimeDisplay = `${timeArr[0]}-${mm}-${dd}`;
}else {
this.birthTimeDisplay = '';
}
// 对分组的处理
if(customLabels) {
customLabels.forEach(item => {
groupLabelNames.push(item.label)
});
this.showLabelName = groupLabelNames.join(';');
} else {
this.showLabelName = '';
getConstants({
numList: 'P221',
}).then((data) => {
if(data.code == '000000') {
this.residenceList = data.data.P221;
}
// 对诊断疾病的处理
if(diseases) {
diseases.forEach(item => {
groupDiseaseNames.push(item.diseaseName)
});
this.showDiseaseName = groupDiseaseNames.join(';');
} else {
this.showDiseaseName = '';
}
}
getNationsList().then((data) => {
if(data.code == '000000') {
this.nationsList = data.data;
}
})
},
......@@ -256,15 +345,24 @@
}
})
},
//保存备注
saveRemark() {
savePatientInfo(this.patientInfo).then(data => {
if(data.code == '000000'){
this.$message.success('保存备注成功')
}else {
this.$message.error(data.message);
}
saveInfoData() {
this.$refs['patientInfoForm'].validate((valid) => {
// this.validStatus = valid;
console.log('校验开始')
if (valid) {
this.$emit('addListenSave',{
status: true,
patientInfoForm: this.patientInfoForm
})
console.log('校验通过')
} else {
this.$emit('addListenSave',{
status: false,
patientInfoForm: this.patientInfoForm,
})
return false;
}
});
},
},
filters: {
......@@ -275,17 +373,6 @@
return value;
}
},
sexFileter: function(value) {
if (!value && value != 0) {
return '-';
} else {
let hash = {
1: '男',
2: '女'
};
return hash[value];
}
},
},
}
</script>
......@@ -300,5 +387,20 @@
margin-bottom: 20px;
border-bottom: 1px dashed #888;
}
.info{
font-size: 12px;
color: #999;
}
.text-count{
position: absolute;
right: 5px;
bottom: 0px;
line-height: 28px;
color: #999;
font-size: 12px;
}
.ml10{
margin-left: 10px;
}
}
</style>
......@@ -80,45 +80,28 @@
</el-tab-pane>
<el-tab-pane label="健康记录" name="second">
<div class="health-record-list" v-if="recordList.length">
<div class="item">
<div class="record-date">2019-3-20</div>
<div class="record-content">
<div class="record-title">
<p>长海医院2型糖尿病18年随访计划-第3次随访</p>
<span>门诊随访</span>
</div>
<div class="list-visit">
<span class="left-label">患教内容:</span>
<div class="right-item">健康漫画标题</div>
</div>
<div class="list-visit">
<span class="left-label">随访量表:</span>
<div class="right-item">
<p>高血压随访量表<span class="check-btn" @click="openScaleDetail">查看量表</span></p>
<p>糖尿病随访量表<span class="check-btn" @click="openScaleDetail">查看量表</span></p>
</div>
</div>
</div>
</div>
<div class="item">
<div class="record-date">2019-2-20</div>
<div class="item" v-for="(item, index) in recordList" :key="index">
<div class="record-date">{{item.finishedTime}}</div>
<div class="record-content">
<div class="record-title">
<p>长海医院2型糖尿病18年随访计划-第3次随访</p>
<span>门诊随访</span>
<p>{{item.name}}-第{{item.seqNo}}次随访</p>
<span>{{item.fuTypeValue}}</span>
</div>
<div class="list-visit">
<span class="left-label">患教内容:</span>
<div class="right-item">健康漫画标题</div>
<div class="right-item">{{item.sendContent | emptyFilter}}</div>
</div>
<div class="list-visit">
<span class="left-label">随访量表:</span>
<div class="right-item">
<p>高血压随访量表<span class="check-btn" @click="openScaleDetail">查看量表</span></p>
<p v-for="(item2, index2) in item.scaleSimpleDtos" :key="index2">{{item2.name}}
<!--<span class="check-btn" @click="openScaleDetail(item2.url)">查看量表</span>-->
</p>
</div>
</div>
</div>
</div>
<p style="text-align: center;padding:10px 0;cursor: pointer">点击加载更多</p>
</div>
<div class="no-record-content" v-if="!recordList.length">
<div>
......@@ -136,7 +119,7 @@
<script>
import BreadCrumb from '@/components/breadcrumb'
import { mapGetters } from 'vuex'
import { getDiseasesList, getPatientDetail, getRemindPatient, deletePatient,savePatientInfo } from '@/utils/patients/patientsapi'
import { getDiseasesList, getPatientDetail, getRemindPatient, deletePatient, savePatientInfo, getHealthRecordList } from '@/utils/patients/patientsapi'
export default {
name: "patientDetail",
components: {
......@@ -151,6 +134,7 @@
jumPathThird: '/patients-manage/mypatients-manage/patients-list',
activeName: 'first',
patientId: '',
doctorId: '',
patientInfo: {
isWechatBind: 1,
remark: '',
......@@ -158,33 +142,28 @@
showLabelName: '',
showDiseaseName: '',
birthTimeDisplay: '',
recordList: [{}],
recordList: [],
hasMore: true,
}
},
created() {
this.patientId = this.$route.query.patientId;
this.init();
// getDiseasesList().then(({data}) => {
// console.log('获取所有疾病',data)
// })
},
mounted() {
},
computed: {
// ...mapState('planManage',{
// remarkOption: state => state.remarkOption,
// templateOptions: state => state.templateOptions,
// })
...mapGetters([
'_token',
])
},
methods: {
// ...mapActions('planManage', ['getTimeNodeList','getRemarkOption','getFollowupTemplate']),
init() {
getPatientDetail(this.patientId).then((data) => {
if(data.code == '000000') {
this.patientInfo = data.data;
if(this.patientInfo){
this.doctorId = this.patientInfo.doctorId;
let customLabels = this.patientInfo.customLabels;
let diseases = this.patientInfo.diseases;
let groupLabelNames = [];
......@@ -220,11 +199,30 @@
}
})
},
getRecordList(pageNo, pageSize) {
let reqPara = {
doctorId: '101281458',
// patientId: this.patientId,
patientId: '99997701',
pageNo: pageNo,
pageSize: pageSize,
}
getHealthRecordList(reqPara).then((data) => {
if(data.code == '000000'){
this.recordList = data.data.healthRecordDtos;
// let total = data.data.count;
}else {
this.$message.error(data.message)
}
})
},
tabChangeHandler(tab) {
// console.log(tab);
if(tab.name == 'second'){
this.getRecordList(1,2);
}
},
deletePatient() {
// 把写的提示信需要换行的地方分成数组 confirmText
// 把写的提示信需要换行的地方分成数组 confirmText
const confirmText = ['您确定要删除此居民吗?', '删除后,您将无法对该居民发送患教和进行随访,重新添加该居民依旧可查看历史发送记录及随访记录'];
const newDatas = [];
const h = this.$createElement;
......@@ -241,7 +239,6 @@
let reqParam = {
patientIdList: [this.patientId],
token: this._token,
// token: 'AB2BEE40C5AD452E93688D31A14E8C12',
};
deletePatient(reqParam).then(data => {
if(data.code == '000000') {
......@@ -268,7 +265,14 @@
});
});
},
editPatient() {},
editPatient() {
this.$router.push({
path: '/patients-manage/mypatients-manage/basic-info',
query: {
patientId: this.patientId
}
})
},
//提醒绑定
remindBind() {
let remindMobileWechatPara = {
......@@ -281,6 +285,7 @@
}).then( data => {
if(data.code == '000000') {
this.$message.success(data.data.respMsg);
this.init();
}else {
this.$message.error(data.message);
}
......@@ -291,26 +296,17 @@
savePatientInfo(this.patientInfo).then(data => {
if(data.code == '000000'){
this.$message.success('保存备注成功')
this.init();
}else {
this.$message.error(data.message);
}
})
},
//查看量表详情
openScaleDetail() {
console.log('打开量表');
// this.$router.push({
// path: '/followup/record-manage/form-template',
// query: {
// doctorId: val.doctorId,
// scaleNo: val.resourceId,
// planPatientsTimesId:
// val.planPatientsTimesId,
// showBtn: 0
// }
// });
// window.open()
openScaleDetail(url) {
window.open(url)
},
},
filters: {
emptyFilter: function(value) {
......@@ -391,6 +387,8 @@
}
}
.health-record-list{
height: 500px;
overflow-y: scroll;
.item{
width: 100%;
margin-bottom: 15px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册