| | |
| | | <!-- |
| | | * @Date: 2024-04-09 22:18:47 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-04-10 20:40:09 |
| | | * @LastEditTime: 2024-04-10 20:41:19 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/console/system/component-classification.vue |
| | | * 分类维护 |
| | | --> |
| | |
| | | <el-button @click="del" plain type="danger" :disabled="selection.length == 0">删除</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' }"> |
| | | <el-table @selection-change="handleSelectionChange" :data="tableData" |
| | | 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-table-column prop="icon" label="分类图标"> |
| | | <template #default="scope"> |
| | | <component v-if="icons.includes(scope.row.icon)" style="width: 20px;height: 20px;" :is='scope.row.icon'></component> |
| | | <component v-if="icons.includes(scope.row.icon)" style="width: 20px;height: 20px;" |
| | | :is='scope.row.icon'></component> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="type" label="分类编号" /> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="分类图标" prop="icon"> |
| | | <el-input @click="showIconDialog = true" style="width: 240px" v-model="row.icon" placeholder="请选择分类图标" |
| | | clearable></el-input> |
| | | <el-input @click="showIconDialog = true" style="width: 240px" v-model="row.icon" |
| | | placeholder="请选择分类图标" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | <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> |
| | | <el-radio v-for="item in statusList" :label="item.value" :key="item.value">{{ item.label |
| | | }}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .icon { |
| | | margin: 10px; |
| | | width: 20px; |