正元同步配置
This commit is contained in:
1 parent
c2c76ec667
commit
0e7a05adf9
1 file changed
+38
-37
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="w-full">
|
||||
<div v-loading="syncLoading" class="layout-padding-auto layout-padding-view">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button type="primary" :disabled="syncLoading" @click="merchantInfoSync">商户信息同步</el-button>
|
||||
<el-button type="primary" :disabled="syncLoading" @click="unitOfAccountSync">记账单位同步</el-button>
|
||||
<el-button type="primary" :disabled="syncLoading" @click="accountInfoSync">账户信息同步</el-button>
|
||||
<el-button type="primary" :disabled="syncLoading" @click="identityInfoSync">身份信息同步</el-button>
|
||||
<el-button type="primary" :disabled="syncLoading" @click="transactionDataSync">交易数据同步</el-button>
|
||||
<el-button type="primary" @click="merchantInfoSync">商户信息同步</el-button>
|
||||
<el-button type="primary" @click="unitOfAccountSync">记账单位同步</el-button>
|
||||
<el-button type="primary" @click="accountInfoSync">账户信息同步</el-button>
|
||||
<el-button type="primary" @click="identityInfoSync">身份信息同步</el-button>
|
||||
<el-button type="primary" @click="transactionDataSync">交易数据同步</el-button>
|
||||
<right-toolbar :search="false" :export="false" class="ml10 mr20" style="float: right" @queryTable="getDataList" />
|
||||
</div>
|
||||
</el-row>
|
||||
@@ -19,7 +19,7 @@
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@sort-change="sortChangeHandle"
|
||||
max-height="calc(100vh - 200px)"
|
||||
max-height="calc(100vh - 300px)"
|
||||
>
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column prop="apiUrl" label="apiUrl" show-overflow-tooltip min-width="160" />
|
||||
@@ -74,7 +74,7 @@
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
<el-dialog title="" v-model="jsonViewVisible">
|
||||
<el-dialog v-model="jsonViewVisible">
|
||||
<vue-json-pretty :data="jsonData" showLength showLineNumber showIcon :collapsedOnClickBrackets="false" />
|
||||
<template #footer>
|
||||
<el-button @click="jsonViewVisible = false">关闭</el-button>
|
||||
@@ -92,7 +92,9 @@ import { useDict } from "/@/hooks/dict"
|
||||
import VueJsonPretty from "vue-json-pretty"
|
||||
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"
|
||||
|
||||
const LogDetail = defineAsyncComponent(() => import("./detail.vue"))
|
||||
|
||||
@@ -104,7 +106,6 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: fetchList,
|
||||
})
|
||||
const syncLoading = ref<boolean>()
|
||||
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, tableStyle } = useTable(state)
|
||||
|
||||
@@ -116,77 +117,77 @@ const handleClickJsonView = (json: any) => {
|
||||
|
||||
// 商户信息同步
|
||||
const merchantInfoSync = async () => {
|
||||
syncLoading.value = true
|
||||
NextLoading.start()
|
||||
try {
|
||||
const res = await syncAllMch()
|
||||
if (res.code === 0) {
|
||||
return useMessage().success("同步成功")
|
||||
}
|
||||
useMessage().error("同步失败")
|
||||
} catch (error) {
|
||||
useMessage().error("错误")
|
||||
} catch (error: any) {
|
||||
useMessage().error(error)
|
||||
} finally {
|
||||
syncLoading.value = false
|
||||
NextLoading.done()
|
||||
}
|
||||
}
|
||||
// 记账单位同步
|
||||
const unitOfAccountSync = async () => {
|
||||
syncLoading.value = true
|
||||
NextLoading.start()
|
||||
try {
|
||||
const res = await syncAllDept()
|
||||
if (res.code === 0) {
|
||||
return useMessage().success("同步成功")
|
||||
}
|
||||
useMessage().error("同步失败")
|
||||
} catch (error) {
|
||||
useMessage().error("错误")
|
||||
} catch (error: any) {
|
||||
useMessage().error(error)
|
||||
} finally {
|
||||
syncLoading.value = false
|
||||
NextLoading.done()
|
||||
}
|
||||
}
|
||||
// 账户信息同步
|
||||
const accountInfoSync = async () => {
|
||||
syncLoading.value = true
|
||||
NextLoading.start()
|
||||
try {
|
||||
const res = await syncAllRole()
|
||||
if (res.code === 0) {
|
||||
return useMessage().success("同步成功")
|
||||
}
|
||||
useMessage().error("同步失败")
|
||||
} catch (error) {
|
||||
useMessage().error("错误")
|
||||
} catch (error: any) {
|
||||
useMessage().error(error)
|
||||
} finally {
|
||||
syncLoading.value = false
|
||||
NextLoading.done()
|
||||
}
|
||||
}
|
||||
// 身份信息同步
|
||||
const identityInfoSync = async () => {
|
||||
syncLoading.value = true
|
||||
NextLoading.start()
|
||||
try {
|
||||
const res = await syncAllUser()
|
||||
if (res.code === 0) {
|
||||
return useMessage().success("同步成功")
|
||||
}
|
||||
useMessage().error("同步失败")
|
||||
} catch (error) {
|
||||
useMessage().error("错误")
|
||||
} catch (error: any) {
|
||||
useMessage().error(error)
|
||||
} finally {
|
||||
syncLoading.value = false
|
||||
NextLoading.done()
|
||||
}
|
||||
}
|
||||
// 交易数据同步
|
||||
const transactionDataSync = async () => {
|
||||
// syncLoading.value = true
|
||||
// try {
|
||||
// const res = await ()
|
||||
// if (res.code === 0) {
|
||||
// return useMessage().success("同步成功")
|
||||
// }
|
||||
// useMessage().error("同步失败")
|
||||
// } catch (error) {
|
||||
// useMessage().error("错误")
|
||||
// } finally {
|
||||
// syncLoading.value = false
|
||||
// }
|
||||
NextLoading.start()
|
||||
try {
|
||||
const res = await syncNativeCardTradeInfo()
|
||||
if (res.code === 0) {
|
||||
return useMessage().success("同步成功")
|
||||
}
|
||||
useMessage().error("同步失败")
|
||||
} catch (error: any) {
|
||||
useMessage().error(error)
|
||||
} finally {
|
||||
NextLoading.done()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user