|
|
@ -1,5 +1,5 @@ |
|
|
<script setup> |
|
|
<script setup> |
|
|
import { ref, onMounted, reactive, computed, watch } from 'vue' |
|
|
|
|
|
|
|
|
import { ref, onMounted, reactive, computed, watch, nextTick } from 'vue' |
|
|
import ElementPlus from 'element-plus' |
|
|
import ElementPlus from 'element-plus' |
|
|
import { ElMessage, ElMessageBox } from 'element-plus' |
|
|
import { ElMessage, ElMessageBox } from 'element-plus' |
|
|
import { AiFillRead } from 'vue-icons-plus/ai' |
|
|
import { AiFillRead } from 'vue-icons-plus/ai' |
|
|
@ -41,6 +41,10 @@ const defaultTime = [ |
|
|
//时间格式化 |
|
|
//时间格式化 |
|
|
const formatTime = (val) => val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '' |
|
|
const formatTime = (val) => val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '' |
|
|
const tableData = ref([]) |
|
|
const tableData = ref([]) |
|
|
|
|
|
const tableRef = ref(null) |
|
|
|
|
|
const scrollTableTop = () => { |
|
|
|
|
|
tableRef.value?.setScrollTop?.(0) |
|
|
|
|
|
} |
|
|
//存储所有的地区数据 |
|
|
//存储所有的地区数据 |
|
|
const market = ref([]) |
|
|
const market = ref([]) |
|
|
const getTime = ref([]) |
|
|
const getTime = ref([]) |
|
|
@ -165,7 +169,7 @@ const reset = () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//查询 |
|
|
//查询 |
|
|
const search = () => { |
|
|
|
|
|
|
|
|
const search = async () => { |
|
|
//判断精网号查询是否为数字 |
|
|
//判断精网号查询是否为数字 |
|
|
getObj.value.pageNum = 1 |
|
|
getObj.value.pageNum = 1 |
|
|
if (selectData.value.jwcode) { |
|
|
if (selectData.value.jwcode) { |
|
|
@ -175,8 +179,8 @@ const search = () => { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
get() |
|
|
|
|
|
getTotalBeans() |
|
|
|
|
|
|
|
|
await get() |
|
|
|
|
|
await getTotalBeans() |
|
|
} |
|
|
} |
|
|
//获取表格数据 |
|
|
//获取表格数据 |
|
|
const get = async () => { |
|
|
const get = async () => { |
|
|
@ -205,6 +209,8 @@ const get = async () => { |
|
|
if (result.code == 200) { |
|
|
if (result.code == 200) { |
|
|
tableData.value = result.data.list |
|
|
tableData.value = result.data.list |
|
|
total.value = result.data.total |
|
|
total.value = result.data.total |
|
|
|
|
|
await nextTick() |
|
|
|
|
|
scrollTableTop() |
|
|
} else { |
|
|
} else { |
|
|
ElMessage.error(result.message) |
|
|
ElMessage.error(result.message) |
|
|
} |
|
|
} |
|
|
@ -406,7 +412,7 @@ onMounted(async function () { |
|
|
{{ t('common.freeGoldBean') }}{{ format3(freeBean) }} |
|
|
{{ t('common.freeGoldBean') }}{{ format3(freeBean) }} |
|
|
</div> |
|
|
</div> |
|
|
<div> |
|
|
<div> |
|
|
<el-table :data="tableData" style="width: 82vw;height:65vh;" @sort-change="handleSortChange" |
|
|
|
|
|
|
|
|
<el-table ref="tableRef" :data="tableData" style="width: 82vw;" height="65vh" @sort-change="handleSortChange" |
|
|
:row-style="{ height: '50px' }"> |
|
|
:row-style="{ height: '50px' }"> |
|
|
<el-table-column type="index" :label="t('common_list.id')" width="80px" fixed="left"> |
|
|
<el-table-column type="index" :label="t('common_list.id')" width="80px" fixed="left"> |
|
|
<template #default="scope"> |
|
|
<template #default="scope"> |
|
|
@ -540,4 +546,4 @@ onMounted(async function () { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</style> |
|
|
|
|
|
|
|
|
</style> |