Browse Source

bug 修复

lilei 2 years ago
parent
commit
125145e893
3 changed files with 72 additions and 43 deletions
  1. 35 21
      src/views/bnSetting/menu/adminMenus.vue
  2. 36 21
      src/views/bnSetting/menu/storeMenus.vue
  3. 1 1
      vue.config.js

+ 35 - 21
src/views/bnSetting/menu/adminMenus.vue

@@ -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

+ 36 - 21
src/views/bnSetting/menu/storeMenus.vue

@@ -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,

+ 1 - 1
vue.config.js

@@ -108,7 +108,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.0.102:8501/qpls-it',
+        // target: 'http://192.168.0.215:8501/qpls-it',
         target: 'http://p.it.360arrow.com/qpls-it',
         ws: false,
         changeOrigin: true,