|
|
|
@ -27,6 +27,9 @@
|
|
|
|
|
<el-form-item label="图标"> |
|
|
|
|
<MaterialList v-model="picArr" type="image" :num="1" :width="150" :height="150" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="背景图"> |
|
|
|
|
<MaterialList v-model="picArr1" type="image" :num="1" :width="150" :height="150" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="状态"> |
|
|
|
|
<el-radio-group v-model="form.isShow" style="width: 178px"> |
|
|
|
|
<el-radio :label="1">显示</el-radio> |
|
|
|
@ -91,7 +94,7 @@ import MaterialList from "@/components/material";
|
|
|
|
|
|
|
|
|
|
// crud交由presenter持有 |
|
|
|
|
const defaultCrud = CRUD({ title: '品牌', url: '/bxg/api/yxStoreBrand', sort: 'id,desc', crudMethod: { ...crudYxStoreBrand }}) |
|
|
|
|
const defaultForm = { id: null, brandName: null, sort: null, pic: null, isShow: null, createTime: null, updateTime: null, isDel: null, tenantId: null } |
|
|
|
|
const defaultForm = { id: null, brandName: null, sort: null, pic: null,backgroundImage:null,isShow: null, createTime: null, updateTime: null, isDel: null, tenantId: null } |
|
|
|
|
export default { |
|
|
|
|
name: 'YxStoreBrand', |
|
|
|
|
components: { pagination, crudOperation, rrOperation, udOperation ,MaterialList}, |
|
|
|
@ -99,6 +102,7 @@ export default {
|
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
picArr: [], |
|
|
|
|
picArr1: [], |
|
|
|
|
permission: { |
|
|
|
|
add: ['admin', 'yxStoreBrand:add'], |
|
|
|
|
edit: ['admin', 'yxStoreBrand:edit'], |
|
|
|
@ -112,8 +116,10 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
picArr: function(val) { |
|
|
|
|
console.log(); |
|
|
|
|
this.form.pic = val.join(',') |
|
|
|
|
}, |
|
|
|
|
picArr1: function(val) { |
|
|
|
|
this.form.backgroundImage = val.join(',') |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
@ -123,11 +129,13 @@ export default {
|
|
|
|
|
}, // 新增与编辑前做的操作 |
|
|
|
|
[CRUD.HOOK.afterToCU](crud, form) { |
|
|
|
|
this.picArr = [] |
|
|
|
|
this |
|
|
|
|
|
|
|
|
|
this.picArr1= [] |
|
|
|
|
if (form.pic && form.id) { |
|
|
|
|
this.picArr = form.pic.split(',') |
|
|
|
|
} |
|
|
|
|
if (form.backgroundImage && form.id) { |
|
|
|
|
this.picArr1 = form.backgroundImage.split(',') |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|