|
@@ -110,9 +110,11 @@
|
|
|
},
|
|
|
created(){
|
|
|
this.getAllTypes();
|
|
|
- let info = this.$route.params.info;
|
|
|
+ let {isCopy,info} = this.$route.params;
|
|
|
+ this.copy=isCopy;
|
|
|
if(info){
|
|
|
const infoCopy = Object.assign({},info);
|
|
|
+ isCopy?infoCopy.id="":"";
|
|
|
// infoCopy.casesEntryIds?this.casesEIds = infoCopy.casesEntryIds.split(","):'';
|
|
|
let tmpArr = [],tmpArr1 = []
|
|
|
for(let i = 0;i < infoCopy.quesCasesEntryDTOList.length;i++){
|
|
@@ -127,7 +129,7 @@
|
|
|
}
|
|
|
infoCopy.quesCasesEntryDTOList?this.casesEIds = tmpArr:'';
|
|
|
infoCopy.quesCasesEntryVOList = [...tmpArr1];
|
|
|
- this.title='字段映射维护-修改字段映射';
|
|
|
+ this.title=isCopy?"字段映射维护-复制字段映射":'字段映射维护-修改字段映射';
|
|
|
this.form = infoCopy;
|
|
|
this.getQcFlawList(tmpArr1);
|
|
|
}/*else{
|
|
@@ -246,11 +248,11 @@
|
|
|
this.warning("取值字段【】含有非法字符")
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- if(this.id){//修改
|
|
|
- const param = Object.assign({},this.form,{id:this.id});
|
|
|
+
|
|
|
+ if(this.form.id){//修改
|
|
|
+ const param = Object.assign({},this.form);
|
|
|
this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
|
- api.addFieldMatch(param).then((res)=>{
|
|
|
+ api.addFieldMatch({questionWrapper:param}).then((res)=>{
|
|
|
if(res.data.code==0){
|
|
|
this.$message({
|
|
|
message:"修改成功",
|