| | |
| | | <template> |
| | | <TableLayout :permissions="['business:category:query']"> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="名称" prop="name"> |
| | | <el-input v-model="searchForm.name" clearable placeholder="请输入名称" @keypress.enter.native="search"></el-input> |
| | | <el-form-item label="类型名称" prop="name"> |
| | | <el-input v-model="searchForm.name" clearable placeholder="请输入类型名称" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-select v-model="searchForm.status" clearable placeholder="请选择状态" @change="search"> |
| | | <el-option label="正常" :value="0"></el-option> |
| | | <el-option label="停用" :value="1"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | |
| | | > |
| | | <el-table-column prop="id" label="ID" min-width="80px"></el-table-column> |
| | | <el-table-column prop="name" label="类型名称" min-width="120px"></el-table-column> |
| | | <el-table-column prop="detail" label="通行方式" min-width="200px"> |
| | | <el-table-column prop="detail" label="通行方式" min-width="120px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.otherField === 'driving' ? '机动车' : '非机动车' }} |
| | | {{ row.detail === 'driving' ? '机动车' : '非机动车' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="otherField" label="上传驾驶证" min-width="120px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.otherField == 1 ? '需要' : '不需要' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="sortnum" label="分类排序" min-width="100px"></el-table-column> |
| | |
| | | <el-table-column label="操作" min-width="150" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="handleEdit(row)">编辑</el-button> |
| | | <el-button type="text" @click="deleteById(row.id)">删除</el-button> |
| | | <el-button style="color: red;" type="text" @click="deleteById(row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | return { |
| | | searchForm: { |
| | | name: '', |
| | | status:'', |
| | | type: 1 |
| | | } |
| | | } |