|
@@ -84,7 +84,8 @@
|
|
|
list:[],
|
|
|
labelPosition:'left',
|
|
|
isFirst:true,
|
|
|
- isEdit: true,
|
|
|
+ isEdit: false,
|
|
|
+ isCopy:false,
|
|
|
title:'组合字段维护-添加组合字段',
|
|
|
form:{
|
|
|
modeId:"",
|
|
@@ -109,7 +110,7 @@
|
|
|
tagName:{ required: true, message: '请输入备注', trigger: ['blur', 'change']},
|
|
|
/*name:[{ required: true, message: '请输入显示名称',trigger: ['blur', 'change'] }],*/
|
|
|
},
|
|
|
- copy:null,
|
|
|
+
|
|
|
saveDisable: false, //保存按钮禁止点击
|
|
|
fieldTypes:[],
|
|
|
hisTypes:[],
|
|
@@ -129,12 +130,19 @@
|
|
|
},
|
|
|
created(){
|
|
|
this.getAllTypes();
|
|
|
- let {isEdit,data} = this.$route.params;
|
|
|
- if(isEdit){
|
|
|
- this.title='组合字段维护-修改组合字段';
|
|
|
- this.id = data.id
|
|
|
- this.isEdit = isEdit
|
|
|
+ let {isCopy,isEdit,data} = this.$route.params;
|
|
|
+ if(isEdit || isCopy){
|
|
|
+ if(isEdit){
|
|
|
+ this.title='组合字段维护-修改组合字段';
|
|
|
+ this.id = data.id
|
|
|
+ this.isEdit = isEdit
|
|
|
+ }
|
|
|
this.form = Object.assign({},data);
|
|
|
+ if(isCopy){
|
|
|
+ this.isCopy = isCopy
|
|
|
+ this.form.tagName = ""
|
|
|
+ this.form.id=""
|
|
|
+ }
|
|
|
let questionMappings = this.form.questionMapping ||[]
|
|
|
let selectFiled = []
|
|
|
for(let i = 0; i < questionMappings.length; i++){
|
|
@@ -181,6 +189,7 @@
|
|
|
tagName: searchName,
|
|
|
hospitalId: this.form.hospitalId,
|
|
|
modeId: [this.form.modeId],
|
|
|
+ tagType: [1]
|
|
|
}
|
|
|
api.getQCName(param).then(res =>{
|
|
|
if(res.data.code == '0'){
|
|
@@ -257,7 +266,7 @@
|
|
|
return
|
|
|
}
|
|
|
this.form = Object.assign({}, this.form,{questionMappings: questionMappings})
|
|
|
- if(this.id && !this.copy){//修改
|
|
|
+ if(this.id && !this.isCopy){//修改
|
|
|
const param = Object.assign({},this.form,{id:this.id})
|
|
|
this.saveDisable = true //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
|
api.addFieldMatch({questionWrapper:param}).then((res)=>{
|