| | |
| | | <!-- |
| | | * @Date: 2024-04-09 22:18:47 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-11 21:36:58 |
| | | * @LastEditTime: 2024-04-13 22:11:04 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/system/component-classification.vue |
| | | * 分类维护 |
| | | --> |
| | | <template> |
| | | <el-main> |
| | | <el-card shadow="never"> |
| | | <el-container> |
| | | <el-header style="justify-content: flex-start;"> |
| | | <el-button type="primary" plain @click="add">新增</el-button> |
| | |
| | | </el-header> |
| | | <el-main> |
| | | <el-table @selection-change="handleSelectionChange" :data="tableData" |
| | | style="width: 100%;margin-bottom: 20px;" row-key="id" border :tree-props="{ hasChildren: 'has' }"> |
| | | style="width: 100%;margin-bottom: 20px;" row-key="id" border |
| | | :tree-props="{ hasChildren: 'has' }"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column prop="name" label="分类名称" /> |
| | | <el-table-column prop="parentId" label="上级分类" /> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="上级分类" prop="parentId"> |
| | | <el-select v-model="row.parentId" filterable placeholder="请选择上级分类" style="width: 240px"> |
| | | <el-select v-model="row.parentId" filterable placeholder="请选择上级分类" |
| | | style="width: 240px"> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" |
| | | :value="item.value" /> |
| | | </el-select> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-radio-group style="width: 240px" v-model="row.status"> |
| | | <el-radio v-for="item in statusList" :label="item.value" :key="item.value">{{ item.label |
| | | <el-radio v-for="item in statusList" :label="item.value" :key="item.value">{{ |
| | | item.label |
| | | }}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | |
| | | </el-dialog> |
| | | <el-dialog v-model="showIconDialog" title="分类图标" width="750"> |
| | | <div class="icons"> |
| | | <component @click="setIcon(item)" class="icon" v-for="item in icons" :is='item' :key="item"></component> |
| | | <component @click="setIcon(item)" class="icon" v-for="item in icons" :is='item' :key="item"> |
| | | </component> |
| | | </div> |
| | | |
| | | </el-dialog> |
| | | </el-container> |
| | | </el-card> |
| | | </el-main> |
| | | </template> |
| | | |
| | | <script> |