|
|
|
@ -27,8 +27,11 @@
|
|
|
|
|
<el-form-item label="图标"> |
|
|
|
|
<MaterialList v-model="picArr" type="image" :num="1" :width="150" :height="150" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="是否推荐"> |
|
|
|
|
<el-input v-model="form.isShow" style="width: 370px;" /> |
|
|
|
|
<el-form-item label="状态"> |
|
|
|
|
<el-radio-group v-model="form.isShow" style="width: 178px"> |
|
|
|
|
<el-radio :label="1">显示</el-radio> |
|
|
|
|
<el-radio :label="0">隐藏</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
@ -39,12 +42,19 @@
|
|
|
|
|
<!--表格渲染--> |
|
|
|
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler"> |
|
|
|
|
<el-table-column type="selection" width="55" /> |
|
|
|
|
<el-table-column v-if="columns.visible('id')" prop="id" label="品牌ID" /> |
|
|
|
|
<el-table-column v-if="columns.visible('id')" prop="id" label="品牌ID" width="150" /> |
|
|
|
|
<el-table-column v-if="columns.visible('brandName')" prop="brandName" label="品牌名称" /> |
|
|
|
|
<el-table-column v-if="columns.visible('brandDescription')" prop="brandDescription" label="品牌描述" /> |
|
|
|
|
<el-table-column v-if="columns.visible('sort')" prop="sort" label="排序" /> |
|
|
|
|
<el-table-column v-if="columns.visible('sort')" prop="sort" label="排序" width="55" /> |
|
|
|
|
<!-- <el-table-column v-if="columns.visible('pic')" prop="pic" label="图标" />--> |
|
|
|
|
<el-table-column v-if="columns.visible('isShow')" prop="isShow" label="是否推荐" /> |
|
|
|
|
<el-table-column v-if="columns.visible('isShow')" label="状态" align="center" prop="isShow"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div> |
|
|
|
|
<el-tag v-if="scope.row.isShow === 1" :type="''">显示</el-tag> |
|
|
|
|
<el-tag v-else :type=" 'info' ">隐藏</el-tag> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column v-if="columns.visible('createTime')" prop="createTime" label="添加时间"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ parseTime(scope.row.createTime) }}</span> |
|
|
|
@ -113,6 +123,8 @@ export default {
|
|
|
|
|
}, // 新增与编辑前做的操作 |
|
|
|
|
[CRUD.HOOK.afterToCU](crud, form) { |
|
|
|
|
this.picArr = [] |
|
|
|
|
this |
|
|
|
|
|
|
|
|
|
if (form.pic && form.id) { |
|
|
|
|
this.picArr = form.pic.split(',') |
|
|
|
|
} |
|
|
|
|