Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-monitor
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
Administrator
web-monitor
Commits
401752ab
Commit
401752ab
authored
Jan 16, 2025
by
dupengyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
路由修改前
parent
099aff70
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
162 additions
and
42 deletions
+162
-42
job.js
src/api/job.js
+2
-2
role.js
src/api/system/role.js
+3
-3
hasPermi.js
src/directive/permission/hasPermi.js
+5
-5
main.js
src/main.js
+8
-1
index.js
src/router/index.js
+16
-16
getters.js
src/store/getters.js
+1
-0
index.js
src/store/index.js
+3
-1
dict.js
src/store/modules/dict.js
+50
-0
peimission.js
src/store/modules/peimission.js
+3
-1
request.js
src/utils/request.js
+8
-0
websocket.js
src/utils/websocket.js
+2
-2
type1.vue
src/views/dashboard/components/type1.vue
+2
-2
index.vue
src/views/jobgroup/screen/index.vue
+47
-1
index.vue
src/views/system/menu/index.vue
+5
-1
index.vue
src/views/system/role/index.vue
+7
-6
vue.config.js
vue.config.js
+0
-1
No files found.
src/api/job.js
View file @
401752ab
...
@@ -2,11 +2,11 @@ import request from '@/utils/request'
...
@@ -2,11 +2,11 @@ import request from '@/utils/request'
/* 运行报表 */
/* 运行报表 */
export
function
chartInfo
(
params
)
{
export
function
chartInfo
(
data
)
{
return
request
({
return
request
({
url
:
'/device/chartInfo'
,
url
:
'/device/chartInfo'
,
method
:
'post'
,
method
:
'post'
,
params
data
})
})
}
}
/* 任务管理 */
/* 任务管理 */
...
...
src/api/system/role.js
View file @
401752ab
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
// 查询角色列表
// 查询角色列表
export
function
listRole
(
query
)
{
export
function
listRole
(
data
)
{
return
request
({
return
request
({
url
:
'/api/role/list'
,
url
:
'/api/role/list'
,
method
:
'
ge
t'
,
method
:
'
pos
t'
,
params
:
query
data
})
})
}
}
...
...
src/directive/permission/hasPermi.js
View file @
401752ab
/**
/**
* v-hasPermi 操作权限处理
* v-hasPermi 操作权限处理
* Copyright (c) 2019 ruoyi
* Copyright (c) 2019 ruoyi
*/
*/
import
store
from
'@/store'
import
store
from
'@/store'
...
@@ -10,7 +10,7 @@ export default {
...
@@ -10,7 +10,7 @@ export default {
const
{
value
}
=
binding
const
{
value
}
=
binding
const
all_permission
=
"*:*:*"
;
const
all_permission
=
"*:*:*"
;
const
permissions
=
store
.
getters
&&
store
.
getters
.
permissions
const
permissions
=
store
.
getters
&&
store
.
getters
.
permissions
console
.
log
(
permissions
)
if
(
value
&&
value
instanceof
Array
&&
value
.
length
>
0
)
{
if
(
value
&&
value
instanceof
Array
&&
value
.
length
>
0
)
{
const
permissionFlag
=
value
const
permissionFlag
=
value
...
...
src/main.js
View file @
401752ab
...
@@ -13,6 +13,7 @@ import performLoader from '@/utils/global_main_loader.js'
...
@@ -13,6 +13,7 @@ import performLoader from '@/utils/global_main_loader.js'
import
WS
from
'@/utils/websocket'
import
WS
from
'@/utils/websocket'
import
{
getDicts
}
from
"@/api/system/dict/data"
;
import
{
getDicts
}
from
"@/api/system/dict/data"
;
import
directive
from
'./directive'
// directive
import
directive
from
'./directive'
// directive
import
{
parseTime
,
resetForm
,
addDateRange
,
selectDictLabel
,
selectDictLabels
,
handleTree
,
getDictLabel
}
from
'@/utils/ruoyi'
// 字典标签组件
// 字典标签组件
import
DictTag
from
'@/components/DictTag'
import
DictTag
from
'@/components/DictTag'
import
RightToolbar
from
'@/components/RightToolbar'
import
RightToolbar
from
'@/components/RightToolbar'
...
@@ -24,6 +25,12 @@ Vue.use(ElementUI, { locale })
...
@@ -24,6 +25,12 @@ Vue.use(ElementUI, { locale })
performLoader
(
Vue
)
// 所有的第三方插件性质的东西都放到这里面了
performLoader
(
Vue
)
// 所有的第三方插件性质的东西都放到这里面了
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
Vue
.
prototype
.
getDicts
=
getDicts
Vue
.
prototype
.
getDicts
=
getDicts
Vue
.
prototype
.
parseTime
=
parseTime
Vue
.
prototype
.
handleTree
=
handleTree
Vue
.
prototype
.
resetForm
=
resetForm
Vue
.
prototype
.
addDateRange
=
addDateRange
Vue
.
prototype
.
selectDictLabel
=
selectDictLabel
Vue
.
prototype
.
selectDictLabels
=
selectDictLabels
Vue
.
component
(
'RightToolbar'
,
RightToolbar
)
Vue
.
component
(
'RightToolbar'
,
RightToolbar
)
Vue
.
component
(
'DictTag'
,
DictTag
)
Vue
.
component
(
'DictTag'
,
DictTag
)
Vue
.
use
(
directive
)
Vue
.
use
(
directive
)
...
@@ -35,7 +42,7 @@ function dispatchWithPromise(path) {
...
@@ -35,7 +42,7 @@ function dispatchWithPromise(path) {
}
}
const
beforeEnterApp
=
()
=>
{
const
beforeEnterApp
=
()
=>
{
dispatchWithPromise
(
'depart/getDepart'
)
//
dispatchWithPromise('depart/getDepart')
dispatchWithPromise
(
'user/getInfo'
)
dispatchWithPromise
(
'user/getInfo'
)
dispatchWithPromise
(
'alarm/getAlarmList'
)
dispatchWithPromise
(
'alarm/getAlarmList'
)
}
}
...
...
src/router/index.js
View file @
401752ab
...
@@ -42,12 +42,12 @@ export const constantRoutes = [
...
@@ -42,12 +42,12 @@ export const constantRoutes = [
component
:
()
=>
import
(
'@/views/alarm/cableTime/index'
),
component
:
()
=>
import
(
'@/views/alarm/cableTime/index'
),
meta
:
{
title
:
'漏缆监测告警'
}
meta
:
{
title
:
'漏缆监测告警'
}
},
},
{
//
{
path
:
'device'
,
//
path: 'device',
name
:
'device'
,
//
name: 'device',
component
:
()
=>
import
(
'@/views/alarm/device/index'
),
//
component: () => import('@/views/alarm/device/index'),
meta
:
{
title
:
'设备连接告警'
}
//
meta: { title: '设备连接告警' }
},
//
},
{
{
path
:
'statistics'
,
path
:
'statistics'
,
name
:
'statistics'
,
name
:
'statistics'
,
...
@@ -135,12 +135,12 @@ export const constantRoutes = [
...
@@ -135,12 +135,12 @@ export const constantRoutes = [
component
:
()
=>
import
(
'@/views/monitor/leakageCable/index'
),
component
:
()
=>
import
(
'@/views/monitor/leakageCable/index'
),
meta
:
{
title
:
'漏缆实时状态'
}
meta
:
{
title
:
'漏缆实时状态'
}
},
},
{
//
{
path
:
'equipment'
,
//
path: 'equipment',
name
:
'设备实时状态'
,
//
name: '设备实时状态',
component
:
()
=>
import
(
'@/views/monitor/equipment/index'
),
//
component: () => import('@/views/monitor/equipment/index'),
meta
:
{
title
:
'设备实时状态'
}
//
meta: { title: '设备实时状态' }
}
//
}
]
]
},
},
{
{
...
@@ -243,10 +243,10 @@ export const constantRoutes = [
...
@@ -243,10 +243,10 @@ export const constantRoutes = [
meta
:
{
title
:
'菜单管理'
}
meta
:
{
title
:
'菜单管理'
}
},
},
{
{
path
:
'
synchroniz
e'
,
path
:
'
rol
e'
,
name
:
'
时间同步
'
,
name
:
'
角色管理
'
,
component
:
()
=>
import
(
'@/views/
backup/synchroniz
e/index'
),
component
:
()
=>
import
(
'@/views/
system/rol
e/index'
),
meta
:
{
title
:
'
时间同步
'
}
meta
:
{
title
:
'
角色管理
'
}
}
}
]
]
},
},
...
...
src/store/getters.js
View file @
401752ab
...
@@ -2,5 +2,6 @@ const getters = {
...
@@ -2,5 +2,6 @@ const getters = {
sidebar
:
state
=>
state
.
app
.
sidebar
,
sidebar
:
state
=>
state
.
app
.
sidebar
,
device
:
state
=>
state
.
app
.
device
,
device
:
state
=>
state
.
app
.
device
,
token
:
state
=>
state
.
user
.
token
,
token
:
state
=>
state
.
user
.
token
,
dict
:
state
=>
state
.
dict
.
dict
,
}
}
export
default
getters
export
default
getters
src/store/index.js
View file @
401752ab
...
@@ -7,6 +7,7 @@ import user from './modules/user'
...
@@ -7,6 +7,7 @@ import user from './modules/user'
import
depart
from
'./modules/depart'
import
depart
from
'./modules/depart'
import
alarm
from
'./modules/alarm'
import
alarm
from
'./modules/alarm'
import
permission
from
'./modules/peimission'
import
permission
from
'./modules/peimission'
import
dict
from
'./modules/dict'
Vue
.
use
(
Vuex
)
Vue
.
use
(
Vuex
)
...
@@ -18,7 +19,8 @@ const store = new Vuex.Store({
...
@@ -18,7 +19,8 @@ const store = new Vuex.Store({
user
,
user
,
depart
,
depart
,
alarm
,
alarm
,
permission
permission
,
dict
},
},
getters
getters
})
})
...
...
src/store/modules/dict.js
0 → 100644
View file @
401752ab
const
state
=
{
dict
:
new
Array
()
}
const
mutations
=
{
SET_DICT
:
(
state
,
{
key
,
value
})
=>
{
if
(
key
!==
null
&&
key
!==
""
)
{
state
.
dict
.
push
({
key
:
key
,
value
:
value
})
}
},
REMOVE_DICT
:
(
state
,
key
)
=>
{
try
{
for
(
let
i
=
0
;
i
<
state
.
dict
.
length
;
i
++
)
{
if
(
state
.
dict
[
i
].
key
==
key
)
{
state
.
dict
.
splice
(
i
,
1
)
return
true
}
}
}
catch
(
e
)
{
}
},
CLEAN_DICT
:
(
state
)
=>
{
state
.
dict
=
new
Array
()
}
}
const
actions
=
{
// 设置字典
setDict
({
commit
},
data
)
{
commit
(
'SET_DICT'
,
data
)
},
// 删除字典
removeDict
({
commit
},
key
)
{
commit
(
'REMOVE_DICT'
,
key
)
},
// 清空字典
cleanDict
({
commit
})
{
commit
(
'CLEAN_DICT'
)
}
}
export
default
{
namespaced
:
true
,
state
,
mutations
,
actions
}
src/store/modules/peimission.js
View file @
401752ab
...
@@ -67,3 +67,5 @@ export default {
...
@@ -67,3 +67,5 @@ export default {
mutations
,
mutations
,
actions
,
actions
,
}
}
src/utils/request.js
View file @
401752ab
...
@@ -54,7 +54,15 @@ service.interceptors.request.use(
...
@@ -54,7 +54,15 @@ service.interceptors.request.use(
let
errorShowing
=
false
let
errorShowing
=
false
service
.
interceptors
.
response
.
use
(
service
.
interceptors
.
response
.
use
(
response
=>
{
response
=>
{
console
.
log
(
response
)
let
res
=
response
.
data
.
data
?
response
.
data
.
data
:
response
.
data
let
res
=
response
.
data
.
data
?
response
.
data
.
data
:
response
.
data
if
(
response
.
data
.
msg
==
"操作成功"
)
{
res
=
response
.
data
}
// if (response.data.success) {
// res = response.data
// }
if
(
response
.
data
.
recordsTotal
)
{
if
(
response
.
data
.
recordsTotal
)
{
res
=
{
res
=
{
recordsTotal
:
response
.
data
.
recordsTotal
,
recordsTotal
:
response
.
data
.
recordsTotal
,
...
...
src/utils/websocket.js
View file @
401752ab
...
@@ -8,9 +8,9 @@ export default function socket(handlerOptions) {
...
@@ -8,9 +8,9 @@ export default function socket(handlerOptions) {
onopen
,
onopen
,
// socketUrl
// socketUrl
}
=
handlerOptions
}
=
handlerOptions
let
socketUrl
=
'ws://101.126.159.207:8087/device/websocket/1'
//
let socketUrl = 'ws://101.126.159.207:8087/device/websocket/1'
//
let socketUrl = 'ws://127.0.0.1:8087/device/websocket/1'
let
socketUrl
=
'ws://127.0.0.1:8087/device/websocket/1'
let
websocket
let
websocket
if
(
"WebSocket"
in
window
)
{
if
(
"WebSocket"
in
window
)
{
websocket
=
new
WebSocket
(
socketUrl
)
websocket
=
new
WebSocket
(
socketUrl
)
...
...
src/views/dashboard/components/type1.vue
View file @
401752ab
...
@@ -128,7 +128,7 @@
...
@@ -128,7 +128,7 @@
<div
class=
"item_data"
>
{{
form
.
type4
}}
台
</div>
<div
class=
"item_data"
>
{{
form
.
type4
}}
台
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
class=
"text"
:gutter=
"24"
>
<
!--
<
el-row
class=
"text"
:gutter=
"24"
>
<el-col
:span=
"10"
>
<el-col
:span=
"10"
>
<div
class=
"item_name"
>
漏缆
</div>
<div
class=
"item_name"
>
漏缆
</div>
</el-col>
</el-col>
...
@@ -143,7 +143,7 @@
...
@@ -143,7 +143,7 @@
<el-col
:span=
"10"
>
<el-col
:span=
"10"
>
<div
class=
"item_data"
>
{{
form
.
type6
}}
根
</div>
<div
class=
"item_data"
>
{{
form
.
type6
}}
根
</div>
</el-col>
</el-col>
</el-row>
</el-row>
-->
</div>
</div>
</el-card>
</el-card>
</el-col>
</el-col>
...
...
src/views/jobgroup/screen/index.vue
View file @
401752ab
...
@@ -69,8 +69,25 @@ export default {
...
@@ -69,8 +69,25 @@ export default {
this
.
handleChartInfo
();
this
.
handleChartInfo
();
},
},
methods
:
{
methods
:
{
formatDate
(
date
)
{
const
year
=
date
.
getFullYear
();
const
month
=
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
"0"
);
const
day
=
String
(
date
.
getDate
()).
padStart
(
2
,
"0"
);
const
hours
=
String
(
date
.
getHours
()).
padStart
(
2
,
"0"
);
const
minutes
=
String
(
date
.
getMinutes
()).
padStart
(
2
,
"0"
);
const
seconds
=
String
(
date
.
getSeconds
()).
padStart
(
2
,
"0"
);
return
`
${
year
}
-
${
month
}
-
${
day
}
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
;
},
async
handleChartInfo
()
{
async
handleChartInfo
()
{
let
res
=
await
chartInfo
({});
const
midnight
=
new
Date
();
midnight
.
setHours
(
0
,
0
,
0
,
0
);
midnight
.
setTime
(
midnight
.
getTime
()
-
7
*
24
*
60
*
60
*
1000
);
let
data
=
{
startDate
:
this
.
formatDate
(
midnight
),
endDate
:
this
.
formatDate
(
new
Date
()),
};
const
queryParams
=
new
URLSearchParams
(
data
).
toString
();
let
res
=
await
chartInfo
(
queryParams
);
this
.
chartInfo
=
res
.
content
;
this
.
chartInfo
=
res
.
content
;
if
(
this
.
myChart
.
chart1
!=
null
)
{
if
(
this
.
myChart
.
chart1
!=
null
)
{
this
.
myChart
.
chart1
.
dispose
();
this
.
myChart
.
chart1
.
dispose
();
...
@@ -100,16 +117,40 @@ export default {
...
@@ -100,16 +117,40 @@ export default {
name
:
"成功"
,
name
:
"成功"
,
data
:
this
.
chartInfo
.
triggerDayCountSucList
,
data
:
this
.
chartInfo
.
triggerDayCountSucList
,
type
:
"line"
,
type
:
"line"
,
lineStyle
:
{
color
:
"#91CC75"
,
},
itemStyle
:
{
normal
:
{
color
:
"#91CC75"
,
},
},
},
},
{
{
name
:
"失败"
,
name
:
"失败"
,
data
:
this
.
chartInfo
.
triggerDayCountFailList
,
data
:
this
.
chartInfo
.
triggerDayCountFailList
,
type
:
"line"
,
type
:
"line"
,
lineStyle
:
{
color
:
"#EE6666"
,
},
itemStyle
:
{
normal
:
{
color
:
"#EE6666"
,
},
},
},
},
{
{
name
:
"进行中"
,
name
:
"进行中"
,
data
:
this
.
chartInfo
.
triggerDayCountRunningList
,
data
:
this
.
chartInfo
.
triggerDayCountRunningList
,
type
:
"line"
,
type
:
"line"
,
lineStyle
:
{
color
:
"#FAC858"
,
},
itemStyle
:
{
normal
:
{
color
:
"#FAC858"
,
},
},
},
},
],
],
};
};
...
@@ -133,6 +174,11 @@ export default {
...
@@ -133,6 +174,11 @@ export default {
orient
:
"vertical"
,
orient
:
"vertical"
,
left
:
"left"
,
left
:
"left"
,
},
},
color
:
[
"#91CC75"
,
"#EE6666"
,
"#FAC858"
],
series
:
[
series
:
[
{
{
name
:
"数量"
,
name
:
"数量"
,
...
...
src/views/system/menu/index.vue
View file @
401752ab
...
@@ -307,7 +307,9 @@ export default {
...
@@ -307,7 +307,9 @@ export default {
visible
:
undefined
visible
:
undefined
},
},
// 表单参数
// 表单参数
form
:
{},
form
:
{
parentId
:
''
},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
menuName
:
[
menuName
:
[
...
@@ -334,6 +336,7 @@ export default {
...
@@ -334,6 +336,7 @@ export default {
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
listMenu
(
this
.
queryParams
).
then
(
response
=>
{
listMenu
(
this
.
queryParams
).
then
(
response
=>
{
console
.
log
(
response
);
this
.
menuList
=
this
.
handleTree
(
response
.
data
,
"menuId"
);
this
.
menuList
=
this
.
handleTree
(
response
.
data
,
"menuId"
);
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
...
@@ -392,6 +395,7 @@ export default {
...
@@ -392,6 +395,7 @@ export default {
handleAdd
(
row
)
{
handleAdd
(
row
)
{
this
.
reset
();
this
.
reset
();
this
.
getTreeselect
();
this
.
getTreeselect
();
console
.
log
(
row
);
if
(
row
!=
null
&&
row
.
menuId
)
{
if
(
row
!=
null
&&
row
.
menuId
)
{
this
.
form
.
parentId
=
row
.
menuId
;
this
.
form
.
parentId
=
row
.
menuId
;
}
else
{
}
else
{
...
...
src/views/system/role/index.vue
View file @
401752ab
...
@@ -150,8 +150,8 @@
...
@@ -150,8 +150,8 @@
<pagination
<pagination
v-show=
"total>0"
v-show=
"total>0"
:total=
"total"
:total=
"total"
:page
.
sync=
"queryParams.
pageNum
"
:page
.
sync=
"queryParams.
current
"
:limit
.
sync=
"queryParams.
pageS
ize"
:limit
.
sync=
"queryParams.
s
ize"
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
...
@@ -315,8 +315,8 @@ export default {
...
@@ -315,8 +315,8 @@ export default {
deptOptions
:
[],
deptOptions
:
[],
// 查询参数
// 查询参数
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
current
:
1
,
pageS
ize
:
10
,
s
ize
:
10
,
roleName
:
undefined
,
roleName
:
undefined
,
roleKey
:
undefined
,
roleKey
:
undefined
,
status
:
undefined
status
:
undefined
...
@@ -348,8 +348,9 @@ export default {
...
@@ -348,8 +348,9 @@ export default {
/** 查询角色列表 */
/** 查询角色列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
listRole
(
this
.
addDateRange
(
this
.
queryParams
,
this
.
dateRange
)).
then
(
response
=>
{
let
data
=
{
...
this
.
queryParams
,...
this
.
dateRange
};
this
.
roleList
=
response
.
rows
;
listRole
(
data
).
then
(
response
=>
{
this
.
roleList
=
response
.
records
;
this
.
total
=
response
.
total
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
this
.
loading
=
false
;
}
}
...
...
vue.config.js
View file @
401752ab
...
@@ -9,7 +9,6 @@ function resolve(dir) {
...
@@ -9,7 +9,6 @@ function resolve(dir) {
const
name
=
defaultSettings
.
title
||
'漏缆故障定位监测系统'
// page title
const
name
=
defaultSettings
.
title
||
'漏缆故障定位监测系统'
// page title
const
port
=
process
.
env
.
port
||
process
.
env
.
npm_config_port
||
8890
// dev port
const
port
=
process
.
env
.
port
||
process
.
env
.
npm_config_port
||
8890
// dev port
const
href
=
'http://101.126.159.207'
const
href
=
'http://101.126.159.207'
// const href = 'http://192.168.0.118'
// const href = 'http://127.0.0.1'
// const href = 'http://127.0.0.1'
// const href = 'http://192.168.0.122'
// const href = 'http://192.168.0.122'
...
...
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