Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZiBoYingJI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Kimber
ZiBoYingJI
Commits
163d2a43
Commit
163d2a43
authored
Oct 14, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电子档案馆菜单显示控制,大屏详情页日期条件修改
parent
35e19f2f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
9 deletions
+26
-9
public-detail.js
public/datav/detail/static/js/public-detail.js
+3
-4
menu.js
src/api/system/menu.js
+6
-2
index.js
src/router/index.js
+7
-1
routers.js
src/router/routers.js
+1
-1
user.js
src/store/modules/user.js
+6
-1
home4Index.vue
src/views/home4Index.vue
+3
-0
No files found.
public/datav/detail/static/js/public-detail.js
View file @
163d2a43
...
...
@@ -8,16 +8,15 @@ let jessibucaPlayer = {};
response
=>
{
return
response
},
error
=>
{
console
.
error
(
error
)
let
code
=
0
try
{
code
=
error
.
response
.
data
.
status
}
catch
(
e
)
{
if
(
error
.
toString
().
indexOf
(
'
Error: timeout
'
)
!==
-
1
)
{
console
.
error
(
'
当前网络不佳
'
)
return
}
}
if
(
!
code
)
{
console
.
error
(
'
当前网络不佳
'
)
return
...
...
@@ -28,7 +27,7 @@ let jessibucaPlayer = {};
return
}
if
(
code
===
400
)
{
alert
(
'
您没有权限使用此功能,请联系管理员开通
'
)
alert
(
error
.
response
.
data
.
message
||
'
您没有权限使用此功能,请联系管理员开通
'
)
return
}
}
...
...
@@ -57,7 +56,7 @@ var gemhoUtil = {
// 获取前七天的日期
const
sevenDaysAgo
=
new
Date
();
sevenDaysAgo
.
setDate
(
today
.
getDate
()
-
7
);
sevenDaysAgo
.
setDate
(
today
.
getDate
());
// 格式化日期为 YYYY-MM-DD HH:mm:ss
const
formatDate
=
(
date
)
=>
{
...
...
src/api/system/menu.js
View file @
163d2a43
...
...
@@ -39,9 +39,13 @@ export function getChild(id) {
})
}
export
function
buildMenus
()
{
export
function
buildMenus
(
flag
)
{
var
url
=
'
api/menus/build
'
if
(
flag
){
url
=
url
+
(
'
?flag=
'
+
flag
)
}
return
request
({
url
:
'
api/menus/build
'
,
url
,
method
:
'
get
'
})
}
...
...
src/router/index.js
View file @
163d2a43
...
...
@@ -52,7 +52,13 @@ router.beforeEach((to, from, next) => {
})
export
const
loadMenus
=
(
next
,
to
)
=>
{
buildMenus
().
then
(
res
=>
{
let
flag
=
''
if
(
to
.
path
.
indexOf
(
'
edoc
'
)
>
-
1
||
to
.
path
.
indexOf
(
'
folderAuth
'
)
>
-
1
){
flag
=
'
edoc
'
// console.log('标记设置', to.path.indexOf('edoc') > -1 || to.path.indexOf('folderAuth') > -1)
}
buildMenus
(
flag
).
then
(
res
=>
{
const
sdata
=
JSON
.
parse
(
JSON
.
stringify
(
res
))
const
rdata
=
JSON
.
parse
(
JSON
.
stringify
(
res
))
const
sidebarRoutes
=
filterAsyncRouter
(
sdata
)
...
...
src/router/routers.js
View file @
163d2a43
...
...
@@ -16,7 +16,7 @@ export const constantRouterMap = [
hidden
:
true
},
{
path
:
'
/login4Index
'
,
meta
:
{
title
:
'
登录
'
,
noCache
:
true
},
meta
:
{
title
:
'
中间页
'
,
noCache
:
true
},
component
:
(
resolve
)
=>
require
([
'
@/views/home4Index
'
],
resolve
),
hidden
:
true
},
...
...
src/store/modules/user.js
View file @
163d2a43
...
...
@@ -71,7 +71,12 @@ const user = {
return
new
Promise
((
resolve
,
reject
)
=>
{
commit
(
'
SET_LOAD_MENUS
'
,
false
)
})
}
},
needLoadMenus
({
commit
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
commit
(
'
SET_LOAD_MENUS
'
,
true
)
})
},
}
}
...
...
src/views/home4Index.vue
View file @
163d2a43
...
...
@@ -47,6 +47,7 @@
</
template
>
<
script
>
import
store
from
'
@/store
'
import
qs
from
"
qs
"
;
import
Background
from
"
@/assets/home4Index/newbg.gif
"
;
import
Title
from
"
@/assets/home4Index/title.png
"
;
...
...
@@ -115,6 +116,7 @@ export default {
var
host
=
location
.
protocol
+
"
//
"
+
window
.
location
.
host
;
if
(
type
===
"
admin
"
)
{
// this.$router.push({ path: "home4Center" });
store
.
dispatch
(
'
needLoadMenus
'
)
this
.
$router
.
push
({
path
:
"
/user/center
"
});
}
else
if
(
type
===
"
应急管理
"
)
{
// this.$router.push({ path: "home4Center" });
...
...
@@ -127,6 +129,7 @@ export default {
location
.
href
=
host
+
"
/datav/watersource.html
"
;
}
else
if
(
type
===
"
电子档案馆
"
)
{
// this.$router.push({ path: "home4Center" });
store
.
dispatch
(
'
needLoadMenus
'
)
this
.
$router
.
push
({
path
:
"
/1/edoc
"
});
}
else
if
(
type
===
"
生态环境
"
)
{
// this.$router.push({ path: "home4Center" });
...
...
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