Commit eaa4a276 authored by “yiyousong”'s avatar “yiyousong”

fix:修复菜单搜索异常

parent e09647a5
...@@ -553,4 +553,5 @@ ...@@ -553,4 +553,5 @@
.addclass { .addclass {
background: linear-gradient(90deg, #5ab6ff 0%, #2e9aff 100%) !important; background: linear-gradient(90deg, #5ab6ff 0%, #2e9aff 100%) !important;
color: #fff !important; color: #fff !important;
border:none !important
} }
<template> <template>
<div class="menuMgmt"> <div class="menuMgmt">
<div class="header_box"> <div class="header_box">
<a-button type="primary" class="addclass" @click="showEditModal(1)">新增</a-button> <a-button type="primary" class="addclass" @click="showEditModal(1)"
>新增</a-button
>
<span> <span>
<a-input v-model="searchForm.name" placeholder="请输入菜单名称搜索"> <a-input v-model="searchForm.name" placeholder="请输入菜单名称搜索">
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
...@@ -13,7 +15,9 @@ ...@@ -13,7 +15,9 @@
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-button type="primary" class="addclass" @click="searchData">搜索</a-button> <a-button type="primary" class="addclass" @click="searchData"
>搜索</a-button
>
<a-button @click="resetSearch">重置</a-button> <a-button @click="resetSearch">重置</a-button>
</span> </span>
</div> </div>
...@@ -89,7 +93,7 @@ export default { ...@@ -89,7 +93,7 @@ export default {
api: process.env.VUE_APP_API_IMG_URL, api: process.env.VUE_APP_API_IMG_URL,
EditModalVisible: false, EditModalVisible: false,
searchForm: { searchForm: {
name: undefined, name: "",
parentId: "", parentId: "",
}, },
tableLoading: false, tableLoading: false,
...@@ -218,8 +222,8 @@ export default { ...@@ -218,8 +222,8 @@ export default {
// 搜索 // 搜索
async searchData() { async searchData() {
if (this.searchForm.parentId || this.searchForm.name) { if (this.searchForm.parentId || this.searchForm.name) {
let obj = {...this.searchForm} let obj = { ...this.searchForm };
obj.name = '%'+this.searchForm.name+'%' obj.name = "%" + this.searchForm.name + "%";
let res = await menuList({ let res = await menuList({
page: this.tablePagination.current, page: this.tablePagination.current,
size: -1, size: -1,
......
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