|
|
@@ -28,7 +28,7 @@ const menuManager = () => { |
|
|
|
*/ |
|
|
|
|
|
|
|
const handleAdd = async (fields) => { |
|
|
|
fields.type=3 |
|
|
|
fields.type=fields.type.join(','); |
|
|
|
await api.add({ ...fields }).then((r) => { |
|
|
|
if (r.succeeded) { |
|
|
|
message.success('添加成功'); |
|
|
@@ -47,6 +47,7 @@ const menuManager = () => { |
|
|
|
*/ |
|
|
|
|
|
|
|
const handleUpdate = async (fields) => { |
|
|
|
fields.type=fields.type.join(','); |
|
|
|
api.update(fields).then((r) => { |
|
|
|
if (r.succeeded) { |
|
|
|
message.success('更新成功'); |
|
|
@@ -72,6 +73,7 @@ const handleUpdate = async (fields) => { |
|
|
|
onClick={() => { |
|
|
|
InitTree(); |
|
|
|
handleModalVisible(true); |
|
|
|
record.type=record.type.split(','); |
|
|
|
setStepFormValues(record); |
|
|
|
}} |
|
|
|
> |
|
|
@@ -157,6 +159,32 @@ const handleUpdate = async (fields) => { |
|
|
|
dataIndex: 'name', |
|
|
|
ellipsis:true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '所属平台', |
|
|
|
dataIndex: 'typeName', |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '所属平台', |
|
|
|
dataIndex: 'type', |
|
|
|
valueType: 'select', |
|
|
|
ellipsis:true, |
|
|
|
hideInTable: true, |
|
|
|
valueEnum: { |
|
|
|
0: { |
|
|
|
text: '团餐', |
|
|
|
}, |
|
|
|
1: { |
|
|
|
text: '门店', |
|
|
|
}, |
|
|
|
2: { |
|
|
|
text: '后厨', |
|
|
|
}, |
|
|
|
3: { |
|
|
|
text: '公共', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '菜单编码', |
|
|
|
dataIndex: 'code', |
|
|
@@ -232,7 +260,8 @@ const handleUpdate = async (fields) => { |
|
|
|
let UserData = []; |
|
|
|
//添加机构组织 |
|
|
|
await api.menutreepage(value).then((r) => { |
|
|
|
UserData = r.data; |
|
|
|
UserData=r.data |
|
|
|
console.log("UserData",UserData) |
|
|
|
}); |
|
|
|
return { |
|
|
|
data: UserData, |
|
|
|