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

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; const that = this;
that.$refs[formName].validate((valid) => { that.$refs[formName].validate((valid) => {
if (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 = { const checkdata = {
url:'jd', url:'jd',
data:{ data:{
@ -1241,15 +1247,14 @@
awsuiAxios.post(data).then(function (ro) { awsuiAxios.post(data).then(function (ro) {
if (ro.result == 'ok') { if (ro.result == 'ok') {
that.isLoading = false; that.isLoading = false;
that.refreshNode('control');
that.refreshNode('process');
that.ModelsetUpDialog.dialogVisible = false; that.ModelsetUpDialog.dialogVisible = false;
that.openRepositoryList(that.ModelsetUpDialog.systemForm.parentId); that.openRepositoryList(that.ModelsetUpDialog.systemForm.parentId);
// id // id
openDesigner(that.$store.getters.getTeamIdFn, that.ModelsetUpDialog.systemForm.uuid, that.$store.state.sessionId); openDesigner(that.$store.getters.getTeamIdFn, that.ModelsetUpDialog.systemForm.uuid, that.$store.state.sessionId);
// //
that.$refs['systemForm'].resetFields(); that.$refs['systemForm'].resetFields();
that.refreshNode('control');
that.refreshNode('process');
} else { } else {
that.$message.error(ro.msg); that.$message.error(ro.msg);
} }