|
@@ -16,26 +16,28 @@
|
|
|
|
|
|
<a-row :gutter="24" >
|
|
|
<a-input-search placeholder="输入搜索菜单名搜索" style="width: 100%" @change="onChange" />
|
|
|
- <a-tree
|
|
|
- @expand="onExpand"
|
|
|
- :treeData="getMenus"
|
|
|
- :expandedKeys="expandedKeys"
|
|
|
- :autoExpandParent="autoExpandParent"
|
|
|
- @select="onSelect"
|
|
|
- :selectedKeys="selectedKeys"
|
|
|
- showIcon
|
|
|
- >
|
|
|
- <template slot="title" slot-scope="{title}">
|
|
|
- <span v-if="title.indexOf(searchValue) > -1">
|
|
|
- {{ title.substr(0, title.indexOf(searchValue)) }}
|
|
|
- <span style="color: #f50">{{ searchValue }}</span>
|
|
|
- {{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
|
|
|
- </span>
|
|
|
- <span v-else>{{ title }}</span>
|
|
|
- </template>
|
|
|
- <a-icon slot="file" type="file" />
|
|
|
- <a-icon slot="pushpin" type="pushpin" />
|
|
|
- </a-tree>
|
|
|
+ <div style="max-height: 600px;overflow: auto;">
|
|
|
+ <a-tree
|
|
|
+ @expand="onExpand"
|
|
|
+ :treeData="getMenus"
|
|
|
+ :expandedKeys="expandedKeys"
|
|
|
+ :autoExpandParent="autoExpandParent"
|
|
|
+ @select="onSelect"
|
|
|
+ :selectedKeys="selectedKeys"
|
|
|
+ showIcon
|
|
|
+ >
|
|
|
+ <template slot="title" slot-scope="{title}">
|
|
|
+ <span v-if="title.indexOf(searchValue) > -1">
|
|
|
+ {{ title.substr(0, title.indexOf(searchValue)) }}
|
|
|
+ <span style="color: #f50">{{ searchValue }}</span>
|
|
|
+ {{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
|
|
|
+ </span>
|
|
|
+ <span v-else>{{ title }}</span>
|
|
|
+ </template>
|
|
|
+ <a-icon slot="file" type="file" />
|
|
|
+ <a-icon slot="pushpin" type="pushpin" />
|
|
|
+ </a-tree>
|
|
|
+ </div>
|
|
|
</a-row>
|
|
|
</a-col>
|
|
|
<!-- 右侧 -->
|
|
@@ -50,7 +52,19 @@
|
|
|
<a-icon type="pushpin" style="margin-right: 10px;" /><span >操作按钮</span>
|
|
|
</div>
|
|
|
</a-form-item>
|
|
|
-
|
|
|
+ <a-form-item label="ID" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
|
|
|
+ {{ formData.id }}
|
|
|
+ </a-form-item>
|
|
|
+ <a-form-item label="父节点ID" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
|
|
|
+ <a-input
|
|
|
+ placeholder="请输入父节点ID(最多50个字符)"
|
|
|
+ :maxLength="50"
|
|
|
+ v-decorator="['formData.parentId', {
|
|
|
+ initialValue: formData.parentId,
|
|
|
+ getValueFromEvent: $filterEmpty,
|
|
|
+ rules: [{ required: true, message: '请输入父节点ID!' }] }]"
|
|
|
+ />
|
|
|
+ </a-form-item>
|
|
|
<!-- 名称 -->
|
|
|
<a-form-item label="名称" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">
|
|
|
<a-input
|
|
@@ -282,6 +296,7 @@ export default {
|
|
|
// this.formData = Object.assign({}, this.formData, info.selectedNodes[0].data.props)
|
|
|
this.formData = {
|
|
|
id: data.id,
|
|
|
+ parentId: data.parentId,
|
|
|
name: data.name,
|
|
|
routePath: data.routePath,
|
|
|
icon: data.icon,
|