Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
precision-effect
Project
Project
Details
Activity
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
耿迪迪
precision-effect
Commits
79516b86
Commit
79516b86
authored
Jun 20, 2023
by
吴卿华
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
aaf52d9d
5f4bf48d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
25 deletions
+14
-25
TPurchaseController.java
...ehong/web/controller/transaction/TPurchaseController.java
+2
-2
Message.vue
...sion-effect-web/src/layout/components/Message/Message.vue
+6
-5
OperatorButton.vue
...fect-web/src/views/purchase/components/OperatorButton.vue
+3
-9
OperatorButton.vue
...-effect-web/src/views/trade/components/OperatorButton.vue
+3
-9
No files found.
precision-effect-admin/src/main/java/com/zehong/web/controller/transaction/TPurchaseController.java
View file @
79516b86
...
@@ -52,8 +52,8 @@ public class TPurchaseController extends BaseController
...
@@ -52,8 +52,8 @@ public class TPurchaseController extends BaseController
{
{
// 获取当前用户
// 获取当前用户
SysUser
user
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
()).
getUser
();
SysUser
user
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
()).
getUser
();
List
<
SysRole
>
calculator
=
user
.
getRoles
().
stream
().
filter
(
item
->
item
.
getRoleKey
()
==
"calculator"
).
collect
(
Collectors
.
toList
());
List
<
SysRole
>
calculator
=
user
.
getRoles
().
stream
().
filter
(
item
->
"calculator"
.
equals
(
item
.
getRoleKey
())
).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isNotNull
(
user
)
&&
!
user
.
isAdmin
()
&&
!
CollectionUtils
.
isEmpty
(
calculator
))
{
if
(
StringUtils
.
isNotNull
(
user
)
&&
!
user
.
isAdmin
()
&&
CollectionUtils
.
isEmpty
(
calculator
))
{
tPurchase
.
setPurchaseDeptId
(
user
.
getDeptId
());
tPurchase
.
setPurchaseDeptId
(
user
.
getDeptId
());
}
}
startPage
();
startPage
();
...
...
precision-effect-web/src/layout/components/Message/Message.vue
View file @
79516b86
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<el-dropdown
trigger=
"click"
:popper-append-to-body=
"false"
style=
"height: 30px"
>
<el-dropdown
trigger=
"click"
:popper-append-to-body=
"false"
style=
"height: 30px"
>
<div>
<div>
<el-badge
:value=
"this.msgInfo.length"
:max=
"99"
class=
"messageMark"
>
<el-badge
:value=
"this.msgInfo.length
>0 ? this.msgInfo.length : ''
"
:max=
"99"
class=
"messageMark"
>
<!--
<i
class=
"el-icon-chat-dot-round"
/>
-->
<!--
<i
class=
"el-icon-chat-dot-round"
/>
-->
<i
class=
"el-icon-message-solid messageDing"
/>
<i
class=
"el-icon-message-solid messageDing"
/>
</el-badge>
</el-badge>
...
@@ -44,16 +44,17 @@
...
@@ -44,16 +44,17 @@
name
:
"message"
,
name
:
"message"
,
data
(){
data
(){
return
{
return
{
msgInfo
:
{}
msgInfo
:
[]
}
}
},
},
created
(){
created
(){
//登录成功后创建websocket
//登录成功后创建websocket
this
.
$websocket
.
initWebSocket
(
"ws://localhost:8668/precisionEffect/webSocket/"
+
this
.
$store
.
state
.
user
.
roles
.
join
(
","
)
+
"/"
+
this
.
$store
.
state
.
user
.
userId
);
this
.
$websocket
.
initWebSocket
(
"ws://localhost:8668/precisionEffect/webSocket/"
+
this
.
$store
.
state
.
user
.
roles
.
join
(
","
)
+
"/"
+
this
.
$store
.
state
.
user
.
userId
);
this
.
$websocket
.
addEvent
(
"onmessage"
,(
msg
)
=>
{
this
.
$websocket
.
addEvent
(
"onmessage"
,(
msg
)
=>
{
console
.
log
(
"您有新的消息请注意接收:"
,
JSON
.
parse
(
msg
.
data
));
if
(
msg
.
data
){
this
.
msgInfo
=
JSON
.
parse
(
msg
.
data
);
console
.
log
(
"您有新的消息请注意接收:"
,
JSON
.
parse
(
msg
.
data
));
console
this
.
msgInfo
=
JSON
.
parse
(
msg
.
data
);
}
})
})
},
},
methods
:{
methods
:{
...
...
precision-effect-web/src/views/purchase/components/OperatorButton.vue
View file @
79516b86
<
template
>
<
template
>
<div
style=
"display: inline-block;width: 50px"
>
<div
style=
"display: inline-block;width: 50px"
>
<el-button
type=
"text"
@
click=
"open
=true
"
size=
"mini"
>
{{
getOperatorName
()
}}
</el-button>
<el-button
type=
"text"
@
click=
"open
PurchaseDialog
"
size=
"mini"
>
{{
getOperatorName
()
}}
</el-button>
<el-dialog
:title=
"getOperatorName()"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
:close-on-click-modal=
"false"
destroy-on-close
>
<el-dialog
:title=
"getOperatorName()"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
:close-on-click-modal=
"false"
destroy-on-close
>
<component
:is=
"currentTabComponent"
:purchaseData=
"purchaseData"
ref=
"currentCom"
v-if=
"open"
></component>
<component
:is=
"currentTabComponent"
:purchaseData=
"purchaseData"
ref=
"currentCom"
v-if=
"open"
></component>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
v-if=
"operatorName != 'purchaseDetail'"
>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
v-if=
"operatorName != 'purchaseDetail'"
>
...
@@ -34,13 +34,6 @@
...
@@ -34,13 +34,6 @@
created
(){
created
(){
this
.
currentTabComponent
=
this
.
operatorName
;
this
.
currentTabComponent
=
this
.
operatorName
;
},
},
watch
:
{
open
(
newVal
,
oldVal
){
if
(
newVal
){
this
.
getPurchaseInfo
();
}
}
},
data
(){
data
(){
return
{
return
{
open
:
false
,
open
:
false
,
...
@@ -61,10 +54,11 @@
...
@@ -61,10 +54,11 @@
return
""
;
return
""
;
}
}
},
},
getPurchaseInfo
(){
openPurchaseDialog
(){
getPurchase
(
this
.
purchaseInfo
.
purchaseId
).
then
(
res
=>
{
getPurchase
(
this
.
purchaseInfo
.
purchaseId
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
this
.
purchaseData
=
res
.
data
;
this
.
purchaseData
=
res
.
data
;
this
.
open
=
true
;
}
}
})
})
},
},
...
...
precision-effect-web/src/views/trade/components/OperatorButton.vue
View file @
79516b86
<
template
>
<
template
>
<div
style=
"display: inline-block;width: 50px"
>
<div
style=
"display: inline-block;width: 50px"
>
<el-button
type=
"text"
@
click=
"open
=true
"
size=
"mini"
>
{{
getOperatorName
()
}}
</el-button>
<el-button
type=
"text"
@
click=
"open
Dialog
"
size=
"mini"
>
{{
getOperatorName
()
}}
</el-button>
<el-dialog
:title=
"getOperatorName()"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
:close-on-click-modal=
"false"
destroy-on-close
>
<el-dialog
:title=
"getOperatorName()"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
:close-on-click-modal=
"false"
destroy-on-close
>
<component
:is=
"currentTabComponent"
:tradeData=
"tradeData"
ref=
"currentCom"
v-if=
"open"
></component>
<component
:is=
"currentTabComponent"
:tradeData=
"tradeData"
ref=
"currentCom"
v-if=
"open"
></component>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
v-if=
"operatorName != 'tradeDetail'"
>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center"
v-if=
"operatorName != 'tradeDetail'"
>
...
@@ -36,13 +36,6 @@
...
@@ -36,13 +36,6 @@
created
(){
created
(){
this
.
currentTabComponent
=
this
.
operatorName
;
this
.
currentTabComponent
=
this
.
operatorName
;
},
},
watch
:
{
open
(
newVal
,
oldVal
){
if
(
newVal
){
this
.
getTradeInfo
();
}
}
},
data
(){
data
(){
return
{
return
{
open
:
false
,
open
:
false
,
...
@@ -65,10 +58,11 @@
...
@@ -65,10 +58,11 @@
return
""
;
return
""
;
}
}
},
},
getTradeInfo
(){
openDialog
(){
getProject
(
this
.
tradeInfo
.
tradeId
).
then
(
res
=>
{
getProject
(
this
.
tradeInfo
.
tradeId
).
then
(
res
=>
{
if
(
res
.
code
==
200
){
if
(
res
.
code
==
200
){
this
.
tradeData
=
res
.
data
;
this
.
tradeData
=
res
.
data
;
this
.
open
=
true
;
}
}
})
})
},
},
...
...
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