新增模型增加判断空格校验

This commit is contained in:
zhal 2022-09-20 09:52:13 +08:00
parent 497b92a266
commit 61ec027260

View File

@ -1191,6 +1191,12 @@
const that = this;
that.$refs[formName].validate((valid) => {
if (valid) {
const name = that.ModelsetUpDialog.systemForm.name;
var judgeFn = new RegExp(/\s+/g);
if (judgeFn.test(name)) {
that.$message({message: '[名称]不允许包含空格', type: 'warning'});
return;
}
const checkdata = {
url:'jd',
data:{
@ -1241,15 +1247,14 @@
awsuiAxios.post(data).then(function (ro) {
if (ro.result == 'ok') {
that.isLoading = false;
that.refreshNode('control');
that.refreshNode('process');
that.ModelsetUpDialog.dialogVisible = false;
that.openRepositoryList(that.ModelsetUpDialog.systemForm.parentId);
// id
openDesigner(that.$store.getters.getTeamIdFn, that.ModelsetUpDialog.systemForm.uuid, that.$store.state.sessionId);
//
that.$refs['systemForm'].resetFields();
that.refreshNode('control');
that.refreshNode('process');
} else {
that.$message.error(ro.msg);
}