Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
jinmao-community-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b3195505
authored
Apr 22, 2021
by
changjin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug,增加欢迎页
parent
45fb072a
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
106 additions
and
31 deletions
+106
-31
index.html
+1
-1
src/components/common/Header.vue
+7
-2
src/components/common/Home.vue
+2
-2
src/components/common/Sidebar.vue
+8
-2
src/components/page/equipment/deviceAlert.vue
+4
-4
src/components/page/equipment/events.vue
+1
-1
src/components/page/equipment/list.vue
+3
-3
src/components/page/index/Login.vue
+1
-1
src/components/page/index/index.vue
+31
-0
src/components/page/system/log.vue
+4
-2
src/components/page/system/project.vue
+9
-2
src/components/page/system/roleAdd.vue
+10
-6
src/components/page/system/roleList.vue
+4
-2
src/components/page/system/userAdd.vue
+8
-1
src/components/page/system/userList.vue
+4
-2
src/main.js
+1
-0
src/router/index.js
+8
-0
static/img/bg.png
+0
-0
static/img/img.png
+0
-0
No files found.
index.html
View file @
b3195505
...
...
@@ -2,7 +2,7 @@
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
智慧
案场管理后台
</title>
<title>
智慧
社区后台管理系统
</title>
<!-- <link rel="shortcut icon" href="../static/img/logo.ico"/> -->
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"
>
</head>
...
...
src/components/common/Header.vue
View file @
b3195505
...
...
@@ -23,13 +23,13 @@
</el-dropdown-menu>
</el-dropdown>
</div>
<div
class=
"breadcrumb"
v-if=
"pageNameList[1].pageName !== '外部系统管理'"
>
<div
class=
"breadcrumb"
v-if=
"pageNameList[1].pageName !== '外部系统管理'
&& pageNameList[1].pageName !== '首页'
"
>
<el-breadcrumb
separator-class=
"el-icon-arrow-right"
>
<el-breadcrumb-item
track-by=
"$index"
v-for=
"(page, index) in pageNameList"
:key=
"page.pageName"
v-show=
"index != 0"
>
{{
page
.
pageName
}}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"breadcrumb1"
v-if=
"pageNameList[1].pageName == '外部系统管理'"
>
<div
class=
"breadcrumb1"
v-if=
"pageNameList[1].pageName == '外部系统管理'
&& pageNameList[1].pageName !== '首页'
"
>
<el-breadcrumb
separator-class=
"el-icon-arrow-right"
>
<el-breadcrumb-item
track-by=
"$index"
v-for=
"(page, index) in pageNameList"
:key=
"page.pageName"
v-show=
"index != 0"
>
{{
page
.
pageName
}}
</el-breadcrumb-item>
...
...
@@ -128,6 +128,11 @@ export default {
this
.
showAlert
(
'请输入新密码~'
)
return
false
}
var
reg
=
/^
[
0-9a-zA-Z
]
+$/
if
(
this
.
data
.
newPassword
&&
(
this
.
data
.
newPassword
.
length
<
6
||
!
reg
.
test
(
this
.
data
.
newPassword
)))
{
this
.
showAlert
(
'新密码不能少于6位数并且不能输入中文~'
)
return
false
}
if
(
!
this
.
data
.
confirmPassword
)
{
this
.
showAlert
(
'请输入确认密码~'
)
return
false
...
...
src/components/common/Home.vue
View file @
b3195505
...
...
@@ -2,10 +2,10 @@
<div
class=
"wrapper"
>
<v-head></v-head>
<v-sidebar></v-sidebar>
<div
class=
"content"
v-if=
"pageNameList[1].pageName !== '外部系统管理'"
>
<div
class=
"content"
v-if=
"pageNameList[1].pageName !== '外部系统管理'
&& pageNameList[1].pageName !== '首页'
"
>
<transition
name=
"move"
mode=
"out-in"
><router-view></router-view></transition>
</div>
<div
class=
"content1"
v-if=
"pageNameList[1].pageName == '外部系统管理'"
>
<div
class=
"content1"
v-if=
"pageNameList[1].pageName == '外部系统管理'
|| pageNameList[1].pageName == '首页'
"
>
<transition
name=
"move"
mode=
"out-in"
><router-view></router-view></transition>
</div>
</div>
...
...
src/components/common/Sidebar.vue
View file @
b3195505
...
...
@@ -5,7 +5,7 @@
<li
v-for=
"(menu,index) in items"
v-on:click=
"changeMenu(menu, 1)"
:class=
"
{'cur':curMenu == menu.id}" :key="index">
{{
menu
.
name
}}
</li>
</ul>
</div>
<div
class=
"sidebarLeft"
v-if=
"pageNameList[1].pageName !== '外部系统管理'"
>
<div
class=
"sidebarLeft"
v-if=
"pageNameList[1].pageName !== '外部系统管理'
&& pageNameList[1].pageName !== '首页'
"
>
<div
class=
"sideMenu"
>
<el-menu
theme=
"dark"
:default-active=
"onRoutes"
class=
"el-menu-demo"
unique-opened
router
>
<template
v-for=
"(item,index) in sideMenu"
>
...
...
@@ -210,12 +210,18 @@ export default {
this
.
$axios
.
get
(
'/baseInfo/initPersonalMenu'
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
'0'
)
{
this
.
items
=
res
.
data
.
data
.
menuResponseList
// this.changeMenu(this.items[0])
if
(
that
.
items
.
length
>
0
)
{
that
.
items
.
forEach
(
function
(
info
,
index
)
{
if
(
that
.
pageNameList
[
1
].
pageName
===
info
.
name
)
{
that
.
changeMenu
(
info
)
}
})
}
else
{
this
.
$alert
(
'您暂无任何权限,请联系管理员'
,
'温馨提示'
,
{
type
:
'warning'
,
confirmButtonText
:
''
})
}
window
.
sessionStorage
.
setItem
(
'projectId'
,
res
.
data
.
data
.
projectId
)
}
})
...
...
src/components/page/equipment/deviceAlert.vue
View file @
b3195505
...
...
@@ -69,7 +69,7 @@
<el-table-column
prop=
"setTime"
label=
"报警内容"
></el-table-column>
<el-table-column
prop=
"actualTime"
label=
"报警时间"
></el-table-column>
</el-table>
<div
class=
"block text-right mt20"
v-if=
"data.page"
>
<div
class=
"block text-right mt20"
v-if=
"data.page
&& data.count > 0
"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
...
...
@@ -106,7 +106,7 @@
<el-table-column
prop=
"setTime"
label=
"报警内容"
></el-table-column>
<el-table-column
prop=
"actualTime"
label=
"报警时间"
></el-table-column>
</el-table>
<div
class=
"block text-right mt20"
v-if=
"data.page"
>
<div
class=
"block text-right mt20"
v-if=
"data.page
&& data.count > 0
"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
...
...
@@ -124,7 +124,7 @@
import
moment
from
'moment'
export
default
{
data
:
()
=>
({
loading
:
tru
e
,
loading
:
fals
e
,
activeName
:
'first'
,
searchForm
:{},
data
:{
...
...
@@ -188,7 +188,7 @@ export default {
</
script
>
<
style
scoped
lang=
"less"
>
.tableCont
{
height
:
calc
(
100vh
-
50
px
);
height
:
calc
(
100vh
-
44
px
);
}
.infoBox
b
i
{
width
:
20px
;
height
:
20px
;
display
:
inline-block
;
position
:
relative
;
top
:
3px
;}
.upIcon
{
background
:
url(../../../../static/img/up.png)
no-repeat
;
background-size
:
100%
;}
...
...
src/components/page/equipment/events.vue
View file @
b3195505
...
...
@@ -49,7 +49,7 @@
<el-table-column
prop=
"iotInfo"
label=
"操作事件"
></el-table-column>
<el-table-column
prop=
"createTime"
label=
"操作时间"
></el-table-column>
</el-table>
<div
class=
"block text-right mt20"
v-if=
"data.page"
>
<div
class=
"block text-right mt20"
v-if=
"data.page
&& data.count > 0
"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
...
...
src/components/page/equipment/list.vue
View file @
b3195505
...
...
@@ -63,7 +63,7 @@
<div
class=
"title"
>
设备列表
</div>
<el-table
:data=
"data.list"
v-loading=
"loading"
>
<el-table-column
type=
"index"
label=
"序号"
></el-table-column>
<el-table-column
prop=
"
deviceN
ame"
label=
"设备名称"
></el-table-column>
<el-table-column
prop=
"
nickn
ame"
label=
"设备名称"
></el-table-column>
<el-table-column
prop=
"iotId"
label=
"设备ID"
></el-table-column>
<el-table-column
prop=
"deviceType"
label=
"设备类型"
></el-table-column>
<el-table-column
prop=
"site"
label=
"所在位置"
></el-table-column>
...
...
@@ -83,7 +83,7 @@
</
template
>
</el-table-column>
</el-table>
<div
class=
"block text-right mt10"
v-if=
"data.page"
>
<div
class=
"block text-right mt10"
v-if=
"data.page
&& data.count > 0
"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
...
...
@@ -186,7 +186,7 @@ export default {
</
script
>
<
style
scoped
lang=
"less"
>
.tableCont
{
height
:
calc
(
100vh
-
4
5
px
);
height
:
calc
(
100vh
-
4
4
px
);
//
.el-table{
//
height
:
calc
(
100vh
-
67px
);
//
overflow-y
:
auto
;
...
...
src/components/page/index/Login.vue
View file @
b3195505
...
...
@@ -57,7 +57,7 @@ export default {
console
.
log
(
res
.
data
.
data
)
if
(
res
.
data
.
code
===
'0'
)
{
window
.
sessionStorage
.
setItem
(
'token'
,
res
.
data
.
data
)
this
.
$router
.
push
(
'/
equipment/list
'
)
this
.
$router
.
push
(
'/
index
'
)
}
}).
catch
(
function
(
eMsg
)
{
})
...
...
src/components/page/index/index.vue
0 → 100644
View file @
b3195505
<
template
>
<div
class=
"main"
>
<h1
class=
"text-center"
>
欢迎登录
</h1>
<p
class=
"font18 text-center mt10"
>
智慧社区后台管理系统
</p>
<div
class=
"imgDiv"
></div>
</div>
</
template
>
<
script
>
</
script
>
<
style
scoped
lang=
"less"
>
.main
{
position
:
fixed
;
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
border-radius
:
5px
;
margin-top
:
-32px
;
background
:
#FFFFFF
url(../../../../static/img/bg.png)
no-repeat
center
bottom
;
background-size
:
100%
100%
;
h1{
font-weight
:
400
;
margin-top
:
80px
;}
.imgDiv
{
width
:
513px
;
height
:
381px
;
background
:
url(../../../../static/img/img.png)
no-repeat
;
background-size
:
100%
;
margin
:
50px
auto
;
}
}
</
style
>
src/components/page/system/log.vue
View file @
b3195505
...
...
@@ -36,7 +36,7 @@
<div
class=
"mainContent tableCont"
>
<div
class=
"tabCont"
>
<div
class=
"title"
>
日志列表
</div>
<el-table
:data=
"data.list"
>
<el-table
:data=
"data.list"
v-loading=
"loading"
>
<el-table-column
type=
"index"
label=
"序号"
></el-table-column>
<el-table-column
prop=
"accountCode"
label=
"用户编码"
></el-table-column>
<el-table-column
prop=
"userName"
label=
"姓名"
></el-table-column>
...
...
@@ -45,7 +45,7 @@
<el-table-column
prop=
"logType"
label=
"日志类型"
></el-table-column>
<el-table-column
prop=
"logTime"
label=
"操作时间"
></el-table-column>
</el-table>
<div
class=
"block text-right mt20"
v-if=
"data.page"
>
<div
class=
"block text-right mt20"
v-if=
"data.page
&& data.count > 0
"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
...
...
@@ -62,6 +62,7 @@
import
moment
from
'moment'
export
default
{
data
:
()
=>
({
loading
:
true
,
searchForm
:{},
data
:{
page
:
'1'
},
size
:
'10'
,
...
...
@@ -84,6 +85,7 @@ export default {
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
'0'
)
{
this
.
data
=
res
.
data
.
data
this
.
loading
=
false
}
})
},
...
...
src/components/page/system/project.vue
View file @
b3195505
...
...
@@ -19,7 +19,7 @@
<div
class=
"mainContent tableCont"
>
<div
class=
"tabCont"
>
<el-button
class=
"addBtn"
v-if=
"isAddBtn"
@
click=
"addBtn(0)"
><img
src=
"../../../../static/img/add.png"
class=
"addIcon"
><span>
新增
</span></el-button>
<el-table
:data=
"data.list"
>
<el-table
:data=
"data.list"
v-loading=
"loading"
>
<el-table-column
type=
"index"
label=
"序号"
></el-table-column>
<el-table-column
prop=
"cityName"
label=
"城市名称"
></el-table-column>
<el-table-column
prop=
"cityId"
label=
"城市ID"
></el-table-column>
...
...
@@ -36,7 +36,7 @@
</
template
>
</el-table-column>
</el-table>
<div
class=
"block text-right mt10"
v-if=
"data.page"
>
<div
class=
"block text-right mt10"
v-if=
"data.page
&& data.count > 0
"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
...
...
@@ -102,6 +102,7 @@
export
default
{
data
:
()
=>
({
searchForm
:{},
loading
:
true
,
dataForm
:
{},
dialogVisible
:
false
,
type
:
''
,
...
...
@@ -147,6 +148,7 @@ export default {
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
'0'
)
{
this
.
data
=
res
.
data
.
data
this
.
loading
=
false
}
})
},
...
...
@@ -156,6 +158,11 @@ export default {
that
.
showAlert
(
'请输入城市名称~'
)
return
false
}
var
reg
=
/^
[\u
4E00-
\u
9FA5
]{2,4}
$/
if
(
that
.
dataForm
.
cityName
&&
!
reg
.
test
(
that
.
dataForm
.
cityName
))
{
that
.
showAlert
(
'城市名称只能输入中文~'
)
return
false
}
if
(
!
that
.
dataForm
.
projectName
)
{
that
.
showAlert
(
'请输入项目名称~'
)
return
false
...
...
src/components/page/system/roleAdd.vue
View file @
b3195505
...
...
@@ -28,7 +28,7 @@
node-key=
"id"
ref=
"tree"
default-expand-all
:default-checked-keys =
"
menuI
dList"
:default-checked-keys =
"
defaultChecke
dList"
:props=
"defaultProps"
>
</el-tree>
...
...
@@ -48,11 +48,14 @@
<
script
>
export
default
{
data
:
()
=>
({
data
:{},
data
:{
status
:
true
},
checked
:
false
,
roleId
:
[],
menuList
:
[],
menuIdList
:
[],
defaultCheckedList
:
[],
defaultProps
:
{
children
:
'childrenList'
,
label
:
'name'
...
...
@@ -74,7 +77,7 @@ export default {
this
.
data
=
res
.
data
.
data
let
menuIdList
=
[]
this
.
data
.
roleMenuResponseList
.
forEach
(
item
=>
{
if
(
item
.
isChecked
==
'checked'
)
{
if
(
(
item
.
name
==
'接口文档'
||
item
.
name
==
'外部系统管理'
)
&&
item
.
isChecked
==
'checked'
)
{
menuIdList
.
push
(
item
.
id
)
}
if
(
item
.
childrenList
.
length
>
0
)
{
...
...
@@ -85,8 +88,8 @@ export default {
})
}
})
this
.
menuI
dList
=
menuIdList
console
.
log
(
this
.
menuI
dList
)
this
.
defaultChecke
dList
=
menuIdList
console
.
log
(
this
.
defaultChecke
dList
)
if
(
this
.
data
.
status
==
'0'
)
{
this
.
data
.
status
=
false
}
else
{
...
...
@@ -116,7 +119,8 @@ export default {
}
else
{
url
=
'/baseInfo/editRole'
}
this
.
menuIdList
=
this
.
$refs
.
tree
.
getCheckedKeys
()
this
.
menuIdList
=
this
.
$refs
.
tree
.
getCheckedKeys
().
concat
(
this
.
$refs
.
tree
.
getHalfCheckedKeys
())
console
.
log
(
this
.
menuIdList
,
this
.
menuIdList
.
length
)
that
.
$axios
.
post
(
url
,{
"status"
:
that
.
data
.
status
?
'1'
:
'0'
,
"name"
:
that
.
data
.
name
,
...
...
src/components/page/system/roleList.vue
View file @
b3195505
...
...
@@ -19,7 +19,7 @@
<div
class=
"mainContent tableCont"
>
<div
class=
"tabCont"
>
<el-button
class=
"addBtn"
@
click=
"addBtn(0)"
v-if=
"isAddBtn"
><img
src=
"../../../../static/img/add.png"
class=
"addIcon"
><span>
新增
</span></el-button>
<el-table
:data=
"data.list"
>
<el-table
:data=
"data.list"
v-loading=
"loading"
>
<el-table-column
type=
"index"
label=
"序号"
></el-table-column>
<el-table-column
prop=
"name"
label=
"角色名称"
></el-table-column>
<el-table-column
prop=
"isConfig"
label=
"权限配置"
></el-table-column>
...
...
@@ -41,7 +41,7 @@
</
template
>
</el-table-column>
</el-table>
<div
class=
"block text-right mt10"
v-if=
"data.page"
>
<div
class=
"block text-right mt10"
v-if=
"data.page
&& data.count > 0
"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
...
...
@@ -56,6 +56,7 @@
<
script
>
export
default
{
data
:
()
=>
({
loading
:
true
,
searchForm
:{},
data
:{
page
:
'1'
},
size
:
'10'
,
...
...
@@ -102,6 +103,7 @@ export default {
roleName
:
this
.
searchForm
.
roleName
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
'0'
)
{
this
.
loading
=
false
this
.
data
=
res
.
data
.
data
res
.
data
.
data
.
list
.
forEach
(
item
=>
{
if
(
item
.
status
==
'0'
)
{
...
...
src/components/page/system/userAdd.vue
View file @
b3195505
...
...
@@ -70,7 +70,9 @@
<
script
>
export
default
{
data
:
()
=>
({
data
:{},
data
:{
accountStatus
:
true
},
checked
:
false
,
roleList
:
[],
projectList
:
[],
...
...
@@ -136,6 +138,11 @@ export default {
that
.
showAlert
(
'请输入手机号~'
)
return
false
}
var
reg
=
/^
[
1
][
3,4,5,6,7,8,9
][
0-9
]{9}
$/
;
if
(
that
.
data
.
phone
&&
(
!
reg
.
test
(
that
.
data
.
phone
)
||
that
.
data
.
phone
.
length
!==
11
))
{
that
.
showAlert
(
'手机号格式不正确~'
)
return
false
}
if
(
!
that
.
data
.
loginName
)
{
that
.
showAlert
(
'请输入账号~'
)
return
false
...
...
src/components/page/system/userList.vue
View file @
b3195505
...
...
@@ -41,7 +41,7 @@
<div
class=
"mainContent tableCont"
>
<div
class=
"tabCont"
>
<el-button
class=
"addBtn"
@
click=
"addBtn(0)"
v-if=
"isAddBtn"
><img
src=
"../../../../static/img/add.png"
class=
"addIcon"
><span>
新增
</span></el-button>
<el-table
:data=
"data.list"
>
<el-table
:data=
"data.list"
v-loading=
"loading"
>
<el-table-column
type=
"index"
label=
"序号"
></el-table-column>
<el-table-column
prop=
"accountCode"
label=
"用户编码"
></el-table-column>
<el-table-column
prop=
"userName"
label=
"姓名"
></el-table-column>
...
...
@@ -74,7 +74,7 @@
</
template
>
</el-table-column>
</el-table>
<div
class=
"block text-right mt10"
v-if=
"data.page"
>
<div
class=
"block text-right mt10"
v-if=
"data.page
&& data.count > 0
"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
...
...
@@ -89,6 +89,7 @@
<
script
>
export
default
{
data
:
()
=>
({
loading
:
true
,
searchForm
:{},
data
:{
page
:
'1'
,
...
...
@@ -152,6 +153,7 @@ export default {
keyWord
:
this
.
searchForm
.
keyWord
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
'0'
)
{
this
.
loading
=
false
this
.
data
=
res
.
data
.
data
res
.
data
.
data
.
list
.
forEach
(
item
=>
{
if
(
item
.
accountStatus
==
'0'
)
{
...
...
src/main.js
View file @
b3195505
...
...
@@ -12,6 +12,7 @@ import 'element-ui/lib/theme-chalk/index.css';
require
(
'../static/css/index.css'
)
Vue
.
use
(
uploader
)
// Vue.prototype.baseURL = 'http://172.16.2.69:8088/'
Vue
.
prototype
.
baseURL
=
'http://39.97.169.207:9200/'
// 测试
// Vue.prototype.baseURL = 'https://witcase.chinajinmao.cn' // 正式
...
...
src/router/index.js
View file @
b3195505
...
...
@@ -16,6 +16,14 @@ export default new Router({
component
:
resolve
=>
require
([
'../components/common/Home.vue'
],
resolve
),
children
:
[
{
path
:
'/index'
,
name
:
'index'
,
meta
:
{
pageName
:
'首页'
},
component
:
resolve
=>
require
([
'../components/page/index/index.vue'
],
resolve
),
},
{
path
:
'/equipment/list'
,
name
:
'/equipment'
,
meta
:
{
...
...
static/img/bg.png
0 → 100644
View file @
b3195505
311 KB
static/img/img.png
View file @
b3195505
30 KB
|
W:
|
H:
105 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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