|
|
@ -85,7 +85,7 @@ import pagination from '@crud/Pagination' |
|
|
|
import MaterialList from "@/components/material"; |
|
|
|
import MaterialList from "@/components/material"; |
|
|
|
|
|
|
|
|
|
|
|
// crud交由presenter持有 |
|
|
|
// crud交由presenter持有 |
|
|
|
const defaultCrud = CRUD({ title: 'ProductRelation', url: 'api/yxStoreProductRelation', type:'collect',sort: 'creat_time,desc', crudMethod: { ...crudYxStoreProductRelation }}) |
|
|
|
const defaultCrud = CRUD({ title: 'ProductRelation', url: 'api/yxStoreProductRelation', sort: 'creat_time,desc', crudMethod: { ...crudYxStoreProductRelation }}) |
|
|
|
const defaultForm = { id: null, uid: null, productId: null, type: null, category: null, createTime: null, updateTime: null, isDel: null } |
|
|
|
const defaultForm = { id: null, uid: null, productId: null, type: null, category: null, createTime: null, updateTime: null, isDel: null } |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: 'YxStoreProductRelation', |
|
|
|
name: 'YxStoreProductRelation', |
|
|
@ -93,7 +93,9 @@ export default { |
|
|
|
mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()], |
|
|
|
mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()], |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
|
|
|
|
query: { |
|
|
|
|
|
|
|
type: 'collect', |
|
|
|
|
|
|
|
}, |
|
|
|
permission: { |
|
|
|
permission: { |
|
|
|
add: ['admin', 'yxStoreProductRelation:add'], |
|
|
|
add: ['admin', 'yxStoreProductRelation:add'], |
|
|
|
edit: ['admin', 'yxStoreProductRelation:edit'], |
|
|
|
edit: ['admin', 'yxStoreProductRelation:edit'], |
|
|
@ -116,6 +118,8 @@ export default { |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 获取数据前设置好接口地址 |
|
|
|
// 获取数据前设置好接口地址 |
|
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
|
|
|
|
|
const query = this.query |
|
|
|
|
|
|
|
this.crud.params[query.type] = 'collect' |
|
|
|
return true |
|
|
|
return true |
|
|
|
}, // 新增与编辑前做的操作 |
|
|
|
}, // 新增与编辑前做的操作 |
|
|
|
[CRUD.HOOK.afterToCU](crud, form) { |
|
|
|
[CRUD.HOOK.afterToCU](crud, form) { |
|
|
|