Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rongtong-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
融通安全管理系统
rongtong-app
Commits
61d88aa9
Commit
61d88aa9
authored
Mar 26, 2024
by
kaitly205422@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加验证楼层名称重复
parent
65a42085
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
src/views/riskProject/add/addFloor.vue
src/views/riskProject/add/addFloor.vue
+19
-2
src/views/riskProject/add/addInherent.vue
src/views/riskProject/add/addInherent.vue
+1
-1
No files found.
src/views/riskProject/add/addFloor.vue
View file @
61d88aa9
...
...
@@ -45,6 +45,10 @@ export default {
props
:
{
buildingId
:
{
type
:
String
,
},
floorList
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
destroyed
()
{
...
...
@@ -62,12 +66,25 @@ export default {
this
.
$emit
(
'
close
'
,
data
)
},
onSubmit
(
values
)
{
console
.
log
(
this
.
buildingId
)
if
(
!
this
.
buildingId
)
{
return
;
}
this
.
form
.
buildingId
=
this
.
buildingId
this
.
form
.
name
=
this
.
form
.
name
+
'
层
'
const
name
=
this
.
form
.
name
+
'
层
'
/* 检测类型当前楼层是否已存在 */
const
typeObj
=
this
.
floorList
.
find
(
item
=>
item
.
text
===
this
.
form
.
type
);
if
(
typeObj
&&
typeObj
.
children
.
find
(
item
=>
item
.
text
===
name
))
{
this
.
$toast
.
fail
({
message
:
"
楼层已存在
"
,
duration
:
2000
});
return
;
}
if
(
!
this
.
form
.
name
.
endsWith
(
'
层
'
))
{
this
.
form
.
name
=
name
}
postFun
(
'
/risk/plan/floor
'
,
this
.
form
)
.
then
(
res
=>
{
this
.
$toast
.
clear
();
...
...
src/views/riskProject/add/addInherent.vue
View file @
61d88aa9
...
...
@@ -324,7 +324,7 @@
</div>
</van-popup>
<div
v-if=
"isFloor"
>
<addFloor
@
close=
"closeFloor"
:buildingId=
"form.buildingIds"
/>
<addFloor
@
close=
"closeFloor"
:buildingId=
"form.buildingIds"
:floorList=
"floorSource"
/>
</div>
<!-- 管控责任人 -->
<van-popup
v-model=
"showTrouble"
position=
"bottom"
>
...
...
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