Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
ffbaf379
Commit
ffbaf379
authored
Aug 29, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf:修改站点选择
parent
ab72c8cf
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
313 additions
and
345 deletions
+313
-345
base-manager-ui/admin/src/layouts/header/HeaderSite.vue
base-manager-ui/admin/src/layouts/header/HeaderSite.vue
+80
-54
portal-manager-ui/admin/package.json
portal-manager-ui/admin/package.json
+2
-0
portal-manager-ui/admin/src/assets/images/siteArrange/extension.png
...ager-ui/admin/src/assets/images/siteArrange/extension.png
+0
-0
portal-manager-ui/admin/src/assets/images/siteArrange/pic-bottom.png
...ger-ui/admin/src/assets/images/siteArrange/pic-bottom.png
+0
-0
portal-manager-ui/admin/src/assets/images/siteArrange/title.png
...-manager-ui/admin/src/assets/images/siteArrange/title.png
+0
-0
portal-manager-ui/admin/src/main.js
portal-manager-ui/admin/src/main.js
+4
-0
portal-manager-ui/admin/src/mixins/menu.js
portal-manager-ui/admin/src/mixins/menu.js
+120
-140
portal-manager-ui/admin/src/request/request.js
portal-manager-ui/admin/src/request/request.js
+1
-0
portal-manager-ui/admin/src/views/home/home.vue
portal-manager-ui/admin/src/views/home/home.vue
+3
-2
portal-manager-ui/admin/src/views/siteArrange/siteArrange.vue
...al-manager-ui/admin/src/views/siteArrange/siteArrange.vue
+86
-149
portal-manager-ui/admin/yarn.lock
portal-manager-ui/admin/yarn.lock
+17
-0
No files found.
base-manager-ui/admin/src/layouts/header/HeaderSite.vue
View file @
ffbaf379
<
template
>
<
template
>
<div
class=
"header-site
"
>
<div
:trigger=
"['click']"
class=
"trigger"
@
click=
"ontrigger
"
>
<
a-popover
trigger=
"click"
placement=
"bottomLeft"
v-model=
"visible"
>
<
slot
>
<a
class=
"ant-dropdown-link"
@
click=
"
visible = true
"
>
<a
class=
"ant-dropdown-link"
@
click=
"
(e) => e.preventDefault()
"
>
{{
siteName
}}
<a-icon
type=
"down"
/>
{{
siteName
}}
<a-icon
type=
"down"
/>
</a>
</a>
<template
slot=
"content"
>
</slot>
<div
class=
"content"
style=
"min-width: 50vw; min-height: 200px"
>
<div
<div
class=
"flex_row flex_align_c primary-color name"
>
slot=
"overlay"
<a-icon
type=
"environment"
style=
"margin-right: 10px"
/>
class=
"select-site"
<span
style=
""
>
{{
siteName
}}
</span>
:style=
"
{ left: `${offsetLeft}px` }"
</div>
v-if="show"
<div
class=
"site-list"
>
>
<span
<div
class=
"flex_row flex_align_c primary-color name"
>
v-for=
"(item, index) in sitelist"
<a-icon
type=
"environment"
style=
"margin-right: 10px"
/>
:key=
"index"
<span
style=
""
>
{{
siteName
}}
</span>
:class=
"
{ 'primary-color': item.id == checkid }"
</div>
@click="setSite(item)"
<div
class=
"site-list"
>
>
{{
item
.
label
}}
</span
<span
>
v-for=
"(item, index) in sitelist"
</div>
:key=
"index"
<div
class=
"check-site"
>
:class=
"
{ 'primary-color': item.id == checkid }"
<span>
您的选择是:
</span>
@click="setSite(item)"
<span
>
{{
item
.
label
}}
</span
v-for=
"(item, index) in checkarr"
>
:key=
"index"
</div>
@
click=
"updataSite(item)"
<div
class=
"check-site"
>
>
{{
index
>
0
?
"
>
"
:
""
}}{{
item
.
label
}}
</span
<span>
您的选择是:
</span>
>
<span
</div>
class=
"check-item"
<div
class=
"site-btn"
>
v-for=
"(item, index) in checkarr"
<a-button
style=
"margin-right: 10px"
@
click=
"visible = false"
:key=
"index"
>
取消
</a-button
@
click=
"updataSite(item)"
>
>
{{
index
>
0
?
"
>
"
:
""
}}{{
item
.
label
}}
</span
<a-button
type=
"primary"
@
click=
"onSucessSite"
:disabled=
"isSite"
>
>
确定
</a-button
</div>
>
<div
class=
"site-btn"
>
</div>
<a-button
</div>
type=
"primary"
</
template
>
style=
"margin-right: 10px"
</a-popover>
@
click=
"onSucessSite"
:disabled=
"isSite"
>
确定
</a-button
>
<a-button
@
click=
"show = false"
>
取消
</a-button>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getSiteTree
}
from
"
@/services/basicsetFun
"
;
import
{
getSiteTree
}
from
"
@/services/basicsetFun
"
;
import
{
mapMutations
}
from
"
vuex
"
;
import
{
mapMutations
}
from
"
vuex
"
;
import
local
from
"
@/utils/local
"
;
import
local
from
"
@/utils/local
"
;
// import Cookie from "js-cookie";
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
sitelist
:
[],
sitelist
:
[],
visible
:
false
,
show
:
false
,
offsetLeft
:
0
,
offsetLeft
:
0
,
checkarr
:
[],
//选中站点
checkarr
:
[],
//选中站点
checkid
:
undefined
,
//最终选中站点
checkid
:
undefined
,
//最终选中站点
...
@@ -62,13 +67,17 @@ export default {
...
@@ -62,13 +67,17 @@ export default {
created
()
{
created
()
{
this
.
getwaitedListdata
();
this
.
getwaitedListdata
();
},
},
mounted
()
{},
mounted
()
{
const
{
offsetLeft
}
=
this
.
$el
;
this
.
offsetLeft
=
offsetLeft
;
},
methods
:
{
methods
:
{
...
mapMutations
(
"
site
"
,
[
"
SET_SITE_ID
"
,
"
SET_siteName
"
]),
...
mapMutations
(
"
site
"
,
[
"
SET_SITE_ID
"
,
"
SET_siteName
"
]),
// 确认站点
// 确认站点
onSucessSite
()
{
onSucessSite
()
{
if
(
this
.
checkarr
.
length
==
0
)
return
;
if
(
this
.
checkarr
.
length
==
0
)
return
;
let
obj
=
this
.
checkarr
[
this
.
checkarr
.
length
-
1
];
let
obj
=
this
.
checkarr
[
this
.
checkarr
.
length
-
1
];
this
.
clickSite
(
obj
);
this
.
clickSite
(
obj
);
},
},
// 选中
// 选中
...
@@ -76,16 +85,22 @@ export default {
...
@@ -76,16 +85,22 @@ export default {
this
.
checkid
=
undefined
;
this
.
checkid
=
undefined
;
// 为子节点不添加数据
// 为子节点不添加数据
let
data
=
this
.
checkarr
[
this
.
checkarr
.
length
-
1
];
let
data
=
this
.
checkarr
[
this
.
checkarr
.
length
-
1
];
if
(
data
&&
(
data
.
isLeaf
||
data
.
children
.
length
==
0
))
{
if
(
data
&&
(
data
.
isLeaf
||
data
.
children
.
length
==
0
))
{
// 如果为子节点更新最后一个数据
// 如果为子节点更新最后一个数据
this
.
checkid
=
obj
.
id
;
this
.
checkid
=
obj
.
id
;
this
.
checkarr
[
this
.
checkarr
.
length
-
1
]
=
obj
;
this
.
checkarr
[
this
.
checkarr
.
length
-
1
]
=
obj
;
// 如果选中数据有子集更新站点列表
if
(
obj
.
children
&&
obj
.
children
.
length
>
0
)
{
this
.
sitelist
=
obj
.
children
;
}
}
else
{
}
else
{
this
.
checkarr
.
push
(
obj
);
this
.
checkarr
.
push
(
obj
);
if
(
obj
.
children
&&
obj
.
children
.
length
>
0
)
{
if
(
obj
.
children
&&
obj
.
children
.
length
>
0
)
{
this
.
sitelist
=
obj
.
children
;
this
.
sitelist
=
obj
.
children
;
}
}
}
}
if
(
obj
&&
obj
.
type
==
"
site
"
)
{
if
(
obj
&&
obj
.
type
==
"
site
"
)
{
this
.
isSite
=
false
;
this
.
isSite
=
false
;
}
else
{
}
else
{
...
@@ -136,17 +151,13 @@ export default {
...
@@ -136,17 +151,13 @@ export default {
});
});
},
},
clickSite
(
obj
)
{
clickSite
(
obj
)
{
// Cookie.set("siteid", obj.id);
// let siteInfo = {
// siteName: obj.label,
// siteid: obj.id,
// };
local
.
setLocal
(
"
siteId
"
,
obj
.
id
);
local
.
setLocal
(
"
siteId
"
,
obj
.
id
);
local
.
setLocal
(
"
siteName
"
,
obj
.
label
);
local
.
setLocal
(
"
siteName
"
,
obj
.
label
);
this
.
SET_SITE_ID
(
obj
.
id
);
this
.
SET_SITE_ID
(
obj
.
id
);
this
.
SET_siteName
(
obj
.
label
);
this
.
SET_siteName
(
obj
.
label
);
this
.
show
=
false
;
this
.
show
=
false
;
if
(
location
.
href
.
search
(
/token/gi
)
>=
0
)
{
if
(
location
.
href
.
search
(
/token/gi
)
>=
0
)
{
this
.
$router
.
push
({
path
:
"
/resource/advimg
"
});
setTimeout
(()
=>
{
setTimeout
(()
=>
{
location
.
reload
();
location
.
reload
();
});
});
...
@@ -163,28 +174,43 @@ export default {
...
@@ -163,28 +174,43 @@ export default {
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.trigger {
display: inline-block;
position: relative;
}
.ant-dropdown-link {
.ant-dropdown-link {
color: #fff;
padding: 0 20px;
padding: 0 20px;
font-size: 16px;
font-size: 16px;
min-width: 200px;
min-width: 200px;
display: inline-block;
display: inline-block;
color: #fff;
}
}
.content {
.select-site {
display: flex;
position: fixed;
flex-direction: column;
left: 0;
justify-content: space-around;
top: 65px;
background: #fff;
border-radius: 6px;
padding: 10px;
min-width: 60%;
max-width: 80%;
z-index: 9;
color: rgba(0, 0, 0, 0.8);
font-size: 14px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
.name {
.name {
font-size: 20px;
font-size: 20px;
}
}
.site-list {
.site-list {
// padding: 10px 0;
border-top: 1px solid #ddd;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
border-bottom: 1px solid #ddd;
display: flex;
overflow: hidden;
flex-wrap: wrap;
span {
span {
float: left;
line-height: 1.5;
line-height: 1.5;
padding: 10px 20px;
padding: 10px 20px;
display: inline-block;
cursor: pointer;
cursor: pointer;
&:hover {
&:hover {
color: #1890ff;
color: #1890ff;
...
@@ -195,7 +221,7 @@ export default {
...
@@ -195,7 +221,7 @@ export default {
.site-btn {
.site-btn {
padding: 0 20px;
padding: 0 20px;
}
}
.check-
site
{
.check-
item
{
cursor: pointer;
cursor: pointer;
}
}
}
}
...
...
portal-manager-ui/admin/package.json
View file @
ffbaf379
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
"echarts"
:
"^5.3.3"
,
"echarts"
:
"^5.3.3"
,
"element-ui"
:
"^2.15.8"
,
"element-ui"
:
"^2.15.8"
,
"font-awesome"
:
"^4.7.0"
,
"font-awesome"
:
"^4.7.0"
,
"gsap"
:
"^3.12.2"
,
"heatmap.js"
:
"^2.0.5"
,
"heatmap.js"
:
"^2.0.5"
,
"highlight.js"
:
"^11.5.1"
,
"highlight.js"
:
"^11.5.1"
,
"js-export-excel"
:
"^1.1.4"
,
"js-export-excel"
:
"^1.1.4"
,
...
@@ -34,6 +35,7 @@
...
@@ -34,6 +35,7 @@
"vue-highlightjs"
:
"^1.3.3"
,
"vue-highlightjs"
:
"^1.3.3"
,
"vue-lazyload"
:
"1.3.3"
,
"vue-lazyload"
:
"1.3.3"
,
"vue-router"
:
"^3.5.1"
,
"vue-router"
:
"^3.5.1"
,
"vuedraggable"
:
"^2.24.3"
,
"vuex"
:
"^3.6.2"
,
"vuex"
:
"^3.6.2"
,
"vuex-persistedstate"
:
"^4.1.0"
"vuex-persistedstate"
:
"^4.1.0"
},
},
...
...
portal-manager-ui/admin/src/assets/images/siteArrange/
icon-展开
.png
→
portal-manager-ui/admin/src/assets/images/siteArrange/
extension
.png
View file @
ffbaf379
File moved
portal-manager-ui/admin/src/assets/images/siteArrange/pic-
底座
.png
→
portal-manager-ui/admin/src/assets/images/siteArrange/pic-
bottom
.png
View file @
ffbaf379
File moved
portal-manager-ui/admin/src/assets/images/siteArrange/
宜人·宜宾·宜办事
.png
→
portal-manager-ui/admin/src/assets/images/siteArrange/
title
.png
View file @
ffbaf379
File moved
portal-manager-ui/admin/src/main.js
View file @
ffbaf379
...
@@ -24,6 +24,10 @@ import "@/assets/fonts/iconfont.css";
...
@@ -24,6 +24,10 @@ import "@/assets/fonts/iconfont.css";
import
customComponents
from
"
@/components
"
;
import
customComponents
from
"
@/components
"
;
Vue
.
use
(
customComponents
);
Vue
.
use
(
customComponents
);
// 拖动插件
import
draggable
from
"
vuedraggable
"
;
Vue
.
component
(
"
draggable
"
,
draggable
);
// 引入注册全局指令
// 引入注册全局指令
import
*
as
directives
from
"
@/directive
"
;
import
*
as
directives
from
"
@/directive
"
;
Object
.
keys
(
directives
).
forEach
((
name
)
=>
Object
.
keys
(
directives
).
forEach
((
name
)
=>
...
...
portal-manager-ui/admin/src/mixins/menu.js
View file @
ffbaf379
...
@@ -2,148 +2,128 @@ import { menuList } from "@/api/menuMgmt.js";
...
@@ -2,148 +2,128 @@ import { menuList } from "@/api/menuMgmt.js";
import
{
deepClone
,
toTreeData
,
getItemData
}
from
"
@/utils/js/common.js
"
;
import
{
deepClone
,
toTreeData
,
getItemData
}
from
"
@/utils/js/common.js
"
;
import
{
mapGetters
,
mapMutations
}
from
"
vuex
"
;
import
{
mapGetters
,
mapMutations
}
from
"
vuex
"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
MenuDict
:
{},
MenuDict
:
{},
menuListData
:
[],
//简单结构
menuListData
:
[],
//简单结构
menuTreeData
:
[],
//树型结构
menuTreeData
:
[],
//树型结构
tablePagination
:
{
tablePagination
:
{
current
:
1
,
current
:
1
,
pageSize
:
10
,
pageSize
:
10
,
total
:
20
,
total
:
20
,
showQuickJumper
:
true
,
//是否可以快速跳转至某页
showQuickJumper
:
true
,
//是否可以快速跳转至某页
showSizeChanger
:
true
,
//是否可以改变 pageSize
showSizeChanger
:
true
,
//是否可以改变 pageSize
showTotal
:
(
total
,
range
)
=>
`共
${
total
}
条`
,
showTotal
:
(
total
,
range
)
=>
`共
${
total
}
条`
,
pageSizeOptions
:
[
"
10
"
,
"
20
"
,
"
30
"
],
pageSizeOptions
:
[
"
10
"
,
"
20
"
,
"
30
"
],
},
},
}
};
},
computed
:
{
menuRouterList
()
{
return
this
.
$router
.
options
.
routes
.
filter
((
v
)
=>
v
.
name
==
"
home
"
)[
0
]
.
children
.
map
((
k
)
=>
{
return
{
title
:
k
.
meta
.
title
,
routerPath
:
k
.
path
,
};
});
},
},
computed
:
{
...
mapGetters
(
"
menu
"
,
[
"
menuList_X
"
,
"
menuTree_X
"
]),
menuRouterList
()
{
...
mapGetters
(
"
user
"
,
[
"
censusList_X
"
,
"
appsList_X
"
]),
return
this
.
$router
.
options
.
routes
MenuChildren
()
{
.
filter
((
v
)
=>
v
.
name
==
"
home
"
)[
0
]
let
routerPath
=
this
.
$route
.
path
.
substr
(
.
children
.
map
((
k
)
=>
{
this
.
$route
.
path
.
lastIndexOf
(
"
/
"
)
+
1
return
{
);
title
:
k
.
meta
.
title
,
let
result
=
getItemData
(
this
.
menuTree_X
,
"
routerPath
"
,
routerPath
);
routerPath
:
k
.
path
,
return
result
?
result
:
{
children
:
[]
};
};
});
},
...
mapGetters
(
"
menu
"
,
[
"
menuList_X
"
,
"
menuTree_X
"
]),
...
mapGetters
(
"
user
"
,
[
"
censusList_X
"
,
"
appsList_X
"
]),
MenuChildren
()
{
let
routerPath
=
this
.
$route
.
path
.
substr
(
this
.
$route
.
path
.
lastIndexOf
(
"
/
"
)
+
1
)
let
result
=
getItemData
(
this
.
menuTree_X
,
'
routerPath
'
,
routerPath
,
)
return
result
?
result
:
{
children
:
[]
};
}
},
},
created
()
{
},
created
()
{},
beforeDestroy
()
{},
methods
:
{
...
mapMutations
(
"
menu
"
,
[
"
SET_menuList_X
"
,
"
SET_menuTree_X
"
]),
},
getMenuList
(
isFirst
=
false
)
{
beforeDestroy
()
{
let
obj
=
{
page
:
this
.
tablePagination
.
current
,
//当前页
},
size
:
this
.
tablePagination
.
pageSize
,
//每页条数
methods
:
{
};
...
mapMutations
(
"
menu
"
,
[
"
SET_menuList_X
"
,
"
SET_menuTree_X
"
]),
if
(
isFirst
)
{
getMenuList
(
isFirst
=
false
)
{
obj
=
{
let
obj
=
{
page
:
1
,
//-1 全部数据
page
:
this
.
tablePagination
.
current
,
//当前页
size
:
-
1
,
//-1 全部数据
size
:
this
.
tablePagination
.
pageSize
,
//每页条数
};
};
}
if
(
isFirst
)
{
menuList
(
obj
).
then
((
res
)
=>
{
obj
=
{
// console.log(res);
page
:
1
,
//-1 全部数据
let
{
code
,
data
,
dict
}
=
res
.
data
;
size
:
-
1
,
//-1 全部数据
if
(
code
==
1
)
{
};
data
.
data
=
data
.
data
.
map
((
item
)
=>
{
}
this
.
menuRouterList
.
forEach
((
v
)
=>
{
menuList
(
obj
).
then
((
res
)
=>
{
if
(
v
[
"
title
"
]
==
item
.
name
)
{
// console.log(res);
item
[
"
routerPath
"
]
=
v
[
"
routerPath
"
];
let
{
code
,
data
,
dict
}
=
res
;
}
if
(
code
==
1
)
{
data
.
data
=
data
.
data
.
map
((
item
)
=>
{
this
.
menuRouterList
.
forEach
(
v
=>
{
if
(
v
[
'
title
'
]
==
item
.
name
)
{
item
[
"
routerPath
"
]
=
v
[
'
routerPath
'
];
}
})
item
[
"
value
"
]
=
item
.
id
;
item
[
"
label
"
]
=
item
.
name
;
return
item
;
});
// console.log(data.data);
// this.$message.success(res.msg);
this
.
tablePagination
.
current
=
data
.
current_page
;
this
.
tablePagination
.
total
=
data
.
total
;
this
.
menuListData
=
data
.
data
;
this
.
menuTreeData
=
toTreeData
(
data
.
data
,
-
1
,
"
id
"
,
"
parentId
"
);
this
.
SET_menuList_X
(
deepClone
(
this
.
menuListData
));
this
.
SET_menuTree_X
(
deepClone
(
this
.
menuTreeData
));
this
.
MenuDict
=
dict
;
this
.
MenuDict
[
"
MenuTree
"
]
=
deepClone
(
this
.
menuTreeData
);
// console.log(this.menuListData);
// console.log(this.menuTreeData);
// this.getMenuDict(); //弃用
}
else
{
this
.
$message
.
error
(
res
.
msg
);
}
});
});
},
item
[
"
value
"
]
=
item
.
id
;
item
[
"
label
"
]
=
item
.
name
;
getMenuDict
()
{
//目前只有三级 一级查询条件-1
return
item
;
let
list
=
deepClone
(
this
.
menuListData
);
});
let
obj
=
list
.
sort
((
a
,
b
)
=>
{
// console.log(data.data);
return
parseFloat
(
b
[
"
parentId
"
])
-
parseFloat
(
a
[
"
parentId
"
]);
// this.$message.success(res.msg);
})[
0
];
this
.
tablePagination
.
current
=
data
.
current_page
;
this
.
tablePagination
.
total
=
data
.
total
;
Promise
.
all
([
// 一级菜单字典
this
.
menuListData
=
data
.
data
;
menuList
({
this
.
menuTreeData
=
toTreeData
(
data
.
data
,
-
1
,
"
id
"
,
"
parentId
"
);
parentId
:
-
1
,
this
.
SET_menuList_X
(
deepClone
(
this
.
menuListData
));
}),
this
.
SET_menuTree_X
(
deepClone
(
this
.
menuTreeData
));
// 二级菜单字典
menuList
({
this
.
MenuDict
=
dict
;
parentId
:
obj
[
"
firstMenuId
"
],
this
.
MenuDict
[
"
MenuTree
"
]
=
deepClone
(
this
.
menuTreeData
);
}),
// 三级菜单字典
// console.log(this.menuListData);
menuList
({
// console.log(this.menuTreeData);
parentId
:
obj
[
"
secondMenuId
"
],
// this.getMenuDict(); //弃用
}),
}
else
{
])
this
.
$message
.
error
(
res
.
msg
);
.
then
((
res
)
=>
{
}
// 一级菜单字典
});
this
.
MenuDict
[
"
firstLevelOptions
"
]
=
res
[
0
].
data
.
data
;
},
// 二级菜单字典
this
.
MenuDict
[
"
secondLevelOptions
"
]
=
res
[
1
].
data
.
data
;
// 三级菜单字典
this
.
MenuDict
[
"
thirdLevelOptions
"
]
=
res
[
2
].
data
.
data
;
// console.log(this.MenuDict);
})
.
catch
((
err
)
=>
{
// console.log(err);
});
},
getMenuDict
()
{
//目前只有三级 一级查询条件-1
let
list
=
deepClone
(
this
.
menuListData
);
let
obj
=
list
.
sort
((
a
,
b
)
=>
{
return
parseFloat
(
b
[
"
parentId
"
])
-
parseFloat
(
a
[
"
parentId
"
]);
})[
0
];
Promise
.
all
([
// 一级菜单字典
menuList
({
parentId
:
-
1
,
}),
// 二级菜单字典
menuList
({
parentId
:
obj
[
"
firstMenuId
"
],
}),
// 三级菜单字典
menuList
({
parentId
:
obj
[
"
secondMenuId
"
],
}),
])
.
then
((
res
)
=>
{
// 一级菜单字典
this
.
MenuDict
[
"
firstLevelOptions
"
]
=
res
[
0
].
data
.
data
;
// 二级菜单字典
this
.
MenuDict
[
"
secondLevelOptions
"
]
=
res
[
1
].
data
.
data
;
// 三级菜单字典
this
.
MenuDict
[
"
thirdLevelOptions
"
]
=
res
[
2
].
data
.
data
;
// console.log(this.MenuDict);
})
.
catch
((
err
)
=>
{
// console.log(err);
});
},
},
}
},
\ No newline at end of file
};
portal-manager-ui/admin/src/request/request.js
View file @
ffbaf379
...
@@ -39,6 +39,7 @@ axios.interceptors.response.use(
...
@@ -39,6 +39,7 @@ axios.interceptors.response.use(
// 取出数据
// 取出数据
let
{
code
,
msg
}
=
response
.
data
;
let
{
code
,
msg
}
=
response
.
data
;
if
(
code
===
-
1
)
{
if
(
code
===
-
1
)
{
console
.
log
(
response
.
data
);
message
.
error
({
message
.
error
({
content
:
msg
,
content
:
msg
,
maxCount
:
1
,
maxCount
:
1
,
...
...
portal-manager-ui/admin/src/views/home/home.vue
View file @
ffbaf379
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<!-- 时间、用户信息展示 -->
<!-- 时间、用户信息展示 -->
<div
class=
"flex items-center"
>
<div
class=
"flex items-center"
>
<div
class=
"show-time flex flex-col items-end"
>
<div
class=
"show-time flex flex-col items-end"
>
<div
class=
"time"
>
{{
nowTime
}}
</div>
<div
class=
"time
mb-1
"
>
{{
nowTime
}}
</div>
<div
class=
"date"
>
{{
nowDay
}}
{{
nowWeek
}}
</div>
<div
class=
"date"
>
{{
nowDay
}}
{{
nowWeek
}}
</div>
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<a-dropdown>
<a-dropdown>
<div
class=
"flex items-center"
>
<div
class=
"flex items-center"
>
<div
class=
"userInfo flex flex-col items-center cursor-pointer"
>
<div
class=
"userInfo flex flex-col items-center cursor-pointer"
>
<span>
<span
class=
"mb-1"
>
{{
userData
.
loginName
?
userData
.
loginName
:
"
--
"
}}
{{
userData
.
loginName
?
userData
.
loginName
:
"
--
"
}}
</span>
</span>
<span>
<span>
...
@@ -236,6 +236,7 @@ export default {
...
@@ -236,6 +236,7 @@ export default {
.date {
.date {
font-family: Source Han Sans CN;
font-family: Source Han Sans CN;
font-weight: 500;
font-weight: 500;
font-size: 14px;
}
}
.line {
.line {
width: 1px;
width: 1px;
...
...
portal-manager-ui/admin/src/views/siteArrange/siteArrange.vue
View file @
ffbaf379
<
template
>
<
template
>
<div
class=
"station w-full h-auto"
>
<div
class=
"station w-full h-auto"
>
<a-carousel
<div
class=
"title flex flex-col items-center"
>
effect=
"fade"
<img
autoplay
class=
"img-title mb-[42px] mt-[230px]"
:autoplaySpeed=
"2000"
src=
"@/assets/images/siteArrange/title.png"
:dots=
"false"
/>
style=
"width: 100%; height: 100%; overflow: hidden"
<div
class=
"slogan"
>
建设高效便民、智慧泛在的智慧政务大厅
</div>
>
<div
class=
"img_box img1"
></div>
<!-- style="
height: 100vh;
width: 100%;
background: url('@/assets/images/bg.jpg') center no-repeat;
overflow: hidden;
background-size: cover;
" -->
<div
class=
"img_box img2"
></div>
<div
class=
"img_box img3"
></div>
</a-carousel>
<div
class=
"title"
>
<h3
style=
"text-align: center; font-size: 50px"
>
宜人·宜宾·宜办事
</h3>
<!--
<p>
“互联网+政务服务”整体解决方案提供商和服务商
</p>
-->
</div>
</div>
<div
class=
"classification"
>
<!-- 站点列表 -->
<div
class=
"modules"
>
<div
class=
""
>
<div
<!-- 常用 -->
class=
"mod_max"
<div
class=
"common flex items-center justify-between"
>
v-for=
"item of siteModelList"
<draggable
:key=
"item.id"
v-model=
"siteModelList"
@
click=
"openWindow(item)"
:group=
"
{
name: 'itxst',
pull: true,
put: changeCommon,
}"
animation="500"
delay="50"
draggable=".common-item"
class="common-list"
dragClass="dragClass"
@remove="handleRemove"
>
>
<div
class=
"picture"
:style=
"
{ background: item.color }">
<div
<img
class=
"common-item w-[160px] flex flex-col items-center cursor-pointer"
width=
"40"
v-for=
"v in siteModelList"
height=
"35"
:key=
"v.id"
:src=
"
>
item.modelIcon
<div
class=
"item-logo"
>
? api + item.modelIcon
<img
: require('../../assets/images/u222.svg')
class=
"w-full h-full object-cover"
"
:src=
"api + v.modelIcon"
alt
/>
/>
<img
class=
"bottom-img"
src=
"@/assets/images/siteArrange/pic-bottom.png"
/>
</div>
<div
class=
"text-white mt-[10px] leading-[20px]"
>
{{
v
.
modelName
}}
</div>
</div>
</div>
<div
class=
"name"
style=
"margin-top: 10px"
>
{{
item
.
modelName
}}
</div>
</draggable>
<div
class=
"w-[160px] flex justify-center items-center"
>
<img
class=
"cursor-pointer"
src=
"@/assets/images/siteArrange/extension.png"
/>
</div>
</div>
</div>
</div>
<!-- 站点列表 -->
<div
class=
"site-box"
></div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
menu
from
"
@/mixins/menu
"
;
import
{
appsListInterface
}
from
"
@/api/siteArrange
"
;
import
{
appsListInterface
}
from
"
@/api/siteArrange
"
;
import
Storage
from
"
@/utils/js/Storage
"
;
import
Storage
from
"
@/utils/js/Storage
"
;
export
default
{
export
default
{
mixins
:
[
menu
],
data
()
{
data
()
{
return
{
return
{
api
:
process
.
env
.
VUE_APP_API_IMG_URL
,
api
:
process
.
env
.
VUE_APP_API_IMG_URL
,
siteId
:
""
,
siteId
:
Storage
.
get
(
2
,
"
siteId
"
),
commonList
:
[],
siteModelList
:
[],
// 站点编排列表
siteModelList
:
[],
// 站点编排列表
};
};
},
},
created
()
{
created
()
{
this
.
getMenuList
(
true
);
this
.
appsListInterface
();
this
.
appsListInterface
();
this
.
$bus
.
$on
(
"
changeSite
"
,
()
=>
{
this
.
appsListInterface
();
});
},
},
methods
:
{
methods
:
{
async
appsListInterface
()
{
async
appsListInterface
()
{
this
.
siteId
=
Storage
.
get
(
2
,
"
siteId
"
);
let
res
=
await
appsListInterface
({
siteId
:
this
.
siteId
});
let
res
=
await
appsListInterface
({
siteId
:
this
.
siteId
});
let
{
data
}
=
res
.
data
;
if
(
res
.
data
.
code
==
1
)
{
let
color
=
[];
let
{
data
}
=
res
.
data
.
data
;
let
colorArr
=
[
"
#546DFF
"
,
"
#1E6FFF
"
,
"
#3CBFFF
"
,
"
#00AA5B
"
,
"
#FFAB00
"
];
this
.
siteModelList
=
data
.
slice
(
0
,
10
);
color
=
colorArr
.
concat
(
console
.
log
(
this
.
siteModelList
);
colorArr
,
}
colorArr
,
colorArr
,
colorArr
,
colorArr
,
colorArr
);
this
.
siteModelList
=
data
.
map
((
v
,
i
)
=>
{
v
[
"
color
"
]
=
color
[
i
];
return
v
;
});
},
},
openWindow
(
row
)
{
openWindow
(
row
)
{
let
token
=
Storage
.
get
(
2
,
"
Authorization
"
);
let
token
=
Storage
.
get
(
2
,
"
Authorization
"
);
...
@@ -110,102 +103,46 @@ export default {
...
@@ -110,102 +103,46 @@ export default {
"
_blank
"
"
_blank
"
);
);
},
},
handleRemove
(
e
)
{
console
.
log
(
e
);
},
changeCommon
()
{},
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
@headerH: 4.5rem;
.ant-carousel :deep(.slick-slide) {
width: 100%;
height: 100%;
overflow: hidden;
.img_box {
width: 100%;
height: 92.1vh;
overflow: hidden;
background-size: cover;
}
.img1 {
background: url("~@/assets/images/bg.jpg") center no-repeat;
}
.img2 {
background: url("~@/assets/images/bgg1.jpg") center no-repeat;
}
.img3 {
background: url("~@/assets/images/bgg2.jpg") center no-repeat;
}
}
.station {
.station {
width: 100%;
background: url("@/assets/images/siteArrange/bg.png") no-repeat;
height: 100%;
background-size: 100% 100%;
// background: url("~@/assets/images/bg.jpg") center no-repeat;
background-size: cover;
position: relative;
padding-top: @headerH;
overflow: hidden;
.title {
.title {
width: 650px;
.slogan {
height: 100px;
font-size: 39px;
position: absolute;
font-family: Source Han Sans CN;
top: 30%;
font-weight: 500;
left: 50%;
transform: translate(-50%, -50%);
h3 {
font-weight: 400;
font-size: 28px;
color: #ffffff;
}
p {
font-weight: 700;
font-size: 28px;
color: #ffffff;
color: #ffffff;
padding-top: 20px;
padding-left: 25px;
}
}
}
}
.common {
.classification {
padding: 0px 40px;
width: 100%;
.common-list {
height: 410px;
display: grid;
position: absolute;
grid-template-columns: repeat(10, 1fr);
bottom: 0;
align-items: center;
background-color: rgba(3, 23, 24, 0.452);
justify-items: center;
overflow-y: auto;
}
.modules {
.item-logo {
margin: 0 100px;
width: 80px;
padding-top: 20px;
height: 80px;
display: flex;
padding: 10px;
flex-wrap: wrap;
background: linear-gradient(180deg, #daefff 0%, #ffffff 100%);
.mod_max {
box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.1);
width: 96px;
border-radius: 20px;
height: 115px;
position: relative;
margin-left: 39px;
.bottom-img {
margin-top: 5px;
position: absolute;
text-align: center;
left: 0px;
cursor: pointer;
bottom: -10px;
.picture {
width: 72px;
height: 72px;
line-height: 72px;
margin: auto;
border-radius: 24px;
background-color: rgba(84, 120, 140, 1);
}
.name {
width: 100%;
font-weight: 700;
font-size: 16px;
color: #ffffff;
padding-top: 5px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
}
}
}
...
...
portal-manager-ui/admin/yarn.lock
View file @
ffbaf379
...
@@ -3665,6 +3665,11 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4,
...
@@ -3665,6 +3665,11 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4,
resolved "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz"
resolved "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
gsap@^3.12.2:
version "3.12.2"
resolved "https://registry.npmmirror.com/gsap/-/gsap-3.12.2.tgz#6e88203eed360761cbf2a2cb3a8d702aa87f3f6d"
integrity sha512-EkYnpG8qHgYBFAwsgsGEqvT1WUidX0tt/ijepx7z8EUJHElykg91RvW1XbkT59T0gZzzszOpjQv7SE41XuIXyQ==
gzip-size@^6.0.0:
gzip-size@^6.0.0:
version "6.0.0"
version "6.0.0"
resolved "https://registry.npmmirror.com/gzip-size/-/gzip-size-6.0.0.tgz"
resolved "https://registry.npmmirror.com/gzip-size/-/gzip-size-6.0.0.tgz"
...
@@ -5964,6 +5969,11 @@ sockjs@^0.3.24:
...
@@ -5964,6 +5969,11 @@ sockjs@^0.3.24:
uuid "^8.3.2"
uuid "^8.3.2"
websocket-driver "^0.7.4"
websocket-driver "^0.7.4"
sortablejs@1.10.2:
version "1.10.2"
resolved "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.10.2.tgz#6e40364d913f98b85a14f6678f92b5c1221f5290"
integrity sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A==
source-map-js@^1.0.2:
source-map-js@^1.0.2:
version "1.0.2"
version "1.0.2"
resolved "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz"
resolved "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz"
...
@@ -6523,6 +6533,13 @@ vue@^2.6.14:
...
@@ -6523,6 +6533,13 @@ vue@^2.6.14:
"@vue/compiler-sfc" "2.7.14"
"@vue/compiler-sfc" "2.7.14"
csstype "^3.1.0"
csstype "^3.1.0"
vuedraggable@^2.24.3:
version "2.24.3"
resolved "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-2.24.3.tgz#43c93849b746a24ce503e123d5b259c701ba0d19"
integrity sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==
dependencies:
sortablejs "1.10.2"
vuex-persistedstate@^4.1.0:
vuex-persistedstate@^4.1.0:
version "4.1.0"
version "4.1.0"
resolved "https://registry.npmmirror.com/vuex-persistedstate/-/vuex-persistedstate-4.1.0.tgz#127165f85f5b4534fb3170a5d3a8be9811bd2a53"
resolved "https://registry.npmmirror.com/vuex-persistedstate/-/vuex-persistedstate-4.1.0.tgz#127165f85f5b4534fb3170a5d3a8be9811bd2a53"
...
...
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