export default { props: { fatherdialogv: Boolean, ruleform:Object, fatherrules:Object, fatherdialoga:Object, }, template: ` `, mounted: function () { }, methods:{ //公共弹框 submitForm(formName) { var _this = this this.$refs[formName].validate((valid) => { if (valid) { let param = JSON.stringify(_this.ruleform) jQuery.ajax({ type: 'POST', // dataType: 'json', contentType: 'application/json;charset=UTF-8', url: window.FQDN2 + 'siteReview', data: param }).done(function (res) { if (res.status === "SUCCESS") { _this.$message({ message: '提交成功', type: 'success' }); _this.fatherdialogv = false; _this.$refs[formName].resetFields(); //重置from校验 } }).fail(function (err) {}); } else { console.log('error submit!!'); return false; } }); }, /** 关闭弹窗 */ closeDialog(formName) { this.$emit('data-event', false); this.$refs[formName].resetFields(); }, // 重置表单 resetForm(formName) { this.$refs[formName].resetFields(); this.fatherdialogv = false }, } }