正元同步配置
This commit is contained in:
1 parent
a6dcf72061
commit
bd0059b2d6
3 files changed
+112
-154
No files matched your search
@@ -0,0 +1,80 @@
|
||||
<template>
|
||||
<el-drawer v-model="visible" :title="data.title" size="30%">
|
||||
<div class="w-full">
|
||||
<div
|
||||
class="coding inverse-toggle px-5 pt-4 shadow-lg text-gray-100 text-sm font-mono subpixel-antialiased bg-gray-800 pb-6 pt-4 rounded-lg leading-normal overflow-hidden"
|
||||
>
|
||||
<div class="top mb-2 flex">
|
||||
<div class="h-3 w-3 bg-red-500 rounded-full"></div>
|
||||
<div class="ml-2 h-3 w-3 bg-orange-300 rounded-full"></div>
|
||||
<div class="ml-2 h-3 w-3 bg-green-500 rounded-full"></div>
|
||||
</div>
|
||||
<div class="mt-4 flex">
|
||||
<span class="text-green-400">创建时间: </span>
|
||||
<p class="flex-1 typing items-center pl-2 whitespace-normal overflow-hidden break-all">
|
||||
{{ data.createTime }}
|
||||
<br />
|
||||
</p>
|
||||
</div>
|
||||
<div class="mt-4 flex">
|
||||
<span class="text-green-400">操作人: </span>
|
||||
<p class="flex-1 typing items-center pl-2 whitespace-normal overflow-hidden break-all">
|
||||
{{ data.createBy }}
|
||||
<br />
|
||||
</p>
|
||||
</div>
|
||||
<div class="mt-4 flex">
|
||||
<span class="text-green-400">api名称: </span>
|
||||
<p class="flex-1 typing items-center pl-2 whitespace-normal overflow-hidden break-all">
|
||||
{{ data.error[0] }}
|
||||
<br />
|
||||
</p>
|
||||
</div>
|
||||
<div class="mt-4 flex">
|
||||
<span class="text-green-400">api: </span>
|
||||
<p class="flex-1 typing items-center pl-2 whitespace-normal overflow-hidden break-all">
|
||||
{{ data.error[1] }}
|
||||
<br />
|
||||
</p>
|
||||
</div>
|
||||
<div class="mt-4 flex">
|
||||
<span class="text-green-400">错误: </span>
|
||||
<p class="flex-1 typing items-center pl-2 whitespace-normal overflow-hidden break-all">
|
||||
{{ data.error[2] + "," + data.error[3] }}
|
||||
<br />
|
||||
</p>
|
||||
</div>
|
||||
<div class="mt-4 flex">
|
||||
<span class="text-green-400">请求地址: </span>
|
||||
<p class="flex-1 typing items-center pl-2 whitespace-normal overflow-hidden break-all">
|
||||
{{ data.error[6] }}
|
||||
<br />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="log-detail">
|
||||
const visible = ref(false)
|
||||
|
||||
const data = reactive({} as any)
|
||||
|
||||
const openDialog = (row: any) => {
|
||||
visible.value = true
|
||||
|
||||
Object.assign(data, {
|
||||
...row,
|
||||
error: row.error
|
||||
.split("stack")[0]
|
||||
.split("|")
|
||||
.filter((item: any) => item),
|
||||
})
|
||||
}
|
||||
|
||||
// 暴露变量
|
||||
defineExpose({
|
||||
openDialog,
|
||||
})
|
||||
</script>
|
||||
@@ -1,137 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :title="form.id ? '编辑' : '新增'" v-model="visible" :close-on-click-modal="false" draggable>
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="同步类型" prop="bizType">
|
||||
<el-input v-model="form.bizType" placeholder="请输入同步类型" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="原始res" prop="orgRes">
|
||||
<el-input v-model="form.orgRes" placeholder="请输入原始res" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="加密res" prop="encipherRes">
|
||||
<el-input v-model="form.encipherRes" placeholder="请输入加密res" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="原始req" prop="orgReq">
|
||||
<el-input v-model="form.orgReq" placeholder="请输入原始req" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="加密req" prop="encipherReq">
|
||||
<el-input v-model="form.encipherReq" placeholder="请输入加密req" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="同步版本格式化为14位字符串,如果是数字不足14位的,前面补0" prop="version">
|
||||
<el-input v-model="form.version" placeholder="请输入同步版本格式化为14位字符串,如果是数字不足14位的,前面补0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="同步版本格式化为14位字符串,如果是数字不足14位的,前面补0" prop="timeConsuming">
|
||||
<el-input v-model="form.timeConsuming" placeholder="请输入同步版本格式化为14位字符串,如果是数字不足14位的,前面补0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="ThirdZyLogDialog">
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
import { getObj, addObj, putObj } from "/@/api/wallet/third-zy-log"
|
||||
import { rule } from "/@/utils/validate"
|
||||
const emit = defineEmits(["refresh"])
|
||||
|
||||
// 定义变量内容
|
||||
const dataFormRef = ref()
|
||||
const visible = ref(false)
|
||||
const loading = ref(false)
|
||||
// 定义字典
|
||||
|
||||
// 提交表单数据
|
||||
const form = reactive({
|
||||
id: "",
|
||||
bizType: "",
|
||||
orgRes: "",
|
||||
encipherRes: "",
|
||||
orgReq: "",
|
||||
encipherReq: "",
|
||||
version: "",
|
||||
timeConsuming: "",
|
||||
})
|
||||
|
||||
// 定义校验规则
|
||||
const dataRules = ref({})
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = (id: string) => {
|
||||
visible.value = true
|
||||
form.id = ""
|
||||
|
||||
// 重置表单数据
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields()
|
||||
})
|
||||
|
||||
// 获取thirdZyLog信息
|
||||
if (id) {
|
||||
form.id = id
|
||||
getthirdZyLogData(id)
|
||||
}
|
||||
}
|
||||
|
||||
// 提交
|
||||
const onSubmit = async () => {
|
||||
const valid = await dataFormRef.value.validate().catch(() => {})
|
||||
if (!valid) return false
|
||||
|
||||
try {
|
||||
loading.value = true
|
||||
form.id ? await putObj(form) : await addObj(form)
|
||||
useMessage().success(form.id ? "修改成功" : "添加成功")
|
||||
visible.value = false
|
||||
emit("refresh")
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化表单数据
|
||||
const getthirdZyLogData = (id: string) => {
|
||||
// 获取数据
|
||||
loading.value = true
|
||||
getObj(id)
|
||||
.then((res: any) => {
|
||||
Object.assign(form, res.data)
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
// 暴露变量
|
||||
defineExpose({
|
||||
openDialog,
|
||||
})
|
||||
</script>
|
||||
@@ -8,6 +8,7 @@
|
||||
<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>
|
||||
<right-toolbar :search="false" :export="false" class="ml10 mr20" style="float: right" @queryTable="getDataList" />
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
@@ -21,52 +22,66 @@
|
||||
max-height="calc(100vh - 200px)"
|
||||
>
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column prop="apiUrl" label="apiUrl" show-overflow-tooltip />
|
||||
<el-table-column prop="bizType" label="同步类型" show-overflow-tooltip>
|
||||
<el-table-column prop="apiUrl" label="apiUrl" show-overflow-tooltip min-width="160" />
|
||||
<el-table-column prop="bizType" label="同步类型" min-width="160">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :type="row.bizType" :dict="third_zy_log_biz_type" />
|
||||
<dict-tag :value="row.bizType" :options="thrid_zy_biz_type" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orgRes" label="原始res" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-button text type="primary" @click="handleClickJsonView(row.orgRes)">查看</el-button>
|
||||
<el-button text :type="row.orgRes ? 'primary' : 'danger'" @click="row.orgRes && handleClickJsonView(row.orgRes)">
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="encipherRes" label="加密res" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-button text type="primary" @click="handleClickJsonView(row.encipherRes)">查看</el-button>
|
||||
<el-button text :type="row.encipherRes ? 'primary' : 'danger'" @click="row.encipherRes && handleClickJsonView(row.encipherRes)">
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orgReq" label="原始req" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-button text type="primary" @click="handleClickJsonView(row.orgReq)">查看</el-button>
|
||||
<el-button text :type="row.encipherRes ? 'primary' : 'danger'" @click="row.encipherRes && handleClickJsonView(row.orgReq)">
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="encipherReq" label="加密req" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-button text type="primary" @click="handleClickJsonView(row.encipherReq)">查看</el-button>
|
||||
<el-button text :type="row.encipherReq ? 'primary' : 'danger'" @click="row.encipherReq && handleClickJsonView(row.encipherReq)">
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="error" label="调用错误" show-overflow-tooltip />
|
||||
<el-table-column prop="version" label="同步版本" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120">
|
||||
<el-table-column prop="error" label="调用错误" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<el-button text type="primary" v-auth="'third_thirdZyLog_edit'" @click="formDialogRef.openDialog(row.id)">编辑</el-button>
|
||||
<el-button
|
||||
icon="view"
|
||||
@click="row.error && LogDetailRef.openDialog(row)"
|
||||
size="small"
|
||||
text
|
||||
:type="row.error ? 'primary' : 'danger'"
|
||||
>
|
||||
详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="version" label="同步版本" show-overflow-tooltip />
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
|
||||
<el-dialog title="" v-model="jsonViewVisible">
|
||||
<vue-json-pretty :data="jsonData" showLength showLineNumber showIcon :collapsedOnClickBrackets="false" />
|
||||
<template #footer>
|
||||
<el-button @click="jsonViewVisible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<log-detail ref="LogDetailRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -79,10 +94,10 @@ import "vue-json-pretty/lib/styles.css"
|
||||
import { syncAllDept, syncAllMch, syncAllRole, syncAllUser } from "/@/api/wallet/mch-thrid-zy"
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
|
||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||
const LogDetail = defineAsyncComponent(() => import("./detail.vue"))
|
||||
|
||||
const formDialogRef = ref()
|
||||
const { third_zy_log_biz_type } = useDict("third_zy_log_biz_type")
|
||||
const LogDetailRef = ref()
|
||||
const { thrid_zy_biz_type } = useDict("thrid_zy_biz_type")
|
||||
const jsonViewVisible = ref<boolean>()
|
||||
const jsonData = ref()
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
|
||||
Reference in new issue
Block a user