|
|
|
@ -48,6 +48,8 @@ |
|
|
|
<script> |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
import MdpFormDataItem from './FormDataItem.vue' |
|
|
|
|
|
|
|
import treeTool from '@/components/mdp-ui/js/treeTool.js' |
|
|
|
/** |
|
|
|
* 表单数据填单 |
|
|
|
*/ |
|
|
|
@ -157,36 +159,6 @@ |
|
|
|
if(!params.deptName){ |
|
|
|
params.deptName=this.userInfo.deptName |
|
|
|
} |
|
|
|
var bizKeys=[]; |
|
|
|
if(this.formFields!=null && this.formFields.length>0){ |
|
|
|
var isBizKey=this.formFields[0].isBizKey; |
|
|
|
if(isBizKey && isBizKey.length==3){ |
|
|
|
if(isBizKey.charAt(0)=="1"){ |
|
|
|
bizKeys.push(params.cuserid); |
|
|
|
} |
|
|
|
if(isBizKey.charAt(1)=="1"){ |
|
|
|
bizKeys.push(params.deptid); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.formFields.forEach(item=>{ |
|
|
|
if(item.isBizKey.charAt(2)=="1"){ |
|
|
|
bizKeys.push(params[item.fieldIdCamel]); |
|
|
|
} |
|
|
|
if(params[item.fieldIdCamel]!=this.editForm[item.fieldIdCamel]){ |
|
|
|
params.changeData=true; |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
if(bizKeys.length==0){ |
|
|
|
if(params.id){ |
|
|
|
bizKeys.push(params.id); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if(bizKeys.length>0){ |
|
|
|
params.bizKey=bizKeys.join(","); |
|
|
|
} |
|
|
|
this.$emit('input',params) |
|
|
|
this.$emit('submit',params);// @submit="afterAddSubmit" |
|
|
|
} |
|
|
|
@ -214,7 +186,7 @@ |
|
|
|
} |
|
|
|
this.initFieldQx(item) |
|
|
|
}); |
|
|
|
this.fields=this.formFields |
|
|
|
this.fields=treeTool.translateDataToTree(this.formFields,'pid','id') |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.$refs['editForm'].clearValidate(); |
|
|
|
}) |
|
|
|
|