Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
horse
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
向伟
horse
Commits
01693467
Commit
01693467
authored
Nov 22, 2021
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/xiangwei/horse
into master
parents
ca982234
7c9a62c0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
29 deletions
+40
-29
departmentStaff.vue
src/components/common/departmentStaff.vue
+35
-25
editRuleModule.ts
src/module/editor/editRuleModule.ts
+4
-2
customerSetup.vue
src/pages/customer/customerSetup.vue
+0
-1
groupingManage.vue
src/pages/drainage/groupingManage.vue
+1
-1
No files found.
src/components/common/departmentStaff.vue
View file @
01693467
...
...
@@ -41,13 +41,14 @@
no-connectors
v-model:ticked=
"defaultArray"
@
update:ticked=
"tickedTree"
/>
</div>
<div
class=
"col-6 q-px-sm"
>
<div
class=
"list-title"
>
已选择的部门或成员
</div>
<div
class=
"q-pb-none col-12 list-box"
>
<div
v-for=
"(item,index) in
defaul
tArray"
v-for=
"(item,index) in
selec
tArray"
:key=
"index"
class=
"list-item"
>
...
...
@@ -55,14 +56,14 @@
<q-icon
name=
"work"
color=
"primary"
v-if=
"item.slice(0, 1) == 1"
v-if=
"item.
Id.
slice(0, 1) == 1"
/>
<q-icon
name=
"person"
color=
"accent"
v-if=
"item.slice(0, 1) == 2"
v-if=
"item.
Id.
slice(0, 1) == 2"
/>
<span
class=
"q-ml-sm"
>
{{ item.
split('-')[1]
}}
</span>
<span
class=
"q-ml-sm"
>
{{ item.
Name
}}
</span>
</div>
<q-icon
name=
"cancel"
@
click=
"delItem(index)"
></q-icon>
</div>
...
...
@@ -84,6 +85,10 @@ import { ref } from 'vue'
interface
parmas
{
[
key
:
string
]:
any
}
interface
SelectParams
{
Id
:
number
,
Name
:
string
}
export
default
{
props
:
{
modelValue
:
{
...
...
@@ -136,43 +141,48 @@ export default {
setup
(
props
,
ctx
)
{
let
tree
=
ref
<
any
>
(
null
);
let
list
=
ref
<
Array
<
string
>>
([])
let
selectArray
=
ref
<
Array
<
SelectParams
>>
([])
let
hideDialog
=
()
=>
{
ctx
.
emit
(
"update:modelValue"
,
false
)
}
let
findChild
=
(
arr
:
parmas
)
=>
{
arr
.
map
((
e
)
=>
{
if
(
e
[
props
.
childrenKey
]
&&
e
[
props
.
childrenKey
].
length
>
0
)
{
let
parentId
=
e
[
props
.
nodeKey
]
let
flag
=
tree
.
value
.
isTicked
(
parentId
)
// let childArr = e[props.childrenKey].map(_e => _e[props.nodeKey])
// let flag2 = childArr.every(_e => {
// return props.defaultArray.toString().indexOf(_e) != -1
// })
console
.
log
(
147
,
parentId
,
flag
)
findChild
(
e
[
props
.
childrenKey
])
}
})
const
getselectArray
=
(
arr
:
parmas
)
=>
{
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
){
let
j
=
arr
[
i
]
let
flag
=
tree
.
value
.
isTicked
(
j
.
newId
)
if
(
flag
==
true
){
selectArray
.
value
.
push
({
Id
:
j
.
newId
,
Name
:
j
.
DeptName
})
}
else
{
if
(
j
.
ChildList
&&
j
.
ChildList
.
length
>
0
){
getselectArray
(
j
.
ChildList
)
}
}
}
}
let
tickedTree
=
(
val
)
=>
{
ctx
.
emit
(
"update:defaultArray"
,
val
)
console
.
log
(
'defaultArray'
,
val
)
findChild
(
props
.
treeData
)
setTimeout
(()
=>
{
selectArray
.
value
=
[]
getselectArray
(
props
.
treeData
)
console
.
log
(
selectArray
.
value
,
'selectArray'
)
},
100
)
}
let
delItem
=
(
i
:
number
)
=>
{
props
.
defaultArray
.
splice
(
i
,
1
)
}
return
{
tree
,
hideDialog
,
tickedTree
,
delItem
,
list
list
,
getselectArray
,
selectArray
}
}
}
...
...
src/module/editor/editRuleModule.ts
View file @
01693467
...
...
@@ -67,7 +67,8 @@ const editRuleModule = () => {
// 重组唯一id
if
(
data
.
dataTree
.
length
==
0
)
return
data
.
dataTree
.
forEach
(
x
=>
{
x
.
newId
=
x
.
DataType
+
'-'
+
x
.
DeptName
+
'-'
+
x
.
DeptId
// x.newId = x.DataType + '-' +x. DeptName + '-' + x.DeptId
x
.
newId
=
x
.
DataType
+
'-'
+
x
.
DeptId
if
(
x
.
ChildList
&&
x
.
ChildList
.
length
>
0
)
{
getChildList
(
x
.
ChildList
)
}
...
...
@@ -76,7 +77,8 @@ const editRuleModule = () => {
}
const
getChildList
=
(
ChildList
:
Array
<
any
>
)
=>
{
ChildList
.
forEach
(
x
=>
{
x
.
newId
=
x
.
DataType
+
'-'
+
x
.
DeptName
+
'-'
+
x
.
DeptId
// x.newId = x.DataType + '-' + x.DeptName + '-' + x.DeptId
x
.
newId
=
x
.
DataType
+
'-'
+
x
.
DeptId
if
(
x
.
ChildList
&&
x
.
ChildList
.
length
>
0
)
{
getChildList
(
x
.
ChildList
)
}
...
...
src/pages/customer/customerSetup.vue
View file @
01693467
...
...
@@ -47,7 +47,6 @@ export default defineComponent({
setup
()
{
let
tab
=
ref
<
string
>
(
'phase'
)
if
(
router
.
currentRoute
.
value
.
query
&&
router
.
currentRoute
.
value
.
query
.
type
){
// let type = router.currentRoute.value.query.type;
tab
.
value
=
router
.
currentRoute
.
value
.
query
.
type
as
string
}
...
...
src/pages/drainage/groupingManage.vue
View file @
01693467
...
...
@@ -62,7 +62,7 @@
// components: { ExampleComponent },
setup
()
{
let
{
setTitle
,
msg
,
addMsg
,
resetSearch
}
=
groupingManageModule
()
setTitle
(
'难受'
,
false
)
//
setTitle('难受', false)
const
changePage
=
()
=>
{
console
.
log
(
'打印'
)
}
...
...
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