feat:钱包、设备权限

This commit is contained in:
dzc committed 2025-01-19 11:54:56 +08:00
1 parent 611f1d634d
commit ef3dea40fa
19 files changed
+484 -361

No files matched your search

@@ -0,0 +1,68 @@
<template>
<el-dialog title="钱包余额明细" v-model="visible" width="60%" :close-on-click-modal="false" draggable>
<el-table
:data="state.dataList"
v-loading="state.loading"
border
:cell-style="tableStyle.cellStyle"
:header-cell-style="tableStyle.headerCellStyle"
@sort-change="sortChangeHandle"
>
<el-table-column align="center" width="200" label="编号" prop="id" />
<el-table-column align="center" width="200" label="钱包编号" prop="walletId" />
<el-table-column align="center" width="200" label="交易类型" prop="title" />
<el-table-column align="center" label="交易金额" prop="price">
<template #default="{ row }"> {{ displayPrice(row.price) }} </template>
</el-table-column>
<el-table-column align="center" label="钱包余额" prop="balance">
<template #default="{ row }"> {{ displayPrice(row.balance) }} </template>
</el-table-column>
<el-table-column align="center" label="交易时间" prop="createTime" width="180px" />
</el-table>
<template #footer>
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
</template>
</el-dialog>
</template>
<script setup lang="ts" name="WalletManageDialog">
import { BasicTableProps, useTable } from "/@/hooks/table"
import { useDict } from "/@/hooks/dict"
import { useMessage } from "/@/hooks/message"
import * as walletTransactionApi from "/@/api/wallet/wallet-transaction"
import { rule } from "/@/utils/validate"
import { displayPrice } from "/@/utils/formatMoney"
const emit = defineEmits(["refresh"])
// 定义变量内容
const visible = ref(false)
const loading = ref(false)
// 定义字典
// 提交表单数据
const form = reactive({})
const state: BasicTableProps = reactive<BasicTableProps>({
queryForm: {},
pageList: walletTransactionApi.pageJoin,
})
// table hook
const { getDataList, total, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } =
useTable(state)
// 打开弹窗
const openDialog = (id: string) => {
visible.value = true
form.id = ""
if (id) {
state.queryForm.walletId = id
state.dataList = []
getDataList()
}
}
// 暴露变量
defineExpose({
openDialog,
})
</script>