Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
witiumCloud2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WitCloud
witiumCloud2
Commits
8354aff6
Commit
8354aff6
authored
Jul 11, 2024
by
侯玉玉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
进行存储策略名称表单校验
parent
a761e681
Pipeline
#3109
passed with stage
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
7 deletions
+32
-7
topic-module-detail.component.html
...in/topic-module-detail/topic-module-detail.component.html
+1
-1
topic-module-detail.component.ts
...main/topic-module-detail/topic-module-detail.component.ts
+10
-6
check.ts
src/app/service/check.ts
+21
-0
No files found.
src/app/main/topic-module-detail/topic-module-detail.component.html
View file @
8354aff6
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<!--<app-search-item isMust="true" inModal="true" [label]="'frequency' | translate" [(value)]="req.frequency"></app-search-item>-->
<!--<app-search-item isMust="true" inModal="true" [label]="'frequency' | translate" [(value)]="req.frequency"></app-search-item>-->
<app-search-item
isMust=
"true"
inModal=
"true"
[
label
]="'
interval
'
|
translate
"
[(
value
)]="
req
.
interval
"
></app-search-item>
<app-search-item
isMust=
"true"
inModal=
"true"
[
label
]="'
interval
'
|
translate
"
[(
value
)]="
req
.
interval
"
></app-search-item>
<app-search-select
inModal=
"true"
[
label
]="'
retentionPolicyName
'
|
translate
"
[(
value
)]="
req
.
retentionPolicyNo
"
<app-search-select
i
sMust=
"true"
i
nModal=
"true"
[
label
]="'
retentionPolicyName
'
|
translate
"
[(
value
)]="
req
.
retentionPolicyNo
"
[
data
]="
policyList
"
[
data
]="
policyList
"
(
valueChange
)="
onChangePolicy
()"
(
valueChange
)="
onChangePolicy
()"
optL=
"opLevel"
optV=
"opValue"
></app-search-select>
optL=
"opLevel"
optV=
"opValue"
></app-search-select>
...
...
src/app/main/topic-module-detail/topic-module-detail.component.ts
View file @
8354aff6
...
@@ -116,10 +116,12 @@ export class TopicModuleDetailComponent implements OnInit {
...
@@ -116,10 +116,12 @@ export class TopicModuleDetailComponent implements OnInit {
this
.
req
.
frequency
=
0
;
this
.
req
.
frequency
=
0
;
this
.
isUpdate
=
false
;
this
.
isUpdate
=
false
;
this
.
try
=
{
this
.
try
=
{
trans
:
{
topicName
:
'topicName'
,
topicType
:
'topicType'
,
trans
:
{
topicName
:
'topicName'
,
topicType
:
'topicType'
,
retentionPolicyNo
:
'retentionPolicyNo'
,
dataType
:
'dataType'
,
interval
:
'inTime'
,
dataInterval
:
'dataInterval'
},
dataType
:
'dataType'
,
interval
:
'inTime'
,
dataInterval
:
'dataInterval'
},
field
:
[
'topicName'
,
'topicType'
,
'dataType'
,
'interval'
],
field
:
[
'topicName'
,
'topicType'
,
'dataType'
,
'interval'
,
'retentionPolicyNo'
],
num
:
[
'dataType'
,
'interval'
,
'dataInterval'
]};
num
:
[
'dataType'
,
'interval'
,
'dataInterval'
],
retentionPolicyNo
:
[
'retentionPolicyNo'
]
};
this
.
isV
=
true
;
this
.
isV
=
true
;
}
}
...
@@ -137,10 +139,12 @@ export class TopicModuleDetailComponent implements OnInit {
...
@@ -137,10 +139,12 @@ export class TopicModuleDetailComponent implements OnInit {
}
}
this
.
try
=
{
this
.
try
=
{
trans
:
{
topicName
:
'topicName'
,
topicType
:
'topicType'
,
trans
:
{
topicName
:
'topicName'
,
topicType
:
'topicType'
,
retentionPolicyNo
:
'retentionPolicyNo'
,
dataType
:
'dataType'
,
interval
:
'inTime'
,
dataInterval
:
'dataInterval'
},
dataType
:
'dataType'
,
interval
:
'inTime'
,
dataInterval
:
'dataInterval'
},
field
:
[
'topicModelNo'
,
'topicName'
,
'topicType'
,
'dataType'
,
'interval'
],
field
:
[
'topicModelNo'
,
'topicName'
,
'topicType'
,
'dataType'
,
'interval'
,
'retentionPolicyNo'
],
num
:
[
'dataType'
,
'interval'
,
'dataInterval'
]};
num
:
[
'dataType'
,
'interval'
,
'dataInterval'
],
retentionPolicyNo
:
[
'retentionPolicyNo'
]
};
this
.
isV
=
true
;
this
.
isV
=
true
;
}
}
...
...
src/app/service/check.ts
View file @
8354aff6
...
@@ -71,6 +71,14 @@ export class CheckService {
...
@@ -71,6 +71,14 @@ export class CheckService {
}
}
}
}
if
(
req
.
retentionPolicyNo
)
{
console
.
log
(
req
,
req
.
retentionPolicyNo
)
req
.
retentionPolicyNo
.
filter
((
item
)
=>
this
.
checkRetentionPolicyNo
(
fieldStr
,
data
,
item
));
if
(
this
.
flag
)
{
return
false
;
}
}
return
true
;
return
true
;
}
}
...
@@ -93,6 +101,19 @@ export class CheckService {
...
@@ -93,6 +101,19 @@ export class CheckService {
}
}
}
}
private
checkRetentionPolicyNo
(
fieldStr
,
data
,
field
)
{
if
(
this
.
flag
===
1
)
{
return
false
;
}
if
((
data
[
field
]
===
''
||
isUndefined
(
data
[
field
])
||
data
[
field
]
===
null
)
&&
fieldStr
.
indexOf
(
'-'
+
field
+
'-'
)
>=
-
1
)
{
this
.
message
.
warning
(
this
.
translate
.
instant
(
this
.
trans
[
field
])
+
'为必填字段, 请检查'
);
this
.
flag
=
1
;
return
false
;
}
else
{
return
true
}
}
private
checkTime
(
fieldStr
,
data
,
time
)
{
private
checkTime
(
fieldStr
,
data
,
time
)
{
if
(
this
.
flag
===
1
)
{
if
(
this
.
flag
===
1
)
{
return
false
;
return
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment