Commit 84620446 authored by Administrator's avatar Administrator

设备分类

parent 0f854804
Pipeline #109 failed with stages
<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('此操作将永久删除该文件, 是否继续?', '提示', {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment