Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-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
赵啸非
device-new-platform
Commits
519317b1
Commit
519317b1
authored
Aug 28, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新资源部署
parent
23b0b91c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
device-manager-ui/admin/src/views/device/module/distribute/list.vue
...ager-ui/admin/src/views/device/module/distribute/list.vue
+11
-5
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceModuleDistributeServiceImpl.java
...evice/service/impl/DeviceModuleDistributeServiceImpl.java
+2
-2
No files found.
device-manager-ui/admin/src/views/device/module/distribute/list.vue
View file @
519317b1
...
...
@@ -76,8 +76,11 @@ export default {
if
(
row
.
selected
==
1
){
this
.
$post
(
"
/device/module/distribute/selected
"
,
{
id
:
row
.
id
,
selected
:
0
})
.
then
(
res
=>
{
if
(
res
.
code
==
1
){
row
.
selected
=
0
;
if
(
res
&&
res
.
code
&&
res
.
code
==
1
)
{
this
.
getData
();
this
.
loading
=
false
;
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
})
.
catch
(
error
=>
{
...
...
@@ -86,15 +89,18 @@ export default {
}
else
{
this
.
$post
(
"
/device/module/distribute/selected
"
,
{
id
:
row
.
id
,
selected
:
1
})
.
then
(
res
=>
{
if
(
res
.
code
==
1
){
row
.
selected
=
1
;
if
(
res
&&
res
.
code
&&
res
.
code
==
1
)
{
this
.
getData
();
this
.
loading
=
false
;
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
);
})
}
this
.
getData
();
},
distribute
(
row
)
{
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceModuleDistributeServiceImpl.java
View file @
519317b1
...
...
@@ -121,11 +121,11 @@ public class DeviceModuleDistributeServiceImpl extends AbstractCRUDServiceImpl<D
List
<
DeviceModuleDistributeEntity
>
deviceModuleDistributeEntities
=
this
.
find
(
query
,
context
);
if
(
ObjectUtils
.
isEmpty
(
deviceModuleDistributeEntities
))
throw
new
AppException
(
"当前产品
选择切换
后没有默认选择,不能切换!"
);
throw
new
AppException
(
"当前产品
默认选择取消
后没有默认选择,不能切换!"
);
DeviceModuleDistributeEntity
moduleDistribute
=
deviceModuleDistributeEntities
.
stream
().
filter
(
f
->
f
.
getSelected
()
==
YesNoEnum
.
YES
.
getValue
()).
findFirst
().
orElseGet
(()
->
null
);
if
(
ObjectUtils
.
isEmpty
(
moduleDistribute
))
throw
new
AppException
(
"当前产品
选择切换
后没有默认选择,不能切换!"
);
throw
new
AppException
(
"当前产品
默认选择取消
后没有默认选择,不能切换!"
);
}
...
...
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