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
ede15671
Commit
ede15671
authored
Oct 29, 2024
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 优化业务事项关联
parent
7c632761
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
42 deletions
+59
-42
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs3.vue
.../src/pages/basicset/business/components/businessTabs3.vue
+59
-42
No files found.
base-manager-ui/admin/src/pages/basicset/business/components/businessTabs3.vue
View file @
ede15671
...
...
@@ -5,7 +5,11 @@
<div
class=
"titel"
>
站点业务列表
</div>
<div
class=
"header-bottom pdr6"
>
<div
class=
"left-btn"
>
<a-button
type=
"danger"
@
click=
"batchDelSiteBusiness"
>
<a-button
type=
"danger"
@
click=
"batchDelSiteBusiness"
:loading=
"delSiteBusinessLoading"
>
批量解除
</a-button>
</div>
...
...
@@ -32,6 +36,7 @@
size=
"middle"
:scroll=
"
{ y: 550 }"
:row-selection="{
selectedRowKeys: siteBusinessRowKeys,
onChange: onSelectChange,
}"
@changePagination="getBusinessMatterData"
...
...
@@ -271,7 +276,7 @@ import {
}
from
"
@/services/business
"
;
import
local
from
"
@/utils/local
"
;
import
YTable
from
"
@/components/YTable.vue
"
;
import
{
uniqueObjArray
}
from
"
@/utils
"
;
export
default
{
components
:
{
YTable
},
data
()
{
...
...
@@ -352,7 +357,9 @@ export default {
],
},
selectedRowKeys
:
[],
siteBusinessRowKeys
:
[],
isCorrelation
:
false
,
delSiteBusinessLoading
:
false
,
isUnbound
:
false
,
visible
:
false
,
isUnboundAll
:
false
,
//批量解除框
...
...
@@ -382,7 +389,7 @@ export default {
created
()
{
this
.
getDeptListData
();
this
.
getBusinessMatterData
();
this
.
getMatterlistData
();
//
this.getMatterlistData();
this
.
getSiteBusinessData
();
this
.
getMatterSiteData
();
},
...
...
@@ -479,6 +486,9 @@ export default {
// 站点关联业务列表搜索
async
onSiteBusinessSearch
()
{
this
.
siteBusinessTable
.
page
=
1
;
this
.
businessMatterAll
=
[];
this
.
deleteDataIds
=
[];
this
.
siteBusinessRowKeys
=
[];
this
.
getBusinessMatterData
();
},
...
...
@@ -513,14 +523,13 @@ export default {
}
else
{
str
=
this
.
unboundMatterData
.
map
((
v
)
=>
v
.
id
).
join
(
"
,
"
);
}
// let arr = this.unboundMatterData.map((v) => v.id).join(",");
let
res
=
await
delBusinessMatter
({
id
:
str
,
...
val
});
let
{
code
,
msg
}
=
res
.
data
;
if
(
code
===
1
)
{
this
.
$message
.
success
(
msg
);
this
.
isUnbound
=
false
;
this
.
getBusinessMatterData
();
this
.
unboundMatterItem
=
[];
this
.
handleCloseUnbound
();
this
.
isUnbound
=
false
;
}
else
{
this
.
$message
.
error
(
msg
);
}
...
...
@@ -533,14 +542,28 @@ export default {
},
// 获取批量解除数据
onSelectChange
(
key
,
row
)
{
if
(
row
.
length
>
0
)
{
this
.
businessMatterAll
=
row
.
map
((
v
)
=>
{
return
{
siteBusinessId
:
v
.
siteBusinessId
,
siteBusinessName
:
v
.
siteBusinessName
,
};
});
onSelectChange
(
key
,
rows
)
{
this
.
siteBusinessRowKeys
=
key
;
this
.
businessMatterAll
=
uniqueObjArray
(
[...
this
.
businessMatterAll
,
...
rows
],
"
id
"
).
filter
((
v
)
=>
{
return
this
.
siteBusinessRowKeys
.
some
((
id
)
=>
v
.
id
==
id
);
});
},
// 批量解除按钮
async
batchDelSiteBusiness
()
{
if
(
this
.
businessMatterAll
.
length
>
0
)
{
this
.
delSiteBusinessLoading
=
true
;
this
.
deleteDataIds
=
[];
// this.businessMatterAll = this.businessMatterAll.map((v) => {
// return {
// id: v.id,
// siteBusinessId: v.siteBusinessId,
// siteBusinessName: v.siteBusinessName,
// };
// });
let
arr
=
this
.
businessMatterAll
.
map
((
v
)
=>
v
.
siteBusinessId
);
let
num
=
0
;
let
getIds
=
async
()
=>
{
...
...
@@ -560,21 +583,13 @@ export default {
}
getIds
();
};
getIds
();
}
else
{
this
.
businessMatterAll
=
[];
this
.
deleteDataIds
=
[];
}
},
// 批量解除按钮
batchDelSiteBusiness
()
{
if
(
this
.
businessMatterAll
.
length
>
0
)
{
await
getIds
();
this
.
isUnboundAll
=
true
;
}
else
{
this
.
$message
.
warning
(
"
请先勾选数据
"
);
return
;
}
this
.
delSiteBusinessLoading
=
false
;
},
// 批量解除确认
...
...
@@ -589,6 +604,8 @@ export default {
this
.
getBusinessMatterData
();
this
.
isUnboundAll
=
false
;
this
.
businessMatterAll
=
[];
this
.
deleteDataIds
=
[];
this
.
siteBusinessRowKeys
=
[];
}
else
{
this
.
$message
.
error
(
msg
);
}
...
...
@@ -597,13 +614,11 @@ export default {
// 获取批量关联事项数据
onRightSelectChange
(
key
,
data
)
{
this
.
selectedRowKeys
=
key
;
this
.
allCorrelationData
=
data
.
map
((
v
)
=>
{
return
{
matterId
:
v
.
matterId
,
matterName
:
v
.
matterName
,
siteId
:
v
.
siteId
,
siteName
:
v
.
siteName
,
};
this
.
allCorrelationData
=
uniqueObjArray
(
[...
this
.
allCorrelationData
,
...
data
],
"
id
"
).
filter
((
v
)
=>
{
return
this
.
selectedRowKeys
.
some
((
id
)
=>
v
.
id
==
id
);
});
},
...
...
@@ -619,6 +634,7 @@ export default {
// 站点事项搜索
onSearchSiteMatter
()
{
this
.
siteMatterTable
.
page
=
1
;
this
.
selectedRowKeys
=
[];
this
.
getMatterSiteData
();
},
// 关联
...
...
@@ -628,14 +644,7 @@ export default {
return
;
}
this
.
isCorrelation
=
true
;
this
.
allCorrelationData
=
[
{
matterId
:
matter
.
matterId
,
matterName
:
matter
.
matterName
,
siteId
:
matter
.
siteId
,
siteName
:
matter
.
siteName
,
},
];
this
.
allCorrelationData
=
[
matter
];
this
.
selectedRowKeys
=
[
matter
.
id
];
},
...
...
@@ -655,7 +664,17 @@ export default {
handleOk
()
{
this
.
$refs
.
formData
.
validate
(
async
(
valid
)
=>
{
if
(
valid
)
{
let
res
=
await
addBatchSave
(
this
.
allCorrelationData
);
let
arr
=
this
.
allCorrelationData
.
map
((
v
)
=>
{
return
{
matterId
:
v
.
matterId
,
matterName
:
v
.
matterName
,
siteId
:
v
.
siteId
,
siteName
:
v
.
siteName
,
siteBusinessId
:
v
.
siteBusinessId
,
siteBusinessName
:
v
.
siteBusinessName
,
};
});
let
res
=
await
addBatchSave
(
arr
);
let
{
code
,
msg
}
=
res
.
data
;
if
(
code
===
1
)
{
this
.
$message
.
success
(
msg
);
...
...
@@ -671,8 +690,6 @@ export default {
},
// 关闭关联对话框
handleclose
()
{
// this.selectedRowKeys = [];
// this.allCorrelationData = [];
this
.
$refs
.
formData
.
resetFields
();
this
.
isCorrelation
=
false
;
},
...
...
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