Commit 2cbd7c56 authored by 邓超's avatar 邓超

fix: 新增菜单产品跟url合并处理

parent fb84fbcb
Pipeline #71267 passed with stages
......@@ -18,6 +18,14 @@ const AddForm = props => {
const submit = () => {
if (addType === 1) {
let obj = form.getFieldsValue();
let arr = obj.pageUrl.split('/'); // 用const声明常量
const product = productList.find(item => item.PackageName.includes(arr[0]));
if (product) {
arr.shift();
obj.pageUrl = arr.join('/');
}
console.log(product, 'product');
obj.product = product?.PackageName || 'civweb4';
submitCallback(obj, nodeObj);
}
if (addType === 2) {
......@@ -54,7 +62,7 @@ const AddForm = props => {
<Item label="菜单别名" name="shortName">
<Input placeholder="请输入菜单别名" />
</Item>
<Item label="产品类型:" name="product">
{/* <Item label="产品类型:" name="product">
<Select placeholder="请选择产品类型" allowClear>
{productList &&
productList.length > 0 &&
......@@ -64,7 +72,7 @@ const AddForm = props => {
</Option>
))}
</Select>
</Item>
</Item> */}
<Item
label="菜单图标"
name="imageUrl"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment