Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
644674bc
Commit
644674bc
authored
Jan 06, 2025
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 优化部门管理
parent
60a7673c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
+22
-18
base-manager-ui/admin/src/pages/basicset/dept/department.vue
base-manager-ui/admin/src/pages/basicset/dept/department.vue
+22
-18
No files found.
base-manager-ui/admin/src/pages/basicset/dept/department.vue
View file @
644674bc
...
...
@@ -357,13 +357,13 @@ export default {
}
},
},
watch
:
{
deptSearchVal
(
newVal
)
{
if
(
newVal
===
""
)
{
this
.
getDeptListData
();
}
},
},
//
watch: {
//
deptSearchVal(newVal) {
//
if (newVal === "") {
//
this.getDeptListData();
//
}
//
},
//
},
// 进入路由前
beforeRouteEnter
(
to
,
from
,
next
)
{
if
(
from
.
path
===
"
/department/adddepartment
"
)
{
...
...
@@ -401,13 +401,13 @@ export default {
});
},
// 获取部门列表
async
getDeptListData
(
obj
=
{}
)
{
async
getDeptListData
()
{
this
.
deptLoading
=
true
;
let
res
=
await
getDeptList
({
siteId
:
this
.
siteId
,
page
:
1
,
size
:
-
1
,
...
obj
,
name
:
`%
${
this
.
deptSearchVal
}
%`
,
});
this
.
deptLoading
=
false
;
let
{
code
,
data
}
=
res
.
data
;
...
...
@@ -481,7 +481,7 @@ export default {
let
res
=
await
delDept
({
id
:
num
});
let
{
code
,
msg
}
=
res
.
data
;
if
(
code
===
1
)
{
_this
.
getDeptListData
(
_this
.
siteId
);
_this
.
getDeptListData
();
_this
.
$message
.
success
(
msg
);
}
},
...
...
@@ -501,11 +501,15 @@ export default {
deptId
:
this
.
deptId
,
...
obj
,
});
let
{
code
,
data
}
=
res
.
data
;
if
(
code
===
1
)
{
this
.
total
=
data
.
pageInfo
.
totalResult
;
this
.
windowData
=
data
.
data
;
this
.
loading
=
false
;
if
(
res
.
data
.
code
===
1
)
{
let
{
total
,
data
}
=
res
.
data
.
data
;
if
(
!
data
.
length
&&
this
.
page
>
1
)
{
this
.
page
-=
1
;
this
.
getWindowListData
();
}
this
.
total
=
total
;
this
.
windowData
=
data
;
}
},
// 新增窗口
...
...
@@ -539,7 +543,7 @@ export default {
let
res
=
await
delWindow
({
id
:
num
});
let
{
code
,
msg
}
=
res
.
data
;
if
(
code
===
1
)
{
_this
.
getWindowListData
(
_this
.
siteId
);
_this
.
getWindowListData
();
_this
.
$message
.
success
(
msg
);
}
},
...
...
@@ -560,8 +564,8 @@ export default {
this
.
getWindowListData
();
},
// 左边搜索
onSearch
(
value
)
{
this
.
getDeptListData
(
{
name
:
`%
${
value
}
%`
}
);
onSearch
()
{
this
.
getDeptListData
();
},
// 右边搜索
onSearchRight
()
{
...
...
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