|
@@ -7,7 +7,7 @@
|
|
|
<el-form-item label="所属医院:" prop="hospitalId">
|
|
|
<el-select v-model="form.hospitalId"
|
|
|
placeholder="请选择"
|
|
|
- :disabled="!!this.form.id"
|
|
|
+ :disabled="!!this.form.id||copy"
|
|
|
@change="changeHospital"
|
|
|
size="small">
|
|
|
<el-option
|
|
@@ -76,7 +76,15 @@
|
|
|
rules:{
|
|
|
hospitalId:{ required: true, message: '请选择所属医院', trigger: ['blur', 'change']},
|
|
|
//qcItem:{ required: true, message: '请选择质控条目', trigger: ['blur', 'change']},
|
|
|
- name:{ required: true, message: '请输入质控类型', trigger: ['blur', 'change']},
|
|
|
+ name:[{ required: true, message: '请输入质控类型', trigger: ['blur', 'change']},{
|
|
|
+ validator:(rule, value, callback)=>{
|
|
|
+ if(!value.trim()){
|
|
|
+ callback(new Error('请输入质控类型'));
|
|
|
+ }else{
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ }, trigger: 'blur'
|
|
|
+ }],
|
|
|
},
|
|
|
copy:null,
|
|
|
saveDisable: false, //保存按钮禁止点击
|
|
@@ -99,7 +107,7 @@
|
|
|
};
|
|
|
//this.getQcTypeItem({hospitalId:info.hospitalId});
|
|
|
}else{
|
|
|
- let hospitalId = localStorage.getItem("qcSelectHospital");
|
|
|
+ let hospitalId = localStorage.getItem("qcSelectHospital")||this.hisTypes[0].val;
|
|
|
this.form.hospitalId = +hospitalId;
|
|
|
this.getQcTypeItem({hospitalId:hospitalId});
|
|
|
}
|
|
@@ -114,7 +122,7 @@
|
|
|
list.push({caseEntryId:t.id});
|
|
|
}
|
|
|
})
|
|
|
- }console.log(list)
|
|
|
+ }
|
|
|
this.form.qcTypeCasesEntryVOList=list;
|
|
|
},
|
|
|
deep:true
|
|
@@ -162,6 +170,7 @@
|
|
|
if (valid) {
|
|
|
if(this.form.id){//修改
|
|
|
const param = Object.assign({},this.form);
|
|
|
+ param.name=param.name.trim();
|
|
|
this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
|
api.addQcType(param).then((res)=>{
|
|
|
if(res.data.code==0){
|
|
@@ -184,6 +193,7 @@
|
|
|
})
|
|
|
}else{//添加
|
|
|
const params = Object.assign({},this.form);
|
|
|
+ params.name=params.name.trim();
|
|
|
this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
|
api.addQcType(params).then((res)=>{
|
|
|
if(res.data.code==0){
|