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

对年龄做处理

上级 0620dd23
......@@ -103,7 +103,7 @@
:data="patientsData"
ref="multipleTable"
center
style="width: 100%;margin-top: 0;"
style="width: 100%;margin-top: 10px;"
height="280"
:row-key="getRowKeys"
@selection-change="handleSelectionChange">
......@@ -469,7 +469,9 @@
.margin-top15{
margin-top: 15px;
}
.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item{
margin-bottom: 8px;
}
}
......
......@@ -26,8 +26,7 @@
<script>
import BreadCrumb from '@/components/breadcrumb'
import editInformation from './components/edit-information'
import { mapGetters } from 'vuex'
import { getPatientDetail, getRemindPatient, savePatientInfo } from '@/utils/patients/patientsapi'
import { getPatientDetail, savePatientInfo } from '@/utils/patients/patientsapi'
export default {
name: "basicInfo",
components: {
......@@ -50,11 +49,7 @@
this.patientId = String(this.$route.query.patientId);
this.init();
},
computed: {
...mapGetters([
'_token',
])
},
computed: {},
methods: {
init() {
getPatientDetail(this.patientId).then((data) => {
......@@ -75,7 +70,7 @@
// this.patientInfo = val.patientInfoForm
savePatientInfo(val.patientInfoForm).then(data => {
if(data.code == '000000'){
this.$message.success('保存备注成功')
this.$message.success('修改成功')
setTimeout(() => {
this.$router.go(-1);
},500)
......@@ -88,24 +83,6 @@
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: {
emptyFilter: function(value) {
......
......@@ -100,7 +100,7 @@
<el-row>
<el-col :span="12">
<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-col>
<el-col :span="12">
......@@ -203,8 +203,9 @@
</el-col>
<el-col :span="12" v-if="patientId">
<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>
<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'">{{patientInfoForm.wechatNickname | emptyFilter}}</p>
</el-form-item>
</el-col>
</el-row>
......@@ -238,7 +239,6 @@
getConstants,
getNationsList,
getRemindPatient,
savePatientInfo,
getProvinceList,
getCityList,
getCountyList,
......@@ -355,10 +355,10 @@
}
//对地区数据做处理
if(this.patientInfoForm.patientAddress) {
this.addressList[0] = this.patientInfoForm.provinceId;
this.addressList[1] = this.patientInfoForm.cityId;
this.addressList[2] = this.patientInfoForm.countyId;
this.addressList[3] = this.patientInfoForm.townId;
this.addressList[0] = parseInt(this.patientInfoForm.provinceId);
this.addressList[1] = parseInt(this.patientInfoForm.cityId);
this.addressList[2] = parseInt(this.patientInfoForm.countyId);
this.addressList[3] = parseInt(this.patientInfoForm.townId);
// this.addressList = JSON.parse(this.addressList);
}else {
this.addressList = [];
......@@ -595,6 +595,7 @@
} else if(val.length === 3) { //获取乡镇 (四级)
this.getTown(val[0], val[1], val[2]);
}
this.$forceUpdate();
},
getProvinceLists() {
getProvinceList({}).then((data) => {
......@@ -608,7 +609,6 @@
this.provinceList = this.provinceLists;
}
})
// this.$forceUpdate();
},
getCity(provinceId) {
getCityList({provinceId: provinceId}).then((data) => {
......@@ -672,7 +672,7 @@
},
filters: {
emptyFilter: function(value) {
if (!value) {
if (!value && value != 0) {
return '-';
} else {
return value;
......
......@@ -24,7 +24,7 @@
<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">{{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>
<div class="item">
......@@ -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" 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-else-if="patientInfo.isWechatBind == '2'">已绑定 <span class="ml10">(微信名:{{patientInfo.wechatNickname | emptyFilter}}</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'">{{patientInfo.wechatNickname | emptyFilter}}</p>
<p class="info" v-else>-</p>
</div>
</div>
......@@ -228,8 +229,8 @@
},
getRecordList() {
let reqPara = {
// patientId: this.patientId,
patientId: '99997701',
patientId: this.patientId,
// patientId: '99997701',
pageNo: this.pageNo,
pageSize: this.pageSize,
}
......@@ -257,11 +258,7 @@
}
})
},
tabChangeHandler(tab) {
// if(tab.name == 'second'){
// this.getRecordList(true);
// }
},
tabChangeHandler(tab) {},
deletePatient() {
// 把写的提示信息需要换行的地方分成数组 confirmText
const confirmText = ['您确定要删除此居民吗?', '删除后,您将无法对该居民发送患教和进行随访,重新添加该居民依旧可查看历史发送记录及随访记录'];
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册