|
@@ -156,10 +156,13 @@
|
|
|
|
|
|
|
|
<div class="list-body list-wrap"> <!-- 操作按钮栏 + 数据表格 -->
|
|
<div class="list-body list-wrap"> <!-- 操作按钮栏 + 数据表格 -->
|
|
|
<div ref="contractTableWrapRef" class="contract-table-wrap">
|
|
<div ref="contractTableWrapRef" class="contract-table-wrap">
|
|
|
- <ListTable table-key="crm-contract"
|
|
|
|
|
|
|
+ <ListTable
|
|
|
|
|
+ ref="contractTableRef"
|
|
|
|
|
+ table-key="crm-contract"
|
|
|
v-loading="loading"
|
|
v-loading="loading"
|
|
|
class="list-table"
|
|
class="list-table"
|
|
|
stripe
|
|
stripe
|
|
|
|
|
+ :height="tableHeight"
|
|
|
:data="contractList"
|
|
:data="contractList"
|
|
|
row-key="id"
|
|
row-key="id"
|
|
|
@selection-change="handleSelectionChange"
|
|
@selection-change="handleSelectionChange"
|
|
@@ -465,7 +468,9 @@
|
|
|
/>
|
|
/>
|
|
|
<el-table-column v-if="isColumnVisible('remark')" label="备注" align="center" prop="remark" min-width="200" show-overflow-tooltip />
|
|
<el-table-column v-if="isColumnVisible('remark')" label="备注" align="center" prop="remark" min-width="200" show-overflow-tooltip />
|
|
|
</ListTable>
|
|
</ListTable>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
|
+ <div ref="contractBelowRef">
|
|
|
<ListColumnStatsRow
|
|
<ListColumnStatsRow
|
|
|
ref="contractStatsRowRef"
|
|
ref="contractStatsRowRef"
|
|
|
storage-key="crm-contract-column-stats"
|
|
storage-key="crm-contract-column-stats"
|
|
@@ -474,7 +479,6 @@
|
|
|
:table-wrap-el="contractTableWrapRef"
|
|
:table-wrap-el="contractTableWrapRef"
|
|
|
:get-cell-value="getContractStatCellValue"
|
|
:get-cell-value="getContractStatCellValue"
|
|
|
/>
|
|
/>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
<div class="pagination list-pager-bar">
|
|
<div class="pagination list-pager-bar">
|
|
|
<div class="list-pager-selected">
|
|
<div class="list-pager-selected">
|
|
@@ -492,6 +496,7 @@
|
|
|
@current-change="getList"
|
|
@current-change="getList"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</section>
|
|
</section>
|
|
|
|
|
|
|
@@ -526,7 +531,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts" name="ContractListPage">
|
|
<script setup lang="ts" name="ContractListPage">
|
|
|
-import { ref, reactive, computed, onMounted, watch } from 'vue';
|
|
|
|
|
|
|
+import { ref, reactive, computed, onMounted, watch, nextTick } from 'vue';
|
|
|
import {
|
|
import {
|
|
|
listContract,
|
|
listContract,
|
|
|
getContract as getContractDetail,
|
|
getContract as getContractDetail,
|
|
@@ -576,6 +581,7 @@ import ListExportDropdown from '@/components/business/list-export-dropdown/index
|
|
|
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
|
|
import ListToolbarEndActions from '@/components/business/list-toolbar-end-actions/index.vue'
|
|
|
import ListColumnStatsRow from '@/components/business/list-column-stats-row/index.vue'
|
|
import ListColumnStatsRow from '@/components/business/list-column-stats-row/index.vue'
|
|
|
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
|
|
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
|
|
|
|
|
+import { useListTableViewportHeight } from '@/composables/useListTableViewportHeight'
|
|
|
import { buildStatsRowColumns } from '@/utils/list-column-stats'
|
|
import { buildStatsRowColumns } from '@/utils/list-column-stats'
|
|
|
|
|
|
|
|
const props = withDefaults(
|
|
const props = withDefaults(
|
|
@@ -1027,8 +1033,16 @@ const CONTRACT_MONEY_STAT_PROPS = new Set([
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
const contractTableWrapRef = ref<HTMLElement | null>(null)
|
|
const contractTableWrapRef = ref<HTMLElement | null>(null)
|
|
|
|
|
+const contractBelowRef = ref<HTMLElement | null>(null)
|
|
|
|
|
+const contractTableRef = ref<any>(null)
|
|
|
const contractStatsRowRef = ref<{ resync?: () => void } | null>(null)
|
|
const contractStatsRowRef = ref<{ resync?: () => void } | null>(null)
|
|
|
|
|
|
|
|
|
|
+const { tableHeight, recalc: recalcTableHeight } = useListTableViewportHeight({
|
|
|
|
|
+ tableEl: contractTableWrapRef,
|
|
|
|
|
+ pagerEl: contractBelowRef,
|
|
|
|
|
+ tableRef: contractTableRef
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
const contractStatsRowColumns = computed(() =>
|
|
const contractStatsRowColumns = computed(() =>
|
|
|
buildStatsRowColumns({
|
|
buildStatsRowColumns({
|
|
|
leadingSpacers: 2,
|
|
leadingSpacers: 2,
|
|
@@ -1341,6 +1355,7 @@ onMounted(() => {
|
|
|
} else {
|
|
} else {
|
|
|
handleViewChange()
|
|
handleViewChange()
|
|
|
}
|
|
}
|
|
|
|
|
+ nextTick(() => recalcTableHeight())
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
watch(formDialogVisible, (visible) => {
|
|
watch(formDialogVisible, (visible) => {
|