Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
laravelzh
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
冯超鹏
laravelzh
Commits
84620446
Commit
84620446
authored
Jul 31, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备分类
parent
0f854804
Pipeline
#109
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
categories.vue
resources/js/views/device/categories.vue
+12
-1
No files found.
resources/js/views/device/categories.vue
View file @
84620446
<
template
>
<div
class=
"app-container"
>
<div
class=
"filter-container"
>
<el-form
ref=
"query"
:model=
"deviceSearch"
style=
"display: inline-block;"
>
<el-input
v-model=
"categoryName"
placeholder=
"快速添加"
style=
"width: 200px;"
class=
"filter-item"
name=
"categoryAdd"
/>
<el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"handleClick()"
>
{{
$t
(
'table.add'
)
}}
</el-button>
</el-form>
</div>
<el-table
:data=
"deviceListType"
border
style=
"width: 33%"
>
<el-table-column
prop=
"date"
label=
"id"
width=
"100"
>
<template
slot-scope=
"scope"
>
...
...
@@ -13,7 +21,7 @@
</el-table-column>
<el-table-column
label=
"操作"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"info"
size=
"small"
@
click=
"handleClick()"
>
添加
</el-button>
<el-button
type=
"info"
size=
"small"
@
click=
"handleClick()"
>
修改
</el-button>
<el-button
type=
"danger"
size=
"small"
@
click=
"delteClassify(scope.row.tid)"
>
删除
</el-button>
</
template
>
</el-table-column>
...
...
@@ -27,6 +35,7 @@ export default {
data
()
{
return
{
deviceListType
:
[],
// 设备分类
categoryName
:
''
,
};
},
created
()
{
...
...
@@ -50,6 +59,7 @@ export default {
cancelButtonText
:
'取消'
,
inputPattern
:
/
\S
/
,
inputErrorMessage
:
'分类名称格式不正确'
,
inputValue
:
this
.
categoryName
,
}).
then
(({
value
})
=>
{
addClassify
(
value
)
.
then
(
response
=>
{
...
...
@@ -66,6 +76,7 @@ export default {
message
:
'取消输入'
,
});
});
this
.
categoryName
=
''
;
},
delteClassify
(
id
){
this
.
$confirm
(
'此操作将永久删除该文件, 是否继续?'
,
'提示'
,
{
...
...
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