Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pmk-channel-vue
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
黄麒宇
pmk-channel-vue
Commits
25ba7af2
Commit
25ba7af2
authored
Mar 03, 2023
by
huangqy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1111
parent
cf1e1dd7
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
38 行增加
和
8 行删除
+38
-8
bg1.png
src/assets/theme/bg1.png
+0
-0
bg2.png
src/assets/theme/bg2.png
+0
-0
ChannelSetting.vue
src/views/ChannelSetting.vue
+2
-1
HomeView.vue
src/views/HomeView.vue
+28
-1
RFID.vue
src/views/RFID.vue
+8
-6
没有找到文件。
src/assets/theme/bg1.
jp
g
→
src/assets/theme/bg1.
pn
g
View file @
25ba7af2
File moved
src/assets/theme/bg2.
jp
g
→
src/assets/theme/bg2.
pn
g
View file @
25ba7af2
File moved
src/views/ChannelSetting.vue
View file @
25ba7af2
...
...
@@ -249,7 +249,7 @@ export default defineComponent({
})
}
function
handleCommand
()
{
function
handleCommand
(
command
)
{
if
(
command
===
'#223170'
)
{
// 藏蓝
sessionStorage
.
setItem
(
'loginbg'
,
'bg1'
)
}
...
...
@@ -259,6 +259,7 @@ export default defineComponent({
if
(
command
===
'#1f8a36'
)
{
// 军绿
sessionStorage
.
setItem
(
'loginbg'
,
'bg'
)
}
window
.
location
.
reload
()
}
return
{
...
...
src/views/HomeView.vue
View file @
25ba7af2
<
template
>
<el-tabs
:tab-position=
"tabPosition"
type=
"card"
:stretch=
"true"
class=
"menu-tabs"
@
tab-change=
"tabChange"
>
<el-tabs
:tab-position=
"tabPosition"
type=
"card"
:stretch=
"true"
class=
"menu-tabs"
@
tab-change=
"tabChange"
:style=
"
{backgroundImage:'url('+ bg +')'}"
>
<el-tab-pane
v-for=
"item in tabList"
:key=
"item.title"
>
<template
#
label
>
<span
class=
"custom-tabs-label"
>
...
...
@@ -29,6 +29,7 @@ export default defineComponent({
const
{
proxy
}
=
getCurrentInstance
()
const
tabPosition
=
ref
(
'bottom'
)
const
log
=
ref
(
''
)
const
bg
=
ref
(
'/src/assets/theme/bg.png'
)
const
tabList
=
[
{
title
:
'射频识别'
,
icon
:
'iconfont icon-tiaozhishibie'
,
template
:
'RFID'
},
{
title
:
'入库作业'
,
icon
:
'iconfont icon-rukuguanli-'
,
template
:
'InTask'
},
...
...
@@ -37,11 +38,36 @@ export default defineComponent({
{
title
:
'查询'
,
icon
:
'iconfont icon-chaxun'
,
template
:
'Query'
},
{
title
:
'通道配置'
,
icon
:
'iconfont icon-shezhi'
,
template
:
'ChannelSetting'
},
]
const
a
=
sessionStorage
.
getItem
(
'loginbg'
)
if
(
a
==
'bg'
)
{
bg
.
value
=
'/src/assets/theme/bg.png'
}
if
(
a
==
'bg1'
)
{
bg
.
value
=
'/src/assets/theme/bg1.png'
}
if
(
a
==
'bg2'
)
{
bg
.
value
=
'/src/assets/theme/bg2.png'
}
setTimeout
(()
=>
{
changeBg
()
},
200
)
function
changeBg
()
{
for
(
var
i
=
0
;
i
<
document
.
getElementsByClassName
(
'el-card__header'
).
length
;
i
++
){
document
.
getElementsByClassName
(
'el-card__header'
)[
i
].
style
.
backgroundImage
=
'url('
+
bg
.
value
+
')'
}
}
function
tabChange
(
index
)
{
if
(
index
==
0
)
{
return
}
proxy
.
$refs
[
tabList
[
index
].
template
][
0
].
loadData
()
}
function
handleRefresh
()
{
proxy
.
$refs
.
InTask
[
0
].
loadData
()
...
...
@@ -54,6 +80,7 @@ export default defineComponent({
tabPosition
,
tabList
,
log
,
bg
,
tabChange
,
handleRefresh
,
handleLogChange
...
...
src/views/RFID.vue
View file @
25ba7af2
...
...
@@ -4,11 +4,9 @@
<el-tab-pane
v-for=
"item in channelList"
:key=
"item"
:label=
"'通道' + item.stationId"
:name=
"item.stationId"
>
<el-card
style=
"height: calc(100vh - 227.75px)"
>
<template
#
header
>
<div
class=
"card-header"
>
<span>
实时出入库数据
</span>
<el-button
round
style=
"float: right;"
type=
"primary"
@
click=
"showChannelSetting"
>
通道配置
</el-button>
<el-button
round
style=
"float: right;margin-right: 10px;"
type=
"warning"
@
click=
"clearData"
>
清空数据
</el-button>
</div>
<span>
实时出入库数据
</span>
<el-button
round
style=
"float: right;"
type=
"primary"
@
click=
"showChannelSetting"
>
通道配置
</el-button>
<el-button
round
style=
"float: right;margin-right: 10px;"
type=
"warning"
@
click=
"clearData"
>
清空数据
</el-button>
</
template
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"18"
>
...
...
@@ -211,7 +209,7 @@
<
script
>
import
{
defineComponent
,
ref
,
reactive
,
toRefs
,
onBeforeUnmount
}
from
'vue'
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
,
ElCard
}
from
'element-plus'
import
{
postAction
,
getAction
}
from
'@/api/manage'
import
{
Help
,
Monitor
}
from
'@element-plus/icons-vue'
export
default
defineComponent
({
...
...
@@ -252,9 +250,13 @@ export default defineComponent({
});
// websocket开始
let
websock
=
null
function
initWebSocket
()
{
if
(
websock
)
{
return
}
websock
=
new
WebSocket
(
window
.
_CONFIG
[
'wsURL'
]
+
JSON
.
parse
(
sessionStorage
.
getItem
(
'storeInfo'
)).
storeCode
);
websock
.
onopen
=
websocketOnopen
;
websock
.
onerror
=
websocketOnerror
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论