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
ff44eebe
Commit
ff44eebe
authored
Aug 25, 2025
by
huangqy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
227b5d6c
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
82 行增加
和
25 行删除
+82
-25
index.html
index.html
+1
-1
base.css
src/assets/base.css
+0
-2
index.js
src/router/index.js
+2
-2
request.js
src/utils/request.js
+24
-1
ChannelSetting.vue
src/views/ChannelSetting.vue
+11
-11
InTask.vue
src/views/InTask.vue
+16
-1
NoOrder.vue
src/views/NoOrder.vue
+13
-3
Query.vue
src/views/Query.vue
+14
-3
vite.config.js
vite.config.js
+1
-1
yarn.lock
yarn.lock
+0
-0
没有找到文件。
index.html
View file @
ff44eebe
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<script>
<script>
window
.
_CONFIG
=
{};
window
.
_CONFIG
=
{};
window
.
_CONFIG
[
'publicURL'
]
=
'http://192.168.3.130:10030'
;
window
.
_CONFIG
[
'publicURL'
]
=
'http://192.168.3.130:10030'
;
window
.
_CONFIG
[
'serverURL'
]
=
'http://192.168.3.130:100
29
'
;
window
.
_CONFIG
[
'serverURL'
]
=
'http://192.168.3.130:100
30
'
;
window
.
_CONFIG
[
'wsURL'
]
=
'ws://192.168.3.130:10030/notice/'
window
.
_CONFIG
[
'wsURL'
]
=
'ws://192.168.3.130:10030/notice/'
</script>
</script>
<body>
<body>
...
...
src/assets/base.css
View file @
ff44eebe
...
@@ -136,4 +136,3 @@ body {
...
@@ -136,4 +136,3 @@ body {
.el-collapse-item__wrap
{
.el-collapse-item__wrap
{
border
:
none
;
border
:
none
;
}
}
\ No newline at end of file
src/router/index.js
View file @
ff44eebe
import
{
createRouter
,
createWebHistory
}
from
'vue-router'
import
{
createRouter
,
createWebHistory
,
createWebHashHistory
}
from
'vue-router'
import
HomeView
from
'../views/HomeView.vue'
import
HomeView
from
'../views/HomeView.vue'
const
router
=
createRouter
({
const
router
=
createRouter
({
history
:
createWebHistory
(
import
.
meta
.
env
.
BASE_URL
),
history
:
createWebH
ashH
istory
(
import
.
meta
.
env
.
BASE_URL
),
routes
:
[
routes
:
[
{
{
path
:
''
,
path
:
''
,
...
...
src/utils/request.js
View file @
ff44eebe
import
axios
from
'axios'
import
axios
from
'axios'
import
{
VueAxios
}
from
'./axios'
import
{
VueAxios
}
from
'./axios'
import
{
ElMessage
}
from
'element-plus'
let
apiBaseUrl
=
window
.
_CONFIG
[
'publicURL'
]
let
apiBaseUrl
=
window
.
_CONFIG
[
'publicURL'
]
...
@@ -10,6 +11,28 @@ const request = axios.create({
...
@@ -10,6 +11,28 @@ const request = axios.create({
timeout
:
10000
// 请求超时时间
timeout
:
10000
// 请求超时时间
})
})
const
err
=
error
=>
{
if
(
error
.
response
)
{
let
data
=
error
.
response
.
data
console
.
log
(
'------异常响应------'
,
error
.
response
.
status
,
data
)
switch
(
error
.
response
.
status
)
{
case
403
:
ElMessage
.
error
(
'拒绝访问'
)
break
case
500
:
ElMessage
.
error
(
data
.
message
);
break
case
404
:
ElMessage
.
error
(
'很抱歉,资源未找到!'
)
break
default
:
ElMessage
.
error
(
data
.
message
)
break
}
}
return
Promise
.
reject
(
error
)
}
request
.
interceptors
.
request
.
use
(
config
=>
{
request
.
interceptors
.
request
.
use
(
config
=>
{
// 给请求头添加一个名为Authorization的密匙
// 给请求头添加一个名为Authorization的密匙
if
(
sessionStorage
.
getItem
(
'token'
))
{
if
(
sessionStorage
.
getItem
(
'token'
))
{
...
@@ -24,7 +47,7 @@ request.interceptors.request.use(config => {
...
@@ -24,7 +47,7 @@ request.interceptors.request.use(config => {
request
.
interceptors
.
response
.
use
((
response
)
=>
{
request
.
interceptors
.
response
.
use
((
response
)
=>
{
return
response
.
data
return
response
.
data
})
}
,
err
)
const
installer
=
{
const
installer
=
{
vm
:
{},
vm
:
{},
...
...
src/views/ChannelSetting.vue
View file @
ff44eebe
...
@@ -90,9 +90,9 @@
...
@@ -90,9 +90,9 @@
</el-form-item>
</el-form-item>
</el-tooltip>
</el-tooltip>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"resetConfig
"
>
读取
</el-button>
<el-button
@
click=
"resetConfig"
:color=
"imgColor
"
>
读取
</el-button>
<el-button
type=
"primary"
@
click=
"saveConfig"
v-if=
"sysForm.id
"
>
保存
</el-button>
<el-button
@
click=
"saveConfig"
v-if=
"sysForm.id"
:color=
"imgColor
"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"syncGoods
"
>
同步物资
</el-button>
<el-button
@
click=
"syncGoods"
:color=
"imgColor
"
>
同步物资
</el-button>
<el-dropdown
@
command=
"handleCommand"
>
<el-dropdown
@
command=
"handleCommand"
>
<span
:style=
"{ cursor: 'pointer', marginLeft: '12px', background: imgColor, borderRadius: '4px' }"
>
<span
:style=
"{ cursor: 'pointer', marginLeft: '12px', background: imgColor, borderRadius: '4px' }"
>
<img
src=
"../assets/icons/主题.png"
style=
"width: 32px;"
>
<img
src=
"../assets/icons/主题.png"
style=
"width: 32px;"
>
...
@@ -109,7 +109,7 @@
...
@@ -109,7 +109,7 @@
</el-form>
</el-form>
<el-divider><span
style=
"font-size: 20px;"
>
库房/ip配置
</span></el-divider>
<el-divider><span
style=
"font-size: 20px;"
>
库房/ip配置
</span></el-divider>
<div
class=
"head-container"
>
<div
class=
"head-container"
>
<el-button
class=
"filter-item"
type=
"primary"
style=
"float: right"
@
click=
"addConfig
"
>
新增
</el-button>
<el-button
class=
"filter-item"
style=
"float: right"
@
click=
"addConfig"
:color=
"imgColor
"
>
新增
</el-button>
</div>
</div>
<el-table
:header-cell-style=
"{backgroundColor: '#f5f7fa',color: '#000',fontSize: '18px',fontWeight: '600'}"
:data=
"configList"
border
style=
"width: 100%;"
>
<el-table
:header-cell-style=
"{backgroundColor: '#f5f7fa',color: '#000',fontSize: '18px',fontWeight: '600'}"
:data=
"configList"
border
style=
"width: 100%;"
>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"70"
/>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"70"
/>
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
<el-table-column
prop=
"masterIp"
label=
"物理主机IP"
align=
"center"
/>
<el-table-column
prop=
"masterIp"
label=
"物理主机IP"
align=
"center"
/>
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"editConfig(scope.row)
"
>
编辑
</el-button>
<el-button
size=
"small"
@
click=
"editConfig(scope.row)"
:color=
"imgColor
"
>
编辑
</el-button>
<el-popconfirm
title=
"你确定删除吗?"
@
confirm=
"removeConfig(scope.row)"
>
<el-popconfirm
title=
"你确定删除吗?"
@
confirm=
"removeConfig(scope.row)"
>
<template
#
reference
>
<template
#
reference
>
<el-button
type=
"danger"
size=
"small"
>
删除
</el-button>
<el-button
type=
"danger"
size=
"small"
>
删除
</el-button>
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
</
template
>
</
template
>
<el-card
style=
"height: calc(100vh - 227.75px)"
>
<el-card
style=
"height: calc(100vh - 227.75px)"
>
<div
class=
"head-container"
>
<div
class=
"head-container"
>
<el-button
class=
"filter-item"
type=
"primary"
style=
"float: right"
@
click=
"add
"
>
新增
</el-button>
<el-button
class=
"filter-item"
style=
"float: right"
@
click=
"add"
:color=
"imgColor
"
>
新增
</el-button>
</div>
</div>
<el-table
:header-cell-style=
"{backgroundColor: '#f5f7fa',color: '#000',fontSize: '18px',fontWeight: '600'}"
:data=
"channelList"
border
style=
"width: 100%;"
>
<el-table
:header-cell-style=
"{backgroundColor: '#f5f7fa',color: '#000',fontSize: '18px',fontWeight: '600'}"
:data=
"channelList"
border
style=
"width: 100%;"
>
<el-table-column
prop=
"stationId"
label=
"通道号"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"stationId"
label=
"通道号"
align=
"center"
width=
"100"
/>
...
@@ -174,7 +174,7 @@
...
@@ -174,7 +174,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
type=
"primary
"
size=
"small"
@
click=
"edit(scope.row)"
>
编辑
</el-button>
<el-button
:color=
"imgColor
"
size=
"small"
@
click=
"edit(scope.row)"
>
编辑
</el-button>
<el-popconfirm
title=
"你确定删除吗?"
@
confirm=
"removeDevice(scope.row)"
>
<el-popconfirm
title=
"你确定删除吗?"
@
confirm=
"removeDevice(scope.row)"
>
<template
#
reference
>
<template
#
reference
>
<el-button
type=
"danger"
size=
"small"
>
删除
</el-button>
<el-button
type=
"danger"
size=
"small"
>
删除
</el-button>
...
@@ -194,7 +194,7 @@
...
@@ -194,7 +194,7 @@
<el-select
v-model=
"form.stationId"
@
change=
"getLedConfigList"
style=
"width: 200px"
>
<el-select
v-model=
"form.stationId"
@
change=
"getLedConfigList"
style=
"width: 200px"
>
<el-option
:label=
"'通道' + item.stationId"
:value=
"item.stationId"
v-for=
"item in channelList"
:key=
"item.stationId"
></el-option>
<el-option
:label=
"'通道' + item.stationId"
:value=
"item.stationId"
v-for=
"item in channelList"
:key=
"item.stationId"
></el-option>
</el-select>
</el-select>
<el-button
class=
"filter-item"
type=
"primary
"
style=
"float: right"
@
click=
"addLedConfig"
>
新增
</el-button>
<el-button
class=
"filter-item"
:color=
"imgColor
"
style=
"float: right"
@
click=
"addLedConfig"
>
新增
</el-button>
</div>
</div>
<el-table
:header-cell-style=
"{backgroundColor: '#f5f7fa',color: '#000',fontSize: '18px',fontWeight: '600'}"
:data=
"ledConfigList"
border
style=
"width: 100%;"
>
<el-table
:header-cell-style=
"{backgroundColor: '#f5f7fa',color: '#000',fontSize: '18px',fontWeight: '600'}"
:data=
"ledConfigList"
border
style=
"width: 100%;"
>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"70"
/>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"70"
/>
...
@@ -210,7 +210,7 @@
...
@@ -210,7 +210,7 @@
<el-table-column
prop=
"fontname"
label=
"字体名称"
align=
"center"
/>
<el-table-column
prop=
"fontname"
label=
"字体名称"
align=
"center"
/>
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
type=
"primary
"
size=
"small"
@
click=
"editLedConfig(scope.row)"
>
编辑
</el-button>
<el-button
:color=
"imgColor
"
size=
"small"
@
click=
"editLedConfig(scope.row)"
>
编辑
</el-button>
<el-popconfirm
title=
"你确定删除吗?"
@
confirm=
"removeLed(scope.row)"
>
<el-popconfirm
title=
"你确定删除吗?"
@
confirm=
"removeLed(scope.row)"
>
<template
#
reference
>
<template
#
reference
>
<el-button
type=
"danger"
size=
"small"
>
删除
</el-button>
<el-button
type=
"danger"
size=
"small"
>
删除
</el-button>
...
@@ -227,7 +227,7 @@
...
@@ -227,7 +227,7 @@
</
template
>
</
template
>
<el-card
style=
"height: calc(100vh - 227.75px)"
>
<el-card
style=
"height: calc(100vh - 227.75px)"
>
<div
class=
"head-container"
>
<div
class=
"head-container"
>
<el-button
class=
"filter-item"
type=
"primary
"
style=
"float: right"
@
click=
"addGpioConfig"
>
新增
</el-button>
<el-button
class=
"filter-item"
:color=
"imgColor
"
style=
"float: right"
@
click=
"addGpioConfig"
>
新增
</el-button>
</div>
</div>
<el-table
:header-cell-style=
"{backgroundColor: '#f5f7fa',color: '#000',fontSize: '18px',fontWeight: '600'}"
:data=
"gpioConfigList"
border
style=
"width: 100%;"
>
<el-table
:header-cell-style=
"{backgroundColor: '#f5f7fa',color: '#000',fontSize: '18px',fontWeight: '600'}"
:data=
"gpioConfigList"
border
style=
"width: 100%;"
>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"100"
/>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"100"
/>
...
@@ -258,7 +258,7 @@
...
@@ -258,7 +258,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<el-table-column
label=
"操作"
width=
"200"
align=
"center"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
type=
"primary
"
size=
"small"
@
click=
"editGpioConfig(scope.row)"
>
编辑
</el-button>
<el-button
:color=
"imgColor
"
size=
"small"
@
click=
"editGpioConfig(scope.row)"
>
编辑
</el-button>
<el-popconfirm
title=
"你确定删除吗?"
@
confirm=
"removeGpioConfig(scope.row)"
>
<el-popconfirm
title=
"你确定删除吗?"
@
confirm=
"removeGpioConfig(scope.row)"
>
<template
#
reference
>
<template
#
reference
>
<el-button
type=
"danger"
size=
"small"
>
删除
</el-button>
<el-button
type=
"danger"
size=
"small"
>
删除
</el-button>
...
...
src/views/InTask.vue
View file @
ff44eebe
...
@@ -5,9 +5,11 @@
...
@@ -5,9 +5,11 @@
<template
#
header
>
<template
#
header
>
<div
class=
"card-header"
>
<div
class=
"card-header"
>
<span>
计划任务
</span>
<span>
计划任务
</span>
<div>
<el-button
class=
"button"
type=
"warning"
@
click=
"syncInBill"
:loading=
"loading"
>
入库单接收
</el-button>
<el-button
class=
"button"
type=
"warning"
@
click=
"syncInBill"
:loading=
"loading"
>
入库单接收
</el-button>
<el-button
class=
"button"
type=
"warning"
@
click=
"exportData"
icon=
"download"
>
导出单据
</el-button>
<el-button
class=
"button"
type=
"warning"
@
click=
"exportData"
icon=
"download"
>
导出单据
</el-button>
</div>
</div>
</div>
</
template
>
</
template
>
<el-table
:header-cell-style=
"{backgroundColor: '#f5f7fa',color: '#000',fontSize: '18px',fontWeight: '550'}"
<el-table
:header-cell-style=
"{backgroundColor: '#f5f7fa',color: '#000',fontSize: '18px',fontWeight: '550'}"
:data=
"billList"
ref=
"billRef"
border
style=
"width: 100%;height: 27vh;"
highlight-current-row
@
row-click=
"billClick"
>
:data=
"billList"
ref=
"billRef"
border
style=
"width: 100%;height: 27vh;"
highlight-current-row
@
row-click=
"billClick"
>
...
@@ -83,7 +85,7 @@
...
@@ -83,7 +85,7 @@
<el-table-column
prop=
"modelName"
label=
"号型名称"
align=
"center"
show-overflow-tooltip
/>
<el-table-column
prop=
"modelName"
label=
"号型名称"
align=
"center"
show-overflow-tooltip
/>
<el-table-column
prop=
"planAmount"
label=
"计划数量"
align=
"center"
/>
<el-table-column
prop=
"planAmount"
label=
"计划数量"
align=
"center"
/>
<el-table-column
prop=
"realAmount"
label=
"实际数量"
align=
"center"
/>
<el-table-column
prop=
"realAmount"
label=
"实际数量"
align=
"center"
/>
<el-table-column
prop=
"writeAmount"
label=
"手动修改数量"
align=
"center"
show-overflow-tooltip
width=
"1
5
0"
>
<el-table-column
prop=
"writeAmount"
label=
"手动修改数量"
align=
"center"
show-overflow-tooltip
width=
"1
6
0"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<div
class=
"editable-cell"
>
<div
class=
"editable-cell"
>
<div
v-if=
"editable && itemForm.modelCode == scope.row.modelCode"
class=
"editable-cell-input-wrapper"
>
<div
v-if=
"editable && itemForm.modelCode == scope.row.modelCode"
class=
"editable-cell-input-wrapper"
>
...
@@ -107,6 +109,19 @@
...
@@ -107,6 +109,19 @@
/>
/>
</el-card>
</el-card>
</el-col>
</el-col>
<div
style=
"position: absolute; bottom: 90px; right: 40px; display: flex"
>
<el-input
type=
"text"
id=
"tmScan"
class=
"ant-input"
placeholder=
"请扫描条码"
style=
"margin-right: 20px; width: 300px"
v-model=
"scanText"
@
keydown=
"parseTm"
/>
<el-button
type=
"primary"
ghost
@
click=
"openTmScan"
style=
"width: 100px"
class=
"mgr15"
>
条码扫描
</el-button>
</div>
</el-row>
</el-row>
</template>
</template>
...
...
src/views/NoOrder.vue
View file @
ff44eebe
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
<el-card
style=
"height: calc(100vh - 147px)"
>
<el-card
style=
"height: calc(100vh - 147px)"
>
<template
#
header
>
<template
#
header
>
<div
style=
"display: flex;"
>
<div
style=
"display: flex;"
>
<el-select
v-model=
"positionCode"
placeholder=
"请选择垛位"
filterable
size=
"large"
class=
"titleSelect"
>
<el-select
v-model=
"positionCode"
placeholder=
"请选择垛位"
filterable
size=
"large"
class=
"titleSelect"
style=
"width: 280px;margin-right: 15px;"
>
<el-option
:label=
"'垛位号: ' + item.positionName"
:value=
"item.positionCode"
v-for=
"item in positionList"
:key=
"item.positionCode"
></el-option>
<el-option
:label=
"'垛位号: ' + item.positionName"
:value=
"item.positionCode"
v-for=
"item in positionList"
:key=
"item.positionCode"
></el-option>
</el-select>
</el-select>
<el-select
v-model=
"temporaryName"
placeholder=
"请选择单据"
filterable
size=
"large"
class=
"titleSelect"
clearable
@
focus=
"getTemporaryName"
>
<el-select
v-model=
"temporaryName"
placeholder=
"请选择单据"
filterable
size=
"large"
class=
"titleSelect"
clearable
@
focus=
"getTemporaryName"
style=
"width: 280px;"
>
<el-option
:label=
"'单据号: ' + item"
:value=
"item"
v-for=
"item in temporaryList"
:key=
"item"
></el-option>
<el-option
:label=
"'单据号: ' + item"
:value=
"item"
v-for=
"item in temporaryList"
:key=
"item"
></el-option>
</el-select>
</el-select>
<el-radio-group
v-model=
"type"
size=
"large"
@
change=
"changeType"
style=
"margin-left: auto;margin-right: 15px;"
>
<el-radio-group
v-model=
"type"
size=
"large"
@
change=
"changeType"
style=
"margin-left: auto;margin-right: 15px;"
>
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
defineComponent
,
ref
,
reactive
,
toRefs
,
onBeforeUnmount
}
from
'vue'
import
{
defineComponent
,
ref
,
reactive
,
toRefs
,
onBeforeUnmount
,
onMounted
}
from
'vue'
import
{
ElMessage
,
ElCard
}
from
'element-plus'
import
{
ElMessage
,
ElCard
}
from
'element-plus'
import
{
postAction
,
getAction
}
from
'@/api/manage'
import
{
postAction
,
getAction
}
from
'@/api/manage'
import
{
Help
,
Monitor
}
from
'@element-plus/icons-vue'
import
{
Help
,
Monitor
}
from
'@element-plus/icons-vue'
...
@@ -75,6 +75,7 @@ export default defineComponent({
...
@@ -75,6 +75,7 @@ export default defineComponent({
const
pageNo
=
ref
(
1
)
const
pageNo
=
ref
(
1
)
const
pageSize
=
ref
(
10
)
const
pageSize
=
ref
(
10
)
const
total
=
ref
(
0
)
const
total
=
ref
(
0
)
const
imgColor
=
ref
()
const
state
=
reactive
({
const
state
=
reactive
({
...
@@ -105,6 +106,14 @@ export default defineComponent({
...
@@ -105,6 +106,14 @@ export default defineComponent({
console
.
log
(
'A 组件,切换到 B 组件,A 组件消失时执行'
)
console
.
log
(
'A 组件,切换到 B 组件,A 组件消失时执行'
)
})
})
onMounted
(()
=>
{
if
(
sessionStorage
.
getItem
(
'bgColor'
))
{
imgColor
.
value
=
sessionStorage
.
getItem
(
'bgColor'
)
}
else
{
sessionStorage
.
setItem
(
'bgColor'
,
'#1f8a36'
)
}
});
const
getTableData
=
()
=>
{
const
getTableData
=
()
=>
{
console
.
log
(
'刷新无单据数据'
)
console
.
log
(
'刷新无单据数据'
)
pageNo
.
value
=
1
pageNo
.
value
=
1
...
@@ -228,6 +237,7 @@ export default defineComponent({
...
@@ -228,6 +237,7 @@ export default defineComponent({
pageNo
,
pageNo
,
pageSize
,
pageSize
,
total
,
total
,
imgColor
,
handleCurrentChange
handleCurrentChange
}
}
},
},
...
...
src/views/Query.vue
View file @
ff44eebe
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<el-row>
<el-row>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-card
style=
"height: calc(100vh - 147px);"
>
<el-card
style=
"height: calc(100vh - 147px);"
>
<el-radio-group
v-model=
"logType"
label=
"日志类型"
@
change=
"changeType"
>
<el-radio-group
v-model=
"logType"
label=
"日志类型"
@
change=
"changeType"
:fill=
"imgColor"
>
<el-radio-button
value=
"normal"
label=
"出入日志"
></el-radio-button>
<el-radio-button
value=
"normal"
label=
"出入日志"
></el-radio-button>
<el-radio-button
value=
"error"
label=
"异常日志"
></el-radio-button>
<el-radio-button
value=
"error"
label=
"异常日志"
></el-radio-button>
</el-radio-group>
</el-radio-group>
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<el-form-item
label=
"号型"
>
<el-form-item
label=
"号型"
>
<el-input
v-model=
"searchData.modelName"
placeholder=
"请输入号型"
/>
<el-input
v-model=
"searchData.modelName"
placeholder=
"请输入号型"
/>
</el-form-item>
</el-form-item>
<el-button
round
style=
"width: 100%"
@
click=
"loadData"
color=
"
"
>
查询
</el-button>
<el-button
round
style=
"width: 100%"
@
click=
"loadData"
:color=
"imgColor
"
>
查询
</el-button>
</el-form>
</el-form>
</el-card>
</el-card>
</el-col>
</el-col>
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
<
script
>
<
script
>
import
{
defineComponent
,
ref
,
reactive
,
toRefs
,
getCurrentInstance
}
from
'vue'
import
{
defineComponent
,
ref
,
reactive
,
toRefs
,
getCurrentInstance
,
onMounted
}
from
'vue'
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
}
from
'element-plus'
import
{
postAction
}
from
'@/api/manage'
import
{
postAction
}
from
'@/api/manage'
export
default
defineComponent
({
export
default
defineComponent
({
...
@@ -117,6 +117,7 @@ export default defineComponent({
...
@@ -117,6 +117,7 @@ export default defineComponent({
endTime
:
parseTime
(
new
Date
())
endTime
:
parseTime
(
new
Date
())
})
})
const
total
=
ref
(
0
)
const
total
=
ref
(
0
)
const
imgColor
=
ref
()
function
parseTime
(
time
)
{
function
parseTime
(
time
)
{
if
(
time
)
{
if
(
time
)
{
...
@@ -151,6 +152,15 @@ export default defineComponent({
...
@@ -151,6 +152,15 @@ export default defineComponent({
}
}
onMounted
(()
=>
{
if
(
sessionStorage
.
getItem
(
'bgColor'
))
{
imgColor
.
value
=
sessionStorage
.
getItem
(
'bgColor'
)
}
else
{
sessionStorage
.
setItem
(
'bgColor'
,
'#1f8a36'
)
}
});
const
loadData
=
()
=>
{
const
loadData
=
()
=>
{
searchData
.
value
.
startTime
=
parseTime
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
)))
searchData
.
value
.
startTime
=
parseTime
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
)))
searchData
.
value
.
endTime
=
parseTime
(
new
Date
())
searchData
.
value
.
endTime
=
parseTime
(
new
Date
())
...
@@ -189,6 +199,7 @@ export default defineComponent({
...
@@ -189,6 +199,7 @@ export default defineComponent({
formData
,
formData
,
searchData
,
searchData
,
total
,
total
,
imgColor
,
loadData
,
loadData
,
handleCurrentChange
,
handleCurrentChange
,
changeType
,
changeType
,
...
...
vite.config.js
View file @
ff44eebe
...
@@ -9,7 +9,7 @@ import legacy from '@vitejs/plugin-legacy'
...
@@ -9,7 +9,7 @@ import legacy from '@vitejs/plugin-legacy'
// https://vitejs.dev/config/
// https://vitejs.dev/config/
export
default
defineConfig
({
export
default
defineConfig
({
base
:
'/'
,
// 开发或生产环境服务的公共基础路径 配置引入相对路径
base
:
'
.
/'
,
// 开发或生产环境服务的公共基础路径 配置引入相对路径
server
:
{
server
:
{
// 是否自动打开浏览器
// 是否自动打开浏览器
open
:
true
,
open
:
true
,
...
...
yarn.lock
View file @
ff44eebe
This source diff could not be displayed because it is too large. You can
view the blob
instead.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论