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

对年龄做处理

上级 0620dd23
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
:data="patientsData" :data="patientsData"
ref="multipleTable" ref="multipleTable"
center center
style="width: 100%;margin-top: 0;" style="width: 100%;margin-top: 10px;"
height="280" height="280"
:row-key="getRowKeys" :row-key="getRowKeys"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
...@@ -469,7 +469,9 @@ ...@@ -469,7 +469,9 @@
.margin-top15{ .margin-top15{
margin-top: 15px; margin-top: 15px;
} }
.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item{
margin-bottom: 8px;
}
} }
......
...@@ -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) => {
...@@ -75,7 +70,7 @@ ...@@ -75,7 +70,7 @@
// this.patientInfo = val.patientInfoForm // this.patientInfo = val.patientInfoForm
savePatientInfo(val.patientInfoForm).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) {
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="年龄" prop="age"> <el-form-item label="年龄" prop="age">
<span>{{patientInfoForm.age ? `${patientInfoForm.age}岁` : '-'}}</span> <span>{{(patientInfoForm.age || patientInfoForm.age == 0) ? `${patientInfoForm.age}岁` : '-'}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
...@@ -203,8 +203,9 @@ ...@@ -203,8 +203,9 @@
</el-col> </el-col>
<el-col :span="12" v-if="patientId"> <el-col :span="12" v-if="patientId">
<el-form-item label="微信" prop="address"> <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-if="patientInfoForm.isWechatBind == '1'">未绑定 <el-button type="text" class="ml10" @click="remindBind" v-if="patientInfoForm.isRemind == '1'" style="color: #449284;">提醒绑定</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> <!--<p class="info" v-else-if="patientInfoForm.isWechatBind == '2'">已绑定 <span class="ml10">(微信名:{{patientInfoForm.wechatNickname | emptyFilter}}</span></p>-->
<p class="info" v-else-if="patientInfoForm.isWechatBind == '2'">{{patientInfoForm.wechatNickname | emptyFilter}}</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -238,7 +239,6 @@ ...@@ -238,7 +239,6 @@
getConstants, getConstants,
getNationsList, getNationsList,
getRemindPatient, getRemindPatient,
savePatientInfo,
getProvinceList, getProvinceList,
getCityList, getCityList,
getCountyList, getCountyList,
...@@ -355,10 +355,10 @@ ...@@ -355,10 +355,10 @@
} }
//对地区数据做处理 //对地区数据做处理
if(this.patientInfoForm.patientAddress) { if(this.patientInfoForm.patientAddress) {
this.addressList[0] = this.patientInfoForm.provinceId; this.addressList[0] = parseInt(this.patientInfoForm.provinceId);
this.addressList[1] = this.patientInfoForm.cityId; this.addressList[1] = parseInt(this.patientInfoForm.cityId);
this.addressList[2] = this.patientInfoForm.countyId; this.addressList[2] = parseInt(this.patientInfoForm.countyId);
this.addressList[3] = this.patientInfoForm.townId; this.addressList[3] = parseInt(this.patientInfoForm.townId);
// this.addressList = JSON.parse(this.addressList); // this.addressList = JSON.parse(this.addressList);
}else { }else {
this.addressList = []; this.addressList = [];
...@@ -595,6 +595,7 @@ ...@@ -595,6 +595,7 @@
} else if(val.length === 3) { //获取乡镇 (四级) } else if(val.length === 3) { //获取乡镇 (四级)
this.getTown(val[0], val[1], val[2]); this.getTown(val[0], val[1], val[2]);
} }
this.$forceUpdate();
}, },
getProvinceLists() { getProvinceLists() {
getProvinceList({}).then((data) => { getProvinceList({}).then((data) => {
...@@ -608,7 +609,6 @@ ...@@ -608,7 +609,6 @@
this.provinceList = this.provinceLists; this.provinceList = this.provinceLists;
} }
}) })
// this.$forceUpdate();
}, },
getCity(provinceId) { getCity(provinceId) {
getCityList({provinceId: provinceId}).then((data) => { getCityList({provinceId: provinceId}).then((data) => {
...@@ -672,7 +672,7 @@ ...@@ -672,7 +672,7 @@
}, },
filters: { filters: {
emptyFilter: function(value) { emptyFilter: function(value) {
if (!value) { if (!value && value != 0) {
return '-'; return '-';
} else { } else {
return value; return 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}}{{patientInfo.age ? `、${patientInfo.age}岁` : ''}}</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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册