提交 75ef9018 编写于 作者: yi.li's avatar yi.li

添加居民详情接口

上级 030480f7
......@@ -13,3 +13,11 @@
color: #449284;
border-color: #449284;
}
/*恢复messageBox默认样式*/
.el-message-box {
}
.el-message-box__status+.el-message-box__message{
padding-left: 20px;
padding-right: 20px;
}
......@@ -4,8 +4,8 @@ import { getBaseUrl, getSaasDomain } from '@/utils/index'
const headers = {
sysCode: 9
} /**/
/*工作台*/
}
/*居民管理*/
export const getDiseasesList = (params) => {
return fetch({
headers,
......@@ -16,4 +16,13 @@ export const getDiseasesList = (params) => {
})
};
export const getPatientDetail = (patientId) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/${patientId}`),
method: 'get',
// params: params,
description: '获取居民详情',
})
};
......@@ -9,7 +9,7 @@
<div class="f-main-content screenSet">
<div>
<div class="right-btn-group">
<el-button plain size="small" @click.native="deletePatient">删除</el-button>
<el-button plain size="small" @click="deletePatient">删除</el-button>
<el-button type="primary" size="small" @click="editPatient">编辑</el-button>
</div>
<el-tabs v-model="activeName" @tab-click="tabChangeHandler">
......@@ -17,23 +17,23 @@
<div class="section">
<div class="has-header">
<p>基本信息</p>
<p class="right-p"><span>添加时间:2019-03-23 12:30</span><span>最后修改时间:2019-03-28 15:30</span></p>
<p class="right-p"><span>添加时间:{{patientInfo.createdTime}}</span><span>最后修改时间:{{patientInfo.modifiedTime}}</span></p>
</div>
<div class="item">
<div><p class="title">居民姓名:</p><p class="info">云晓雀</p></div>
<div><p class="title">身份证:</p><p class="info">12849826412648</p></div>
<div><p class="title">居民姓名:</p><p class="info">{{patientInfo.nickname | emptyFilter}}</p></div>
<div><p class="title">身份证:</p><p class="info">{{patientInfo.idNo | emptyFilter}}</p></div>
</div>
<div class="item">
<div><p class="title">出生年月:</p><p class="info">1965-04-22</p></div>
<div><p class="title">性别:</p><p class="info"></p></div>
<div><p class="title">出生年月:</p><p class="info">{{patientInfo.birthTime | emptyFilter}}</p></div>
<div><p class="title">性别:</p><p class="info">{{patientInfo.sex | sexFileter}}</p></div>
</div>
<div class="item">
<div><p class="title">民族:</p><p class="info">汉族</p></div>
<div><p class="title">常驻类型:</p><p class="info">户籍</p></div>
<div><p class="title">民族:</p><p class="info">{{patientInfo.nationality | emptyFilter}}</p></div>
<div><p class="title">常驻类型:</p><p class="info">{{patientInfo.permanentResidence | emptyFilter}}</p></div>
</div>
<div class="item">
<div><p class="title">健康档案编号:</p><p class="info">-</p></div>
<div><p class="title">医保号:</p><p class="info">-</p></div>
<div><p class="title">健康档案编号:</p><p class="info">{{patientInfo.fileLocator | emptyFilter}}</p></div>
<div><p class="title">医保号:</p><p class="info">{{patientInfo.socialCard | emptyFilter}}</p></div>
</div>
<div class="has-header">数据记录</div>
<div class="item wrap-p">
......@@ -42,19 +42,19 @@
</div>
<div class="has-header">联系方式</div>
<div class="item">
<div><p class="title">手机号:</p><p class="info">13293481248</p></div>
<div><p class="title">手机号:</p><p class="info">{{patientInfo.mobilePhone | emptyFilter}}</p></div>
<div><p class="title"></p><p class="info"></p></div>
</div>
<div class="item">
<div><p class="title">所在地区:</p><p class="info">上海市 上海市 浦东新区</p></div>
<div><p class="title">详细地址:</p><p class="info">上海市浦东新区兰花路333</p></div>
<div><p class="title">详细地址:</p><p class="info">{{patientInfo.patientAddress | emptyFilter}}</p></div>
</div>
<div class="item">
<div><p class="title">工作单位:</p><p class="info">上海云游科技有限公司</p></div>
<div><p class="title">工作单位:</p><p class="info">{{patientInfo.workplace | emptyFilter}}</p></div>
<div>
<p class="title">微信:</p>
<p class="info" v-if="!hasBind">未绑定 <el-button type="text" class="ml10" @click="remindBind">提醒绑定</el-button></p>
<p class="info" v-else>已绑定 <span class="ml10">(微信名:大佬</span></p>
<p class="info" v-if="patientInfo.isWechatBind == '1'">未绑定 <el-button type="text" class="ml10" @click="remindBind">提醒绑定</el-button></p>
<p class="info" v-if="patientInfo.isWechatBind == '2'">已绑定 <span class="ml10">(微信名:{{patientInfo.wechatNickname | emptyFilter}}</span></p>
</div>
</div>
<div class="has-header">其他</div>
......@@ -66,7 +66,7 @@
type="textarea"
rows="3"
placeholder="请输入内容"
v-model="remark"
v-model="patientInfo.remark"
maxlength="30"
:show-word-limit="true"
>
......@@ -76,9 +76,11 @@
<p class="btn-right"><el-button plain size="small" @click="saveRemark">保存备注</el-button></p>
</div>
</div>
</el-tab-pane>
<el-tab-pane label="健康记录" name="second">
</el-tab-pane>
<el-tab-pane label="健康记录" name="second">健康记录</el-tab-pane>
</el-tabs>
</div>
</div>
......@@ -87,7 +89,7 @@
<script>
import BreadCrumb from '@/components/breadcrumb'
import { getDiseasesList } from '@/utils/patients/patientsapi'
import { getDiseasesList, getPatientDetail } from '@/utils/patients/patientsapi'
export default {
name: "addNewPlan",
components: {
......@@ -103,12 +105,15 @@
activeName: 'first',
hasBind: false,
remark: '',
patientInfo: {},
}
},
created() {
this.init();
// getDiseasesList().then(({data}) => {
// console.log('获取所有疾病',data)
// })
},
computed: {
// ...mapState('planManage',{
......@@ -118,11 +123,40 @@
},
methods: {
// ...mapActions('planManage', ['getTimeNodeList','getRemarkOption','getFollowupTemplate']),
init() {
let patientId = '99997747'; //dev中凤尾花的patientId
getPatientDetail(patientId).then(({data}) => {
this.patientInfo = data;
})
},
tabChangeHandler(tab) {
console.log(tab);
},
deletePatient() {
console.log('删除')
// 把写的提示信心需要换行的地方分成数组 confirmText
const confirmText = ['您确定要删除此居民吗?', '删除后,您将无法对该居民发送患教和进行随访,重新添加该居民依旧可查看历史发送记录及随访记录']
const newDatas = []
const h = this.$createElement
for (const i in confirmText) {
newDatas.push(h('p', null, confirmText[i]))
}
this.$confirm('删除居民', {
title: '删除居民',
message: h('div', null, newDatas),
confirmButtonText: '确认删除',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
editPatient() {},
//提醒绑定
......@@ -138,6 +172,17 @@
return value;
}
},
sexFileter: function(value) {
if (!value && value != 0) {
return '-';
} else {
let hash = {
1: '男',
2: '女'
};
return hash[value];
}
},
},
}
</script>
......@@ -151,7 +196,7 @@
.right-btn-group{
position: absolute;
right: 60px;
z-index: 5000;
z-index: 1800;
}
.section{
.item{
......@@ -185,7 +230,7 @@
display: flex;
justify-content: space-between;
padding: 15px 0;
margin-bottom: 10px;
margin-bottom: 15px;
border-bottom: 1px dashed #888;
.right-p{
display: inline-block;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册