提交 0c4541a8 编写于 作者: chengxiang.li's avatar chengxiang.li

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
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
@current-change="handleCurrentChangePre" @current-change="handleCurrentChangePre"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:current-page="paginationSet.pageNum" :current-page="paginationSet.pageNum"
:page-sizes="[5,10,50,100]" :page-sizes="[15,30,50,100]"
:page-size="paginationSet.pageSize" :page-size="paginationSet.pageSize"
:total="paginationSet.total"> :total="paginationSet.total">
</el-pagination> </el-pagination>
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
}, },
paginationSet: { paginationSet: {
pageNum: 1, pageNum: 1,
pageSize: 5, pageSize: 15,
total: 0 total: 0
}, },
sexOptions: [{ sexOptions: [{
...@@ -250,6 +250,7 @@ ...@@ -250,6 +250,7 @@
], ],
fuPlanOptions: [], fuPlanOptions: [],
newSelects: [], //新选中的人 newSelects: [], //新选中的人
oldPatientList: [],
getRowKeys(row) { getRowKeys(row) {
return row.patientId; return row.patientId;
}, },
...@@ -260,13 +261,6 @@ ...@@ -260,13 +261,6 @@
patientIdList: Array,// 确定已经选过的居民 patientIdList: Array,// 确定已经选过的居民
oldPatientIdList: Array,// 确定已经选过的居民 oldPatientIdList: Array,// 确定已经选过的居民
selectPatientType: Number, //获取居民列表所需字段,随访是1,分组是2,患教是3 selectPatientType: Number, //获取居民列表所需字段,随访是1,分组是2,患教是3
// fuPlanIdList: {
// required: false,
// type: Array,
// default: function () {
// return [];
// }
// }, //获取居民列表所需字段,若是随访,则需要传值
}, },
watch: { watch: {
isShowSelectPatient(val){ isShowSelectPatient(val){
...@@ -378,9 +372,11 @@ ...@@ -378,9 +372,11 @@
} }
} }
if(this.oldPatientIdList!=undefined&&this.oldPatientIdList.length) { if(this.oldPatientIdList!=undefined&&this.oldPatientIdList.length) {
this.oldPatientList = [];
this.patientsData.forEach((item)=>{ this.patientsData.forEach((item)=>{
if(this.oldPatientIdList.includes(item.patientId)){// 如果已经选过居民 if(this.oldPatientIdList.includes(item.patientId)){// 如果已经选过居民
item.disableNum = 0 item.disableNum = 0;
this.oldPatientList.push(item);
} else { } else {
item.disableNum = 1 item.disableNum = 1
} }
...@@ -429,7 +425,7 @@ ...@@ -429,7 +425,7 @@
}, },
sureClick(){ sureClick(){
if(this.newSelects.length) { if(this.newSelects.length) {
this.$emit('sureSelectPatient',false,this.newSelects) this.$emit('sureSelectPatient',false,this.newSelects,this.oldPatientList)
} else { } else {
this.$message.warning('请先选择!') this.$message.warning('请先选择!')
} }
......
...@@ -141,6 +141,7 @@ ...@@ -141,6 +141,7 @@
<select-patient <select-patient
:isShowSelectPatient="isShowSelectPatient" :isShowSelectPatient="isShowSelectPatient"
:patientIdList="patientIdList" :patientIdList="patientIdList"
:oldPatientIdList="patientIdList"
@closeSelectPatient="closeSelectPatient" @closeSelectPatient="closeSelectPatient"
:selectPatientType="selectPatientType" :selectPatientType="selectPatientType"
@sureSelectPatient="sureSelectPatient(arguments)" @sureSelectPatient="sureSelectPatient(arguments)"
...@@ -409,12 +410,14 @@ ...@@ -409,12 +410,14 @@
sureSelectPatient() { sureSelectPatient() {
let getArguments = arguments[0]; let getArguments = arguments[0];
const selectPatients = getArguments[1]; // 每次选中获取的人 const selectPatients = getArguments[1]; // 每次选中获取的人
const oldPatients = getArguments[2]; // 该分组已经存在的居民
let labelId = this.$route.query.labelId; let labelId = this.$route.query.labelId;
let patientLen = selectPatients.length; let patientLen = selectPatients.length;
let savePatientsList = selectPatients.concat(oldPatients);
saveLabelsForPatient(labelId,{ saveLabelsForPatient(labelId,{
newLablelName: this.$route.query.labelName, newLablelName: this.$route.query.labelName,
oldLabelName: this.$route.query.labelName, oldLabelName: this.$route.query.labelName,
saveLists: selectPatients, saveLists: savePatientsList,
// token: // token:
}).then((data) => { }).then((data) => {
if(data.code == '000000') { if(data.code == '000000') {
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
this.checkForm = false; this.checkForm = false;
if(val.status) { if(val.status) {
// this.patientInfo = val.patientInfoForm // this.patientInfo = val.patientInfoForm
// console.log('保存的数据',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('修改成功')
......
...@@ -12,10 +12,8 @@ ...@@ -12,10 +12,8 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="居民姓名" prop="nickname"> <el-form-item label="居民姓名" prop="nickname">
<el-input <el-input
v-model="patientInfoForm.nickname" v-model.trim="patientInfoForm.nickname"
placeholder="请输入居民姓名" placeholder="请输入居民姓名"
minlength="2"
maxlength="15"
:disabled="!baseInfoEdit" :disabled="!baseInfoEdit"
clearable> clearable>
</el-input> </el-input>
...@@ -24,7 +22,7 @@ ...@@ -24,7 +22,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="手机号" prop="mobilePhone"> <el-form-item label="手机号" prop="mobilePhone">
<el-input <el-input
v-model="patientInfoForm.mobilePhone" v-model.trim="patientInfoForm.mobilePhone"
maxlength="11" maxlength="11"
placeholder="请输入手机号" placeholder="请输入手机号"
:disabled="!baseInfoEdit" :disabled="!baseInfoEdit"
...@@ -46,7 +44,7 @@ ...@@ -46,7 +44,7 @@
placeholder="请选择居民疾病诊断"> placeholder="请选择居民疾病诊断">
<el-option <el-option
v-for="(item, index) in diseasesList" v-for="(item, index) in diseasesList"
:key="index" :key="item.diseaseId"
:label="item.diseaseName" :label="item.diseaseName"
:value="item.diseaseId"> :value="item.diseaseId">
</el-option> </el-option>
...@@ -62,7 +60,7 @@ ...@@ -62,7 +60,7 @@
placeholder="请选择居民分组"> placeholder="请选择居民分组">
<el-option <el-option
v-for="(item, index) in labelsList" v-for="(item, index) in labelsList"
:key="index" :key="index.labelId"
:label="item.labelName" :label="item.labelName"
:value="item.labelId"> :value="item.labelId">
</el-option> </el-option>
...@@ -75,7 +73,7 @@ ...@@ -75,7 +73,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="身份证" prop="idNo"> <el-form-item label="身份证" prop="idNo">
<el-input <el-input
v-model="patientInfoForm.idNo" v-model.trim="patientInfoForm.idNo"
placeholder="请输入身份证" placeholder="请输入身份证"
clearable clearable
maxlength="18" maxlength="18"
...@@ -93,6 +91,7 @@ ...@@ -93,6 +91,7 @@
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
value="yyyy-MM-dd" value="yyyy-MM-dd"
@change="getAge" @change="getAge"
:picker-options="setPickerOption"
style="width:250px" style="width:250px"
clearable> clearable>
</el-date-picker> </el-date-picker>
...@@ -150,7 +149,7 @@ ...@@ -150,7 +149,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="医保号" prop="socialCard"> <el-form-item label="医保号" prop="socialCard">
<el-input <el-input
v-model="patientInfoForm.socialCard" v-model.trim="patientInfoForm.socialCard"
placeholder="请输入居民医保卡号码" placeholder="请输入居民医保卡号码"
maxlength="30" maxlength="30"
clearable> clearable>
...@@ -160,7 +159,7 @@ ...@@ -160,7 +159,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="健康档案编号" prop="fileLocator"> <el-form-item label="健康档案编号" prop="fileLocator">
<el-input <el-input
v-model="patientInfoForm.fileLocator" v-model.trim="patientInfoForm.fileLocator"
placeholder="请输入居民健康档案编号" placeholder="请输入居民健康档案编号"
maxlength="30" maxlength="30"
clearable> clearable>
...@@ -250,6 +249,20 @@ ...@@ -250,6 +249,20 @@
name: "basicInfo", name: "basicInfo",
components: {}, components: {},
data() { data() {
let validCode=(rule,value,callback)=>{
if(value) {
let reg=/^[0-9a-zA-Z]*$/g
if(!reg.test(value)){
callback(new Error('只可输入数字加英文'))
}else if(value.length >30) {
callback(new Error('只可输入30个以内的字符'))
}else{
callback()
}
}else {
callback()
}
};
let checkCardNum = (rule, value, callback) =>{ let checkCardNum = (rule, value, callback) =>{
let vcity={ 11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古", let vcity={ 11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",
21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏", 21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",
...@@ -320,9 +333,21 @@ ...@@ -320,9 +333,21 @@
tipsText: '展开录入完整信息', tipsText: '展开录入完整信息',
isShowAll: false, isShowAll: false,
rules: { rules: {
nickname: [{required: true, message: '请输入居民姓名', trigger: ['change', 'blur'] }], nickname: [{required: true, message: '请输入居民姓名', trigger: ['change', 'blur'] },
mobilePhone: [{required: true, message: '请输入手机号', trigger: ['change', 'blur'] },{ validator: checkMobile , trigger: ['blur','change'] }], { min: 2, max: 15, message: '长度在2至15个字符之间', trigger: 'change' }],
mobilePhone: [{required: true, message: '请输入手机号', trigger: ['change', 'blur'] },
{ validator: checkMobile , trigger: ['blur','change'] }],
idNo: [{required: false,validator: checkCardNum, trigger: ['change'] }], idNo: [{required: false,validator: checkCardNum, trigger: ['change'] }],
socialCard: [{required: false,validator: validCode, trigger: ['change'] }],
fileLocator: [{required: false,validator: validCode, trigger: ['change'] }],
},
setPickerOption: {
// disabledDate(time) {
// let curDate = (new Date()).getTime();
// let three = 90 * 24 * 3600 * 1000;
// let threeMonths = curDate - three;
// return time.getTime() > Date.now() || time.getTime() < threeMonths;;
// }
}, },
} }
}, },
...@@ -516,41 +541,39 @@ ...@@ -516,41 +541,39 @@
}) })
}, },
saveInfoData() { saveInfoData() {
this.$refs['patientInfoForm'].validate((valid) => { //对地区数据做处理
//对地区数据做处理 if(this.addressList.length > 0) {
if(this.addressList.length > 0) { this.patientInfoForm.provinceId = this.addressList[0];
this.patientInfoForm.provinceId = this.addressList[0]; this.patientInfoForm.cityId = this.addressList[1];
this.patientInfoForm.cityId = this.addressList[1]; this.patientInfoForm.countyId = this.addressList[2];
this.patientInfoForm.countyId = this.addressList[2]; this.patientInfoForm.townId = this.addressList[3];
this.patientInfoForm.townId = this.addressList[3]; this.provinceLists.forEach((item) => {
this.provinceLists.forEach((item) => { if(this.patientInfoForm.provinceId == item.provinceId) {
if(this.patientInfoForm.provinceId == item.provinceId) { this.patientInfoForm.provinceName = item.provinceName;
this.patientInfoForm.provinceName = item.provinceName; }
} });
}); this.cityLists.forEach((item) => {
this.cityLists.forEach((item) => { if(this.patientInfoForm.cityId == item.cityId) {
if(this.patientInfoForm.cityId == item.cityId) { this.patientInfoForm.cityName = item.cityName;
this.patientInfoForm.cityName = item.cityName; }
} });
}); this.countyLists.forEach((item) => {
this.countyLists.forEach((item) => { if(this.patientInfoForm.countyId == item.countyId) {
if(this.patientInfoForm.countyId == item.countyId) { this.patientInfoForm.countyName = item.countyName;
this.patientInfoForm.countyName = item.countyName;
}
})
this.townLists.forEach((item) => {
if(this.patientInfoForm.townId == item.townId) {
this.patientInfoForm.townName = item.townName;
}
})
if(this.patientInfoForm.provinceName && this.patientInfoForm.cityName && this.patientInfoForm.countyName && this.patientInfoForm.townName) {
this.patientInfoForm.patientAddress = `${this.patientInfoForm.provinceName}${this.patientInfoForm.cityName}${this.patientInfoForm.countyName}${this.patientInfoForm.townName}`
}else {
this.patientInfoForm.patientAddress = '';
// this.$message.warning('请选择正确的地区')
// return ;
} }
})
this.townLists.forEach((item) => {
if(this.patientInfoForm.townId == item.townId) {
this.patientInfoForm.townName = item.townName;
}
})
if(this.patientInfoForm.provinceName && this.patientInfoForm.cityName && this.patientInfoForm.countyName && this.patientInfoForm.townName) {
this.patientInfoForm.patientAddress = `${this.patientInfoForm.provinceName}${this.patientInfoForm.cityName}${this.patientInfoForm.countyName}${this.patientInfoForm.townName}`
}else {
this.patientInfoForm.patientAddress = '';
} }
}
this.$refs['patientInfoForm'].validate((valid) => {
if(!this.patientInfoForm.idNo) { if(!this.patientInfoForm.idNo) {
this.patientInfoForm.idNo = null; this.patientInfoForm.idNo = null;
} }
......
...@@ -272,6 +272,8 @@ ...@@ -272,6 +272,8 @@
message: h('div', null, newDatas), message: h('div', null, newDatas),
confirmButtonText: '确认删除', confirmButtonText: '确认删除',
cancelButtonText: '取消', cancelButtonText: '取消',
closeOnClickModal: false,
closeOnPressEscape: false,
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
let reqParam = { let reqParam = {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册