|
@@ -108,7 +108,7 @@
|
|
|
|
|
|
|
|
<a-table row-key="id" :loading="loading" :pagination="pagination" :summary="true" summary-text="汇总"
|
|
<a-table row-key="id" :loading="loading" :pagination="pagination" :summary="true" summary-text="汇总"
|
|
|
:columns="(cloneColumns as TableColumnData[])" :data="renderData" :bordered="{ headerCell: true }"
|
|
:columns="(cloneColumns as TableColumnData[])" :data="renderData" :bordered="{ headerCell: true }"
|
|
|
- :size="size" @page-change="onPageChange">
|
|
|
|
|
|
|
+ :row-class="getRowClass" :size="size" @page-change="onPageChange">
|
|
|
<template #index="{ record }">
|
|
<template #index="{ record }">
|
|
|
{{ record.id }}
|
|
{{ record.id }}
|
|
|
</template>
|
|
</template>
|
|
@@ -224,7 +224,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { useRouter } from 'vue-router';
|
|
|
|
|
|
|
+import { useRouter, useRoute } from 'vue-router';
|
|
|
import { computed, ref, reactive, watch, nextTick } from 'vue';
|
|
import { computed, ref, reactive, watch, nextTick } from 'vue';
|
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useI18n } from 'vue-i18n';
|
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
@@ -251,11 +251,13 @@ const generateFormModel = () => {
|
|
|
name: '',
|
|
name: '',
|
|
|
lastTime: [],
|
|
lastTime: [],
|
|
|
status: '',
|
|
status: '',
|
|
|
|
|
+ show_hide: false,
|
|
|
sort: 'status',
|
|
sort: 'status',
|
|
|
order: 'descending',
|
|
order: 'descending',
|
|
|
};
|
|
};
|
|
|
};
|
|
};
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
|
|
+const route = useRoute();
|
|
|
|
|
|
|
|
const { loading, setLoading } = useLoading(true);
|
|
const { loading, setLoading } = useLoading(true);
|
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
@@ -264,6 +266,7 @@ const formModel = ref(generateFormModel());
|
|
|
const cloneColumns = ref<Column[]>([]);
|
|
const cloneColumns = ref<Column[]>([]);
|
|
|
const showColumns = ref<Column[]>([]);
|
|
const showColumns = ref<Column[]>([]);
|
|
|
|
|
|
|
|
|
|
+
|
|
|
const size = ref<SizeProps>('small');
|
|
const size = ref<SizeProps>('small');
|
|
|
|
|
|
|
|
const basePagination: Pagination = {
|
|
const basePagination: Pagination = {
|
|
@@ -400,15 +403,29 @@ const statusOptions = computed<SelectOptionData[]>(() => [
|
|
|
},
|
|
},
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
|
|
+const getRowClass = (record: JdPoolRecord) => {
|
|
|
|
|
+ return record.is_hide ? 'special-table-row' : '';
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+if (route.query.show_hide === '1') {
|
|
|
|
|
+ formModel.value.show_hide = true;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const fetchData = async (
|
|
const fetchData = async (
|
|
|
params: JdPoolParams = {
|
|
params: JdPoolParams = {
|
|
|
current: 1,
|
|
current: 1,
|
|
|
pageSize: 50,
|
|
pageSize: 50,
|
|
|
|
|
+ show_hide: false,
|
|
|
sort: 'status',
|
|
sort: 'status',
|
|
|
order: 'descending',
|
|
order: 'descending',
|
|
|
getTotal: true,
|
|
getTotal: true,
|
|
|
}
|
|
}
|
|
|
) => {
|
|
) => {
|
|
|
|
|
+ if (route.query.show_hide === '1') {
|
|
|
|
|
+ params.show_hide = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
setLoading(true);
|
|
setLoading(true);
|
|
|
try {
|
|
try {
|
|
|
const { data } = await queryJdPool(params);
|
|
const { data } = await queryJdPool(params);
|
|
@@ -624,4 +641,9 @@ export default {
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+:deep(.special-table-row td) {
|
|
|
|
|
+ background-color: var(--color-warning-light-2) !important;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|