From bc90fb7e0c6c8313e7d5fcf3aba57e3a1f975c93 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期四, 15 八月 2024 17:39:45 +0800 Subject: [PATCH] 对象建模模块,保存统一先进行正则校验(之间是失焦才进行校验) --- Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue | 30 +++++++++++++++++------------- 1 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue index b4c4e52..aa5e091 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue @@ -445,7 +445,7 @@ highlightCurrentRow: true, searchMenuSpan: 8, searchLabelWidth: 100, - calcHeight:30, + calcHeight: 30, column: [ { label: '涓氬姟绫诲瀷鍚�', @@ -912,8 +912,6 @@ this.bizFormData = []; this.bizToData = []; this.dialogBottomData = []; - console.log(this.form); - console.log('--', this.nodeRow) }, // 娣诲姞灞炴�ф睜 淇濆瓨 @@ -1103,16 +1101,22 @@ this.$message.error('form绔笟鍔$被鍨嬪拰to绔被鍨嬪潎涓嶈兘涓虹┖锛�') return; } - this.form.btmItemsFrom = this.bizFormData.map(item => item.name); - this.form.btmItemsTo = this.bizToData.map(item => item.name); - this.form.attributes = this.dialogBottomData.map(item => item.id); - let flag = this.title === 'add' ? true : false; - addAndEditLink(flag, this.form).then(res => { - if (res.data.code === 200) { - this.visible = false; - this.$message.success(res.data.msg); - this.resetForm(); - this.getTreeList(); + this.$refs.form.validate((valid) => { + if (valid) { + this.form.btmItemsFrom = this.bizFormData.map(item => item.name); + this.form.btmItemsTo = this.bizToData.map(item => item.name); + this.form.attributes = this.dialogBottomData.map(item => item.id); + let flag = this.title === 'add' ? true : false; + addAndEditLink(flag, this.form).then(res => { + if (res.data.code === 200) { + this.visible = false; + this.$message.success(res.data.msg); + this.resetForm(); + this.getTreeList(); + } + }); + } else { + return false; } }); }, -- Gitblit v1.9.3