feat: 配置-网元管理添加Column settings
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, onMounted, toRaw } from 'vue';
|
import { reactive, onMounted, toRaw, ref } from 'vue';
|
||||||
import { PageContainer } from 'antdv-pro-layout';
|
import { PageContainer } from 'antdv-pro-layout';
|
||||||
import { message, Modal, Form } from 'ant-design-vue/lib';
|
import { message, Modal, Form } from 'ant-design-vue/lib';
|
||||||
import { SizeType } from 'ant-design-vue/lib/config-provider';
|
import { SizeType } from 'ant-design-vue/lib/config-provider';
|
||||||
@@ -22,6 +22,7 @@ import { updateNeConfigReload } from '@/api/configManage/configParam';
|
|||||||
import useI18n from '@/hooks/useI18n';
|
import useI18n from '@/hooks/useI18n';
|
||||||
import { FileType } from 'ant-design-vue/lib/upload/interface';
|
import { FileType } from 'ant-design-vue/lib/upload/interface';
|
||||||
import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
import { UploadRequestOption } from 'ant-design-vue/lib/vc-upload/interface';
|
||||||
|
import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
|
||||||
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
|
||||||
import { NE_TYPE_LIST } from '@/constants/ne-constants';
|
import { NE_TYPE_LIST } from '@/constants/ne-constants';
|
||||||
import useNeInfoStore from '@/store/modules/neinfo';
|
import useNeInfoStore from '@/store/modules/neinfo';
|
||||||
@@ -87,71 +88,74 @@ let tableColumns: ColumnsType = [
|
|||||||
title: t('views.configManage.neManage.neType'),
|
title: t('views.configManage.neManage.neType'),
|
||||||
dataIndex: 'neType',
|
dataIndex: 'neType',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 3,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.configManage.neManage.neId'),
|
title: t('views.configManage.neManage.neId'),
|
||||||
dataIndex: 'neId',
|
dataIndex: 'neId',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 3,
|
width: 100,
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('views.configManage.neManage.uid'),
|
|
||||||
dataIndex: 'rmUid',
|
|
||||||
align: 'center',
|
|
||||||
width: 5,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t('views.configManage.neManage.neName'),
|
|
||||||
dataIndex: 'neName',
|
|
||||||
align: 'center',
|
|
||||||
width: 5,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.configManage.neManage.ip'),
|
title: t('views.configManage.neManage.ip'),
|
||||||
dataIndex: 'ip',
|
dataIndex: 'ip',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 5,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.configManage.neManage.port'),
|
title: t('views.configManage.neManage.port'),
|
||||||
dataIndex: 'port',
|
dataIndex: 'port',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 3,
|
width: 100,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('views.configManage.neManage.neName'),
|
||||||
|
dataIndex: 'neName',
|
||||||
|
align: 'center',
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t('views.configManage.neManage.uid'),
|
||||||
|
dataIndex: 'rmUid',
|
||||||
|
align: 'center',
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.configManage.neManage.pvflag'),
|
title: t('views.configManage.neManage.pvflag'),
|
||||||
dataIndex: 'pvFlag',
|
dataIndex: 'pvFlag',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 5,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.configManage.neManage.province'),
|
title: t('views.configManage.neManage.province'),
|
||||||
dataIndex: 'province',
|
dataIndex: 'province',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 5,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.configManage.neManage.vendorName'),
|
title: t('views.configManage.neManage.vendorName'),
|
||||||
dataIndex: 'vendorName',
|
dataIndex: 'vendorName',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 5,
|
width: 150,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.configManage.neManage.dn'),
|
title: t('views.configManage.neManage.dn'),
|
||||||
dataIndex: 'dn',
|
dataIndex: 'dn',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 5,
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('common.operate'),
|
title: t('common.operate'),
|
||||||
key: 'id',
|
key: 'id',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
width: 5,
|
width: 150,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**表格字段列排序 */
|
||||||
|
let tableColumnsDnd = ref<ColumnsType>([]);
|
||||||
|
|
||||||
/**表格分页器参数 */
|
/**表格分页器参数 */
|
||||||
let tablePagination = reactive({
|
let tablePagination = reactive({
|
||||||
/**当前页数 */
|
/**当前页数 */
|
||||||
@@ -841,6 +845,11 @@ onMounted(() => {
|
|||||||
<template #icon><ReloadOutlined /></template>
|
<template #icon><ReloadOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
<TableColumnsDnd
|
||||||
|
cache-id="neManageData"
|
||||||
|
:columns="tableColumns"
|
||||||
|
v-model:columns-dnd="tableColumnsDnd"
|
||||||
|
></TableColumnsDnd>
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>{{ t('common.sizeText') }}</template>
|
<template #title>{{ t('common.sizeText') }}</template>
|
||||||
<a-dropdown trigger="click" placement="bottomRight">
|
<a-dropdown trigger="click" placement="bottomRight">
|
||||||
@@ -872,15 +881,15 @@ onMounted(() => {
|
|||||||
<a-table
|
<a-table
|
||||||
class="table"
|
class="table"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:columns="tableColumns"
|
:columns="tableColumnsDnd"
|
||||||
:loading="tableState.loading"
|
:loading="tableState.loading"
|
||||||
:data-source="tableState.data"
|
:data-source="tableState.data"
|
||||||
:size="tableState.size"
|
:size="tableState.size"
|
||||||
:pagination="tablePagination"
|
:pagination="tablePagination"
|
||||||
:scroll="{ x: 2000, y: 480 }"
|
:scroll="{ y: 'calc(100vh - 480px)' }"
|
||||||
>
|
>
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.key === 'id'">
|
<template v-if="column?.key === 'id'">
|
||||||
<a-space :size="8" align="center">
|
<a-space :size="8" align="center">
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>{{ t('common.editText') }}</template>
|
<template #title>{{ t('common.editText') }}</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user