fix: 表格字段排序支持缓存变更状态

This commit is contained in:
TsMask
2024-03-07 17:04:09 +08:00
parent e0d590724b
commit 3cb80bbd85
6 changed files with 10 additions and 8 deletions

View File

@@ -1170,7 +1170,7 @@ onMounted(() => {
return; return;
} }
// 默认选择AMF // 默认选择AMF
const item = neCascaderOptions.value.find(s => s.value === 'UPF'); const item = neCascaderOptions.value.find(s => s.value === 'AMF');
if (item && item.children) { if (item && item.children) {
const info = item.children[0]; const info = item.children[0];
neTypeSelect.value = [info.neType, info.neId]; neTypeSelect.value = [info.neType, info.neId];
@@ -1387,6 +1387,7 @@ onMounted(() => {
</a-button> </a-button>
<TableColumnsDnd <TableColumnsDnd
type="ghost" type="ghost"
:cache-id="treeState.selectNode.key"
:columns="treeState.selectNode.method === 'get' ? [...arrayState.columns.filter((s:any)=>s.key !== 'index')] : arrayState.columns" :columns="treeState.selectNode.method === 'get' ? [...arrayState.columns.filter((s:any)=>s.key !== 'index')] : arrayState.columns"
v-model:columns-dnd="arrayState.columnsDnd" v-model:columns-dnd="arrayState.columnsDnd"
></TableColumnsDnd> ></TableColumnsDnd>
@@ -1488,6 +1489,7 @@ onMounted(() => {
</a-button> </a-button>
<TableColumnsDnd <TableColumnsDnd
type="ghost" type="ghost"
:cache-id="`${treeState.selectNode.key}:${arrayChildState.loc}`"
:columns="[...arrayChildState.columns]" :columns="[...arrayChildState.columns]"
v-model:columns-dnd="arrayChildState.columnsDnd" v-model:columns-dnd="arrayChildState.columnsDnd"
v-if="arrayChildState.loc" v-if="arrayChildState.loc"

View File

@@ -960,6 +960,7 @@ onMounted(() => {
</a-dropdown> </a-dropdown>
</a-tooltip> </a-tooltip>
<TableColumnsDnd <TableColumnsDnd
cache-id="alarmActive"
:columns="tableColumns" :columns="tableColumns"
v-model:columns-dnd="tableColumnsDnd" v-model:columns-dnd="tableColumnsDnd"
></TableColumnsDnd> ></TableColumnsDnd>

View File

@@ -755,6 +755,7 @@ onMounted(() => {
</a-dropdown> </a-dropdown>
</a-tooltip> </a-tooltip>
<TableColumnsDnd <TableColumnsDnd
cache-id="alarmHistory"
:columns="tableColumns" :columns="tableColumns"
v-model:columns-dnd="tableColumnsDnd" v-model:columns-dnd="tableColumnsDnd"
></TableColumnsDnd> ></TableColumnsDnd>

View File

@@ -918,6 +918,7 @@ onMounted(() => {
</a-button> </a-button>
</a-tooltip> </a-tooltip>
<TableColumnsDnd <TableColumnsDnd
cache-id="udmAuthData"
:columns="tableColumns" :columns="tableColumns"
v-model:columns-dnd="tableColumnsDnd" v-model:columns-dnd="tableColumnsDnd"
></TableColumnsDnd> ></TableColumnsDnd>

View File

@@ -1396,6 +1396,7 @@ onMounted(() => {
</a-button> </a-button>
</a-tooltip> </a-tooltip>
<TableColumnsDnd <TableColumnsDnd
cache-id="udmSubData"
:columns="tableColumns" :columns="tableColumns"
v-model:columns-dnd="tableColumnsDnd" v-model:columns-dnd="tableColumnsDnd"
></TableColumnsDnd> ></TableColumnsDnd>
@@ -2007,7 +2008,6 @@ onMounted(() => {
layout="horizontal" layout="horizontal"
:labelWrap="true" :labelWrap="true"
:label-col="{ span: 6 }" :label-col="{ span: 6 }"
> >
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24"> <a-col :lg="12" :md="12" :xs="24">
@@ -2031,7 +2031,6 @@ onMounted(() => {
<a-form-item <a-form-item
label="IMSI" label="IMSI"
name="imsi" name="imsi"
v-bind="modalStateBatchFrom.validateInfos.imsi" v-bind="modalStateBatchFrom.validateInfos.imsi"
> >
<a-input v-model:value="modalState.BatchForm.imsi" allow-clear> <a-input v-model:value="modalState.BatchForm.imsi" allow-clear>
@@ -2087,10 +2086,7 @@ onMounted(() => {
<div v-for="(row, index) in bigRows" :key="String(row.id)"> <div v-for="(row, index) in bigRows" :key="String(row.id)">
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24"> <a-col :lg="12" :md="12" :xs="24">
<a-form-item <a-form-item label="SST-SD" name="row.sst">
label="SST-SD"
name="row.sst"
>
<a-input-group> <a-input-group>
<a-row :gutter="8"> <a-row :gutter="8">
<a-col :span="10"> <a-col :span="10">
@@ -2129,7 +2125,7 @@ onMounted(() => {
v-for="(smallRow, smallIndex) in row.smallRows" v-for="(smallRow, smallIndex) in row.smallRows"
:key="String(smallRow.id)" :key="String(smallRow.id)"
> >
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :lg="6" :md="7" :xs="24"> <a-col :lg="6" :md="7" :xs="24">
<a-form-item <a-form-item
label="DNN/APN" label="DNN/APN"

View File

@@ -745,6 +745,7 @@ onBeforeUnmount(() => {
</a-tooltip> </a-tooltip>
<TableColumnsDnd <TableColumnsDnd
v-if="tableColumns.length > 0" v-if="tableColumns.length > 0"
cache-id="kpiTarget"
:columns="tableColumns" :columns="tableColumns"
v-model:columns-dnd="tableColumnsDnd" v-model:columns-dnd="tableColumnsDnd"
></TableColumnsDnd> ></TableColumnsDnd>