Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
Apper-Admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d5fa64f6
authored
Jan 16, 2025
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
通信
1 parent
0930a536
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
3 deletions
src/utils/dict.ts
src/views/log/list/components/Report.vue
src/views/log/list/index.vue
src/utils/dict.ts
View file @
d5fa64f
...
...
@@ -43,7 +43,23 @@ export const cmdList = [
},
{
value
:
"removeRecord"
,
label
:
"删除记录"
label
:
"删除待上传记录"
},
{
value
:
"addRecord"
,
label
:
"添加待上传记录"
},
{
value
:
"addTempRecord"
,
label
:
"添加待提交记录"
},
{
value
:
"removeTempRecord"
,
label
:
"删除待提交记录"
},
{
value
:
"tempRecords"
,
label
:
"获取待提交记录"
},
{
value
:
"stopPolling"
,
...
...
@@ -153,5 +169,29 @@ export const formList = {
type
:
"input"
,
name
:
"id"
}
],
addTempRecord
:
[
{
label
:
"记录"
,
maxlength
:
6000
,
type
:
"textarea"
,
name
:
"data"
}
],
addRecord
:
[
{
label
:
"记录"
,
maxlength
:
6000
,
type
:
"textarea"
,
name
:
"data"
}
],
removeTempRecord
:
[
{
label
:
"日志id"
,
maxlength
:
50
,
type
:
"input"
,
name
:
"id"
}
]
};
src/views/log/list/components/Report.vue
View file @
d5fa64f
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-09-04 21:58:42
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 202
4-11-07 11:24:31
* @LastEditTime: 202
5-01-14 17:56:57
* @FilePath: \Apper-Admin-master\src\views\log\list\components\Report.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -38,6 +38,15 @@
v-if=
"item.type === 'input'"
clearable
></el-input>
<el-input
v-model=
"dialogProps[item.name]"
:maxlength=
"item.maxlength"
placeholder=
"请输入"
v-if=
"item.type === 'textarea'"
type=
"textarea"
:rows=
"10"
clearable
></el-input>
<el-input-number
v-model=
"dialogProps[item.name]"
v-if=
"item.type === 'number'"
:min=
"1"
/>
<el-date-picker
v-model=
"dialogProps[item.name]"
...
...
@@ -76,12 +85,14 @@ const rules = reactive({
days
:
[{
required
:
true
,
message
:
"请输入天数"
}],
id
:
[{
required
:
true
,
message
:
"请输入id"
}],
key
:
[{
required
:
true
,
message
:
"请选择缓存字段"
}],
times
:
[{
required
:
true
,
message
:
"请选择时间"
}]
times
:
[{
required
:
true
,
message
:
"请选择时间"
}],
data
:
[{
required
:
true
,
message
:
"请输入记录"
}]
});
interface
DialogProps
{
id
?:
string
;
days
?:
number
;
data
?:
string
;
interval
?:
number
;
command
:
string
;
key
?:
string
;
...
...
@@ -125,6 +136,10 @@ const handleSubmit = () => {
try
{
let
{
times
}
=
dialogProps
.
value
;
const
data
=
dialogProps
.
value
;
if
(
data
.
data
)
{
const
value
=
data
.
data
.
replace
(
/
\s
+/g
,
""
);
data
.
data
=
new
Function
(
"return "
+
value
)();
}
if
(
times
)
{
Object
.
assign
(
data
,
{
beginDate
:
times
[
0
],
endDate
:
times
[
1
]
});
}
...
...
src/views/log/list/index.vue
View file @
d5fa64f
...
...
@@ -4,6 +4,8 @@
<!-- 表格 header 按钮 -->
<template
#
tableHeader
>
<el-button
type=
"primary"
:icon=
"CirclePlus"
@
click=
"openDailog('新增设备')"
>
新增设备
</el-button>
<!--
<el-button
type=
"primary"
@
click=
"openDailog('新增设备')"
>
导入
</el-button>
<el-button
type=
"primary"
@
click=
"openDailog('新增设备')"
>
导出
</el-button>
-->
</
template
>
<!-- 表格操作 -->
<
template
#
operation=
"scope"
>
...
...
@@ -81,6 +83,14 @@ const columns = reactive<ColumnProps<Device.ResDeviceList>[]>([
label
:
"设备编号"
,
search
:
{
el
:
"input"
,
props
:
{
placeholder
:
"请输入设备编号"
,
maxlength
:
50
}
}
},
// {
// prop: "sn",
// label: "APP版本",
// search: { el: "input", props: { placeholder: "APP版本", maxlength: 50 } },
// render: () => {
// return "V2.0.0";
// }
// },
{
prop
:
"log_saved_days"
,
label
:
"日志存储时间"
,
...
...
@@ -109,6 +119,7 @@ const columns = reactive<ColumnProps<Device.ResDeviceList>[]>([
render
:
scope
=>
{
return
formatDate
(
scope
.
row
.
last_offline_time
);
}
// search: { el: "input" }
},
{
prop
:
"last_login_time"
,
...
...
@@ -116,6 +127,7 @@ const columns = reactive<ColumnProps<Device.ResDeviceList>[]>([
render
:
scope
=>
{
return
formatDate
(
scope
.
row
.
last_login_time
);
}
// search: { el: "input" }
},
{
prop
:
"status"
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment