|
|
@ -1,5 +1,5 @@ |
|
|
<script setup> |
|
|
<script setup> |
|
|
import { ref, reactive, onMounted, toRefs } from 'vue' |
|
|
|
|
|
|
|
|
import { ref, reactive, onMounted, toRefs, nextTick } from 'vue' |
|
|
import { ElMessage, ElMessageBox } from 'element-plus' |
|
|
import { ElMessage, ElMessageBox } from 'element-plus' |
|
|
import request from '@/util/http.js' |
|
|
import request from '@/util/http.js' |
|
|
import dayjs from 'dayjs' |
|
|
import dayjs from 'dayjs' |
|
|
@ -49,6 +49,10 @@ const queryParams = reactive({ |
|
|
|
|
|
|
|
|
const total = ref(0) |
|
|
const total = ref(0) |
|
|
const tableData = ref([]) |
|
|
const tableData = ref([]) |
|
|
|
|
|
const tableRef = ref(null) |
|
|
|
|
|
const scrollTableTop = () => { |
|
|
|
|
|
tableRef.value?.setScrollTop?.(0) |
|
|
|
|
|
} |
|
|
const loading = ref(false) |
|
|
const loading = ref(false) |
|
|
|
|
|
|
|
|
// 转换树形结构(参考 coinConsumeDetail.vue) |
|
|
// 转换树形结构(参考 coinConsumeDetail.vue) |
|
|
@ -101,6 +105,8 @@ const fetchData = async () => { |
|
|
const res = await performanceSelect(params) |
|
|
const res = await performanceSelect(params) |
|
|
if (res.code == 200) { |
|
|
if (res.code == 200) { |
|
|
tableData.value = res.data.list || [] |
|
|
tableData.value = res.data.list || [] |
|
|
|
|
|
await nextTick() |
|
|
|
|
|
scrollTableTop() |
|
|
total.value = res.data.total || 0 |
|
|
total.value = res.data.total || 0 |
|
|
loading.value = false |
|
|
loading.value = false |
|
|
} else { |
|
|
} else { |
|
|
@ -312,7 +318,7 @@ onMounted( async() => { |
|
|
|
|
|
|
|
|
<!-- 表格区域 --> |
|
|
<!-- 表格区域 --> |
|
|
<el-card class="table-card"> |
|
|
<el-card class="table-card"> |
|
|
<el-table :data="tableData" v-loading="loading" style="width: 100%; flex: 1;" :cell-style="{ textAlign: 'center' }" :header-cell-style="{ background: '#F3FAFE', color: '#333',textAlign: 'center' }"> |
|
|
|
|
|
|
|
|
<el-table :ref="tableRef" :data="tableData" v-loading="loading" style="width: 100%; flex: 1;" :cell-style="{ textAlign: 'center' }" :header-cell-style="{ background: '#F3FAFE', color: '#333',textAlign: 'center' }"> |
|
|
<el-table-column type="index" :label="t('common_list.id')" min-width="60" align="center" fixed="left" /> |
|
|
<el-table-column type="index" :label="t('common_list.id')" min-width="60" align="center" fixed="left" /> |
|
|
<el-table-column prop="jwcode" :label="t('common_list.jwcode')" min-width="120" fixed="left" /> |
|
|
<el-table-column prop="jwcode" :label="t('common_list.jwcode')" min-width="120" fixed="left" /> |
|
|
<el-table-column prop="name" :label="t('common_list.name')" min-width="150" show-overflow-tooltip /> |
|
|
<el-table-column prop="name" :label="t('common_list.name')" min-width="150" show-overflow-tooltip /> |
|
|
|