提交 ee05e225 编写于 作者: tao.wu's avatar tao.wu

Merge branch 'dev-patients-20190513' of...

Merge branch 'dev-patients-20190513' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-patients-20190513
...@@ -26,9 +26,11 @@ ...@@ -26,9 +26,11 @@
:data="searchData.tableData" :data="searchData.tableData"
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
:row-key="getRowKeys"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column <el-table-column
type="selection" type="selection"
:reserve-selection="true"
width="55"> width="55">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -78,7 +80,7 @@ ...@@ -78,7 +80,7 @@
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:total="searchData.totalRows" :total="searchData.totalRows"
:current-page="1" :current-page="searchData.pageNo"
:page-sizes="[15, 30, 50, 100]" :page-sizes="[15, 30, 50, 100]"
:page-size="searchData.pageSize" :page-size="searchData.pageSize"
layout="total, sizes, prev, pager, next, jumper"> layout="total, sizes, prev, pager, next, jumper">
...@@ -192,6 +194,10 @@ ...@@ -192,6 +194,10 @@
singleDeleteInfo: [], singleDeleteInfo: [],
multipleSelection: [], multipleSelection: [],
selectPatientType: 2, //选择居民时需要的type类型 selectPatientType: 2, //选择居民时需要的type类型
getRowKeys(row) {
// console.log('>>>> ', row)
return row.id;
},
} }
}, },
components: { components: {
...@@ -228,6 +234,7 @@ ...@@ -228,6 +234,7 @@
pageNo: this.searchData.pageNo, pageNo: this.searchData.pageNo,
pageSize: this.searchData.pageSize, pageSize: this.searchData.pageSize,
}; };
getLabelDetail(labelId, params).then(data => { getLabelDetail(labelId, params).then(data => {
// console.log('获取分组详情>> ', data) // console.log('获取分组详情>> ', data)
if(data.data){ if(data.data){
...@@ -235,6 +242,23 @@ ...@@ -235,6 +242,23 @@
// 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){
list = list.map(item => {
if(!item.nickname){
item.nickname = '-';
};
if(!item.sexStr){
item.sexStr = '-';
};
if(item.patientAge || item.patientAge == 0){
// 直接显示
}else{
item.patientAge = '-';
};
if(!item.patientTypeGroup){
item.patientTypeGroup = '-';
}
return item;
})
this.searchData.tableData = list; this.searchData.tableData = list;
}else{ }else{
this.searchData.tableData = []; this.searchData.tableData = [];
...@@ -251,7 +275,6 @@ ...@@ -251,7 +275,6 @@
this.getDetail(); this.getDetail();
}, },
handleCurrentChange(val){ handleCurrentChange(val){
console.log('handleCurrentChange>>>', val)
// 切换当前页 // 切换当前页
this.searchData.pageNo = val; this.searchData.pageNo = val;
this.getDetail(); this.getDetail();
...@@ -395,7 +418,8 @@ ...@@ -395,7 +418,8 @@
type: 'success' type: 'success'
}); });
this.showDeletePatientsDialog = false; this.showDeletePatientsDialog = false;
this.getDetail(); // 删除后去第一页
this.handleCurrentChange(1);
}else{ }else{
this.$message({ this.$message({
message: '请求接口失败,请重新再试', message: '请求接口失败,请重新再试',
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="健康记录" name="second"> <el-tab-pane label="健康记录" name="second">
<div class="health-record-wrap"> <div class="health-record-wrap" v-show="recordList.length">
<div class="health-record-list" <div class="health-record-list"
v-show="recordList.length" v-show="recordList.length"
v-infinite-scroll="loadMore" v-infinite-scroll="loadMore"
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</div> </div>
</div> </div>
<div class="no-record-content" v-if="!recordList.length"> <div class="no-record-content" v-if="!recordList.length">
<div> <div class="no-record-info">
<img src="../../../assets/image/no-content1.png"/> <img src="../../../assets/image/no-content1.png"/>
<p>暂无随访记录或您没有权限访问</p> <p>暂无随访记录或您没有权限访问</p>
</div> </div>
...@@ -535,6 +535,12 @@ ...@@ -535,6 +535,12 @@
} }
text-align: center; text-align: center;
padding: 50px 0 60px; padding: 50px 0 60px;
.no-record-info{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -60%);
}
img{ img{
width: 120px; width: 120px;
} }
......
...@@ -78,7 +78,8 @@ ...@@ -78,7 +78,8 @@
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.sex==1"></span> <span v-if="scope.row.sex==1"></span>
<span v-if="scope.row.sex==2"></span> <span v-else-if="scope.row.sex==2"></span>
<span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -86,6 +87,10 @@ ...@@ -86,6 +87,10 @@
label="年龄" label="年龄"
width="80" width="80"
align="center"> align="center">
<template slot-scope="scope">
<span v-if="scope.row.age || (scope.row.age==0)">{{scope.row.age}}</span>
<span v-else>-</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="showLabelName" prop="showLabelName"
......
...@@ -253,8 +253,27 @@ ...@@ -253,8 +253,27 @@
let data = res.data.importRecordsModelList; let data = res.data.importRecordsModelList;
if(data && data.length > 0){ if(data && data.length > 0){
data = data.map(item => { data = data.map(item => {
if(!item.fileName){
item.fileName = '-';
}
if(!item.uploadTime) {
item.uploadTime = '-';
}
if(item.insertCount || item.insertCount == 0) {
// 直接显示
}else{
item.insertCount = '-';
}
if(item.updateCount || item.updateCount == 0) {
// 直接显示
}else{
item.updateCount = '-';
}
if(!item.status) {
item.status = '-';
}
if(!item.reason) { if(!item.reason) {
item.reason = '-' item.reason = '-';
} }
return item; return item;
}); });
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
width="100" width="100"
lign="center"> lign="center">
<template slot-scope="scope"> <template slot-scope="scope">
<img class="user-photo" :src="scope.row.headimgurl"/> <img v-if="scope.row.headimgurl" class="user-photo" :src="scope.row.headimgurl"/>
<span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -34,16 +35,28 @@ ...@@ -34,16 +35,28 @@
width="200" width="200"
label="微信昵称" label="微信昵称"
align="center"> align="center">
<template slot-scope="scope">
<span v-if="scope.row.wechatUsername">{{scope.row.wechatUsername}}</span>
<span v-else>-</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="country" prop="country"
label="地区" label="地区"
align="center"> align="center">
<template slot-scope="scope">
<span v-if="scope.row.country">{{scope.row.country}}</span>
<span v-else>-</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="wechatCreatedTime" prop="wechatCreatedTime"
label="添加时间" label="添加时间"
align="center"> align="center">
<template slot-scope="scope">
<span v-if="scope.row.wechatCreatedTime">{{scope.row.wechatCreatedTime}}</span>
<span v-else>-</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="操作" label="操作"
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册