Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car-database-web
Project
Project
Details
Activity
Releases
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
中汽研标准应用数据库
car-database-web
Commits
fcf571c7
Commit
fcf571c7
authored
Sep 14, 2024
by
jiaxu.yan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 关联勾选
parent
b5d1bdbf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
32 deletions
+45
-32
checkInput.vue
src/components/CheckCoiumns/checkInput.vue
+8
-10
checkInputUpload.vue
src/components/CheckCoiumns/checkInputUpload.vue
+9
-3
checkbox.vue
src/components/CheckCoiumns/checkbox.vue
+21
-15
checkboxUpload.vue
src/components/CheckCoiumns/checkboxUpload.vue
+7
-4
No files found.
src/components/CheckCoiumns/checkInput.vue
View file @
fcf571c7
...
@@ -100,18 +100,16 @@ export default {
...
@@ -100,18 +100,16 @@ export default {
}
}
}
}
})
})
console
.
log
(
this
.
model
.
list
)
this
.
model
.
value
=
old
this
.
model
.
value
=
old
},
},
removeItem
(
array
,
item
)
{
checkOne
(
i
,
e
)
{
let
arr
=
[]
if
(
this
.
merge
)
{
array
.
map
(
i
=>
{
this
.
$emit
(
'mergeVal'
,
{
if
(
i
!==
item
)
{
name
:
e
,
arr
.
push
(
i
)
flag
:
i
.
flag
?
i
.
flag
.
split
(
','
)
:
[]
}
})
})
}
return
arr
},
},
input
(
val
)
{
input
(
val
)
{
let
arr
=
[]
let
arr
=
[]
...
...
src/components/CheckCoiumns/checkInputUpload.vue
View file @
fcf571c7
...
@@ -136,11 +136,17 @@ export default {
...
@@ -136,11 +136,17 @@ export default {
}
}
}
}
})
})
console
.
log
(
this
.
model
.
list
)
this
.
model
.
value
=
old
this
.
model
.
value
=
old
},
},
removeItem
(
array
,
item
)
{
let
arr
=
[]
array
.
map
(
i
=>
{
if
(
i
!==
item
)
{
arr
.
push
(
i
)
}
})
return
arr
},
checkOne
(
i
,
e
)
{
checkOne
(
i
,
e
)
{
if
(
this
.
merge
)
{
if
(
this
.
merge
)
{
this
.
$emit
(
'mergeVal'
,
{
this
.
$emit
(
'mergeVal'
,
{
...
...
src/components/CheckCoiumns/checkbox.vue
View file @
fcf571c7
...
@@ -70,29 +70,35 @@ export default {
...
@@ -70,29 +70,35 @@ export default {
return
return
}
}
let
old
=
this
.
value
||
[]
let
old
=
this
.
value
||
[]
this
.
items
.
options
.
map
(
i
=>
{
if
(
this
.
prop
==
'chcek2'
||
this
.
prop
==
'chcek0'
)
{
if
(
name
)
{
this
.
items
.
options
.
map
(
i
=>
{
if
(
Array
.
isArray
(
old
)
&&
flag
.
includes
(
String
(
i
.
id
)))
{
if
(
name
)
{
old
.
push
(
i
.
id
)
if
(
Array
.
isArray
(
old
)
&&
flag
.
includes
(
String
(
i
.
id
)))
{
}
old
.
push
(
i
.
id
)
}
else
{
}
if
(
flag
.
includes
(
String
(
i
.
id
)))
{
}
else
{
old
=
this
.
removeItem
(
old
,
i
.
id
)
||
[]
if
(
flag
.
includes
(
String
(
i
.
id
)))
{
console
.
log
(
i
.
id
)
old
=
this
.
removeItem
(
old
,
i
.
id
)
||
[]
}
}
}
}
})
})
}
this
.
value
=
old
this
.
value
=
old
},
},
removeItem
(
array
,
item
)
{
removeItem
(
array
,
item
)
{
const
index
=
array
.
indexOf
(
item
)
let
arr
=
[]
if
(
index
!==
-
1
)
{
array
.
map
(
i
=>
{
array
.
splice
(
index
,
1
)
if
(
i
!==
item
)
{
}
arr
.
push
(
i
)
}
})
return
arr
},
},
checkOne
(
i
,
e
)
{
checkOne
(
i
,
e
)
{
if
(
this
.
merge
)
{
if
(
this
.
merge
)
{
this
.
$emit
(
'mergeVal'
,
{
this
.
$emit
(
'mergeVal'
,
{
name
:
e
,
name
:
e
,
...
...
src/components/CheckCoiumns/checkboxUpload.vue
View file @
fcf571c7
...
@@ -117,10 +117,13 @@ export default {
...
@@ -117,10 +117,13 @@ export default {
},
},
removeItem
(
array
,
item
)
{
removeItem
(
array
,
item
)
{
const
index
=
array
.
indexOf
(
item
)
let
arr
=
[]
if
(
index
!==
-
1
)
{
array
.
map
(
i
=>
{
array
.
splice
(
index
,
1
)
if
(
i
!==
item
)
{
}
arr
.
push
(
i
)
}
})
return
arr
},
},
checkOne
(
i
,
e
)
{
checkOne
(
i
,
e
)
{
...
...
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