IDCDatasync-vue/src/views/datalink/modules/syncLog.vue
2025-02-24 15:47:15 +08:00

132 lines
2.7 KiB
Vue

<template>
<a-modal
:title="title"
:width="800"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleOk"
@cancel="handleCancel"
:ok-button-props="{ style: { display: 'none' } }"
okText="确认"
cancelText="关闭">
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource">
<!-- :locale="myLocale"-->
<!-- 字符串超长截取省略号显示-->
</a-table>
</a-modal>
</template>
<script>
import moment from "moment"
import JCron from "@/components/jeecg/JCron";
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
import { datasyncgetSyncLog } from '@/api/dblink'
export default {
name: "syncLog",
components: {
JCron,
JSelectMultiple
},
data () {
return {
title:"操作",
buttonStyle: 'solid',
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
visible: false,
confirmLoading: false,
strategys:[],
dataLinkType:'',
model:{},
queryParam: {
lastId :0,
num:99999999,
syncTaskId :""
},
columns: [
{
title: '#',
dataIndex: '',
key:'id',
width:60,
align:"id",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title: '同步记录',
align:"content",
dataIndex: 'content',
width:300,
},
{
title: '执行时间',
align:"createTime",
dataIndex: 'createTime',
width:60,
},
],
dataSource:{},
}
},
created () {
},
methods: {
add () {
this.visible =true;
},
edit (record) {
this.syncTaskId = record.id;
this.queryParam.syncTaskId = record.id;
this.visible =true;
this.getSyncLog();
},
onOk(value) {
},
getSyncLog(){
datasyncgetSyncLog(this.queryParam).then((res) => {
if (res.success) {
this.dataSource = res.result
} else {
this.$message.warning(res.message);
}
});
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.close();
},
handleCancel () {
this.close()
},
}
}
</script>
<style scoped>
.disabled{
pointer-events: none;
}
</style>