Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f587b9a9
authored
2023-02-16 15:07:15 +0800
by
yangwei
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
根据子系统code获取子系统详细信息
1 parent
7bdc3051
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
9 deletions
src/store/getters.js
src/store/modules/products.js
src/views/login/index.vue
src/store/getters.js
View file @
f587b9a
...
...
@@ -5,13 +5,13 @@ const getters = {
visitedViews
:
state
=>
state
.
tagsView
.
visitedViews
,
cachedViews
:
state
=>
state
.
tagsView
.
cachedViews
,
avatar
:
state
=>
state
.
user
.
avatar
,
name
:
state
=>
state
.
user
.
name
,
userInfo
:
state
=>
state
.
user
.
userInfo
,
permission_routes
:
state
=>
state
.
permission
.
routes
,
addRoutes
:
state
=>
state
.
permission
.
addRoutes
,
// business
rules
:
state
=>
state
.
business
.
rules
,
dicData
:
state
=>
state
.
dict
.
dicData
,
Edit
:
state
=>
state
.
business
.
Edit
,
businessInfo
:
state
=>
state
.
dictionaries
.
businessInfo
businessInfo
:
state
=>
state
.
dictionaries
.
businessInfo
,
products
:
state
=>
state
.
products
.
products
}
export
default
getters
...
...
src/store/modules/products.js
0 → 100644
View file @
f587b9a
const
state
=
{
products
:
null
,
};
const
mutations
=
{
SET_PRODUCTS
:
(
state
,
data
)
=>
{
state
.
products
=
data
;
},
};
const
actions
=
{
setData
({
commit
},
data
)
{
commit
(
"SET_PRODUCTS"
,
data
);
},
};
export
default
{
namespaced
:
true
,
state
,
mutations
,
actions
,
};
src/views/login/index.vue
View file @
f587b9a
...
...
@@ -39,9 +39,10 @@
<
script
>
import
{
loginIn
}
from
"@/api/login.js"
;
import
{
api
,
getAction
}
from
"@/api/manageApi"
;
export
default
{
name
:
"Login"
,
data
:
function
()
{
data
()
{
return
{
user
:
{
account
:
""
,
...
...
@@ -54,7 +55,31 @@ export default {
},
};
},
mounted
:
function
()
{
created
()
{
const
params
=
{};
const
queryOptions
=
{
conditionGroup
:
{
conditions
:
[
{
property
:
"code"
,
value
:
"BDCJGPT"
,
operator
:
"EQ"
,
},
],
queryRelation
:
"AND"
,
},
};
params
.
queryOptions
=
JSON
.
stringify
(
queryOptions
);
//根据子系统code获取子系统详细信息
getAction
(
api
.
subsystem
,
params
).
then
((
res
)
=>
{
if
(
res
.
status
===
1
)
{
this
.
$store
.
dispatch
(
"products/setData"
,
res
.
content
[
0
]);
}
else
{
this
.
$message
.
error
({
message
:
res
.
message
,
showClose
:
true
});
}
});
},
mounted
()
{
// this.checkUserName();
},
methods
:
{
...
...
@@ -95,10 +120,15 @@ export default {
});
},
},
computed
:
{
productName
()
{
return
this
.
$store
.
state
.
products
.
products
.
name
;
},
},
components
:
{},
};
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.bg
{
width
:
100%
;
height
:
100%
;
...
...
@@ -120,7 +150,7 @@ export default {
.login
.user_style
{
margin
:
40px
20px
0
;
h3{
h3
{
color
:
#fff
;
font-weight
:
normal
;
text-align
:
center
;
...
...
@@ -174,5 +204,4 @@ export default {
color
:
#fff
;
}
</
style
>
<
style
>
</
style
>
<
style
></
style
>
...
...
Please
register
or
sign in
to post a comment