|
@@ -14,7 +14,8 @@
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button type="primary" icon="el-icon-search" @click="getList">搜索</el-button>
|
|
<el-button type="primary" icon="el-icon-search" @click="getList">搜索</el-button>
|
|
<el-button icon="el-icon-refresh" @click="getRefresh">重置</el-button>
|
|
<el-button icon="el-icon-refresh" @click="getRefresh">重置</el-button>
|
|
- <el-button type="primary" plain icon="el-icon-plus" @click="getDialog('新增')" v-hasPermi="['operation:tag:add']">新增</el-button>
|
|
|
|
|
|
+ <el-button type="primary" plain icon="el-icon-plus" @click="getDialog('新增')"
|
|
|
|
+ v-hasPermi="['operation:tag:add']">新增</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
@@ -39,23 +40,30 @@
|
|
<el-table-column label="操作" align="center">
|
|
<el-table-column label="操作" align="center">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button type="text" @click="getDialog('查看', scope.row, true)">查看</el-button>
|
|
<el-button type="text" @click="getDialog('查看', scope.row, true)">查看</el-button>
|
|
- <el-button type="text" v-if="scope.row.status === 0" @click="getChange(scope.row, 1)" v-hasPermi="['operation:tag:down']">禁用</el-button>
|
|
|
|
|
|
+ <el-button type="text" v-if="scope.row.status === 0" @click="getChange(scope.row, 1)"
|
|
|
|
+ v-hasPermi="['operation:tag:down']">禁用</el-button>
|
|
<span v-else>
|
|
<span v-else>
|
|
- <el-button type="text" @click="getDialog('编辑', scope.row)" style="margin-left: 10px" v-hasPermi="['operation:tag:edit']">
|
|
|
|
|
|
+ <el-button type="text" @click="getDialog('编辑', scope.row)" style="margin-left: 10px"
|
|
|
|
+ v-hasPermi="['operation:tag:edit']">
|
|
编辑
|
|
编辑
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button v-if="scope.row.level !== 3" type="text" @click="getDialog('新增', scope.row)" v-hasPermi="['operation:tag:add']">
|
|
|
|
|
|
+ <el-button v-if="scope.row.level !== 3" type="text" @click="getDialog('新增', scope.row)"
|
|
|
|
+ v-hasPermi="['operation:tag:add']">
|
|
新增
|
|
新增
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button type="text" @click="getChange(scope.row, 0)" v-hasPermi="['operation:tag:up']">启用</el-button>
|
|
|
|
- <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['operation:tag:delete']">删除</el-button>
|
|
|
|
|
|
+ <el-button type="text" @click="getChange(scope.row, 0)" v-hasPermi="['operation:tag:up']">
|
|
|
|
+ 启用
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button type="delete" @click="getDelete(scope.row)" v-hasPermi="['operation:tag:delete']">
|
|
|
|
+ 删除
|
|
|
|
+ </el-button>
|
|
</span>
|
|
</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<!-- 弹窗 -->
|
|
<!-- 弹窗 -->
|
|
<el-dialog :visible.sync="dialogVisible" :title="title" width="500px" :before-close="cancel">
|
|
<el-dialog :visible.sync="dialogVisible" :title="title" width="500px" :before-close="cancel">
|
|
- <el-form :model="dialogForm" ref="dialogForm" label-width="auto"
|
|
|
|
|
|
+ <el-form :model="dialogForm" ref="dialogForm" :rules="rules" label-width="auto"
|
|
:disabled="title === '查看' ? true : false">
|
|
:disabled="title === '查看' ? true : false">
|
|
<el-form-item label="标签名称:" prop="name">
|
|
<el-form-item label="标签名称:" prop="name">
|
|
<el-input v-model="dialogForm.name" placeholder="请输入标签名称" maxlength="100" show-word-limit />
|
|
<el-input v-model="dialogForm.name" placeholder="请输入标签名称" maxlength="100" show-word-limit />
|
|
@@ -95,7 +103,13 @@ export default {
|
|
// 当前层级
|
|
// 当前层级
|
|
level: 0,
|
|
level: 0,
|
|
// 弹窗表单
|
|
// 弹窗表单
|
|
- dialogForm: {}
|
|
|
|
|
|
+ dialogForm: {},
|
|
|
|
+ // 校验
|
|
|
|
+ rules: {
|
|
|
|
+ sort: [{
|
|
|
|
+ required: true, message: '请选择标签排序', trigger: 'change'
|
|
|
|
+ }]
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|