Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
energyai_vue
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
葛齐林
energyai_vue
Commits
9b259b81
Commit
9b259b81
authored
Mar 31, 2021
by
xiexingan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
d6ef25a5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
34 deletions
+26
-34
config.js
public/config.js
+1
-1
index.html
public/index.html
+1
-1
d2-admin.svg
src/assets/svg-icons/icons/d2-admin.svg
+1
-1
index.vue
src/layout/header-aside/components/menu-side/index.vue
+1
-1
util.js
src/libs/util.js
+20
-27
index.vue
src/pages/index/index.vue
+1
-1
page.vue
src/pages/login/page.vue
+1
-2
No files found.
public/config.js
View file @
9b259b81
var
CONFIG
=
{}
// 页面 title 前缀
CONFIG
.
TITLE
=
'
轨道交通后台
管理系统'
CONFIG
.
TITLE
=
'
AI节能
管理系统'
// 网络请求公用地址
...
...
public/index.html
View file @
9b259b81
...
...
@@ -10,7 +10,7 @@
<link
href=
"icon.jpg"
rel=
"icon"
type=
"image/x-icon"
/>
<!-- <script src = "https://cdn.jsdelivr.net/npm/proxy-polyfill@0.3.0/proxy.min.js"></script> -->
<title>
城市轨道交通安防
系统
</title>
<title>
AI节能管理
系统
</title>
<script>
//禁用所有控制台输出
// var console={};
...
...
src/assets/svg-icons/icons/d2-admin.svg
View file @
9b259b81
<svg
viewBox=
"0 0 60 54"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<desc>
城市轨道交通安防
系统
</desc>
<desc>
AI节能管理
系统
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"logo-no-shadow"
transform=
"translate(-3.000000, -3.000000)"
>
...
...
src/layout/header-aside/components/menu-side/index.vue
View file @
9b259b81
...
...
@@ -7,7 +7,7 @@
ref=
"menu"
@
select=
"handleMenuSelect"
>
<template
v-for=
"(menu, menuIndex) in header"
>
<d2-layout-header-aside-menu-item
v-if=
"menu.list
== undefined
"
:menu=
"menu"
:key=
"menuIndex"
/>
<d2-layout-header-aside-menu-item
v-if=
"menu.list
.length==0
"
:menu=
"menu"
:key=
"menuIndex"
/>
<d2-layout-header-aside-menu-sub
v-else
:menu=
"menu"
:key=
"menuIndex"
/>
</
template
>
</el-menu>
...
...
src/libs/util.js
View file @
9b259b81
...
...
@@ -11,7 +11,7 @@ let util = {
* @param {String} title 标题
*/
util
.
title
=
function
(
titleText
)
{
const
processTitle
=
'
城市轨道交通安防
系统'
const
processTitle
=
'
AI节能管理
系统'
window
.
document
.
title
=
`
${
processTitle
}${
titleText
?
` |
${
titleText
}
`
:
''
}
`
}
...
...
@@ -29,7 +29,6 @@ util.open = function (url) {
document
.
body
.
removeChild
(
document
.
getElementById
(
'd2admin-menu-link'
))
}
/**
* @about Tree 数据格式转化
* @param rows:json数据对象
...
...
@@ -43,62 +42,56 @@ util.open = function (url) {
util
.
ConvertToTreeJson
=
function
(
rows
,
idFieldName
,
pidFieldName
,
fileds
)
{
function
exists
(
rows
,
ParentId
)
{
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
if
(
rows
[
i
][
idFieldName
]
==
ParentId
)
return
true
;
if
(
rows
[
i
][
idFieldName
]
==
ParentId
)
{
return
true
}
}
return
false
;
return
false
}
var
nodes
=
[]
;
var
nodes
=
[]
// get the top level nodes
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
var
row
=
rows
[
i
]
;
var
row
=
rows
[
i
]
if
(
!
exists
(
rows
,
row
[
pidFieldName
]))
{
var
data
=
{
id
:
row
[
idFieldName
]
}
var
arrFiled
=
fileds
.
split
(
","
);
for
(
var
j
=
0
;
j
<
arrFiled
.
length
;
j
++
)
{
if
(
arrFiled
[
j
]
!=
idFieldName
)
data
[
arrFiled
[
j
]]
=
row
[
arrFiled
[
j
]];
var
arrFiled
=
fileds
.
split
(
','
)
for
(
var
j
=
0
;
j
<
arrFiled
.
length
;
j
++
)
{
if
(
arrFiled
[
j
]
!=
idFieldName
)
{
data
[
arrFiled
[
j
]]
=
row
[
arrFiled
[
j
]]
}
}
nodes
.
push
(
data
)
;
nodes
.
push
(
data
)
}
}
var
toDo
=
[];
var
toDo
=
[]
for
(
var
i
=
0
;
i
<
nodes
.
length
;
i
++
)
{
toDo
.
push
(
nodes
[
i
])
;
toDo
.
push
(
nodes
[
i
])
}
while
(
toDo
.
length
)
{
var
node
=
toDo
.
shift
()
;
// the parent node
var
node
=
toDo
.
shift
()
// the parent node
// get the children nodes
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
var
row
=
rows
[
i
]
;
var
row
=
rows
[
i
]
if
(
row
[
pidFieldName
]
==
node
.
id
)
{
var
child
=
{
id
:
row
[
idFieldName
]
}
;
var
arrFiled
=
fileds
.
split
(
","
);
}
var
arrFiled
=
fileds
.
split
(
','
)
for
(
var
j
=
0
;
j
<
arrFiled
.
length
;
j
++
)
{
if
(
arrFiled
[
j
]
!=
idFieldName
)
{
child
[
arrFiled
[
j
]]
=
row
[
arrFiled
[
j
]]
;
child
[
arrFiled
[
j
]]
=
row
[
arrFiled
[
j
]]
}
}
if
(
node
.
children
)
{
node
.
children
.
push
(
child
)
;
node
.
children
.
push
(
child
)
}
else
{
node
.
children
=
[
child
]
;
node
.
children
=
[
child
]
}
toDo
.
push
(
child
)
;
toDo
.
push
(
child
)
}
}
}
return
nodes
;
return
nodes
}
export
default
util
src/pages/index/index.vue
View file @
9b259b81
<
template
lang=
"pug"
>
div.infopage()
font(class='index-title') 欢迎访问
城市轨道交通安防
系统
font(class='index-title') 欢迎访问
山南站AI节能管理
系统
</
template
>
...
...
src/pages/login/page.vue
View file @
9b259b81
...
...
@@ -286,8 +286,7 @@ export default {
url
:
this
.
$http
.
adornUrl
(
'/sys/menu/nav'
),
method
:
"get"
}).
then
((
e
)
=>
{
let
url
=
e
.
menuList
[
0
].
list
[
0
].
path
this
.
$router
.
replace
({
path
:
url
})
this
.
$router
.
replace
({
path
:
'/'
})
})
// this.$router.replace(path ? { path } : { name: "index" });
// 删除 cookie 中保存的重定向页面
...
...
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