Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
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
lanbaoming
jiedao-app-operator-master
Commits
48692a00
Commit
48692a00
authored
Dec 26, 2022
by
houjn@hikoon.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部门目标设置时,显示多级部门名称
parent
20b1178e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
18 deletions
+51
-18
index.vue
src/views/ecw/deptTarget/index.vue
+51
-18
No files found.
src/views/ecw/deptTarget/index.vue
View file @
48692a00
...
@@ -148,7 +148,7 @@
...
@@ -148,7 +148,7 @@
getCreateInitData
,
getCreateInitData
,
getPersonTargetPage
getPersonTargetPage
}
from
"
@/api/ecw/deptTarget
"
;
}
from
"
@/api/ecw/deptTarget
"
;
import
{
listSimpleDepts
}
from
"
@/api/system/dept
"
;
import
{
list
Dept
,
list
SimpleDepts
}
from
"
@/api/system/dept
"
;
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
;
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
;
import
dayjs
from
"
dayjs
"
;
import
dayjs
from
"
dayjs
"
;
import
{
parseTime
}
from
'
@/utils/ruoyi
'
;
import
{
parseTime
}
from
'
@/utils/ruoyi
'
;
...
@@ -237,24 +237,27 @@ import { parseTime } from '@/utils/ruoyi';
...
@@ -237,24 +237,27 @@ import { parseTime } from '@/utils/ruoyi';
}
}
},
},
created
()
{
created
()
{
listSimpleDepts
().
then
(
res
=>
{
this
.
getDeptList
();
res
.
data
.
forEach
((
item
)
=>
{
if
(
item
.
parentId
==
0
)
{
this
.
deptArr
.
push
(
item
)
// listSimpleDepts().then(res => {
// this.deptList = this.handleTree(res, "id");
}
else
{
// console.log("this.deptList:"+JSON.stringify(this.deptList));
this
.
deptData
.
push
(
item
)
// res.data.forEach((item) => {
}
// if (item.parentId == 0) {
})
// this.deptArr.push(item)
this
.
deptData
.
forEach
((
value
)
=>
{
// }
var
dept
=
this
.
deptArr
.
filter
(
itt
=>
itt
.
id
==
value
.
parentId
)
// else {
if
(
dept
.
length
>
0
)
{
// this.deptData.push(item)
value
.
name
=
dept
[
0
].
name
+
'
|
'
+
value
.
name
// }
}
// })
// this.deptData.forEach((value) => {
})
// var dept = this.deptArr.filter(itt => itt.id == value.parentId)
});
// if (dept.length > 0) {
// value.name = dept[0].name + ' | ' + value.name
// }
//
// })
// });
getCreateInitData
().
then
(
res
=>
{
getCreateInitData
().
then
(
res
=>
{
this
.
monthList
=
res
.
data
.
month
;
this
.
monthList
=
res
.
data
.
month
;
this
.
quarterList
=
res
.
data
.
quarter
;
this
.
quarterList
=
res
.
data
.
quarter
;
...
@@ -264,6 +267,36 @@ import { parseTime } from '@/utils/ruoyi';
...
@@ -264,6 +267,36 @@ import { parseTime } from '@/utils/ruoyi';
this
.
getList
();
this
.
getList
();
},
},
methods
:
{
methods
:
{
/** 查询部门列表 */
getDeptList
(){
this
.
loading
=
true
;
listDept
(
this
.
queryParams
).
then
(
response
=>
{
this
.
deptList
=
this
.
handleTree
(
response
.
data
,
"
id
"
);
console
.
log
(
"
this.deptList:
"
+
JSON
.
stringify
(
this
.
deptList
));
this
.
deptList
.
forEach
((
item
)
=>
{
this
.
normalizer
(
item
);
// this.deptData.push(item);
// if(item.children!=null&&item.children.length>0){
// item.children.forEach((c) => {
// c.name = item.name +"|"+ c.name;
// this.deptData.push(c);
// });
// }
});
// this.loading = false;
});
},
normalizer
(
item
)
{
this
.
deptData
.
push
(
item
);
if
(
item
.
children
!=
null
&&
item
.
children
.
length
>
0
){
item
.
children
.
forEach
((
c
)
=>
{
c
.
name
=
item
.
name
+
"
|
"
+
c
.
name
;
this
.
normalizer
(
c
);
// this.deptData.push(c);
});
}
return
item
;
},
getChannelList
()
{
getChannelList
()
{
getChannelList
().
then
(
res
=>
this
.
channelList
=
res
.
data
)
getChannelList
().
then
(
res
=>
this
.
channelList
=
res
.
data
)
},
},
...
...
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