|
|
@ -80,7 +80,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="table"> |
|
|
<div class="table"> |
|
|
<el-table :data="tableData" style="width: 80vw;height:64vh;" @sort-change="handleSortChange" |
|
|
|
|
|
|
|
|
<el-table ref="tableRef" :data="tableData" style="width: 80vw;height:64vh;" @sort-change="handleSortChange" |
|
|
:row-style="{ height: '60px' }" :header-cell-style="{ textAlign: 'center' }" |
|
|
:row-style="{ height: '60px' }" :header-cell-style="{ textAlign: 'center' }" |
|
|
:cell-style="{ textAlign: 'center' }"> |
|
|
:cell-style="{ textAlign: 'center' }"> |
|
|
<el-table-column type="index" :label="t('common_list.id')" width="100px" fixed="left"> |
|
|
<el-table-column type="index" :label="t('common_list.id')" width="100px" fixed="left"> |
|
|
@ -430,7 +430,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup> |
|
|
<script setup> |
|
|
import { ref, watch, onMounted, computed } from 'vue'; |
|
|
|
|
|
|
|
|
import { ref, watch, onMounted, computed, nextTick } from 'vue'; |
|
|
import { storeToRefs } from 'pinia'; |
|
|
import { storeToRefs } from 'pinia'; |
|
|
import { ElMessage, ElMessageBox } from 'element-plus' |
|
|
import { ElMessage, ElMessageBox } from 'element-plus' |
|
|
import API from '@/util/http.js' |
|
|
import API from '@/util/http.js' |
|
|
@ -457,6 +457,10 @@ const adminStore = useAdminStore(); |
|
|
const { menuTree } = storeToRefs(adminStore); |
|
|
const { menuTree } = storeToRefs(adminStore); |
|
|
const adminData = ref({}) // 管理员信息 |
|
|
const adminData = ref({}) // 管理员信息 |
|
|
const tableData = ref([]) // 表格数据 |
|
|
const tableData = ref([]) // 表格数据 |
|
|
|
|
|
const tableRef = ref(null) |
|
|
|
|
|
const scrollTableTop = () => { |
|
|
|
|
|
tableRef.value?.setScrollTop?.(0) |
|
|
|
|
|
} |
|
|
const total = ref(0) // 总条数 |
|
|
const total = ref(0) // 总条数 |
|
|
const pageInfo = ref({ pageSize: 10, pageNum: 1 }) // 分页信息 |
|
|
const pageInfo = ref({ pageSize: 10, pageNum: 1 }) // 分页信息 |
|
|
const numUnitList = ref([t('cash.year'), t('cash.month')]) |
|
|
const numUnitList = ref([t('cash.year'), t('cash.month')]) |
|
|
@ -579,6 +583,8 @@ const getlist = async () => { |
|
|
}) |
|
|
}) |
|
|
if (result.code == 200) { |
|
|
if (result.code == 200) { |
|
|
tableData.value = result.data.list |
|
|
tableData.value = result.data.list |
|
|
|
|
|
await nextTick() |
|
|
|
|
|
scrollTableTop() |
|
|
total.value = result.data.total |
|
|
total.value = result.data.total |
|
|
} else { |
|
|
} else { |
|
|
ElMessage.error(t('elmessage.dataException')) |
|
|
ElMessage.error(t('elmessage.dataException')) |
|
|
|