Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NLT-e-cigarette
Project
Project
Details
Activity
Releases
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
张伯涛
NLT-e-cigarette
Commits
2aff4564
Commit
2aff4564
authored
May 27, 2022
by
秦嘉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备管理页面接口测试
parent
2f67ff98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
17 deletions
+62
-17
device.js
src/api/system/device.js
+11
-0
index.vue
src/views/system/device/index.vue
+51
-17
No files found.
src/api/system/device.js
0 → 100644
View file @
2aff4564
import
request
from
'@/utils/request'
// import Qs from 'qs'
// 查询设备列表
export
function
listDevice
(
query
)
{
return
request
({
url
:
'/nltdevice/queryNltDeviceByPagination'
,
method
:
'get'
,
params
:
query
})
}
src/views/system/device/index.vue
View file @
2aff4564
...
...
@@ -47,7 +47,7 @@
class=
"filter-item"
type=
"primary"
size=
"small"
@
click=
"
getDevTable
"
@
click=
"
handleQuery
"
>
查询 Query
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"resetQuery"
>
重置 Reset
</el-button>
</el-form-item>
...
...
@@ -71,7 +71,7 @@
>
<el-table-column
type=
"selection"
width=
"55"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
<el-table-column
align=
"center"
prop=
"device
Num
"
>
<el-table-column
align=
"center"
prop=
"device
Code
"
>
<template
slot=
"header"
>
<div>
设备编号
</div>
<div>
Equipment No
</div>
...
...
@@ -88,6 +88,9 @@
<div>
设备类型
</div>
<div>
Equipment Type
</div>
</
template
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
deviceType
===
0
?
'生产设备'
:
'扫描设备'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"createDate"
width=
"200"
>
<
template
slot=
"header"
>
...
...
@@ -98,7 +101,7 @@
<span>
{{
scope
.
row
.
createDate
|
transformDateByFormat
(
'YYYY-MM-DD HH:mm'
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"
operator
"
>
<el-table-column
align=
"center"
prop=
"
updateBy
"
>
<
template
slot=
"header"
>
<div>
操作人
</div>
</
template
>
...
...
@@ -141,6 +144,13 @@
</el-table-column>
</el-table>
</div>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.page"
:limit
.
sync=
"queryParams.rows"
@
pagination=
"getDevTable"
/>
<!-- 添加或修改设备信息对话框-->
<el-dialog
class=
"deviceDialog"
title=
"设备信息"
:visible
.
sync=
"open"
width=
"60%"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"120px"
>
...
...
@@ -213,6 +223,8 @@
</template>
<
script
>
import
{
listDevice
}
from
'@/api/system/device'
export
default
{
name
:
'Index'
,
data
()
{
...
...
@@ -221,25 +233,32 @@ export default {
showSearch
:
true
,
// 查询参数
queryParams
:
{
page
:
1
,
rows
:
10
,
deviceName
:
undefined
,
type
:
undefined
,
deviceType
:
'2'
,
deviceNum
:
undefined
},
// 查询数据字典
typeOptions
:
[],
// 显示弹出层标志
open
:
false
,
// 表格数据
deviceList
:
[
typeOptions
:
[
{
dictLabel
:
'生产设备'
,
dictValue
:
'0'
},
{
dictLabel
:
'扫描设备'
,
dictValue
:
'1'
},
{
deviceNum
:
'1111'
,
deviceName
:
'test'
,
deviceType
:
''
,
createDate
:
new
Date
(),
operator
:
'张三'
,
flag
:
'1'
dictLabel
:
'全部'
,
dictValue
:
'2'
}
],
// 显示弹出层标志
open
:
false
,
// 表格数据
deviceList
:
[],
total
:
0
,
// 加载遮罩
Loading
:
false
,
// 表单参数
...
...
@@ -258,10 +277,25 @@ export default {
}
}
},
created
()
{
this
.
getDevTable
()
},
methods
:
{
/** 查询设备表方法 **/
getDevTable
()
{},
// 重置方法
getDevTable
()
{
this
.
loading
=
true
listDevice
(
this
.
queryParams
).
then
(
response
=>
{
this
.
deviceList
=
response
.
rows
this
.
total
=
response
.
total
this
.
loading
=
false
})
},
/** 查询按钮方法 **/
handleQuery
()
{
this
.
queryParams
.
page
=
1
this
.
getDevTable
()
},
/** 重置方法 **/
resetQuery
()
{
this
.
queryParams
.
deviceName
=
undefined
this
.
queryParams
.
type
=
undefined
...
...
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