feat: Tools-Host Terminal支持搜索过滤
This commit is contained in:
@@ -5,14 +5,16 @@ import { ColumnsType } from 'ant-design-vue/es/table';
|
||||
import { Modal, message } from 'ant-design-vue/es';
|
||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||
import { delNeHost, listNeHost } from '@/api/ne/neHost';
|
||||
import useNeListStore from '@/store/modules/neinfo';
|
||||
import useDictStore from '@/store/modules/dict';
|
||||
import useI18n from '@/hooks/useI18n';
|
||||
const neListStore = useNeListStore();
|
||||
const { getDict } = useDictStore();
|
||||
const { t } = useI18n();
|
||||
const EditModal = defineAsyncComponent(
|
||||
() => import('@/views/ne/neHost/components/EditModal.vue')
|
||||
);
|
||||
const emit = defineEmits(['modal','link']);
|
||||
const emit = defineEmits(['modal', 'link']);
|
||||
|
||||
/**字典数据 */
|
||||
let dict: {
|
||||
@@ -35,7 +37,7 @@ let queryParams = reactive({
|
||||
/**分组 */
|
||||
groupId: undefined,
|
||||
/**名称 */
|
||||
title: '',
|
||||
title: 'OMC',
|
||||
/**当前页数 */
|
||||
pageNum: 1,
|
||||
/**每页条数 */
|
||||
@@ -144,7 +146,7 @@ function fnGetList(pageNum?: number) {
|
||||
queryParams.pageNum = pageNum;
|
||||
}
|
||||
listNeHost(toRaw(queryParams)).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
tablePagination.total = res.total;
|
||||
tableState.data = res.rows;
|
||||
if (
|
||||
@@ -182,13 +184,13 @@ let modalState: ModalStateType = reactive({
|
||||
* @param roleId 角色编号ID, 不传为新增
|
||||
*/
|
||||
function fnModalVisibleByEdit(roleId?: string) {
|
||||
emit('modal');
|
||||
if (!roleId) {
|
||||
modalState.hostId = '';
|
||||
} else {
|
||||
modalState.hostId = roleId;
|
||||
}
|
||||
modalState.openByEdit = true;
|
||||
emit('modal');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -289,7 +291,34 @@ onMounted(() => {
|
||||
</template>
|
||||
|
||||
<!-- 插槽-卡片右侧 -->
|
||||
<template #extra> </template>
|
||||
<template #extra>
|
||||
<a-space :size="8" align="center" direction="horizontal">
|
||||
<a-form layout="inline">
|
||||
<a-form-item :label="t('views.ne.neHost.hostType')" name="hostType">
|
||||
<a-select
|
||||
v-model:value="queryParams.hostType"
|
||||
:options="dict.neHostType"
|
||||
allow-clear
|
||||
size="small"
|
||||
:placeholder="t('common.selectPlease')"
|
||||
@change="fnGetList(1)"
|
||||
style="width: 100px"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item :label="t('views.ne.neHost.title')" name="title">
|
||||
<a-auto-complete
|
||||
v-model:value="queryParams.title"
|
||||
:options="neListStore.getNeSelectOtions"
|
||||
allow-clear
|
||||
size="small"
|
||||
:placeholder="t('common.inputPlease')"
|
||||
@change="fnGetList(1)"
|
||||
style="width: 180px"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
<!-- 表格列表 -->
|
||||
<a-table
|
||||
|
||||
Reference in New Issue
Block a user