diff --git a/src/views/wallet/wallet-setting/components/third-zy/index.vue b/src/views/wallet/wallet-setting/components/third-zy/index.vue index e213b0e..845dae3 100644 --- a/src/views/wallet/wallet-setting/components/third-zy/index.vue +++ b/src/views/wallet/wallet-setting/components/third-zy/index.vue @@ -19,7 +19,7 @@ :cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle" @sort-change="sortChangeHandle" - max-height="calc(100vh - 300px)" + max-height="calc(100vh - 260px)" > @@ -30,7 +30,7 @@ @@ -70,7 +70,6 @@
null
- @@ -95,7 +94,7 @@ import "vue-json-pretty/lib/styles.css" import { syncAllDept, syncAllMch, syncAllRole, syncAllUser } from "/@/api/wallet/mch-thrid-zy" import { syncNativeCardTradeInfo } from "/@/api/hard/hard-thrid-zy" import { useMessage } from "/@/hooks/message" -import { NextLoading } from "/@/utils/loading" +import { ElLoading } from "element-plus" const LogDetail = defineAsyncComponent(() => import("./detail.vue")) @@ -107,6 +106,7 @@ const state: BasicTableProps = reactive({ queryForm: {}, pageList: fetchList, }) +const loading = ref() const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, tableStyle } = useTable(state) @@ -116,9 +116,18 @@ const handleClickJsonView = (json: any) => { jsonData.value = JSON.parse(json) } +// 开启全屏loading +const loadingStart = () => { + loading.value = ElLoading.service({ + lock: true, + text: "同步中...", + background: "rgba(0, 0, 0, 0.7)", + }) +} + // 商户信息同步 const merchantInfoSync = async () => { - NextLoading.start() + loadingStart() try { const res = await syncAllMch() if (res.code === 0) { @@ -128,12 +137,13 @@ const merchantInfoSync = async () => { } catch (error: any) { useMessage().error(error) } finally { - NextLoading.done() + loading.value.close() + loading.value = null } } // 记账单位同步 const unitOfAccountSync = async () => { - NextLoading.start() + loadingStart() try { const res = await syncAllDept() if (res.code === 0) { @@ -143,12 +153,13 @@ const unitOfAccountSync = async () => { } catch (error: any) { useMessage().error(error) } finally { - NextLoading.done() + loading.value.close() + loading.value = null } } // 账户信息同步 const accountInfoSync = async () => { - NextLoading.start() + loadingStart() try { const res = await syncAllRole() if (res.code === 0) { @@ -158,12 +169,13 @@ const accountInfoSync = async () => { } catch (error: any) { useMessage().error(error) } finally { - NextLoading.done() + loading.value.close() + loading.value = null } } // 身份信息同步 const identityInfoSync = async () => { - NextLoading.start() + loadingStart() try { const res = await syncAllUser() if (res.code === 0) { @@ -173,12 +185,13 @@ const identityInfoSync = async () => { } catch (error: any) { useMessage().error(error) } finally { - NextLoading.done() + loading.value.close() + loading.value = null } } // 交易数据同步 const transactionDataSync = async () => { - NextLoading.start() + loadingStart() try { const res = await syncNativeCardTradeInfo() if (res.code === 0) { @@ -188,7 +201,8 @@ const transactionDataSync = async () => { } catch (error: any) { useMessage().error(error) } finally { - NextLoading.done() + loading.value.close() + loading.value = null } }