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
bbe4fd80
authored
2023-02-17 15:06:36 +0800
by
xiaomiao
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://yun.pashanhoo.com:9090/bdc/bdcjg-web
2 parents
fe37ae55
7ce6cf1a
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
81 additions
and
39 deletions
babel.config.js
src/layout/components/Navbar.vue
src/mixins/tableMixin.js
src/permission.js
src/store/getters.js
src/store/modules/products.js
src/store/modules/user.js
src/views/home/dataView/index.vue
src/views/login/index.vue
src/views/system/dictionaries/components/editDialog.vue
babel.config.js
View file @
bbe4fd8
...
...
@@ -6,10 +6,6 @@ module.exports = {
"@vue/app"
,
{
"useBuiltIns"
:
"entry"
,
polyfills
:
[
'es6.promise'
,
'es6.symbol'
]
}
]
],
...
...
src/layout/components/Navbar.vue
View file @
bbe4fd8
...
...
@@ -5,7 +5,7 @@
{{
dicData
[
"sysCode"
]
&&
dicData
[
"sysCode"
][
0
].
DNAME
}}
</div>
<div
class=
"user"
>
欢迎进入系统
{{
name
}}
欢迎进入系统
{{
userInfo
.
name
}}
<span
@
click=
"onCancel"
>
<svg-icon
icon-class=
"close"
class=
"closeStyle"
/>
退出系统
</span
>
...
...
@@ -30,13 +30,14 @@ export default {
sidebarRight
,
},
computed
:
{
...
mapGetters
([
"sidebar"
,
"dicData"
,
"
name
"
]),
...
mapGetters
([
"sidebar"
,
"dicData"
,
"
userInfo
"
]),
},
methods
:
{
onCancel
()
{
logout
()
.
then
((
res
)
=>
{
sessionStorage
.
removeItem
(
"token"
);
this
.
$store
.
dispatch
(
"user/resetState"
);
this
.
$router
.
replace
({
path
:
"/login"
,
query
:
{
...
...
src/mixins/tableMixin.js
View file @
bbe4fd8
...
...
@@ -17,7 +17,7 @@ let mixin = {
...
mapGetters
([
'dicData'
])
},
created
()
{
// this.featchData
()
this
.
handleSearch
()
},
methods
:
{
// 表格索引得问题
...
...
src/permission.js
View file @
bbe4fd8
...
...
@@ -37,8 +37,6 @@ router.beforeEach(async (to, from, next) => {
"permission/generateRoutes"
,
getMenuData
);
// 获取用户信息
await
store
.
dispatch
(
"user/getUserInfo"
);
router
.
addRoutes
([
...
accessRoutes
,
{
path
:
"*"
,
redirect
:
"/404"
,
hidden
:
true
},
...
...
src/store/getters.js
View file @
bbe4fd8
...
...
@@ -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 @
bbe4fd8
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/store/modules/user.js
View file @
bbe4fd8
import
{
getUserInfo
}
from
"@/api/user"
;
const
state
=
{
hasUser
:
false
,
name
:
""
,
avatar
:
"https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
,
userInfo
:
null
,
};
const
mutations
=
{
SET_USERINFO
:
(
state
,
data
)
=>
{
state
.
hasUser
=
true
;
state
.
userInfo
=
data
;
state
.
name
=
data
.
loginName
;
},
RESET_USER
:
(
state
)
=>
{
state
.
hasUser
=
false
;
state
.
userInfo
=
null
;
},
};
const
actions
=
{
getUserInfo
({
commit
})
{
if
(
!
state
.
hasUser
)
{
return
new
Promise
(
async
(
resolve
)
=>
{
let
{
result
:
res
}
=
await
getUserInfo
();
commit
(
"SET_USERINFO"
,
res
);
resolve
(
true
);
});
}
else
{
return
}
},
reset
dict
({
commit
})
{
reset
State
({
commit
})
{
commit
(
"RESET_USER"
);
},
};
...
...
src/views/home/dataView/index.vue
View file @
bbe4fd8
...
...
@@ -9,7 +9,7 @@
<div
class=
"d-flex"
>
<dv-decoration-8
class=
"dv-dec-8"
:color=
"decorationColor"
/>
<div
class=
"title"
>
<span
class=
"title-text"
>
汉中市不动产监管大屏
</span>
<span
class=
"title-text"
>
{{
products
.
name
}}
}
</span>
<dv-decoration-5
:dur=
"1"
class=
"dv-dec-5"
...
...
@@ -60,6 +60,9 @@ export default {
},
500
);
},
},
computed
:
{
...
mapGetters
([
"products"
]),
},
};
</
script
>
...
...
src/views/login/index.vue
View file @
bbe4fd8
...
...
@@ -11,11 +11,16 @@
class=
"demo-ruleForm"
>
<el-form-item
prop=
"account"
>
<el-input
v-model=
"user.account"
placeholder=
"用户名"
></el-input>
<el-input
class=
"username"
v-model=
"user.account"
placeholder=
"用户名"
></el-input>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-input
type=
"password"
class=
"password"
v-model=
"user.password"
placeholder=
"登录密码"
></el-input>
...
...
@@ -39,9 +44,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 +60,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 +125,22 @@ export default {
});
},
},
computed
:
{
productName
()
{
return
this
.
$store
.
state
.
products
.
products
.
name
;
},
},
components
:
{},
};
</
script
>
<
style
scoped
lang=
"scss"
>
.username
,
.password
{
/deep/
.el-input__inner
{
border
:
1px
solid
#6bc1fc
;
background-color
:
transparent
!important
;
}
}
.bg
{
width
:
100%
;
height
:
100%
;
...
...
@@ -120,14 +162,13 @@ export default {
.login
.user_style
{
margin
:
40px
20px
0
;
h3{
h3
{
color
:
#fff
;
font-weight
:
normal
;
text-align
:
center
;
margin-bottom
:
20px
;
}
}
.login
.btn
{
width
:
100%
;
height
:
6vh
;
...
...
@@ -158,21 +199,9 @@ export default {
#loginform
.el-input__inner
{
width
:
100%
!important
;
caret-color
:
#000
!important
;
color
:
#606266
!important
;
border-radius
:
4px
!important
;
border
:
1px
solid
#67c23a
!important
;
background
:
#fff
!important
;
opacity
:
1
!important
;
}
#loginform
.el-input__inner
::-webkit-input-placeholder
{
/* WebKit browsers */
color
:
#80807f
!important
;
}
.el-checkbox__label
{
color
:
#fff
;
}
</
style
>
<
style
>
</
style
>
...
...
src/views/system/dictionaries/components/editDialog.vue
View file @
bbe4fd8
...
...
@@ -291,7 +291,7 @@ export default {
handleSubmit
()
{
editDictNode
({
dictid
:
this
.
details
.
rowData
.
dictid
,
typeid
:
this
.
details
.
rowData
.
typeid
,
typeid
:
this
.
details
.
rowData
.
TYPEID
,
children
:
this
.
tableData
,
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
...
...
Please
register
or
sign in
to post a comment