fix_系统设置_插件管理_搜索失效--bug=1006713 --user=王孝刚 【插件管理】搜索不生效 https://www.tapd.cn/55049933/s/1048283
This commit is contained in:
parent
fddaebdef6
commit
4d71617279
|
@ -27,8 +27,8 @@ public class PluginController {
|
|||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
public List<PluginDTO> list() {
|
||||
return pluginService.list();
|
||||
public List<PluginDTO> list(String name) {
|
||||
return pluginService.list(name);
|
||||
}
|
||||
|
||||
@GetMapping("/get/{id}")
|
||||
|
|
|
@ -150,11 +150,17 @@ public class PluginService {
|
|||
}
|
||||
}
|
||||
|
||||
public List<PluginDTO> list() {
|
||||
public List<PluginDTO> list(String name) {
|
||||
try {
|
||||
PluginExample example = new PluginExample();
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
name = "%" + name + "%";
|
||||
example.createCriteria().andNameLike(name);
|
||||
}
|
||||
List<Plugin> plugins = pluginMapper.selectByExample(example);
|
||||
Map<String, Boolean> pluginMap = new HashMap<>();
|
||||
List<PluginDTO> lists = new LinkedList<>();
|
||||
if (CollectionUtils.isNotEmpty(plugins)) {
|
||||
// 校验插件是否是企业版
|
||||
plugins.forEach(item -> {
|
||||
PluginDTO dto = new PluginDTO();
|
||||
|
@ -175,6 +181,11 @@ public class PluginService {
|
|||
});
|
||||
return lists;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Plugin get(String scriptId) {
|
||||
PluginExample example = new PluginExample();
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
<ms-table-header
|
||||
:showCreate="false"
|
||||
:create-permission="['SYSTEM_USER:READ+CREATE']"
|
||||
:condition.sync="condition" @search="search"
|
||||
:condition.sync="condition"
|
||||
:import-tip="$t('test_track.case.import.click_upload')"
|
||||
:tip="$t('commons.search_by_name_or_id')"
|
||||
:create-tip="$t('user.create')"
|
||||
:title="$t('plugin.title')"
|
||||
@search="initPlugins"
|
||||
@import="importJar"
|
||||
:show-import="true"/>
|
||||
</template>
|
||||
|
@ -87,14 +88,15 @@ export default {
|
|||
this.initPlugins();
|
||||
},
|
||||
methods: {
|
||||
search() {
|
||||
|
||||
},
|
||||
importJar() {
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
initPlugins() {
|
||||
let url = "/plugin/list";
|
||||
let name = this.condition.name;
|
||||
if (name) {
|
||||
url = "/plugin/list?name=" +name;
|
||||
}
|
||||
this.tableData = [];
|
||||
this.$get(url, response => {
|
||||
if (response.data) {
|
||||
|
|
Loading…
Reference in New Issue